ola-0.10.9/0000775000175000017500000000000014376533272007373 500000000000000ola-0.10.9/olad/0000775000175000017500000000000014376533271010311 500000000000000ola-0.10.9/olad/OlaServer.cpp0000664000175000017500000003545314376533110012641 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * OlaServer.cpp * OlaServer is the main OLA Server class * Copyright (C) 2005 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include #include #include #include "common/protocol/Ola.pb.h" #include "common/rpc/RpcChannel.h" #include "common/rpc/RpcServer.h" #include "common/rpc/RpcSession.h" #include "ola/Constants.h" #include "ola/ExportMap.h" #include "ola/Logging.h" #include "ola/base/Flags.h" #include "ola/network/InterfacePicker.h" #include "ola/network/Socket.h" #include "ola/rdm/PidStore.h" #include "ola/rdm/UID.h" #include "ola/stl/STLUtils.h" #include "olad/ClientBroker.h" #include "olad/DiscoveryAgent.h" #include "olad/OlaServer.h" #include "olad/OlaServerServiceImpl.h" #include "olad/Plugin.h" #include "olad/PluginAdaptor.h" #include "olad/PluginManager.h" #include "olad/Port.h" #include "olad/PortBroker.h" #include "olad/Preferences.h" #include "olad/Universe.h" #include "olad/plugin_api/Client.h" #include "olad/plugin_api/DeviceManager.h" #include "olad/plugin_api/PortManager.h" #include "olad/plugin_api/UniverseStore.h" #ifdef HAVE_LIBMICROHTTPD #include "olad/OladHTTPServer.h" #endif // HAVE_LIBMICROHTTPD DEFINE_s_uint16(rpc_port, r, ola::OlaServer::DEFAULT_RPC_PORT, "The port to listen for RPCs on. Defaults to 9010."); DEFINE_default_bool(register_with_dns_sd, true, "Don't register the web service using DNS-SD (Bonjour)."); namespace ola { using ola::proto::OlaClientService_Stub; using ola::rdm::RootPidStore; using ola::rpc::RpcChannel; using ola::rpc::RpcSession; using ola::rpc::RpcServer; using std::auto_ptr; using std::pair; using std::vector; const char OlaServer::INSTANCE_NAME_KEY[] = "instance-name"; const char OlaServer::K_INSTANCE_NAME_VAR[] = "server-instance-name"; const char OlaServer::K_UID_VAR[] = "server-uid"; const char OlaServer::SERVER_PREFERENCES[] = "server"; const char OlaServer::UNIVERSE_PREFERENCES[] = "universe"; // The Bonjour API expects [,] so we use that form here. const char OlaServer::K_DISCOVERY_SERVICE_TYPE[] = "_http._tcp,_ola"; const unsigned int OlaServer::K_HOUSEKEEPING_TIMEOUT_MS = 10000; OlaServer::OlaServer(const vector &plugin_loaders, PreferencesFactory *preferences_factory, ola::io::SelectServer *select_server, const Options &ola_options, ola::network::TCPAcceptingSocket *socket, ExportMap *export_map) : m_options(ola_options), m_plugin_loaders(plugin_loaders), m_preferences_factory(preferences_factory), m_ss(select_server), m_accepting_socket(socket), m_export_map(export_map), m_default_uid(OPEN_LIGHTING_ESTA_CODE, 0), m_server_preferences(NULL), m_universe_preferences(NULL), m_housekeeping_timeout(ola::thread::INVALID_TIMEOUT) { if (!m_export_map) { m_our_export_map.reset(new ExportMap()); m_export_map = m_our_export_map.get(); } } OlaServer::~OlaServer() { m_ss->DrainCallbacks(); #ifdef HAVE_LIBMICROHTTPD if (m_httpd.get()) { m_httpd->Stop(); m_httpd.reset(); } #endif // HAVE_LIBMICROHTTPD // Order is important during shutdown. // Shutdown the RPC server first since it depends on almost everything else. m_rpc_server.reset(); if (m_housekeeping_timeout != ola::thread::INVALID_TIMEOUT) { m_ss->RemoveTimeout(m_housekeeping_timeout); } StopPlugins(); m_broker.reset(); m_port_broker.reset(); if (m_universe_store.get()) { m_universe_store->DeleteAll(); m_universe_store.reset(); } if (m_server_preferences) { m_server_preferences->Save(); } if (m_universe_preferences) { m_universe_preferences->Save(); } m_port_manager.reset(); m_plugin_adaptor.reset(); m_device_manager.reset(); m_plugin_manager.reset(); m_service_impl.reset(); } bool OlaServer::Init() { if (m_service_impl.get()) { return false; } if (!m_ss) { return false; } // TODO(simon): run without preferences & PluginLoader if (m_plugin_loaders.empty() || !m_preferences_factory) { return false; } auto_ptr pid_store( RootPidStore::LoadFromDirectory(m_options.pid_data_dir)); if (!pid_store.get()) { OLA_WARN << "No PID definitions loaded"; } #ifndef _WIN32 signal(SIGPIPE, SIG_IGN); #endif // _WIN32 // fetch the interface info ola::network::Interface iface; { auto_ptr picker( ola::network::InterfacePicker::NewPicker()); if (!picker->ChooseInterface(&iface, m_options.network_interface)) { OLA_WARN << "No network interface found"; } else { // default to using the ip as an id m_default_uid = ola::rdm::UID(OPEN_LIGHTING_ESTA_CODE, iface.ip_address.AsInt()); } } m_export_map->GetStringVar(K_UID_VAR)->Set(m_default_uid.ToString()); OLA_INFO << "Server UID is " << m_default_uid; m_server_preferences = m_preferences_factory->NewPreference( SERVER_PREFERENCES); m_server_preferences->Load(); if (m_server_preferences->SetDefaultValue(INSTANCE_NAME_KEY, StringValidator(), OLA_DEFAULT_INSTANCE_NAME)) { m_server_preferences->Save(); } m_instance_name = m_server_preferences->GetValue(INSTANCE_NAME_KEY); m_export_map->GetStringVar(K_INSTANCE_NAME_VAR)->Set(m_instance_name); OLA_INFO << "Server instance name is " << m_instance_name; Preferences *universe_preferences = m_preferences_factory->NewPreference( UNIVERSE_PREFERENCES); universe_preferences->Load(); auto_ptr universe_store( new UniverseStore(universe_preferences, m_export_map)); auto_ptr port_broker(new PortBroker()); auto_ptr port_manager( new PortManager(universe_store.get(), port_broker.get())); auto_ptr broker(new ClientBroker()); auto_ptr device_manager( new DeviceManager(m_preferences_factory, port_manager.get())); auto_ptr plugin_adaptor( new PluginAdaptor(device_manager.get(), m_ss, m_export_map, m_preferences_factory, port_broker.get(), &m_instance_name)); auto_ptr plugin_manager( new PluginManager(m_plugin_loaders, plugin_adaptor.get())); auto_ptr service_impl(new OlaServerServiceImpl( universe_store.get(), device_manager.get(), plugin_manager.get(), port_manager.get(), broker.get(), m_ss->WakeUpTime(), NewCallback(this, &OlaServer::ReloadPluginsInternal))); // Initialize the RPC server. RpcServer::Options rpc_options; rpc_options.listen_socket = m_accepting_socket; rpc_options.listen_port = FLAGS_rpc_port; rpc_options.export_map = m_export_map; auto_ptr rpc_server( new RpcServer(m_ss, service_impl.get(), this, rpc_options)); if (!rpc_server->Init()) { OLA_WARN << "Failed to init RPC server"; return false; } // Discovery auto_ptr discovery_agent; if (FLAGS_register_with_dns_sd) { DiscoveryAgentFactory discovery_agent_factory; discovery_agent.reset(discovery_agent_factory.New()); if (discovery_agent.get()) { if (!discovery_agent->Init()) { OLA_WARN << "Failed to Init DiscoveryAgent"; return false; } } } bool web_server_started = false; // Initializing the web server causes a call to NewClient. We need to have // the broker in place for the call, otherwise we'll segfault. m_broker.reset(broker.release()); #ifdef HAVE_LIBMICROHTTPD if (m_options.http_enable) { if (StartHttpServer(rpc_server.get(), iface)) { web_server_started = true; } else { OLA_WARN << "Failed to start the HTTP server."; m_broker.reset(); return false; } } #endif // HAVE_LIBMICROHTTPD if (web_server_started && discovery_agent.get()) { DiscoveryAgentInterface::RegisterOptions options; options.txt_data["path"] = "/"; discovery_agent->RegisterService( m_instance_name, K_DISCOVERY_SERVICE_TYPE, m_options.http_port, options); } // Ok, we've created and initialized everything correctly by this point. Now // we save all the pointers and schedule the last of the callbacks. m_device_manager.reset(device_manager.release()); m_discovery_agent.reset(discovery_agent.release()); m_plugin_adaptor.reset(plugin_adaptor.release()); m_plugin_manager.reset(plugin_manager.release()); m_port_broker.reset(port_broker.release()); m_port_manager.reset(port_manager.release()); m_rpc_server.reset(rpc_server.release()); m_service_impl.reset(service_impl.release()); m_universe_store.reset(universe_store.release()); UpdatePidStore(pid_store.release()); if (m_housekeeping_timeout != ola::thread::INVALID_TIMEOUT) { m_ss->RemoveTimeout(m_housekeeping_timeout); } m_housekeeping_timeout = m_ss->RegisterRepeatingTimeout( K_HOUSEKEEPING_TIMEOUT_MS, ola::NewCallback(this, &OlaServer::RunHousekeeping)); // The plugin load procedure can take a while so we run it in the main loop. m_ss->Execute( ola::NewSingleCallback(m_plugin_manager.get(), &PluginManager::LoadAll)); return true; } void OlaServer::ReloadPlugins() { m_ss->Execute(NewCallback(this, &OlaServer::ReloadPluginsInternal)); } void OlaServer::ReloadPidStore() { // We load the PIDs in this thread, and then hand the RootPidStore over to // the main thread. This avoids doing disk I/O in the network thread. const RootPidStore* pid_store = RootPidStore::LoadFromDirectory( m_options.pid_data_dir); if (!pid_store) { return; } m_ss->Execute(NewCallback(this, &OlaServer::UpdatePidStore, pid_store)); } void OlaServer::NewConnection(ola::io::ConnectedDescriptor *descriptor) { if (!descriptor) { return; } InternalNewConnection(m_rpc_server.get(), descriptor); } ola::network::GenericSocketAddress OlaServer::LocalRPCAddress() const { if (m_rpc_server.get()) { return m_rpc_server->ListenAddress(); } else { return ola::network::GenericSocketAddress(); } } void OlaServer::NewClient(RpcSession *session) { OlaClientService_Stub *stub = new OlaClientService_Stub(session->Channel()); Client *client = new Client(stub, m_default_uid); session->SetData(static_cast(client)); m_broker->AddClient(client); } void OlaServer::ClientRemoved(RpcSession *session) { auto_ptr client(reinterpret_cast(session->GetData())); session->SetData(NULL); m_broker->RemoveClient(client.get()); vector universe_list; m_universe_store->GetList(&universe_list); vector::iterator uni_iter; for (uni_iter = universe_list.begin(); uni_iter != universe_list.end(); ++uni_iter) { (*uni_iter)->RemoveSourceClient(client.get()); (*uni_iter)->RemoveSinkClient(client.get()); } } /* * Run the garbage collector */ bool OlaServer::RunHousekeeping() { OLA_DEBUG << "Garbage collecting"; m_universe_store->GarbageCollectUniverses(); // Give the universes an opportunity to run discovery vector universes; m_universe_store->GetList(&universes); vector::iterator iter = universes.begin(); const TimeStamp *now = m_ss->WakeUpTime(); for (; iter != universes.end(); ++iter) { (*iter)->CleanStaleSourceClients(); if ((*iter)->IsActive() && (*iter)->RDMDiscoveryInterval().Seconds() && *now - (*iter)->LastRDMDiscovery() > (*iter)->RDMDiscoveryInterval()) { // run incremental discovery (*iter)->RunRDMDiscovery(NULL, false); } } return true; } #ifdef HAVE_LIBMICROHTTPD bool OlaServer::StartHttpServer(ola::rpc::RpcServer *server, const ola::network::Interface &iface) { if (!m_options.http_enable) { return true; } // create a pipe for the HTTP server to communicate with the main // server on. auto_ptr pipe_descriptor( new ola::io::PipeDescriptor()); if (!pipe_descriptor->Init()) { return false; } // ownership of the pipe_descriptor is transferred here. OladHTTPServer::OladHTTPServerOptions options; options.port = m_options.http_port ? m_options.http_port : DEFAULT_HTTP_PORT; options.data_dir = (m_options.http_data_dir.empty() ? HTTP_DATA_DIR : m_options.http_data_dir); options.enable_quit = m_options.http_enable_quit; auto_ptr httpd( new OladHTTPServer(m_export_map, options, pipe_descriptor->OppositeEnd(), this, iface)); if (httpd->Init()) { httpd->Start(); // register the pipe descriptor as a client InternalNewConnection(server, pipe_descriptor.release()); m_httpd.reset(httpd.release()); return true; } else { pipe_descriptor->Close(); return false; } } #endif // HAVE_LIBMICROHTTPD void OlaServer::StopPlugins() { if (m_plugin_manager.get()) { m_plugin_manager->UnloadAll(); } if (m_device_manager.get()) { if (m_device_manager->DeviceCount()) { OLA_WARN << "Some devices failed to unload, we're probably leaking " << "memory now"; } m_device_manager->UnregisterAllDevices(); } } /* * Add a new ConnectedDescriptor to this Server. * @param socket the new ConnectedDescriptor */ bool OlaServer::InternalNewConnection( ola::rpc::RpcServer *server, ola::io::ConnectedDescriptor *descriptor) { if (server) { return server->AddClient(descriptor); } else { delete descriptor; return false; } } void OlaServer::ReloadPluginsInternal() { OLA_INFO << "Reloading plugins"; StopPlugins(); m_plugin_manager->LoadAll(); } void OlaServer::UpdatePidStore(const RootPidStore *pid_store) { OLA_INFO << "Updated PID definitions."; #ifdef HAVE_LIBMICROHTTPD if (m_httpd.get()) { m_httpd->SetPidStore(pid_store); } #endif // HAVE_LIBMICROHTTPD m_pid_store.reset(pid_store); OLA_INFO << "PID store is at " << m_pid_store.get(); } } // namespace ola ola-0.10.9/olad/OlaDaemon.h0000664000175000017500000000564714376533110012245 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * OlaDaemon.h * The OLA Daemon class. * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_OLADAEMON_H_ #define OLAD_OLADAEMON_H_ #include #include #include #include "ola/Constants.h" #include "ola/ExportMap.h" #include "ola/base/Macro.h" #include "ola/io/SelectServer.h" #include "ola/network/SocketAddress.h" #include "olad/OlaServer.h" namespace ola { class OlaDaemon { public: /** * @brief Create a new OlaDaemon. * @param options The Options for the new OlaDaemon. * @param export_map an optional ExportMap. */ OlaDaemon(const OlaServer::Options &options, ExportMap *export_map = NULL); /** * @brief Destroy this object. */ ~OlaDaemon(); /** * @brief Initialise the daemon. * @return true on success, false on failure. */ bool Init(); /** * @brief Shutdown the daemon. */ void Shutdown(); /** * @brief Run the daemon. */ void Run(); /** * @brief Return the socket address the RPC server is listening on. * @returns A socket address, which is empty if the server hasn't been * initialized. */ ola::network::GenericSocketAddress RPCAddress() const; /** * @brief Get the SelectServer the daemon is using. * @returns A SelectServer object. */ ola::io::SelectServer* GetSelectServer() { return &m_ss; } /** * @brief Get the OlaServer the daemon is using. * @returns An OlaServer object. */ OlaServer *GetOlaServer() const { return m_server.get(); } static const unsigned int DEFAULT_RPC_PORT = OLA_DEFAULT_PORT; private: const OlaServer::Options m_options; class ExportMap *m_export_map; ola::io::SelectServer m_ss; std::vector m_plugin_loaders; // Populated in Init() std::auto_ptr m_preferences_factory; std::auto_ptr m_server; std::string DefaultConfigDir(); bool InitConfigDir(const std::string &path); static const char OLA_CONFIG_DIR[]; static const char CONFIG_DIR_KEY[]; static const char UID_KEY[]; static const char USER_NAME_KEY[]; static const char GID_KEY[]; static const char GROUP_NAME_KEY[]; DISALLOW_COPY_AND_ASSIGN(OlaDaemon); }; } // namespace ola #endif // OLAD_OLADAEMON_H_ ola-0.10.9/olad/OladHTTPServer.h0000664000175000017500000001764614376533110013156 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * OladHTTPServer.h * Interface for the OLA HTTP class * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_OLADHTTPSERVER_H_ #define OLAD_OLADHTTPSERVER_H_ #include #include #include #include "ola/ExportMap.h" #include "ola/client/OlaClient.h" #include "ola/base/Macro.h" #include "ola/http/HTTPServer.h" #include "ola/http/OlaHTTPServer.h" #include "ola/network/Interface.h" #include "ola/rdm/PidStore.h" #include "olad/RDMHTTPModule.h" namespace ola { /* * This is the main OLA HTTP Server */ class OladHTTPServer: public ola::http::OlaHTTPServer { public: struct OladHTTPServerOptions: public ola::http::HTTPServer::HTTPServerOptions { public: bool enable_quit; OladHTTPServerOptions() : ola::http::HTTPServer::HTTPServerOptions(), enable_quit(true) { } }; OladHTTPServer(ExportMap *export_map, const OladHTTPServerOptions &options, ola::io::ConnectedDescriptor *client_socket, class OlaServer *ola_server, const ola::network::Interface &iface); virtual ~OladHTTPServer(); bool Init(); void SetPidStore(const ola::rdm::RootPidStore *pid_store); int JsonServerStats(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int JsonUniversePluginList(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int JsonPluginInfo(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int SetPluginState(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int JsonUniverseInfo(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int JsonAvailablePorts(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int CreateNewUniverse(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int ModifyUniverse(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int GetDmx(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int HandleSetDmx(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int DisplayQuit(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int ReloadPlugins(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int ReloadPidStore(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); void HandlePluginList(ola::http::HTTPResponse *response, const client::Result &result, const std::vector &plugins); void HandleUniverseList(ola::http::HTTPResponse *response, ola::web::JsonObject *json, const client::Result &result, const std::vector &universes); void HandlePartialPluginInfo(ola::http::HTTPResponse *response, int plugin_id, const client::Result &result, const std::string &description); void HandlePluginInfo(ola::http::HTTPResponse *response, std::string description, const client::Result &result, const ola::client::PluginState &state); void HandleUniverseInfo(ola::http::HTTPResponse *response, const client::Result &result, const client::OlaUniverse &universe); void HandlePortsForUniverse(ola::http::HTTPResponse *response, ola::web::JsonObject *json, unsigned int universe_id, const client::Result &result, const std::vector &devices); void HandleCandidatePorts(ola::http::HTTPResponse *response, const client::Result &result, const std::vector &devices); void CreateUniverseComplete(ola::http::HTTPResponse *response, unsigned int universe_id, bool included_name, class ActionQueue *action_queue); void SendCreateUniverseResponse(ola::http::HTTPResponse *response, unsigned int universe_id, bool included_name, class ActionQueue *action_queue); void ModifyUniverseComplete(ola::http::HTTPResponse *response, class ActionQueue *action_queue); void SendModifyUniverseResponse(ola::http::HTTPResponse *response, class ActionQueue *action_queue); /** * Serve a help redirect * @param response the response to use */ inline static int ServeHelpRedirect(ola::http::HTTPResponse *response) { return ola::http::HTTPServer::ServeRedirect(response, HELP_REDIRECTION); } static int ServeUsage(ola::http::HTTPResponse *response, const std::string &details); static const char HELP_PARAMETER[]; private: class ola::io::ConnectedDescriptor *m_client_socket; ola::client::OlaClient m_client; class OlaServer *m_ola_server; bool m_enable_quit; ola::network::Interface m_interface; RDMHTTPModule m_rdm_module; time_t m_start_time_t; void HandleGetDmx(ola::http::HTTPResponse *response, const client::Result &result, const client::DMXMetadata &metadata, const DmxBuffer &buffer); void HandleBoolResponse(ola::http::HTTPResponse *response, const client::Result &result); void PortToJson(ola::web::JsonObject *object, const client::OlaDevice &device, const client::OlaPort &port, bool is_output); void AddPatchActions(ActionQueue *action_queue, const std::string port_id_string, unsigned int universe, client::PatchAction port_action); void AddPriorityActions(ActionQueue *action_queue, const ola::http::HTTPRequest *request); typedef struct { unsigned int device_alias; unsigned int port; client::PortDirection direction; std::string string_id; } port_identifier; void DecodePortIds(const std::string &port_ids, std::vector *ports); void RegisterHandler( const std::string &path, int (OladHTTPServer::*method)(const ola::http::HTTPRequest*, ola::http::HTTPResponse*)); static const char HELP_REDIRECTION[]; static const char K_BACKEND_DISCONNECTED_ERROR[]; static const unsigned int K_UNIVERSE_NAME_LIMIT = 100; static const char K_PRIORITY_VALUE_SUFFIX[]; static const char K_PRIORITY_MODE_SUFFIX[]; DISALLOW_COPY_AND_ASSIGN(OladHTTPServer); }; } // namespace ola #endif // OLAD_OLADHTTPSERVER_H_ ola-0.10.9/olad/DynamicPluginLoader.cpp0000664000175000017500000001371614376533110014627 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DynamicPluginLoader.cpp * This class is responsible for loading and unloading the plugins * Copyright (C) 2005 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include "ola/stl/STLUtils.h" #include "olad/DynamicPluginLoader.h" #include "olad/Plugin.h" #ifdef USE_ARTNET #include "plugins/artnet/ArtNetPlugin.h" #endif // USE_ARTNET #ifdef USE_DUMMY #include "plugins/dummy/DummyPlugin.h" #endif // USE_DUMMY #ifdef USE_E131 #include "plugins/e131/E131Plugin.h" #endif // USE_E131 #ifdef USE_ESPNET #include "plugins/espnet/EspNetPlugin.h" #endif // USE_ESPNET #ifdef USE_GPIO #include "plugins/gpio/GPIOPlugin.h" #endif // USE_GPIO #ifdef USE_KARATE #include "plugins/karate/KaratePlugin.h" #endif // USE_KARATE #ifdef USE_KINET #include "plugins/kinet/KiNetPlugin.h" #endif // USE_KINET #ifdef USE_MILINST #include "plugins/milinst/MilInstPlugin.h" #endif // USE_MILINST #ifdef USE_OPENDMX #include "plugins/opendmx/OpenDmxPlugin.h" #endif // USE_OPENDMX #ifdef USE_OPENPIXELCONTROL #include "plugins/openpixelcontrol/OPCPlugin.h" #endif // USE_OPENPIXELCONTROL #ifdef USE_OSC #include "plugins/osc/OSCPlugin.h" #endif // USE_OSC #ifdef USE_PATHPORT #include "plugins/pathport/PathportPlugin.h" #endif // USE_PATHPORT #ifdef USE_RENARD #include "plugins/renard/RenardPlugin.h" #endif // USE_RENARD #ifdef USE_SANDNET #include "plugins/sandnet/SandNetPlugin.h" #endif // USE_SANDNET #ifdef USE_SHOWNET #include "plugins/shownet/ShowNetPlugin.h" #endif // USE_SHOWNET #ifdef USE_SPI #include "plugins/spi/SPIPlugin.h" #endif // USE_SPI #ifdef USE_STAGEPROFI #include "plugins/stageprofi/StageProfiPlugin.h" #endif // USE_STAGEPROFI #ifdef USE_USBPRO #include "plugins/usbpro/UsbSerialPlugin.h" #endif // USE_USBPRO #ifdef USE_LIBUSB #include "plugins/usbdmx/UsbDmxPlugin.h" #endif // USE_LIBUSB #ifdef USE_FTDI #include "plugins/ftdidmx/FtdiDmxPlugin.h" #endif // USE_FTDI #ifdef USE_UART #include "plugins/uartdmx/UartDmxPlugin.h" #endif // USE_UART #ifdef USE_DMX4LINUX #include "plugins/dmx4linux/Dmx4LinuxPlugin.h" #endif // USE_DMX4LINUX namespace ola { using std::vector; DynamicPluginLoader::~DynamicPluginLoader() { UnloadPlugins(); } vector DynamicPluginLoader::LoadPlugins() { if (m_plugins.empty()) { PopulatePlugins(); } return m_plugins; } /* * Setup the plugin list */ void DynamicPluginLoader::PopulatePlugins() { #ifdef USE_DMX4LINUX m_plugins.push_back( new ola::plugin::dmx4linux::Dmx4LinuxPlugin(m_plugin_adaptor)); #endif // USE_DMX4LINUX #ifdef USE_ARTNET m_plugins.push_back(new ola::plugin::artnet::ArtNetPlugin(m_plugin_adaptor)); #endif // USE_ARTNET #ifdef USE_DUMMY m_plugins.push_back(new ola::plugin::dummy::DummyPlugin(m_plugin_adaptor)); #endif // USE_DUMMY #ifdef USE_E131 m_plugins.push_back(new ola::plugin::e131::E131Plugin(m_plugin_adaptor)); #endif // USE_E131 #ifdef USE_ESPNET m_plugins.push_back(new ola::plugin::espnet::EspNetPlugin(m_plugin_adaptor)); #endif // USE_ESPNET #ifdef USE_GPIO m_plugins.push_back(new ola::plugin::gpio::GPIOPlugin(m_plugin_adaptor)); #endif // USE_GPIO #ifdef USE_KARATE m_plugins.push_back( new ola::plugin::karate::KaratePlugin(m_plugin_adaptor)); #endif // USE_KARATE #ifdef USE_KINET m_plugins.push_back(new ola::plugin::kinet::KiNetPlugin(m_plugin_adaptor)); #endif // USE_KINET #ifdef USE_MILINST m_plugins.push_back( new ola::plugin::milinst::MilInstPlugin(m_plugin_adaptor)); #endif // USE_MILINST #ifdef USE_OPENDMX m_plugins.push_back( new ola::plugin::opendmx::OpenDmxPlugin(m_plugin_adaptor)); #endif // USE_OPENDMX #ifdef USE_OPENPIXELCONTROL m_plugins.push_back( new ola::plugin::openpixelcontrol::OPCPlugin(m_plugin_adaptor)); #endif // USE_OPENPIXELCONTROL #ifdef USE_OSC m_plugins.push_back( new ola::plugin::osc::OSCPlugin(m_plugin_adaptor)); #endif // USE_OSC #ifdef USE_RENARD m_plugins.push_back( new ola::plugin::renard::RenardPlugin(m_plugin_adaptor)); #endif // USE_RENARD #ifdef USE_SANDNET m_plugins.push_back( new ola::plugin::sandnet::SandNetPlugin(m_plugin_adaptor)); #endif // USE_SANDNET #ifdef USE_SHOWNET m_plugins.push_back( new ola::plugin::shownet::ShowNetPlugin(m_plugin_adaptor)); #endif // USE_SHOWNET #ifdef USE_SPI m_plugins.push_back( new ola::plugin::spi::SPIPlugin(m_plugin_adaptor)); #endif // USE_SPI #ifdef USE_STAGEPROFI m_plugins.push_back( new ola::plugin::stageprofi::StageProfiPlugin(m_plugin_adaptor)); #endif // USE_STAGEPROFI #ifdef USE_USBPRO m_plugins.push_back( new ola::plugin::usbpro::UsbSerialPlugin(m_plugin_adaptor)); #endif // USE_USBPRO #ifdef USE_LIBUSB m_plugins.push_back(new ola::plugin::usbdmx::UsbDmxPlugin(m_plugin_adaptor)); #endif // USE_LIBUSB #ifdef USE_PATHPORT m_plugins.push_back( new ola::plugin::pathport::PathportPlugin(m_plugin_adaptor)); #endif // USE_PATHPORT #ifdef USE_FTDI m_plugins.push_back( new ola::plugin::ftdidmx::FtdiDmxPlugin(m_plugin_adaptor)); #endif // USE_FTDI #ifdef USE_UART m_plugins.push_back( new ola::plugin::uartdmx::UartDmxPlugin(m_plugin_adaptor)); #endif // USE_UART } void DynamicPluginLoader::UnloadPlugins() { STLDeleteElements(&m_plugins); } } // namespace ola ola-0.10.9/olad/PluginManager.h0000664000175000017500000001154414376533110013130 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PluginManager.h * Interface to the PluginManager class * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_PLUGINMANAGER_H_ #define OLAD_PLUGINMANAGER_H_ #include #include #include "ola/base/Macro.h" #include "ola/plugin_id.h" namespace ola { class PluginLoader; class PluginAdaptor; class AbstractPlugin; /** * @brief The manager of plugins. * * The plugin manager is responsible for loading the plugins (via * PluginLoaders) and retains ownership of the Plugin objects. * * Each plugin has a numeric ID associated with it. The plugin IDs can be found * in common/protocol/Ola.proto * * Plugins can be disabled through the preferences file. Some plugins may * conflict with others, in this case the first plugin will be started and the * rest of the conflicting plugins are ignored. * * Plugins are active if they weren't disabled, there were no conflicts that * prevented them from loading, and the call to Start() was successful. */ class PluginManager { public: /** * @brief Create a new PluginManager. * @param plugin_loaders the list of PluginLoader to use. * @param plugin_adaptor the PluginAdaptor to pass to each plugin. */ PluginManager(const std::vector &plugin_loaders, PluginAdaptor *plugin_adaptor); /** * @brief Destructor. */ ~PluginManager(); /** * @brief Attempt to load all the plugins and start them. * * Some plugins may not be started due to conflicts or being disabled. */ void LoadAll(); /** * Unload all the plugins. */ void UnloadAll(); /** * @brief Return the list of loaded plugins. * @param[out] plugins the list of plugins. * * This list includes disabled and conflicting plugins. */ void Plugins(std::vector *plugins) const; /** * @brief Return a list of active plugins. * @param[out] plugins the list of active plugins. */ void ActivePlugins(std::vector *plugins) const; /** * @brief Return a list of enabled plugins. * @param[out] plugins the list of enabled plugins. */ void EnabledPlugins(std::vector *plugins) const; /** * @brief Lookup a plugin by ID. * @param plugin_id the id of the plugin to find. * @return the plugin matching the id or NULL if not found. */ AbstractPlugin* GetPlugin(ola_plugin_id plugin_id) const; /** * @brief Check if a plugin is active. * @param plugin_id the id of the plugin to check. * @returns true if the plugin is active, false otherwise. */ bool IsActive(ola_plugin_id plugin_id) const; /** * @brief Check if a plugin is enabled. * @param plugin_id the id of the plugin to check. * @returns true if the plugin is enabled, false otherwise. */ bool IsEnabled(ola_plugin_id plugin_id) const; /** * @brief Enable & start a plugin * @param plugin_id the id of the plugin to start. * @returns true if the plugin was started or was already running, false if * it couldn't be started. * * This call will enable a plugin, but may not start it due to conflicts with * existing plugins. */ bool EnableAndStartPlugin(ola_plugin_id plugin_id); /** * @brief Disable & stop a plugin. * @param plugin_id the id of the plugin to stop. */ void DisableAndStopPlugin(ola_plugin_id plugin_id); /** * @brief Return a list of plugins that conflict with this particular plugin. * @param plugin_id the id of the plugin to check. * @param[out] plugins the list of plugins that conflict with this one. */ void GetConflictList(ola_plugin_id plugin_id, std::vector *plugins); private: typedef std::map PluginMap; std::vector m_plugin_loaders; PluginMap m_loaded_plugins; // plugins that are loaded PluginMap m_active_plugins; // active plugins PluginMap m_enabled_plugins; // enabled plugins PluginAdaptor *m_plugin_adaptor; bool StartIfSafe(AbstractPlugin *plugin); AbstractPlugin* CheckForRunningConflicts(const AbstractPlugin *plugin) const; DISALLOW_COPY_AND_ASSIGN(PluginManager); }; } // namespace ola #endif // OLAD_PLUGINMANAGER_H_ ola-0.10.9/olad/OladHTTPServer.cpp0000664000175000017500000011635014376533110013501 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * OladHTTPServer.cpp * Ola HTTP class * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include "ola/ActionQueue.h" #include "ola/Callback.h" #include "ola/DmxBuffer.h" #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/base/Version.h" #include "ola/dmx/SourcePriorities.h" #include "ola/network/NetworkUtils.h" #include "ola/web/Json.h" #include "olad/DmxSource.h" #include "olad/HttpServerActions.h" #include "olad/OladHTTPServer.h" #include "olad/OlaServer.h" #include "olad/Preferences.h" namespace ola { using ola::client::OlaDevice; using ola::client::OlaInputPort; using ola::client::OlaOutputPort; using ola::client::OlaPlugin; using ola::client::OlaPort; using ola::client::OlaUniverse; using ola::http::HTTPRequest; using ola::http::HTTPResponse; using ola::http::HTTPServer; using ola::io::ConnectedDescriptor; using ola::web::JsonArray; using ola::web::JsonObject; using std::cout; using std::endl; using std::ostringstream; using std::string; using std::vector; const char OladHTTPServer::HELP_PARAMETER[] = "help"; const char OladHTTPServer::HELP_REDIRECTION[] = "?help=1"; const char OladHTTPServer::K_BACKEND_DISCONNECTED_ERROR[] = "Failed to send request, client isn't connected"; const char OladHTTPServer::K_PRIORITY_VALUE_SUFFIX[] = "_priority_value"; const char OladHTTPServer::K_PRIORITY_MODE_SUFFIX[] = "_priority_mode"; /** * @brief Create a new OLA HTTP server * @param export_map the ExportMap to display when /debug is called * @param options the OladHTTPServerOptions for the OLA HTTP server * @param client_socket A ConnectedDescriptor which is used to communicate with * the server. * @param ola_server the OlaServer to use * @param iface the network interface to bind to */ OladHTTPServer::OladHTTPServer(ExportMap *export_map, const OladHTTPServerOptions &options, ConnectedDescriptor *client_socket, OlaServer *ola_server, const ola::network::Interface &iface) : OlaHTTPServer(options, export_map), m_client_socket(client_socket), m_client(client_socket), m_ola_server(ola_server), m_enable_quit(options.enable_quit), m_interface(iface), m_rdm_module(&m_server, &m_client) { // The main handlers RegisterHandler("/quit", &OladHTTPServer::DisplayQuit); RegisterHandler("/reload", &OladHTTPServer::ReloadPlugins); RegisterHandler("/reload_pids", &OladHTTPServer::ReloadPidStore); RegisterHandler("/new_universe", &OladHTTPServer::CreateNewUniverse); RegisterHandler("/modify_universe", &OladHTTPServer::ModifyUniverse); RegisterHandler("/set_plugin_state", &OladHTTPServer::SetPluginState); RegisterHandler("/set_dmx", &OladHTTPServer::HandleSetDmx); RegisterHandler("/get_dmx", &OladHTTPServer::GetDmx); // json endpoints for the new UI RegisterHandler("/json/server_stats", &OladHTTPServer::JsonServerStats); RegisterHandler("/json/universe_plugin_list", &OladHTTPServer::JsonUniversePluginList); RegisterHandler("/json/plugin_info", &OladHTTPServer::JsonPluginInfo); RegisterHandler("/json/get_ports", &OladHTTPServer::JsonAvailablePorts); RegisterHandler("/json/universe_info", &OladHTTPServer::JsonUniverseInfo); // these are the static files for the old UI m_server.RegisterFile("/blank.gif", HTTPServer::CONTENT_TYPE_GIF); m_server.RegisterFile("/button-bg.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile("/custombutton.css", HTTPServer::CONTENT_TYPE_CSS); m_server.RegisterFile("/editortoolbar.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile("/expander.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile("/handle.vertical.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile("/loader.gif", HTTPServer::CONTENT_TYPE_GIF); m_server.RegisterFile("/loader-mini.gif", HTTPServer::CONTENT_TYPE_GIF); m_server.RegisterFile("/logo.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile("/logo-mini.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile("/mobile.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile("/mobile.js", HTTPServer::CONTENT_TYPE_JS); m_server.RegisterFile("/ola.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile("/ola.js", HTTPServer::CONTENT_TYPE_JS); m_server.RegisterFile("/tick.gif", HTTPServer::CONTENT_TYPE_GIF); m_server.RegisterFile("/toolbar-bg.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile("/toolbar.css", HTTPServer::CONTENT_TYPE_CSS); m_server.RegisterFile("/toolbar_sprites.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile("/vertical.gif", HTTPServer::CONTENT_TYPE_GIF); m_server.RegisterFile("/warning.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile("/", "landing.html", HTTPServer::CONTENT_TYPE_HTML); // these are the static files for the new UI m_server.RegisterFile( "/new/", "/new/index.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/overview.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/plugins.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/plugin-info.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/universe-overview.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/universe-add.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/universe-header.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/universe-keypad.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/universe-patch.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/universe-settings.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/universe-faders.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/universes.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/views/universe-rdm.html", HTTPServer::CONTENT_TYPE_HTML); m_server.RegisterFile( "/new/js/app.min.js", HTTPServer::CONTENT_TYPE_JS); m_server.RegisterFile( "/new/js/app.min.js.map", HTTPServer::CONTENT_TYPE_OCT); m_server.RegisterFile( "/new/libs/jquery/js/jquery.min.js", HTTPServer::CONTENT_TYPE_JS); m_server.RegisterFile( "/new/libs/angular-route/js/angular-route.min.js", HTTPServer::CONTENT_TYPE_JS); m_server.RegisterFile( "/new/libs/angular/js/angular.min.js", HTTPServer::CONTENT_TYPE_JS); m_server.RegisterFile( "/new/libs/bootstrap/js/bootstrap.min.js", HTTPServer::CONTENT_TYPE_JS); m_server.RegisterFile( "/new/libs/bootstrap/fonts/glyphicons-halflings-regular.woff", HTTPServer::CONTENT_TYPE_OCT); m_server.RegisterFile( "/new/libs/bootstrap/fonts/glyphicons-halflings-regular.svg", HTTPServer::CONTENT_TYPE_OCT); m_server.RegisterFile( "/new/libs/bootstrap/fonts/glyphicons-halflings-regular.ttf", HTTPServer::CONTENT_TYPE_OCT); m_server.RegisterFile( "/new/libs/bootstrap/fonts/glyphicons-halflings-regular.eot", HTTPServer::CONTENT_TYPE_OCT); m_server.RegisterFile( "/new/libs/bootstrap/fonts/glyphicons-halflings-regular.woff2", HTTPServer::CONTENT_TYPE_OCT); m_server.RegisterFile( "/new/css/style.min.css", HTTPServer::CONTENT_TYPE_CSS); m_server.RegisterFile( "/new/libs/bootstrap/css/bootstrap.min.css", HTTPServer::CONTENT_TYPE_CSS); m_server.RegisterFile( "/new/img/logo.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile( "/new/img/light_bulb.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile( "/new/img/light_bulb_off.png", HTTPServer::CONTENT_TYPE_PNG); m_server.RegisterFile( "/new/img/logo-mini.png", HTTPServer::CONTENT_TYPE_PNG); m_start_time_t = time(NULL); } /* * @brief Teardown */ OladHTTPServer::~OladHTTPServer() { if (m_client_socket) { m_server.SelectServer()->RemoveReadDescriptor(m_client_socket); } m_client.Stop(); if (m_client_socket) { delete m_client_socket; } } /** * @brief Setup the OLA HTTP server * @return true if this worked, false otherwise. */ bool OladHTTPServer::Init() { if (!OlaHTTPServer::Init()) { return false; } if (!m_client.Setup()) { return false; } /* Setup disconnect notifications. m_socket->SetOnClose( ola::NewSingleCallback(this, &SimpleClient::SocketClosed)); */ m_server.SelectServer()->AddReadDescriptor(m_client_socket); return true; } /** * @brief Can be called while the HTTP server is running */ void OladHTTPServer::SetPidStore(const ola::rdm::RootPidStore *pid_store) { m_rdm_module.SetPidStore(pid_store); } /** * @brief Print the server stats JSON * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::JsonServerStats(const HTTPRequest*, HTTPResponse *response) { char start_time_str[50]; #ifdef _WIN32 strftime(start_time_str, sizeof(start_time_str), "%c", localtime(&m_start_time_t)); #else struct tm start_time; localtime_r(&m_start_time_t, &start_time); strftime(start_time_str, sizeof(start_time_str), "%c", &start_time); #endif // _WIN32 JsonObject json; json.Add("hostname", ola::network::FQDN()); json.Add("instance_name", m_ola_server->InstanceName()); json.Add("config_dir", m_ola_server->GetPreferencesFactory()->ConfigLocation()); json.Add("ip", m_interface.ip_address.ToString()); json.Add("broadcast", m_interface.bcast_address.ToString()); json.Add("subnet", m_interface.subnet_mask.ToString()); json.Add("hw_address", m_interface.hw_address.ToString()); json.Add("version", ola::base::Version::GetVersion()); json.Add("up_since", start_time_str); json.Add("quit_enabled", m_enable_quit); response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); int r = response->SendJson(json); delete response; return r; } /** * @brief Print the list of universes / plugins as a json string * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::JsonUniversePluginList(const HTTPRequest*, HTTPResponse *response) { m_client.FetchPluginList( NewSingleCallback(this, &OladHTTPServer::HandlePluginList, response)); return MHD_YES; } /** * @brief Print the plugin info as a JSON string * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::JsonPluginInfo(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(HELP_PARAMETER)) { return ServeUsage(response, "?id=[plugin]"); } string val = request->GetParameter("id"); int plugin_id; if (!StringToInt(val, &plugin_id)) { return ServeHelpRedirect(response); } m_client.FetchPluginDescription( (ola_plugin_id) plugin_id, NewSingleCallback(this, &OladHTTPServer::HandlePartialPluginInfo, response, plugin_id)); return MHD_YES; } /** * @brief Return information about a universe * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::JsonUniverseInfo(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(HELP_PARAMETER)) { return ServeUsage(response, "?id=[universe]"); } string uni_id = request->GetParameter("id"); unsigned int universe_id; if (!StringToInt(uni_id, &universe_id)) { return ServeHelpRedirect(response); } m_client.FetchUniverseInfo( universe_id, NewSingleCallback(this, &OladHTTPServer::HandleUniverseInfo, response)); return MHD_YES; } /** * @brief Return a list of unbound ports * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::JsonAvailablePorts(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(HELP_PARAMETER)) { return ServeUsage(response, "? or ?id=[universe]"); } string uni_id = request->GetParameter("id"); if (uni_id.empty()) { // get all available ports m_client.FetchCandidatePorts( NewSingleCallback(this, &OladHTTPServer::HandleCandidatePorts, response)); } else { unsigned int universe_id; if (!StringToInt(uni_id, &universe_id)) { return ServeHelpRedirect(response); } m_client.FetchCandidatePorts( universe_id, NewSingleCallback(this, &OladHTTPServer::HandleCandidatePorts, response)); } return MHD_YES; } /** * @brief Create a new universe by binding one or more ports. * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::CreateNewUniverse(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(HELP_PARAMETER)) { return ServeUsage(response, "POST id=[universe], name=[name], add_ports=[a comma " "separated list of port ids]"); } string uni_id = request->GetPostParameter("id"); string name = request->GetPostParameter("name"); if (name.size() > K_UNIVERSE_NAME_LIMIT) { name = name.substr(K_UNIVERSE_NAME_LIMIT); } unsigned int universe_id; if (!StringToInt(uni_id, &universe_id)) { return ServeHelpRedirect(response); } ActionQueue *action_queue = new ActionQueue( NewSingleCallback(this, &OladHTTPServer::CreateUniverseComplete, response, universe_id, !name.empty())); // add patch actions here string add_port_ids = request->GetPostParameter("add_ports"); AddPatchActions(action_queue, add_port_ids, universe_id, ola::client::PATCH); if (!name.empty()) { action_queue->AddAction( new SetNameAction(&m_client, universe_id, name, false)); } action_queue->NextAction(); return MHD_YES; } /** * @brief Modify an existing universe. * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::ModifyUniverse(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(HELP_PARAMETER)) { return ServeUsage(response, "POST id=[universe], name=[name], merge_mode=[HTP|LTP], " "add_ports=[a comma separated list of port ids], " "remove_ports=[a comma separated list of port ids]"); } string uni_id = request->GetPostParameter("id"); string name = request->GetPostParameter("name"); string merge_mode = request->GetPostParameter("merge_mode"); unsigned int universe_id; if (!StringToInt(uni_id, &universe_id)) { return ServeHelpRedirect(response); } if (name.empty()) { return m_server.ServeError(response, "No name supplied"); } if (name.size() > K_UNIVERSE_NAME_LIMIT) { name = name.substr(K_UNIVERSE_NAME_LIMIT); } ActionQueue *action_queue = new ActionQueue( NewSingleCallback(this, &OladHTTPServer::ModifyUniverseComplete, response)); action_queue->AddAction( new SetNameAction(&m_client, universe_id, name, true)); if (merge_mode == "LTP" || merge_mode == "HTP") { OlaUniverse::merge_mode mode = ( merge_mode == "LTP" ? OlaUniverse::MERGE_LTP : OlaUniverse::MERGE_HTP); action_queue->AddAction( new SetMergeModeAction(&m_client, universe_id, mode)); } string remove_port_ids = request->GetPostParameter("remove_ports"); AddPatchActions(action_queue, remove_port_ids, universe_id, client::UNPATCH); string add_port_ids = request->GetPostParameter("add_ports"); AddPatchActions(action_queue, add_port_ids, universe_id, client::PATCH); AddPriorityActions(action_queue, request); action_queue->NextAction(); return MHD_YES; } /** * @brief Set plugin state. * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::SetPluginState(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(HELP_PARAMETER)) { return ServeUsage(response, "POST state=[enable|disable], " "plugin_id=[a plugin id]"); } string state_string = request->GetPostParameter("state"); bool state; if (!StringToBoolTolerant(state_string, &state)) { OLA_INFO << "Invalid state " << state_string; return ServeHelpRedirect(response); } string plugin_id_string = request->GetPostParameter("plugin_id"); unsigned int plugin_id; if (!StringToInt(plugin_id_string, &plugin_id)) { OLA_INFO << "Invalid plugin id " << plugin_id_string; return ServeHelpRedirect(response); } m_client.SetPluginState( (ola_plugin_id) plugin_id, state, NewSingleCallback(this, &OladHTTPServer::HandleBoolResponse, response)); return MHD_YES; } /** * @brief Handle the get DMX command * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::GetDmx(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(HELP_PARAMETER)) { return ServeUsage(response, "?u=[universe]"); } string uni_id = request->GetParameter("u"); unsigned int universe_id; if (!StringToInt(uni_id, &universe_id)) { return ServeHelpRedirect(response); } m_client.FetchDMX( universe_id, NewSingleCallback(this, &OladHTTPServer::HandleGetDmx, response)); return MHD_YES; } /** * @brief Handle the set DMX command * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::HandleSetDmx(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(HELP_PARAMETER)) { return ServeUsage(response, "POST u=[universe], d=[DMX data (a comma separated list of values)]"); } string dmx_data_str = request->GetPostParameter("d"); string uni_id = request->GetPostParameter("u"); unsigned int universe_id; if (!StringToInt(uni_id, &universe_id)) { return ServeHelpRedirect(response); } DmxBuffer buffer; buffer.SetFromString(dmx_data_str); if (!buffer.Size()) { return m_server.ServeError(response, "Invalid DMX string"); } ola::client::SendDMXArgs args( NewSingleCallback(this, &OladHTTPServer::HandleBoolResponse, response)); m_client.SendDMX(universe_id, buffer, args); return MHD_YES; } /** * @brief Cause the server to shutdown * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::DisplayQuit(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response) { if (m_enable_quit) { response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->Append("ok"); m_ola_server->StopServer(); } else { response->SetStatus(403); response->SetContentType(HTTPServer::CONTENT_TYPE_HTML); response->Append("403 Unauthorized"); } response->SetNoCache(); int r = response->Send(); delete response; return r; } /** * @brief Reload all plugins * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::ReloadPlugins(const HTTPRequest*, HTTPResponse *response) { m_client.ReloadPlugins( NewSingleCallback(this, &OladHTTPServer::HandleBoolResponse, response)); return MHD_YES; } /** * @brief Reload the PID Store. * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int OladHTTPServer::ReloadPidStore(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response) { m_ola_server->ReloadPidStore(); response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->Append("ok"); int r = response->Send(); delete response; return r; } /** * @brief Handle the plugin list callback * @param response the HTTPResponse that is associated with the request. * @param result the result of the API call * @param plugins a list of plugins */ void OladHTTPServer::HandlePluginList(HTTPResponse *response, const client::Result &result, const vector &plugins) { if (!result.Success()) { m_server.ServeError(response, result.Error()); return; } JsonObject *json = new JsonObject(); // fire off the universe request now. the main server is running in a // separate thread. m_client.FetchUniverseList( NewSingleCallback(this, &OladHTTPServer::HandleUniverseList, response, json)); JsonArray *plugins_json = json->AddArray("plugins"); vector::const_iterator iter; for (iter = plugins.begin(); iter != plugins.end(); ++iter) { JsonObject *plugin = plugins_json->AppendObject(); plugin->Add("name", iter->Name()); plugin->Add("id", iter->Id()); plugin->Add("active", iter->IsActive()); plugin->Add("enabled", iter->IsEnabled()); } } /** * @brief Handle the universe list callback * @param response the HTTPResponse that is associated with the request. * @param json the JsonObject to add the data to * @param result the result of the API call * @param universes the vector of OlaUniverse */ void OladHTTPServer::HandleUniverseList(HTTPResponse *response, JsonObject *json, const client::Result &result, const vector &universes) { if (result.Success()) { JsonArray *universe_json = json->AddArray("universes"); vector::const_iterator iter; for (iter = universes.begin(); iter != universes.end(); ++iter) { JsonObject *universe = universe_json->AppendObject(); universe->Add("id", iter->Id()); universe->Add("input_ports", iter->InputPortCount()); universe->Add("name", iter->Name()); universe->Add("output_ports", iter->OutputPortCount()); universe->Add("rdm_devices", iter->RDMDeviceCount()); } } response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(*json); delete response; delete json; } /** * @brief Handle the plugin description response. * @param response the HTTPResponse that is associated with the request. * @param plugin_id the plugin id. * @param result the result of the API call. * @param description the plugin description. */ void OladHTTPServer::HandlePartialPluginInfo(HTTPResponse *response, int plugin_id, const client::Result &result, const string &description) { if (!result.Success()) { m_server.ServeError(response, result.Error()); return; } m_client.FetchPluginState( (ola_plugin_id) plugin_id, NewSingleCallback(this, &OladHTTPServer::HandlePluginInfo, response, description)); } /** * @brief Handle the plugin description response. * @param response the HTTPResponse that is associated with the request. * @param description the plugin description * @param result the result of the API call. * @param state the state of the plugin. */ void OladHTTPServer::HandlePluginInfo(HTTPResponse *response, string description, const client::Result &result, const ola::client::PluginState &state) { if (!result.Success()) { m_server.ServeError(response, result.Error()); return; } string escaped_description = description; // Replace \n before passing in so we get \\n out the far end ReplaceAll(&escaped_description, "\n", "\\n"); JsonObject json; json.Add("description", escaped_description); json.Add("name", state.name); json.Add("enabled", state.enabled); json.Add("active", state.active); json.Add("preferences_source", state.preferences_source); JsonArray *plugins = json.AddArray("conflicts_with"); vector::const_iterator iter = state.conflicting_plugins.begin(); for (; iter != state.conflicting_plugins.end(); ++iter) { JsonObject *plugin = plugins->AppendObject(); plugin->Add("active", iter->IsActive()); plugin->Add("id", iter->Id()); plugin->Add("name", iter->Name()); } response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(json); delete response; } /** * @brief Handle the universe info * @param response the HTTPResponse that is associated with the request. * @param result the result of the API call * @param universe the OlaUniverse object */ void OladHTTPServer::HandleUniverseInfo(HTTPResponse *response, const client::Result &result, const OlaUniverse &universe) { if (!result.Success()) { m_server.ServeError(response, result.Error()); return; } JsonObject *json = new JsonObject(); // fire off the device/port request now. the main server is running in a // separate thread. m_client.FetchDeviceInfo( ola::OLA_PLUGIN_ALL, NewSingleCallback(this, &OladHTTPServer::HandlePortsForUniverse, response, json, universe.Id())); json->Add("id", universe.Id()); json->Add("name", universe.Name()); json->Add("merge_mode", (universe.MergeMode() == OlaUniverse::MERGE_HTP ? "HTP" : "LTP")); } void OladHTTPServer::HandlePortsForUniverse( HTTPResponse *response, JsonObject *json, unsigned int universe_id, const client::Result &result, const vector &devices) { if (result.Success()) { vector::const_iterator iter = devices.begin(); vector::const_iterator input_iter; vector::const_iterator output_iter; JsonArray *output_ports_json = json->AddArray("output_ports"); JsonArray *input_ports_json = json->AddArray("input_ports"); for (; iter != devices.end(); ++iter) { const vector &input_ports = iter->InputPorts(); for (input_iter = input_ports.begin(); input_iter != input_ports.end(); ++input_iter) { if (input_iter->IsActive() && input_iter->Universe() == universe_id) { JsonObject *obj = input_ports_json->AppendObject(); PortToJson(obj, *iter, *input_iter, false); } } const vector &output_ports = iter->OutputPorts(); for (output_iter = output_ports.begin(); output_iter != output_ports.end(); ++output_iter) { if (output_iter->IsActive() && output_iter->Universe() == universe_id) { JsonObject *obj = output_ports_json->AppendObject(); PortToJson(obj, *iter, *output_iter, true); } } } } response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(*json); delete json; delete response; } /** * @brief Handle the list of candidate ports * @param response the HTTPResponse that is associated with the request. * @param result the result of the API call * @param devices the possible devices & ports */ void OladHTTPServer::HandleCandidatePorts( HTTPResponse *response, const client::Result &result, const vector &devices) { if (!result.Success()) { m_server.ServeError(response, result.Error()); return; } vector::const_iterator iter = devices.begin(); vector::const_iterator input_iter; vector::const_iterator output_iter; JsonArray json; for (; iter != devices.end(); ++iter) { const vector &input_ports = iter->InputPorts(); for (input_iter = input_ports.begin(); input_iter != input_ports.end(); ++input_iter) { JsonObject *obj = json.AppendObject(); PortToJson(obj, *iter, *input_iter, false); } const vector &output_ports = iter->OutputPorts(); for (output_iter = output_ports.begin(); output_iter != output_ports.end(); ++output_iter) { JsonObject *obj = json.AppendObject(); PortToJson(obj, *iter, *output_iter, true); } } response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(json); delete response; } /* * @brief Schedule a callback to send the new universe response to the client */ void OladHTTPServer::CreateUniverseComplete(HTTPResponse *response, unsigned int universe_id, bool included_name, class ActionQueue *action_queue) { // this is a trick to unwind the stack and return control to a method outside // the Action m_server.SelectServer()->RegisterSingleTimeout( 0, NewSingleCallback(this, &OladHTTPServer::SendCreateUniverseResponse, response, universe_id, included_name, action_queue)); } /* * @brief Send the response to a new universe request */ void OladHTTPServer::SendCreateUniverseResponse( HTTPResponse *response, unsigned int universe_id, bool included_name, class ActionQueue *action_queue) { unsigned int action_count = action_queue->ActionCount(); if (included_name) { action_count--; } bool failed = true; // it only takes one port patch to pass for (unsigned int i = 0; i < action_count; i++) { failed &= action_queue->GetAction(i)->Failed(); } JsonObject json; json.Add("ok", !failed); json.Add("universe", universe_id); json.Add("message", (failed ? "Failed to patch any ports" : "")); response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(json); delete action_queue; delete response; } /* * @brief Schedule a callback to send the modify universe response to the client */ void OladHTTPServer::ModifyUniverseComplete(HTTPResponse *response, ActionQueue *action_queue) { // this is a trick to unwind the stack and return control to a method outside // the Action m_server.SelectServer()->RegisterSingleTimeout( 0, NewSingleCallback(this, &OladHTTPServer::SendModifyUniverseResponse, response, action_queue)); } /* * @brief Send the response to a modify universe request. */ void OladHTTPServer::SendModifyUniverseResponse(HTTPResponse *response, ActionQueue *action_queue) { if (!action_queue->WasSuccessful()) { delete action_queue; m_server.ServeError(response, "Update failed"); } else { response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->Append("ok"); response->Send(); delete action_queue; delete response; } } /** * @brief Serve usage information. * @param response the response to use. * @param details the usage information */ int OladHTTPServer::ServeUsage(HTTPResponse *response, const string &details) { response->SetContentType(HTTPServer::CONTENT_TYPE_HTML); response->Append("Usage:"); if (!details.empty()) { response->Append("

"); response->Append(details); response->Append("

"); } int r = response->Send(); delete response; return r; } /** * @brief Callback for m_client.FetchDmx called by GetDmx * @param response the HTTPResponse * @param result the result of the API call * @param buffer the DmxBuffer */ void OladHTTPServer::HandleGetDmx(HTTPResponse *response, const client::Result &result, const client::DMXMetadata &, const DmxBuffer &buffer) { // rather than adding 512 JsonValue we cheat and use raw here ostringstream str; str << "[" << buffer.ToString() << "]"; JsonObject json; json.AddRaw("dmx", str.str()); json.Add("error", result.Error()); response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(json); delete response; } /** * @brief Handle the set DMX response. * @param response the HTTPResponse that is associated with the request. * @param result the result of the API call */ void OladHTTPServer::HandleBoolResponse(HTTPResponse *response, const client::Result &result) { if (!result.Success()) { m_server.ServeError(response, result.Error()); return; } response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->Append("ok"); response->Send(); delete response; } /** * @brief Add the json representation of this port to the ostringstream */ void OladHTTPServer::PortToJson(JsonObject *json, const OlaDevice &device, const OlaPort &port, bool is_output) { ostringstream str; str << device.Alias() << "-" << (is_output ? "O" : "I") << "-" << port.Id(); json->Add("device", device.Name()); json->Add("description", port.Description()); json->Add("id", str.str()); json->Add("is_output", is_output); JsonObject *priority_json = json->AddObject("priority"); if (port.PriorityCapability() != CAPABILITY_NONE) { // This can be used as the default value for the priority input and because // inherit ports can return a 0 priority we shall set it to the default // here uint8_t priority = port.Priority(); if (priority == 0) { // We check here because 0 is an invalid priority outside of Olad priority = dmx::SOURCE_PRIORITY_DEFAULT; } priority_json->Add("value", static_cast(priority)); priority_json->Add( "current_mode", (port.PriorityMode() == PRIORITY_MODE_INHERIT ? "inherit" : "static")); priority_json->Add("priority_capability", (port.PriorityCapability() == CAPABILITY_STATIC ? "static" : "full")); } } /** * @brief Add the Patch Actions to the ActionQueue. * @param action_queue the ActionQueue to add the actions to. * @param port_id_string a string to ports to add/remove. * @param universe the universe id to add these ports if * @param port_action either PATCH or UNPATCH. */ void OladHTTPServer::AddPatchActions(ActionQueue *action_queue, const string port_id_string, unsigned int universe, client::PatchAction port_action) { vector ports; vector::const_iterator iter; DecodePortIds(port_id_string, &ports); for (iter = ports.begin(); iter != ports.end(); ++iter) { action_queue->AddAction(new PatchPortAction( &m_client, iter->device_alias, iter->port, iter->direction, universe, port_action)); } } /** * @brief Add the Priority Actions to the ActionQueue. * @param action_queue the ActionQueue to add the actions to. * @param request the HTTPRequest to read the url params from. */ void OladHTTPServer::AddPriorityActions(ActionQueue *action_queue, const HTTPRequest *request) { string port_ids = request->GetPostParameter("modify_ports"); vector ports; vector::const_iterator iter; DecodePortIds(port_ids, &ports); for (iter = ports.begin(); iter != ports.end(); ++iter) { string priority_mode_id = iter->string_id + K_PRIORITY_MODE_SUFFIX; string priority_id = iter->string_id + K_PRIORITY_VALUE_SUFFIX; string mode = request->GetPostParameter(priority_mode_id); if (mode == "inherit") { action_queue->AddAction(new PortPriorityInheritAction( &m_client, iter->device_alias, iter->port, iter->direction)); } else if (mode == "static" || mode == "") { // an empty mode param means this is a static port string value = request->GetPostParameter(priority_id); uint8_t priority_value; if (StringToInt(value, &priority_value)) { action_queue->AddAction(new PortPriorityStaticAction( &m_client, iter->device_alias, iter->port, iter->direction, priority_value)); } } } } /** * @brief Decode port ids in a string. * * This converts a string like "4-I-1,2-O-3" into a vector of port identifiers. * @param port_ids the port ids in a , separated string * @param ports a vector of port_identifiers that will be filled. */ void OladHTTPServer::DecodePortIds(const string &port_ids, vector *ports) { vector port_strings; StringSplit(port_ids, &port_strings, ","); vector::const_iterator iter; vector tokens; for (iter = port_strings.begin(); iter != port_strings.end(); ++iter) { if (iter->empty()) { continue; } tokens.clear(); StringSplit(*iter, &tokens, "-"); if (tokens.size() != 3 || (tokens[1] != "I" && tokens[1] != "O")) { OLA_INFO << "Not a valid port id " << *iter; continue; } unsigned int device_alias, port; if (!StringToInt(tokens[0], &device_alias) || !StringToInt(tokens[2], &port)) { OLA_INFO << "Not a valid port id " << *iter; continue; } client::PortDirection direction = ( tokens[1] == "I" ? client::INPUT_PORT : client::OUTPUT_PORT); port_identifier port_id = {device_alias, port, direction, *iter}; ports->push_back(port_id); } } /** * @brief Register a handler */ inline void OladHTTPServer::RegisterHandler( const string &path, int (OladHTTPServer::*method)(const HTTPRequest*, HTTPResponse*)) { m_server.RegisterHandler( path, NewCallback( this, method)); } } // namespace ola ola-0.10.9/olad/OlaServerServiceImpl.cpp0000664000175000017500000010026614376533110014777 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * OlaServerServiceImpl.cpp * Implementation of the OlaServerService interface. This is the class that * handles all the RPCs on the server side. * Copyright (C) 2005 Simon Newton */ #include #include #include #include "common/protocol/Ola.pb.h" #include "common/rpc/RpcSession.h" #include "ola/Callback.h" #include "ola/CallbackRunner.h" #include "ola/DmxBuffer.h" #include "ola/Logging.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/UIDSet.h" #include "ola/strings/Format.h" #include "ola/timecode/TimeCode.h" #include "ola/timecode/TimeCodeEnums.h" #include "olad/ClientBroker.h" #include "olad/Device.h" #include "olad/DmxSource.h" #include "olad/OlaServerServiceImpl.h" #include "olad/Plugin.h" #include "olad/PluginManager.h" #include "olad/Port.h" #include "olad/Universe.h" #include "olad/plugin_api/Client.h" #include "olad/plugin_api/DeviceManager.h" #include "olad/plugin_api/PortManager.h" #include "olad/plugin_api/UniverseStore.h" namespace ola { using ola::CallbackRunner; using ola::proto::Ack; using ola::proto::DeviceConfigReply; using ola::proto::DeviceConfigRequest; using ola::proto::DeviceInfo; using ola::proto::DeviceInfoReply; using ola::proto::DeviceInfoRequest; using ola::proto::DmxData; using ola::proto::MergeModeRequest; using ola::proto::OptionalUniverseRequest; using ola::proto::PatchPortRequest; using ola::proto::PluginDescriptionReply; using ola::proto::PluginDescriptionRequest; using ola::proto::PluginInfo; using ola::proto::PluginListReply; using ola::proto::PluginListRequest; using ola::proto::PortInfo; using ola::proto::RegisterDmxRequest; using ola::proto::UniverseInfo; using ola::proto::UniverseInfoReply; using ola::proto::UniverseNameRequest; using ola::proto::UniverseRequest; using ola::rdm::RDMRequest; using ola::rdm::RDMResponse; using ola::rdm::UID; using ola::rdm::UIDSet; using ola::rpc::RpcController; using std::string; using std::vector; namespace { template RDMRequest::OverrideOptions RDMRequestOptionsFromProto( const RequestType &request) { RDMRequest::OverrideOptions options; if (!request.has_options()) { return options; } const ola::proto::RDMRequestOverrideOptions &proto_options = request.options(); if (proto_options.has_sub_start_code()) { options.sub_start_code = proto_options.sub_start_code(); } if (proto_options.has_message_length()) { options.SetMessageLength(proto_options.message_length()); } if (proto_options.has_message_count()) { options.message_count = proto_options.message_count(); } if (proto_options.has_checksum()) { options.SetChecksum(proto_options.checksum()); } return options; } } // namespace typedef CallbackRunner ClosureRunner; OlaServerServiceImpl::OlaServerServiceImpl( UniverseStore *universe_store, DeviceManager *device_manager, PluginManager *plugin_manager, PortManager *port_manager, ClientBroker *broker, const TimeStamp *wake_up_time, ReloadPluginsCallback *reload_plugins_callback) : m_universe_store(universe_store), m_device_manager(device_manager), m_plugin_manager(plugin_manager), m_port_manager(port_manager), m_broker(broker), m_wake_up_time(wake_up_time), m_reload_plugins_callback(reload_plugins_callback) { } void OlaServerServiceImpl::GetDmx( RpcController* controller, const UniverseRequest* request, DmxData* response, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); Universe *universe = m_universe_store->GetUniverse(request->universe()); if (!universe) { return MissingUniverseError(controller); } const DmxBuffer buffer = universe->GetDMX(); response->set_data(buffer.Get()); response->set_universe(request->universe()); } void OlaServerServiceImpl::RegisterForDmx( RpcController* controller, const RegisterDmxRequest* request, Ack*, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); Universe *universe = m_universe_store->GetUniverseOrCreate( request->universe()); if (!universe) { return MissingUniverseError(controller); } Client *client = GetClient(controller); if (request->action() == ola::proto::REGISTER) { universe->AddSinkClient(client); } else { universe->RemoveSinkClient(client); } } void OlaServerServiceImpl::UpdateDmxData( RpcController* controller, const DmxData* request, Ack*, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); Universe *universe = m_universe_store->GetUniverse(request->universe()); if (!universe) { return MissingUniverseError(controller); } Client *client = GetClient(controller); DmxBuffer buffer; buffer.Set(request->data()); uint8_t priority = ola::dmx::SOURCE_PRIORITY_DEFAULT; if (request->has_priority()) { priority = request->priority(); priority = std::max(static_cast(ola::dmx::SOURCE_PRIORITY_MIN), priority); priority = std::min(static_cast(ola::dmx::SOURCE_PRIORITY_MAX), priority); } DmxSource source(buffer, *m_wake_up_time, priority); client->DMXReceived(request->universe(), source); universe->SourceClientDataChanged(client); } void OlaServerServiceImpl::StreamDmxData( RpcController *controller, const ola::proto::DmxData* request, ola::proto::STREAMING_NO_RESPONSE*, ola::rpc::RpcService::CompletionCallback*) { Universe *universe = m_universe_store->GetUniverse(request->universe()); if (!universe) { return; } Client *client = GetClient(controller); DmxBuffer buffer; buffer.Set(request->data()); uint8_t priority = ola::dmx::SOURCE_PRIORITY_DEFAULT; if (request->has_priority()) { priority = request->priority(); priority = std::max(static_cast(ola::dmx::SOURCE_PRIORITY_MIN), priority); priority = std::min(static_cast(ola::dmx::SOURCE_PRIORITY_MAX), priority); } DmxSource source(buffer, *m_wake_up_time, priority); client->DMXReceived(request->universe(), source); universe->SourceClientDataChanged(client); } void OlaServerServiceImpl::SetUniverseName( RpcController* controller, const UniverseNameRequest* request, Ack*, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); Universe *universe = m_universe_store->GetUniverse(request->universe()); if (!universe) { return MissingUniverseError(controller); } universe->SetName(request->name()); } void OlaServerServiceImpl::SetMergeMode( RpcController* controller, const MergeModeRequest* request, Ack*, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); Universe *universe = m_universe_store->GetUniverse(request->universe()); if (!universe) { return MissingUniverseError(controller); } Universe::merge_mode mode = request->merge_mode() == ola::proto::HTP ? Universe::MERGE_HTP : Universe::MERGE_LTP; universe->SetMergeMode(mode); } void OlaServerServiceImpl::PatchPort( RpcController* controller, const PatchPortRequest* request, Ack*, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); AbstractDevice *device = m_device_manager->GetDevice(request->device_alias()); if (!device) { return MissingDeviceError(controller); } bool result; if (request->is_output()) { OutputPort *port = device->GetOutputPort(request->port_id()); if (!port) { return MissingPortError(controller); } if (request->action() == ola::proto::PATCH) { result = m_port_manager->PatchPort(port, request->universe()); } else { result = m_port_manager->UnPatchPort(port); } } else { InputPort *port = device->GetInputPort(request->port_id()); if (!port) { return MissingPortError(controller); } if (request->action() == ola::proto::PATCH) { result = m_port_manager->PatchPort(port, request->universe()); } else { result = m_port_manager->UnPatchPort(port); } } if (!result) { controller->SetFailed("Patch port request failed"); } } void OlaServerServiceImpl::SetPortPriority( RpcController* controller, const ola::proto::PortPriorityRequest* request, Ack*, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); AbstractDevice *device = m_device_manager->GetDevice(request->device_alias()); if (!device) { return MissingDeviceError(controller); } bool status; bool inherit_mode = true; uint8_t value = 0; if (request->priority_mode() == PRIORITY_MODE_STATIC) { if (request->has_priority()) { inherit_mode = false; value = request->priority(); } else { OLA_INFO << "In Set Port Priority, override mode was set but the value " "wasn't specified"; controller->SetFailed( "Invalid SetPortPriority request, see logs for more info"); return; } } if (request->is_output()) { OutputPort *port = device->GetOutputPort(request->port_id()); if (!port) { return MissingPortError(controller); } if (inherit_mode) { status = m_port_manager->SetPriorityInherit(port); } else { status = m_port_manager->SetPriorityStatic(port, value); } } else { InputPort *port = device->GetInputPort(request->port_id()); if (!port) { return MissingPortError(controller); } if (inherit_mode) { status = m_port_manager->SetPriorityInherit(port); } else { status = m_port_manager->SetPriorityStatic(port, value); } } if (!status) { controller->SetFailed( "Invalid SetPortPriority request, see logs for more info"); } } void OlaServerServiceImpl::AddUniverse( const Universe * universe, ola::proto::UniverseInfoReply *universe_info_reply) const { UniverseInfo *universe_info = universe_info_reply->add_universe(); universe_info->set_universe(universe->UniverseId()); universe_info->set_name(universe->Name()); universe_info->set_merge_mode(universe->MergeMode() == Universe::MERGE_HTP ? ola::proto::HTP : ola::proto::LTP); universe_info->set_input_port_count(universe->InputPortCount()); universe_info->set_output_port_count(universe->OutputPortCount()); universe_info->set_rdm_devices(universe->UIDCount()); std::vector input_ports; std::vector::const_iterator input_it; universe->InputPorts(&input_ports); for (input_it = input_ports.begin(); input_it != input_ports.end(); input_it++) { PortInfo *pi = universe_info->add_input_ports(); PopulatePort(**input_it, pi); } std::vector output_ports; std::vector::const_iterator output_it; universe->OutputPorts(&output_ports); for (output_it = output_ports.begin(); output_it != output_ports.end(); output_it++) { PortInfo *pi = universe_info->add_output_ports(); PopulatePort(**output_it, pi); } } void OlaServerServiceImpl::GetUniverseInfo( RpcController* controller, const OptionalUniverseRequest* request, UniverseInfoReply* response, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); if (request->has_universe()) { // return info for a single universe Universe *universe = m_universe_store->GetUniverse(request->universe()); if (!universe) { return MissingUniverseError(controller); } AddUniverse(universe, response); } else { // return all vector uni_list; m_universe_store->GetList(&uni_list); vector::const_iterator iter; for (iter = uni_list.begin(); iter != uni_list.end(); ++iter) { AddUniverse(*iter, response); } } } void OlaServerServiceImpl::GetPlugins( RpcController*, const PluginListRequest*, PluginListReply* response, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); vector plugin_list; vector::const_iterator iter; m_plugin_manager->Plugins(&plugin_list); for (iter = plugin_list.begin(); iter != plugin_list.end(); ++iter) { PluginInfo *plugin_info = response->add_plugin(); AddPlugin(*iter, plugin_info); } } void OlaServerServiceImpl::ReloadPlugins( RpcController*, const ::ola::proto::PluginReloadRequest*, Ack*, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); if (m_reload_plugins_callback.get()) { m_reload_plugins_callback->Run(); } else { OLA_WARN << "No plugin reload callback provided!"; } } void OlaServerServiceImpl::GetPluginDescription( RpcController* controller, const ola::proto::PluginDescriptionRequest* request, ola::proto::PluginDescriptionReply* response, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); AbstractPlugin *plugin = m_plugin_manager->GetPlugin((ola_plugin_id) request->plugin_id()); if (plugin) { response->set_name(plugin->Name()); response->set_description(plugin->Description()); } else { controller->SetFailed("Plugin not loaded"); } } void OlaServerServiceImpl::GetPluginState( RpcController* controller, const ola::proto::PluginStateRequest* request, ola::proto::PluginStateReply* response, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); ola_plugin_id plugin_id = (ola_plugin_id) request->plugin_id(); AbstractPlugin *plugin = m_plugin_manager->GetPlugin(plugin_id); if (plugin) { response->set_name(plugin->Name()); response->set_enabled(plugin->IsEnabled()); response->set_active(m_plugin_manager->IsActive(plugin_id)); response->set_preferences_source(plugin->PreferenceConfigLocation()); vector conflict_list; m_plugin_manager->GetConflictList(plugin_id, &conflict_list); vector::const_iterator iter = conflict_list.begin(); for (; iter != conflict_list.end(); ++iter) { PluginInfo *plugin_info = response->add_conflicts_with(); AddPlugin(*iter, plugin_info); } } else { controller->SetFailed("Plugin not loaded"); } } void OlaServerServiceImpl::SetPluginState( RpcController *controller, const ola::proto::PluginStateChangeRequest* request, Ack*, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); ola_plugin_id plugin_id = (ola_plugin_id) request->plugin_id(); AbstractPlugin *plugin = m_plugin_manager->GetPlugin(plugin_id); if (plugin) { OLA_DEBUG << "SetPluginState to " << request->enabled() << " for plugin " << plugin->Name(); if (request->enabled()) { if (!m_plugin_manager->EnableAndStartPlugin(plugin_id)) { controller->SetFailed("Failed to start plugin: " + plugin->Name()); } } else { m_plugin_manager->DisableAndStopPlugin(plugin_id); } } } void OlaServerServiceImpl::GetDeviceInfo( RpcController*, const DeviceInfoRequest* request, DeviceInfoReply* response, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); vector device_list = m_device_manager->Devices(); vector::const_iterator iter; for (iter = device_list.begin(); iter != device_list.end(); ++iter) { if (request->has_plugin_id()) { if (iter->device->Owner()->Id() == request->plugin_id() || request->plugin_id() == ola::OLA_PLUGIN_ALL) { AddDevice(iter->device, iter->alias, response); } } else { AddDevice(iter->device, iter->alias, response); } } } void OlaServerServiceImpl::GetCandidatePorts( RpcController* controller, const ola::proto::OptionalUniverseRequest* request, ola::proto::DeviceInfoReply* response, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); vector device_list = m_device_manager->Devices(); vector::const_iterator iter; Universe *universe = NULL; if (request->has_universe()) { universe = m_universe_store->GetUniverse(request->universe()); if (!universe) { return MissingUniverseError(controller); } } vector input_ports; vector output_ports; vector::const_iterator input_iter; vector::const_iterator output_iter; for (iter = device_list.begin(); iter != device_list.end(); ++iter) { AbstractDevice *device = iter->device; input_ports.clear(); output_ports.clear(); device->InputPorts(&input_ports); device->OutputPorts(&output_ports); bool seen_input_port = false; bool seen_output_port = false; unsigned int unpatched_input_ports = 0; unsigned int unpatched_output_ports = 0; if (universe) { for (input_iter = input_ports.begin(); input_iter != input_ports.end(); input_iter++) { if ((*input_iter)->GetUniverse() == universe) { seen_input_port = true; } else if (!(*input_iter)->GetUniverse()) { unpatched_input_ports++; } } for (output_iter = output_ports.begin(); output_iter != output_ports.end(); output_iter++) { if ((*output_iter)->GetUniverse() == universe) { seen_output_port = true; } else if (!(*output_iter)->GetUniverse()) { unpatched_output_ports++; } } } else { unpatched_input_ports = input_ports.size(); unpatched_output_ports = output_ports.size(); } bool can_bind_more_input_ports = ( (!seen_output_port || device->AllowLooping()) && (!seen_input_port || device->AllowMultiPortPatching())); bool can_bind_more_output_ports = ( (!seen_input_port || device->AllowLooping()) && (!seen_output_port || device->AllowMultiPortPatching())); if ((unpatched_input_ports == 0 || !can_bind_more_input_ports) && (unpatched_output_ports == 0 || !can_bind_more_output_ports)) { continue; } // go ahead and create the device at this point DeviceInfo *device_info = response->add_device(); device_info->set_device_alias(iter->alias); device_info->set_device_name(device->Name()); device_info->set_device_id(device->UniqueId()); if (device->Owner()) { device_info->set_plugin_id(device->Owner()->Id()); } for (input_iter = input_ports.begin(); input_iter != input_ports.end(); ++input_iter) { if ((*input_iter)->GetUniverse()) { continue; } if (!can_bind_more_input_ports) { break; } PortInfo *port_info = device_info->add_input_port(); PopulatePort(**input_iter, port_info); if (!device->AllowMultiPortPatching()) { break; } } for (output_iter = output_ports.begin(); output_iter != output_ports.end(); ++output_iter) { if ((*output_iter)->GetUniverse()) { continue; } if (!can_bind_more_output_ports) { break; } PortInfo *port_info = device_info->add_output_port(); PopulatePort(**output_iter, port_info); if (!device->AllowMultiPortPatching()) { break; } } } } void OlaServerServiceImpl::ConfigureDevice( RpcController* controller, const DeviceConfigRequest* request, DeviceConfigReply* response, ola::rpc::RpcService::CompletionCallback* done) { AbstractDevice *device = m_device_manager->GetDevice(request->device_alias()); if (!device) { MissingDeviceError(controller); done->Run(); return; } device->Configure(controller, request->data(), response->mutable_data(), done); } void OlaServerServiceImpl::GetUIDs( RpcController* controller, const ola::proto::UniverseRequest* request, ola::proto::UIDListReply* response, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); Universe *universe = m_universe_store->GetUniverse(request->universe()); if (!universe) { return MissingUniverseError(controller); } response->set_universe(universe->UniverseId()); UIDSet uid_set; universe->GetUIDs(&uid_set); UIDSet::Iterator iter = uid_set.Begin(); for (; iter != uid_set.End(); ++iter) { ola::proto::UID *uid = response->add_uid(); SetProtoUID(*iter, uid); } } void OlaServerServiceImpl::ForceDiscovery( RpcController* controller, const ola::proto::DiscoveryRequest* request, ola::proto::UIDListReply *response, ola::rpc::RpcService::CompletionCallback* done) { Universe *universe = m_universe_store->GetUniverse(request->universe()); if (universe) { unsigned int universe_id = request->universe(); m_broker->RunRDMDiscovery( GetClient(controller), universe, request->full(), NewSingleCallback(this, &OlaServerServiceImpl::RDMDiscoveryComplete, universe_id, done, response)); } else { ClosureRunner runner(done); MissingUniverseError(controller); } } void OlaServerServiceImpl::RDMCommand( RpcController* controller, const ola::proto::RDMRequest* request, ola::proto::RDMResponse* response, ola::rpc::RpcService::CompletionCallback* done) { Universe *universe = m_universe_store->GetUniverse(request->universe()); if (!universe) { MissingUniverseError(controller); done->Run(); return; } Client *client = GetClient(controller); UID source_uid = client->GetUID(); UID destination(request->uid().esta_id(), request->uid().device_id()); RDMRequest::OverrideOptions options = RDMRequestOptionsFromProto(*request); ola::rdm::RDMRequest *rdm_request = NULL; if (request->is_set()) { rdm_request = new ola::rdm::RDMSetRequest( source_uid, destination, universe->GetRDMTransactionNumber(), 1, // port id request->sub_device(), request->param_id(), reinterpret_cast(request->data().data()), request->data().size(), options); } else { rdm_request = new ola::rdm::RDMGetRequest( source_uid, destination, universe->GetRDMTransactionNumber(), 1, // port id request->sub_device(), request->param_id(), reinterpret_cast(request->data().data()), request->data().size(), options); } ola::rdm::RDMCallback *callback = NewSingleCallback( this, &OlaServerServiceImpl::HandleRDMResponse, response, done, request->include_raw_response()); m_broker->SendRDMRequest(client, universe, rdm_request, callback); } void OlaServerServiceImpl::RDMDiscoveryCommand( RpcController* controller, const ola::proto::RDMDiscoveryRequest* request, ola::proto::RDMResponse* response, ola::rpc::RpcService::CompletionCallback* done) { Universe *universe = m_universe_store->GetUniverse(request->universe()); if (!universe) { MissingUniverseError(controller); done->Run(); return; } Client *client = GetClient(controller); UID source_uid = client->GetUID(); UID destination(request->uid().esta_id(), request->uid().device_id()); RDMRequest::OverrideOptions options = RDMRequestOptionsFromProto(*request); ola::rdm::RDMRequest *rdm_request = new ola::rdm::RDMDiscoveryRequest( source_uid, destination, universe->GetRDMTransactionNumber(), 1, // port id request->sub_device(), request->param_id(), reinterpret_cast(request->data().data()), request->data().size(), options); ola::rdm::RDMCallback *callback = NewSingleCallback( this, &OlaServerServiceImpl::HandleRDMResponse, response, done, request->include_raw_response()); m_broker->SendRDMRequest(client, universe, rdm_request, callback); } void OlaServerServiceImpl::SetSourceUID( RpcController *controller, const ola::proto::UID* request, Ack*, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); UID source_uid(request->esta_id(), request->device_id()); GetClient(controller)->SetUID(source_uid); } void OlaServerServiceImpl::SendTimeCode( RpcController* controller, const ola::proto::TimeCode* request, Ack*, ola::rpc::RpcService::CompletionCallback* done) { ClosureRunner runner(done); ola::timecode::TimeCode time_code( static_cast(request->type()), request->hours(), request->minutes(), request->seconds(), request->frames()); if (time_code.IsValid()) { m_device_manager->SendTimeCode(time_code); } else { controller->SetFailed("Invalid TimeCode"); } } // Private methods //----------------------------------------------------------------------------- /* * Handle an RDM Response, this includes broadcast messages, messages that * timed out and normal response messages. */ void OlaServerServiceImpl::HandleRDMResponse( ola::proto::RDMResponse* response, ola::rpc::RpcService::CompletionCallback* done, bool include_raw_packets, ola::rdm::RDMReply *reply) { ClosureRunner runner(done); response->set_response_code( static_cast(reply->StatusCode())); if (reply->StatusCode() == ola::rdm::RDM_COMPLETED_OK) { if (!reply->Response()) { // No response returned. OLA_WARN << "RDM code was ok but response was NULL"; response->set_response_code(static_cast( ola::rdm::RDM_INVALID_RESPONSE)); } else if (reply->Response()->ResponseType() <= ola::rdm::RDM_NACK_REASON) { // Valid RDM Response code. SetProtoUID(reply->Response()->SourceUID(), response->mutable_source_uid()); SetProtoUID(reply->Response()->DestinationUID(), response->mutable_dest_uid()); response->set_transaction_number(reply->Response()->TransactionNumber()); response->set_response_type(static_cast( reply->Response()->ResponseType())); response->set_message_count(reply->Response()->MessageCount()); response->set_sub_device(reply->Response()->SubDevice()); switch (reply->Response()->CommandClass()) { case ola::rdm::RDMCommand::DISCOVER_COMMAND_RESPONSE: response->set_command_class(ola::proto::RDM_DISCOVERY_RESPONSE); break; case ola::rdm::RDMCommand::GET_COMMAND_RESPONSE: response->set_command_class(ola::proto::RDM_GET_RESPONSE); break; case ola::rdm::RDMCommand::SET_COMMAND_RESPONSE: response->set_command_class(ola::proto::RDM_SET_RESPONSE); break; default: OLA_WARN << "Unknown command class " << strings::ToHex(static_cast( reply->Response()->CommandClass())); } response->set_param_id(reply->Response()->ParamId()); if (reply->Response()->ParamData() && reply->Response()->ParamDataSize()) { response->set_data( reinterpret_cast(reply->Response()->ParamData()), reply->Response()->ParamDataSize()); } } else { // Invalid RDM Response code. OLA_WARN << "RDM response present, but response type is invalid, was " << strings::ToHex(reply->Response()->ResponseType()); response->set_response_code(ola::proto::RDM_INVALID_RESPONSE); } } if (include_raw_packets) { vector::const_iterator iter = reply->Frames().begin(); for (; iter != reply->Frames().end(); ++iter) { ola::proto::RDMFrame *frame = response->add_raw_frame(); frame->set_raw_response(iter->data.data(), iter->data.size()); ola::proto::RDMFrameTiming *timing = frame->mutable_timing(); timing->set_response_delay(iter->timing.response_time); timing->set_break_time(iter->timing.break_time); timing->set_mark_time(iter->timing.mark_time); timing->set_data_time(iter->timing.data_time); } } } /** * Called when RDM discovery completes */ void OlaServerServiceImpl::RDMDiscoveryComplete( unsigned int universe_id, ola::rpc::RpcService::CompletionCallback* done, ola::proto::UIDListReply *response, const UIDSet &uids) { ClosureRunner runner(done); response->set_universe(universe_id); UIDSet::Iterator iter = uids.Begin(); for (; iter != uids.End(); ++iter) { ola::proto::UID *uid = response->add_uid(); SetProtoUID(*iter, uid); } } void OlaServerServiceImpl::MissingUniverseError(RpcController* controller) { controller->SetFailed("Universe doesn't exist"); } void OlaServerServiceImpl::MissingDeviceError(RpcController* controller) { controller->SetFailed("Device doesn't exist"); } void OlaServerServiceImpl::MissingPluginError(RpcController* controller) { controller->SetFailed("Plugin doesn't exist"); } void OlaServerServiceImpl::MissingPortError(RpcController* controller) { controller->SetFailed("Port doesn't exist"); } /* * Add this device to the DeviceInfo response */ void OlaServerServiceImpl::AddPlugin(AbstractPlugin *plugin, PluginInfo* plugin_info) const { plugin_info->set_plugin_id(plugin->Id()); plugin_info->set_name(plugin->Name()); plugin_info->set_active(m_plugin_manager->IsActive(plugin->Id())); plugin_info->set_enabled(m_plugin_manager->IsEnabled(plugin->Id())); } /* * Add this device to the DeviceInfo response */ void OlaServerServiceImpl::AddDevice(AbstractDevice *device, unsigned int alias, DeviceInfoReply* response) const { DeviceInfo *device_info = response->add_device(); device_info->set_device_alias(alias); device_info->set_device_name(device->Name()); device_info->set_device_id(device->UniqueId()); if (device->Owner()) { device_info->set_plugin_id(device->Owner()->Id()); } vector input_ports; device->InputPorts(&input_ports); vector::const_iterator input_iter; for (input_iter = input_ports.begin(); input_iter != input_ports.end(); ++input_iter) { PortInfo *port_info = device_info->add_input_port(); PopulatePort(**input_iter, port_info); } vector output_ports; device->OutputPorts(&output_ports); vector::const_iterator output_iter; for (output_iter = output_ports.begin(); output_iter != output_ports.end(); ++output_iter) { PortInfo *port_info = device_info->add_output_port(); PopulatePort(**output_iter, port_info); } } template void OlaServerServiceImpl::PopulatePort(const PortClass &port, PortInfo *port_info) const { port_info->set_port_id(port.PortId()); port_info->set_priority_capability(port.PriorityCapability()); port_info->set_description(port.Description()); if (port.GetUniverse()) { port_info->set_active(true); port_info->set_universe(port.GetUniverse()->UniverseId()); } else { port_info->set_active(false); } if (port.PriorityCapability() != CAPABILITY_NONE) { port_info->set_priority_mode(port.GetPriorityMode()); if (port.GetPriorityMode() == PRIORITY_MODE_STATIC) { port_info->set_priority(port.GetPriority()); } } port_info->set_supports_rdm(port.SupportsRDM()); } void OlaServerServiceImpl::SetProtoUID(const ola::rdm::UID &uid, ola::proto::UID *pb_uid) { pb_uid->set_esta_id(uid.ManufacturerId()); pb_uid->set_device_id(uid.DeviceId()); } Client* OlaServerServiceImpl::GetClient(ola::rpc::RpcController *controller) { return reinterpret_cast(controller->Session()->GetData()); } } // namespace ola ola-0.10.9/olad/Olad.cpp0000664000175000017500000001326514376533110011613 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Olad.cpp * Main file for olad, parses the options, forks if required and runs the * daemon. * Copyright (C) 2005 Simon Newton * */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include #include // On MinGW, OlaDaemon.h pulls in SocketAddress.h which pulls in WinSock2.h, // which needs to be after WinSock2.h, hence this order #include "olad/OlaDaemon.h" #include "ola/Logging.h" #include "ola/base/Credentials.h" #include "ola/base/Flags.h" #include "ola/base/Init.h" #include "ola/base/SysExits.h" #include "ola/base/Version.h" #include "ola/thread/SignalThread.h" using ola::OlaDaemon; using ola::thread::SignalThread; using std::cout; using std::endl; DEFINE_default_bool(http, true, "Disable the HTTP server."); DEFINE_default_bool(http_quit, true, "Disable the HTTP /quit handler."); #ifndef _WIN32 DEFINE_s_default_bool(daemon, f, false, "Fork and run as a background process."); #endif // _WIN32 DEFINE_s_string(http_data_dir, d, "", "The path to the static www content."); DEFINE_s_string(interface, i, "", "The interface name (e.g. eth0) or IP address of the network " "interface to use for the web server."); DEFINE_string(pid_location, "", "The directory containing the PID definitions."); DEFINE_s_uint16(http_port, p, ola::OlaServer::DEFAULT_HTTP_PORT, "The port to run the HTTP server on. Defaults to 9090."); /** * This is called by the SelectServer loop to start up the SignalThread. If the * thread fails to start, we terminate the SelectServer */ void StartSignalThread(ola::io::SelectServer *ss, SignalThread *signal_thread) { if (!signal_thread->Start()) { ss->Terminate(); } } /* * Main */ int main(int argc, char *argv[]) { // Take a copy of the arguments otherwise the export map is incorrect. const int original_argc = argc; char *original_argv[original_argc]; for (int i = 0; i < original_argc; i++) { original_argv[i] = argv[i]; } // We don't use the longer form for ServerInit here because we need to check // for root and possibly daemonise before doing the rest of the work from // ServerInit. ola::SetHelpString("[options]", "Start the OLA Daemon."); ola::ParseFlags(&argc, argv); ola::InitLoggingFromFlags(); OLA_INFO << "OLA Daemon version " << ola::base::Version::GetVersion(); #ifndef OLAD_SKIP_ROOT_CHECK uid_t uid; ola::GetEUID(&uid); if (ola::SupportsUIDs() && !uid) { OLA_FATAL << "Attempting to run as root, aborting."; return ola::EXIT_UNAVAILABLE; } #endif // OLAD_SKIP_ROOT_CHECK #ifndef _WIN32 if (FLAGS_daemon) ola::Daemonise(); #endif // _WIN32 ola::ExportMap export_map; if (!ola::ServerInit(original_argc, original_argv, &export_map)) { return ola::EXIT_UNAVAILABLE; } // We need to block signals before we start any threads. // Signal setup is complex. First of all we need to install NULL handlers to // the signals are blocked before we start *any* threads. It's safest if we // do this before creating the OlaDaemon. SignalThread signal_thread; signal_thread.InstallSignalHandler(SIGINT, NULL); signal_thread.InstallSignalHandler(SIGTERM, NULL); #ifndef _WIN32 signal_thread.InstallSignalHandler(SIGHUP, NULL); signal_thread.InstallSignalHandler( SIGUSR1, ola::NewCallback(&ola::IncrementLogLevel)); #endif // _WIN32 ola::OlaServer::Options options; options.http_enable = FLAGS_http; options.http_enable_quit = FLAGS_http_quit; options.http_port = FLAGS_http_port; options.http_data_dir = FLAGS_http_data_dir.str(); options.network_interface = FLAGS_interface.str(); options.pid_data_dir = FLAGS_pid_location.str(); std::auto_ptr olad(new OlaDaemon(options, &export_map)); if (!olad.get()) { return ola::EXIT_UNAVAILABLE; } // Now that the OlaDaemon has been created, we can reset the signal handlers // to do what we actually want them to. signal_thread.InstallSignalHandler( SIGINT, ola::NewCallback(olad->GetSelectServer(), &ola::io::SelectServer::Terminate)); signal_thread.InstallSignalHandler( SIGTERM, ola::NewCallback(olad->GetSelectServer(), &ola::io::SelectServer::Terminate)); // We can't start the signal thread here, otherwise there is a race // condition if a signal arrives before we enter the SelectServer Run() // method. Instead we schedule it to start from the SelectServer loop. olad->GetSelectServer()->Execute(ola::NewSingleCallback( &StartSignalThread, olad->GetSelectServer(), &signal_thread)); if (!olad->Init()) { return ola::EXIT_UNAVAILABLE; } #ifndef _WIN32 // Finally the OlaServer is not-null. signal_thread.InstallSignalHandler( SIGHUP, ola::NewCallback(olad->GetOlaServer(), &ola::OlaServer::ReloadPlugins)); #endif // _WIN32 olad->Run(); return ola::EXIT_OK; } ola-0.10.9/olad/HttpServerActions.h0000664000175000017500000001243114376533110014022 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * HttpServerActions.h * The list of actions the Ola Server performs. * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_HTTPSERVERACTIONS_H_ #define OLAD_HTTPSERVERACTIONS_H_ #include #include #include "ola/ActionQueue.h" #include "ola/client/OlaClient.h" #include "ola/base/Macro.h" namespace ola { /* * The base action */ class BaseHttpAction: public Action { public: explicit BaseHttpAction(client::OlaClient *client): Action(), m_client(client), m_failed(false), m_on_done(NULL) { } virtual ~BaseHttpAction() {} bool Failed() const { return m_failed; } void Perform(SingleUseCallback0 *on_done); void CallbackComplete(const client::Result &result); protected: client::OlaClient *m_client; void RequestComplete(bool failure); virtual void DoAction() = 0; private: bool m_failed; SingleUseCallback0 *m_on_done; DISALLOW_COPY_AND_ASSIGN(BaseHttpAction); }; /* * An action that sets the name of a universe */ class SetNameAction: public BaseHttpAction { public: SetNameAction(client::OlaClient *client, unsigned int universe, const std::string &name, bool is_fatal): BaseHttpAction(client), m_universe(universe), m_name(name), m_is_fatal(is_fatal) { } bool IsFatal() const { return m_is_fatal; } protected: void DoAction(); private: unsigned int m_universe; std::string m_name; bool m_is_fatal; DISALLOW_COPY_AND_ASSIGN(SetNameAction); }; /* * An action that sets the merge mode of a universe */ class SetMergeModeAction: public BaseHttpAction { public: SetMergeModeAction(client::OlaClient *client, unsigned int universe, client::OlaUniverse::merge_mode mode): BaseHttpAction(client), m_universe(universe), m_merge_mode(mode) { } bool IsFatal() const { return false; } protected: void DoAction(); private: unsigned int m_universe; client::OlaUniverse::merge_mode m_merge_mode; DISALLOW_COPY_AND_ASSIGN(SetMergeModeAction); }; /* * An action that adds or removes a port from a universe. */ class PatchPortAction: public BaseHttpAction { public: PatchPortAction(client::OlaClient *client, unsigned int device_alias, unsigned int port, client::PortDirection direction, unsigned int universe, client::PatchAction action): BaseHttpAction(client), m_device_alias(device_alias), m_port(port), m_direction(direction), m_universe(universe), m_action(action) { } bool IsFatal() const { return false; } protected: void DoAction(); private: unsigned int m_device_alias; unsigned int m_port; client::PortDirection m_direction; unsigned int m_universe; client::PatchAction m_action; DISALLOW_COPY_AND_ASSIGN(PatchPortAction); }; /* * An action that sets a port priority to inherit mode. */ class PortPriorityInheritAction: public BaseHttpAction { public: PortPriorityInheritAction(client::OlaClient *client, unsigned int device_alias, unsigned int port, client::PortDirection direction): BaseHttpAction(client), m_device_alias(device_alias), m_port(port), m_direction(direction) { } bool IsFatal() const { return false; } protected: void DoAction(); private: unsigned int m_device_alias; unsigned int m_port; client::PortDirection m_direction; DISALLOW_COPY_AND_ASSIGN(PortPriorityInheritAction); }; /* * An action that sets a port priority to override mode. */ class PortPriorityStaticAction: public BaseHttpAction { public: PortPriorityStaticAction(client::OlaClient *client, unsigned int device_alias, unsigned int port, client::PortDirection direction, uint8_t override_value): BaseHttpAction(client), m_device_alias(device_alias), m_port(port), m_direction(direction), m_override_value(override_value) { } bool IsFatal() const { return false; } protected: void DoAction(); private: unsigned int m_device_alias; unsigned int m_port; client::PortDirection m_direction; uint8_t m_override_value; DISALLOW_COPY_AND_ASSIGN(PortPriorityStaticAction); }; } // namespace ola #endif // OLAD_HTTPSERVERACTIONS_H_ ola-0.10.9/olad/OlaServer.h0000664000175000017500000001577314376533110012311 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * OlaServer.h * Interface for the ola server class * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_OLASERVER_H_ #define OLAD_OLASERVER_H_ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include namespace ola { namespace rpc { class RpcSession; class RpcServer; } #ifdef HAVE_LIBMICROHTTPD typedef class OladHTTPServer OladHTTPServer_t; #else typedef int OladHTTPServer_t; #endif // HAVE_LIBMICROHTTPD /** * @brief The main OlaServer class. */ class OlaServer : public ola::rpc::RpcSessionHandlerInterface { public: /** * @brief Options for the OlaServer. */ struct Options { bool http_enable; /** @brief Run the HTTP server */ bool http_localhost_only; /** @brief Restrict access to localhost only */ bool http_enable_quit; /** @brief Enable /quit URL */ unsigned int http_port; /** @brief Port to run the HTTP server on */ /** @brief Directory that contains the static content */ std::string http_data_dir; std::string network_interface; std::string pid_data_dir; /** @brief Directory with the PID definitions */ }; /** * @brief Create a new instance of the OlaServer. * @param plugin_loaders A list of PluginLoaders to use to find plugins. * @param preferences_factory The factory to use when creating Preference * objects. * @param ss The SelectServer. * @param ola_options The OlaServer options. * @param socket An optional TCPAcceptingSocket in the listen state to use * for client RPC calls. Ownership is transferred. * @param export_map An optional ExportMap. If set to NULL a new ExportMap * will be created. */ OlaServer(const std::vector &plugin_loaders, class PreferencesFactory *preferences_factory, ola::io::SelectServer *ss, const Options &ola_options, ola::network::TCPAcceptingSocket *socket = NULL, ExportMap *export_map = NULL); /** * @brief Shutdown the server */ ~OlaServer(); /** * @brief Initialize the OlaServer. * @returns true if initialization succeeded, false if it failed. */ bool Init(); /** * @brief Reload all plugins. * * This method is thread safe. */ void ReloadPlugins(); /** * @brief Reload the pid store. * * This method is thread safe. */ void ReloadPidStore(); /** * @brief Stop the OLA Server. * * This terminates the underlying SelectServer. */ void StopServer() { m_ss->Terminate(); } /** * @brief Add a new ConnectedDescriptor to this Server. * @param descriptor the new ConnectedDescriptor, ownership is transferred. */ void NewConnection(ola::io::ConnectedDescriptor *descriptor); /** * @brief Return the socket address the RPC server is listening on. * @returns A socket address, which is empty if the server hasn't been * initialized. */ ola::network::GenericSocketAddress LocalRPCAddress() const; // Called by the RpcServer when clients connect or disconnect. void NewClient(ola::rpc::RpcSession *session); void ClientRemoved(ola::rpc::RpcSession *session); /** * @brief Get the instance name * @return a string which is the instance name */ const std::string InstanceName() { return m_instance_name; } /** * @brief Get the preferences factory * @return a pointer to the preferences factory */ const PreferencesFactory* GetPreferencesFactory() { return m_preferences_factory; } static const unsigned int DEFAULT_HTTP_PORT = 9090; static const unsigned int DEFAULT_RPC_PORT = OLA_DEFAULT_PORT; private : struct ClientEntry { ola::io::ConnectedDescriptor *client_descriptor; class OlaClientService *client_service; }; typedef std::map ClientMap; // These are all passed to the constructor. const Options m_options; std::vector m_plugin_loaders; class PreferencesFactory *m_preferences_factory; ola::io::SelectServer *m_ss; ola::network::TCPAcceptingSocket *m_accepting_socket; class ExportMap *m_export_map; std::auto_ptr m_our_export_map; ola::rdm::UID m_default_uid; // These are all populated in Init. std::auto_ptr m_device_manager; std::auto_ptr m_plugin_manager; std::auto_ptr m_plugin_adaptor; std::auto_ptr m_universe_store; std::auto_ptr m_port_manager; std::auto_ptr m_service_impl; std::auto_ptr m_broker; std::auto_ptr m_port_broker; std::auto_ptr m_pid_store; std::auto_ptr m_discovery_agent; std::auto_ptr m_rpc_server; class Preferences *m_server_preferences; class Preferences *m_universe_preferences; std::string m_instance_name; ola::thread::timeout_id m_housekeeping_timeout; std::auto_ptr m_httpd; bool RunHousekeeping(); #ifdef HAVE_LIBMICROHTTPD bool StartHttpServer(ola::rpc::RpcServer *server, const ola::network::Interface &iface); #endif // HAVE_LIBMICROHTTPD /** * @brief Stop and unload all the plugins */ void StopPlugins(); bool InternalNewConnection(ola::rpc::RpcServer *server, ola::io::ConnectedDescriptor *descriptor); void ReloadPluginsInternal(); /** * @brief Update the Pid store with the new values. */ void UpdatePidStore(const ola::rdm::RootPidStore *pid_store); static const char INSTANCE_NAME_KEY[]; static const char K_INSTANCE_NAME_VAR[]; static const char K_DISCOVERY_SERVICE_TYPE[]; static const char K_UID_VAR[]; static const char SERVER_PREFERENCES[]; static const char UNIVERSE_PREFERENCES[]; static const unsigned int K_HOUSEKEEPING_TIMEOUT_MS; DISALLOW_COPY_AND_ASSIGN(OlaServer); }; } // namespace ola #endif // OLAD_OLASERVER_H_ ola-0.10.9/olad/BonjourDiscoveryAgent.h0000664000175000017500000000470514376533110014665 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * BonjourDiscoveryAgent.h * The Bonjour implementation of DiscoveryAgentInterface. * Copyright (C) 2013 Simon Newton */ #ifndef OLAD_BONJOURDISCOVERYAGENT_H_ #define OLAD_BONJOURDISCOVERYAGENT_H_ #include #include #include #include #include #include #include #include "olad/DiscoveryAgent.h" namespace ola { namespace thread { class CallbackThread; } /** * @brief An implementation of DiscoveryAgentInterface that uses the Apple * dns_sd.h library. */ class BonjourDiscoveryAgent : public DiscoveryAgentInterface { public: BonjourDiscoveryAgent(); ~BonjourDiscoveryAgent(); bool Init(); void RegisterService(const std::string &service_name, const std::string &type, uint16_t port, const RegisterOptions &options); private: struct RegisterArgs : public RegisterOptions { std::string service_name; std::string type; uint16_t port; RegisterArgs(const std::string &service_name, const std::string &type, uint16_t port, const RegisterOptions &options); }; struct ServiceRef { // DNSServiceRef is just a pointer. DNSServiceRef service_ref; class DNSSDDescriptor *descriptor; }; typedef std::vector ServiceRefs; ola::io::SelectServer m_ss; std::auto_ptr m_thread; ServiceRefs m_refs; void InternalRegisterService(RegisterArgs *args); std::string BuildTxtRecord(const RegisterOptions::TxtData &txt_data); void RunThread(); DISALLOW_COPY_AND_ASSIGN(BonjourDiscoveryAgent); }; } // namespace ola #endif // OLAD_BONJOURDISCOVERYAGENT_H_ ola-0.10.9/olad/HttpServerActions.cpp0000664000175000017500000000510214376533110014352 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * HttpServerActions.cpp * The actions the HTTP server uses to interact with the client. * Copyright (C) 2010 Simon Newton */ #include #include #include "ola/ActionQueue.h" #include "ola/Callback.h" #include "ola/Logging.h" #include "olad/HttpServerActions.h" namespace ola { using std::string; void BaseHttpAction::RequestComplete(bool failure) { m_failed = failure; m_on_done->Run(); } void BaseHttpAction::Perform(SingleUseCallback0 *on_done) { m_on_done = on_done; DoAction(); } void BaseHttpAction::CallbackComplete(const client::Result &result) { RequestComplete(!result.Success()); } void SetNameAction::DoAction() { m_client->SetUniverseName( m_universe, m_name, NewSingleCallback(static_cast(this), &SetNameAction::CallbackComplete)); } void SetMergeModeAction::DoAction() { m_client->SetUniverseMergeMode( m_universe, m_merge_mode, NewSingleCallback(static_cast(this), &SetMergeModeAction::CallbackComplete)); } void PatchPortAction::DoAction() { m_client->Patch( m_device_alias, m_port, m_direction, m_action, m_universe, NewSingleCallback(static_cast(this), &PatchPortAction::CallbackComplete)); } void PortPriorityInheritAction::DoAction() { m_client->SetPortPriorityInherit( m_device_alias, m_port, m_direction, NewSingleCallback(static_cast(this), &PortPriorityInheritAction::CallbackComplete)); } void PortPriorityStaticAction::DoAction() { m_client->SetPortPriorityOverride( m_device_alias, m_port, m_direction, m_override_value, NewSingleCallback(static_cast(this), &PortPriorityStaticAction::CallbackComplete)); } } // namespace ola ola-0.10.9/olad/ClientBroker.cpp0000664000175000017500000000632214376533110013313 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ClientBroker.cpp * Acts as the glue between clients and the RDM request path. * Copyright (C) 2010 Simon Newton */ #include #include #include #include "ola/Logging.h" #include "ola/stl/STLUtils.h" #include "olad/ClientBroker.h" namespace ola { using std::set; using std::string; using std::vector; void ClientBroker::AddClient(const Client *client) { m_clients.insert(client); } void ClientBroker::RemoveClient(const Client *client) { m_clients.erase(client); } void ClientBroker::SendRDMRequest(const Client *client, Universe *universe, ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *callback) { if (!STLContains(m_clients, client)) { OLA_WARN << "Making an RDM call but the client doesn't exist in the " << "broker!"; } universe->SendRDMRequest( request, NewSingleCallback(this, &ClientBroker::RequestComplete, client, callback)); } void ClientBroker::RunRDMDiscovery(const Client *client, Universe *universe, bool full_discovery, ola::rdm::RDMDiscoveryCallback *callback) { if (!STLContains(m_clients, client)) { OLA_WARN << "Running RDM discovery but the client doesn't exist in the " << "broker!"; } universe->RunRDMDiscovery( NewSingleCallback(this, &ClientBroker::DiscoveryComplete, client, callback), full_discovery); } /* * Return from an RDM call. * @param key the client associated with this request * @param callback the callback to run if the key still exists * @param code the code of the RDM request * @param response the RDM response */ void ClientBroker::RequestComplete(const Client *client, ola::rdm::RDMCallback *callback, ola::rdm::RDMReply *reply) { if (!STLContains(m_clients, client)) { OLA_DEBUG << "Client no longer exists, cleaning up from RDM response"; delete callback; } else { callback->Run(reply); } } void ClientBroker::DiscoveryComplete( const Client *client, ola::rdm::RDMDiscoveryCallback *callback, const ola::rdm::UIDSet &uids) { if (!STLContains(m_clients, client)) { OLA_DEBUG << "Client no longer exists, cleaning up from RDM discovery"; delete callback; } else { callback->Run(uids); } } } // namespace ola ola-0.10.9/olad/DiscoveryAgent.cpp0000664000175000017500000000267614376533110013666 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DiscoveryAgent.cpp * The Interface for DNS-SD Registration & Discovery * Copyright (C) 2013 Simon Newton */ #include "olad/DiscoveryAgent.h" #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef HAVE_AVAHI #include "olad/AvahiDiscoveryAgent.h" #endif // HAVE_AVAHI #ifdef HAVE_DNSSD #include "olad/BonjourDiscoveryAgent.h" #endif // HAVE_DNSSD namespace ola { DiscoveryAgentInterface* DiscoveryAgentFactory::New() { // Return Avahi first, in case the Bonjour version is actually just Avahi's // compatibility layer #ifdef HAVE_AVAHI return new AvahiDiscoveryAgent(); #endif // HAVE_AVAHI #ifdef HAVE_DNSSD return new BonjourDiscoveryAgent(); #endif // HAVE_DNSSD return NULL; } } // namespace ola ola-0.10.9/olad/PluginLoader.h0000664000175000017500000000362414376533110012764 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PluginLoader.h * Interface for the PluginLoader classes * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_PLUGINLOADER_H_ #define OLAD_PLUGINLOADER_H_ #include #include "ola/base/Macro.h" namespace ola { /** * @brief The interface used to load plugins. */ class PluginLoader { public: PluginLoader() : m_plugin_adaptor(NULL) {} virtual ~PluginLoader() {} /** * @brief Set the PluginAdaptor to use for the plugins. * @param adaptor The PluginAdaptor, ownership is not transferred. */ void SetPluginAdaptor(class PluginAdaptor *adaptor) { m_plugin_adaptor = adaptor; } /** * @brief Load the plugins. * @returns A vector with a list of the plugins which were loaded. The * PluginLoader maintains ownership of each plugin. */ virtual std::vector LoadPlugins() = 0; /** * @brief Unload all previously loaded plugins. * * After this call completes, any plugins returned by LoadPlugins() must not * be used. */ virtual void UnloadPlugins() = 0; protected: class PluginAdaptor *m_plugin_adaptor; private: DISALLOW_COPY_AND_ASSIGN(PluginLoader); }; } // namespace ola #endif // OLAD_PLUGINLOADER_H_ ola-0.10.9/olad/AvahiDiscoveryAgent.h0000664000175000017500000000705414376533110014277 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * AvahiDiscoveryAgent.h * The Avahi implementation of DiscoveryAgentInterface. * Copyright (C) 2013 Simon Newton */ #ifndef OLAD_AVAHIDISCOVERYAGENT_H_ #define OLAD_AVAHIDISCOVERYAGENT_H_ #include #include #include #include #include #include #include #include #include "olad/DiscoveryAgent.h" namespace ola { /** * @brief An implementation of DiscoveryAgentInterface that uses the Avahi * client library. */ class AvahiDiscoveryAgent : public DiscoveryAgentInterface { public: AvahiDiscoveryAgent(); ~AvahiDiscoveryAgent(); bool Init(); void RegisterService(const std::string &service_name, const std::string &type, uint16_t port, const RegisterOptions &options); /** * @brief Called when the Avahi client state changes */ void ClientStateChanged(AvahiClientState state, AvahiClient *client); /** * @brief Called when an entry group state changes. */ void GroupStateChanged(const std::string &service_key, AvahiEntryGroup *group, AvahiEntryGroupState state); /** * @brief Called when the reconnect timeout expires. */ void ReconnectTimeout(); private: // The structure used to track services. struct ServiceEntry : public RegisterOptions { public: const std::string service_name; // This may differ from the service name if there was a collision. std::string actual_service_name; const uint16_t port; AvahiEntryGroup *group; AvahiEntryGroupState state; struct EntryGroupParams *params; ServiceEntry(const std::string &service_name, const std::string &type_spec, uint16_t port, const RegisterOptions &options); std::string key() const; const std::string &type() const { return m_type; } const std::vector sub_types() const { return m_sub_types; } private: std::string m_type_spec; // type[,subtype] std::string m_type; std::vector m_sub_types; }; typedef std::map Services; AvahiThreadedPoll *m_threaded_poll; AvahiClient *m_client; AvahiTimeout *m_reconnect_timeout; Services m_services; BackoffGenerator m_backoff; bool InternalRegisterService(ServiceEntry *service); void CreateNewClient(); void UpdateServices(); void DeregisterAllServices(); void SetUpReconnectTimeout(); bool RenameAndRegister(ServiceEntry *service); static std::string ClientStateToString(AvahiClientState state); static std::string GroupStateToString(AvahiEntryGroupState state); DISALLOW_COPY_AND_ASSIGN(AvahiDiscoveryAgent); }; } // namespace ola #endif // OLAD_AVAHIDISCOVERYAGENT_H_ ola-0.10.9/olad/testdata/0000775000175000017500000000000014376533267012127 500000000000000ola-0.10.9/olad/testdata/test_preferences.conf0000664000175000017500000000014314376533110016237 00000000000000# this is a comment foo = bar baz = bat # this is another comment multi = 1 multi = 2 multi = 3 ola-0.10.9/olad/DiscoveryAgent.h0000664000175000017500000000647214376533110013331 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DiscoveryAgent.h * The Interface for DNS-SD Registration & Discovery * Copyright (C) 2013 Simon Newton */ #ifndef OLAD_DISCOVERYAGENT_H_ #define OLAD_DISCOVERYAGENT_H_ #include #include #include #include namespace ola { /** * @brief The interface to DNS-SD operations like register, browse etc. */ class DiscoveryAgentInterface { public: virtual ~DiscoveryAgentInterface() {} /** * @brief Initialize the DiscoveryAgent. */ virtual bool Init() = 0; /** * @brief Options for the RegisterService method * * This controls options like the interface index, domain and TXT record * data. */ struct RegisterOptions { /** * @typedef TxtData * The data type that stores the key : values for the TXT record. */ typedef std::map TxtData; /** * @brief A constant which represents all Interfaces. */ static const int ALL_INTERFACES = 0; int if_index; /**< The interface index to register on */ /** * @brief The domain to use. * * The empty string uses the system default domain. */ std::string domain; TxtData txt_data; /**< The TXT record data. */ RegisterOptions() : if_index(ALL_INTERFACES), domain("") { } RegisterOptions(const RegisterOptions &options) : if_index(options.if_index), domain(options.domain), txt_data(options.txt_data) { } }; /** * @brief Register a service * @param service_name the name of the service * @param type the service type * @param port the port the service is on * @param options extra options that control registration. */ // TODO(simon): Think about what sort of error handling we want here virtual void RegisterService(const std::string &service_name, const std::string &type, uint16_t port, const RegisterOptions &options) = 0; }; /** * @brief A Factory which produces implementations of DiscoveryAgentInterface. * * The exact type of object returns depends on what implementation of DNS-SD was * available at build time. */ class DiscoveryAgentFactory { public: DiscoveryAgentFactory() {} /** * @brief Create a new DiscoveryAgent. * * This returns a DiscoveryAgent appropriate for the platform. It can * either be a BonjourDiscoveryAgent or a AvahiDiscoveryAgent. */ DiscoveryAgentInterface* New(); private: DISALLOW_COPY_AND_ASSIGN(DiscoveryAgentFactory); }; } // namespace ola #endif // OLAD_DISCOVERYAGENT_H_ ola-0.10.9/olad/OlaServerServiceImpl.h0000664000175000017500000002601414376533110014442 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * OlaServerServiceImpl.h * Implementation of the OlaService interface * Copyright (C) 2005 Simon Newton */ #include #include #include #include "common/protocol/Ola.pb.h" #include "common/protocol/OlaService.pb.h" #include "ola/Callback.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/RDMControllerInterface.h" #include "ola/rdm/UID.h" #include "ola/rdm/UIDSet.h" #ifndef OLAD_OLASERVERSERVICEIMPL_H_ #define OLAD_OLASERVERSERVICEIMPL_H_ namespace ola { class Universe; /** * @brief The OLA Server RPC methods. * * After the RPC system un-marshalls the data, it invokes the methods of this * class. This therefore contains all the methods a client can invoke on the * server. * * There is no client specific member data, so a single OlaServerServiceImpl * is created. Any OLA client data is passed via the user data in the * ola::rpc::RpcSession object, accessible via the ola::rpc::RpcController. */ class OlaServerServiceImpl : public ola::proto::OlaServerService { public: /** * @brief A Callback used to reload all the plugins. */ typedef Callback0 ReloadPluginsCallback; /** * @brief Create a new OlaServerServiceImpl. */ OlaServerServiceImpl(class UniverseStore *universe_store, class DeviceManager *device_manager, class PluginManager *plugin_manager, class PortManager *port_manager, class ClientBroker *broker, const class TimeStamp *wake_up_time, ReloadPluginsCallback *reload_plugins_callback); ~OlaServerServiceImpl() {} /** * @brief Returns the current DMX values for a particular universe. */ void GetDmx(ola::rpc::RpcController* controller, const ola::proto::UniverseRequest* request, ola::proto::DmxData* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Register a client to receive DMX data. */ void RegisterForDmx(ola::rpc::RpcController* controller, const ola::proto::RegisterDmxRequest* request, ola::proto::Ack* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Update the DMX values for a single universe. */ void UpdateDmxData(ola::rpc::RpcController* controller, const ola::proto::DmxData* request, ola::proto::Ack* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Handle a streaming DMX update, no response is sent. */ void StreamDmxData(ola::rpc::RpcController* controller, const ::ola::proto::DmxData* request, ::ola::proto::STREAMING_NO_RESPONSE* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Sets the name of a universe. */ void SetUniverseName(ola::rpc::RpcController* controller, const ola::proto::UniverseNameRequest* request, ola::proto::Ack* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Set the merge mode for a universe. */ void SetMergeMode(ola::rpc::RpcController* controller, const ola::proto::MergeModeRequest* request, ola::proto::Ack* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Patch a port to a universe. */ void PatchPort(ola::rpc::RpcController* controller, const ola::proto::PatchPortRequest* request, ola::proto::Ack* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Set the priority of one or more ports. */ void SetPortPriority(ola::rpc::RpcController* controller, const ola::proto::PortPriorityRequest* request, ola::proto::Ack* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Returns information on the active universes. */ void GetUniverseInfo(ola::rpc::RpcController* controller, const ola::proto::OptionalUniverseRequest* request, ola::proto::UniverseInfoReply* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Return info on available plugins. */ void GetPlugins(ola::rpc::RpcController* controller, const ola::proto::PluginListRequest* request, ola::proto::PluginListReply* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Reload the plugins. */ void ReloadPlugins(ola::rpc::RpcController* controller, const ola::proto::PluginReloadRequest* request, ola::proto::Ack* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Return the description for a plugin. */ void GetPluginDescription( ola::rpc::RpcController* controller, const ola::proto::PluginDescriptionRequest* request, ola::proto::PluginDescriptionReply* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Return the state for a plugin. */ void GetPluginState( ola::rpc::RpcController* controller, const ola::proto::PluginStateRequest* request, ola::proto::PluginStateReply* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Change the state of plugins. */ void SetPluginState( ola::rpc::RpcController* controller, const ola::proto::PluginStateChangeRequest* request, ola::proto::Ack* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Return information on available devices. */ void GetDeviceInfo(ola::rpc::RpcController* controller, const ola::proto::DeviceInfoRequest* request, ola::proto::DeviceInfoReply* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Handle a GetCandidatePorts request. */ void GetCandidatePorts(ola::rpc::RpcController* controller, const ola::proto::OptionalUniverseRequest* request, ola::proto::DeviceInfoReply* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Handle a ConfigureDevice request. */ void ConfigureDevice(ola::rpc::RpcController* controller, const ola::proto::DeviceConfigRequest* request, ola::proto::DeviceConfigReply* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Fetch the UID list for a universe. */ void GetUIDs(ola::rpc::RpcController* controller, const ola::proto::UniverseRequest* request, ola::proto::UIDListReply* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Force RDM discovery for a universe. */ void ForceDiscovery(ola::rpc::RpcController* controller, const ola::proto::DiscoveryRequest* request, ola::proto::UIDListReply* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Handle an RDM Command. */ void RDMCommand(ola::rpc::RpcController* controller, const ::ola::proto::RDMRequest* request, ola::proto::RDMResponse* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Handle an RDM Discovery Command. * * This is used by the RDM responder tests. Normally clients don't need to * send raw discovery packets and can just use the GetUIDs method. */ void RDMDiscoveryCommand(ola::rpc::RpcController* controller, const ::ola::proto::RDMDiscoveryRequest* request, ola::proto::RDMResponse* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Set this client's source UID. */ void SetSourceUID(ola::rpc::RpcController* controller, const ::ola::proto::UID* request, ola::proto::Ack* response, ola::rpc::RpcService::CompletionCallback* done); /** * @brief Send Timecode */ void SendTimeCode(ola::rpc::RpcController* controller, const ::ola::proto::TimeCode* request, ::ola::proto::Ack* response, ola::rpc::RpcService::CompletionCallback* done); private: void HandleRDMResponse(ola::proto::RDMResponse* response, ola::rpc::RpcService::CompletionCallback* done, bool include_raw_packets, ola::rdm::RDMReply *reply); void RDMDiscoveryComplete(unsigned int universe, ola::rpc::RpcService::CompletionCallback* done, ola::proto::UIDListReply *response, const ola::rdm::UIDSet &uids); void MissingUniverseError(ola::rpc::RpcController* controller); void MissingPluginError(ola::rpc::RpcController* controller); void MissingDeviceError(ola::rpc::RpcController* controller); void MissingPortError(ola::rpc::RpcController* controller); void AddPlugin(class AbstractPlugin *plugin, ola::proto::PluginInfo *plugin_info) const; void AddDevice(class AbstractDevice *device, unsigned int alias, ola::proto::DeviceInfoReply* response) const; void AddUniverse(const Universe *universe, ola::proto::UniverseInfoReply *universe_info_reply) const; template void PopulatePort(const PortClass &port, ola::proto::PortInfo *port_info) const; void SetProtoUID(const ola::rdm::UID &uid, ola::proto::UID *pb_uid); class Client* GetClient(ola::rpc::RpcController *controller); UniverseStore *m_universe_store; DeviceManager *m_device_manager; class PluginManager *m_plugin_manager; class PortManager *m_port_manager; class ClientBroker *m_broker; const class TimeStamp *m_wake_up_time; std::auto_ptr m_reload_plugins_callback; }; } // namespace ola #endif // OLAD_OLASERVERSERVICEIMPL_H_ ola-0.10.9/olad/OlaServerServiceImplTest.cpp0000664000175000017500000004125014376533110015634 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * OlaServerServiceImplTest.cpp * Test fixture for the OlaServerServiceImpl class * Copyright (C) 2005 Simon Newton * * How this file is organized: * We test each rpc method in OlaServerServiceImpl, for each method, we have a * series of Check objects which validate the rpc response. */ #include #include #include "common/rpc/RpcController.h" #include "common/rpc/RpcSession.h" #include "ola/Callback.h" #include "ola/Clock.h" #include "ola/Constants.h" #include "ola/DmxBuffer.h" #include "ola/ExportMap.h" #include "ola/Logging.h" #include "ola/rdm/UID.h" #include "ola/testing/TestUtils.h" #include "olad/OlaServerServiceImpl.h" #include "olad/PluginLoader.h" #include "olad/Universe.h" #include "olad/plugin_api/Client.h" #include "olad/plugin_api/DeviceManager.h" #include "olad/plugin_api/UniverseStore.h" using ola::Client; using ola::NewSingleCallback; using ola::SingleUseCallback0; using ola::DmxBuffer; using ola::OlaServerServiceImpl; using ola::Universe; using ola::UniverseStore; using ola::rpc::RpcController; using ola::rpc::RpcSession; using std::string; class OlaServerServiceImplTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(OlaServerServiceImplTest); CPPUNIT_TEST(testGetDmx); CPPUNIT_TEST(testRegisterForDmx); CPPUNIT_TEST(testUpdateDmxData); CPPUNIT_TEST(testSetUniverseName); CPPUNIT_TEST(testSetMergeMode); CPPUNIT_TEST_SUITE_END(); public: OlaServerServiceImplTest(): m_uid(ola::OPEN_LIGHTING_ESTA_CODE, 0) { } void setUp() { ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); } void testGetDmx(); void testRegisterForDmx(); void testUpdateDmxData(); void testSetUniverseName(); void testSetMergeMode(); private: ola::rdm::UID m_uid; ola::Clock m_clock; void CallGetDmx(OlaServerServiceImpl *service, int universe_id, class GetDmxCheck *check); void CallRegisterForDmx(OlaServerServiceImpl *service, int universe_id, ola::proto::RegisterAction action, class RegisterForDmxCheck *check); void CallUpdateDmxData(OlaServerServiceImpl *service, Client *client, int universe_id, const DmxBuffer &data, class UpdateDmxDataCheck *check); void CallSetUniverseName(OlaServerServiceImpl *service, int universe_id, const string &name, class SetUniverseNameCheck *check); void CallSetMergeMode(OlaServerServiceImpl *service, int universe_id, ola::proto::MergeMode merge_mode, class SetMergeModeCheck *check); }; CPPUNIT_TEST_SUITE_REGISTRATION(OlaServerServiceImplTest); static const uint8_t SAMPLE_DMX_DATA[] = {1, 2, 3, 4, 5}; /* * The GetDmx Checks */ class GetDmxCheck { public: virtual ~GetDmxCheck() {} virtual void Check(RpcController *controller, ola::proto::DmxData *reply) = 0; }; /* * Assert that the data is all 0 */ class GetDmxNoDataCheck: public GetDmxCheck { public: void Check(RpcController *controller, ola::proto::DmxData *reply) { DmxBuffer empty_buffer; OLA_ASSERT_FALSE(controller->Failed()); OLA_ASSERT_EQ(empty_buffer, DmxBuffer(reply->data())); } }; /* * Assert that the data matches the test data. */ class GetDmxValidDataCheck: public GetDmxCheck { public: void Check(RpcController *controller, ola::proto::DmxData *reply) { OLA_ASSERT_FALSE(controller->Failed()); OLA_ASSERT_EQ( DmxBuffer(SAMPLE_DMX_DATA, sizeof(SAMPLE_DMX_DATA)), DmxBuffer(reply->data())); } }; /* * RegisterForDmxChecks */ class RegisterForDmxCheck { public: virtual ~RegisterForDmxCheck() {} virtual void Check(RpcController *controller, ola::proto::Ack *reply) = 0; }; /* * UpdateDmxDataCheck */ class UpdateDmxDataCheck { public: virtual ~UpdateDmxDataCheck() {} virtual void Check(RpcController *controller, ola::proto::Ack *reply) = 0; }; /* * SetUniverseNameCheck */ class SetUniverseNameCheck { public: virtual ~SetUniverseNameCheck() {} virtual void Check(RpcController *controller, ola::proto::Ack *reply) = 0; }; /* * SetMergeModeCheck */ class SetMergeModeCheck { public: virtual ~SetMergeModeCheck() {} virtual void Check(RpcController *controller, ola::proto::Ack *reply) = 0; }; /* * Assert that we got a missing universe error */ template class GenericMissingUniverseCheck: public parent { public: void Check(RpcController *controller, OLA_UNUSED reply *r) { OLA_ASSERT(controller->Failed()); OLA_ASSERT_EQ(string("Universe doesn't exist"), controller->ErrorText()); } }; /* * Assert that we got an ack */ template class GenericAckCheck: public parent { public: void Check(RpcController *controller, OLA_UNUSED ola::proto::Ack *r) { OLA_ASSERT_FALSE(controller->Failed()); } }; /* * Check that the GetDmx method works */ void OlaServerServiceImplTest::testGetDmx() { UniverseStore store(NULL, NULL); OlaServerServiceImpl service(&store, NULL, NULL, NULL, NULL, NULL, NULL); GenericMissingUniverseCheck missing_universe_check; GetDmxNoDataCheck empty_data_check; GetDmxValidDataCheck valid_data_check; // test a universe that doesn't exist unsigned int universe_id = 0; CallGetDmx(&service, universe_id, &missing_universe_check); // test a new universe Universe *universe = store.GetUniverseOrCreate(universe_id); OLA_ASSERT_NOT_NULL(universe); CallGetDmx(&service, universe_id, &empty_data_check); // Set the universe data DmxBuffer buffer(SAMPLE_DMX_DATA, sizeof(SAMPLE_DMX_DATA)); universe->SetDMX(buffer); CallGetDmx(&service, universe_id, &valid_data_check); // remove the universe and try again store.AddUniverseGarbageCollection(universe); store.GarbageCollectUniverses(); CallGetDmx(&service, universe_id, &missing_universe_check); } /* * Call the GetDmx method * @param impl the OlaServerServiceImpl to use * @param universe_id the universe_id in the request * @param check the GetDmxCheck class to use for the callback check */ void OlaServerServiceImplTest::CallGetDmx(OlaServerServiceImpl *service, int universe_id, GetDmxCheck *check) { RpcSession session(NULL); RpcController controller(&session); ola::proto::UniverseRequest request; ola::proto::DmxData response; SingleUseCallback0 *closure = NewSingleCallback( check, &GetDmxCheck::Check, &controller, &response); request.set_universe(universe_id); service->GetDmx(&controller, &request, &response, closure); } /* * Check the RegisterForDmx method works */ void OlaServerServiceImplTest::testRegisterForDmx() { UniverseStore store(NULL, NULL); OlaServerServiceImpl service(&store, NULL, NULL, NULL, NULL, NULL, NULL); // Register for a universe that doesn't exist unsigned int universe_id = 0; unsigned int second_universe_id = 99; GenericAckCheck ack_check; CallRegisterForDmx(&service, universe_id, ola::proto::REGISTER, &ack_check); // The universe should exist now and the client should be bound Universe *universe = store.GetUniverse(universe_id); OLA_ASSERT_NOT_NULL(universe); OLA_ASSERT(universe->ContainsSinkClient(NULL)); OLA_ASSERT_EQ((unsigned int) 1, universe->SinkClientCount()); // Try to register again CallRegisterForDmx(&service, universe_id, ola::proto::REGISTER, &ack_check); OLA_ASSERT(universe->ContainsSinkClient(NULL)); OLA_ASSERT_EQ((unsigned int) 1, universe->SinkClientCount()); // Register a second universe CallRegisterForDmx(&service, second_universe_id, ola::proto::REGISTER, &ack_check); Universe *second_universe = store.GetUniverse(universe_id); OLA_ASSERT(second_universe->ContainsSinkClient(NULL)); OLA_ASSERT_EQ((unsigned int) 1, second_universe->SinkClientCount()); // Unregister the first universe CallRegisterForDmx(&service, universe_id, ola::proto::UNREGISTER, &ack_check); OLA_ASSERT_FALSE(universe->ContainsSinkClient(NULL)); OLA_ASSERT_EQ((unsigned int) 0, universe->SinkClientCount()); // Unregister the second universe CallRegisterForDmx(&service, second_universe_id, ola::proto::UNREGISTER, &ack_check); OLA_ASSERT_FALSE(second_universe->ContainsSinkClient(NULL)); OLA_ASSERT_EQ((unsigned int) 0, second_universe->SinkClientCount()); // Unregister again CallRegisterForDmx(&service, universe_id, ola::proto::UNREGISTER, &ack_check); OLA_ASSERT_FALSE(universe->ContainsSinkClient(NULL)); OLA_ASSERT_EQ((unsigned int) 0, universe->SinkClientCount()); } /* * Call the RegisterForDmx method * @param impl the OlaServerServiceImpl to use * @param universe_id the universe_id in the request * @param action the action to use REGISTER or UNREGISTER * @param check the RegisterForDmxCheck to use for the callback check */ void OlaServerServiceImplTest::CallRegisterForDmx( OlaServerServiceImpl *service, int universe_id, ola::proto::RegisterAction action, RegisterForDmxCheck *check) { RpcSession session(NULL); RpcController controller(&session); ola::proto::RegisterDmxRequest request; ola::proto::Ack response; SingleUseCallback0 *closure = NewSingleCallback( check, &RegisterForDmxCheck::Check, &controller, &response); request.set_universe(universe_id); request.set_action(action); service->RegisterForDmx(&controller, &request, &response, closure); } /* * Check the UpdateDmxData method works */ void OlaServerServiceImplTest::testUpdateDmxData() { UniverseStore store(NULL, NULL); ola::TimeStamp time1; ola::Client client1(NULL, m_uid); ola::Client client2(NULL, m_uid); OlaServerServiceImpl service(&store, NULL, NULL, NULL, NULL, &time1, NULL); GenericMissingUniverseCheck missing_universe_check; GenericAckCheck ack_check; unsigned int universe_id = 0; DmxBuffer dmx_data("this is a test"); DmxBuffer dmx_data2("different data hmm"); // Update a universe that doesn't exist m_clock.CurrentMonotonicTime(&time1); CallUpdateDmxData(&service, &client1, universe_id, dmx_data, &missing_universe_check); Universe *universe = store.GetUniverse(universe_id); OLA_ASSERT_FALSE(universe); // Update a universe that exists m_clock.CurrentMonotonicTime(&time1); universe = store.GetUniverseOrCreate(universe_id); CallUpdateDmxData(&service, &client1, universe_id, dmx_data, &ack_check); OLA_ASSERT_EQ(dmx_data, universe->GetDMX()); // Update a second client with an older timestamp // make sure we're in ltp mode OLA_ASSERT_EQ(universe->MergeMode(), Universe::MERGE_LTP); time1 = time1 - ola::TimeInterval(1000000); CallUpdateDmxData(&service, &client2, universe_id, dmx_data2, &ack_check); OLA_ASSERT_EQ(dmx_data.Size(), universe->GetDMX().Size()); // Should continue to hold the old data OLA_ASSERT_EQ(dmx_data, universe->GetDMX()); // Now send a new update m_clock.CurrentMonotonicTime(&time1); CallUpdateDmxData(&service, &client2, universe_id, dmx_data2, &ack_check); OLA_ASSERT_EQ(dmx_data2, universe->GetDMX()); } /* * Call the UpdateDmxDataCheck method * @param impl the OlaServerServiceImpl to use * @param universe_id the universe_id in the request * @param data the DmxBuffer to use as data * @param check the SetUniverseNameCheck to use for the callback check */ void OlaServerServiceImplTest::CallUpdateDmxData( OlaServerServiceImpl *service, Client *client, int universe_id, const DmxBuffer &data, UpdateDmxDataCheck *check) { RpcSession session(NULL); session.SetData(client); RpcController controller(&session); ola::proto::DmxData request; ola::proto::Ack response; SingleUseCallback0 *closure = NewSingleCallback( check, &UpdateDmxDataCheck::Check, &controller, &response); request.set_universe(universe_id); request.set_data(data.Get()); service->UpdateDmxData(&controller, &request, &response, closure); } /* * Check the SetUniverseName method works */ void OlaServerServiceImplTest::testSetUniverseName() { UniverseStore store(NULL, NULL); OlaServerServiceImpl service(&store, NULL, NULL, NULL, NULL, NULL, NULL); unsigned int universe_id = 0; string universe_name = "test 1"; string universe_name2 = "test 1-2"; GenericAckCheck ack_check; GenericMissingUniverseCheck missing_universe_check; // Check we get an error for a missing universe CallSetUniverseName(&service, universe_id, universe_name, &missing_universe_check); Universe *universe = store.GetUniverse(universe_id); OLA_ASSERT_FALSE(universe); // Check SetUniverseName works on an existing universe universe = store.GetUniverseOrCreate(universe_id); CallSetUniverseName(&service, universe_id, universe_name, &ack_check); OLA_ASSERT_EQ(universe_name, universe->Name()); // Run it again with a new name CallSetUniverseName(&service, universe_id, universe_name2, &ack_check); OLA_ASSERT_EQ(universe_name2, universe->Name()); } /* * Call the SetUniverseName method * @param impl the OlaServerServiceImpl to use * @param universe_id the universe_id in the request * @param name the name to use * @param check the SetUniverseNameCheck to use for the callback check */ void OlaServerServiceImplTest::CallSetUniverseName( OlaServerServiceImpl *service, int universe_id, const string &name, SetUniverseNameCheck *check) { RpcSession session(NULL); RpcController controller(&session); ola::proto::UniverseNameRequest request; ola::proto::Ack response; SingleUseCallback0 *closure = NewSingleCallback( check, &SetUniverseNameCheck::Check, &controller, &response); request.set_universe(universe_id); request.set_name(name); service->SetUniverseName(&controller, &request, &response, closure); } /* * Check the SetMergeMode method works */ void OlaServerServiceImplTest::testSetMergeMode() { UniverseStore store(NULL, NULL); OlaServerServiceImpl service(&store, NULL, NULL, NULL, NULL, NULL, NULL); unsigned int universe_id = 0; GenericAckCheck ack_check; GenericMissingUniverseCheck missing_universe_check; // Check we get an error for a missing universe CallSetMergeMode(&service, universe_id, ola::proto::HTP, &missing_universe_check); Universe *universe = store.GetUniverse(universe_id); OLA_ASSERT_FALSE(universe); // Check SetUniverseName works universe = store.GetUniverseOrCreate(universe_id); CallSetMergeMode(&service, universe_id, ola::proto::HTP, &ack_check); OLA_ASSERT_EQ(Universe::MERGE_HTP, universe->MergeMode()); // Run it again CallSetMergeMode(&service, universe_id, ola::proto::LTP, &ack_check); OLA_ASSERT_EQ(Universe::MERGE_LTP, universe->MergeMode()); } /* * Call the SetMergeMode method * @param impl the OlaServerServiceImpl to use * @param universe_id the universe_id in the request * @param mode the merge_mode to use * @param check the SetMergeModeCheck to use for the callback check */ void OlaServerServiceImplTest::CallSetMergeMode( OlaServerServiceImpl *service, int universe_id, ola::proto::MergeMode merge_mode, SetMergeModeCheck *check) { RpcSession session(NULL); RpcController controller(&session); ola::proto::MergeModeRequest request; ola::proto::Ack response; ola::SingleUseCallback0 *closure = NewSingleCallback( check, &SetMergeModeCheck::Check, &controller, &response); request.set_universe(universe_id); request.set_merge_mode(merge_mode); service->SetMergeMode(&controller, &request, &response, closure); } ola-0.10.9/olad/BonjourDiscoveryAgent.cpp0000664000175000017500000001262414376533110015217 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * BonjourDiscoveryAgent.cpp * The Bonjour implementation of DiscoveryAgentInterface. * Copyright (C) 2013 Simon Newton */ #define __STDC_LIMIT_MACROS // for UINT8_MAX & friends #include "olad/BonjourDiscoveryAgent.h" #include #include #include #include #include #include #include namespace ola { using ola::network::HostToNetwork; using ola::thread::Thread; using std::auto_ptr; using std::string; static void RegisterCallback(OLA_UNUSED DNSServiceRef service, OLA_UNUSED DNSServiceFlags flags, DNSServiceErrorType error_code, const char *name, const char *type, const char *domain, OLA_UNUSED void *context) { if (error_code != kDNSServiceErr_NoError) { OLA_WARN << "DNSServiceRegister for " << name << "." << type << domain << " returned error " << error_code; } else { OLA_INFO << "Registered: " << name << "." << type << domain; } } class DNSSDDescriptor : public ola::io::ReadFileDescriptor { public: explicit DNSSDDescriptor(DNSServiceRef service_ref) : m_service_ref(service_ref) { } int ReadDescriptor() const { return DNSServiceRefSockFD(m_service_ref); } void PerformRead(); private: DNSServiceRef m_service_ref; }; void DNSSDDescriptor::PerformRead() { DNSServiceErrorType error = DNSServiceProcessResult(m_service_ref); if (error != kDNSServiceErr_NoError) { // TODO(simon): Consider de-registering from the ss here? OLA_FATAL << "DNSServiceProcessResult returned " << error; } } BonjourDiscoveryAgent::RegisterArgs::RegisterArgs( const string &service_name, const string &type, uint16_t port, const RegisterOptions &options) : RegisterOptions(options), service_name(service_name), type(type), port(port) { } BonjourDiscoveryAgent::BonjourDiscoveryAgent() : m_thread(new ola::thread::CallbackThread( NewSingleCallback(this, &BonjourDiscoveryAgent::RunThread), Thread::Options("bonjour"))) { } BonjourDiscoveryAgent::~BonjourDiscoveryAgent() { m_ss.Terminate(); m_thread->Join(); m_thread.reset(); ServiceRefs::iterator iter = m_refs.begin(); for (; iter != m_refs.end(); ++iter) { m_ss.RemoveReadDescriptor(iter->descriptor); delete iter->descriptor; DNSServiceRefDeallocate(iter->service_ref); } } bool BonjourDiscoveryAgent::Init() { m_thread->Start(); return true; } void BonjourDiscoveryAgent::RegisterService(const string &service_name, const string &type, uint16_t port, const RegisterOptions &options) { RegisterArgs *args = new RegisterArgs(service_name, type, port, options); m_ss.Execute(NewSingleCallback( this, &BonjourDiscoveryAgent::InternalRegisterService, args)); } void BonjourDiscoveryAgent::InternalRegisterService(RegisterArgs *args_ptr) { auto_ptr args(args_ptr); OLA_INFO << "Adding " << args->service_name << ", " << args->type; ServiceRef ref; const string txt_data = BuildTxtRecord(args->txt_data); DNSServiceErrorType error = DNSServiceRegister( &ref.service_ref, 0, args->if_index, args->service_name.c_str(), args->type.c_str(), args->domain.c_str(), NULL, // use default host name HostToNetwork(args->port), txt_data.size(), txt_data.c_str(), &RegisterCallback, // call back function NULL); // no context if (error != kDNSServiceErr_NoError) { OLA_WARN << "DNSServiceRegister returned " << error; return; } ref.descriptor = new DNSSDDescriptor(ref.service_ref); m_ss.AddReadDescriptor(ref.descriptor); m_refs.push_back(ref); } string BonjourDiscoveryAgent::BuildTxtRecord( const RegisterOptions::TxtData &txt_data) { RegisterOptions::TxtData::const_iterator iter = txt_data.begin(); string output; for (; iter != txt_data.end(); ++iter) { unsigned int pair_size = iter->first.size() + iter->second.size() + 1; if (pair_size > UINT8_MAX) { OLA_WARN << "Discovery data of " << iter->first << ": " << iter->second << " exceed " << static_cast(UINT8_MAX) << " bytes. Data skipped"; continue; } output.append(1, static_cast(pair_size)); output.append(iter->first); output.append("="); output.append(iter->second); } return output; } void BonjourDiscoveryAgent::RunThread() { m_ss.Run(); m_ss.DrainCallbacks(); } } // namespace ola ola-0.10.9/olad/AvahiDiscoveryAgent.cpp0000664000175000017500000003452214376533110014632 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * AvahiDiscoveryAgent.cpp * The Avahi implementation of DiscoveryAgentInterface. * Copyright (C) 2013 Simon Newton */ #include "olad/AvahiDiscoveryAgent.h" #include #include #include #include #include #include #include #include #include #include "ola/Clock.h" #include "ola/Logging.h" #include "ola/stl/STLUtils.h" #include "ola/StringUtils.h" namespace ola { using std::string; using std::vector; static std::string MakeServiceKey(const std::string &service_name, const std::string &type) { return service_name + "." + type; } /* * The userdata passed to the entry_callback function. */ struct EntryGroupParams { AvahiDiscoveryAgent *agent; string key; EntryGroupParams(AvahiDiscoveryAgent *agent, const string &key) : agent(agent), key(key) { } }; namespace { /* * Called when the client state changes. This is called once from * the thread that calls avahi_client_new, and then from the poll thread. */ static void client_callback(AvahiClient *client, AvahiClientState state, void *data) { AvahiDiscoveryAgent *agent = reinterpret_cast(data); agent->ClientStateChanged(state, client); } /* * Called when the group state changes. */ static void entry_callback(AvahiEntryGroup *group, AvahiEntryGroupState state, void *data) { if (!group) { return; } const EntryGroupParams *params = reinterpret_cast( data); if (!params) { OLA_FATAL << "entry_callback passed null userdata!"; return; } params->agent->GroupStateChanged(params->key, group, state); } static void reconnect_callback(AvahiTimeout*, void *data) { AvahiDiscoveryAgent *agent = reinterpret_cast(data); agent->ReconnectTimeout(); } } // namespace AvahiDiscoveryAgent::ServiceEntry::ServiceEntry( const std::string &service_name, const std::string &type_spec, uint16_t port, const RegisterOptions &options) : RegisterOptions(options), service_name(service_name), actual_service_name(service_name), port(port), group(NULL), state(AVAHI_ENTRY_GROUP_UNCOMMITED), params(NULL), m_type_spec(type_spec) { vector tokens; StringSplit(type_spec, &tokens, ","); m_type = tokens[0]; if (tokens.size() > 1) { copy(tokens.begin() + 1, tokens.end(), std::back_inserter(m_sub_types)); } } string AvahiDiscoveryAgent::ServiceEntry::key() const { return MakeServiceKey(actual_service_name, m_type_spec); } AvahiDiscoveryAgent::AvahiDiscoveryAgent() : m_threaded_poll(avahi_threaded_poll_new()), m_client(NULL), m_reconnect_timeout(NULL), m_backoff(new ExponentialBackoffPolicy(TimeInterval(1, 0), TimeInterval(60, 0))) { } AvahiDiscoveryAgent::~AvahiDiscoveryAgent() { avahi_threaded_poll_stop(m_threaded_poll); if (m_reconnect_timeout) { avahi_threaded_poll_get(m_threaded_poll)->timeout_free( m_reconnect_timeout); } DeregisterAllServices(); STLDeleteValues(&m_services); if (m_client) { avahi_client_free(m_client); } avahi_threaded_poll_free(m_threaded_poll); } bool AvahiDiscoveryAgent::Init() { CreateNewClient(); if (m_threaded_poll) { avahi_threaded_poll_start(m_threaded_poll); return true; } else { return false; } } void AvahiDiscoveryAgent::RegisterService(const string &service_name, const string &type, uint16_t port, const RegisterOptions &options) { if (!(m_threaded_poll && m_client)) { return; } const string key = MakeServiceKey(service_name, type); avahi_threaded_poll_lock(m_threaded_poll); ServiceEntry *service = STLFindOrNull(m_services, key); if (service) { OLA_WARN << "Service " << key << " is already registered"; avahi_threaded_poll_unlock(m_threaded_poll); return; } else { service = new ServiceEntry(service_name, type, port, options); STLInsertIfNotPresent(&m_services, key, service); } // If we're not running, then we'll register the service when the client // transitions to the running state. Otherwise register it now. if (m_client && avahi_client_get_state(m_client) == AVAHI_CLIENT_S_RUNNING) { InternalRegisterService(service); } avahi_threaded_poll_unlock(m_threaded_poll); } /* * This is a bit tricky because it can be called from either the main thread on * startup or from the poll thread. */ void AvahiDiscoveryAgent::ClientStateChanged(AvahiClientState state, AvahiClient *client) { // The first time this is called is from the avahi_client_new context. In // that case m_client is still null so we set it here. if (!m_client) { m_client = client; } OLA_INFO << "Client state changed to " << ClientStateToString(state); switch (state) { case AVAHI_CLIENT_S_RUNNING: // The server has startup successfully and registered its host // name on the network, so it's time to create our services. // register_stuff UpdateServices(); break; case AVAHI_CLIENT_FAILURE: DeregisterAllServices(); SetUpReconnectTimeout(); break; case AVAHI_CLIENT_S_COLLISION: // There was a hostname collision on the network. // Let's drop our registered services. When the server is back // in AVAHI_SERVER_RUNNING state we will register them again with the // new host name. DeregisterAllServices(); break; case AVAHI_CLIENT_S_REGISTERING: // The server records are now being established. This // might be caused by a host name change. We need to wait // for our own records to register until the host name is // properly established. DeregisterAllServices(); break; case AVAHI_CLIENT_CONNECTING: break; } } void AvahiDiscoveryAgent::GroupStateChanged(const string &service_key, AvahiEntryGroup *group, AvahiEntryGroupState state) { OLA_INFO << "State for " << service_key << ", group " << group << " changed to " << GroupStateToString(state); ServiceEntry *service = STLFindOrNull(m_services, service_key); if (!service) { OLA_WARN << "Unknown service " << service_key << " changed to state " << state; return; } if (service->group != group) { if (service->group) { OLA_WARN << "Service group for " << service_key << " : " << service->group << " does not match callback group " << group; } return; } service->state = state; switch (state) { case AVAHI_ENTRY_GROUP_ESTABLISHED: break; case AVAHI_ENTRY_GROUP_COLLISION: RenameAndRegister(service); break; case AVAHI_ENTRY_GROUP_FAILURE: OLA_WARN << "Failed to register " << service_key << ": " << avahi_strerror(avahi_client_errno(m_client)); break; case AVAHI_ENTRY_GROUP_UNCOMMITED: case AVAHI_ENTRY_GROUP_REGISTERING: break; } } void AvahiDiscoveryAgent::ReconnectTimeout() { if (m_client) { avahi_client_free(m_client); m_client = NULL; } CreateNewClient(); } bool AvahiDiscoveryAgent::InternalRegisterService(ServiceEntry *service) { if (!service->params) { service->params = new EntryGroupParams(this, service->key()); } if (!service->group) { service->group = avahi_entry_group_new(m_client, entry_callback, service->params); if (!service->group) { OLA_WARN << "avahi_entry_group_new() failed: " << avahi_client_errno(m_client); return false; } } if (!avahi_entry_group_is_empty(service->group)) { OLA_INFO << "Service group was not empty!"; return false; } AvahiStringList *txt_args = NULL; RegisterOptions::TxtData::const_iterator iter = service->txt_data.begin(); for (; iter != service->txt_data.end(); ++iter) { txt_args = avahi_string_list_add_pair( txt_args, iter->first.c_str(), iter->second.c_str()); } // Populate the entry group int r = avahi_entry_group_add_service_strlst( service->group, service->if_index > 0 ? service->if_index : AVAHI_IF_UNSPEC, AVAHI_PROTO_INET, static_cast(0), service->actual_service_name.c_str(), service->type().c_str(), NULL, NULL, service->port, txt_args); avahi_string_list_free(txt_args); if (r) { if (r == AVAHI_ERR_COLLISION) { OLA_WARN << "Collision with local service!"; return RenameAndRegister(service); } OLA_WARN << "avahi_entry_group_add_service failed: " << avahi_strerror(r); avahi_entry_group_reset(service->group); return false; } // Add any subtypes const vector &sub_types = service->sub_types(); if (!sub_types.empty()) { vector::const_iterator iter = sub_types.begin(); for (; iter != sub_types.end(); ++iter) { const string sub_type = *iter + "._sub." + service->type(); OLA_INFO << "Adding " << sub_type; r = avahi_entry_group_add_service_subtype( service->group, service->if_index > 0 ? service->if_index : AVAHI_IF_UNSPEC, AVAHI_PROTO_INET, static_cast(0), service->actual_service_name.c_str(), service->type().c_str(), NULL, sub_type.c_str()); if (r) { OLA_WARN << "Failed to add " << sub_type << ": " << avahi_strerror(r); } } } r = avahi_entry_group_commit(service->group); if (r) { avahi_entry_group_reset(service->group); OLA_WARN << "avahi_entry_group_commit failed: " << avahi_strerror(r); return false; } return true; } void AvahiDiscoveryAgent::CreateNewClient() { if (m_client) { OLA_WARN << "CreateNewClient called but m_client is not NULL"; return; } if (m_threaded_poll) { int error; // In the successful case, m_client is set in the ClientStateChanged method m_client = avahi_client_new(avahi_threaded_poll_get(m_threaded_poll), AVAHI_CLIENT_NO_FAIL, client_callback, this, &error); if (m_client) { m_backoff.Reset(); } else { OLA_WARN << "Failed to create Avahi client: " << avahi_strerror(error); SetUpReconnectTimeout(); } } } void AvahiDiscoveryAgent::UpdateServices() { Services::iterator iter = m_services.begin(); for (; iter != m_services.end(); ++iter) { if (iter->second->state == AVAHI_ENTRY_GROUP_UNCOMMITED) { InternalRegisterService(iter->second); } } } /** * De-register all services and clean up the AvahiEntryGroup and * EntryGroupParams data. */ void AvahiDiscoveryAgent::DeregisterAllServices() { Services::iterator iter = m_services.begin(); for (; iter != m_services.end(); ++iter) { AvahiEntryGroup *group = iter->second->group; if (group) { avahi_entry_group_reset(group); avahi_entry_group_free(group); iter->second->group = NULL; } if (iter->second->params) { delete iter->second->params; iter->second->params = NULL; } iter->second->state = AVAHI_ENTRY_GROUP_UNCOMMITED; } } void AvahiDiscoveryAgent::SetUpReconnectTimeout() { // We don't strictly need an ExponentialBackoffPolicy here because the client // goes into the AVAHI_CLIENT_CONNECTING state if the server isn't running. // Still, it's a useful defense against spinning rapidly if something goes // wrong. TimeInterval delay = m_backoff.Next(); OLA_INFO << "Re-creating avahi client in " << delay << "s"; struct timeval tv; delay.AsTimeval(&tv); const AvahiPoll *poll = avahi_threaded_poll_get(m_threaded_poll); if (m_reconnect_timeout) { poll->timeout_update(m_reconnect_timeout, &tv); } else { m_reconnect_timeout = poll->timeout_new( avahi_threaded_poll_get(m_threaded_poll), &tv, reconnect_callback, this); } } bool AvahiDiscoveryAgent::RenameAndRegister(ServiceEntry *service) { char *new_name_str = avahi_alternative_service_name(service->actual_service_name.c_str()); string new_name(new_name_str); avahi_free(new_name_str); OLA_WARN << "Service name collision for " << service->actual_service_name << " renaming to " << new_name; service->actual_service_name = new_name; return InternalRegisterService(service); } string AvahiDiscoveryAgent::ClientStateToString(AvahiClientState state) { switch (state) { case AVAHI_CLIENT_S_REGISTERING: return "AVAHI_CLIENT_S_REGISTERING"; case AVAHI_CLIENT_S_RUNNING: return "AVAHI_CLIENT_S_RUNNING"; case AVAHI_CLIENT_S_COLLISION: return "AVAHI_CLIENT_S_COLLISION"; case AVAHI_CLIENT_FAILURE: return "AVAHI_CLIENT_FAILURE"; case AVAHI_CLIENT_CONNECTING: return "AVAHI_CLIENT_CONNECTING"; default: return "Unknown state"; } } string AvahiDiscoveryAgent::GroupStateToString(AvahiEntryGroupState state) { switch (state) { case AVAHI_ENTRY_GROUP_UNCOMMITED: return "AVAHI_ENTRY_GROUP_UNCOMMITED"; case AVAHI_ENTRY_GROUP_REGISTERING: return "AVAHI_ENTRY_GROUP_REGISTERING"; case AVAHI_ENTRY_GROUP_ESTABLISHED: return "AVAHI_ENTRY_GROUP_ESTABLISHED"; case AVAHI_ENTRY_GROUP_COLLISION: return "AVAHI_ENTRY_GROUP_COLLISION"; case AVAHI_ENTRY_GROUP_FAILURE: return "AVAHI_ENTRY_GROUP_FAILURE"; default: return "Unknown state"; } } } // namespace ola ola-0.10.9/olad/PluginManager.cpp0000664000175000017500000001607514376533110013467 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PluginManager.cpp * This class is responsible for loading and unloading the plugins * Copyright (C) 2005 Simon Newton */ #include "olad/PluginManager.h" #include #include #include "ola/Logging.h" #include "ola/stl/STLUtils.h" #include "olad/Plugin.h" #include "olad/PluginAdaptor.h" #include "olad/PluginLoader.h" namespace ola { using std::vector; using std::set; PluginManager::PluginManager(const vector &plugin_loaders, class PluginAdaptor *plugin_adaptor) : m_plugin_loaders(plugin_loaders), m_plugin_adaptor(plugin_adaptor) { } PluginManager::~PluginManager() { UnloadAll(); } void PluginManager::LoadAll() { m_enabled_plugins.clear(); // The first pass populates the m_plugin map, and builds a list of enabled // plugins. vector::iterator iter; for (iter = m_plugin_loaders.begin(); iter != m_plugin_loaders.end(); ++iter) { (*iter)->SetPluginAdaptor(m_plugin_adaptor); vector plugins = (*iter)->LoadPlugins(); vector::iterator plugin_iter = plugins.begin(); for (; plugin_iter != plugins.end(); ++plugin_iter) { AbstractPlugin *plugin = *plugin_iter; if (!STLInsertIfNotPresent(&m_loaded_plugins, plugin->Id(), plugin)) { OLA_WARN << "Skipping plugin " << plugin->Name() << " because it's already been loaded"; delete plugin; continue; } if (!plugin->LoadPreferences()) { OLA_WARN << "Failed to load preferences for " << plugin->Name(); continue; } if (!plugin->IsEnabled()) { OLA_INFO << "Skipping " << plugin->Name() << " because it was disabled"; continue; } STLInsertIfNotPresent(&m_enabled_plugins, plugin->Id(), plugin); } } // The second pass checks for conflicts and starts each plugin PluginMap::iterator plugin_iter = m_enabled_plugins.begin(); for (; plugin_iter != m_enabled_plugins.end(); ++plugin_iter) { StartIfSafe(plugin_iter->second); } } void PluginManager::UnloadAll() { PluginMap::iterator plugin_iter = m_loaded_plugins.begin(); for (; plugin_iter != m_loaded_plugins.end(); ++plugin_iter) { plugin_iter->second->Stop(); } m_loaded_plugins.clear(); m_active_plugins.clear(); m_enabled_plugins.clear(); vector::iterator iter = m_plugin_loaders.begin(); for (; iter != m_plugin_loaders.end(); ++iter) { (*iter)->SetPluginAdaptor(NULL); (*iter)->UnloadPlugins(); } } void PluginManager::Plugins(vector *plugins) const { plugins->clear(); STLValues(m_loaded_plugins, plugins); } void PluginManager::ActivePlugins(vector *plugins) const { plugins->clear(); STLValues(m_active_plugins, plugins); } void PluginManager::EnabledPlugins(vector *plugins) const { plugins->clear(); STLValues(m_enabled_plugins, plugins); } AbstractPlugin* PluginManager::GetPlugin(ola_plugin_id plugin_id) const { return STLFindOrNull(m_loaded_plugins, plugin_id); } bool PluginManager::IsActive(ola_plugin_id plugin_id) const { return STLContains(m_active_plugins, plugin_id); } bool PluginManager::IsEnabled(ola_plugin_id plugin_id) const { return STLContains(m_enabled_plugins, plugin_id); } void PluginManager::DisableAndStopPlugin(ola_plugin_id plugin_id) { AbstractPlugin *plugin = STLFindOrNull(m_loaded_plugins, plugin_id); if (!plugin_id) { return; } if (STLRemove(&m_active_plugins, plugin_id)) { plugin->Stop(); } if (STLRemove(&m_enabled_plugins, plugin_id)) { plugin->SetEnabledState(false); } } bool PluginManager::EnableAndStartPlugin(ola_plugin_id plugin_id) { if (STLContains(m_active_plugins, plugin_id)) { // Already running, nothing to do. return true; } AbstractPlugin *plugin = STLFindOrNull(m_loaded_plugins, plugin_id); if (!plugin) { return false; } if (STLInsertIfNotPresent(&m_enabled_plugins, plugin_id, plugin)) { plugin->SetEnabledState(true); } return StartIfSafe(plugin); } void PluginManager::GetConflictList(ola_plugin_id plugin_id, vector *plugins) { PluginMap::iterator iter = m_loaded_plugins.begin(); for (; iter != m_loaded_plugins.end(); ++iter) { set conflict_list; iter->second->ConflictsWith(&conflict_list); if (iter->second->Id() == plugin_id) { set::const_iterator id_iter = conflict_list.begin(); for (; id_iter != conflict_list.end(); ++id_iter) { AbstractPlugin *plugin = GetPlugin(*id_iter); if (plugin) { plugins->push_back(plugin); } } } else { if (STLContains(conflict_list, plugin_id)) { plugins->push_back(iter->second); } } } } bool PluginManager::StartIfSafe(AbstractPlugin *plugin) { AbstractPlugin *conflicting_plugin = CheckForRunningConflicts(plugin); if (conflicting_plugin) { OLA_WARN << "Not enabling " << plugin->Name() << " because it conflicts with " << conflicting_plugin->Name() << " which is already running"; return false; } OLA_INFO << "Trying to start " << plugin->Name(); bool ok = plugin->Start(); if (!ok) { OLA_WARN << "Failed to start " << plugin->Name(); } else { OLA_INFO << "Started " << plugin->Name(); STLReplace(&m_active_plugins, plugin->Id(), plugin); } return ok; } /* * @brief Check if this plugin conflicts with any of the running plugins. * @param plugin The plugin to check * @returns The first conflicting plugin, or NULL if there aren't any. */ AbstractPlugin* PluginManager::CheckForRunningConflicts( const AbstractPlugin *plugin) const { PluginMap::const_iterator iter = m_active_plugins.begin(); for (; iter != m_active_plugins.end(); ++iter) { set conflict_list; iter->second->ConflictsWith(&conflict_list); if (STLContains(conflict_list, plugin->Id())) { return iter->second; } } set conflict_list; plugin->ConflictsWith(&conflict_list); set::const_iterator set_iter = conflict_list.begin(); for (; set_iter != conflict_list.end(); ++set_iter) { AbstractPlugin *conflicting_plugin = STLFindOrNull( m_active_plugins, *set_iter); if (conflicting_plugin) { return conflicting_plugin; } } return NULL; } } // namespace ola ola-0.10.9/olad/RDMHTTPModule.cpp0000664000175000017500000032470714376533110013232 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RDMHTTPModule.cpp * This module acts as the HTTP -> olad gateway for RDM commands. * Copyright (C) 2010 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include "ola/Callback.h" #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/OlaCallbackClient.h" #include "ola/StringUtils.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/RDMHelper.h" #include "ola/rdm/UID.h" #include "ola/rdm/UIDSet.h" #include "ola/thread/Mutex.h" #include "ola/web/Json.h" #include "ola/web/JsonSections.h" #include "olad/OlaServer.h" #include "olad/OladHTTPServer.h" #include "olad/RDMHTTPModule.h" namespace ola { using ola::OladHTTPServer; using ola::client::OlaUniverse; using ola::client::Result; using ola::http::HTTPRequest; using ola::http::HTTPResponse; using ola::http::HTTPServer; using ola::rdm::UID; using ola::thread::MutexLocker; using ola::web::BoolItem; using ola::web::GenericItem; using ola::web::HiddenItem; using ola::web::JsonArray; using ola::web::JsonObject; using ola::web::JsonSection; using ola::web::SelectItem; using ola::web::StringItem; using ola::web::UIntItem; using std::endl; using std::map; using std::ostringstream; using std::pair; using std::set; using std::string; using std::vector; const char RDMHTTPModule::BACKEND_DISCONNECTED_ERROR[] = "Failed to send request, client isn't connected"; // global URL params const char RDMHTTPModule::HINT_KEY[] = "hint"; const char RDMHTTPModule::ID_KEY[] = "id"; const char RDMHTTPModule::SECTION_KEY[] = "section"; const char RDMHTTPModule::UID_KEY[] = "uid"; // URL params for particular sections const char RDMHTTPModule::ADDRESS_FIELD[] = "address"; const char RDMHTTPModule::DISPLAY_INVERT_FIELD[] = "invert"; const char RDMHTTPModule::GENERIC_BOOL_FIELD[] = "bool"; const char RDMHTTPModule::GENERIC_STRING_FIELD[] = "string"; const char RDMHTTPModule::GENERIC_UINT_FIELD[] = "int"; const char RDMHTTPModule::IDENTIFY_DEVICE_FIELD[] = "identify_device"; const char RDMHTTPModule::LABEL_FIELD[] = "label"; const char RDMHTTPModule::LANGUAGE_FIELD[] = "language"; const char RDMHTTPModule::RECORD_SENSOR_FIELD[] = "record"; const char RDMHTTPModule::SUB_DEVICE_FIELD[] = "sub_device"; // section identifiers const char RDMHTTPModule::BOOT_SOFTWARE_SECTION[] = "boot_software"; const char RDMHTTPModule::CLOCK_SECTION[] = "clock"; const char RDMHTTPModule::COMMS_STATUS_SECTION[] = "comms_status"; const char RDMHTTPModule::DEVICE_HOURS_SECTION[] = "device_hours"; const char RDMHTTPModule::DEVICE_INFO_SECTION[] = "device_info"; const char RDMHTTPModule::DEVICE_LABEL_SECTION[] = "device_label"; const char RDMHTTPModule::DISPLAY_INVERT_SECTION[] = "display_invert"; const char RDMHTTPModule::DISPLAY_LEVEL_SECTION[] = "display_level"; const char RDMHTTPModule::DMX_ADDRESS_SECTION[] = "dmx_address"; const char RDMHTTPModule::DNS_DOMAIN_NAME_SECTION[] = "dns_domain_name"; const char RDMHTTPModule::DNS_HOSTNAME_SECTION[] = "dns_hostname"; const char RDMHTTPModule::FACTORY_DEFAULTS_SECTION[] = "factory_defaults"; const char RDMHTTPModule::IDENTIFY_DEVICE_SECTION[] = "identify_device"; const char RDMHTTPModule::LAMP_HOURS_SECTION[] = "lamp_hours"; const char RDMHTTPModule::LAMP_MODE_SECTION[] = "lamp_mode"; const char RDMHTTPModule::LAMP_STATE_SECTION[] = "lamp_state"; const char RDMHTTPModule::LAMP_STRIKES_SECTION[] = "lamp_strikes"; const char RDMHTTPModule::LANGUAGE_SECTION[] = "language"; const char RDMHTTPModule::MANUFACTURER_LABEL_SECTION[] = "manufacturer_label"; const char RDMHTTPModule::PAN_INVERT_SECTION[] = "pan_invert"; const char RDMHTTPModule::PAN_TILT_SWAP_SECTION[] = "pan_tilt_swap"; const char RDMHTTPModule::PERSONALITY_SECTION[] = "personality"; const char RDMHTTPModule::POWER_CYCLES_SECTION[] = "power_cycles"; const char RDMHTTPModule::POWER_STATE_SECTION[] = "power_state"; const char RDMHTTPModule::PRODUCT_DETAIL_SECTION[] = "product_detail"; const char RDMHTTPModule::PROXIED_DEVICES_SECTION[] = "proxied_devices"; const char RDMHTTPModule::RESET_DEVICE_SECTION[] = "reset_device"; const char RDMHTTPModule::SENSOR_SECTION[] = "sensor"; const char RDMHTTPModule::TILT_INVERT_SECTION[] = "tilt_invert"; // section names const char RDMHTTPModule::BOOT_SOFTWARE_SECTION_NAME[] = "Boot Software Version"; const char RDMHTTPModule::CLOCK_SECTION_NAME[] = "Clock"; const char RDMHTTPModule::COMMS_STATUS_SECTION_NAME[] = "Communication Status"; const char RDMHTTPModule::DEVICE_HOURS_SECTION_NAME[] = "Device Hours"; const char RDMHTTPModule::DEVICE_INFO_SECTION_NAME[] = "Device Info"; const char RDMHTTPModule::DEVICE_LABEL_SECTION_NAME[] = "Device Label"; const char RDMHTTPModule::DISPLAY_INVERT_SECTION_NAME[] = "Display Invert"; const char RDMHTTPModule::DISPLAY_LEVEL_SECTION_NAME[] = "Display Level"; const char RDMHTTPModule::DMX_ADDRESS_SECTION_NAME[] = "DMX Start Address"; const char RDMHTTPModule::DNS_DOMAIN_NAME_SECTION_NAME[] = "DNS Domain Name"; const char RDMHTTPModule::DNS_HOSTNAME_SECTION_NAME[] = "DNS Hostname"; const char RDMHTTPModule::FACTORY_DEFAULTS_SECTION_NAME[] = "Factory Defaults"; const char RDMHTTPModule::IDENTIFY_DEVICE_SECTION_NAME[] = "Identify Device"; const char RDMHTTPModule::LAMP_HOURS_SECTION_NAME[] = "Lamp Hours"; const char RDMHTTPModule::LAMP_MODE_SECTION_NAME[] = "Lamp On Mode"; const char RDMHTTPModule::LAMP_STATE_SECTION_NAME[] = "Lamp State"; const char RDMHTTPModule::LAMP_STRIKES_SECTION_NAME[] = "Lamp Strikes"; const char RDMHTTPModule::LANGUAGE_SECTION_NAME[] = "Language"; const char RDMHTTPModule::MANUFACTURER_LABEL_SECTION_NAME[] = "Manufacturer Label"; const char RDMHTTPModule::PAN_INVERT_SECTION_NAME[] = "Pan Invert"; const char RDMHTTPModule::PAN_TILT_SWAP_SECTION_NAME[] = "Pan/Tilt Swap"; const char RDMHTTPModule::PERSONALITY_SECTION_NAME[] = "DMX Personality"; const char RDMHTTPModule::POWER_CYCLES_SECTION_NAME[] = "Device Power Cycles"; const char RDMHTTPModule::POWER_STATE_SECTION_NAME[] = "Power State"; const char RDMHTTPModule::PRODUCT_DETAIL_SECTION_NAME[] = "Product Details"; const char RDMHTTPModule::PROXIED_DEVICES_SECTION_NAME[] = "Proxied Devices"; const char RDMHTTPModule::RESET_DEVICE_SECTION_NAME[] = "Reset Device"; const char RDMHTTPModule::TILT_INVERT_SECTION_NAME[] = "Tilt Invert"; RDMHTTPModule::RDMHTTPModule(HTTPServer *http_server, client::OlaClient *client) : m_server(http_server), m_client(client), m_shim(client), m_rdm_api(&m_shim), m_pid_store(NULL) { m_server->RegisterHandler( "/rdm/run_discovery", NewCallback(this, &RDMHTTPModule::RunRDMDiscovery)); m_server->RegisterHandler( "/json/rdm/uids", NewCallback(this, &RDMHTTPModule::JsonUIDs)); m_server->RegisterHandler( "/json/rdm/uid_info", NewCallback(this, &RDMHTTPModule::JsonUIDInfo)); // Deprecated for clarity, use uid_identify_device instead m_server->RegisterHandler( "/json/rdm/uid_identify", NewCallback(this, &RDMHTTPModule::JsonUIDIdentifyDevice)); m_server->RegisterHandler( "/json/rdm/uid_identify_device", NewCallback(this, &RDMHTTPModule::JsonUIDIdentifyDevice)); m_server->RegisterHandler( "/json/rdm/uid_personalities", NewCallback(this, &RDMHTTPModule::JsonUIDPersonalities)); m_server->RegisterHandler( "/json/rdm/supported_pids", NewCallback(this, &RDMHTTPModule::JsonSupportedPIDs)); m_server->RegisterHandler( "/json/rdm/supported_sections", NewCallback(this, &RDMHTTPModule::JsonSupportedSections)); m_server->RegisterHandler( "/json/rdm/section_info", NewCallback(this, &RDMHTTPModule::JsonSectionInfo)); m_server->RegisterHandler( "/json/rdm/set_section_info", NewCallback(this, &RDMHTTPModule::JsonSaveSectionInfo)); } /* * Teardown */ RDMHTTPModule::~RDMHTTPModule() { map::iterator uid_iter; for (uid_iter = m_universe_uids.begin(); uid_iter != m_universe_uids.end(); uid_iter++) { delete uid_iter->second; } m_universe_uids.clear(); } /** * @brief Can be called while the server is running. Ownership is not transferred. */ void RDMHTTPModule::SetPidStore(const ola::rdm::RootPidStore *pid_store) { MutexLocker lock(&m_pid_store_mu); m_pid_store = pid_store; } /** * @brief Run RDM discovery for a universe * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int RDMHTTPModule::RunRDMDiscovery(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(OladHTTPServer::HELP_PARAMETER)) { return OladHTTPServer::ServeUsage(response, "?id=[universe]&incremental=true"); } unsigned int universe_id; if (!CheckForInvalidId(request, &universe_id)) { return OladHTTPServer::ServeHelpRedirect(response); } string incremental_str = request->GetParameter("incremental"); bool incremental = incremental_str == "true"; m_client->RunDiscovery( universe_id, incremental ? client::DISCOVERY_INCREMENTAL : client::DISCOVERY_FULL, NewSingleCallback(this, &RDMHTTPModule::HandleUIDList, response, universe_id)); return MHD_YES; } /** * @brief Return the list of uids for this universe as json * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int RDMHTTPModule::JsonUIDs(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(OladHTTPServer::HELP_PARAMETER)) { return OladHTTPServer::ServeUsage(response, "?id=[universe]"); } unsigned int universe_id; if (!CheckForInvalidId(request, &universe_id)) { return OladHTTPServer::ServeHelpRedirect(response); } m_client->RunDiscovery( universe_id, client::DISCOVERY_CACHED, NewSingleCallback(this, &RDMHTTPModule::HandleUIDList, response, universe_id)); return MHD_YES; } /** * @brief Return the device info for this uid. * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int RDMHTTPModule::JsonUIDInfo(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(OladHTTPServer::HELP_PARAMETER)) { return OladHTTPServer::ServeUsage(response, "?id=[universe]&uid=[uid]"); } unsigned int universe_id; if (!CheckForInvalidId(request, &universe_id)) { return OladHTTPServer::ServeHelpRedirect(response); } UID *uid = NULL; if (!CheckForInvalidUid(request, &uid)) { return OladHTTPServer::ServeHelpRedirect(response); } string error; bool ok = m_rdm_api.GetDeviceInfo( universe_id, *uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::UIDInfoHandler, response), &error); delete uid; if (!ok) { return m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR); } return MHD_YES; } /** * @brief Returns the identify state for the device. * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int RDMHTTPModule::JsonUIDIdentifyDevice(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(OladHTTPServer::HELP_PARAMETER)) { return OladHTTPServer::ServeUsage(response, "?id=[universe]&uid=[uid]"); } unsigned int universe_id; if (!CheckForInvalidId(request, &universe_id)) { return OladHTTPServer::ServeHelpRedirect(response); } UID *uid = NULL; if (!CheckForInvalidUid(request, &uid)) { return OladHTTPServer::ServeHelpRedirect(response); } string error; bool ok = m_rdm_api.GetIdentifyDevice( universe_id, *uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::UIDIdentifyDeviceHandler, response), &error); delete uid; if (!ok) { return m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR); } return MHD_YES; } /** * @brief Returns the personalities on the device * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int RDMHTTPModule::JsonUIDPersonalities(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(OladHTTPServer::HELP_PARAMETER)) { return OladHTTPServer::ServeUsage(response, "?id=[universe]&uid=[uid]"); } unsigned int universe_id; if (!CheckForInvalidId(request, &universe_id)) { return OladHTTPServer::ServeHelpRedirect(response); } UID *uid = NULL; if (!CheckForInvalidUid(request, &uid)) { return OladHTTPServer::ServeHelpRedirect(response); } string error = GetPersonalities(request, response, universe_id, *uid, false, true); delete uid; if (!error.empty()) { return m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR + error); } return MHD_YES; } /** * @brief Return a list of PIDs supported by this device. * * This isn't used by the UI but it's useful for debugging. * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES * @sa JsonSupportedSections */ int RDMHTTPModule::JsonSupportedPIDs(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(OladHTTPServer::HELP_PARAMETER)) { return OladHTTPServer::ServeUsage(response, "?id=[universe]&uid=[uid]"); } unsigned int universe_id; if (!CheckForInvalidId(request, &universe_id)) { return OladHTTPServer::ServeHelpRedirect(response); } UID *uid = NULL; if (!CheckForInvalidUid(request, &uid)) { return OladHTTPServer::ServeHelpRedirect(response); } string error; bool ok = m_rdm_api.GetSupportedParameters( universe_id, *uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::SupportedParamsHandler, response), &error); delete uid; if (!ok) { return m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR); } return MHD_YES; } /** * @brief Return a list of sections to display in the RDM control panel. * * We use the response from SUPPORTED_PARAMS and DEVICE_INFO to decide which * PIDs exist. * @param request the HTTPRequest * @param response the HTTPResponse * @returns MHD_NO or MHD_YES */ int RDMHTTPModule::JsonSupportedSections(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(OladHTTPServer::HELP_PARAMETER)) { return OladHTTPServer::ServeUsage(response, "?id=[universe]&uid=[uid]"); } unsigned int universe_id; if (!CheckForInvalidId(request, &universe_id)) { return OladHTTPServer::ServeHelpRedirect(response); } UID *uid = NULL; if (!CheckForInvalidUid(request, &uid)) { return OladHTTPServer::ServeHelpRedirect(response); } string error; bool ok = m_rdm_api.GetSupportedParameters( universe_id, *uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::SupportedSectionsHandler, response, universe_id, *uid), &error); delete uid; if (!ok) { return m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR); } return MHD_YES; } /** * @brief Get the information required to render a section in the RDM * controller panel */ int RDMHTTPModule::JsonSectionInfo(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(OladHTTPServer::HELP_PARAMETER)) { return OladHTTPServer::ServeUsage(response, "?id=[universe]&uid=[uid]" "&section=[section]
See " "/json/rdm/supported_sections for " "sections"); } unsigned int universe_id; if (!CheckForInvalidId(request, &universe_id)) { return OladHTTPServer::ServeHelpRedirect(response); } UID *uid = NULL; if (!CheckForInvalidUid(request, &uid)) { return OladHTTPServer::ServeHelpRedirect(response); } string section_id = request->GetParameter(SECTION_KEY); string error; if (section_id == PROXIED_DEVICES_SECTION) { error = GetProxiedDevices(response, universe_id, *uid); } else if (section_id == COMMS_STATUS_SECTION) { error = GetCommStatus(response, universe_id, *uid); } else if (section_id == DEVICE_INFO_SECTION) { error = GetDeviceInfo(request, response, universe_id, *uid); } else if (section_id == PRODUCT_DETAIL_SECTION) { error = GetProductIds(request, response, universe_id, *uid); } else if (section_id == MANUFACTURER_LABEL_SECTION) { error = GetManufacturerLabel(request, response, universe_id, *uid); } else if (section_id == DEVICE_LABEL_SECTION) { error = GetDeviceLabel(request, response, universe_id, *uid); } else if (section_id == FACTORY_DEFAULTS_SECTION) { error = GetFactoryDefaults(response, universe_id, *uid); } else if (section_id == LANGUAGE_SECTION) { error = GetLanguage(response, universe_id, *uid); } else if (section_id == BOOT_SOFTWARE_SECTION) { error = GetBootSoftware(response, universe_id, *uid); } else if (section_id == PERSONALITY_SECTION) { error = GetPersonalities(request, response, universe_id, *uid, true); } else if (section_id == DMX_ADDRESS_SECTION) { error = GetStartAddress(request, response, universe_id, *uid); } else if (section_id == SENSOR_SECTION) { error = GetSensor(request, response, universe_id, *uid); } else if (section_id == DEVICE_HOURS_SECTION) { error = GetDeviceHours(request, response, universe_id, *uid); } else if (section_id == LAMP_HOURS_SECTION) { error = GetLampHours(request, response, universe_id, *uid); } else if (section_id == LAMP_MODE_SECTION) { error = GetLampMode(request, response, universe_id, *uid); } else if (section_id == LAMP_STATE_SECTION) { error = GetLampState(request, response, universe_id, *uid); } else if (section_id == LAMP_STRIKES_SECTION) { error = GetLampStrikes(request, response, universe_id, *uid); } else if (section_id == POWER_CYCLES_SECTION) { error = GetPowerCycles(request, response, universe_id, *uid); } else if (section_id == DISPLAY_INVERT_SECTION) { error = GetDisplayInvert(response, universe_id, *uid); } else if (section_id == DISPLAY_LEVEL_SECTION) { error = GetDisplayLevel(response, universe_id, *uid); } else if (section_id == PAN_INVERT_SECTION) { error = GetPanInvert(response, universe_id, *uid); } else if (section_id == TILT_INVERT_SECTION) { error = GetTiltInvert(response, universe_id, *uid); } else if (section_id == PAN_TILT_SWAP_SECTION) { error = GetPanTiltSwap(response, universe_id, *uid); } else if (section_id == CLOCK_SECTION) { error = GetClock(response, universe_id, *uid); } else if (section_id == IDENTIFY_DEVICE_SECTION) { error = GetIdentifyDevice(response, universe_id, *uid); } else if (section_id == POWER_STATE_SECTION) { error = GetPowerState(response, universe_id, *uid); } else if (section_id == RESET_DEVICE_SECTION) { // No get command available, so just generate the JSON error = GetResetDevice(response); } else if (section_id == DNS_HOSTNAME_SECTION) { error = GetDnsHostname(response, universe_id, *uid); } else if (section_id == DNS_DOMAIN_NAME_SECTION) { error = GetDnsDomainName(response, universe_id, *uid); } else { OLA_INFO << "Missing or unknown section id: " << section_id; delete uid; return OladHTTPServer::ServeHelpRedirect(response); } delete uid; if (!error.empty()) { return m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR + error); } return MHD_YES; } /** * Save the information for a section or item. */ int RDMHTTPModule::JsonSaveSectionInfo(const HTTPRequest *request, HTTPResponse *response) { if (request->CheckParameterExists(OladHTTPServer::HELP_PARAMETER)) { return OladHTTPServer::ServeUsage(response, "?id=[universe]&uid=[uid]" "&section=[section]
See " "/json/rdm/supported_sections for " "sections"); } unsigned int universe_id; if (!CheckForInvalidId(request, &universe_id)) { return OladHTTPServer::ServeHelpRedirect(response); } UID *uid = NULL; if (!CheckForInvalidUid(request, &uid)) { return OladHTTPServer::ServeHelpRedirect(response); } string section_id = request->GetParameter(SECTION_KEY); string error; if (section_id == DEVICE_LABEL_SECTION) { error = SetDeviceLabel(request, response, universe_id, *uid); } else if (section_id == COMMS_STATUS_SECTION) { error = ClearCommsCounters(response, universe_id, *uid); } else if (section_id == FACTORY_DEFAULTS_SECTION) { error = SetFactoryDefault(response, universe_id, *uid); } else if (section_id == LANGUAGE_SECTION) { error = SetLanguage(request, response, universe_id, *uid); } else if (section_id == PERSONALITY_SECTION) { error = SetPersonality(request, response, universe_id, *uid); } else if (section_id == DMX_ADDRESS_SECTION) { error = SetStartAddress(request, response, universe_id, *uid); } else if (section_id == SENSOR_SECTION) { error = RecordSensor(request, response, universe_id, *uid); } else if (section_id == DEVICE_HOURS_SECTION) { error = SetDeviceHours(request, response, universe_id, *uid); } else if (section_id == LAMP_HOURS_SECTION) { error = SetLampHours(request, response, universe_id, *uid); } else if (section_id == LAMP_MODE_SECTION) { error = SetLampMode(request, response, universe_id, *uid); } else if (section_id == LAMP_STATE_SECTION) { error = SetLampState(request, response, universe_id, *uid); } else if (section_id == LAMP_STRIKES_SECTION) { error = SetLampStrikes(request, response, universe_id, *uid); } else if (section_id == POWER_CYCLES_SECTION) { error = SetPowerCycles(request, response, universe_id, *uid); } else if (section_id == DISPLAY_INVERT_SECTION) { error = SetDisplayInvert(request, response, universe_id, *uid); } else if (section_id == DISPLAY_LEVEL_SECTION) { error = SetDisplayLevel(request, response, universe_id, *uid); } else if (section_id == PAN_INVERT_SECTION) { error = SetPanInvert(request, response, universe_id, *uid); } else if (section_id == TILT_INVERT_SECTION) { error = SetTiltInvert(request, response, universe_id, *uid); } else if (section_id == PAN_TILT_SWAP_SECTION) { error = SetPanTiltSwap(request, response, universe_id, *uid); } else if (section_id == CLOCK_SECTION) { error = SyncClock(response, universe_id, *uid); } else if (section_id == IDENTIFY_DEVICE_SECTION) { error = SetIdentifyDevice(request, response, universe_id, *uid); } else if (section_id == POWER_STATE_SECTION) { error = SetPowerState(request, response, universe_id, *uid); } else if (section_id == RESET_DEVICE_SECTION) { error = SetResetDevice(request, response, universe_id, *uid); } else if (section_id == DNS_HOSTNAME_SECTION) { error = SetDnsHostname(request, response, universe_id, *uid); } else if (section_id == DNS_DOMAIN_NAME_SECTION) { error = SetDnsDomainName(request, response, universe_id, *uid); } else { OLA_INFO << "Missing or unknown section id: " << section_id; delete uid; return OladHTTPServer::ServeHelpRedirect(response); } delete uid; if (!error.empty()) { return RespondWithError(response, error); } return MHD_YES; } /** * This is called from the main http server whenever a new list of active * universes is received. It's used to prune the uid map so we don't bother * trying to resolve uids for universes that no longer exist. */ void RDMHTTPModule::PruneUniverseList(const vector &universes) { map::iterator uid_iter; for (uid_iter = m_universe_uids.begin(); uid_iter != m_universe_uids.end(); uid_iter++) { uid_iter->second->active = false; } vector::const_iterator iter; for (iter = universes.begin(); iter != universes.end(); ++iter) { uid_iter = m_universe_uids.find(iter->Id()); if (uid_iter != m_universe_uids.end()) { uid_iter->second->active = true; } } // clean up the uid map for those universes that no longer exist for (uid_iter = m_universe_uids.begin(); uid_iter != m_universe_uids.end();) { if (!uid_iter->second->active) { OLA_DEBUG << "removing " << uid_iter->first << " from the uid map"; delete uid_iter->second; m_universe_uids.erase(uid_iter++); } else { uid_iter++; } } } /* * @brief Handle the UID list response. * @param response the HTTPResponse that is associated with the request. * @param uids the UIDs for this response. * @param error an error string. */ void RDMHTTPModule::HandleUIDList(HTTPResponse *response, unsigned int universe_id, const Result &result, const ola::rdm::UIDSet &uids) { if (!result.Success()) { m_server->ServeError(response, result.Error()); return; } ola::rdm::UIDSet::Iterator iter = uids.Begin(); uid_resolution_state *uid_state = GetUniverseUidsOrCreate(universe_id); // mark all uids as inactive so we can remove the unused ones at the end map::iterator uid_iter; for (uid_iter = uid_state->resolved_uids.begin(); uid_iter != uid_state->resolved_uids.end(); ++uid_iter) uid_iter->second.active = false; JsonObject json; json.Add("universe", universe_id); JsonArray *json_uids = json.AddArray("uids"); for (; iter != uids.End(); ++iter) { uid_iter = uid_state->resolved_uids.find(*iter); string manufacturer = ""; string device = ""; if (uid_iter == uid_state->resolved_uids.end()) { // schedule resolution uid_state->pending_uids.push(std::make_pair(*iter, RESOLVE_MANUFACTURER)); uid_state->pending_uids.push(std::make_pair(*iter, RESOLVE_DEVICE)); resolved_uid uid_descriptor = {"", "", true}; uid_state->resolved_uids[*iter] = uid_descriptor; OLA_INFO << "Adding UID " << *iter << " to resolution queue"; } else { manufacturer = uid_iter->second.manufacturer; device = uid_iter->second.device; uid_iter->second.active = true; } JsonObject *json_uid = json_uids->AppendObject(); json_uid->Add("manufacturer_id", iter->ManufacturerId()); json_uid->Add("device_id", iter->DeviceId()); json_uid->Add("device", device); json_uid->Add("manufacturer", manufacturer); json_uid->Add("uid", iter->ToString()); } response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(json); delete response; // remove any old UIDs for (uid_iter = uid_state->resolved_uids.begin(); uid_iter != uid_state->resolved_uids.end();) { if (!uid_iter->second.active) { OLA_INFO << "Removed UID " << uid_iter->first; uid_state->resolved_uids.erase(uid_iter++); } else { ++uid_iter; } } if (!uid_state->uid_resolution_running) { ResolveNextUID(universe_id); } } /* * @brief Send the RDM command needed to resolve the next uid in the queue * @param universe_id the universe id to resolve the next UID for. */ void RDMHTTPModule::ResolveNextUID(unsigned int universe_id) { bool sent_request = false; string error; uid_resolution_state *uid_state = GetUniverseUids(universe_id); if (!uid_state) { return; } while (!sent_request) { if (uid_state->pending_uids.empty()) { uid_state->uid_resolution_running = false; return; } uid_state->uid_resolution_running = true; pair &uid_action_pair = uid_state->pending_uids.front(); if (uid_action_pair.second == RESOLVE_MANUFACTURER) { OLA_INFO << "sending manufacturer request for " << uid_action_pair.first; sent_request = m_rdm_api.GetManufacturerLabel( universe_id, uid_action_pair.first, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::UpdateUIDManufacturerLabel, universe_id, uid_action_pair.first), &error); uid_state->pending_uids.pop(); } else if (uid_action_pair.second == RESOLVE_DEVICE) { OLA_INFO << "sending device request for " << uid_action_pair.first; sent_request = m_rdm_api.GetDeviceLabel( universe_id, uid_action_pair.first, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::UpdateUIDDeviceLabel, universe_id, uid_action_pair.first), &error); uid_state->pending_uids.pop(); } else { OLA_WARN << "Unknown UID resolve action " << static_cast(uid_action_pair.second); } } } /* * @brief Handle the manufacturer label response. */ void RDMHTTPModule::UpdateUIDManufacturerLabel( unsigned int universe, UID uid, const ola::rdm::ResponseStatus &status, const string &manufacturer_label) { uid_resolution_state *uid_state = GetUniverseUids(universe); if (!uid_state) { return; } if (CheckForRDMSuccess(status)) { map::iterator uid_iter; uid_iter = uid_state->resolved_uids.find(uid); if (uid_iter != uid_state->resolved_uids.end()) { uid_iter->second.manufacturer = manufacturer_label; } } ResolveNextUID(universe); } /* * @brief Handle the device label response. */ void RDMHTTPModule::UpdateUIDDeviceLabel( unsigned int universe, UID uid, const ola::rdm::ResponseStatus &status, const string &device_label) { uid_resolution_state *uid_state = GetUniverseUids(universe); if (!uid_state) { return; } if (CheckForRDMSuccess(status)) { map::iterator uid_iter; uid_iter = uid_state->resolved_uids.find(uid); if (uid_iter != uid_state->resolved_uids.end()) { uid_iter->second.device = device_label; } } ResolveNextUID(universe); } /* * @brief Get the UID resolution state for a particular universe * @param universe the id of the universe to get the state for */ RDMHTTPModule::uid_resolution_state *RDMHTTPModule::GetUniverseUids( unsigned int universe) { map::iterator iter = m_universe_uids.find(universe); return iter == m_universe_uids.end() ? NULL : iter->second; } /* * @brief Get the UID resolution state for a particular universe or create one if it * doesn't exist. * @param universe the id of the universe to get the state for */ RDMHTTPModule::uid_resolution_state *RDMHTTPModule::GetUniverseUidsOrCreate( unsigned int universe) { map::iterator iter = m_universe_uids.find(universe); if (iter == m_universe_uids.end()) { OLA_DEBUG << "Adding a new state entry for " << universe; uid_resolution_state *state = new uid_resolution_state(); state->uid_resolution_running = false; state->active = true; pair p(universe, state); iter = m_universe_uids.insert(p).first; } return iter->second; } /** * @brief Handle the Device Info response and build the JSON */ void RDMHTTPModule::UIDInfoHandler(HTTPResponse *response, const ola::rdm::ResponseStatus &status, const ola::rdm::DeviceDescriptor &device) { if (CheckForRDMError(response, status)) { return; } JsonObject json; json.Add("error", ""); json.Add("address", device.dmx_start_address); json.Add("footprint", device.dmx_footprint); json.Add("personality", static_cast(device.current_personality)); json.Add("personality_count", static_cast(device.personality_count)); response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(json); delete response; } /** * @brief Handle the identify device response and build the JSON */ void RDMHTTPModule::UIDIdentifyDeviceHandler( HTTPResponse *response, const ola::rdm::ResponseStatus &status, bool value) { if (CheckForRDMError(response, status)) { return; } JsonObject json; json.Add("error", ""); json.Add("identify_device", value); response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(json); delete response; } /** * @brief Send the response to a DMX personality section */ void RDMHTTPModule::SendPersonalityResponse(HTTPResponse *response, personality_info *info) { JsonObject json; json.Add("error", ""); JsonArray *personalities = json.AddArray("personalities"); unsigned int i = 1; while (i <= info->total && i <= info->personalities.size()) { if (info->personalities[i - 1].first != INVALID_PERSONALITY) { JsonObject *personality = personalities->AppendObject(); personality->Add("name", info->personalities[i - 1].second); personality->Add("index", i); personality->Add("footprint", info->personalities[i - 1].first); } i++; } json.Add("selected", info->active); response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(json); delete info->uid; delete info; } /* * @brief Handle the response from a supported params request */ void RDMHTTPModule::SupportedParamsHandler( HTTPResponse *response, const ola::rdm::ResponseStatus &status, const vector &pids) { JsonObject json; if (CheckForRDMSuccess(status)) { JsonArray *pids_json = json.AddArray("pids"); vector::const_iterator iter = pids.begin(); for (; iter != pids.end(); ++iter) pids_json->Append(*iter); } response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(json); delete response; } /** * @brief Takes the supported PIDs for a device and come up with the list of * sections to display in the RDM panel */ void RDMHTTPModule::SupportedSectionsHandler( HTTPResponse *response, unsigned int universe_id, UID uid, const ola::rdm::ResponseStatus &status, const vector &pid_list) { string error; // nacks here are ok if the device doesn't support SUPPORTED_PARAMS if (!CheckForRDMSuccess(status) && !status.WasNacked()) { m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR + error); return; } m_rdm_api.GetDeviceInfo( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::SupportedSectionsDeviceInfoHandler, response, pid_list), &error); if (!error.empty()) m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR + error); } /** * @brief Handle the second part of the supported sections request. */ void RDMHTTPModule::SupportedSectionsDeviceInfoHandler( HTTPResponse *response, const vector pid_list, const ola::rdm::ResponseStatus &status, const ola::rdm::DeviceDescriptor &device) { vector sections; std::set pids; copy(pid_list.begin(), pid_list.end(), inserter(pids, pids.end())); // PID_DEVICE_INFO is required so we always add it string hint; if (pids.find(ola::rdm::PID_DEVICE_MODEL_DESCRIPTION) != pids.end()) { hint.push_back('m'); // m is for device model } AddSection(§ions, DEVICE_INFO_SECTION, DEVICE_INFO_SECTION_NAME, hint); AddSection(§ions, IDENTIFY_DEVICE_SECTION, IDENTIFY_DEVICE_SECTION_NAME); bool dmx_address_added = false; bool include_software_version = false; set::const_iterator iter = pids.begin(); for (; iter != pids.end(); ++iter) { switch (*iter) { case ola::rdm::PID_PROXIED_DEVICES: AddSection(§ions, PROXIED_DEVICES_SECTION, PROXIED_DEVICES_SECTION_NAME); break; case ola::rdm::PID_COMMS_STATUS: AddSection(§ions, COMMS_STATUS_SECTION, COMMS_STATUS_SECTION_NAME); break; case ola::rdm::PID_PRODUCT_DETAIL_ID_LIST: AddSection(§ions, PRODUCT_DETAIL_SECTION, PRODUCT_DETAIL_SECTION_NAME); break; case ola::rdm::PID_MANUFACTURER_LABEL: AddSection(§ions, MANUFACTURER_LABEL_SECTION, MANUFACTURER_LABEL_SECTION_NAME); break; case ola::rdm::PID_DEVICE_LABEL: AddSection(§ions, DEVICE_LABEL_SECTION, DEVICE_LABEL_SECTION_NAME); break; case ola::rdm::PID_FACTORY_DEFAULTS: AddSection(§ions, FACTORY_DEFAULTS_SECTION, FACTORY_DEFAULTS_SECTION_NAME); break; case ola::rdm::PID_LANGUAGE: AddSection(§ions, LANGUAGE_SECTION, LANGUAGE_SECTION_NAME); break; case ola::rdm::PID_BOOT_SOFTWARE_VERSION_ID: case ola::rdm::PID_BOOT_SOFTWARE_VERSION_LABEL: include_software_version = true; break; case ola::rdm::PID_DMX_PERSONALITY: if (pids.find(ola::rdm::PID_DMX_PERSONALITY_DESCRIPTION) == pids.end()) { AddSection(§ions, PERSONALITY_SECTION, PERSONALITY_SECTION_NAME); } else { AddSection(§ions, PERSONALITY_SECTION, PERSONALITY_SECTION_NAME, "l"); } break; case ola::rdm::PID_DMX_START_ADDRESS: AddSection(§ions, DMX_ADDRESS_SECTION, DMX_ADDRESS_SECTION_NAME); dmx_address_added = true; break; case ola::rdm::PID_DEVICE_HOURS: AddSection(§ions, DEVICE_HOURS_SECTION, DEVICE_HOURS_SECTION_NAME); break; case ola::rdm::PID_LAMP_HOURS: AddSection(§ions, LAMP_HOURS_SECTION, LAMP_HOURS_SECTION_NAME); break; case ola::rdm::PID_LAMP_STRIKES: AddSection(§ions, LAMP_STRIKES_SECTION, LAMP_STRIKES_SECTION_NAME); break; case ola::rdm::PID_LAMP_STATE: AddSection(§ions, LAMP_STATE_SECTION, LAMP_STATE_SECTION_NAME); break; case ola::rdm::PID_LAMP_ON_MODE: AddSection(§ions, LAMP_MODE_SECTION, LAMP_MODE_SECTION_NAME); break; case ola::rdm::PID_DEVICE_POWER_CYCLES: AddSection(§ions, POWER_CYCLES_SECTION, POWER_CYCLES_SECTION_NAME); break; case ola::rdm::PID_DISPLAY_INVERT: AddSection(§ions, DISPLAY_INVERT_SECTION, DISPLAY_INVERT_SECTION_NAME); break; case ola::rdm::PID_DISPLAY_LEVEL: AddSection(§ions, DISPLAY_LEVEL_SECTION, DISPLAY_LEVEL_SECTION_NAME); break; case ola::rdm::PID_PAN_INVERT: AddSection(§ions, PAN_INVERT_SECTION, PAN_INVERT_SECTION_NAME); break; case ola::rdm::PID_TILT_INVERT: AddSection(§ions, TILT_INVERT_SECTION, TILT_INVERT_SECTION_NAME); break; case ola::rdm::PID_PAN_TILT_SWAP: AddSection(§ions, PAN_TILT_SWAP_SECTION, PAN_TILT_SWAP_SECTION_NAME); break; case ola::rdm::PID_REAL_TIME_CLOCK: AddSection(§ions, CLOCK_SECTION, CLOCK_SECTION_NAME); break; case ola::rdm::PID_POWER_STATE: AddSection(§ions, POWER_STATE_SECTION, POWER_STATE_SECTION_NAME); break; case ola::rdm::PID_RESET_DEVICE: AddSection(§ions, RESET_DEVICE_SECTION, RESET_DEVICE_SECTION_NAME); break; case ola::rdm::PID_DNS_HOSTNAME: AddSection(§ions, DNS_HOSTNAME_SECTION, DNS_HOSTNAME_SECTION_NAME); break; case ola::rdm::PID_DNS_DOMAIN_NAME: AddSection(§ions, DNS_DOMAIN_NAME_SECTION, DNS_DOMAIN_NAME_SECTION_NAME); break; } } if (include_software_version) { AddSection(§ions, BOOT_SOFTWARE_SECTION, BOOT_SOFTWARE_SECTION_NAME); } if (CheckForRDMSuccess(status)) { if (device.dmx_footprint && !dmx_address_added) { AddSection(§ions, DMX_ADDRESS_SECTION, DMX_ADDRESS_SECTION_NAME); } if (device.sensor_count && pids.find(ola::rdm::PID_SENSOR_DEFINITION) != pids.end() && pids.find(ola::rdm::PID_SENSOR_VALUE) != pids.end()) { // sensors count from 1 for (unsigned int i = 0; i < device.sensor_count; ++i) { ostringstream heading, hint; hint << i; heading << "Sensor " << std::setfill(' ') << std::setw(3) << i; AddSection(§ions, SENSOR_SECTION, heading.str(), hint.str()); } } } sort(sections.begin(), sections.end(), lt_section_info()); JsonArray json; vector::const_iterator section_iter = sections.begin(); for (; section_iter != sections.end(); ++section_iter) { JsonObject *json_obj = json.AppendObject(); json_obj->Add("id", section_iter->id); json_obj->Add("name", section_iter->name); json_obj->Add("hint", section_iter->hint); } response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->SendJson(json); delete response; } /* * @brief Handle the request for the communication status. */ string RDMHTTPModule::GetCommStatus(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetCommStatus( universe_id, uid, NewSingleCallback(this, &RDMHTTPModule::CommStatusHandler, response), &error); return error; } /** * @brief Handle the response to a communication status call */ void RDMHTTPModule::CommStatusHandler(HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint16_t short_messages, uint16_t length_mismatch, uint16_t checksum_fail) { if (CheckForRDMError(response, status)) { return; } JsonSection section; section.AddItem(new UIntItem("Short Messages", short_messages)); section.AddItem(new UIntItem("Length Mismatch", length_mismatch)); section.AddItem(new UIntItem("Checksum Failures", checksum_fail)); section.AddItem(new HiddenItem("1", GENERIC_UINT_FIELD)); section.SetSaveButton("Clear Counters"); RespondWithSection(response, section); } /** * @brief Clear the communication status counters */ string RDMHTTPModule::ClearCommsCounters(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.ClearCommStatus( universe_id, uid, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /* * @brief Handle the request for the proxied devices */ string RDMHTTPModule::GetProxiedDevices(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetProxiedDevices( universe_id, uid, NewSingleCallback(this, &RDMHTTPModule::ProxiedDevicesHandler, response, universe_id), &error); return error; } /** * @brief Handle the response to a proxied devices call. */ void RDMHTTPModule::ProxiedDevicesHandler( HTTPResponse *response, unsigned int universe_id, const ola::rdm::ResponseStatus &status, const vector &uids) { if (CheckForRDMError(response, status)) { return; } JsonSection section; uid_resolution_state *uid_state = GetUniverseUids(universe_id); vector::const_iterator iter = uids.begin(); unsigned int i = 1; for (; iter != uids.end(); ++iter, ++i) { string uid = iter->ToString(); // attempt to add device & manufacturer names if (uid_state) { map::iterator uid_iter = uid_state->resolved_uids.find(*iter); if (uid_iter != uid_state->resolved_uids.end()) { string device = uid_iter->second.device; string manufacturer = uid_iter->second.manufacturer; if (!(device.empty() && manufacturer.empty())) { ostringstream str; str << uid_iter->second.manufacturer; if ((!device.empty()) && (!manufacturer.empty())) { str << ", "; } str << uid_iter->second.device; str << " ["; str << iter->ToString(); str << "]"; uid = str.str(); } } } section.AddItem(new StringItem("Device " + IntToString(i), uid)); } RespondWithSection(response, section); } /* * @brief Handle the request for the device info section. */ string RDMHTTPModule::GetDeviceInfo(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string hint = request->GetParameter(HINT_KEY); string error; device_info dev_info = {universe_id, uid, hint, "", ""}; m_rdm_api.GetSoftwareVersionLabel( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetSoftwareVersionHandler, response, dev_info), &error); return error; } /** * @brief Handle the response to a software version call. */ void RDMHTTPModule::GetSoftwareVersionHandler( HTTPResponse *response, device_info dev_info, const ola::rdm::ResponseStatus &status, const string &software_version) { string error; if (CheckForRDMSuccess(status)) { dev_info.software_version = software_version; } if (dev_info.hint.find('m') != string::npos) { m_rdm_api.GetDeviceModelDescription( dev_info.universe_id, dev_info.uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetDeviceModelHandler, response, dev_info), &error); } else { m_rdm_api.GetDeviceInfo( dev_info.universe_id, dev_info.uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetDeviceInfoHandler, response, dev_info), &error); } if (!error.empty()) { m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR + error); } } /** * @brief Handle the response to a device model call. */ void RDMHTTPModule::GetDeviceModelHandler( HTTPResponse *response, device_info dev_info, const ola::rdm::ResponseStatus &status, const string &device_model) { string error; if (CheckForRDMSuccess(status)) { dev_info.device_model = device_model; } m_rdm_api.GetDeviceInfo( dev_info.universe_id, dev_info.uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetDeviceInfoHandler, response, dev_info), &error); if (!error.empty()) { m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR + error); } } /** * @brief Handle the response to a device info call and build the response */ void RDMHTTPModule::GetDeviceInfoHandler( HTTPResponse *response, device_info dev_info, const ola::rdm::ResponseStatus &status, const ola::rdm::DeviceDescriptor &device) { JsonSection section; if (CheckForRDMError(response, status)) { return; } ostringstream stream; stream << static_cast(device.protocol_version_high) << "." << static_cast(device.protocol_version_low); section.AddItem(new StringItem("Protocol Version", stream.str())); stream.str(""); if (dev_info.device_model.empty()) { stream << device.device_model; } else { stream << dev_info.device_model << " (" << device.device_model << ")"; } section.AddItem(new StringItem("Device Model", stream.str())); section.AddItem(new StringItem( "Product Category", ola::rdm::ProductCategoryToString(device.product_category))); stream.str(""); if (dev_info.software_version.empty()) { stream << device.software_version; } else { stream << dev_info.software_version << " (" << device.software_version << ")"; } section.AddItem(new StringItem("Software Version", stream.str())); if (device.dmx_start_address == ola::rdm::ZERO_FOOTPRINT_DMX_ADDRESS) { section.AddItem(new StringItem("DMX Address", "N/A")); } else { section.AddItem(new UIntItem("DMX Address", device.dmx_start_address)); } section.AddItem(new UIntItem("DMX Footprint", device.dmx_footprint)); stream.str(""); stream << static_cast(device.current_personality) << " of " << static_cast(device.personality_count); section.AddItem(new StringItem("Personality", stream.str())); section.AddItem(new UIntItem("Sub Devices", device.sub_device_count)); section.AddItem(new UIntItem("Sensors", device.sensor_count)); section.AddItem(new StringItem("UID", dev_info.uid.ToString())); RespondWithSection(response, section); } /* * @brief Handle the request for the product details ids. */ string RDMHTTPModule::GetProductIds(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetProductDetailIdList( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetProductIdsHandler, response), &error); return error; } /** * @brief Handle the response to a product detail ids call and build the response. */ void RDMHTTPModule::GetProductIdsHandler( HTTPResponse *response, const ola::rdm::ResponseStatus &status, const vector &ids) { if (CheckForRDMError(response, status)) { return; } bool first = true; ostringstream product_ids; JsonSection section; vector::const_iterator iter = ids.begin(); for (; iter != ids.end(); ++iter) { string product_id = ola::rdm::ProductDetailToString(*iter); if (product_id.empty()) { continue; } if (first) { first = false; } else { product_ids << ", "; } product_ids << product_id; } section.AddItem(new StringItem("Product Detail IDs", product_ids.str())); RespondWithSection(response, section); } /** * @brief Handle the request for the Manufacturer label. */ string RDMHTTPModule::GetManufacturerLabel( OLA_UNUSED const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetManufacturerLabel( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetManufacturerLabelHandler, response, universe_id, uid), &error); return error; } /** * @brief Handle the response to a manufacturer label call and build the response */ void RDMHTTPModule::GetManufacturerLabelHandler( HTTPResponse *response, unsigned int universe_id, const UID uid, const ola::rdm::ResponseStatus &status, const string &label) { if (CheckForRDMError(response, status)) { return; } JsonSection section; section.AddItem(new StringItem("Manufacturer Label", label)); RespondWithSection(response, section); // update the map as well uid_resolution_state *uid_state = GetUniverseUids(universe_id); if (uid_state) { map::iterator uid_iter = uid_state->resolved_uids.find(uid); if (uid_iter != uid_state->resolved_uids.end()) { uid_iter->second.manufacturer = label; } } } /** * @brief Handle the request for the Device label. */ string RDMHTTPModule::GetDeviceLabel(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetDeviceLabel( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetDeviceLabelHandler, response, universe_id, uid), &error); return error; } /** * @brief Handle the response to a device label call and build the response */ void RDMHTTPModule::GetDeviceLabelHandler( HTTPResponse *response, unsigned int universe_id, const UID uid, const ola::rdm::ResponseStatus &status, const string &label) { if (CheckForRDMError(response, status)) { return; } JsonSection section; section.AddItem(new StringItem("Device Label", label, LABEL_FIELD)); RespondWithSection(response, section); // update the map as well uid_resolution_state *uid_state = GetUniverseUids(universe_id); if (uid_state) { map::iterator uid_iter = uid_state->resolved_uids.find(uid); if (uid_iter != uid_state->resolved_uids.end()) { uid_iter->second.device = label; } } } /* * @brief Set the device label */ string RDMHTTPModule::SetDeviceLabel(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string label = request->GetParameter(LABEL_FIELD); string error; m_rdm_api.SetDeviceLabel( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, label, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the factory defaults section */ string RDMHTTPModule::GetFactoryDefaults(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetFactoryDefaults( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::FactoryDefaultsHandler, response), &error); return error; } /** * @brief Handle the response to a factory defaults call and build the response */ void RDMHTTPModule::FactoryDefaultsHandler( HTTPResponse *response, const ola::rdm::ResponseStatus &status, bool defaults) { if (CheckForRDMError(response, status)) { return; } JsonSection section; section.AddItem(new StringItem("Using Defaults", defaults ? "Yes" : "No")); section.AddItem(new HiddenItem("1", GENERIC_UINT_FIELD)); section.SetSaveButton("Reset to Defaults"); RespondWithSection(response, section); } /* * @brief Reset to the factory defaults */ string RDMHTTPModule::SetFactoryDefault(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.ResetToFactoryDefaults( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the language section. */ string RDMHTTPModule::GetLanguage(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetLanguageCapabilities( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetSupportedLanguagesHandler, response, universe_id, uid), &error); return error; } /** * @brief Handle the response to language capability call. */ void RDMHTTPModule::GetSupportedLanguagesHandler( HTTPResponse *response, unsigned int universe_id, const UID uid, OLA_UNUSED const ola::rdm::ResponseStatus &status, const vector &languages) { string error; m_rdm_api.GetLanguage( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetLanguageHandler, response, languages), &error); if (!error.empty()) { m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR + error); } } /** * @brief Handle the response to language call and build the response */ void RDMHTTPModule::GetLanguageHandler(HTTPResponse *response, vector languages, const ola::rdm::ResponseStatus &status, const string &language) { JsonSection section; SelectItem *item = new SelectItem("Language", LANGUAGE_FIELD); bool ok = CheckForRDMSuccess(status); vector::const_iterator iter = languages.begin(); unsigned int i = 0; for (; iter != languages.end(); ++iter, i++) { item->AddItem(*iter, *iter); if (ok && *iter == language) { item->SetSelectedOffset(i); } } if (ok && languages.empty()) { item->AddItem(language, language); item->SetSelectedOffset(0); } section.AddItem(item); RespondWithSection(response, section); } /* * @brief Set the language */ string RDMHTTPModule::SetLanguage(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string label = request->GetParameter(LANGUAGE_FIELD); string error; m_rdm_api.SetLanguage( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, label, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the boot software section. */ string RDMHTTPModule::GetBootSoftware(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetBootSoftwareVersionLabel( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetBootSoftwareLabelHandler, response, universe_id, uid), &error); return error; } /** * @brief Handle the response to a boot software label. */ void RDMHTTPModule::GetBootSoftwareLabelHandler( HTTPResponse *response, unsigned int universe_id, const UID uid, OLA_UNUSED const ola::rdm::ResponseStatus &status, const string &label) { string error; m_rdm_api.GetBootSoftwareVersion( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetBootSoftwareVersionHandler, response, label), &error); if (!error.empty()) { m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR + error); } } /** * @brief Handle the response to a boot software version. */ void RDMHTTPModule::GetBootSoftwareVersionHandler( HTTPResponse *response, string label, const ola::rdm::ResponseStatus &status, uint32_t version) { ostringstream str; str << label; if (CheckForRDMSuccess(status)) { if (!label.empty()) { str << " (" << version << ")"; } else { str << version; } } JsonSection section; StringItem *item = new StringItem("Boot Software", str.str()); section.AddItem(item); RespondWithSection(response, section); } /** * @brief Handle the request for the personality section. */ string RDMHTTPModule::GetPersonalities(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid, bool return_as_section, bool include_descriptions) { string hint = request->GetParameter(HINT_KEY); string error; personality_info *info = new personality_info; info->universe_id = universe_id; info->uid = new UID(uid); info->include_descriptions = include_descriptions || (hint == "l"); info->return_as_section = return_as_section; info->active = 0; info->next = 1; info->total = 0; m_rdm_api.GetDMXPersonality( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetPersonalityHandler, response, info), &error); return error; } /** * @brief Handle the response to a dmx personality call. */ void RDMHTTPModule::GetPersonalityHandler( HTTPResponse *response, personality_info *info, const ola::rdm::ResponseStatus &status, uint8_t current, uint8_t total) { if (CheckForRDMError(response, status)) { delete info->uid; delete info; return; } info->active = current; info->total = total; if (info->include_descriptions) { GetNextPersonalityDescription(response, info); } else { SendPersonalityResponse(response, info); } } /** * @brief Get the description of the next dmx personality */ void RDMHTTPModule::GetNextPersonalityDescription(HTTPResponse *response, personality_info *info) { string error; while (info->next <= info->total) { bool r = m_rdm_api.GetDMXPersonalityDescription( info->universe_id, *(info->uid), ola::rdm::ROOT_RDM_DEVICE, info->next, NewSingleCallback(this, &RDMHTTPModule::GetPersonalityLabelHandler, response, info), &error); if (r) { return; } info->next++; } if (info->return_as_section) { SendSectionPersonalityResponse(response, info); } else { SendPersonalityResponse(response, info); } } /** * @brief Handle the response to a Personality label call. * * This fetches the next personality in the sequence, or sends the response if * we have all the info. */ void RDMHTTPModule::GetPersonalityLabelHandler( HTTPResponse *response, personality_info *info, const ola::rdm::ResponseStatus &status, OLA_UNUSED uint8_t personality, uint16_t slot_count, const string &label) { string description = ""; uint32_t slots = INVALID_PERSONALITY; if (CheckForRDMSuccess(status)) { slots = slot_count; description = label; } info->personalities.push_back(pair(slots, description)); if (info->next == info->total) { if (info->return_as_section) { SendSectionPersonalityResponse(response, info); } else { SendPersonalityResponse(response, info); } } else { info->next++; GetNextPersonalityDescription(response, info); } } /** * @brief Send the response to a dmx personality section */ void RDMHTTPModule::SendSectionPersonalityResponse(HTTPResponse *response, personality_info *info) { JsonSection section; SelectItem *item = new SelectItem("Personality", GENERIC_UINT_FIELD); for (unsigned int i = 1; i <= info->total; i++) { if (i <= info->personalities.size() && info->personalities[i - 1].first != INVALID_PERSONALITY) { ostringstream str; str << info->personalities[i - 1].second << " (" << info->personalities[i - 1].first << ")"; item->AddItem(str.str(), i); } else { item->AddItem(IntToString(i), i); } if (info->active == i) { item->SetSelectedOffset(i - 1); } } section.AddItem(item); RespondWithSection(response, section); delete info->uid; delete info; } /** * @brief Set the personality */ string RDMHTTPModule::SetPersonality(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string personality_str = request->GetParameter(GENERIC_UINT_FIELD); uint8_t personality; if (!StringToInt(personality_str, &personality)) { return "Invalid personality"; } string error; m_rdm_api.SetDMXPersonality( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, personality, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the start address section. */ string RDMHTTPModule::GetStartAddress(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetDMXAddress( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetStartAddressHandler, response), &error); return error; } /** * @brief Handle the response to a dmx start address call and build the response */ void RDMHTTPModule::GetStartAddressHandler( HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint16_t address) { if (CheckForRDMError(response, status)) { return; } JsonSection section; GenericItem *item = NULL; if (address == ola::rdm::ZERO_FOOTPRINT_DMX_ADDRESS) { item = new StringItem("DMX Start Address", "N/A"); } else { UIntItem *uint_item = new UIntItem("DMX Start Address", address, ADDRESS_FIELD); uint_item->SetMin(DMX_MIN_SLOT_NUMBER); uint_item->SetMax(DMX_MAX_SLOT_NUMBER); item = uint_item; } section.AddItem(item); RespondWithSection(response, section); } /* * @brief Set the DMX start address */ string RDMHTTPModule::SetStartAddress(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string dmx_address = request->GetParameter(ADDRESS_FIELD); uint16_t address; if (!StringToInt(dmx_address, &address)) { return "Invalid start address"; } string error; m_rdm_api.SetDMXAddress( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, address, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the sensor section. */ string RDMHTTPModule::GetSensor(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string hint = request->GetParameter(HINT_KEY); uint8_t sensor_id; if (!StringToInt(hint, &sensor_id)) { return "Invalid hint (sensor #)"; } string error; m_rdm_api.GetSensorDefinition( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, sensor_id, NewSingleCallback(this, &RDMHTTPModule::SensorDefinitionHandler, response, universe_id, uid, sensor_id), &error); return error; } /** * @brief Handle the response to a sensor definition request. */ void RDMHTTPModule::SensorDefinitionHandler( HTTPResponse *response, unsigned int universe_id, const UID uid, uint8_t sensor_id, const ola::rdm::ResponseStatus &status, const ola::rdm::SensorDescriptor &definition) { ola::rdm::SensorDescriptor *definition_arg = NULL; if (CheckForRDMSuccess(status)) { definition_arg = new ola::rdm::SensorDescriptor(); *definition_arg = definition; } string error; m_rdm_api.GetSensorValue( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, sensor_id, NewSingleCallback(this, &RDMHTTPModule::SensorValueHandler, response, definition_arg), &error); if (!error.empty()) { m_server->ServeError(response, BACKEND_DISCONNECTED_ERROR + error); } } /** * @brief Handle the response to a sensor value request & build the response. */ void RDMHTTPModule::SensorValueHandler( HTTPResponse *response, ola::rdm::SensorDescriptor *definition, const ola::rdm::ResponseStatus &status, const ola::rdm::SensorValueDescriptor &value) { if (CheckForRDMError(response, status)) { if (definition) { delete definition; } return; } JsonSection section; ostringstream str; if (definition) { section.AddItem(new StringItem("Description", definition->description)); } str << value.present_value; if (definition) { str << " " << ola::rdm::PrefixToString(definition->prefix) << " " << ola::rdm::UnitToString(definition->unit); } section.AddItem(new StringItem("Present Value", str.str())); if (definition) { section.AddItem(new StringItem( "Type", ola::rdm::SensorTypeToString(definition->type))); str.str(""); str << definition->range_min << " - " << definition->range_max << " " << ola::rdm::PrefixToString(definition->prefix) << " " << ola::rdm::UnitToString(definition->unit); section.AddItem(new StringItem("Range", str.str())); str.str(""); str << definition->normal_min << " - " << definition->normal_max << " " << ola::rdm::PrefixToString(definition->prefix) << " " << ola::rdm::UnitToString(definition->unit); section.AddItem(new StringItem("Normal Range", str.str())); if (definition->recorded_value_support & ola::rdm::SENSOR_RECORDED_VALUE) { str.str(""); str << value.recorded << " " << ola::rdm::PrefixToString(definition->prefix) << " " << ola::rdm::UnitToString(definition->unit); section.AddItem(new StringItem("Recorded Value", str.str())); } if (definition->recorded_value_support & ola::rdm::SENSOR_RECORDED_RANGE_VALUES) { str.str(""); str << value.lowest << " - " << value.highest << " " << ola::rdm::PrefixToString(definition->prefix) << " " << ola::rdm::UnitToString(definition->unit); section.AddItem(new StringItem("Min / Max Recorded Values", str.str())); } } if (definition && definition->recorded_value_support) { section.AddItem(new HiddenItem("1", RECORD_SENSOR_FIELD)); } section.SetSaveButton("Record Sensor"); RespondWithSection(response, section); delete definition; } /* * @brief Record a sensor value */ string RDMHTTPModule::RecordSensor(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string hint = request->GetParameter(HINT_KEY); uint8_t sensor_id; if (!StringToInt(hint, &sensor_id)) { return "Invalid hint (sensor #)"; } string error; m_rdm_api.RecordSensors( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, sensor_id, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the device hours section. */ string RDMHTTPModule::GetDeviceHours(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetDeviceHours( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GenericUIntHandler, response, string("Device Hours")), &error); return error; } /** * @brief Set the device hours */ string RDMHTTPModule::SetDeviceHours(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string device_hours = request->GetParameter(GENERIC_UINT_FIELD); uint32_t dev_hours; if (!StringToInt(device_hours, &dev_hours)) { return "Invalid device hours"; } string error; m_rdm_api.SetDeviceHours( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, dev_hours, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the lamp hours section. */ string RDMHTTPModule::GetLampHours(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetLampHours( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GenericUIntHandler, response, string("Lamp Hours")), &error); return error; } /** * @brief Set the lamp hours */ string RDMHTTPModule::SetLampHours(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string lamp_hours_str = request->GetParameter(GENERIC_UINT_FIELD); uint32_t lamp_hours; if (!StringToInt(lamp_hours_str, &lamp_hours)) { return "Invalid lamp hours"; } string error; m_rdm_api.SetLampHours( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, lamp_hours, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the lamp strikes section */ string RDMHTTPModule::GetLampStrikes(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetLampStrikes( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GenericUIntHandler, response, string("Lamp Strikes")), &error); return error; } /** * @brief Set the lamp strikes */ string RDMHTTPModule::SetLampStrikes(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string lamp_strikes_str = request->GetParameter(GENERIC_UINT_FIELD); uint32_t lamp_strikes; if (!StringToInt(lamp_strikes_str, &lamp_strikes)) { return "Invalid lamp strikes"; } string error; m_rdm_api.SetLampStrikes( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, lamp_strikes, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the lamp state section */ string RDMHTTPModule::GetLampState(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetLampState( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::LampStateHandler, response), &error); return error; } /** * @brief Handle the response to lamp state call and build the response */ void RDMHTTPModule::LampStateHandler(HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint8_t state) { if (CheckForRDMError(response, status)) { return; } JsonSection section; SelectItem *item = new SelectItem("Lamp State", GENERIC_UINT_FIELD); typedef struct { string label; ola::rdm::rdm_lamp_state state; } values_s; values_s possible_values[] = { {"Off", ola::rdm::LAMP_OFF}, {"On", ola::rdm::LAMP_ON}, {"Strike", ola::rdm::LAMP_STRIKE}, {"Standby", ola::rdm::LAMP_STANDBY}}; for (unsigned int i = 0; i < sizeof(possible_values) / sizeof(values_s); ++i) { item->AddItem(possible_values[i].label, possible_values[i].state); if (state == possible_values[i].state) { item->SetSelectedOffset(i); } } section.AddItem(item); RespondWithSection(response, section); } /** * @brief Set the lamp state */ string RDMHTTPModule::SetLampState(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string lamp_state_str = request->GetParameter(GENERIC_UINT_FIELD); uint8_t lamp_state; if (!StringToInt(lamp_state_str, &lamp_state)) { return "Invalid lamp state"; } string error; m_rdm_api.SetLampState( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, lamp_state, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the lamp mode section */ string RDMHTTPModule::GetLampMode(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetLampMode( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::LampModeHandler, response), &error); return error; } /** * @brief Handle the response to lamp mode call and build the response */ void RDMHTTPModule::LampModeHandler(HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint8_t mode) { if (CheckForRDMError(response, status)) { return; } JsonSection section; SelectItem *item = new SelectItem("Lamp Mode", GENERIC_UINT_FIELD); typedef struct { string label; ola::rdm::rdm_lamp_mode mode; } values_s; values_s possible_values[] = { {"Off", ola::rdm::LAMP_ON_MODE_OFF}, {"DMX", ola::rdm::LAMP_ON_MODE_DMX}, {"On", ola::rdm::LAMP_ON_MODE_ON}, {"On After Calibration", ola::rdm::LAMP_ON_MODE_ON_AFTER_CAL}}; for (unsigned int i = 0; i < sizeof(possible_values) / sizeof(values_s); ++i) { item->AddItem(possible_values[i].label, possible_values[i].mode); if (mode == possible_values[i].mode) { item->SetSelectedOffset(i); } } section.AddItem(item); RespondWithSection(response, section); } /** * @brief Set the lamp mode */ string RDMHTTPModule::SetLampMode(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string lamp_mode_str = request->GetParameter(GENERIC_UINT_FIELD); uint8_t lamp_mode; if (!StringToInt(lamp_mode_str, &lamp_mode)) { return "Invalid lamp mode"; } string error; m_rdm_api.SetLampMode( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, lamp_mode, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the device power cycles section */ string RDMHTTPModule::GetPowerCycles(OLA_UNUSED const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetDevicePowerCycles( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GenericUIntHandler, response, string("Device Power Cycles")), &error); return error; } /** * @brief Set the device power cycles */ string RDMHTTPModule::SetPowerCycles(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string power_cycles_str = request->GetParameter(GENERIC_UINT_FIELD); uint32_t power_cycles; if (!StringToInt(power_cycles_str, &power_cycles)) { return "Invalid power cycles"; } string error; m_rdm_api.SetDevicePowerCycles( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, power_cycles, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the display invert section. */ string RDMHTTPModule::GetDisplayInvert(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetDisplayInvert( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::DisplayInvertHandler, response), &error); return error; } /** * @brief Handle the response to display invert call and build the response */ void RDMHTTPModule::DisplayInvertHandler( HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint8_t value) { if (CheckForRDMError(response, status)) { return; } JsonSection section; SelectItem *item = new SelectItem("Display Invert", DISPLAY_INVERT_FIELD); item->AddItem("Off", ola::rdm::DISPLAY_INVERT_OFF); item->AddItem("On", ola::rdm::DISPLAY_INVERT_ON); item->AddItem("Auto", ola::rdm::DISPLAY_INVERT_AUTO); if (value < ola::rdm::DISPLAY_INVERT_MAX) { item->SetSelectedOffset(value); } section.AddItem(item); RespondWithSection(response, section); } /** * @brief Set the display invert. */ string RDMHTTPModule::SetDisplayInvert(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string invert_field = request->GetParameter(DISPLAY_INVERT_FIELD); uint8_t display_invert; if (!StringToInt(invert_field, &display_invert)) { return "Invalid display invert"; } string error; m_rdm_api.SetDisplayInvert( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, display_invert, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the display level section. */ string RDMHTTPModule::GetDisplayLevel(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetDisplayLevel( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::DisplayLevelHandler, response), &error); return error; } /** * @brief Handle the response to display level call and build the response */ void RDMHTTPModule::DisplayLevelHandler(HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint8_t value) { if (CheckForRDMError(response, status)) { return; } JsonSection section; UIntItem *item = new UIntItem("Display Level", value, GENERIC_UINT_FIELD); item->SetMin(std::numeric_limits::min()); item->SetMax(std::numeric_limits::max()); section.AddItem(item); RespondWithSection(response, section); } /** * @brief Set the display level. */ string RDMHTTPModule::SetDisplayLevel(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string display_level_str = request->GetParameter(GENERIC_UINT_FIELD); uint8_t display_level; if (!StringToInt(display_level_str, &display_level)) { return "Invalid display level"; } string error; m_rdm_api.SetDisplayLevel( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, display_level, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the pan invert section. */ string RDMHTTPModule::GetPanInvert(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetPanInvert( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GenericUInt8BoolHandler, response, string("Pan Invert")), &error); return error; } /** * @brief Set the pan invert. */ string RDMHTTPModule::SetPanInvert(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string mode = request->GetParameter(GENERIC_BOOL_FIELD); string error; m_rdm_api.SetPanInvert( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, mode == "1", NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the tilt invert section. */ string RDMHTTPModule::GetTiltInvert(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetTiltInvert( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GenericUInt8BoolHandler, response, string("Tilt Invert")), &error); return error; } /** * @brief Set the tilt invert. */ string RDMHTTPModule::SetTiltInvert(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string mode = request->GetParameter(GENERIC_BOOL_FIELD); string error; m_rdm_api.SetTiltInvert( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, mode == "1", NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the pan/tilt swap section. */ string RDMHTTPModule::GetPanTiltSwap(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetPanTiltSwap( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GenericUInt8BoolHandler, response, string("Pan Tilt Swap")), &error); return error; } /** * @brief Set the pan/tilt swap. */ string RDMHTTPModule::SetPanTiltSwap(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string mode = request->GetParameter(GENERIC_BOOL_FIELD); string error; m_rdm_api.SetPanTiltSwap( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, mode == "1", NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the clock section. */ string RDMHTTPModule::GetClock(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetClock( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::ClockHandler, response), &error); return error; } /** * @brief Handle the response to clock call and build the response */ void RDMHTTPModule::ClockHandler(HTTPResponse *response, const ola::rdm::ResponseStatus &status, const ola::rdm::ClockValue &clock) { if (CheckForRDMError(response, status)) { return; } JsonSection section; ostringstream str; str << std::setfill('0') << std::setw(2) << static_cast(clock.hour) << ":" << std::setw(2) << static_cast(clock.minute) << ":" << std::setw(2) << static_cast(clock.second) << " " << static_cast(clock.day) << "/" << static_cast(clock.month) << "/" << clock.year; section.AddItem(new StringItem("Clock", str.str())); section.AddItem(new HiddenItem("1", GENERIC_UINT_FIELD)); section.SetSaveButton("Sync to Server"); RespondWithSection(response, section); } /** * @brief Sync the clock */ string RDMHTTPModule::SyncClock(HTTPResponse *response, unsigned int universe_id, const UID &uid) { time_t now = time(NULL); struct tm now_tm; #ifdef _WIN32 memcpy(&now_tm, localtime(&now), sizeof(now_tm)); #else localtime_r(&now, &now_tm); #endif // _WIN32 ola::rdm::ClockValue clock_value; clock_value.year = now_tm.tm_year + 1900; clock_value.month = now_tm.tm_mon + 1; clock_value.day = now_tm.tm_mday; clock_value.hour = now_tm.tm_hour; clock_value.minute = now_tm.tm_min; clock_value.second = now_tm.tm_sec; string error; m_rdm_api.SetClock( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, clock_value, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the identify device section. */ string RDMHTTPModule::GetIdentifyDevice(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetIdentifyDevice( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GenericBoolHandler, response, string("Identify Device")), &error); return error; } /* * @brief Set identify device */ string RDMHTTPModule::SetIdentifyDevice(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string mode = request->GetParameter(GENERIC_BOOL_FIELD); string error; m_rdm_api.IdentifyDevice( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, mode == "1", NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the power state section. */ string RDMHTTPModule::GetPowerState(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetPowerState( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::PowerStateHandler, response), &error); return error; } /** * @brief Handle the response to power state call and build the response */ void RDMHTTPModule::PowerStateHandler(HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint8_t value) { if (CheckForRDMError(response, status)) { return; } JsonSection section; SelectItem *item = new SelectItem("Power State", GENERIC_UINT_FIELD); typedef struct { string label; ola::rdm::rdm_power_state state; } values_s; values_s possible_values[] = { {"Full Off", ola::rdm::POWER_STATE_FULL_OFF}, {"Shutdown", ola::rdm::POWER_STATE_SHUTDOWN}, {"Standby", ola::rdm::POWER_STATE_STANDBY}, {"Normal", ola::rdm::POWER_STATE_NORMAL}}; for (unsigned int i = 0; i < sizeof(possible_values) / sizeof(values_s); ++i) { item->AddItem(possible_values[i].label, possible_values[i].state); if (value == possible_values[i].state) { item->SetSelectedOffset(i); } } section.AddItem(item); RespondWithSection(response, section); } /* * @brief Set the power state. */ string RDMHTTPModule::SetPowerState(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string power_state_str = request->GetParameter(GENERIC_UINT_FIELD); uint8_t power_state; ola::rdm::rdm_power_state power_state_enum; if (!StringToInt(power_state_str, &power_state) || !ola::rdm::UIntToPowerState(power_state, &power_state_enum)) { return "Invalid power state"; } string error; m_rdm_api.SetPowerState( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, power_state_enum, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the device reset section. */ string RDMHTTPModule::GetResetDevice(HTTPResponse *response) { JsonSection section = JsonSection(false); SelectItem *item = new SelectItem("Reset Device", GENERIC_UINT_FIELD); typedef struct { string label; ola::rdm::rdm_reset_device_mode state; } values_s; values_s possible_values[] = { {"Warm Reset", ola::rdm::RESET_WARM}, {"Cold Reset", ola::rdm::RESET_COLD}}; for (unsigned int i = 0; i < sizeof(possible_values) / sizeof(values_s); ++i) { item->AddItem(possible_values[i].label, possible_values[i].state); } section.AddItem(item); section.SetSaveButton("Reset Device"); RespondWithSection(response, section); return ""; } /* * @brief Set the reset device. */ string RDMHTTPModule::SetResetDevice(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string reset_device_str = request->GetParameter(GENERIC_UINT_FIELD); uint8_t reset_device; ola::rdm::rdm_reset_device_mode reset_device_enum; if (!StringToInt(reset_device_str, &reset_device) || !ola::rdm::UIntToResetDevice(reset_device, &reset_device_enum)) { return "Invalid reset device"; } string error; m_rdm_api.SetResetDevice( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, reset_device_enum, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the DNS Hostname. */ string RDMHTTPModule::GetDnsHostname(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetDnsHostname( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetDnsHostnameHandler, response), &error); return error; } /** * @brief Handle the response to a DNS hostname call and build the response */ void RDMHTTPModule::GetDnsHostnameHandler( HTTPResponse *response, const ola::rdm::ResponseStatus &status, const string &label) { if (CheckForRDMError(response, status)) { return; } JsonSection section; section.AddItem(new StringItem("Hostname", label, GENERIC_STRING_FIELD)); RespondWithSection(response, section); } /* * @brief Set the DNS hostname */ string RDMHTTPModule::SetDnsHostname(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string label = request->GetParameter(GENERIC_STRING_FIELD); string error; m_rdm_api.SetDnsHostname( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, label, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Handle the request for the DNS domain name. */ string RDMHTTPModule::GetDnsDomainName(HTTPResponse *response, unsigned int universe_id, const UID &uid) { string error; m_rdm_api.GetDnsDomainName( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMHTTPModule::GetDnsDomainNameHandler, response), &error); return error; } /** * @brief Handle the response to a DNS domain name call and build the response */ void RDMHTTPModule::GetDnsDomainNameHandler( HTTPResponse *response, const ola::rdm::ResponseStatus &status, const string &label) { if (CheckForRDMError(response, status)) { return; } JsonSection section; section.AddItem(new StringItem("Domain Name", label, GENERIC_STRING_FIELD)); RespondWithSection(response, section); } /* * @brief Set the DNS domain name */ string RDMHTTPModule::SetDnsDomainName(const HTTPRequest *request, HTTPResponse *response, unsigned int universe_id, const UID &uid) { string label = request->GetParameter(GENERIC_STRING_FIELD); string error; m_rdm_api.SetDnsDomainName( universe_id, uid, ola::rdm::ROOT_RDM_DEVICE, label, NewSingleCallback(this, &RDMHTTPModule::SetHandler, response), &error); return error; } /** * @brief Check if the id URL param exists and is valid. */ bool RDMHTTPModule::CheckForInvalidId(const HTTPRequest *request, unsigned int *universe_id) { string uni_id = request->GetParameter(ID_KEY); if (!StringToInt(uni_id, universe_id)) { OLA_INFO << "Invalid universe id: " << uni_id; return false; } return true; } /** * @brief Check that the uid URL param exists and is valid. */ bool RDMHTTPModule::CheckForInvalidUid(const HTTPRequest *request, UID **uid) { string uid_string = request->GetParameter(UID_KEY); *uid = UID::FromString(uid_string); if (*uid == NULL) { OLA_INFO << "Invalid UID: " << uid_string; return false; } return true; } /** * @brief Get the sub device from the HTTP request, or return ROOT_DEVICE if it * isn't valid. */ uint16_t RDMHTTPModule::SubDeviceOrRoot(const HTTPRequest *request) { string sub_device_str = request->GetParameter(SUB_DEVICE_FIELD); uint16_t sub_device; if (StringToInt(sub_device_str, &sub_device)) { return sub_device; } OLA_INFO << "Invalid sub device " << sub_device_str; return ola::rdm::ROOT_RDM_DEVICE; } /* * @brief Check the response to a Set RDM call and build the response. */ void RDMHTTPModule::SetHandler( HTTPResponse *response, const ola::rdm::ResponseStatus &status) { string error; CheckForRDMSuccessWithError(status, &error); RespondWithError(response, error); } /* * @brief Build a response to a RDM call that returns a uint32_t */ void RDMHTTPModule::GenericUIntHandler(HTTPResponse *response, string description, const ola::rdm::ResponseStatus &status, uint32_t value) { if (CheckForRDMError(response, status)) { return; } JsonSection section; section.AddItem(new UIntItem(description, value, GENERIC_UINT_FIELD)); RespondWithSection(response, section); } /* * @brief Build a response to a RDM call that returns a bool */ void RDMHTTPModule::GenericUInt8BoolHandler( HTTPResponse *response, string description, const ola::rdm::ResponseStatus &status, uint8_t value) { GenericBoolHandler(response, description, status, value > 0); } /* * @brief Build a response to a RDM call that returns a bool */ void RDMHTTPModule::GenericBoolHandler(HTTPResponse *response, string description, const ola::rdm::ResponseStatus &status, bool value) { if (CheckForRDMError(response, status)) { return; } JsonSection section; section.AddItem(new BoolItem(description, value, GENERIC_BOOL_FIELD)); RespondWithSection(response, section); } /** * @brief Check for an RDM error, and if it occurs, return a JSON response. * @return true if an error occurred. */ bool RDMHTTPModule::CheckForRDMError(HTTPResponse *response, const ola::rdm::ResponseStatus &status) { string error; if (!CheckForRDMSuccessWithError(status, &error)) { RespondWithError(response, error); return true; } return false; } int RDMHTTPModule::RespondWithError(HTTPResponse *response, const string &error) { response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); JsonObject json; json.Add("error", error); int r = response->SendJson(json); delete response; return r; } /** * @brief Build & send a response from a JsonSection */ void RDMHTTPModule::RespondWithSection(HTTPResponse *response, const ola::web::JsonSection §ion) { response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->Append(section.AsString()); response->Send(); delete response; } /* * @brief Check the success of an RDM command * @returns true if this command was ok, false otherwise. */ bool RDMHTTPModule::CheckForRDMSuccess( const ola::rdm::ResponseStatus &status) { string error; if (!CheckForRDMSuccessWithError(status, &error)) { OLA_INFO << error; return false; } return true; } /* * @brief Check the success of an RDM command or return an error message. * * At the moment we're very strict in this method, some day this should be * relaxed to handle the corner cases. * @returns true if this command returns an ACK. false for any other condition. */ bool RDMHTTPModule::CheckForRDMSuccessWithError( const ola::rdm::ResponseStatus &status, string *error) { ostringstream str; if (!status.error.empty()) { str << "RDM command error: " << status.error; if (error) { *error = str.str(); } return false; } // TODO(simon): One day we should handle broadcast responses, ack timers etc. if (status.response_code != ola::rdm::RDM_COMPLETED_OK) { if (error) { *error = ola::rdm::StatusCodeToString(status.response_code); } } else { switch (status.response_type) { case ola::rdm::RDM_ACK: return true; case ola::rdm::RDM_ACK_TIMER: str << "Got ACK Timer for " << status.AckTimer() << " ms"; if (error) { *error = str.str(); } break; case ola::rdm::RDM_NACK_REASON: str << "Request was NACKED with code: " << ola::rdm::NackReasonToString(status.NackReason()); OLA_INFO << str.str(); if (error) { *error = str.str(); } } } return false; } /* * @brief Handle the RDM discovery response * @param response the HTTPResponse that is associated with the request. * @param error an error string. */ void RDMHTTPModule::HandleBoolResponse(HTTPResponse *response, const string &error) { if (!error.empty()) { m_server->ServeError(response, error); return; } response->SetNoCache(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); response->Append("ok"); response->Send(); delete response; } /** * @brief Add a section to the supported section list */ void RDMHTTPModule::AddSection(vector *sections, const string §ion_id, const string §ion_name, const string &hint) { section_info info = {section_id, section_name, hint}; sections->push_back(info); } } // namespace ola ola-0.10.9/olad/www/0000775000175000017500000000000014376533270011134 500000000000000ola-0.10.9/olad/www/toolbar.css0000664000175000017500000002455614376533110013235 00000000000000/* * Copyright 2009 The Closure Library Authors. All Rights Reserved. * * Use of this source code is governed by an Apache 2.0 License. * See the COPYING file for details. */ /* * Standard styling for toolbars and toolbar items. * * @author attila@google.com (Attila Bodis) */ /* * Styles used by goog.ui.ToolbarRenderer. */ .goog-toolbar { background: #fafafa url(/toolbar-bg.png) repeat-x bottom left; border-bottom: 1px solid #d5d5d5; cursor: default; font: normal 12px Arial, sans-serif; margin: 0; outline: none; padding: 2px; position: relative; zoom: 1; /* The toolbar element must have layout on IE. */ } /* * Styles used by goog.ui.ToolbarButtonRenderer. */ .goog-toolbar-button { margin: 0 2px; border: 0; padding: 0; font-family: Arial, sans-serif; color: #333; text-decoration: none; list-style: none; vertical-align: middle; cursor: default; outline: none; } /* Pseudo-rounded corners. */ .goog-toolbar-button-outer-box, .goog-toolbar-button-inner-box { border: 0; vertical-align: top; } .goog-toolbar-button-outer-box { margin: 0; padding: 1px 0; } .goog-toolbar-button-inner-box { margin: 0 -1px; padding: 3px 4px; } /* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */ * html .goog-toolbar-button-inner-box { /* IE6 needs to have the box shifted to make the borders line up. */ left: -1px; } /* Pre-IE7 BiDi fixes. */ * html .goog-toolbar-button-rtl .goog-toolbar-button-outer-box { /* @noflip */ left: -1px; } * html .goog-toolbar-button-rtl .goog-toolbar-button-inner-box { /* @noflip */ right: auto; } /* IE7-only hack; ignored by all other browsers. */ *:first-child+html .goog-toolbar-button-inner-box { /* IE7 needs to have the box shifted to make the borders line up. */ left: -1px; } /* IE7 BiDi fix. */ *:first-child+html .goog-toolbar-button-rtl .goog-toolbar-button-inner-box { /* @noflip */ left: 1px; /* @noflip */ right: auto; } /* Safari-only hacks. */ ::root .goog-toolbar-button, ::root .goog-toolbar-button-outer-box { /* Required to make pseudo-rounded corners work on Safari. */ line-height: 0; } ::root .goog-toolbar-button-inner-box { /* Required to make pseudo-rounded corners work on Safari. */ line-height: normal; } /* Disabled styles. */ .goog-toolbar-button-disabled { opacity: 0.3; -moz-opacity: 0.3; filter: alpha(opacity=30); } .goog-toolbar-button-disabled .goog-toolbar-button-outer-box, .goog-toolbar-button-disabled .goog-toolbar-button-inner-box { /* Disabled text/border color trumps everything else. */ color: #333 !important; border-color: #999 !important; } /* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */ * html .goog-toolbar-button-disabled { /* IE can't apply alpha to an element with a transparent background... */ background-color: #f0f0f0; margin: 0 1px; padding: 0 1px; } /* IE7-only hack; ignored by all other browsers. */ *:first-child+html .goog-toolbar-button-disabled { /* IE can't apply alpha to an element with a transparent background... */ background-color: #f0f0f0; margin: 0 1px; padding: 0 1px; } /* Only draw borders when in a non-default state. */ .goog-toolbar-button-hover .goog-toolbar-button-outer-box, .goog-toolbar-button-active .goog-toolbar-button-outer-box, .goog-toolbar-button-checked .goog-toolbar-button-outer-box, .goog-toolbar-button-selected .goog-toolbar-button-outer-box { border-width: 1px 0; border-style: solid; padding: 0; } .goog-toolbar-button-hover .goog-toolbar-button-inner-box, .goog-toolbar-button-active .goog-toolbar-button-inner-box, .goog-toolbar-button-checked .goog-toolbar-button-inner-box, .goog-toolbar-button-selected .goog-toolbar-button-inner-box { border-width: 0 1px; border-style: solid; padding: 3px; } /* Hover styles. */ .goog-toolbar-button-hover .goog-toolbar-button-outer-box, .goog-toolbar-button-hover .goog-toolbar-button-inner-box { /* Hover border style wins over active/checked/selected. */ border-color: #a1badf !important; } /* Active/checked/selected styles. */ .goog-toolbar-button-active, .goog-toolbar-button-checked, .goog-toolbar-button-selected { /* Active/checked/selected background color always wins. */ background-color: #dde1eb !important; } .goog-toolbar-button-active .goog-toolbar-button-outer-box, .goog-toolbar-button-active .goog-toolbar-button-inner-box, .goog-toolbar-button-checked .goog-toolbar-button-outer-box, .goog-toolbar-button-checked .goog-toolbar-button-inner-box, .goog-toolbar-button-selected .goog-toolbar-button-outer-box, .goog-toolbar-button-selected .goog-toolbar-button-inner-box { border-color: #729bd1; } /* Pill (collapsed border) styles. */ .goog-toolbar-button-collapse-right, .goog-toolbar-button-collapse-right .goog-toolbar-button-outer-box, .goog-toolbar-button-collapse-right .goog-toolbar-button-inner-box { margin-right: 0; } .goog-toolbar-button-collapse-left, .goog-toolbar-button-collapse-left .goog-toolbar-button-outer-box, .goog-toolbar-button-collapse-left .goog-toolbar-button-inner-box { margin-left: 0; } /* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */ * html .goog-toolbar-button-collapse-left .goog-toolbar-button-inner-box { left: 0; } /* IE7-only hack; ignored by all other browsers. */ *:first-child+html .goog-toolbar-button-collapse-left .goog-toolbar-button-inner-box { left: 0; } /* * Styles used by goog.ui.ToolbarMenuButtonRenderer. */ .goog-toolbar-menu-button { margin: 0 2px; border: 0; padding: 0; font-family: Arial, sans-serif; color: #333; text-decoration: none; list-style: none; vertical-align: middle; cursor: default; outline: none; } /* Pseudo-rounded corners. */ .goog-toolbar-menu-button-outer-box, .goog-toolbar-menu-button-inner-box { border: 0; vertical-align: top; } .goog-toolbar-menu-button-outer-box { margin: 0; padding: 1px 0; } .goog-toolbar-menu-button-inner-box { margin: 0 -1px; padding: 3px 4px; } /* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */ * html .goog-toolbar-menu-button-inner-box { /* IE6 needs to have the box shifted to make the borders line up. */ left: -1px; } /* Pre-IE7 BiDi fixes. */ * html .goog-toolbar-menu-button-rtl .goog-toolbar-menu-button-outer-box { /* @noflip */ left: -1px; } * html .goog-toolbar-menu-button-rtl .goog-toolbar-menu-button-inner-box { /* @noflip */ right: auto; } /* IE7-only hack; ignored by all other browsers. */ *:first-child+html .goog-toolbar-menu-button-inner-box { /* IE7 needs to have the box shifted to make the borders line up. */ left: -1px; } /* IE7 BiDi fix. */ *:first-child+html .goog-toolbar-menu-button-rtl .goog-toolbar-menu-button-inner-box { /* @noflip */ left: 1px; /* @noflip */ right: auto; } /* Safari-only hacks. */ ::root .goog-toolbar-menu-button, ::root .goog-toolbar-menu-button-outer-box, ::root .goog-toolbar-menu-button-inner-box { /* Required to make pseudo-rounded corners work on Safari. */ line-height: 0; } ::root .goog-toolbar-menu-button-caption, ::root .goog-toolbar-menu-button-dropdown { /* Required to make pseudo-rounded corners work on Safari. */ line-height: normal; } /* Disabled styles. */ .goog-toolbar-menu-button-disabled { opacity: 0.3; -moz-opacity: 0.3; filter: alpha(opacity=30); } .goog-toolbar-menu-button-disabled .goog-toolbar-menu-button-outer-box, .goog-toolbar-menu-button-disabled .goog-toolbar-menu-button-inner-box { /* Disabled text/border color trumps everything else. */ color: #333 !important; border-color: #999 !important; } /* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */ * html .goog-toolbar-menu-button-disabled { /* IE can't apply alpha to an element with a transparent background... */ background-color: #f0f0f0; margin: 0 1px; padding: 0 1px; } /* IE7-only hack; ignored by all other browsers. */ *:first-child+html .goog-toolbar-menu-button-disabled { /* IE can't apply alpha to an element with a transparent background... */ background-color: #f0f0f0; margin: 0 1px; padding: 0 1px; } /* Only draw borders when in a non-default state. */ .goog-toolbar-menu-button-hover .goog-toolbar-menu-button-outer-box, .goog-toolbar-menu-button-active .goog-toolbar-menu-button-outer-box, .goog-toolbar-menu-button-open .goog-toolbar-menu-button-outer-box { border-width: 1px 0; border-style: solid; padding: 0; } .goog-toolbar-menu-button-hover .goog-toolbar-menu-button-inner-box, .goog-toolbar-menu-button-active .goog-toolbar-menu-button-inner-box, .goog-toolbar-menu-button-open .goog-toolbar-menu-button-inner-box { border-width: 0 1px; border-style: solid; padding: 3px; } /* Hover styles. */ .goog-toolbar-menu-button-hover .goog-toolbar-menu-button-outer-box, .goog-toolbar-menu-button-hover .goog-toolbar-menu-button-inner-box { /* Hover border color trumps active/open style. */ border-color: #a1badf !important; } /* Active/open styles. */ .goog-toolbar-menu-button-active, .goog-toolbar-menu-button-open { /* Active/open background color wins. */ background-color: #dde1eb !important; } .goog-toolbar-menu-button-active .goog-toolbar-menu-button-outer-box, .goog-toolbar-menu-button-active .goog-toolbar-menu-button-inner-box, .goog-toolbar-menu-button-open .goog-toolbar-menu-button-outer-box, .goog-toolbar-menu-button-open .goog-toolbar-menu-button-inner-box { border-color: #729bd1; } /* Menu button caption style. */ .goog-toolbar-menu-button-caption { padding: 0 4px 0 0; vertical-align: middle; } /* Dropdown style. */ .goog-toolbar-menu-button-dropdown { width: 7px; /* Client apps may override the URL at which they serve the sprite. */ background: url(/editortoolbar.png) no-repeat -388px 0; vertical-align: middle; } /* * Styles used by goog.ui.ToolbarSeparatorRenderer. */ .goog-toolbar-separator { margin: 0 2px; border-left: 1px solid #d6d6d6; border-right: 1px solid #f7f7f7; padding: 0; width: 0; text-decoration: none; list-style: none; outline: none; vertical-align: middle; line-height: normal; font-size: 120%; overflow: hidden; } /* * Additional styling for toolbar select controls, which always have borders. */ .goog-toolbar-select .goog-toolbar-menu-button-outer-box { border-width: 1px 0; border-style: solid; padding: 0; } .goog-toolbar-select .goog-toolbar-menu-button-inner-box { border-width: 0 1px; border-style: solid; padding: 3px; } .goog-toolbar-select .goog-toolbar-menu-button-outer-box, .goog-toolbar-select .goog-toolbar-menu-button-inner-box { border-color: #bfcbdf; } ola-0.10.9/olad/www/button-bg.png0000664000175000017500000000064614376533110013462 00000000000000‰PNG  IHDRôÆýÇâÀPLTEÿÿÿàßàèèèþþþÚÙÙãäãïïïÈÇÇïïðÇÇÇÞÞÞüüýÛÛÛö÷ööö÷ßßßáááýýüÙÙÚÿÿÿøøùíííêêêòñò½¼½ÎÎÎÊÊÊ¿¿¿ôôô×××ÄÄÄäãäÁÁÁååæçèèàààæååæææáâá÷ö÷÷÷öþýþÜÜÛæåæÛÜÜßààÑÑÑââáÙÙÙÜÛÛÚÚÙäääåææÈÈÇÛÜÛããäææåðïï»»»âááâáâÔÔÔýüýúûû$@i>tRNS@æØf”IDATx^íÅUBQCÑÞçn¨»»»ÌV@š0>ÎêNŠa¢ëßà§©Ÿ>}¼yB8£0¡N(,ëâXŽƒ¡HÐ4­ûúó`ÖÙÃ4ÍÖîÔÂ0I’ûêµPqO)xžÂ?B!„B!®ôû2¡Fhšûຶk£J¨–„¡A0 c›­3Á|3 ŽoæyëéEtIEND®B`‚ola-0.10.9/olad/www/hide_sections.png0000664000175000017500000000572014376533110014377 00000000000000‰PNG  IHDR(-S pHYs  ÒÝ~ü OiCCPPhotoshop ICC profilexÚSgTSé=÷ÞôBKˆ€”KoR RB‹€‘&*! Jˆ!¡ÙQÁEEÈ ˆŽŽ€ŒQ, Š Øä!¢Žƒ£ˆŠÊûá{£kÖ¼÷æÍþµ×>ç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅFiPLTEÿÿÿÿÿÿT¦&n³'n´LDe````”Ç`”Ȭ ÿ2ÿ5ÿ6ÿ;ÿ<ÿB ÿDÿKÿMÿTÿVÿ\"ÿš€ÿœƒÿ …ÿ¤‰ÿ©Œÿ­ÿ¯‘ÿ±“ÿ²”ÿµ–ÿÿÿ¿îí6tRNS¬U¢fIDATÓmË‚0;ô"ŸŠ ðÿ鯖r`v™ENâmq€€} Šñ#Gh“v©0“™ÐQ ŸîݾžMߺº]NGEÿ¸_Ï¥÷k™4Ûq@(‹¥ë_o§ü+ Ôtã×IEND®B`‚ola-0.10.9/olad/www/custombutton.css0000664000175000017500000001051714376533110014331 00000000000000/* * Copyright 2009 The Closure Library Authors. All Rights Reserved. * * Use of this source code is governed by an Apache 2.0 License. * See the COPYING file for details. */ /* * Styling for custom buttons rendered by goog.ui.CustomButtonRenderer. * * @author attila@google.com (Attila Bodis) */ .goog-custom-button { margin: 2px; border: 0; padding: 0; font-family: Arial, sans-serif; color: #000; /* Client apps may override the URL at which they serve the image. */ background: #ddd url(/button-bg.png) repeat-x top left; text-decoration: none; list-style: none; vertical-align: middle; cursor: default; outline: none; } /* Pseudo-rounded corners. */ .goog-custom-button-outer-box, .goog-custom-button-inner-box { border-style: solid; border-color: #aaa; vertical-align: top; } .goog-custom-button-outer-box { margin: 0; border-width: 1px 0; padding: 0; } .goog-custom-button-inner-box { /* By default in FF2, block elements inside a moz-inline-box are stacked * horizontally next to each other. This stops that weird behavior. */ -moz-box-orient: vertical; margin: 0 -1px; border-width: 0 1px; padding: 3px 4px; white-space: nowrap; /* Prevents buttons from line breaking on android. */ } /* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */ * html .goog-custom-button-inner-box { /* IE6 needs to have the box shifted to make the borders line up. */ left: -1px; } /* Pre-IE7 BiDi fixes. */ * html .goog-custom-button-rtl .goog-custom-button-outer-box { /* @noflip */ left: -1px; } * html .goog-custom-button-rtl .goog-custom-button-inner-box { /* @noflip */ right: auto; } /* IE7-only hack; ignored by all other browsers. */ *:first-child+html .goog-custom-button-inner-box { /* IE7 needs to have the box shifted to make the borders line up. */ left: -1px; } /* IE7 BiDi fix. */ *:first-child+html .goog-custom-button-rtl .goog-custom-button-inner-box { /* @noflip */ left: 1px; } /* Safari-only hacks. */ ::root .goog-custom-button, ::root .goog-custom-button-outer-box { /* Required to make pseudo-rounded corners work on Safari. */ line-height: 0; } ::root .goog-custom-button-inner-box { /* Required to make pseudo-rounded corners work on Safari. */ line-height: normal; } /* State: disabled. */ .goog-custom-button-disabled { background-image: none !important; opacity: 0.3; -moz-opacity: 0.3; filter: alpha(opacity=30); } .goog-custom-button-disabled .goog-custom-button-outer-box, .goog-custom-button-disabled .goog-custom-button-inner-box { color: #333 !important; border-color: #999 !important; } /* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */ * html .goog-custom-button-disabled { margin: 2px 1px !important; padding: 0 1px !important; } /* IE7-only hack; ignored by all other browsers. */ *:first-child+html .goog-custom-button-disabled { margin: 2px 1px !important; padding: 0 1px !important; } /* State: hover. */ .goog-custom-button-hover .goog-custom-button-outer-box, .goog-custom-button-hover .goog-custom-button-inner-box { border-color: #9cf #69e #69e #7af !important; /* Hover border wins. */ } /* State: active, checked. */ .goog-custom-button-active, .goog-custom-button-checked { background-color: #bbb; background-position: bottom left; } /* State: focused. */ .goog-custom-button-focused .goog-custom-button-outer-box, .goog-custom-button-focused .goog-custom-button-inner-box { border-color: orange; } /* Pill (collapsed border) styles. */ .goog-custom-button-collapse-right, .goog-custom-button-collapse-right .goog-custom-button-outer-box, .goog-custom-button-collapse-right .goog-custom-button-inner-box { margin-right: 0; } .goog-custom-button-collapse-left, .goog-custom-button-collapse-left .goog-custom-button-outer-box, .goog-custom-button-collapse-left .goog-custom-button-inner-box { margin-left: 0; } .goog-custom-button-collapse-left .goog-custom-button-inner-box { border-left: 1px solid #fff; } .goog-custom-button-collapse-left.goog-custom-button-checked .goog-custom-button-inner-box { border-left: 1px solid #ddd; } /* Pre-IE7 IE hack; ignored by IE7 and all non-IE browsers. */ * html .goog-custom-button-collapse-left .goog-custom-button-inner-box { left: 0; } /* IE7-only hack; ignored by all other browsers. */ *:first-child+html .goog-custom-button-collapse-left .goog-custom-button-inner-box { left: 0; } ola-0.10.9/olad/www/wand.png0000664000175000017500000000107214376533110012504 00000000000000‰PNG  IHDRóÿagAMA¯È7ŠétEXtSoftwareAdobe ImageReadyqÉe<ÌIDAT8Ë•’ÁK"aÆ¿SÔ!bteY¥ÃË!!º°¨)ê‚:ÖMìžE—]ö´†èÑ[Hç žZ©eˆÝA¦è TÆÊ¶,¸þ 5}Œ3‡ðÙo&Ú‹Žåá/óñ{Þ—‡!ÈS(gÎ1åln¥ßÛiÞÎX˜g£ÊéÛ†1KÓÓTzµòdÀƒ8÷“‰‚"Í©—‹P$Ç'ZµÝR‘K=/àôMV½JAû½­õ‹(¨8Ù¡ß'ÆMع/ØVQ‘^C½ä¡ýÍãdG£²ŒVuúä£ÉÎà$G¶ÓXÂÉ~š¦¡Ûíââk êõdüb8L¨ô’£U«‹ÅP¯×¡ª*šÍ&ª»Qh>BþF(ÃÓ7€•d§âT%‘H N£X,¢\.ãhgÉŸuùžq.’-Ó xž7dǃ@ €x<å<Š;ц;ar…ØMK|”Ýn7ü~?,‹¾u›m¼g¼crC> ™¾Éd…BÁ}>8Žƒþ‰ï™(èóÍa|è ˆD"Èçó=ò#L ™þÊÁ`¹\.— ^¯·GÉd2h·Ûp:…BCÉÿjµJ¥’QØ0²‡7õ³­VëвÎ?P ³µ¯vIEND®B`‚ola-0.10.9/olad/www/vertical.gif0000664000175000017500000000006614376533110013347 00000000000000GIF89a‘œ™œ´²´ÅÂÅæææ!ù,œ"€_;ola-0.10.9/olad/www/mobile.js0000664000175000017500000026372514376533110012671 00000000000000function e(a){throw a;}var k=void 0,m=null;function aa(){return function(){}}function ba(a){return function(b){this[a]=b}}function p(a){return function(){return this[a]}}function r(a){return function(){return a}}var s,ca=ca||{},u=this;function da(a){for(var a=a.split("."),b=u,c;c=a.shift();)if(b[c]!=m)b=b[c];else return m;return b}function v(){}function y(a){a.p=function(){return a.Ke||(a.Ke=new a)}} function ea(a){var b=typeof a;if(b=="object")if(a){if(a instanceof Array)return"array";else if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(c=="[object Window]")return"object";if(c=="[object Array]"||typeof a.length=="number"&&typeof a.splice!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("splice"))return"array";if(c=="[object Function]"||typeof a.call!="undefined"&&typeof a.propertyIsEnumerable!="undefined"&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; else if(b=="function"&&typeof a.call=="undefined")return"object";return b}function fa(a){return a!==k}function ga(a){return ea(a)=="array"}function ha(a){var b=ea(a);return b=="array"||b=="object"&&typeof a.length=="number"}function z(a){return typeof a=="string"}function ia(a){return typeof a=="number"}function ja(a){return ea(a)=="function"}function ka(a){a=ea(a);return a=="object"||a=="array"||a=="function"}function la(a){return a[ma]||(a[ma]=++na)} var ma="closure_uid_"+Math.floor(Math.random()*2147483648).toString(36),na=0;function oa(a,b,c){return a.call.apply(a.bind,arguments)}function pa(a,b,c){a||e(Error());if(arguments.length>2){var d=Array.prototype.slice.call(arguments,2);return function(){var c=Array.prototype.slice.call(arguments);Array.prototype.unshift.apply(c,d);return a.apply(b,c)}}else return function(){return a.apply(b,arguments)}} function qa(a,b,c){qa=Function.prototype.bind&&Function.prototype.bind.toString().indexOf("native code")!=-1?oa:pa;return qa.apply(m,arguments)}function ra(a,b){var c=Array.prototype.slice.call(arguments,1);return function(){var b=Array.prototype.slice.call(arguments);b.unshift.apply(b,c);return a.apply(this,b)}}var sa=Date.now||function(){return+new Date};function A(a,b){function c(){}c.prototype=b.prototype;a.a=b.prototype;a.prototype=new c;a.prototype.constructor=a};function ta(a,b){for(var c=1;c")!=-1&&(a=a.replace(Aa,">"));a.indexOf('"')!=-1&&(a=a.replace(Ba,"""));return a}var ya=/&/g,za=//g,Ba=/\"/g,xa=/[&<>\"]/; function Ca(a,b){for(var c=0,d=String(a).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),h=String(b).replace(/^[\s\xa0]+|[\s\xa0]+$/g,"").split("."),g=Math.max(d.length,h.length),j=0;c==0&&jb)return 1;return 0};var Ea,Fa,Ga,Ha,Ia,Ja;function Ka(){return u.navigator?u.navigator.userAgent:m}function La(){return u.navigator}Ia=Ha=Ga=Fa=Ea=!1;var Ma;if(Ma=Ka()){var Na=La();Ea=Ma.indexOf("Opera")==0;Fa=!Ea&&Ma.indexOf("MSIE")!=-1;Ha=(Ga=!Ea&&Ma.indexOf("WebKit")!=-1)&&Ma.indexOf("Mobile")!=-1;Ia=!Ea&&!Ga&&Na.product=="Gecko"}var Oa=Ea,C=Fa,D=Ia,E=Ga,Pa=Ha,Qa=La();Ja=(Qa&&Qa.platform||"").indexOf("Mac")!=-1;var Ra=!!La()&&(La().appVersion||"").indexOf("X11")!=-1,Sa; a:{var Ta="",Ua;if(Oa&&u.opera)var Va=u.opera.version,Ta=typeof Va=="function"?Va():Va;else if(D?Ua=/rv\:([^\);]+)(\)|;)/:C?Ua=/MSIE\s+([^\);]+)(\)|;)/:E&&(Ua=/WebKit\/(\S+)/),Ua)var Wa=Ua.exec(Ka()),Ta=Wa?Wa[1]:"";if(C){var Xa,Ya=u.document;Xa=Ya?Ya.documentMode:k;if(Xa>parseFloat(Ta)){Sa=String(Xa);break a}}Sa=Ta}var Za={};function F(a){return Za[a]||(Za[a]=Ca(Sa,a)>=0)}var $a={};function ab(){return $a[9]||($a[9]=C&&document.documentMode&&document.documentMode>=9)};function bb(a,b,c){for(var d in a)b.call(c,a[d],d,a)}function cb(a){var b=[],c=0,d;for(d in a)b[c++]=a[d];return b}function db(a){var b=[],c=0,d;for(d in a)b[c++]=d;return b}var eb="constructor,hasOwnProperty,isPrototypeOf,propertyIsEnumerable,toLocaleString,toString,valueOf".split(",");function fb(a,b){for(var c,d,h=1;h=0} function qb(a){if(!ga(a))for(var b=a.length-1;b>=0;b--)delete a[b];a.length=0}function rb(a,b){var c=jb(a,b);c>=0&&G.splice.call(a,c,1)}function sb(a){return G.concat.apply(G,arguments)}function tb(a){if(ga(a))return sb(a);else{for(var b=[],c=0,d=a.length;c=112&&a.keyCode<=123)a.keyCode=-1}catch(b){}};s.xe=p("V");s.e=function(){Db.a.e.call(this);this.relatedTarget=this.currentTarget=this.target=this.V=m};function Gb(){}var Hb=0;s=Gb.prototype;s.key=0;s.fb=!1;s.Gd=!1;s.Rb=function(a,b,c,d,h,g){ja(a)?this.Ud=!0:a&&a.handleEvent&&ja(a.handleEvent)?this.Ud=!1:e(Error("Invalid listener argument"));this.xb=a;this.ge=b;this.src=c;this.type=d;this.capture=!!h;this.wc=g;this.Gd=!1;this.key=++Hb;this.fb=!1};s.handleEvent=function(a){return this.Ud?this.xb.call(this.wc||this.src,a):this.xb.handleEvent.call(this.xb,a)};var Ib,Jb=(Ib="ScriptEngine"in u&&u.ScriptEngine()=="JScript")?u.ScriptEngineMajorVersion()+"."+u.ScriptEngineMinorVersion()+"."+u.ScriptEngineBuildVersion():"0";function Kb(a,b){this.ab=b;this.B=[];a>this.ab&&e(Error("[goog.structs.SimplePool] Initial cannot be greater than max"));for(var c=0;c=0),j;Qb=function(a){j=a};if(g){Lb=function(){return l.getObject()};Mb=function(a){l.eb(a)};Nb=function(){return n.getObject()};Ob=function(a){n.eb(a)};Pb=function(){return o.getObject()};Rb=function(){o.eb(c())};Sb=function(){return w.getObject()};Tb=function(a){w.eb(a)};Ub=function(){return t.getObject()}; Vb=function(a){t.eb(a)};var l=new Kb(0,600);l.Ta=a;var n=new Kb(0,600);n.Ta=b;var o=new Kb(0,600);o.Ta=c;var w=new Kb(0,600);w.Ta=d;var t=new Kb(0,600);t.Ta=h}else Lb=a,Mb=v,Nb=b,Ob=v,Pb=c,Rb=v,Sb=d,Tb=v,Ub=h,Vb=v})();var Wb={},J={},Xb={},Yb={}; function K(a,b,c,d,h){if(b)if(ga(b)){for(var g=0;g=0;g--){var h=a[g];if(d||b==h.capture)ac(h.key),c++}});else if(a=la(a),Xb[a])for(var a=Xb[a],h=a.length-1;h>=0;h--){var g=a[h];if(d||b==g.capture)ac(g.key),c++}}function $b(a,b,c){var d=J;return b in d&&(d=d[b],c in d&&(d=d[c],a=la(a),d[a]))?d[a]:m} function dc(a,b,c,d,h){var g=1,b=la(b);if(a[b]){a.ga--;a=a[b];a.Dc?a.Dc++:a.Dc=1;try{for(var j=a.length,l=0;l=0&&j.ga;L--)o.currentTarget= t[L],g&=dc(j,t[L],d,!0,o);if(n){j=h[!1];j.ga=j.v;for(L=0;!o.cb&&L=this.left&&a.right<=this.right&&a.top>=this.top&&a.bottom<=this.bottom:a.x>=this.left&&a.x<=this.right&&a.y>=this.top&&a.y<=this.bottom};function hc(a,b){this.width=a;this.height=b}s=hc.prototype;s.ba=function(){return new hc(this.width,this.height)};s.toString=function(){return"("+this.width+" x "+this.height+")"};s.ua=function(){return!(this.width*this.height)};s.floor=function(){this.width=Math.floor(this.width);this.height=Math.floor(this.height);return this};s.round=function(){this.width=Math.round(this.width);this.height=Math.round(this.height);return this};function ic(a,b,c,d){this.left=a;this.top=b;this.width=c;this.height=d}ic.prototype.ba=function(){return new ic(this.left,this.top,this.width,this.height)};ic.prototype.toString=function(){return"("+this.left+", "+this.top+" - "+this.width+"w x "+this.height+"h)"}; ic.prototype.Td=function(a){var b=Math.max(this.left,a.left),c=Math.min(this.left+this.width,a.left+a.width);if(b<=c){var d=Math.max(this.top,a.top),a=Math.min(this.top+this.height,a.top+a.height);if(d<=a)return this.left=b,this.top=d,this.width=c-b,this.height=a-d,!0}return!1}; ic.prototype.contains=function(a){return a instanceof ic?this.left<=a.left&&this.left+this.width>=a.left+a.width&&this.top<=a.top&&this.top+this.height>=a.top+a.height:a.x>=this.left&&a.x<=this.left+this.width&&a.y>=this.top&&a.y<=this.top+this.height};var jc;function kc(a){return(a=a.className)&&typeof a.split=="function"?a.split(/\s+/):[]}function lc(a,b){var c=kc(a),d=wb(arguments,1),h;h=c;for(var g=0,j=0;j0)){var j;a:{if(g&&typeof g.length=="number")if(ka(g)){j=typeof g.item=="function"||typeof g.item=="string";break a}else if(ja(g)){j=typeof g.item=="function";break a}j=!1}kb(j?tb(g):g,d)}else d(g)}}function Q(a){return document.createElement(a)}function tc(a){return a.compatMode=="CSS1Compat"}function uc(a){for(var b;b=a.firstChild;)a.removeChild(b)} function vc(a){a&&a.parentNode&&a.parentNode.removeChild(a)}function wc(a){for(;a&&a.nodeType!=1;)a=a.nextSibling;return a}function xc(a,b){if(a.contains&&b.nodeType==1)return a==b||a.contains(b);if(typeof a.compareDocumentPosition!="undefined")return a==b||Boolean(a.compareDocumentPosition(b)&16);for(;b&&a!=b;)b=b.parentNode;return b==a}function O(a){return a.nodeType==9?a:a.ownerDocument||a.document} function yc(a,b){if("textContent"in a)a.textContent=b;else if(a.firstChild&&a.firstChild.nodeType==3){for(;a.lastChild!=a.firstChild;)a.removeChild(a.lastChild);a.firstChild.data=b}else uc(a),a.appendChild(O(a).createTextNode(b))}var zc={SCRIPT:1,STYLE:1,HEAD:1,IFRAME:1,OBJECT:1},Ac={IMG:" ",BR:"\n"};function Bc(a){var b=a.getAttributeNode("tabindex");return b&&b.specified?(a=a.tabIndex,ia(a)&&a>=0&&a<32768):!1} function Cc(a){if(oc&&"innerText"in a)a=a.innerText.replace(/(\r\n|\r|\n)/g,"\n");else{var b=[];Dc(a,b,!0);a=b.join("")}a=a.replace(/ \xAD /g," ").replace(/\xAD/g,"");a=a.replace(/\u200B/g,"");oc||(a=a.replace(/ +/g," "));a!=" "&&(a=a.replace(/^\s*/,""));return a}function Ec(a){var b=[];Dc(a,b,!1);return b.join("")} function Dc(a,b,c){if(!(a.nodeName in zc))if(a.nodeType==3)c?b.push(String(a.nodeValue).replace(/(\r\n|\r|\n)/g,"")):b.push(a.nodeValue);else if(a.nodeName in Ac)b.push(Ac[a.nodeName]);else for(a=a.firstChild;a;)Dc(a,b,c),a=a.nextSibling}function pc(a){this.o=a||u.document||document}s=pc.prototype;s.S=N;function Fc(a){return a.o}s.b=function(a){return z(a)?this.o.getElementById(a):a}; function Gc(a,b){var c;c=a.o;var d=b&&b!="*"?b.toUpperCase():"";c=c.querySelectorAll&&c.querySelector&&(!E||tc(document)||F("528"))&&d?c.querySelectorAll(d+""):c.getElementsByTagName(d||"*");return c} s.d=function(a,b,c){var d=this.o,h=arguments,g=h[0],j=h[1];if(!nc&&j&&(j.name||j.type)){g=["<",g];j.name&&g.push(' name="',wa(j.name),'"');if(j.type){g.push(' type="',wa(j.type),'"');var l={};fb(l,j);j=l;delete j.type}g.push(">");g=g.join("")}g=d.createElement(g);if(j)z(j)?g.className=j:ga(j)?lc.apply(m,[g].concat(j)):qc(g,j);h.length>2&&sc(d,g,h);return g};s.createElement=function(a){return this.o.createElement(a)};s.createTextNode=function(a){return this.o.createTextNode(a)}; function Hc(a){return tc(a.o)}function Ic(a){var b=a.o,a=!E&&tc(b)?b.documentElement:b.body,b=b.parentWindow||b.defaultView;return new M(b.pageXOffset||a.scrollLeft,b.pageYOffset||a.scrollTop)}s.appendChild=function(a,b){a.appendChild(b)};s.contains=xc;function R(a,b){var c=O(a);return c.defaultView&&c.defaultView.getComputedStyle&&(c=c.defaultView.getComputedStyle(a,m))?c[b]||c.getPropertyValue(b):""}function Jc(a,b){return R(a,b)||(a.currentStyle?a.currentStyle[b]:m)||a.style[b]}function Kc(a){var b=a.getBoundingClientRect();if(C)a=a.ownerDocument,b.left-=a.documentElement.clientLeft+a.body.clientLeft,b.top-=a.documentElement.clientTop+a.body.clientTop;return b} function Lc(a){if(C)return a.offsetParent;for(var b=O(a),c=Jc(a,"position"),d=c=="fixed"||c=="absolute",a=a.parentNode;a&&a!=b;a=a.parentNode)if(c=Jc(a,"position"),d=d&&c=="static"&&a!=b.documentElement&&a!=b.body,!d&&(a.scrollWidth>a.clientWidth||a.scrollHeight>a.clientHeight||c=="fixed"||c=="absolute"||c=="relative"))return a;return m} function Mc(a){for(var b=new gc(0,Infinity,Infinity,0),c=N(a),d=c.o.body,h=c.o.documentElement,g=!E&&tc(c.o)?c.o.documentElement:c.o.body;a=Lc(a);)if((!C||a.clientWidth!=0)&&(!E||a.clientHeight!=0||a!=d)&&a!=d&&a!=h&&Jc(a,"overflow")!="visible"){var j=Nc(a),l;l=a;if(D&&!F("1.9")){var n=parseFloat(R(l,"borderLeftWidth"));if(Qc(l)){var o=l.offsetWidth-l.clientWidth-n-parseFloat(R(l,"borderRightWidth"));n+=o}l=new M(n,parseFloat(R(l,"borderTopWidth")))}else l=new M(l.clientLeft,l.clientTop);j.x+=l.x; j.y+=l.y;b.top=Math.max(b.top,j.y);b.right=Math.min(b.right,j.x+a.clientWidth);b.bottom=Math.min(b.bottom,j.y+a.clientHeight);b.left=Math.max(b.left,j.x)}d=g.scrollLeft;g=g.scrollTop;b.left=Math.max(b.left,d);b.top=Math.max(b.top,g);c=c.o.parentWindow||c.o.defaultView||window;h=c.document;E&&!F("500")&&!Pa?(typeof c.innerHeight=="undefined"&&(c=window),h=c.innerHeight,a=c.document.documentElement.scrollHeight,c==c.top&&a=0&&b.left>=0&&b.bottom>b.top&&b.right>b.left?b:m} function Nc(a){var b,c=O(a),d=Jc(a,"position"),h=D&&c.getBoxObjectFor&&!a.getBoundingClientRect&&d=="absolute"&&(b=c.getBoxObjectFor(a))&&(b.screenX<0||b.screenY<0),g=new M(0,0),j;b=c?c.nodeType==9?c:O(c):document;j=C&&!ab()&&!Hc(N(b))?b.body:b.documentElement;if(a==j)return g;if(a.getBoundingClientRect)b=Kc(a),a=Ic(N(c)),g.x=b.left+a.x,g.y=b.top+a.y;else if(c.getBoxObjectFor&&!h)b=c.getBoxObjectFor(a),a=c.getBoxObjectFor(j),g.x=b.screenX-a.screenX,g.y=b.screenY-a.screenY;else{b=a;do{g.x+=b.offsetLeft; g.y+=b.offsetTop;b!=a&&(g.x+=b.clientLeft||0,g.y+=b.clientTop||0);if(E&&Jc(b,"position")=="fixed"){g.x+=c.body.scrollLeft;g.y+=c.body.scrollTop;break}b=b.offsetParent}while(b&&b!=a);if(Oa||E&&d=="absolute")g.y-=c.body.offsetTop;for(b=a;(b=Lc(b))&&b!=c.body&&b!=j;)if(g.x-=b.scrollLeft,!Oa||b.tagName!="TR")g.y-=b.scrollTop}return g}function Rc(a,b){typeof a=="number"&&(a=(b?Math.round(a):a)+"px");return a} function Sc(a){if(Jc(a,"display")!="none")return Tc(a);var b=a.style,c=b.display,d=b.visibility,h=b.position;b.visibility="hidden";b.position="absolute";b.display="inline";a=Tc(a);b.display=c;b.position=h;b.visibility=d;return a}function Tc(a){var b=a.offsetWidth,c=a.offsetHeight,d=E&&!b&&!c;return(!fa(b)||d)&&a.getBoundingClientRect?(a=Kc(a),new hc(a.right-a.left,a.bottom-a.top)):new hc(b,c)}function Uc(a){var b=Nc(a),a=Sc(a);return new ic(b.x,b.y,a.width,a.height)} function Vc(a,b){a.style.display=b?"":"none"}function Wc(a){C?a.cssText=".goog-tabpane-clear { clear: both; height: 0px; overflow: hidden }":a[E?"innerText":"innerHTML"]=".goog-tabpane-clear { clear: both; height: 0px; overflow: hidden }"}function Qc(a){return"rtl"==Jc(a,"direction")}var Xc=D?"MozUserSelect":E?"WebkitUserSelect":m; function Yc(a,b,c){c=!c?a.getElementsByTagName("*"):m;if(Xc){if(b=b?"none":"",a.style[Xc]=b,c)for(var a=0,d;d=c[a];a++)d.style[Xc]=b}else if(C||Oa)if(b=b?"on":"",a.setAttribute("unselectable",b),c)for(a=0;d=c[a];a++)d.setAttribute("unselectable",b)}function Zc(a,b){if(/^\d+px?$/.test(b))return parseInt(b,10);else{var c=a.style.left,d=a.runtimeStyle.left;a.runtimeStyle.left=a.currentStyle.left;a.style.left=b;var h=a.style.pixelLeft;a.style.left=c;a.runtimeStyle.left=d;return h}} function $c(a,b){return Zc(a,a.currentStyle?a.currentStyle[b]:m)}var ad={thin:2,medium:4,thick:6};function bd(a,b){if((a.currentStyle?a.currentStyle[b+"Style"]:m)=="none")return 0;var c=a.currentStyle?a.currentStyle[b+"Width"]:m;return c in ad?ad[c]:Zc(a,c)};function cd(a){this.Rd=a;this.r=[]}A(cd,Ab);var dd=[];s=cd.prototype;s.g=function(a,b,c,d,h){ga(b)||(dd[0]=b,b=dd);for(var g=0;g=0&&g.ga;j--)a.currentTarget=h[j],d&=dc(g,h[j],a.type,!0,a)&&a.$b!=!1}if(!1 in c)if(g=c[!1],g.ga=g.v,b)for(j=0;!a.cb&&jpd(this))&&e(Error("Child component index out of bounds"));if(!this.qa||!this.A)this.qa={},this.A=[];if(a.getParent()==this)this.qa[kd(a)]=a,rb(this.A,a);else{var d=this.qa,h=kd(a);h in d&&e(Error('The object already contains the key "'+h+'"'));d[h]=a}md(a,this);vb(this.A,b,0,a);a.k&&this.k&&a.getParent()==this?(c=this.w(),c.insertBefore(a.b(),c.childNodes[b]||m)):c?(this.m||this.d(),b=T(this,b+1),S(a,this.w(), b?b.m:m)):this.k&&!a.k&&a.m&&a.i()};s.w=p("m");function qd(a){if(a.ac==m)a.ac=Qc(a.k?a.m:a.ca.o.body);return a.ac}s.Ab=function(a){this.k&&e(Error("Component already rendered"));this.ac=a};function pd(a){return a.A?a.A.length:0}function nd(a,b){return a.qa&&b?(b in a.qa?a.qa[b]:k)||m:m}function T(a,b){return a.A?a.A[b]||m:m}function od(a,b,c){a.A&&kb(a.A,b,c)}function rd(a,b){return a.A&&b?jb(a.A,b):-1} s.removeChild=function(a,b){if(a){var c=z(a)?a:kd(a),a=nd(this,c);if(c&&a){var d=this.qa;c in d&&delete d[c];rb(this.A,a);b&&(a.ja(),a.m&&vc(a.m));md(a,m)}}a||e(Error("Child is not in parent component"));return a};function sd(a,b){a.setAttribute("role",b);a.zf=b}function U(a,b,c){a.setAttribute("aria-"+b,c)};function td(){}var ud;y(td);s=td.prototype;s.la=aa();s.d=function(a){var b=a.S().d("div",this.Va(a).join(" "),a.Ca);this.ud(a,b);return b};s.w=function(a){return a};s.Nb=function(a,b,c){if(a=a.b?a.b():a)if(C&&!F("7")){var d=vd(kc(a),b);d.push(b);ra(c?lc:mc,a).apply(m,d)}else c?lc(a,b):mc(a,b)};s.tb=function(a){qd(a)&&this.Ab(a.b(),!0);a.isEnabled()&&this.gb(a,a.s)};s.ud=function(a,b){a.isEnabled()||this.T(b,1,!0);a.n&8&&this.T(b,8,!0);a.u&16&&this.T(b,16,a.vb());a.u&64&&this.T(b,64,!!(a.n&64))}; s.Jc=function(a,b){Yc(a,!b,!C&&!Oa)};s.Ab=function(a,b){this.Nb(a,this.j()+"-rtl",b)};s.Za=function(a){var b;return a.u&32&&(b=a.C())?Bc(b):!1};s.gb=function(a,b){var c;if(a.u&32&&(c=a.C())){if(!b&&a.n&32){try{c.blur()}catch(d){}a.n&32&&a.Wa(m)}if(Bc(c)!=b)b?c.tabIndex=0:(c.tabIndex=-1,c.removeAttribute("tabIndex"))}};s.Z=function(a,b){Vc(a,b)};s.O=function(a,b,c){var d=a.b();if(d){var h=this.nc(b);h&&this.Nb(a,h,c);this.T(d,b,c)}}; s.T=function(a,b,c){ud||(ud={1:"disabled",8:"selected",16:"checked",64:"expanded"});(b=ud[b])&&U(a,b,c)};s.N=function(a,b){var c=this.w(a);if(c&&(uc(c),b))if(z(b))yc(c,b);else{var d=function(a){if(a){var b=O(c);c.appendChild(z(a)?b.createTextNode(a):a)}};ga(b)?kb(b,d):ha(b)&&!("nodeType"in b)?kb(tb(b),d):d(b)}};s.C=function(a){return a.b()};s.j=r("goog-control"); s.Va=function(a){var b=this.j(),c=[b],d=this.j();d!=b&&c.push(d);b=a.n;for(d=[];b;){var h=b&-b;d.push(this.nc(h));b&=~h}c.push.apply(c,d);(a=a.ka)&&c.push.apply(c,a);C&&!F("7")&&c.push.apply(c,vd(c));return c};function vd(a,b){var c=[];b&&(a=a.concat([b]));kb([],function(d){ob(d,ra(pb,a))&&(!b||pb(d,b))&&c.push(d.join("_"))});return c}s.nc=function(a){if(!this.Id){var b=this.j();this.Id={1:b+"-disabled",2:b+"-hover",4:b+"-active",8:b+"-selected",16:b+"-checked",32:b+"-focused",64:b+"-open"}}return this.Id[a]};function wd(a,b){a||e(Error("Invalid class name "+a));ja(b)||e(Error("Invalid decorator function "+b))}var xd={};function yd(a,b,c,d,h){if(!C&&(!E||!F("525")))return!0;if(Ja&&h)return zd(a);if(h&&!d)return!1;if(!c&&(b==17||b==18))return!1;if(C&&d&&b==a)return!1;switch(a){case 13:return!(C&&ab());case 27:return!E}return zd(a)} function zd(a){if(a>=48&&a<=57)return!0;if(a>=96&&a<=106)return!0;if(a>=65&&a<=90)return!0;if(E&&a==0)return!0;switch(a){case 32:case 63:case 107:case 109:case 110:case 111:case 186:case 189:case 187:case 188:case 190:case 191:case 192:case 222:case 219:case 220:case 221:return!0;default:return!1}};function Ad(a,b){a&&Bd(this,a,b)}A(Ad,gd);s=Ad.prototype;s.m=m;s.Bc=m;s.kd=m;s.Cc=m;s.Ja=-1;s.Ha=-1; var Cd={3:13,12:144,63232:38,63233:40,63234:37,63235:39,63236:112,63237:113,63238:114,63239:115,63240:116,63241:117,63242:118,63243:119,63244:120,63245:121,63246:122,63247:123,63248:44,63272:46,63273:36,63275:35,63276:33,63277:34,63289:144,63302:45},Dd={Up:38,Down:40,Left:37,Right:39,Enter:13,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,"U+007F":46,Home:36,End:35,PageUp:33,PageDown:34,Insert:45},Ed={61:187,59:186},Fd=C||E&&F("525");s=Ad.prototype; s.De=function(a){if(E&&(this.Ja==17&&!a.ctrlKey||this.Ja==18&&!a.altKey))this.Ha=this.Ja=-1;Fd&&!yd(a.keyCode,this.Ja,a.shiftKey,a.ctrlKey,a.altKey)?this.handleEvent(a):this.Ha=D&&a.keyCode in Ed?Ed[a.keyCode]:a.keyCode};s.Ee=function(){this.Ha=this.Ja=-1}; s.handleEvent=function(a){var b=a.V,c,d;C&&a.type=="keypress"?(c=this.Ha,d=c!=13&&c!=27?b.keyCode:0):E&&a.type=="keypress"?(c=this.Ha,d=b.charCode>=0&&b.charCode<63232&&zd(c)?b.charCode:0):Oa?(c=this.Ha,d=zd(c)?b.keyCode:0):(c=b.keyCode||this.Ha,d=b.charCode||0,Ja&&d==63&&!c&&(c=191));var h=c,g=b.keyIdentifier;c?c>=63232&&c in Cd?h=Cd[c]:c==25&&a.shiftKey&&(h=9):g&&g in Dd&&(h=Dd[g]);a=h==this.Ja;this.Ja=h;b=new Gd(h,d,a,b);try{this.dispatchEvent(b)}finally{b.F()}};s.b=p("m"); function Bd(a,b,c){a.Cc&&a.detach();a.m=b;a.Bc=K(a.m,"keypress",a,c);a.kd=K(a.m,"keydown",a.De,c,a);a.Cc=K(a.m,"keyup",a.Ee,c,a)}s.detach=function(){if(this.Bc)ac(this.Bc),ac(this.kd),ac(this.Cc),this.Cc=this.kd=this.Bc=m;this.m=m;this.Ha=this.Ja=-1};s.e=function(){Ad.a.e.call(this);this.detach()};function Gd(a,b,c,d){d&&this.Rb(d,k);this.type="key";this.keyCode=a;this.charCode=b;this.repeat=c}A(Gd,Db);function V(a,b,c){hd.call(this,c);if(!b){for(var b=this.constructor,d;b;){d=la(b);if(d=xd[d])break;b=b.a?b.a.constructor:m}b=d?ja(d.p)?d.p():new d:m}this.f=b;this.Ca=a}A(V,hd);s=V.prototype;s.Ca=m;s.n=0;s.u=39;s.Fd=255;s.zd=0;s.s=!0;s.ka=m;s.sc=!0;s.Tc=!1;s.qd=m;function Hd(a,b){a.k&&b!=a.sc&&Id(a,b);a.sc=b}s.C=function(){return this.f.C(this)};s.oc=function(){return this.W||(this.W=new Ad)};function Jd(a,b){if(b)a.ka?pb(a.ka,b)||a.ka.push(b):a.ka=[b],a.f.Nb(a,b,!0)} s.Nb=function(a,b){if(b)Jd(this,a);else if(a&&this.ka){rb(this.ka,a);if(this.ka.length==0)this.ka=m;this.f.Nb(this,a,!1)}};s.d=function(){var a=this.f.d(this);this.m=a;var b=this.qd||this.f.la();b&&sd(a,b);this.Tc||this.f.Jc(a,!1);this.s||this.f.Z(a,!1)};s.w=function(){return this.f.w(this.b())};s.i=function(){V.a.i.call(this);this.f.tb(this);if(this.u&-2&&(this.sc&&Id(this,!0),this.u&32)){var a=this.C();if(a){var b=this.oc();Bd(b,a);ld(this).g(b,"key",this.sa).g(a,"focus",this.rc).g(a,"blur",this.Wa)}}}; function Id(a,b){var c=ld(a),d=a.b();b?(c.g(d,"mouseover",a.uc).g(d,"mousedown",a.Ea).g(d,"mouseup",a.Fa).g(d,"mouseout",a.tc),C&&c.g(d,"dblclick",a.Qd)):(c.ha(d,"mouseover",a.uc).ha(d,"mousedown",a.Ea).ha(d,"mouseup",a.Fa).ha(d,"mouseout",a.tc),C&&c.ha(d,"dblclick",a.Qd))}s.ja=function(){V.a.ja.call(this);this.W&&this.W.detach();this.s&&this.isEnabled()&&this.f.gb(this,!1)};s.e=function(){V.a.e.call(this);this.W&&(this.W.F(),delete this.W);delete this.f;this.ka=this.Ca=m}; s.N=function(a){this.f.N(this.b(),a);this.Ca=a};s.Ob=function(){var a=this.Ca;if(!a)return"";a=z(a)?a:ga(a)?lb(a,Ec).join(""):Cc(a);return ua(a)};s.Ab=function(a){V.a.Ab.call(this,a);var b=this.b();b&&this.f.Ab(b,a)};s.Jc=function(a){this.Tc=a;var b=this.b();b&&this.f.Jc(b,a)};s.Z=function(a,b){if(b||this.s!=a&&this.dispatchEvent(a?"show":"hide")){var c=this.b();c&&this.f.Z(c,a);this.isEnabled()&&this.f.gb(this,a);this.s=a;return!0}return!1};s.isEnabled=function(){return!(this.n&1)}; s.wa=function(a){Kd(this,2,a)&&this.O(2,a)};s.ub=function(){return!!(this.n&4)};s.setActive=function(a){Kd(this,4,a)&&this.O(4,a)};s.xd=function(a){Kd(this,8,a)&&this.O(8,a)};s.vb=function(){return!!(this.n&16)};s.bc=function(a){Kd(this,16,a)&&this.O(16,a)};s.t=function(a){Kd(this,64,a)&&this.O(64,a)};s.O=function(a,b){if(this.u&a&&b!=!!(this.n&a))this.f.O(this,a,b),this.n=b?this.n|a:this.n&~a}; function Ld(a,b,c){a.k&&a.n&b&&!c&&e(Error("Component already rendered"));!c&&a.n&b&&a.O(b,!1);a.u=c?a.u|b:a.u&~b}function W(a,b){return!!(a.Fd&b)&&!!(a.u&b)}function Kd(a,b,c){return!!(a.u&b)&&!!(a.n&b)!=c&&(!(a.zd&b)||a.dispatchEvent(jd(b,c)))&&!a.Lb}s.uc=function(a){(!a.relatedTarget||!xc(this.b(),a.relatedTarget))&&this.dispatchEvent("enter")&&this.isEnabled()&&W(this,2)&&this.wa(!0)}; s.tc=function(a){if((!a.relatedTarget||!xc(this.b(),a.relatedTarget))&&this.dispatchEvent("leave"))W(this,4)&&this.setActive(!1),W(this,2)&&this.wa(!1)};s.Ea=function(a){if(this.isEnabled()&&(W(this,2)&&this.wa(!0),Fb(a)&&(!E||!Ja||!a.ctrlKey)))W(this,4)&&this.setActive(!0),this.f.Za(this)&&this.C().focus();!this.Tc&&Fb(a)&&(!E||!Ja||!a.ctrlKey)&&a.preventDefault()};s.Fa=function(a){this.isEnabled()&&(W(this,2)&&this.wa(!0),this.ub()&&this.bb(a)&&W(this,4)&&this.setActive(!1))}; s.Qd=function(a){this.isEnabled()&&this.bb(a)};s.bb=function(a){W(this,16)&&this.bc(!this.vb());W(this,8)&&this.xd(!0);W(this,64)&&this.t(!(this.n&64));var b=new H("action",this);if(a)for(var c=["altKey","ctrlKey","metaKey","shiftKey","platformModifierKey"],d,h=0;d=c[h];h++)b[d]=a[d];return this.dispatchEvent(b)};s.rc=function(){W(this,32)&&Kd(this,32,!0)&&this.O(32,!0)};s.Wa=function(){W(this,4)&&this.setActive(!1);W(this,32)&&Kd(this,32,!1)&&this.O(32,!1)}; s.sa=function(a){return this.s&&this.isEnabled()&&this.Xa(a)?(a.preventDefault(),a.stopPropagation(),!0):!1};s.Xa=function(a){return a.keyCode==13&&this.bb(a)};ja(V)||e(Error("Invalid component class "+V));ja(td)||e(Error("Invalid renderer class "+td));var Md=la(V);xd[Md]=td;wd("goog-control",function(){return new V(m)});var Nd={};function Od(){}Od.prototype.id=v;Od.prototype.Kb=function(a){if(this.id()>a.id())return 1;else if(this.id()a.lb)return 1;else if(this.lba.oa?1:0};function Wd(a,b,c,d){X.call(this,a,b,c,d);this.N(a.toString())}A(Wd,X);Wd.prototype.i=function(){Xd.a.i.call(this);this.b().title=this.item().toString()};Wd.prototype.update=function(a){this.N(a.toString())};function Yd(a){this.U=a}Yd.prototype.Ub=function(a){return new Wd(a,this.U)};function Zd(){}A(Zd,td);y(Zd);s=Zd.prototype;s.la=r("button");s.T=function(a,b,c){b==16?U(a,"pressed",c):Zd.a.T.call(this,a,b,c)};s.d=function(a){var b=Zd.a.d.call(this,a),c=a.qc();c&&this.yd(b,c);(c=a.ea())&&this.Oa(b,c);a.u&16&&this.T(b,16,a.vb());return b};s.ea=v;s.Oa=v;s.qc=function(a){return a.title};s.yd=function(a,b){if(a)a.title=b||""};s.j=r("goog-button");function $d(){}A($d,Zd);y($d);s=$d.prototype;s.la=aa();s.d=function(a){Hd(a,!1);a.Fd&=-256;Ld(a,32,!1);return a.S().d("button",{"class":this.Va(a).join(" "),disabled:!a.isEnabled(),title:a.qc()||"",value:a.ea()||""},a.Ob()||"")};s.tb=function(a){ld(a).g(a.b(),"click",a.bb)};s.Jc=v;s.Ab=v;s.Za=function(a){return a.isEnabled()};s.gb=v;s.O=function(a,b,c){$d.a.O.call(this,a,b,c);if((a=a.b())&&b==1)a.disabled=c};s.ea=function(a){return a.value};s.Oa=function(a,b){if(a)a.value=b};s.T=v;function Y(a,b,c){V.call(this,a,b||$d.p(),c)}A(Y,V);s=Y.prototype;s.ea=p("gc");s.Oa=function(a){this.gc=a;this.f.Oa(this.b(),a)};s.qc=p("le");s.yd=function(a){this.le=a;this.f.yd(this.b(),a)};s.e=function(){Y.a.e.call(this);delete this.gc;delete this.le};s.i=function(){Y.a.i.call(this);if(this.u&32){var a=this.C();a&&ld(this).g(a,"keyup",this.Xa)}};s.Xa=function(a){return a.keyCode==13&&a.type=="key"||a.keyCode==32&&a.type=="keyup"?this.bb(a):a.keyCode==32};wd("goog-button",function(){return new Y(m)});function ae(a){this.element=P(a)}function be(a){a.element.style.display="block"}function ce(a){a.element.style.display="none"}function ee(a){a.element.innerHTML='
'}function fe(a){a.element.innerHTML=""};function ge(a){if(typeof a.ra=="function")return a.ra();if(z(a))return a.split("");if(ha(a)){for(var b=[],c=a.length,d=0;d0&&a1){c%2&&e(Error("Uneven number of arguments"));for(var d=0;d2*this.v&&oe(this),!0):!1}; function oe(a){if(a.v!=a.r.length){for(var b=0,c=0;b0&&c.push(", ");var g;g=d[h];switch(typeof g){case "object":g=g?"object":"null";break;case "string":break;case "number":g=String(g);break;case "boolean":g=g?"true":"false";break;case "function":g=(g=te(g))?g:"[fn]";break;default:g=typeof g}g.length>40&&(g=g.substr(0,40)+"...");c.push(g)}b.push(a);c.push(")\n");try{c.push(se(a.caller,b))}catch(j){c.push("[exception trying to get caller]\n")}}else a? c.push("[...long stack...]"):c.push("[end]");return c.join("")}function te(a){if(ue[a])return ue[a];a=String(a);if(!ue[a]){var b=/function ([^\(]+)/.exec(a);ue[a]=b?b[1]:"[Anonymous]"}return ue[a]}var ue={};function ve(a,b,c,d,h){this.reset(a,b,c,d,h)}ve.prototype.$e=0;ve.prototype.Od=m;ve.prototype.Nd=m;var we=0;ve.prototype.reset=function(a,b,c,d,h){this.$e=typeof h=="number"?h:we++;this.Bf=d||sa();this.Tb=a;this.Me=b;this.xf=c;delete this.Od;delete this.Nd};ve.prototype.je=ba("Tb");function xe(a){this.Ne=a}xe.prototype.q=m;xe.prototype.Tb=m;xe.prototype.A=m;xe.prototype.Sd=m;function ye(a,b){this.name=a;this.value=b}ye.prototype.toString=p("name");var ze=new ye("SEVERE",1E3),Ae=new ye("WARNING",900),Be=new ye("INFO",800),Ce=new ye("CONFIG",700),De=new ye("FINE",500),Ee=new ye("FINEST",300);s=xe.prototype;s.getParent=p("q");s.je=ba("Tb");function Fe(a){if(a.Tb)return a.Tb;if(a.q)return Fe(a.q);ib("Root logger has no level set.");return m} s.log=function(a,b,c){if(a.value>=Fe(this).value){a=this.ye(a,b,c);b="log:"+a.Me;u.console&&(u.console.timeStamp?u.console.timeStamp(b):u.console.markTimeline&&u.console.markTimeline(b));u.msWriteProfilerMark&&u.msWriteProfilerMark(b);for(b=this;b;){var c=b,d=a;if(c.Sd)for(var h=0,g=k;g=c.Sd[h];h++)g(d);b=b.getParent()}}}; s.ye=function(a,b,c){var d=new ve(a,String(b),this.Ne);if(c){d.Od=c;var h;var g=arguments.callee.caller;try{var j;var l=da("window.location.href");if(z(c))j={message:c,name:"Unknown error",lineNumber:"Not available",fileName:l,stack:"Not available"};else{var n,o,w=!1;try{n=c.lineNumber||c.vf||"Not available"}catch(t){n="Not available",w=!0}try{o=c.fileName||c.filename||c.sourceURL||l}catch(B){o="Not available",w=!0}j=w||!c.lineNumber||!c.fileName||!c.stack?{message:c.message,name:c.name,lineNumber:n, fileName:o,stack:c.stack||"Not available"}:c}h="Message: "+wa(j.message)+'\nUrl: '+j.fileName+"\nLine: "+j.lineNumber+"\n\nBrowser stack:\n"+wa(j.stack+"-> ")+"[end]\n\nJS stack traversal:\n"+wa(re(g)+"-> ")}catch(L){h="Exception trying to expose exception! You win, we lose. "+L}d.Nd=h}return d};s.info=function(a,b){this.log(Be,a,b)};function Ge(a,b){a.log(De,b,k)}s.cc=ba("q");var He={},Ie=m; function Je(a){Ie||(Ie=new xe(""),He[""]=Ie,Ie.je(Ce));var b;if(!(b=He[a])){b=new xe(a);var c=a.lastIndexOf("."),d=a.substr(c+1),c=Je(a.substr(0,c));if(!c.A)c.A={};c.A[d]=b;b.cc(c);He[a]=b}return b};function Ke(){if(D)this.Sa={},this.Pc={},this.Lc=[]}Ke.prototype.D=Je("goog.net.xhrMonitor");Ke.prototype.da=D;function Le(a){var b=Me;if(b.da){var c=z(a)?a:ka(a)?la(a):"";b.D.log(Ee,"Pushing context: "+a+" ("+c+")",k);b.Lc.push(c)}}function Ne(){var a=Me;if(a.da){var b=a.Lc.pop();a.D.log(Ee,"Popping context: "+b,k);Oe(a,b)}}function Pe(a){var b=Me;if(b.da){a=la(a);Ge(b.D,"Opening XHR : "+a);for(var c=0;c0)Ge(this.D,$e(this,"Will abort after "+this.Mc+"ms if incomplete")),this.jb=ke.setTimeout(qa(this.cf, this),this.Mc);Ge(this.D,$e(this,"Sending request"));this.yc=!0;this.h.send(a);this.yc=!1}catch(j){Ge(this.D,$e(this,"Send error: "+j.message)),af(this,j)}};s.dispatchEvent=function(a){if(this.h){Le(this.h);try{return Ye.a.dispatchEvent.call(this,a)}finally{Ne()}}else return Ye.a.dispatchEvent.call(this,a)};s.cf=function(){if(typeof ca!="undefined"&&this.h)this.Ia="Timed out after "+this.Mc+"ms, aborting",this.Sb=8,Ge(this.D,$e(this,this.Ia)),this.dispatchEvent("timeout"),this.abort(8)}; function af(a,b){a.ya=!1;if(a.h)a.Ya=!0,a.h.abort(),a.Ya=!1;a.Ia=b;a.Sb=5;bf(a);cf(a)}function bf(a){if(!a.$c)a.$c=!0,a.dispatchEvent("complete"),a.dispatchEvent("error")}s.abort=function(a){if(this.h&&this.ya)Ge(this.D,$e(this,"Aborting")),this.ya=!1,this.Ya=!0,this.h.abort(),this.Ya=!1,this.Sb=a||7,this.dispatchEvent("complete"),this.dispatchEvent("abort"),cf(this)};s.e=function(){if(this.h){if(this.ya)this.ya=!1,this.Ya=!0,this.h.abort(),this.Ya=!1;cf(this,!0)}Ye.a.e.call(this)}; s.ce=function(){!this.jd&&!this.yc&&!this.Ya?this.Pe():df(this)};s.Pe=function(){df(this)}; function df(a){if(a.ya&&typeof ca!="undefined")if(a.Oc[1]&&ef(a)==4&&ff(a)==2)Ge(a.D,$e(a,"Local request error detected and ignored"));else if(a.yc&&ef(a)==4)ke.setTimeout(qa(a.ce,a),0);else if(a.dispatchEvent("readystatechange"),ef(a)==4){Ge(a.D,$e(a,"Request complete"));a.ya=!1;var b;a:switch(ff(a)){case 0:b=z(a.wb)?a.wb.match(ie)[1]||m:a.wb.uf();b=!(b?Ze.test(b):self.location?Ze.test(self.location.protocol):1);break a;case 200:case 201:case 202:case 204:case 304:case 1223:b=!0;break a;default:b= !1}if(b)a.dispatchEvent("complete"),a.dispatchEvent("success");else{a.Sb=6;var c;try{c=ef(a)>2?a.h.statusText:""}catch(d){Ge(a.D,"Can not get status: "+d.message),c=""}a.Ia=c+" ["+ff(a)+"]";bf(a)}cf(a)}} function cf(a,b){if(a.h){var c=a.h,d=a.Oc[0]?v:m;a.h=m;a.Oc=m;if(a.jb)ke.clearTimeout(a.jb),a.jb=m;b||(Le(c),a.dispatchEvent("ready"),Ne());var h=Me;if(h.da){var g=la(c);Ge(h.D,"Closing XHR : "+g);delete h.Pc[g];for(var j in h.Sa)rb(h.Sa[j],g),h.Sa[j].length==0&&delete h.Sa[j]}try{c.onreadystatechange=d}catch(l){a.D.log(ze,"Problem encountered resetting onreadystatechange: "+l.message,k)}}}s.ub=function(){return!!this.h};function ef(a){return a.h?a.h.readyState:0} function ff(a){try{return ef(a)>2?a.h.status:-1}catch(b){return a.D.log(Ae,"Can not get status: "+b.message,k),-1}}function gf(a){if(a.h)return Re(a.h.responseText)}function $e(a,b){return b+" ["+a.Wd+" "+a.wb+" "+ff(a)+"]"};function hf(){this.Da=[]}s=hf.prototype;s.ta=0;s.ib=0;s.mc=function(a){this.Da[this.ib++]=a};s.pb=function(){if(this.ta!=this.ib){var a=this.Da[this.ta];delete this.Da[this.ta];this.ta++;return a}};s.L=function(){return this.ib-this.ta};s.ua=function(){return this.ib-this.ta==0};s.clear=function(){this.ib=this.ta=this.Da.length=0};s.contains=function(a){return pb(this.Da,a)};s.remove=function(a){a=jb(this.Da,a);if(a<0)return!1;a==this.ta?this.pb():(G.splice.call(this.Da,a,1),this.ib--);return!0}; s.ra=function(){return this.Da.slice(this.ta,this.ib)};function jf(a,b){this.Xd=a||0;this.ab=b||10;this.Xd>this.ab&&e(Error(kf));this.B=new hf;this.Ga=new pe;this.Zc=0;this.md=m;this.jc()}A(jf,Ab);var kf="[goog.structs.Pool] Min can not be greater than max";s=jf.prototype;s.getObject=function(){var a=sa();if(!(this.md!=m&&a-this.md0;)if(b=this.B.pb(),this.pd(b))break;else this.jc();!b&&this.L()this.ab&&this.B.L()>0;)this.Ua(a.pb())};s.ob=function(){return{}};s.Ua=function(a){if(typeof a.F=="function")a.F();else for(var b in a)a[b]=m};s.pd=function(a){return typeof a.se=="function"?a.se():!0};s.contains=function(a){return this.B.contains(a)||this.Ga.contains(a)};s.L=function(){return this.B.L()+this.Ga.L()}; s.ua=function(){return this.B.ua()&&this.Ga.ua()};s.e=function(){jf.a.e.call(this);this.Ga.L()>0&&e(Error("[goog.structs.Pool] Objects not released"));delete this.Ga;for(var a=this.B;!a.ua();)this.Ua(a.pb());delete this.B};function lf(a,b){this.va=a;this.gc=b}lf.prototype.ea=p("gc");lf.prototype.ba=function(){return new lf(this.va,this.gc)};function mf(a){this.fa=[];if(a)a:{var b,c;if(a instanceof mf){if(b=a.Qb(),c=a.ra(),a.L()<=0){for(var a=this.fa,d=0;d0;)if(d=b-1>>1,a[d].va>c.va)a[b]=a[d],b=d;else break;a[b]=c}s=mf.prototype; s.remove=function(){var a=this.fa,b=a.length,c=a[0];if(!(b<=0)){if(b==1)qb(a);else{a[0]=a.pop();for(var a=0,b=this.fa,d=b.length,h=b[a];a>1;){var g=a*2+1,j=a*2+2,g=jh.va)break;b[a]=b[g];a=g}b[a]=h}return c.ea()}};s.ra=function(){for(var a=this.fa,b=[],c=a.length,d=0;d0;){var b=this.getObject();if(b)a.pb().apply(this,[b]);else break}};s.Rc=function(a){pf.a.Rc.call(this,a);this.vc()};s.jc=function(){pf.a.jc.call(this);this.vc()}; s.e=function(){pf.a.e.call(this);u.clearTimeout(this.ue);this.Hc.clear();this.Hc=m};function qf(a,b,c){pf.call(this,b,c);this.Ie=a}A(qf,pf);qf.prototype.ob=function(){var a=new Ye,b=this.Ie;b&&he(b,function(b,d){a.headers.set(d,b)});return a};qf.prototype.Ua=function(a){a.F()};qf.prototype.pd=function(a){return!a.Lb&&!a.ub()};function rf(a,b,c,d){this.url=a;this.U=b;this.Te=c;this.Se=d}function sf(){this.fe=new qf({},1);this.xa={};this.Ic=[]}A(sf,gd);y(sf);function tf(a){H.call(this,"server_info_change");this.Ma=a}A(tf,H);function uf(a){H.call(this,"plugin_list_change");this.plugins=a}A(uf,H);function vf(a){H.call(this,"universe_list_change");this.xa=a}A(uf,H);function wf(a){H.call(this,"plugin_change");this.We=a}A(wf,H); function xf(a){yf(a,"json/server_stats",function(a){a=gf(a.target);this.dispatchEvent(new tf(a))})}function zf(a){yf(a,"json/universe_plugin_list",function(a){if(ff(a.target)!=200)Nd.wf.info("Request failed: "+String(a.target.wb)+" : "+(z(a.target.Ia)?a.target.Ia:String(a.target.Ia)));else{a=gf(a.target);this.xa={};for(var c=0;c=30?(b=Nd.ne.p(),b.Af(ed.ne.kf.of),yc(b.Mb,"Failed to Communicate with Server"),b.N("The request pool was empty, the server is probably down."),b.Z(!0)):(a.Ic.push(new rf(b,c,d,h)),a.fe.getObject(function(b){if(a.Ic.length){var c=a.Ic.shift();c.U&&K(b,"complete",c.U,!1,a);K(b,"ready",a.te,!1,a);b.send(c.url,c.Te,c.Se)}},1))}sf.prototype.te=function(a){a=a.target;cc(a);this.fe.eb(a)};function Hf(a,b,c,d,h,g,j,l){var n,o=c.offsetParent;if(o){var w=o.tagName=="HTML"||o.tagName=="BODY";if(!w||Jc(o,"position")!="static")n=Nc(o),w||(n=fc(n,new M(o.scrollLeft,o.scrollTop)))}o=Uc(a);(w=Mc(a))&&o.Td(new ic(w.left,w.top,w.right-w.left,w.bottom-w.top));var w=N(a),t=N(c);if(w.o!=t.o){var B=w.o.body,t=t.o.parentWindow||t.o.defaultView,L=new M(0,0),nb=O(B)?O(B).parentWindow||O(B).defaultView:window,de=B;do{var va;if(nb==t)va=Nc(de);else{var I=de;va=new M;if(I.nodeType==1)if(I.getBoundingClientRect)I= Kc(I),va.x=I.left,va.y=I.top;else{var Oc=Ic(N(I)),I=Nc(I);va.x=I.x-Oc.x;va.y=I.y-Oc.y}else{var Oc=ja(I.xe),Pc=I;I.targetTouches?Pc=I.targetTouches[0]:Oc&&I.V.targetTouches&&(Pc=I.V.targetTouches[0]);va.x=Pc.clientX;va.y=Pc.clientY}}L.x+=va.x;L.y+=va.y}while(nb&&nb!=t&&(de=nb.frameElement)&&(nb=nb.parent));B=fc(L,Nc(B));C&&!Hc(w)&&(B=fc(B,Ic(w)));o.left+=B.x;o.top+=B.y}a=(b&4&&Qc(a)?b^2:b)&-5;b=new M(a&2?o.left+o.width:o.left,a&1?o.top+o.height:o.top);n&&(b=fc(b,n));h&&(b.x+=(a&2?-1:1)*h.x,b.y+=(a& 1?-1:1)*h.y);var q;if(j&&(q=Mc(c))&&n)q.top-=n.y,q.right-=n.x,q.bottom-=n.y,q.left-=n.x;a:{n=b.ba();h=0;a=(d&4&&Qc(c)?d^2:d)&-5;d=Sc(c);l=l?l.ba():d.ba();if(g||a!=0)a&2?n.x-=l.width+(g?g.right:0):g&&(n.x+=g.left),a&1?n.y-=l.height+(g?g.bottom:0):g&&(n.y+=g.top);if(j){if(q){g=n;h=0;if((j&65)==65&&(g.x=q.right))j&=-2;if((j&132)==132&&(g.y=q.bottom))j&=-5;if(g.xq.right&&j&16&&(l.width-=g.x+l.width-q.right,h|=4);if(g.x+l.width> q.right&&j&1)g.x=Math.max(q.right-l.width,q.left),h|=1;j&2&&(h|=(g.xq.right?32:0));if(g.y=q.top&&g.y+l.height>q.bottom&&j&32&&(l.height-=g.y+l.height-q.bottom,h|=8);if(g.y+l.height>q.bottom&&j&4)g.y=Math.max(q.bottom-l.height,q.top),h|=2;j&8&&(h|=(g.yq.bottom?128:0));j=h}else j=256;h=j;if(h&496){c=h;break a}}g=D&&(Ja||Ra)&&F("1.9");n instanceof M?(j=n.x,n=n.y):(j=n,n=k);c.style.left=Rc(j,g);c.style.top=Rc(n,g);if(!(d== l||(!d||!l?0:d.width==l.width&&d.height==l.height)))g=Hc(N(O(c))),C&&(!g||!F("8"))?(j=c.style,g?(C?(g=$c(c,"paddingLeft"),d=$c(c,"paddingRight"),n=$c(c,"paddingTop"),q=$c(c,"paddingBottom"),g=new gc(n,d,q,g)):(g=R(c,"paddingLeft"),d=R(c,"paddingRight"),n=R(c,"paddingTop"),q=R(c,"paddingBottom"),g=new gc(parseFloat(n),parseFloat(d),parseFloat(q),parseFloat(g))),C?(d=bd(c,"borderLeft"),n=bd(c,"borderRight"),q=bd(c,"borderTop"),c=bd(c,"borderBottom"),c=new gc(q,n,c,d)):(d=R(c,"borderLeftWidth"),n=R(c, "borderRightWidth"),q=R(c,"borderTopWidth"),c=R(c,"borderBottomWidth"),c=new gc(parseFloat(q),parseFloat(n),parseFloat(c),parseFloat(d))),j.pixelWidth=l.width-c.left-g.left-g.right-c.right,j.pixelHeight=l.height-c.top-g.top-g.bottom-c.bottom):(j.pixelWidth=l.width,j.pixelHeight=l.height)):(c=c.style,D?c.MozBoxSizing="border-box":E?c.WebkitBoxSizing="border-box":c.boxSizing="border-box",c.width=l.width+"px",c.height=l.height+"px");c=h}return c};function If(){}If.prototype.sd=aa();function Jf(a,b){this.element=a;this.Wc=b}A(Jf,If);Jf.prototype.sd=function(a,b,c){Hf(this.element,this.Wc,a,b,k,c)};function Kf(a,b,c){Jf.call(this,a,b);this.pe=c}A(Kf,Jf);Kf.prototype.Pd=r(5);Kf.prototype.sd=function(a,b,c,d){var h=Hf(this.element,this.Wc,a,b,m,c,10,d);if(h&496){var g=Lf(h,this.Wc),b=Lf(h,b),h=Hf(this.element,g,a,b,m,c,10,d);h&496&&(g=Lf(h,g),b=Lf(h,b),this.pe?Hf(this.element,g,a,b,m,c,this.Pd(),d):Hf(this.element,g,a,b,m,c,0,d))}};function Lf(a,b){a&48&&(b^=2);a&192&&(b^=1);return b};function Mf(a,b,c,d){Kf.call(this,a,b,c||d);this.Ze=d}A(Mf,Kf);Mf.prototype.Pd=function(){return 65|(this.Ze?32:132)};var Nf,Of;Of=Nf=!1;var Pf=Ka();Pf&&(Pf.indexOf("Firefox")!=-1||Pf.indexOf("Camino")!=-1||(Pf.indexOf("iPhone")!=-1||Pf.indexOf("iPod")!=-1?Nf=!0:Pf.indexOf("iPad")!=-1&&(Of=!0)));var Qf=Nf,Rf=Of;function Sf(){}A(Sf,td);y(Sf);Sf.prototype.d=function(a){return a.S().d("div",this.j())};Sf.prototype.N=aa();Sf.prototype.j=r("goog-menuseparator");function Tf(a,b){V.call(this,m,a||Sf.p(),b);Ld(this,1,!1);Ld(this,2,!1);Ld(this,4,!1);Ld(this,32,!1);this.n=1}A(Tf,V);Tf.prototype.i=function(){Tf.a.i.call(this);sd(this.b(),"separator")};wd("goog-menuseparator",function(){return new Tf});function Uf(){}y(Uf);s=Uf.prototype;s.la=aa();s.d=function(a){return a.S().d("div",this.Va(a).join(" "))};s.w=function(a){return a};s.tb=function(a){a=a.b();Yc(a,!0,D);if(C)a.hideFocus=!0;var b=this.la();b&&sd(a,b)};s.C=function(a){return a.b()};s.j=r("goog-container");s.Va=function(a){var b=this.j(),c=[b,a.yb==Vf?b+"-horizontal":b+"-vertical"];a.isEnabled()||c.push(b+"-disabled");return c};function Wf(){}A(Wf,Uf);y(Wf);Wf.prototype.la=r("menu");Wf.prototype.Ra=function(a,b){return xc(a.b(),b)};Wf.prototype.j=r("goog-menu");Wf.prototype.tb=function(a){Wf.a.tb.call(this,a);U(a.b(),"haspopup","true")};wd("goog-menuseparator",function(){return new Tf});function Xf(){this.Jd=[]}A(Xf,td);y(Xf);function Yf(a,b){var c=a.Jd[b];if(!c){switch(b){case 0:c=a.j()+"-highlight";break;case 1:c=a.j()+"-checkbox";break;case 2:c=a.j()+"-content"}a.Jd[b]=c}return c}s=Xf.prototype;s.la=r("menuitem");s.d=function(a){var b=a.S().d("div",this.Va(a).join(" "),Zf(this,a.Ca,a.S()));$f(this,a,b,!!(a.u&8)||!!(a.u&16));return b};s.w=function(a){return a&&a.firstChild}; s.N=function(a,b){var c=this.w(a),d=ag(this,a)?c.firstChild:m;Xf.a.N.call(this,a,b);d&&!ag(this,a)&&c.insertBefore(d,c.firstChild||m)};function Zf(a,b,c){a=Yf(a,2);return c.d("div",a,b)}s.wd=function(a,b,c){b&&(sd(b,c?"menuitemradio":this.la()),$f(this,a,b,c))};function ag(a,b){var c=a.w(b);if(c){var c=c.firstChild,d=Yf(a,1);return!!c&&!!c.className&&c.className.indexOf(d)!=-1}return!1} function $f(a,b,c,d){d!=ag(a,c)&&(d?lc(c,"goog-option"):mc(c,"goog-option"),c=a.w(c),d?(a=Yf(a,1),c.insertBefore(b.S().d("div",a),c.firstChild||m)):c.removeChild(c.firstChild))}s.nc=function(a){switch(a){case 2:return Yf(this,0);case 16:case 8:return"goog-option-selected";default:return Xf.a.nc.call(this,a)}};s.j=r("goog-menuitem");function bg(a,b,c,d){V.call(this,a,d||Xf.p(),c);this.Oa(b)}A(bg,V);s=bg.prototype;s.ea=function(){var a=this.od;return a!=m?a:this.Ob()};s.Oa=ba("od");s.wd=function(a){Ld(this,8,a);this.vb()&&!a&&this.bc(!1);var b=this.b();b&&this.f.wd(this,b,a)};s.Ob=function(){var a=this.Ca;return ga(a)?(a=lb(a,function(a){return pb(kc(a),"goog-menuitem-accel")?"":Ec(a)}).join(""),ua(a)):bg.a.Ob.call(this)}; s.Fa=function(a){var b=this.getParent();if(b){var c=b.de;b.de=m;if(b=c&&ia(a.clientX))b=new M(a.clientX,a.clientY),b=c==b?!0:!c||!b?!1:c.x==b.x&&c.y==b.y;if(b)return}bg.a.Fa.call(this,a)};wd("goog-menuitem",function(){return new bg(m)});function Z(a,b,c){hd.call(this,c);this.f=b||Uf.p();this.yb=a||cg}A(Z,hd);var Vf="horizontal",cg="vertical";s=Z.prototype;s.ld=m;s.W=m;s.f=m;s.yb=m;s.s=!0;s.da=!0;s.ad=!0;s.I=-1;s.z=m;s.Ka=!1;s.qe=!1;s.Re=!0;s.pa=m;s.C=function(){return this.ld||this.f.C(this)};s.oc=function(){return this.W||(this.W=new Ad(this.C()))};s.d=function(){this.m=this.f.d(this)};s.w=function(){return this.f.w(this.b())}; s.i=function(){Z.a.i.call(this);od(this,function(a){a.k&&dg(this,a)},this);var a=this.b();this.f.tb(this);this.Z(this.s,!0);ld(this).g(this,"enter",this.dd).g(this,"highlight",this.ed).g(this,"unhighlight",this.gd).g(this,"open",this.Ge).g(this,"close",this.Ae).g(a,"mousedown",this.Ea).g(O(a),"mouseup",this.Ce).g(a,["mousedown","mouseup","mouseover","mouseout"],this.ze);this.Za()&&eg(this,!0)}; function eg(a,b){var c=ld(a),d=a.C();b?c.g(d,"focus",a.rc).g(d,"blur",a.Wa).g(a.oc(),"key",a.sa):c.ha(d,"focus",a.rc).ha(d,"blur",a.Wa).ha(a.oc(),"key",a.sa)}s.ja=function(){fg(this,-1);this.z&&this.z.t(!1);this.Ka=!1;Z.a.ja.call(this)};s.e=function(){Z.a.e.call(this);if(this.W)this.W.F(),this.W=m;this.f=this.z=this.pa=this.ld=m};s.dd=r(!0); s.ed=function(a){var b=rd(this,a.target);if(b>-1&&b!=this.I){var c=T(this,this.I);c&&c.wa(!1);this.I=b;c=T(this,this.I);this.Ka&&c.setActive(!0);this.Re&&this.z&&c!=this.z&&(c.u&64?c.t(!0):this.z.t(!1))}U(this.b(),"activedescendant",a.target.b().id)};s.gd=function(a){if(a.target==T(this,this.I))this.I=-1;U(this.b(),"activedescendant","")};s.Ge=function(a){if((a=a.target)&&a!=this.z&&a.getParent()==this)this.z&&this.z.t(!1),this.z=a};s.Ae=function(a){if(a.target==this.z)this.z=m}; s.Ea=function(a){if(this.da)this.Ka=!0;var b=this.C();b&&Bc(b)?b.focus():a.preventDefault()};s.Ce=function(){this.Ka=!1};s.ze=function(a){var b;a:{b=a.target;if(this.pa)for(var c=this.b();b&&b!==c;){var d=b.id;if(d in this.pa){b=this.pa[d];break a}b=b.parentNode}b=m}if(b)switch(a.type){case "mousedown":b.Ea(a);break;case "mouseup":b.Fa(a);break;case "mouseover":b.uc(a);break;case "mouseout":b.tc(a)}};s.rc=aa();s.Wa=function(){fg(this,-1);this.Ka=!1;this.z&&this.z.t(!1)}; s.sa=function(a){return this.isEnabled()&&this.s&&(pd(this)!=0||this.ld)&&this.Xa(a)?(a.preventDefault(),a.stopPropagation(),!0):!1}; s.Xa=function(a){var b=T(this,this.I);if(b&&typeof b.sa=="function"&&b.sa(a))return!0;if(this.z&&this.z!=b&&typeof this.z.sa=="function"&&this.z.sa(a))return!0;if(a.shiftKey||a.ctrlKey||a.metaKey||a.altKey)return!1;switch(a.keyCode){case 27:if(this.Za())this.C().blur();else return!1;break;case 36:gg(this);break;case 35:hg(this);break;case 38:if(this.yb==cg)ig(this);else return!1;break;case 37:if(this.yb==Vf)qd(this)?jg(this):ig(this);else return!1;break;case 40:if(this.yb==cg)jg(this);else return!1; break;case 39:if(this.yb==Vf)qd(this)?ig(this):jg(this);else return!1;break;default:return!1}return!0};function dg(a,b){var c=b.b(),c=c.id||(c.id=kd(b));if(!a.pa)a.pa={};a.pa[c]=b}s.Jb=function(a,b){Z.a.Jb.call(this,a,b)};s.mb=function(a,b,c){a.zd|=2;a.zd|=64;(this.Za()||!this.qe)&&Ld(a,32,!1);Hd(a,!1);Z.a.mb.call(this,a,b,c);c&&this.k&&dg(this,a);b<=this.I&&this.I++}; s.removeChild=function(a,b){if(a=z(a)?nd(this,a):a){var c=rd(this,a);c!=-1&&(c==this.I?a.wa(!1):c-1&&T(a,a.I).wa(!1)}s.wa=function(a){fg(this,rd(this,a))};function gg(a){kg(a,function(a,c){return(a+1)%c},pd(a)-1)}function hg(a){kg(a,function(a,c){a--;return a<0?c-1:a},0)}function jg(a){kg(a,function(a,c){return(a+1)%c},a.I)}function ig(a){kg(a,function(a,c){a--;return a<0?c-1:a},a.I)} function kg(a,b,c){for(var c=c<0?rd(a,a.z):c,d=pd(a),c=b.call(a,c,d),h=0;h<=d;){var g=T(a,c);if(g&&a.Hd(g)){fg(a,c);break}h++;c=b.call(a,c,d)}}s.Hd=function(a){return a.s&&a.isEnabled()&&!!(a.u&2)};function lg(){}A(lg,td);y(lg);lg.prototype.j=r("goog-menuheader");function mg(a,b,c){V.call(this,a,c||lg.p(),b);Ld(this,1,!1);Ld(this,2,!1);Ld(this,4,!1);Ld(this,32,!1);this.n=1}A(mg,V);wd("goog-menuheader",function(){return new mg(m)});function ng(a,b){Z.call(this,cg,b||Wf.p(),a);this.gb(!1)}A(ng,Z);s=ng.prototype;s.Sc=!0;s.re=!1;s.j=function(){return this.f.j()};s.Ra=function(a){if(this.f.Ra(this,a))return!0;for(var b=0,c=pd(this);b "+(o-1));return}o=b[g].max;if(o!=k&&n>o){a.Dd("Invalid Value",b[g].description+" must be < "+(o+1));return}h+=j+"="+l+"&"}else if(b[g].type=="string")l=d.elements[j].value,h+=j+"="+l+"&"; else if(b[g].type=="bool")h+=j+"="+(b[g].object.vb()?"1":"0")+"&";else if(b[g].type=="select")l=b[g].object.qb(),l=b[g].value[l].value,h+=j+"="+l+"&"}Df(a.J,a.Aa,a.Ib,a.za.id(),a.za.hint(),h,function(b){b=gf(b.target);b.error?alert(b.error):Rg(a)})};function Ug(){var a=sf.p();K(a,"server_info_change",this.gf,!1,this);xf(a)}Ug.prototype.title=r("Home");Ug.prototype.blur=aa();Ug.prototype.update=function(){xf(sf.p())}; Ug.prototype.gf=function(a){P("server_hostname").innerHTML=a.Ma.hostname;P("server_ip").innerHTML=a.Ma.ip;P("server_broadcast").innerHTML=a.Ma.broadcast;P("server_mac").innerHTML=a.Ma.hw_address;P("server_instance_name").innerHTML=a.Ma.instance_name;P("server_version").innerHTML=a.Ma.version;P("server_uptime").innerHTML=a.Ma.up_since;if(!a.Ma.quit_enabled&&(a=P("stop_button")))a.style.display="none"};function Vg(a){this.ia=a;this.Bd=[];this.enabled=this.ke=!1;this.ec=k}Vg.prototype.O=function(a,b){this.enabled=a;this.ec=b;if(this.enabled){if(!this.ke){for(var c=0;c<512;++c){var d=Q("div");d.title="Channel "+(c+1);var h=Q("div");h.innerHTML=c+1;var g=Q("span");g.innerHTML=" ";d.appendChild(h);d.appendChild(g);this.ia.appendChild(d);this.Bd.push(g)}this.ke=!0}Wg(this)}};function Wg(a){a.enabled&&Ff(sf.p(),a.ec,function(b){Xg(a,b.dmx)})} function Xg(a,b){for(var c=Math.min(512,b.length),d=0;d90?"#ffffff":"#000000"}function Zg(a,b){var c=a.Bd[b];if(c!=k)c.innerHTML=" ",c.style.background="#ffffff"};function $g(){this.Zd=new ae("monitor_frame");this.K=new ae("monitor_universe_frame");this.H();this.Zb();this.J=sf.p();K(this.J,"universe_list_change",this.fc,!1,this);this.Yd=new Vg(P("monitor_frame"))}s=$g.prototype;s.title=r("DMX Monitor");s.blur=function(){this.Yd.O(!1,k)};s.Zb=function(){this.aa=k};s.H=function(){ce(this.Zd);ce(this.K)};s.update=function(){this.H();this.Zb();ee(this.K);be(this.K);zf(this.J)}; s.fc=function(a){if(this.aa==k){fe(this.K);var b=new Z;S(b,this.K.element);var c=this;this.aa=new Pd(b,new Mg(function(a){c.Db(a.id(),a.name())}))}for(var b=[],d=0;d512)return!1}d=c[2];if(d!=k&&d!=""&&(d=eh(c[2]),d==k||d==0||d>512))return!1;d=c[3];return d!=k&&d!=""&&(c=eh(c[3]),c==k||c>255)?!1:!0}function eh(a){if(!(a==m||a==k))return a=parseInt(a),isNaN(a)?k:a}function dh(a){a=a.replace(">","THRU");a=a.replace("*","1 THRU 512");a=a.replace("ALL","1 THRU 512");a=a.replace("@ +","@ 255");return a=a.replace("@ FULL","@ 255")};function fh(a,b){this.ec=b;this.ee=new bh;this.Bb=Q("table");var c=Q("caption");c.innerHTML=a;this.Bb.appendChild(c);gh(this);c="7,8,9, THRU ,4,5,6, @ ,1,2,3,FULL,0,ENTER".split(",");for(i=0;i<3;++i){var d=Q("tr");for(x=0;x<4;++x){var h=Q("td"),g=hh(this,c[i*4+x]);S(g,h);d.appendChild(h)}this.Bb.appendChild(d)}Q("tr");d=Q("td");g=hh(this,c[12]);S(g,d);this.Bb.appendChild(d);d=Q("td");g=hh(this,c[13]);S(g,d);d.colSpan="3";this.Bb.appendChild(d)} function hh(a,b){var c=new Y(ed.nf);c.N(b);K(c,"action",function(){ih(this,b)},!1,a);return c} function ih(a,b){if(b=="<"){var c=a.P.value.length-1;if(isNaN(parseInt(a.P.value.substr(c,1)))){var d=0;switch(a.P.value.substr(c-1,1)){case "L":d=3;break;case "@":d=2;break;case "U":d=5;break;default:d=0}c-=d}a.P.value=a.P.value.substr(0,c);ih(a,"")}else if(b=="ENTER"){a:{c=a.P.value;if(c.length!=0&&(c=a.ee.we.exec(dh(c)),c!=m)){var d=eh(c[1]),h=eh(c[2]),g=eh(c[3]);if(!(d==k||g==k)){if(c[2]!=k&&h==k){c=!1;break a}c=new ah(d,h,g);c=c.start>=1&&c.start<=512&&c.value>=0&&c.value<=255&&(c.end==k||c.end>= 1&&c.end<=512&&c.end>=c.start)?c:k;break a}}c=k}if(c!=k)a.execute(c),a.P.value=""}else if(c=a.P.value+b,ch(a.ee,c)==!0)a.P.value=c} function gh(a){var b=Q("tr"),c=Q("td");c.colSpan="4";a.P=Q("input");a.P.type="text";c.appendChild(a.P);var d=new Ad(a.P);K(d,"key",function(a){a:{var a=a.keyCode,b=this.P.value,c=m;switch(a){case 32:break;case 13:ih(this,"ENTER");break a;default:break a}a=b.substr(b.length-1,1);switch(a){case "F":c="ULL";break;case "T":c="HRU";break;case "A":c="LL @";break;default:c=m}if(c!=m)this.P.value=b+c}},!0,a);d=hh(a,"<");Jd(d,"backspace-button");S(d,c);b.appendChild(c);a.Bb.appendChild(b)} fh.prototype.execute=function(a){var b=this;Ff(sf.p(),this.ec,function(c){jh(b,c,a)})};function jh(a,b,c){b=b.dmx;if(c.start==c.end)b[c.start-1]=c.value;else for(i=c.start;i<=c.end;++i)b[i-1]=c.value;Gf(sf.p(),a.ec,b,aa())};function kh(){this.lc=new ae("controller_frame");this.K=new ae("controller_universe_frame");this.H();this.Zb();this.J=sf.p();K(this.J,"universe_list_change",this.fc,!1,this)}s=kh.prototype;s.title=r("DMX Keypad");s.blur=aa();s.Zb=function(){this.Aa=this.aa=k};s.H=function(){ce(this.lc);ce(this.K)};s.update=function(){this.H();this.Zb();ee(this.K);be(this.K);zf(this.J)}; s.fc=function(a){if(this.aa==k){fe(this.K);var b=new Z;S(b,this.K.element);var c=this;this.aa=new Pd(b,new Mg(function(a){c.Db(a.id(),a.name())}))}for(var b=[],d=0;da.name())return 1;else if(this.name()");this.Wb.element.innerHTML=a};function ph(a,b,c,d){this.ca=c||N();this.G=a;this.X=[];this.af=b?b:qh;this.me=!!d;this.G.className="goog-tabpane";a=[];for(b=this.G.firstElementChild!=k?this.G.firstElementChild:wc(this.G.firstChild);b;)a.push(b),b=b.nextElementSibling!=k?b.nextElementSibling:wc(b.nextSibling);this.Q=this.ca.d("ul",{className:"goog-tabpane-tabs",tabIndex:"0"});this.R=this.ca.d("div","goog-tabpane-cont");this.G.appendChild(this.R);switch(this.af){case qh:this.G.insertBefore(this.Q,this.R);this.G.insertBefore(rh(this), this.R);lc(this.G,"goog-tabpane-top");break;case 1:this.G.appendChild(this.Q);this.G.appendChild(rh(this));lc(this.G,"goog-tabpane-bottom");break;case 2:this.G.insertBefore(this.Q,this.R);lc(this.G,"goog-tabpane-left");break;case 3:this.G.insertBefore(this.Q,this.R);lc(this.G,"goog-tabpane-right");break;default:e(Error("Invalid tab location"))}this.Q.tabIndex=0;K(this.Q,this.me?"mousedown":"click",this.ae,!1,this);K(this.Q,"keydown",this.be,!1,this);for(c=0;b=a[c];c++)sh(this,new th(b))}A(ph,gd); var qh=0;function rh(a){var b=N(k),c=m;if(C)c=b.o.createStyleSheet(),Wc(c);else{var d=Gc(b,"head")[0];d||(c=Gc(b,"body")[0],d=b.d("head"),c.parentNode.insertBefore(d,c));c=b.d("style");Wc(c);b.appendChild(d,c)}return a.ca.d("div","goog-tabpane-clear")}s=ph.prototype;s.e=function(){ph.a.e.call(this);Zb(this.Q,this.me?"mousedown":"click",this.ae,!1,this);Zb(this.Q,"keydown",this.be,!1,this);delete this.G;this.R=this.Q=m}; function sh(a,b){if(b.q&&b.q!=a&&b.q instanceof ph){var c=b.q,d=b;ia(d)&&(d=c.X[d]);c.X.splice(d.sb,1);d.cc(m);vc(d.Mb);vc(d.R);for(var h=0;d=c.X[h];h++)d.cc(c,h)}c=a.X.length;fa(k)&&k!=c?(c=k,a.X.splice(c,0,b),a.Q.insertBefore(b.Mb,a.Q.childNodes[c])):(a.X.push(b),a.Q.appendChild(b.Mb));b.cc(a,c);if(!a.Y)a.Y=b,a.dispatchEvent(new uh("change",a,a.Y));a.R.appendChild(b.R);vh(b,b==a.Y);for(d=c+1;c=a.X[d];d++)c.sb=d} s.Na=function(a){if(a>=0&&a=this.X.length?0:a);break;case 36:this.Na(0);break;case 35:this.Na(this.X.length-1)}}; function th(a,b,c){var d,h;if(z(a)&&!fa(b))d=a;else if(b)d=b,h=a;else if(a){if(b=a.firstElementChild!=k?a.firstElementChild:wc(a.firstChild))d=Cc(b),b.parentNode.removeChild(b);h=a}this.ca=c||N();this.R=h||this.ca.d("div");this.Mb=this.ca.d("li",m,d);this.sb=this.q=m;this.da=!0}th.prototype.w=p("R");th.prototype.getParent=p("q");th.prototype.isEnabled=p("da");function vh(a,b){if(a.isEnabled())a.R.style.display=b?"":"none",a.Mb.className=b?"goog-tabpane-tab-selected":"goog-tabpane-tab"} th.prototype.cc=function(a,b){this.q=a;this.sb=fa(b)?b:m};function uh(a,b,c){H.call(this,a,b);this.page=c}A(uh,H);function wh(){this.na=[];this.na.push(new Ug);this.na.push(new Ng);this.na.push(new $g);this.na.push(new kh);this.na.push(new oh);this.Ad=new ph(P("tab_pane"));for(var a=0;aD=G#¯ùÜÞ›³Ÿ0gÎ廲ï7ÕÙÂH¤P‡·…ë··ÑPõÜ’£Œ¦wšþçQ–Là¬V¸ý'¶î'ÿÚ œø¨]Ê4ç¨c@ùÈNÐãÜbíÚ+V¬Ý¸|ùòüfæ1TÏcÐáỷcÁÉC2z+W`u›? yõ›3ôM9ç“ájÚ,È´‡pUY¬ÆmYX”·¾õ-ndØî±Á‹¬H´ôt]àDè|mV8«¤pˆ8Fá<ð•è§Öç²Ùø=róÞfsùj¥F à «!¤‰k‚°‰:ðE‚fL_à0oä>ElñâÅ Pr˜KL×gGNI0yFw@ºÂùÒÑðî)võÛT2¢ßpçtÂ/1&“®Êó¥Ð ²"jâò0oé[Œx£'¨bJ·9]ßÀäȨ;È*\ž)[:2ò¥*Ý¢Ò'NJâ½ð†i«pУ\VP ê‹í6'ï²—7ãÍåvï´Ù'׃Êy¼ðGêæ«à*&tjãÔÇ ˆ8 ¸Þ~mûöƒ‡¿ùhc 8.%¨‘Ib²×ãm+<)ö8z4{JZJ·‡fôNék8¿?p~ ¸ˆ„³Â Ëë­Qó¶Á·hÆM'JJdÃÒî.* ‡I‹F5ÀAEákur@ü0æV¸?cÀ ´ñ—Nw¦]½,ïªÇ'ê]ãƒÁ¥|šsúÒ| ¸Íj…S¡ õTÕYî¸DvŽ<ÒÒòýºGÞoÛ&†Eæ[[â*œ¹Nw4J`O&|cg[¯´€ÕpºrnME_ø§iêÔ½ ì®7_Z P”L¨Nd ÞÜ|ØÒbœO1lê|Úã 0)û("Z…Ó Û?Âé•êŒU8Ž1Ýò“òp­ûÿÔí …Bßµ"à<ÐC2ªŸ‘æ¬ËQÍVP.íN9Ó2(àT5ܺÔ'H‚.м!â¤xy½Á ¾¼kÆÜ4iö\tªãb…Y!&EáfÁ®©©©ÿ€'n~ðÚÜ »wOØ dà€.pRCÄ‘x »˜¾hKô°q>E¸1õ[£Ì›AÖpbdÌ(“RéÉ©©á`LäÌ+Ü_ºPè­ÿÀÀ¡Õ¤'v8WF/·x, 8(»{e¸xÜfVá üPµ²‚Õh{©:2‚¼$ó&7ßX¼è޼‘£òóÇ”²«T}ßüÆ•¹Ž PÃ?©Ø*p6}øÛ|vo¬·~8©%Œˆ#¼‡#ŒIÜ3³ ÷C f½Ð¨^¦R«Ró«Tý ¥£pšE »J•·¼¨Uj¬f:5©á~ì ½÷ó±Ï1pxKÄƒ× §U2[1ûÜÅ6Ò ·§©žr‘ŸÛ 8 œ ÆIÍ|ý-ƒçç_9È}Ý 8;{´¯-“¯pØ*$Þ@ÓW|õÒX~h“,ì¨"¼‡»/GZjæ&؃ &o´h0©pÚmØ®}8«î›†'NüØññ±_B!œ@©œ òŽAì§Òa¶ë™™é™™™;²²ÜƒLÜÏü›†öÕpr Q8rõÞ>ýrH“yà0q˜7 n‹ÀjZ:o¿7ᛆ„ —N[GÞ4Xu_m Ãøú·ŸÞ‘€ždonu`ÉhâeŽf?X:cž`}“‰›úø­ÕI»qyKôjËèMƒ¹ÈòÖà¬mémêš8ë݇K’U |Z!æTÐ|YÙéâí´GÆgú¯E¬ÖøÈÖHöî,³3ÿ’:ÅÔ¿”ý B0ÕñK IEND®B`‚ola-0.10.9/olad/www/light_bulb.png0000664000175000017500000000124114376533110013664 00000000000000‰PNG  IHDRóÿatEXtSoftwareAdobe ImageReadyqÉe<CIDATxÚ„“ÏoAÇßì, tÁ’%BÒJª‰ÕC iô¬Iõ¢‰'O&zR¯þê?`¢žzähµ Iè¡“Ƥü£uZÒb›„ »ÌÎú °ZêËNfÞÌû~Þ¾·;Ä0 èYü!Bð¹€îE<9‰Çç*Îi¦CZGçÖK½¯Ál¨…ko(¸zF÷¹ÕVÙØß(TЉ×Áýíâž/áègÕ˜å’Ã;57ûháÎhà\··´ŸíÄ–úÞãÛïäeÃÌ ÆÀ×› ^Õù¡À¹Ö&DJmÀXýª­ÂÙù»3XÆ•A©ÆÁ=:>9ÆØA Ùcu®ª»Ày› Pwù&Á露.?–­U«ï1&7p À ‹ŸÒ¥ÒZþ‡$¶ˆ¢CTV?nrk%A¬Ù6ÿ8&@«ÝLÓaùs2QFq`ɯ$vpï-6°ÓDÚĦÖ_æ ùŒJ:9 ù¬…8ÂL€]î-ëÉuŸNÙo(ŠO–Ôͨߨý°'†¼¯‡@Ó¤®—RøQzsþ¶J¥õúÞq!ÿÜÆ¾qÎßD"Ñ›¸ôà•ÚÛw…æLqÔIÄlF–IEND®B`‚ola-0.10.9/olad/www/mobile.html0000664000175000017500000002634414376533110013213 00000000000000 OLA
Hostname
Primary IP
Primary Broadcast Address
Primary MAC Address
Instance Name
Version
Started
ola-0.10.9/olad/www/toolbar-bg.png0000664000175000017500000000024614376533110013605 00000000000000‰PNG  IHDR gè9PLTEøøøîîîóóóèèèúúúõõõööö÷÷÷ñññïïïùùùòòòëëëêêêéééíííçççæææåååYÞvJ(IDATx^%Á… ±Ã]÷–OhñT¾D$`µ‘)]t§›Ã} C²íÎ;IEND®B`‚ola-0.10.9/olad/www/handle.vertical.png0000664000175000017500000000054114376533110014616 00000000000000‰PNG  IHDRÞgãgAMA¯È7ŠétEXtSoftwareAdobe ImageReadyqÉe<PLTEœ™œÍÎÍZ]Zÿÿÿæææÿÿÿ$ êtRNSÿÿÿÿÿ³¿¤¿ÂIDATxÚb`eeBVV€b`ebF&V€b`bfAF&€Bç: €Ðù„Î t>@¡ó@p>„@0>3„@P>ˆËâ„æ2ƒø„ÐÏ V@èúI?˜@HúÁ|€óaÆù„® €Ðõºû@è|€Bç: €Ðù„Î t>@ã˜Xˆ-~ ¸¥Ñó|5IEND®B`‚ ola-0.10.9/olad/www/toolbar_sprites.png0000664000175000017500000001060214376533110014765 00000000000000‰PNG  IHDR ‘tXIIDAThµ: x”E–ï?ú¢Ó 9ÈÙ„®@HÂpAÃM„È1:*°FĆC×UˆºŽº~ÂŽ,"£qg‚ „S4$BBŽrt§»ÓÇí«¿ÓNÓ9pœúRý¿ªzïU½úßUõ‡‚aIHHPŽ3f±¿¿ºN§ á8®ëÎ 6äü §…œ?Á( Y% $ šA€¢¹[ ¨ÛyÝ!Á®…,âÝâõ~PùÔSO-H×jµ!<Ï×Ùíöüq·ò§¬ùß8`™8 %EJ©V‡(U”mX^Ùû©;0ƒÓÏÌÃÖÓM'Ìïèí=T÷½&("ðß´“J¶vGõÖ)éæ›©îp¼ÇºGNú¾/„? ?>ø‰7aOíôôt}PPÐþúúúD“¨°j´þ<Í™ÔýtÊðððœêêê'rrrÚºå3#ÿ¸Óô-Ï7t‹×1Hå,‡t~ØøøôçÆjÄ„9l·$cMucuîîB㪳} ûuÓGq* {OæL{Ö7žéþÜ¿¹ñ=ºÈŠ·ÿÎ;‰&å÷ÓñoQ‡¡üaaa9gΜy¢  À[~jô+ŸŽÚ?8yéÔßM‹ 7´9ì·îÔ}²ðtÅÆ¢’+Îá<=®‹¬%dÎÉ4( ž¦(*$jþœq{ÈXO¥ùTB´Tè&n²ä›-IÔ;~]J60QÓuSntRÆÄÏIÍ VÌïM–÷ä ×–úîæ"Öî»L9:Böƒ U#Âý* «V«÷^½Õ4ñ¹ÂÄÄdS|¤¿*¦ŸVS~>/àçÝÛÒ#""¶ ß§|OÞÞ˜ AA !èèb86õz·¸8øý ¢ë?üñ«>_(ˆf‰çÍWÏ9üëb“–­/Üú!ûí²«õOn…ŸzâåÏ9ÒiŸ]Ýî'EýÍ {¬B¡Ø[YoŒ š„ò'$›>{bpÚ·åÆâŠó'Pþìô”””-¨€äõÒ¦øÁú Ñ›ŸÍXeµKœ¬-f¾M4ï>‘žùú·XûŠ[®nzåŠÇ\ÀY'Ó$†]GST…aŸ@Ѩòµ­ï¼ãy†=“{4è ‰eµæS#—™ó‡Ï–N`†'™óZÿ, ¶×EAxÑsÒiŸJ¹/¤Pzô€²ò½”+ÁGÓpbоý/}/Ña1qÑg²I’€Ð(Úí IæœÉ t¤7ì©Ô•û»ç†½q{Óv8²ü’²'`6)àBKÄväÀ¡ÖÈc ~~~å—¨ÀøˆA¸Wèõ@²ñ‚£µ³ãöáê%G|D¿(‰‚|­x>š¥·Ñ UCQôF‘‚ùèþÖ0,UÌ á“Ê*P¨˜y1OÅøâAúÌÇÂÍ'†µäÅI´ÿ,J7 ~úå:\.­‚[Æþ€ ©QªM†¢¢(ósŠI¢*/·Ûçï¢vÁ™°оn„ܳ‹@”pP{$+ÂÂ6ÃIÈËhtã¶mmm!6Þ¨Fwc·óàÀjÃÚbæx´N%‡!!4v˜¹ò\^¤å„€ºï$äKc²‚UÄŠ00™ÛUTªþÐ/ô[È(X9£³]ÝžOôyŒÝÖ(˜Û*xÌydå³X®± £¤Y¶/…sð“"¯’™™)Aë.(‡é÷#¶—,Y™§³awŸ!Ö‹Cç¦Íf ±©"ŒÅYSÒ¢|~ EX€Úÿ\yUÄ‹MÏKkM¨éèqBŒ‚I¢()Ë! k²“{Ìý•é@x?ì©Oþ'ëÖ­C#AYYF ˜HˆÆÛ…D½NðqÏ´äõÖ3dÿd˜´cWè-ËŸ_.{?ô ÀÊ¢'T0,(0=`ñ‰ ¸ž†9sÿ ~ªç(¬„¶wEô'i4šRsõ‰ÉA“ æV+Gò¹ð¦¢04:˜²ƒkkkË!yؼƒÝN¯Âµ¾s "aÎJ\¿Óý#‰‡£¿ûfÈ´×þ;–ãšØ%±l ¥ÑDÐ*&Ú~zÇÕZâÝr÷D-€¹I®v‰§[ÝSw¢R©T¥¦êS“ƒcS f³ åwÚùíúV¾fG"Ê)ÿ`pMMM¹'!z·¢Í‡NE¾üñÁ&»B…á›×i¶¯V©Ô2ªvçXûÏž4.Øp(µÆ{>+¶%ôl÷7 Œ–€ûxñÆfEE…É' ªª ´Í[`úÔ±`¿ú€‡‹rV„™È‹œÈ;J{ ØÑ6ŠÁrCéû V(@­R@ô¤• ú¨”2LÓ£@äFg¥dE ÊÐÛÚ…FGGÌ%ß ôg$µÙ`…æ¦V¨¿c”ên6©¯7 ¸^q¹¥¡¡á®Ð©€½“à‘µŠühyíÒ>û5\6[óO±å§ÐÐ N7”Öjchn¸êàÇï^h¹Û|ìÏ»á¢IÏ Iâ¨pvT8R‰âqè»P>Â0&&åo 0_ün ŽµÙ$G(¸}Ç$ÝDùOƒòW^i¹{÷îÏ\Ûür]C³±øí¿:˜< °¿>D­íç¯Öèƒú„½òÙžÃu-õÙëkà¨û = ŽÛ`AÀ\Èòæá #{Iúkç8h³ÛÁbµI®VhmkƒV«=`þCu0úÈ, ?%†T_\:óìhñÜ=”—± ÎLMMЇ™ÏÝ  CG4ZÕþ6Ž3h.Ÿ© «­(Ñg"#ðV,øB{[ˆ•9Ø]`”–BÁt9ßð$½]'|o±&Õ–^‹Õ?†\™UüôKMõ…ÂZ¾UÜá‰ë‚1o‘m7Û,ç0vüwÌ®r¡õê¹fÍš— 0süøñ—_~Ù.ÿÈÆ–¼_Î|{Ù^VWyYljjÊD†&o¦U-gí¥üÀ3W*ËSÅè1Ô‰ÇKʯä—VT58®ä{ã{·Qéb”ŒbBIͳX÷x¿ ë«“ÐoέXãMKÚ^‘Aqq1`$ƒÒÒR¸úÅÝMüMx³Ix¸ÞŒúlDu_ÍáþÉv•Ç^ù˜nÙú è 4å‚1ì ‚ äŒ Îù˜šÿhÄÕ@ƒÒ‰Ž¿œx¿  ÛG]&êì.¸54}ÃÝDu/ ÃêÇŽ£’““߯¯ …%%%ëÍ U#ñ^ŒÆÓ!W 1$½~ëÖ­\™–ðàé¯FÕ÷ȯIÖÌÀPЃÝsˆà+½Ž=¸û<ãFYŸü»Š‡.<7`ôÊx‚V’¤Þ&Š{ßÁ17¢€†B ^™#ÙÙæ€_Cd3lÄ‹èžîÉ-¯«ù¯_¿þF^^5jÔ(Yþ‹/Êòc/ˇã 1§zó_§ü.b×sçNAX”P°ÿ|IÜø¡ƒ“]ßîâ/œs¡y?cžO¢ÊU˜keâu z*ºØ;ç›ôÎÕ¸«OŸx]ŸìMOÚ?þ¸4bÄÀ€÷¸rÞ‡y*%q0ãT\ð8[öÎÂOzWÞ§ÏêœþqÑZ Þz¢Þ;ÐÙ-ÁÑÿ¦œ­-žpX–»B)ü8qñ=”^hùòæWTT7bÀ«˜ý_}õÕy¼ë:ˆ7ÿÑx2ÅÓaõk×jQ)1¦µ—üÙĪI½·Ì:¹ENä¥&h£Ö±ÔÏîEìÜc4ÀÅkeÅjŠbq-T—^Ô˜ÍPÜ«£•¹éœ”½b<®+׳¥GˆÈ9Ý•••²ühlûwìØ!˲‡Z,–†Ã‡×"³ù}p®o½UsªŒrà-‰’tº´ÊÑÒâ¨öêî’(Åqš¦ûÒ˜äÓ(6ËR}Ç®½¶žU’»@&€Q°óðƒ)Ï|7‘0cÆ ?º•ïÒ¥Kxw×([WÐ8Õô|DÐþ ¯ý)i¬èXet¯¡î›ž èÄ$/8íd%hÙOÑ–¯Fºç«V­’=Ù|´ncbbâ|¢|„ìàÁƒÄ×V´WÒÕûB®cHq ¶ˆÏAÞ¤<¹ÝÃÏû¹`92î‡äSšGÐ àí½¶ëxiÔå PV>Ožíг«;˜ÈO<—[~Ì›~½ü9[ÛüG޼{ñÜèdý7¾yë ~v&’],õ.‹¦© xè¼sS01¨ŒëhrÒÄâ1b-9²&t7‹)S¦H&L€}ûöÉa×Sù\¸èýޏ`ïç´-…Bîó)²±Ëc®/!Þˆ>Ú÷* A"/zâÉtÐ1ÛÐ8•À1éÂ…/Ãïºoà  ðö¾5..î÷¸ùy] ß_7™Û&æƒI\§&UÝ1À°aCñü ¼_²NøÓ—uj{7Æ· O‰o`êA¡×oÿÍ俟õW}¼qÈÒ’¹¨„i${qzBç4zÆ=-ýOîšÐ<ïõ?ÿüóÒ«¯¾ ,€9÷sy>oÜ®ÚDùFá·à&üì÷ÚqÉü—ÉÄ*Pwn<³ø5}Wt¤ß·’òÂGç ¿Hš]•¢¢¢Rü§3þÇ èõúÇöìÙs´+Üûî·Q'ÁÔ´ 2îëžÆ5n$Þ]Ýu5ïûÙÕ?x2ÂD}†XYþÈÈÈßTþû]?ÅòK(JQ„Q+ïç÷b}†Zϵ»`<ÃÒ¥K!++Ëv]c½}^xe<¥ÏÂoÁNå#dÜ;ÞÒ[ú /**j<†Ý©ÿ“ߘxРA¡Èò0Ö¬ý{Åžä~¿¢`Žû›Ëÿ«ÖkOüÓ•ÕI/]YÝ[1¦OŸ¾jÒ¤IRhh诒½·ót…÷ÿ”¨Ò58 —rIEND®B`‚ola-0.10.9/olad/www/refresh.png0000664000175000017500000000076614376533110013222 00000000000000‰PNG  IHDRóÿa½IDAT8R¿kSQ=ç|÷¹ú†´‹KÒA$`}±BŸkè앤N:5ÝÄ%¾EÜ ¸8m];»uJº˜‚ƒB@üÁCtÈ–ÿà9Ä®¯!zà.ßwÏùÎwîE–eȲ ËPª ë¥Úð_ËyÌÉ$/W¶‡ñŸzD‹dcò~³— ¸,Pª}ˆAvHÆ $§+?oOsž V[$ûc3œæÇ9ƒs e:ð9s+Ûç1‰¾¤”b™Le36)F$¡Ü Xùz´ž€›+‘{ö''›]ÂÚƒÑň"H¾¬§8š ö°?9¹›ƒ´À" ‰îç77§ÅþÒWX†…!ú¨>‡ÕÇãð_B®X¸þð¢,c‡Dd¥Ø¿—üˆN¤€·Beg™Óž9µ\`°@£‹W76|òÖó_mÍÁÓk9ÏwЧÊ9Â9…wž|æ®\ «æ¬.Ç2ÉÆÂÌ”H|)#Ì9•eìÈ .dÚ=m¯ö|yˆßÞÞêJH³¯;s"X ˜©'ÓýÓöêáÒeÚ%ù‰äà㋵Fñò"üõŒã×ÕTÆÈÎþ‡ ¿lñ{ aºÓœIEND®B`‚ola-0.10.9/olad/www/ola.html0000664000175000017500000007055414376533110012521 00000000000000 OLA Admin
ola-0.10.9/olad/www/landing.html0000664000175000017500000000440714376533110013354 00000000000000 Full Version Mobile Version ola-0.10.9/olad/www/discovery.png0000664000175000017500000000153414376533110013565 00000000000000‰PNG  IHDRóÿabKGDÿÿÿ ½§“ pHYsHHFÉk> vpAg\Æ­Ã…IDAT8Ë’_HSQÇÏÙîv·y7Ût“å6J¯#µÝÑ(ˆÁ˜Mô5‰ŒÈ7_‚ÿ<…ôøô"ùæCe…RAì1‰Yþypiw©\ºvïvî=çÜ{{ˆ"i…ô}>Ÿ?>þ±T*eçyþ¦Çãà8®•RZ"„<™]úùþ  y½ÞeI’Yg“óPˆe‡¿ÙmƒK¥Réúââbi ‚À°,û²°[á}©ÑœKÈ|»‡=åw9·V²Íž=úý·¬±XìZU5G™äí\K¸5qàt±fÛ îŠjÁ3½òföMº‹çŸZ !ý²ï¼l1 † Ö B C× p²³µÇ.TX–½ÒP€jÕíß¡c °FªQp¨`Š5 T•€@g·‚ò5l ª*†èÀ©!¢ ºê5;°Ù¬@b-¤‰v!8ØÛ³K’¤7¸\®¯Ÿ³—|ç*²ŒÃüHeê °ÐÔ)¶nd_µˆ¢¸Õ0b:Þ«|™@ò¡­%Ô[STRª ëÀabǧçOç?¾WÊåò?þÁÔÔÔD8î§”öÍÏÏ[¸@‡j œ-›ʊӋŶb~ÓØßß¿±³³óâˆ`rrrFÅéB¡‰Ä}anmm힪ª1†a,cªëzŽa˜»ëëëoàWƒñññ™b±8Ïç!„°bšæòÜÜÜÊðððkŽã"µZ- (ŠT*•ÄÕÕU|äì±±±™¡¡!#›‚ TFFFúÀ1gM&“£ãÛÛÛÐ0Œj4½º°°ðî¸àv»“¡P¨ÚÓÓSÍd2™cƒ¿/‰\ŒÇã—ÿ‡ýï/A„<<%tEXtdate:create2010-02-10T04:10:48-06:00ÌËÛw%tEXtdate:modify2008-10-20T14:33:22-05:00ƒÓ¿IEND®B`‚ola-0.10.9/olad/www/show_sections.png0000664000175000017500000000604714376533110014451 00000000000000‰PNG  IHDR(-S pHYs  ÒÝ~ü OiCCPPhotoshop ICC profilexÚSgTSé=÷ÞôBKˆ€”KoR RB‹€‘&*! Jˆ!¡ÙQÁEEÈ ˆŽŽ€ŒQ, Š Øä!¢Žƒ£ˆŠÊûá{£kÖ¼÷æÍþµ×>ç¬ó³ÏÀ –H3Q5€ ©BàƒÇÄÆáä.@ $p³d!sý#ø~<<+"À¾xÓ ÀM›À0‡ÿêB™\€„Àt‘8K€@zŽB¦@F€˜&S `ËcbãP-`'æÓ€ø™{[”! ‘ eˆDh;¬ÏVŠEX0fKÄ9Ø-0IWfH°·ÀÎ ² 0Qˆ…){`È##x„™FòW<ñ+®ç*x™²<¹$9E[-qWW.(ÎI+6aaš@.Ây™24àóÌ ‘àƒóýxήÎÎ6޶_-ê¿ÿ"bbãþåÏ«p@át~Ñþ,/³€;€mþ¢%îh^  u÷‹f²@µ éÚWópø~<ß5°j>{‘-¨]cöK'XtÀâ÷ò»oÁÔ(€hƒáÏwÿï?ýG %€fI’q^D$.Tʳ?ÇD *°AôÁ,ÀÁÜÁ ü`6„B$ÄÂBB d€r`)¬‚B(†Í°*`/Ô@4ÀQh†“p.ÂU¸=púažÁ(¼ AÈa!ÚˆbŠX#Ž™…ø!ÁH‹$ ɈQ"K‘5H1RŠT UHò=r9‡\Fº‘;È2‚ü†¼G1”²Q=Ô µC¹¨7„F¢ Ðdt1š ›Ðr´=Œ6¡çЫhÚ>CÇ0Àè3Äl0.ÆÃB±8, “c˱"¬ «Æ°V¬»‰õcϱwEÀ 6wB aAHXLXNØH¨ $4Ú 7 „QÂ'"“¨K´&ºùÄb21‡XH,#Ö/{ˆCÄ7$‰C2'¹I±¤TÒÒFÒnR#é,©›4H#“ÉÚdk²9”, +È…ääÃä3ää!ò[ b@q¤øSâ(RÊjJåå4åe˜2AU£šRݨ¡T5ZB­¡¶R¯Q‡¨4uš9̓IK¥­¢•Óhh÷i¯ètºÝ•N—ÐWÒËéGè—èôw †ƒÇˆg(›gw¯˜L¦Ó‹ÇT071ë˜ç™™oUX*¶*|‘Ê •J•&•*/T©ª¦ªÞª UóUËT©^S}®FU3Sã© Ô–«UªPëSSg©;¨‡ªg¨oT?¤~Yý‰YÃLÃOC¤Q ±_ã¼Æ c³x,!k «†u5Ä&±ÍÙ|v*»˜ý»‹=ª©¡9C3J3W³Ró”f?ã˜qøœtN ç(§—ó~ŠÞï)â)¦4L¹1e\kª–—–X«H«Q«Gë½6®í§¦½E»YûAÇJ'\'GgÎçSÙSݧ §M=:õ®.ªk¥¡»Dw¿n§î˜ž¾^€žLo§Þy½çú}/ýTýmú§õG X³ $Û Î<Å5qo</ÇÛñQC]Ã@C¥a•a—á„‘¹Ñ<£ÕFFŒiÆ\ã$ãmÆmÆ£&&!&KMêMîšRM¹¦)¦;L;LÇÍÌÍ¢ÍÖ™5›=1×2ç›ç›×›ß·`ZxZ,¶¨¶¸eI²äZ¦Yî¶¼n…Z9Y¥XUZ]³F­­%Ö»­»§§¹N“N«žÖgðñ¶É¶©·°åØÛ®¶m¶}agbg·Å®Ã“}º}ý= ‡Ù«Z~s´r:V:ޚΜî?}Åô–é/gXÏÏØ3ã¶Ë)ÄiS›ÓGgg¹sƒóˆ‹‰K‚Ë.—>.›ÆÝȽäJtõq]ázÒõ›³›Âí¨Û¯î6îiî‡ÜŸÌ4Ÿ)žY3sÐÃÈCàQåÑ? Ÿ•0k߬~OCOgµç#/c/‘W­×°·¥wª÷aï>ö>rŸã>ã<7Þ2ÞY_Ì7À·È·ËOÃož_…ßC#ÿdÿzÿѧ€%g‰A[ûøz|!¿Ž?:Ûeö²ÙíAŒ ¹AA‚­‚åÁ­!hÈì­!÷ç˜Î‘Îi…P~èÖÐaæa‹Ã~ '…‡…W†?ŽpˆXÑ1—5wÑÜCsßDúD–DÞ›g1O9¯-J5*>ª.j<Ú7º4º?Æ.fYÌÕXXIlK9.*®6nl¾ßüíó‡ââ ã{˜/È]py¡ÎÂô…§©.,:–@LˆN8”ðA*¨Œ%òw%Ž yÂÂg"/Ñ6шØC\*NòH*Mz’쑼5y$Å3¥,幄'©¼L LÝ›:žšv m2=:½1ƒ’‘qBª!M“¶gêgæfvˬe…²þÅn‹·/•Ék³¬Y- ¶B¦èTZ(×*²geWf¿Í‰Ê9–«ž+Íí̳ÊÛ7œïŸÿíÂá’¶¥†KW-X潬j9²‰Š®Û—Ø(Üxå‡oÊ¿™Ü”´©«Ä¹dÏfÒféæÞ-ž[–ª—æ—n ÙÚ´ ßV´íõöEÛ/—Í(Û»ƒ¶C¹£¿<¸¼e§ÉÎÍ;?T¤TôTúT6îÒݵa×ønÑî{¼ö4ìÕÛ[¼÷ý>ɾÛUUMÕfÕeûIû³÷?®‰ªéø–ûm]­NmqíÇÒý#¶×¹ÔÕÒ=TRÖ+ëGǾþïw- 6 UœÆâ#pDyäé÷ ß÷ :ÚvŒ{¬áÓvg/jBšòšF›Sšû[b[ºOÌ>ÑÖêÞzüGÛœ499â?rýéü§CÏdÏ&žþ¢þË®/~øÕë×Îјѡ—ò—“¿m|¥ýêÀë¯ÛÆÂƾÉx31^ôVûíÁwÜwï£ßOä| (ÿhù±õSЧû“““ÿ˜óüc3-ÛgAMA±Ž|ûQ“ cHRMz%€ƒùÿ€éu0ê`:˜o’_ÅFŸPLTEÿÿÿÿÿÿb[x#m```b[xr¼ x¿ y¿§ ÃĂÂĪÃĂÂĬ"¯#m%±*µ-¸.ŒÈ/ŒÈ3¼7¾!<Â$@Å(D—ÎD˜ÎFÉ+JÌ.TÒ4‹Ó†ŒÔ†ŽÕˆ‘ØŠ•ۚޞᒣ䖨蘬ëœëëóîîõÿÿÿ‡’¿¦ tRNSÙõõõ¹$—IDATÓ]ÏGÂ@CÑߨ0=dh“sÎÙ÷? ›*Æo©…JB ?ÂÌjHÅç }ªø4‡”èG>}g°˜È§Ÿ ¢jªêF9Ú€;_®·ûãùB  ¸Ó`<]®÷ pÇFw8Y¬vˆj«ØaîHÂ`‹…K™[òßH·_×[ͶúºIEND®B`‚ola-0.10.9/olad/www/loader.gif0000664000175000017500000000621014376533110013001 00000000000000GIF89a óØóÿz©õQrøp›ö_ƒ÷!0û5Lú…·ôŒÁôt õüý!ÿ NETSCAPE2.0!þCreated with ajaxload.info!ù , çÈIia¥êÍçbK…$F £RA”T²,¥2Sâ*05//Ém¢p!z“ÁÌ0;$Å0Cœ.I*!üHC(A@oƒ!39T5º\Ñ8)¨ ‡ `Áî´²dwxG=Y gƒwHb†vA=’0 V\œ\ˆ; ¤¥œŸ;¥ª›H¨Š¢«¬³˜0¶µt%‘Hs‰‹rY'¶•¤eõ$ˆ™"ˆ\‡#E1Cn€ÄŽƒÉ~×ÕJ,Ü,Aa•ªUw^4I%PÝÞu Q33{0i1T…Ggwy}%ˆ%'Rœ  ¡  Ž…Œ=¡ª ¦§« £¥§3ž¶G–%¹”pº½0¦ ™³JRo…5Ȇ0IĦmykˆÃxÍTˆ_}È(…×^ââyKŽsµìœé>i_¨%ŽÕînú=ÙâÚÊqØ4eÍ-M¤D!ù , îÈI)*¨êÍ')E¥d]•¦ÃPR A”:!­ûzr’‚“œbw“ %6€"G¤(d$["‡’øJ±ÀFh­aQP`p%†/BFP\cU â ?TÐtW/pG&OtDa_sylD'M˜™ œq Štc˜¥ ¡¢™¦ b ¢2š±D“M :‘µ¹¹ d¡ˆ%À ¢4%s) À»‘uƒƒE3¸ £YU€‹tÚ–ææ‘ÆDŠ$æJiMí<àYà;ŠØ°€˜d<“ O‚tXò^%o/rvl9'L’“–—;†‡9—Ÿ›œ“ ™…£”ª9€% ‹i9³³¨ C¹ "†B B¹µDs Î^Xf}$P × {LÞ?PÊ ”›O4 ×ÐÀEÓóå’›Vë$¸æÊdJÐ#)…pVÂÀ$!ù , ëÈIiR©êͧ"J…d]• ¡RÂZN‰*P*«á;Õ$P{*”N‚Àí\EÐò!1UO2ÝD ™_r6Iöb ¡¤åÔÄH—š8 B—; ²¬"'ªœZÛÚt½’b€K#C'Kˆ‰Œw}?ˆ”‘’K•iz6Š :x‚KAC¨¨Ÿ&}9®tz\ \¶¨ªD5;x ¹¨±Qd( Ö Ë ±KWÖ Ê ŠMBàˈI´éÚˆM=ñˤsøâ¸½8Daƒ¡J`@LG!ù , ïÈIiR©êͧ"J…d]• ¡RÂZN‰*P*«á;Õ$P{*”N‚Àí\EÐò!1UO2ÝD ™_r6Iöb ¡¤åÔÄH—š8 B—; ²¬"'ªœZÛÚt½’b€K#C'Kˆ‰Gziz6ˆ8}z‰’”~Š›%X„K9ƒ:¢¨0}¤% ¨tz\B±¤lc L¢bQ Ç Ñ ÅˆÎ Ñ Ålj ÎÂÝųKÎÞè¸Åˆä ìçÒéÅxÎ(È›PàšX ,ÈéÖ‚|/"!ù , ðÈIiR©êͧ"J…d]• ¡RÂZN‰*P*«á;Õ$P{*”N‚Àí\EÐò!1UO2ÝD ™_r6Iöb ¡¤åÔÄH—š8 B—; ²¬"'ªœZÛÚt½’b€K#C'Kˆ‰Gziz6ˆ8}z‰’”~Š›%…:„A/ C} ¦¦†u\¯ ³h}b¥¦ DÂÃ]=¦¨ ¨Ö ÈV)Ó Ö ÚŠÓÐâÈ9CÓãëDæKè õí¼K¦…¢u ·Ç*00SÊtD!ù , ëÈIiR©êͧ"J…d]• ¡RÂZN‰*P*«á;Õ$P{*”N‚Àí\EÐò!1UO2ÝD ™_r6Iöb ¡¤åÔÄH—š8 B—; ²¬"'ªœZÛÚt½’b€K#C'Kˆ‰Gz ‘‰z5 ‘— “”˜ŠŸC…: „A/ C}ªª†u\³ ·Eh}b©ª6Å[=ª¥¸¥×Wx&)Ô×ÒI9ˆÔ¬á@oCÔêT?KÞÆéØdÛïò]øÁB7¡À‚ 6ЫD!ù , èÈIiR©êͧ"J…d]• ¡RÂZN‰*P*«á;Õ$P{*”N‚Àí\EÐò!1UO2ÝD ™_r6Iö Æ€ÔÄH—š03ª³”hÕ¸ƒ›aÀ—j U {CIkmbK#‡cK‘’€8 „{a’•8™n›•˜™“¥‡‚V:ˆ/q:M ¯¯Cu€~·¸‰Eh³k®¯6 ½[_¯±ƒ6P.]ú6©ð!‡)Vˆ!ù , ðÈIiR©êͧ"J…d]U ¡RÂZN ÔJÀjøN2sK6 ±› d‹I€È)  LØH°W¡G 6 ÊKX¦ƒì ±’.6¢d°¨~z“hÙÂuur/6 X5ƒI;_†t O#E {O››ˆ9V¢£œž9£¨4ž¡©œ±›—;V–C/ €¹6»Ã˜~*½'ÊMo¸º»€nÎÇbXÂ:~]+V*ÍmåK_àOÑrKñ³N@.ê›Ñdù~ÎqЦäD¢BÖ‹ 5D;ola-0.10.9/olad/www/new/0000775000175000017500000000000014376533267011733 500000000000000ola-0.10.9/olad/www/new/js/0000775000175000017500000000000014376533267012347 500000000000000ola-0.10.9/olad/www/new/js/app.min.js0000664000175000017500000003064714376533110014164 00000000000000var ola=angular.module("olaApp",["ngRoute"]);ola.config(["$locationProvider",function(a){"use strict";a.hashPrefix("")}]),ola.config(["$routeProvider",function(a){"use strict";a.when("/",{templateUrl:"/new/views/overview.html",controller:"overviewCtrl"}).when("/universes/",{templateUrl:"/new/views/universes.html",controller:"overviewCtrl"}).when("/universe/add",{templateUrl:"/new/views/universe-add.html",controller:"addUniverseCtrl"}).when("/universe/:id",{templateUrl:"/new/views/universe-overview.html",controller:"universeCtrl"}).when("/universe/:id/keypad",{templateUrl:"/new/views/universe-keypad.html",controller:"keypadUniverseCtrl"}).when("/universe/:id/faders",{templateUrl:"/new/views/universe-faders.html",controller:"faderUniverseCtrl"}).when("/universe/:id/rdm",{templateUrl:"/new/views/universe-rdm.html",controller:"rdmUniverseCtrl"}).when("/universe/:id/patch",{templateUrl:"/new/views/universe-patch.html",controller:"patchUniverseCtrl"}).when("/universe/:id/settings",{templateUrl:"/new/views/universe-settings.html",controller:"settingUniverseCtrl"}).when("/plugins",{templateUrl:"/new/views/plugins.html",controller:"pluginsCtrl"}).when("/plugin/:id",{templateUrl:"/new/views/plugin-info.html",controller:"pluginInfoCtrl"}).otherwise({redirectTo:"/"})}]),ola.controller("menuCtrl",["$scope","$ola","$interval","$location",function(a,b,c,d){"use strict";a.Items={},a.Info={},a.goTo=function(a){d.path(a)};var e=function(){b.get.ItemList().then(function(b){a.Items=b}),b.get.ServerInfo().then(function(b){a.Info=b,document.title=b.instance_name+" - "+b.ip})};e(),c(e,1e4)}]),ola.controller("patchUniverseCtrl",["$scope","$ola","$routeParams",function(a,b,c){"use strict";a.Universe=c.id}]),ola.controller("rdmUniverseCtrl",["$scope","$ola","$routeParams",function(a,b,c){"use strict";a.Universe=c.id}]),ola.controller("universeCtrl",["$scope","$ola","$routeParams","$interval","OLA",function(a,b,c,d,e){"use strict";a.dmx=[],a.Universe=c.id;var f=d(function(){b.get.Dmx(a.Universe).then(function(b){for(var c=0;c140?"black":"white"}}]),ola.controller("faderUniverseCtrl",["$scope","$ola","$routeParams","$window","$interval","OLA",function(a,b,c,d,e,f){"use strict";a.get=[],a.list=[],a.last=0,a.offset=0,a.send=!1,a.OLA=f,a.Universe=c.id;for(var g=0;g140?"black":"white"},a.ceil=function(a){return d.Math.ceil(a)},a.change=function(){b.post.Dmx(a.Universe,a.get)},a.page=function(b){if(1===b){var c=d.Math.ceil(f.MAX_CHANNEL_NUMBER/a.limit);a.offset+1!==c&&a.offset++}else b===f.MIN_CHANNEL_VALUE&&a.offset!==f.MIN_CHANNEL_VALUE&&a.offset--},a.getWidth=function(){return d.Math.floor(.99*d.innerWidth/a.limit)-52/a.limit+"px"},a.getLimit=function(){var a=.99*d.innerWidth/66;return d.Math.floor(a)},a.limit=a.getLimit(),a.width={width:a.getWidth()},d.$(d).resize(function(){a.$apply(function(){a.limit=a.getLimit(),a.width={width:a.getWidth()}})}),a.$on("$destroy",function(){e.cancel(h)})}]),ola.controller("keypadUniverseCtrl",["$scope","$ola","$routeParams","OLA",function(a,b,c,d){"use strict";a.Universe=c.id;var e;e=/^(?:([0-9]{1,3})(?:\s(THRU)\s(?:([0-9]{1,3}))?)?(?:\s(@)\s(?:([0-9]{1,3}|FULL))?)?)/;var f={channelValue:function(a){return d.MIN_CHANNEL_VALUE<=a&&a<=d.MAX_CHANNEL_VALUE},channelNumber:function(a){return d.MIN_CHANNEL_NUMBER<=a&&a<=d.MAX_CHANNEL_NUMBER},regexGroups:function(a){if(void 0!==a[1]){if(!this.channelNumber(parseInt(a[1],10)))return!1}if(void 0!==a[3]){if(!this.channelNumber(parseInt(a[3],10)))return!1}if(void 0!==a[5]&&"FULL"!==a[5]){if(!this.channelValue(parseInt(a[5],10)))return!1}return!0}};a.field="",a.input=function(b){var c;c="backspace"===b?a.field.substr(0,a.field.length-1):a.field+b;var d=e.exec(c);null===d?a.field="":f.regexGroups(d)&&(a.field=d[0])},a.submit=function(){var c=[],g=a.field,h=e.exec(g);if(null!==h&&f.regexGroups(h)){var i=parseInt(h[1],10),j=h[3]?parseInt(h[3],10):parseInt(h[1],10),k="FULL"===h[5]?d.MAX_CHANNEL_VALUE:parseInt(h[5],10);return!!(i<=j&&f.channelValue(k))&&(b.get.Dmx(a.Universe).then(function(e){for(var f=0;f")}),a.stateColor=function(a){return a?{"background-color":"green"}:{"background-color":"red"}}}]),ola.controller("settingUniverseCtrl",["$scope","$ola","$routeParams",function(a,b,c){"use strict";a.loadData=function(){a.Data={old:{},model:{},Remove:[],Add:[]},a.Data.old.id=a.Data.model.id=c.id,b.get.PortsId(c.id).then(function(b){a.DeactivePorts=b}),b.get.UniverseInfo(c.id).then(function(b){a.Data.old.name=a.Data.model.name=b.name,a.Data.old.merge_mode=b.merge_mode,a.Data.model.merge_mode=b.merge_mode,a.ActivePorts=b.output_ports.concat(b.input_ports),a.Data.old.ActivePorts=b.output_ports.concat(b.input_ports);for(var c=0;cc.MAX_CHANNEL_VALUE&&(a=c.MAX_CHANNEL_VALUE),a},f=function(a){for(var b=!0,d=[],f=c.MAX_CHANNEL_NUMBER;f>=c.MIN_CHANNEL_NUMBER;f--){var g=e(a[f-1]);(g>c.MIN_CHANNEL_VALUE||!b||f===c.MIN_CHANNEL_NUMBER)&&(d[f-1]=g,b=!1)}return d.join(",")};return{get:{ItemList:function(){return a.get("/json/universe_plugin_list").then(function(a){return a.data})},ServerInfo:function(){return a.get("/json/server_stats").then(function(a){return a.data})},Ports:function(){return a.get("/json/get_ports").then(function(a){return a.data})},PortsId:function(b){return a({method:"GET",url:"/json/get_ports",params:{id:b}}).then(function(a){return a.data})},InfoPlugin:function(b){return a({method:"GET",url:"/json/plugin_info",params:{id:b}}).then(function(a){return a.data})},Dmx:function(b){return a({method:"GET",url:"/get_dmx",params:{u:b}}).then(function(a){return a.data})},UniverseInfo:function(b){return a({method:"GET",url:"/json/universe_info",params:{id:b}}).then(function(a){return a.data})}},post:{ModifyUniverse:function(b){return a({method:"POST",url:"/modify_universe",data:d(b),headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(a){return a.data})},AddUniverse:function(b){return a({method:"POST",url:"/new_universe",data:d(b),headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(a){return a.data})},Dmx:function(b,c){var e={u:b,d:f(c)};return a({method:"POST",url:"/set_dmx",data:d(e),headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(a){return a.data})},PluginState:function(b,c){return a({method:"POST",url:"/set_plugin_state",data:d({state:c,plugin_id:b}),headers:{"Content-Type":"application/x-www-form-urlencoded"}}).then(function(a){return a.data})}},action:{Shutdown:function(){return a.get("/quit").then(function(a){return a.data})},Reload:function(){return a.get("/reload").then(function(a){return a.data})},ReloadPids:function(){return a.get("/reload_pids").then(function(a){return a.data})}},rdm:{GetSectionInfo:function(b,c,d){return a({method:"GET",url:"/json/rdm/section_info",params:{id:b,uid:c,section:d}}).then(function(a){return a.data})},SetSection:function(b,c,d,e,f){return a({method:"GET",url:"/json/rdm/set_section_info",params:{id:b,uid:c,section:d,hint:e,int:f}}).then(function(a){return a.data})},GetSupportedPids:function(b,c){return a({method:"GET",url:"/json/rdm/supported_pids",params:{id:b,uid:c}}).then(function(a){return a.data})},GetSupportedSections:function(b,c){return a({method:"GET",url:"/json/rdm/supported_sections",params:{id:b,uid:c}}).then(function(a){return a.data})},UidIdentifyDevice:function(b,c){return a({method:"GET",url:"/json/rdm/uid_identify_device",params:{id:b,uid:c}}).then(function(a){return a.data})},UidInfo:function(b,c){return a({method:"GET",url:"/json/rdm/uid_info",params:{id:b,uid:c}}).then(function(a){return a.data})},UidPersonalities:function(b,c){return a({method:"GET",url:"/json/rdm/uid_personalities",params:{id:b,uid:c}}).then(function(a){return a.data})},Uids:function(b){return a({method:"GET",url:"/json/rdm/uids",params:{id:b}}).then(function(a){return a.data})},RunDiscovery:function(b,c){return a({method:"GET",url:"/rdm/run_discovery",params:{id:b,incremental:c}}).then(function(a){return a.data})}},error:{modal:function(a,b){void 0!==a?$("#errorModalBody").text(a):$("#errorModalBody").text("There has been an error"),void 0!==b?$("#errorModalLabel").text(b):$("#errorModalLabel").text("Error"),$("#errorModal").modal("show")}}}}]),ola.filter("startFrom",function(){"use strict";return function(a,b){return b=parseInt(b,10),a.slice(b)}}); //# sourceMappingURL=app.min.js.mapola-0.10.9/olad/www/new/js/app.min.js.map0000664000175000017500000003654114376533110014737 00000000000000{"version":3,"sources":["../../../../javascript/new-src/src/app.js","../../../../javascript/new-src/src/controllers/menu.js","../../../../javascript/new-src/src/controllers/patch_universe.js","../../../../javascript/new-src/src/controllers/rdm_universe.js","../../../../javascript/new-src/src/controllers/universe.js","../../../../javascript/new-src/src/controllers/fader_universe.js","../../../../javascript/new-src/src/controllers/keypad_universe.js","../../../../javascript/new-src/src/controllers/plugins.js","../../../../javascript/new-src/src/controllers/add_universe.js","../../../../javascript/new-src/src/controllers/plugin_info.js","../../../../javascript/new-src/src/controllers/setting_universe.js","../../../../javascript/new-src/src/controllers/header.js","../../../../javascript/new-src/src/controllers/overview.js","../../../../javascript/new-src/src/constants.js","../../../../javascript/new-src/src/factories/ola.js","../../../../javascript/new-src/src/filters/start_form.js"],"names":["ola","angular","module","config","$locationProvider","hashPrefix","$routeProvider","when","templateUrl","controller","otherwise","redirectTo","$scope","$ola","$interval","$location","Items","Info","goTo","url","path","getData","get","ItemList","then","data","ServerInfo","document","title","instance_name","ip","$routeParams","Universe","id","OLA","dmx","interval","Dmx","i","MAX_CHANNEL_NUMBER","MIN_CHANNEL_VALUE","$on","cancel","getColor","$window","list","last","offset","send","light","j","change","dmxGet","length","ceil","Math","post","page","d","offsetLimit","limit","getWidth","floor","innerWidth","getLimit","width","$","resize","$apply","regexkeypad","check","channelValue","value","MAX_CHANNEL_VALUE","channelNumber","MIN_CHANNEL_NUMBER","regexGroups","result","undefined","this","parseInt","field","input","tmpField","substr","fields","exec","submit","begin","end","active","enabled","getInfo","Reload","action","go","changeStatus","current","PluginState","getStyle","style","background-color","Ports","addPorts","Universes","Class","Data","name","add_ports","u","universes","hasOwnProperty","push","Submit","indexOf","AddUniverse","error","modal","getDirection","direction","updateId","TogglePort","grep","Boolean","join","InfoPlugin","description","getElementById","textContent","innerHTML","replace","stateColor","val","loadData","old","model","Remove","Add","PortsId","DeactivePorts","UniverseInfo","merge_mode","ActivePorts","output_ports","concat","input_ports","Save","a","remove_ports","modified","forEach","element","index","port","port_old","priority","current_mode","modify_ports","ModifyUniverse","header","tab","hash","location","Shutdown","goUniverse","constant","factory","$http","postEncode","PostData","key","encodeURIComponent","channelValueCheck","dmxConvert","strip","integers","response","method","params","headers","Content-Type","universe","pluginId","state","plugin_id","ReloadPids","rdm","GetSectionInfo","uid","section","SetSection","hint","option","int","GetSupportedPids","GetSupportedSections","UidIdentifyDevice","UidInfo","UidPersonalities","Uids","RunDiscovery","incremental","body","text","filter","start","slice"],"mappings":"AAoBA,GAAIA,KAAMC,QAAQC,OAAO,UAAW,WAMpCF,KAAIG,QAAQ,oBAAqB,SAASC,GACxC,YACAA,GAAkBC,WAAW,OAG/BL,IAAIG,QAAQ,iBACV,SAASG,GACP,YACAA,GAAeC,KAAK,KAClBC,YAAa,2BACbC,WAAY,iBACXF,KAAK,eACNC,YAAa,4BACbC,WAAY,iBACXF,KAAK,iBACNC,YAAa,+BACbC,WAAY,oBACXF,KAAK,iBACNC,YAAa,oCACbC,WAAY,iBACXF,KAAK,wBACNC,YAAa,kCACbC,WAAY,uBACXF,KAAK,wBACNC,YAAa,kCACbC,WAAY,sBACXF,KAAK,qBACNC,YAAa,+BACbC,WAAY,oBACXF,KAAK,uBACNC,YAAa,iCACbC,WAAY,sBACXF,KAAK,0BACNC,YAAa,oCACbC,WAAY,wBACXF,KAAK,YACNC,YAAa,0BACbC,WAAY,gBACXF,KAAK,eACNC,YAAa,8BACbC,WAAY,mBACXC,WACDC,WAAY,SChDlBX,IAAIS,WAAW,YAAa,SAAU,OAAQ,YAAa,YACzD,SAASG,EAAQC,EAAMC,EAAWC,GAChC,YACAH,GAAOI,SACPJ,EAAOK,QAEPL,EAAOM,KAAO,SAASC,GACrBJ,EAAUK,KAAKD,GAGjB,IAAIE,GAAU,WACZR,EAAKS,IAAIC,WAAWC,KAAK,SAASC,GAChCb,EAAOI,MAAQS,IAEjBZ,EAAKS,IAAII,aAAaF,KAAK,SAASC,GAClCb,EAAOK,KAAOQ,EACdE,SAASC,MAAQH,EAAKI,cAAgB,MAAQJ,EAAKK,KAIvDT,KACAP,EAAUO,EAAS,QCrBvBrB,IAAIS,WAAW,qBACZ,SAAU,OAAQ,eACjB,SAASG,EAAQC,EAAMkB,GACrB,YACAnB,GAAOoB,SAAWD,EAAaE,MCJrCjC,IAAIS,WAAW,mBACZ,SAAU,OAAQ,eACjB,SAASG,EAAQC,EAAMkB,GACrB,YAGAnB,GAAOoB,SAAWD,EAAaE,MCNrCjC,IAAIS,WAAW,gBACZ,SAAU,OAAQ,eAAgB,YAAa,MAC9C,SAASG,EAAQC,EAAMkB,EAAcjB,EAAWoB,GAC9C,YACAtB,GAAOuB,OACPvB,EAAOoB,SAAWD,EAAaE,EAE/B,IAAIG,GAAWtB,EAAU,WACvBD,EAAKS,IAAIe,IAAIzB,EAAOoB,UAAUR,KAAK,SAASC,GAC1C,IAAK,GAAIa,GAAI,EAAGA,EAAIJ,EAAIK,mBAAoBD,IAC1C1B,EAAOuB,IAAIG,GACe,gBAAhBb,GAAKU,IAAIG,GACfb,EAAKU,IAAIG,GAAKJ,EAAIM,qBAGzB,IAEH5B,GAAO6B,IAAI,WAAY,WACrB3B,EAAU4B,OAAON,KAGnBxB,EAAO+B,SAAW,SAASL,GACzB,MAAIA,GAAI,IACC,QAEA,YCzBjBtC,IAAIS,WAAW,qBACZ,SAAU,OAAQ,eAAgB,UAAW,YAAa,MACzD,SAASG,EAAQC,EAAMkB,EAAca,EAAS9B,EAAWoB,GACvD,YACAtB,GAAOU,OACPV,EAAOiC,QACPjC,EAAOkC,KAAO,EACdlC,EAAOmC,OAAS,EAChBnC,EAAOoC,MAAO,EACdpC,EAAOsB,IAAMA,EACbtB,EAAOoB,SAAWD,EAAaE,EAE/B,KAAK,GAAIK,GAAI,EAAGA,EAAIJ,EAAIK,mBAAoBD,IAC1C1B,EAAOiC,KAAKP,GAAKA,EACjB1B,EAAOU,IAAIgB,GAAKJ,EAAIM,iBAGtB5B,GAAOqC,MAAQ,SAASC,GACtB,IAAK,GAAIZ,GAAI,EAAGA,EAAIJ,EAAIK,mBAAoBD,IAC1C1B,EAAOU,IAAIgB,GAAKY,CAElBtC,GAAOuC,SAGT,IAAIC,GAAStC,EAAU,WACrBD,EAAKS,IAAIe,IAAIzB,EAAOoB,UAAUR,KAAK,SAASC,GAC1C,IAAK,GAAIa,GAAI,EAAGA,EAAIJ,EAAIK,mBAAoBD,IACtCA,EAAIb,EAAKU,IAAIkB,OACfzC,EAAOU,IAAIgB,GAAKb,EAAKU,IAAIG,GAEzB1B,EAAOU,IAAIgB,GAAKJ,EAAIM,iBAGxB5B,GAAOoC,MAAO,KAEf,IAEHpC,GAAO+B,SAAW,SAASL,GACzB,MAAIA,GAAI,IACC,QAEA,SAIX1B,EAAO0C,KAAO,SAAShB,GACrB,MAAOM,GAAQW,KAAKD,KAAKhB,IAG3B1B,EAAOuC,OAAS,WACdtC,EAAK2C,KAAKnB,IAAIzB,EAAOoB,SAAUpB,EAAOU,MAGxCV,EAAO6C,KAAO,SAASC,GACrB,GAAU,IAANA,EAAS,CACX,GAAIC,GACFf,EAAQW,KAAKD,KAAKpB,EAAIK,mBAAqB3B,EAAOgD,MAC/ChD,GAAOmC,OAAS,IAAOY,GAC1B/C,EAAOmC,aAEAW,KAAMxB,EAAIM,mBACf5B,EAAOmC,SAAWb,EAAIM,mBACxB5B,EAAOmC,UAKbnC,EAAOiD,SAAW,WAIhB,MAFEjB,GAAQW,KAAKO,MAA4B,IAArBlB,EAAQmB,WAAqBnD,EAAOgD,OACpC,GAAKhD,EAAOgD,MAClB,MAGlBhD,EAAOoD,SAAW,WAChB,GAAIC,GAA8B,IAArBrB,EAAQmB,WAAqB,EAC1C,OAAOnB,GAAQW,KAAKO,MAAMG,IAG5BrD,EAAOgD,MAAQhD,EAAOoD,WAEtBpD,EAAOqD,OACLA,MAASrD,EAAOiD,YAGlBjB,EAAQsB,EAAEtB,GAASuB,OAAO,WACxBvD,EAAOwD,OAAO,WACZxD,EAAOgD,MAAQhD,EAAOoD,WACtBpD,EAAOqD,OACLA,MAAOrD,EAAOiD,gBAKpBjD,EAAO6B,IAAI,WAAY,WACrB3B,EAAU4B,OAAOU,QC/FzBpD,IAAIS,WAAW,sBACZ,SAAU,OAAQ,eAAgB,MACjC,SAASG,EAAQC,EAAMkB,EAAcG,GACnC,YACAtB,GAAOoB,SAAWD,EAAaE,EAC/B,IAAIoC,EAKJA,GACE,qFAIF,IAAIC,IACFC,aAAc,SAASC,GACrB,MAAOtC,GAAIM,mBAAqBgC,GAC9BA,GAAStC,EAAIuC,mBAEjBC,cAAe,SAASF,GACtB,MAAOtC,GAAIyC,oBAAsBH,GAC/BA,GAAStC,EAAIK,oBAEjBqC,YAAa,SAASC,GACpB,OAAkBC,KAAdD,EAAO,GAAkB,CAE3B,IADaE,KAAKL,cAAcM,SAASH,EAAO,GAAI,KAElD,OAAO,EAGX,OAAkBC,KAAdD,EAAO,GAAkB,CAE3B,IADaE,KAAKL,cAAcM,SAASH,EAAO,GAAI,KAElD,OAAO,EAGX,OAAkBC,KAAdD,EAAO,IAAkC,SAAdA,EAAO,GAAe,CAEnD,IADaE,KAAKR,aAAaS,SAASH,EAAO,GAAI,KAEjD,OAAO,EAGX,OAAO,GAIXjE,GAAOqE,MAAQ,GACfrE,EAAOsE,MAAQ,SAASA,GACtB,GAAIC,EAEFA,GADY,cAAVD,EACStE,EAAOqE,MAAMG,OAAO,EAAGxE,EAAOqE,MAAM5B,OAAS,GAE7CzC,EAAOqE,MAAQC,CAE5B,IAAIG,GAAShB,EAAYiB,KAAKH,EACf,QAAXE,EACFzE,EAAOqE,MAAQ,GACNX,EAAMM,YAAYS,KAC3BzE,EAAOqE,MAAQI,EAAO,KAI1BzE,EAAO2E,OAAS,WACd,GAAIpD,MACA+C,EAAQtE,EAAOqE,MACfJ,EAASR,EAAYiB,KAAKJ,EAC9B,IAAe,OAAXL,GAAmBP,EAAMM,YAAYC,GAAS,CAChD,GAAIW,GAAQR,SAASH,EAAO,GAAI,IAC5BY,EAAMZ,EAAO,GAAKG,SAASH,EAAO,GAAI,IACxCG,SAASH,EAAO,GAAI,IAClBL,EAAuB,SAAdK,EAAO,GAClB3C,EAAIuC,kBAAoBO,SAASH,EAAO,GAAI,GAC9C,UAAIW,GAASC,GAAOnB,EAAMC,aAAaC,MACrC3D,EAAKS,IAAIe,IAAIzB,EAAOoB,UAAUR,KAAK,SAASC,GAC1C,IAAK,GAAIa,GAAI,EAAGA,EAAIJ,EAAIK,mBAAoBD,IACtCA,EAAIb,EAAKU,IAAIkB,OACflB,EAAIG,GAAKb,EAAKU,IAAIG,GAElBH,EAAIG,GAAKJ,EAAIM,iBAGjB,KAAK,GAAIU,GAAIsC,EAAOtC,GAAKuC,EAAKvC,IAC5Bf,EAAIe,EAAI,GAAKsB,CAEf3D,GAAK2C,KAAKnB,IAAIzB,EAAOoB,SAAUG,GAC/BvB,EAAOqE,MAAQ,MAEV,GAKT,OAAO,MC7FjBjF,IAAIS,WAAW,eACZ,SAAU,OAAQ,YACjB,SAASG,EAAQC,EAAME,GACrB,YACAH,GAAOI,SACPJ,EAAO8E,UACP9E,EAAO+E,WACP/E,EAAOgF,QAAU,WACf/E,EAAKS,IAAIC,WACNC,KAAK,SAASC,GACbb,EAAOI,MAAQS,KAGrBb,EAAOgF,UACPhF,EAAOiF,OAAS,WACdhF,EAAKiF,OAAOD,SACZjF,EAAOgF,WAEThF,EAAOmF,GAAK,SAAS9D,GACnBlB,EAAUK,KAAK,WAAaa,IAE9BrB,EAAOoF,aAAe,SAAS/D,EAAIgE,GACjCpF,EAAK2C,KAAK0C,YAAYjE,EAAIgE,GAC1BrF,EAAOgF,WAGThF,EAAOuF,SAAW,SAASC,GACzB,MAAIA,IAEAC,mBAAoB,UAIpBA,mBAAoB,WCjChCrG,IAAIS,WAAW,mBAAoB,SAAU,OAAQ,UAAW,YAC9D,SAASG,EAAQC,EAAM+B,EAAS7B,GAC9B,YACAH,GAAO0F,SACP1F,EAAO2F,YACP3F,EAAO4F,aACP5F,EAAO6F,MAAQ,GACf7F,EAAO8F,MACLzE,GAAI,EACJ0E,KAAM,GACNC,UAAW,IAGb/F,EAAKS,IAAIC,WAAWC,KAAK,SAASC,GAChC,IAAK,GAAIoF,KAAKpF,GAAKqF,UACbrF,EAAKqF,UAAUC,eAAeF,KAC5BjG,EAAO8F,KAAKzE,KAAO+C,SAASvD,EAAKqF,UAAUD,GAAG5E,GAAI,KACpDrB,EAAO8F,KAAKzE,KAEdrB,EAAO4F,UAAUQ,KAAKhC,SAASvD,EAAKqF,UAAUD,GAAG5E,GAAI,QAK3DrB,EAAOqG,OAAS,WACgB,gBAAnBrG,GAAO8F,KAAKzE,IACK,KAA1BrB,EAAO8F,KAAKE,YACkC,IAA9ChG,EAAO4F,UAAUU,QAAQtG,EAAO8F,KAAKzE,SACZ6C,KAArBlE,EAAO8F,KAAKC,MAA2C,KAArB/F,EAAO8F,KAAKC,OAChD/F,EAAO8F,KAAKC,KAAO,YAAc/F,EAAO8F,KAAKzE,IAE/CpB,EAAK2C,KAAK2D,YAAYvG,EAAO8F,MAC7B3F,EAAUK,KAAK,aAAeR,EAAO8F,KAAKzE,MACa,IAA9CrB,EAAO4F,UAAUU,QAAQtG,EAAO8F,KAAKzE,IAC9CpB,EAAKuG,MAAMC,MAAM,mCACkBvC,KAA1BlE,EAAO8F,KAAKE,WACK,KAA1BhG,EAAO8F,KAAKE,WACZ/F,EAAKuG,MAAMC,MAAM,oEAKrBxG,EAAKS,IAAIgF,QAAQ9E,KAAK,SAASC,GAC7Bb,EAAO0F,MAAQ7E,IAGjBb,EAAO0G,aAAe,SAASC,GAC7B,MAAIA,GACK,SAEA,SAIX3G,EAAO4G,SAAW,YACkC,IAA9C5G,EAAO4F,UAAUU,QAAQtG,EAAO8F,KAAKzE,IACvCrB,EAAO6F,MAAQ,YAEf7F,EAAO6F,MAAQ,IAInB7F,EAAO6G,WAAa,WAClB7G,EAAO8F,KAAKE,UACVhE,EAAQsB,EAAEwD,KAAK9G,EAAO2F,SAAUoB,SAASC,KAAK,SChEtD5H,IAAIS,WAAW,kBACZ,SAAU,eAAgB,OACzB,SAASG,EAAQmB,EAAclB,GAC7B,YACAA,GAAKS,IAAIuG,WAAW9F,EAAaE,IAAIT,KAAK,SAASC,GACjDb,EAAO8E,OAASjE,EAAKiE,OACrB9E,EAAO+E,QAAUlE,EAAKkE,QACtB/E,EAAO+F,KAAOlF,EAAKkF,IAEnB,IAAImB,GAAcnG,SAASoG,eAAe,cAC1CD,GAAYE,YAAcvG,EAAKqG,YAC/BA,EAAYG,UACVH,EAAYG,UAAUC,QAAQ,OAAQ,YAG1CtH,EAAOuH,WAAa,SAASC,GAC3B,MAAIA,IAEA/B,mBAAoB,UAIpBA,mBAAoB,WCtBhCrG,IAAIS,WAAW,uBACZ,SAAU,OAAQ,eACjB,SAASG,EAAQC,EAAMkB,GACrB,YACAnB,GAAOyH,SAAW,WAChBzH,EAAO8F,MACL4B,OACAC,SACAC,UACAC,QAEF7H,EAAO8F,KAAK4B,IAAIrG,GAAKrB,EAAO8F,KAAK6B,MAAMtG,GAAKF,EAAaE,GACzDpB,EAAKS,IAAIoH,QAAQ3G,EAAaE,IAAIT,KAAK,SAASC,GAC9Cb,EAAO+H,cAAgBlH,IAEzBZ,EAAKS,IAAIsH,aAAa7G,EAAaE,IAAIT,KAAK,SAASC,GACnDb,EAAO8F,KAAK4B,IAAI3B,KAAO/F,EAAO8F,KAAK6B,MAAM5B,KAAOlF,EAAKkF,KACrD/F,EAAO8F,KAAK4B,IAAIO,WAAapH,EAAKoH,WAClCjI,EAAO8F,KAAK6B,MAAMM,WAAapH,EAAKoH,WACpCjI,EAAOkI,YAAcrH,EAAKsH,aAAaC,OAAOvH,EAAKwH,aACnDrI,EAAO8F,KAAK4B,IAAIQ,YACdrH,EAAKsH,aAAaC,OAAOvH,EAAKwH,YAChC,KAAK,GAAI3G,GAAI,EAAGA,EAAI1B,EAAOkI,YAAYzF,SAAUf,EAC/C1B,EAAO8F,KAAK8B,OAAOlG,GAAK,MAI9B1B,EAAOyH,WACPzH,EAAOsI,KAAO,WACZ,GAAIC,KACJA,GAAElH,GAAKrB,EAAO8F,KAAK6B,MAAMtG,GACzBkH,EAAExC,KAAO/F,EAAO8F,KAAK6B,MAAM5B,KAC3BwC,EAAEN,WAAajI,EAAO8F,KAAK6B,MAAMM,WACjCM,EAAEvC,UAAY1C,EAAEwD,KAAK9G,EAAO8F,KAAK+B,IAAKd,SAASC,KAAK,KACpDuB,EAAEC,aAAelF,EAAEwD,KAAK9G,EAAO8F,KAAK8B,OAAQb,SAASC,KAAK,IAC1D,IAAIyB,KACJzI,GAAOkI,YAAYQ,QAAQ,SAASC,EAASC,GAC3C,IAAkE,IAA9D5I,EAAO8F,KAAK8B,OAAOtB,QAAQtG,EAAOkI,YAAYU,GAAOvH,IAAY,CACnE,GAAIwH,GAAO7I,EAAOkI,YAAYU,GAC1BE,EAAW9I,EAAO8F,KAAK4B,IAAIQ,YAAYU,EACR,YAA/BC,EAAKE,SAASC,cACZ,EAAIH,EAAKE,SAASnF,MAAQ,MAC5B2E,EAAEM,EAAKxH,GAAK,mBAAqBwH,EAAKE,SAASnF,OACZ,IAA/B6E,EAASnC,QAAQuC,EAAKxH,KACxBoH,EAASrC,KAAKyC,EAAKxH,KAIrByH,EAASC,SAASC,eAAiBH,EAAKE,SAASC,eACnDT,EAAEM,EAAKxH,GAAK,kBAAoBwH,EAAKE,SAASC,cACX,IAA/BP,EAASnC,QAAQuC,EAAKxH,KACxBoH,EAASrC,KAAKyC,EAAKxH,QAK3BkH,EAAEU,aAAe3F,EAAEwD,KAAK2B,EAAU1B,SAASC,KAAK,KAChD/G,EAAK2C,KAAKsG,eAAeX,GACzBvI,EAAOyH,eC1DfrI,IAAIS,WAAW,iBACZ,SAAU,OAAQ,eAAgB,UACjC,SAASG,EAAQC,EAAMkB,EAAca,GACnC,YACAhC,GAAOmJ,QACLC,IAAK,GACL/H,GAAIF,EAAaE,GACjB0E,KAAM,IAGR9F,EAAKS,IAAIsH,aAAa7G,EAAaE,IAChCT,KAAK,SAASC,GACbb,EAAOmJ,OAAOpD,KAAOlF,EAAKkF,MAG9B,IAAIsD,GAAOrH,EAAQsH,SAASD,IAC5BrJ,GAAOmJ,OAAOC,IAAMC,EAAK/B,QAAQ,yBAA0B,OChBjElI,IAAIS,WAAW,gBACZ,SAAU,OAAQ,YACjB,SAASG,EAAQC,EAAME,GACrB,YACAH,GAAOK,QACPL,EAAO4F,aAEP3F,EAAKS,IAAIC,WAAWC,KAAK,SAASC,GAChCb,EAAO4F,UAAY/E,EAAKqF,YAG1BjG,EAAKS,IAAII,aAAaF,KAAK,SAASC,GAClCb,EAAOK,KAAOQ,IAGhBb,EAAOuJ,SAAW,WAChBtJ,EAAKiF,OAAOqE,WAAW3I,QAGzBZ,EAAOwJ,WAAa,SAASnI,GAC3BlB,EAAUK,KAAK,aAAea,OCpBtCjC,IAAIqK,SAAS,OACX1F,mBAAsB,EACtBpC,mBAAsB,IACtBC,kBAAqB,EACrBiC,kBAAqB,MCHvBzE,IAAIsK,QAAQ,QAAS,QAAS,UAAW,MACvC,SAASC,EAAO3H,EAASV,GACvB,YAGA,IAAIsI,GAAa,SAAS/I,GACxB,GAAIgJ,KACJ,KAAK,GAAIC,KAAOjJ,GACVA,EAAKsF,eAAe2D,KACV,MAARA,GACM,iBAARA,GACQ,iBAARA,GACQ,cAARA,EAGAD,EAASzD,KAAK0D,EAAM,IAAMjJ,EAAKiJ,IAE/BD,EAASzD,KAAK0D,EAAM,IAAMC,mBAAmBlJ,EAAKiJ,KAIxD,OAAOD,GAAS7C,KAAK,MAEnBgD,EAAoB,SAAStI,GAO/B,MANAA,GAAI0C,SAAS1C,EAAG,IACZA,EAAIJ,EAAIM,kBACVF,EAAIJ,EAAIM,kBACCF,EAAIJ,EAAIuC,oBACjBnC,EAAIJ,EAAIuC,mBAEHnC,GAELuI,EAAa,SAAS1I,GAGxB,IAAK,GAFD2I,IAAQ,EACRC,KACKzI,EAAIJ,EAAIK,mBAAoBD,GAAKJ,EAAIyC,mBAAoBrC,IAAK,CACrE,GAAIkC,GAAQoG,EAAkBzI,EAAIG,EAAI,KAClCkC,EAAQtC,EAAIM,oBACbsI,GACDxI,IAAMJ,EAAIyC,sBACVoG,EAASzI,EAAI,GAAKkC,EAClBsG,GAAQ,GAGZ,MAAOC,GAASnD,KAAK,KAEvB,QACEtG,KACEC,SAAU,WACR,MAAOgJ,GAAMjJ,IAAI,8BACdE,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAGtBC,WAAY,WACV,MAAO6I,GAAMjJ,IAAI,sBACdE,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAGtB6E,MAAO,WACL,MAAOiE,GAAMjJ,IAAI,mBACdE,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAGtBiH,QAAS,SAASzG,GAChB,MAAOsI,IACLU,OAAQ,MACR9J,IAAK,kBACL+J,QACEjJ,GAAMA,KAGPT,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAGtBoG,WAAY,SAAS5F,GACnB,MAAOsI,IACLU,OAAQ,MACR9J,IAAK,oBACL+J,QACEjJ,GAAMA,KAGPT,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAGtBY,IAAK,SAASJ,GACZ,MAAOsI,IACLU,OAAQ,MACR9J,IAAK,WACL+J,QACErE,EAAK5E,KAGNT,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAGtBmH,aAAc,SAAS3G,GACrB,MAAOsI,IACLU,OAAQ,MACR9J,IAAK,sBACL+J,QACEjJ,GAAMA,KAGPT,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,SAIxB+B,MACEsG,eAAgB,SAASrI,GACvB,MAAO8I,IACLU,OAAQ,OACR9J,IAAK,mBACLM,KAAM+I,EAAW/I,GACjB0J,SACEC,eAAgB,uCAEjB5J,KAAK,SAASwJ,GACf,MAAOA,GAASvJ,QAGpB0F,YAAa,SAAS1F,GACpB,MAAO8I,IACLU,OAAQ,OACR9J,IAAK,gBACLM,KAAM+I,EAAW/I,GACjB0J,SACEC,eAAgB,uCAEjB5J,KAAK,SAASwJ,GACf,MAAOA,GAASvJ,QAGpBY,IAAK,SAASgJ,EAAUlJ,GACtB,GAAIV,IACFoF,EAAGwE,EACH3H,EAAGmH,EAAW1I,GAEhB,OAAOoI,IACLU,OAAQ,OACR9J,IAAK,WACLM,KAAM+I,EAAW/I,GACjB0J,SACEC,eAAgB,uCAEjB5J,KAAK,SAASwJ,GACf,MAAOA,GAASvJ,QAGpByE,YAAa,SAASoF,EAAUC,GAK9B,MAAOhB,IACLU,OAAQ,OACR9J,IAAK,oBACLM,KAAM+I,GANNe,MAAOA,EACPC,UAAWF,IAMXH,SACEC,eAAgB,uCAEjB5J,KAAK,SAASwJ,GACf,MAAOA,GAASvJ,SAItBqE,QACEqE,SAAU,WACR,MAAOI,GAAMjJ,IAAI,SACdE,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAGtBoE,OAAQ,WACN,MAAO0E,GAAMjJ,IAAI,WACdE,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAGtBgK,WAAY,WACV,MAAOlB,GAAMjJ,IAAI,gBACdE,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,SAIxBiK,KAEEC,eAAgB,SAASN,EAAUO,EAAKC,GACtC,MAAOtB,IACLU,OAAQ,MACR9J,IAAK,yBACL+J,QACEjJ,GAAMoJ,EACNO,IAAOA,EACPC,QAAWA,KAGZrK,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAItBqK,WAAY,SAAST,EAAUO,EAAKC,EAASE,EAAMC,GACjD,MAAOzB,IACLU,OAAQ,MACR9J,IAAK,6BACL+J,QACEjJ,GAAMoJ,EACNO,IAAOA,EACPC,QAAWA,EACXE,KAAQA,EACRE,IAAOD,KAGRxK,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAItByK,iBAAkB,SAASb,EAAUO,GACnC,MAAOrB,IACLU,OAAQ,MACR9J,IAAK,2BACL+J,QACEjJ,GAAMoJ,EACNO,IAAOA,KAGRpK,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAItB0K,qBAAsB,SAASd,EAAUO,GACvC,MAAOrB,IACLU,OAAQ,MACR9J,IAAK,+BACL+J,QACEjJ,GAAMoJ,EACNO,IAAOA,KAGRpK,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAItB2K,kBAAmB,SAASf,EAAUO,GACpC,MAAOrB,IACLU,OAAQ,MACR9J,IAAK,gCACL+J,QACEjJ,GAAMoJ,EACNO,IAAOA,KAGRpK,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAItB4K,QAAS,SAAShB,EAAUO,GAC1B,MAAOrB,IACLU,OAAQ,MACR9J,IAAK,qBACL+J,QACEjJ,GAAMoJ,EACNO,IAAOA,KAGRpK,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAItB6K,iBAAkB,SAASjB,EAAUO,GACnC,MAAOrB,IACLU,OAAQ,MACR9J,IAAK,8BACL+J,QACEjJ,GAAMoJ,EACNO,IAAOA,KAGRpK,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAItB8K,KAAM,SAASlB,GACb,MAAOd,IACLU,OAAQ,MACR9J,IAAK,iBACL+J,QACEjJ,GAAMoJ,KAGP7J,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,QAItB+K,aAAc,SAASnB,EAAUoB,GAC/B,MAAOlC,IACLU,OAAQ,MACR9J,IAAK,qBACL+J,QACEjJ,GAAMoJ,EACNoB,YAAeA,KAGhBjL,KAAK,SAASwJ,GACb,MAAOA,GAASvJ,SAIxB2F,OACEC,MAAO,SAASqF,EAAM9K,OACA,KAAT8K,EACTxI,EAAE,mBAAmByI,KAAKD,GAE1BxI,EAAE,mBAAmByI,KAAK,+BAEP,KAAV/K,EACTsC,EAAE,oBAAoByI,KAAK/K,GAE3BsC,EAAE,oBAAoByI,KAAK,SAE7BzI,EAAE,eAAemD,MAAM,cCjVjCrH,IAAI4M,OAAO,YAAa,WACtB,YACA,OAAO,UAAS1H,EAAO2H,GAErB,MADAA,GAAQ7H,SAAS6H,EAAO,IACjB3H,EAAM4H,MAAMD","file":"app.min.js"}ola-0.10.9/olad/www/new/index.html0000664000175000017500000000677214376533110013647 00000000000000 OLA
ola-0.10.9/olad/www/new/libs/0000775000175000017500000000000014376533267012664 500000000000000ola-0.10.9/olad/www/new/libs/angular-route/0000775000175000017500000000000014376533267015451 500000000000000ola-0.10.9/olad/www/new/libs/angular-route/js/0000775000175000017500000000000014376533267016065 500000000000000ola-0.10.9/olad/www/new/libs/angular-route/js/angular-route.min.js0000664000175000017500000001313014376533110021673 00000000000000/* AngularJS v1.8.3 (c) 2010-2020 Google LLC. http://angularjs.org License: MIT */ (function(I,b){'use strict';function z(b,h){var d=[],c=b.replace(/([().])/g,"\\$1").replace(/(\/)?:(\w+)(\*\?|[?*])?/g,function(b,c,h,k){b="?"===k||"*?"===k;k="*"===k||"*?"===k;d.push({name:h,optional:b});c=c||"";return(b?"(?:"+c:c+"(?:")+(k?"(.+?)":"([^/]+)")+(b?"?)?":")")}).replace(/([/$*])/g,"\\$1");h.ignoreTrailingSlashes&&(c=c.replace(/\/+$/,"")+"/*");return{keys:d,regexp:new RegExp("^"+c+"(?:[?#]|$)",h.caseInsensitiveMatch?"i":"")}}function A(b){p&&b.get("$route")}function v(u,h,d){return{restrict:"ECA", terminal:!0,priority:400,transclude:"element",link:function(c,f,g,l,k){function q(){r&&(d.cancel(r),r=null);m&&(m.$destroy(),m=null);s&&(r=d.leave(s),r.done(function(b){!1!==b&&(r=null)}),s=null)}function C(){var g=u.current&&u.current.locals;if(b.isDefined(g&&g.$template)){var g=c.$new(),l=u.current;s=k(g,function(g){d.enter(g,null,s||f).done(function(d){!1===d||!b.isDefined(w)||w&&!c.$eval(w)||h()});q()});m=l.scope=g;m.$emit("$viewContentLoaded");m.$eval(p)}else q()}var m,s,r,w=g.autoscroll,p=g.onload|| "";c.$on("$routeChangeSuccess",C);C()}}}function x(b,h,d){return{restrict:"ECA",priority:-400,link:function(c,f){var g=d.current,l=g.locals;f.html(l.$template);var k=b(f.contents());if(g.controller){l.$scope=c;var q=h(g.controller,l);g.controllerAs&&(c[g.controllerAs]=q);f.data("$ngControllerController",q);f.children().data("$ngControllerController",q)}c[g.resolveAs||"$resolve"]=l;k(c)}}}var D,E,F,G,y=b.module("ngRoute",[]).info({angularVersion:"1.8.3"}).provider("$route",function(){function u(d, c){return b.extend(Object.create(d),c)}D=b.isArray;E=b.isObject;F=b.isDefined;G=b.noop;var h={};this.when=function(d,c){var f;f=void 0;if(D(c)){f=f||[];for(var g=0,l=c.length;g+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,S)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&v(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!y||!y.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ve(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=E)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{if(d.cssSupportsSelector&&!CSS.supports("selector(:is("+c+"))"))throw new Error;return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===E&&e.removeAttribute("id")}}}return g(t.replace(B,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[E]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ye(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ve(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e&&e.namespaceURI,n=e&&(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,S=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.cssSupportsSelector=ce(function(){return CSS.supports("selector(*)")&&C.querySelectorAll(":is(:jqfake)")&&!CSS.supports("selector(:is(*,:jqfake))")}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=E,!C.getElementsByName||!C.getElementsByName(E).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&S){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&S)return t.getElementsByClassName(e)},s=[],y=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&y.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||y.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+E+"-]").length||y.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||y.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||y.push(":checked"),e.querySelectorAll("a#"+E+"+*").length||y.push(".#.+[+~]"),e.querySelectorAll("\\\f"),y.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&y.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&y.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&y.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),y.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),d.cssSupportsSelector||y.push(":has"),y=y.length&&new RegExp(y.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),v=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType&&e.documentElement||e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},j=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&v(p,e)?-1:t==C||t.ownerDocument==p&&v(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&S&&!N[t+" "]&&(!s||!s.test(t))&&(!y||!y.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function j(e,n,r){return m(n)?E.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?E.grep(e,function(e){return e===n!==r}):"string"!=typeof n?E.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(E.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||D,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof E?t[0]:t,E.merge(this,E.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:S,!0)),N.test(r[1])&&E.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=S.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(E):E.makeArray(e,this)}).prototype=E.fn,D=E(S);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}E.fn.extend({has:function(e){var t=E(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=S.createDocumentFragment().appendChild(S.createElement("div")),(fe=S.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),v.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",v.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",v.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ye(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?E.merge([e],n):n}function ve(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function je(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&E(e).children("tbody")[0]||e}function De(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function qe(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Le(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),S.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;E.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||E.expando+"_"+Ct.guid++;return this[e]=!0,e}}),E.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(St.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||E.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?E(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),v.createHTMLDocument=((Ut=S.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),E.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(v.createHTMLDocument?((r=(t=S.implementation.createHTMLDocument("")).createElement("base")).href=S.location.href,t.head.appendChild(r)):t=S),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&E(o).remove(),E.merge([],i.childNodes)));var r,i,o},E.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(E.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},E.expr.pseudos.animated=function(t){return E.grep(E.timers,function(e){return t===e.elem}).length},E.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=E.css(e,"position"),c=E(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=E.css(e,"top"),u=E.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,E.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):c.css(f)}},E.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){E.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===E.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===E.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=E(e).offset()).top+=E.css(e,"borderTopWidth",!0),i.left+=E.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-E.css(r,"marginTop",!0),left:t.left-i.left-E.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===E.css(e,"position"))e=e.offsetParent;return e||re})}}),E.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;E.fn[t]=function(e){return B(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),E.each(["top","left"],function(e,n){E.cssHooks[n]=_e(v.pixelPosition,function(e,t){if(t)return t=Be(e,n),Pe.test(t)?E(e).position()[n]+"px":t})}),E.each({Height:"height",Width:"width"},function(a,s){E.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){E.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return B(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?E.css(e,t,i):E.style(e,t,n,i)},s,n?e:void 0,n)}})}),E.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){E.fn[t]=function(e){return this.on(t,e)}}),E.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),E.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){E.fn[n]=function(e,t){return 0c)return"...";var d=b.$$hashKey,f;if(H(a)){f=0;for(var g=a.length;f").append(a).html();try{return a[0].nodeType===Pa?K(b):b.match(/^(<[^>]+>)/)[1].replace(/^<([\w-]+)/,function(a,b){return"<"+K(b)})}catch(d){return K(b)}}function Vc(a){try{return decodeURIComponent(a)}catch(b){}}function hc(a){var b={};r((a||"").split("&"), function(a){var c,e,f;a&&(e=a=a.replace(/\+/g,"%20"),c=a.indexOf("="),-1!==c&&(e=a.substring(0,c),f=a.substring(c+1)),e=Vc(e),w(e)&&(f=w(f)?Vc(f):!0,ta.call(b,e)?H(b[e])?b[e].push(f):b[e]=[b[e],f]:b[e]=f))});return b}function Ce(a){var b=[];r(a,function(a,c){H(a)?r(a,function(a){b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))}):b.push(ba(c,!0)+(!0===a?"":"="+ba(a,!0)))});return b.length?b.join("&"):""}function ic(a){return ba(a,!0).replace(/%26/gi,"&").replace(/%3D/gi,"=").replace(/%2B/gi,"+")}function ba(a, b){return encodeURIComponent(a).replace(/%40/gi,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",").replace(/%3B/gi,";").replace(/%20/g,b?"%20":"+")}function De(a,b){var d,c,e=Qa.length;for(c=0;c protocol indicates an extension, document.location.href does not match."))}function Wc(a,b,d){D(d)||(d={});d=S({strictDi:!1},d);var c=function(){a=x(a);if(a.injector()){var c=a[0]===z.document?"document":Aa(a);throw oa("btstrpd",c.replace(//,">"));}b=b||[];b.unshift(["$provide",function(b){b.value("$rootElement",a)}]);d.debugInfoEnabled&&b.push(["$compileProvider", function(a){a.debugInfoEnabled(!0)}]);b.unshift("ng");c=fb(b,d.strictDi);c.invoke(["$rootScope","$rootElement","$compile","$injector",function(a,b,c,d){a.$apply(function(){b.data("$injector",d);c(b)(a)})}]);return c},e=/^NG_ENABLE_DEBUG_INFO!/,f=/^NG_DEFER_BOOTSTRAP!/;z&&e.test(z.name)&&(d.debugInfoEnabled=!0,z.name=z.name.replace(e,""));if(z&&!f.test(z.name))return c();z.name=z.name.replace(f,"");ca.resumeBootstrap=function(a){r(a,function(a){b.push(a)});return c()};B(ca.resumeDeferredBootstrap)&& ca.resumeDeferredBootstrap()}function Ge(){z.name="NG_ENABLE_DEBUG_INFO!"+z.name;z.location.reload()}function He(a){a=ca.element(a).injector();if(!a)throw oa("test");return a.get("$$testability")}function Xc(a,b){b=b||"_";return a.replace(Ie,function(a,c){return(c?b:"")+a.toLowerCase()})}function Je(){var a;if(!Yc){var b=rb();(sb=A(b)?z.jQuery:b?z[b]:void 0)&&sb.fn.on?(x=sb,S(sb.fn,{scope:Wa.scope,isolateScope:Wa.isolateScope,controller:Wa.controller,injector:Wa.injector,inheritedData:Wa.inheritedData})): x=U;a=x.cleanData;x.cleanData=function(b){for(var c,e=0,f;null!=(f=b[e]);e++)(c=(x._data(f)||{}).events)&&c.$destroy&&x(f).triggerHandler("$destroy");a(b)};ca.element=x;Yc=!0}}function Ke(){U.legacyXHTMLReplacement=!0}function gb(a,b,d){if(!a)throw oa("areq",b||"?",d||"required");return a}function tb(a,b,d){d&&H(a)&&(a=a[a.length-1]);gb(B(a),b,"not a function, got "+(a&&"object"===typeof a?a.constructor.name||"Object":typeof a));return a}function Ja(a,b){if("hasOwnProperty"===a)throw oa("badname", b);}function Le(a,b,d){if(!b)return a;b=b.split(".");for(var c,e=a,f=b.length,g=0;g"):a;if(10>wa)for(c=hb[c]||hb._default,d.innerHTML=c[1]+e+c[2],k=c[0];k--;)d=d.firstChild;else{c=qa[c]||[];for(k=c.length;-1<--k;)d.appendChild(z.document.createElement(c[k])),d=d.firstChild;d.innerHTML=e}g=db(g,d.childNodes);d=f.firstChild;d.textContent=""}else g.push(b.createTextNode(a)); f.textContent="";f.innerHTML="";r(g,function(a){f.appendChild(a)});return f}function U(a){if(a instanceof U)return a;var b;C(a)&&(a=V(a),b=!0);if(!(this instanceof U)){if(b&&"<"!==a.charAt(0))throw oc("nosel");return new U(a)}if(b){b=z.document;var d;a=(d=tg.exec(a))?[b.createElement(d[1])]:(d=gd(a,b))?d.childNodes:[];pc(this,a)}else B(a)?hd(a):pc(this,a)}function qc(a){return a.cloneNode(!0)}function zb(a,b){!b&&mc(a)&&x.cleanData([a]);a.querySelectorAll&&x.cleanData(a.querySelectorAll("*"))}function id(a){for(var b in a)return!1; return!0}function jd(a){var b=a.ng339,d=b&&Ka[b],c=d&&d.events,d=d&&d.data;d&&!id(d)||c&&!id(c)||(delete Ka[b],a.ng339=void 0)}function kd(a,b,d,c){if(w(c))throw oc("offargs");var e=(c=Ab(a))&&c.events,f=c&&c.handle;if(f){if(b){var g=function(b){var c=e[b];w(d)&&cb(c||[],d);w(d)&&c&&0l&&this.remove(n.key);return b}},get:function(a){if(l";b=Fa.firstChild.attributes;var d=b[0];b.removeNamedItem(d.name);d.value=c;a.attributes.setNamedItem(d)}function sa(a,b){try{a.addClass(b)}catch(c){}}function da(a,b,c,d,e){a instanceof x||(a=x(a));var f=Xa(a,b,a,c,d,e);da.$$addScopeClass(a);var g=null;return function(b,c,d){if(!a)throw $("multilink");gb(b,"scope");e&&e.needsNewScope&&(b=b.$parent.$new());d=d||{};var h=d.parentBoundTranscludeFn,k=d.transcludeControllers;d=d.futureParentElement; h&&h.$$boundTransclude&&(h=h.$$boundTransclude);g||(g=(d=d&&d[0])?"foreignobject"!==ua(d)&&la.call(d).match(/SVG/)?"svg":"html":"html");d="html"!==g?x(ja(g,x("
").append(a).html())):c?Wa.clone.call(a):a;if(k)for(var l in k)d.data("$"+l+"Controller",k[l].instance);da.$$addScopeInfo(d,b);c&&c(d,b);f&&f(b,d,d,h);c||(a=f=null);return d}}function Xa(a,b,c,d,e,f){function g(a,c,d,e){var f,k,l,m,p,I,t;if(n)for(t=Array(c.length),m=0;mu.priority)break;if(O=u.scope)u.templateUrl||(D(O)?(ba("new/isolated scope",s||t,u,y),s=u):ba("new/isolated scope",s,u,y)),t=t||u;Q=u.name;if(!ma&&(u.replace&&(u.templateUrl||u.template)||u.transclude&& !u.$$tlb)){for(O=sa+1;ma=a[O++];)if(ma.transclude&&!ma.$$tlb||ma.replace&&(ma.templateUrl||ma.template)){Jb=!0;break}ma=!0}!u.templateUrl&&u.controller&&(J=J||T(),ba("'"+Q+"' controller",J[Q],u,y),J[Q]=u);if(O=u.transclude)if(G=!0,u.$$tlb||(ba("transclusion",L,u,y),L=u),"element"===O)N=!0,n=u.priority,M=y,y=d.$$element=x(da.$$createComment(Q,d[Q])),b=y[0],oa(f,Ha.call(M,0),b),R=Z(Jb,M,e,n,g&&g.name,{nonTlbTranscludeDirective:L});else{var ka=T();if(D(O)){M=z.document.createDocumentFragment();var Xa= T(),F=T();r(O,function(a,b){var c="?"===a.charAt(0);a=c?a.substring(1):a;Xa[a]=b;ka[b]=null;F[b]=c});r(y.contents(),function(a){var b=Xa[xa(ua(a))];b?(F[b]=!0,ka[b]=ka[b]||z.document.createDocumentFragment(),ka[b].appendChild(a)):M.appendChild(a)});r(F,function(a,b){if(!a)throw $("reqslot",b);});for(var K in ka)ka[K]&&(R=x(ka[K].childNodes),ka[K]=Z(Jb,R,e));M=x(M.childNodes)}else M=x(qc(b)).contents();y.empty();R=Z(Jb,M,e,void 0,void 0,{needsNewScope:u.$$isolateScope||u.$$newScope});R.$$slots=ka}if(u.template)if(P= !0,ba("template",v,u,y),v=u,O=B(u.template)?u.template(y,d):u.template,O=Na(O),u.replace){g=u;M=nc.test(O)?td(ja(u.templateNamespace,V(O))):[];b=M[0];if(1!==M.length||1!==b.nodeType)throw $("tplrt",Q,"");oa(f,y,b);C={$attr:{}};O=tc(b,[],C);var Ig=a.splice(sa+1,a.length-(sa+1));(s||t)&&fa(O,s,t);a=a.concat(O).concat(Ig);ga(d,C);C=a.length}else y.html(O);if(u.templateUrl)P=!0,ba("template",v,u,y),v=u,u.replace&&(g=u),p=ha(a.splice(sa,a.length-sa),y,d,f,G&&R,h,k,{controllerDirectives:J,newScopeDirective:t!== u&&t,newIsolateScopeDirective:s,templateDirective:v,nonTlbTranscludeDirective:L}),C=a.length;else if(u.compile)try{q=u.compile(y,d,R);var Y=u.$$originalDirective||u;B(q)?m(null,Va(Y,q),E,jb):q&&m(Va(Y,q.pre),Va(Y,q.post),E,jb)}catch(ca){c(ca,Aa(y))}u.terminal&&(p.terminal=!0,n=Math.max(n,u.priority))}p.scope=t&&!0===t.scope;p.transcludeOnThisElement=G;p.templateOnThisElement=P;p.transclude=R;l.hasElementTranscludeDirective=N;return p}function X(a,b,c,d){var e;if(C(b)){var f=b.match(l);b=b.substring(f[0].length); var g=f[1]||f[3],f="?"===f[2];"^^"===g?c=c.parent():e=(e=d&&d[b])&&e.instance;if(!e){var h="$"+b+"Controller";e="^^"===g&&c[0]&&9===c[0].nodeType?null:g?c.inheritedData(h):c.data(h)}if(!e&&!f)throw $("ctreq",b,a);}else if(H(b))for(e=[],g=0,f=b.length;gc.priority)&&-1!==c.restrict.indexOf(e)){k&&(c=bc(c,{$$start:k,$$end:l}));if(!c.$$bindings){var I=m=c,t=c.name,u={isolateScope:null,bindToController:null}; D(I.scope)&&(!0===I.bindToController?(u.bindToController=d(I.scope,t,!0),u.isolateScope={}):u.isolateScope=d(I.scope,t,!1));D(I.bindToController)&&(u.bindToController=d(I.bindToController,t,!0));if(u.bindToController&&!I.controller)throw $("noctrl",t);m=m.$$bindings=u;D(m.isolateScope)&&(c.$$isolateBindings=m.isolateScope)}b.push(c);m=c}}return m}function ca(b){if(f.hasOwnProperty(b))for(var c=a.get(b+"Directive"),d=0,e=c.length;d"+b+"";return c.childNodes[0].childNodes;default:return b}}function qa(a,b){if("srcdoc"=== b)return u.HTML;if("src"===b||"ngSrc"===b)return-1===["img","video","audio","source","track"].indexOf(a)?u.RESOURCE_URL:u.MEDIA_URL;if("xlinkHref"===b)return"image"===a?u.MEDIA_URL:"a"===a?u.URL:u.RESOURCE_URL;if("form"===a&&"action"===b||"base"===a&&"href"===b||"link"===a&&"href"===b)return u.RESOURCE_URL;if("a"===a&&("href"===b||"ngHref"===b))return u.URL}function ya(a,b){var c=b.toLowerCase();return v[a+"|"+c]||v["*|"+c]}function za(a){return ma(u.valueOf(a),"ng-prop-srcset")}function Ea(a,b,c, d){if(m.test(d))throw $("nodomevents");a=ua(a);var e=ya(a,d),f=Ta;"srcset"!==d||"img"!==a&&"source"!==a?e&&(f=u.getTrusted.bind(u,e)):f=za;b.push({priority:100,compile:function(a,b){var e=p(b[c]),g=p(b[c],function(a){return u.valueOf(a)});return{pre:function(a,b){function c(){var g=e(a);b[0][d]=f(g)}c();a.$watch(g,c)}}}})}function Ia(a,c,d,e,f){var g=ua(a),k=qa(g,e),l=h[e]||f,p=b(d,!f,k,l);if(p){if("multiple"===e&&"select"===g)throw $("selmulti",Aa(a));if(m.test(e))throw $("nodomevents");c.push({priority:100, compile:function(){return{pre:function(a,c,f){c=f.$$observers||(f.$$observers=T());var g=f[e];g!==d&&(p=g&&b(g,!0,k,l),d=g);p&&(f[e]=p(a),(c[e]||(c[e]=[])).$$inter=!0,(f.$$observers&&f.$$observers[e].$$scope||a).$watch(p,function(a,b){"class"===e&&a!==b?f.$updateClass(a,b):f.$set(e,a)}))}}}})}}function oa(a,b,c){var d=b[0],e=b.length,f=d.parentNode,g,h;if(a)for(g=0,h=a.length;g=b)return a;for(;b--;){var d=a[b];(8===d.nodeType||d.nodeType===Pa&&""===d.nodeValue.trim())&&Kg.call(a,b,1)}return a} function Gg(a,b){if(b&&C(b))return b;if(C(a)){var d=wd.exec(a);if(d)return d[3]}}function Kf(){var a={};this.has=function(b){return a.hasOwnProperty(b)};this.register=function(b,d){Ja(b,"controller");D(b)?S(a,b):a[b]=d};this.$get=["$injector",function(b){function d(a,b,d,g){if(!a||!D(a.$scope))throw F("$controller")("noscp",g,b);a.$scope[b]=d}return function(c,e,f,g){var k,h,l;f=!0===f;g&&C(g)&&(l=g);if(C(c)){g=c.match(wd);if(!g)throw xd("ctrlfmt",c);h=g[1];l=l||g[3];c=a.hasOwnProperty(h)?a[h]:Le(e.$scope, h,!0);if(!c)throw xd("ctrlreg",h);tb(c,h,!0)}if(f)return f=(H(c)?c[c.length-1]:c).prototype,k=Object.create(f||null),l&&d(e,l,k,h||c.name),S(function(){var a=b.invoke(c,k,e,h);a!==k&&(D(a)||B(a))&&(k=a,l&&d(e,l,k,h||c.name));return k},{instance:k,identifier:l});k=b.instantiate(c,e,h);l&&d(e,l,k,h||c.name);return k}}]}function Lf(){this.$get=["$window",function(a){return x(a.document)}]}function Mf(){this.$get=["$document","$rootScope",function(a,b){function d(){e=c.hidden}var c=a[0],e=c&&c.hidden; a.on("visibilitychange",d);b.$on("$destroy",function(){a.off("visibilitychange",d)});return function(){return e}}]}function Nf(){this.$get=["$log",function(a){return function(b,d){a.error.apply(a,arguments)}}]}function vc(a){return D(a)?ha(a)?a.toISOString():eb(a):a}function Tf(){this.$get=function(){return function(a){if(!a)return"";var b=[];Qc(a,function(a,c){null===a||A(a)||B(a)||(H(a)?r(a,function(a){b.push(ba(c)+"="+ba(vc(a)))}):b.push(ba(c)+"="+ba(vc(a))))});return b.join("&")}}}function Uf(){this.$get= function(){return function(a){function b(a,e,f){H(a)?r(a,function(a,c){b(a,e+"["+(D(a)?c:"")+"]")}):D(a)&&!ha(a)?Qc(a,function(a,c){b(a,e+(f?"":"[")+c+(f?"":"]"))}):(B(a)&&(a=a()),d.push(ba(e)+"="+(null==a?"":ba(vc(a)))))}if(!a)return"";var d=[];b(a,"",!0);return d.join("&")}}}function wc(a,b){if(C(a)){var d=a.replace(Lg,"").trim();if(d){var c=b("Content-Type"),c=c&&0===c.indexOf(yd),e;(e=c)||(e=(e=d.match(Mg))&&Ng[e[0]].test(d));if(e)try{a=Tc(d)}catch(f){if(!c)return a;throw Lb("baddata",a,f);}}}return a} function zd(a){var b=T(),d;C(a)?r(a.split("\n"),function(a){d=a.indexOf(":");var e=K(V(a.substr(0,d)));a=V(a.substr(d+1));e&&(b[e]=b[e]?b[e]+", "+a:a)}):D(a)&&r(a,function(a,d){var f=K(d),g=V(a);f&&(b[f]=b[f]?b[f]+", "+g:g)});return b}function Ad(a){var b;return function(d){b||(b=zd(a));return d?(d=b[K(d)],void 0===d&&(d=null),d):b}}function Bd(a,b,d,c){if(B(c))return c(a,b,d);r(c,function(c){a=c(a,b,d)});return a}function Sf(){var a=this.defaults={transformResponse:[wc],transformRequest:[function(a){return D(a)&& "[object File]"!==la.call(a)&&"[object Blob]"!==la.call(a)&&"[object FormData]"!==la.call(a)?eb(a):a}],headers:{common:{Accept:"application/json, text/plain, */*"},post:ja(xc),put:ja(xc),patch:ja(xc)},xsrfCookieName:"XSRF-TOKEN",xsrfHeaderName:"X-XSRF-TOKEN",paramSerializer:"$httpParamSerializer",jsonpCallbackParam:"callback"},b=!1;this.useApplyAsync=function(a){return w(a)?(b=!!a,this):b};var d=this.interceptors=[],c=this.xsrfTrustedOrigins=[];Object.defineProperty(this,"xsrfWhitelistedOrigins", {get:function(){return this.xsrfTrustedOrigins},set:function(a){this.xsrfTrustedOrigins=a}});this.$get=["$browser","$httpBackend","$$cookieReader","$cacheFactory","$rootScope","$q","$injector","$sce",function(e,f,g,k,h,l,m,p){function n(b){function c(a,b){for(var d=0,e=b.length;da?b:l.reject(b)}if(!D(b))throw F("$http")("badreq",b);if(!C(p.valueOf(b.url)))throw F("$http")("badreq",b.url);var g=S({method:"get",transformRequest:a.transformRequest,transformResponse:a.transformResponse,paramSerializer:a.paramSerializer,jsonpCallbackParam:a.jsonpCallbackParam},b);g.headers=function(b){var c=a.headers,e=S({},b.headers),f,g,h,c=S({},c.common,c[K(b.method)]);a:for(f in c){g=K(f);for(h in e)if(K(h)===g)continue a;e[f]=c[f]}return d(e,ja(b))}(b);g.method= vb(g.method);g.paramSerializer=C(g.paramSerializer)?m.get(g.paramSerializer):g.paramSerializer;e.$$incOutstandingRequestCount("$http");var h=[],k=[];b=l.resolve(g);r(v,function(a){(a.request||a.requestError)&&h.unshift(a.request,a.requestError);(a.response||a.responseError)&&k.push(a.response,a.responseError)});b=c(b,h);b=b.then(function(b){var c=b.headers,d=Bd(b.data,Ad(c),void 0,b.transformRequest);A(d)&&r(c,function(a,b){"content-type"===K(b)&&delete c[b]});A(b.withCredentials)&&!A(a.withCredentials)&& (b.withCredentials=a.withCredentials);return s(b,d).then(f,f)});b=c(b,k);return b=b.finally(function(){e.$$completeOutstandingRequest(E,"$http")})}function s(c,d){function e(a){if(a){var c={};r(a,function(a,d){c[d]=function(c){function d(){a(c)}b?h.$applyAsync(d):h.$$phase?d():h.$apply(d)}});return c}}function k(a,c,d,e,f){function g(){m(c,a,d,e,f)}R&&(200<=a&&300>a?R.put(O,[a,c,zd(d),e,f]):R.remove(O));b?h.$applyAsync(g):(g(),h.$$phase||h.$apply())}function m(a,b,d,e,f){b=-1<=b?b:0;(200<=b&&300> b?L.resolve:L.reject)({data:a,status:b,headers:Ad(d),config:c,statusText:e,xhrStatus:f})}function s(a){m(a.data,a.status,ja(a.headers()),a.statusText,a.xhrStatus)}function v(){var a=n.pendingRequests.indexOf(c);-1!==a&&n.pendingRequests.splice(a,1)}var L=l.defer(),u=L.promise,R,q,ma=c.headers,x="jsonp"===K(c.method),O=c.url;x?O=p.getTrustedResourceUrl(O):C(O)||(O=p.valueOf(O));O=G(O,c.paramSerializer(c.params));x&&(O=t(O,c.jsonpCallbackParam));n.pendingRequests.push(c);u.then(v,v);!c.cache&&!a.cache|| !1===c.cache||"GET"!==c.method&&"JSONP"!==c.method||(R=D(c.cache)?c.cache:D(a.cache)?a.cache:N);R&&(q=R.get(O),w(q)?q&&B(q.then)?q.then(s,s):H(q)?m(q[1],q[0],ja(q[2]),q[3],q[4]):m(q,200,{},"OK","complete"):R.put(O,u));A(q)&&((q=kc(c.url)?g()[c.xsrfCookieName||a.xsrfCookieName]:void 0)&&(ma[c.xsrfHeaderName||a.xsrfHeaderName]=q),f(c.method,O,d,k,ma,c.timeout,c.withCredentials,c.responseType,e(c.eventHandlers),e(c.uploadEventHandlers)));return u}function G(a,b){0=h&&(t.resolve(s),f(r.$$intervalId));G||c.$apply()},k,t,G);return r}}}]}function Cd(a,b){var d=ga(a);b.$$protocol=d.protocol;b.$$host= d.hostname;b.$$port=fa(d.port)||Rg[d.protocol]||null}function Dd(a,b,d){if(Sg.test(a))throw kb("badpath",a);var c="/"!==a.charAt(0);c&&(a="/"+a);a=ga(a);for(var c=(c&&"/"===a.pathname.charAt(0)?a.pathname.substring(1):a.pathname).split("/"),e=c.length;e--;)c[e]=decodeURIComponent(c[e]),d&&(c[e]=c[e].replace(/\//g,"%2F"));d=c.join("/");b.$$path=d;b.$$search=hc(a.search);b.$$hash=decodeURIComponent(a.hash);b.$$path&&"/"!==b.$$path.charAt(0)&&(b.$$path="/"+b.$$path)}function yc(a,b){return a.slice(0, b.length)===b}function ya(a,b){if(yc(b,a))return b.substr(a.length)}function Da(a){var b=a.indexOf("#");return-1===b?a:a.substr(0,b)}function zc(a,b,d){this.$$html5=!0;d=d||"";Cd(a,this);this.$$parse=function(a){var d=ya(b,a);if(!C(d))throw kb("ipthprfx",a,b);Dd(d,this,!0);this.$$path||(this.$$path="/");this.$$compose()};this.$$normalizeUrl=function(a){return b+a.substr(1)};this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;w(f=ya(a,c))?(g=f,g=d&&w(f=ya(d,f))? b+(ya("/",f)||f):a+g):w(f=ya(b,c))?g=b+f:b===c+"/"&&(g=b);g&&this.$$parse(g);return!!g}}function Ac(a,b,d){Cd(a,this);this.$$parse=function(c){var e=ya(a,c)||ya(b,c),f;A(e)||"#"!==e.charAt(0)?this.$$html5?f=e:(f="",A(e)&&(a=c,this.replace())):(f=ya(d,e),A(f)&&(f=e));Dd(f,this,!1);c=this.$$path;var e=a,g=/^\/[A-Z]:(\/.*)/;yc(f,e)&&(f=f.replace(e,""));g.exec(f)||(c=(f=g.exec(c))?f[1]:c);this.$$path=c;this.$$compose()};this.$$normalizeUrl=function(b){return a+(b?d+b:"")};this.$$parseLinkUrl=function(b, d){return Da(a)===Da(b)?(this.$$parse(b),!0):!1}}function Ed(a,b,d){this.$$html5=!0;Ac.apply(this,arguments);this.$$parseLinkUrl=function(c,e){if(e&&"#"===e[0])return this.hash(e.slice(1)),!0;var f,g;a===Da(c)?f=c:(g=ya(b,c))?f=a+d+g:b===c+"/"&&(f=b);f&&this.$$parse(f);return!!f};this.$$normalizeUrl=function(b){return a+d+b}}function Mb(a){return function(){return this[a]}}function Fd(a,b){return function(d){if(A(d))return this[a];this[a]=b(d);this.$$compose();return this}}function Yf(){var a="!", b={enabled:!1,requireBase:!0,rewriteLinks:!0};this.hashPrefix=function(b){return w(b)?(a=b,this):a};this.html5Mode=function(a){if(Ga(a))return b.enabled=a,this;if(D(a)){Ga(a.enabled)&&(b.enabled=a.enabled);Ga(a.requireBase)&&(b.requireBase=a.requireBase);if(Ga(a.rewriteLinks)||C(a.rewriteLinks))b.rewriteLinks=a.rewriteLinks;return this}return b};this.$get=["$rootScope","$browser","$sniffer","$rootElement","$window",function(d,c,e,f,g){function k(a,b){return a===b||ga(a).href===ga(b).href}function h(a, b,d){var e=m.url(),f=m.$$state;try{c.url(a,b,d),m.$$state=c.state()}catch(g){throw m.url(e),m.$$state=f,g;}}function l(a,b){d.$broadcast("$locationChangeSuccess",m.absUrl(),a,m.$$state,b)}var m,p;p=c.baseHref();var n=c.url(),s;if(b.enabled){if(!p&&b.requireBase)throw kb("nobase");s=n.substring(0,n.indexOf("/",n.indexOf("//")+2))+(p||"/");p=e.history?zc:Ed}else s=Da(n),p=Ac;var r=s.substr(0,Da(s).lastIndexOf("/")+1);m=new p(s,r,"#"+a);m.$$parseLinkUrl(n,n);m.$$state=c.state();var t=/^\s*(javascript|mailto):/i; f.on("click",function(a){var e=b.rewriteLinks;if(e&&!a.ctrlKey&&!a.metaKey&&!a.shiftKey&&2!==a.which&&2!==a.button){for(var g=x(a.target);"a"!==ua(g[0]);)if(g[0]===f[0]||!(g=g.parent())[0])return;if(!C(e)||!A(g.attr(e))){var e=g.prop("href"),h=g.attr("href")||g.attr("xlink:href");D(e)&&"[object SVGAnimatedString]"===e.toString()&&(e=ga(e.animVal).href);t.test(e)||!e||g.attr("target")||a.isDefaultPrevented()||!m.$$parseLinkUrl(e,h)||(a.preventDefault(),m.absUrl()!==c.url()&&d.$apply())}}});m.absUrl()!== n&&c.url(m.absUrl(),!0);var N=!0;c.onUrlChange(function(a,b){yc(a,r)?(d.$evalAsync(function(){var c=m.absUrl(),e=m.$$state,f;m.$$parse(a);m.$$state=b;f=d.$broadcast("$locationChangeStart",a,c,b,e).defaultPrevented;m.absUrl()===a&&(f?(m.$$parse(c),m.$$state=e,h(c,!1,e)):(N=!1,l(c,e)))}),d.$$phase||d.$digest()):g.location.href=a});d.$watch(function(){if(N||m.$$urlUpdatedByLocation){m.$$urlUpdatedByLocation=!1;var a=c.url(),b=m.absUrl(),f=c.state(),g=m.$$replace,n=!k(a,b)||m.$$html5&&e.history&&f!== m.$$state;if(N||n)N=!1,d.$evalAsync(function(){var b=m.absUrl(),c=d.$broadcast("$locationChangeStart",b,a,m.$$state,f).defaultPrevented;m.absUrl()===b&&(c?(m.$$parse(a),m.$$state=f):(n&&h(b,g,f===m.$$state?null:m.$$state),l(a,f)))})}m.$$replace=!1});return m}]}function Zf(){var a=!0,b=this;this.debugEnabled=function(b){return w(b)?(a=b,this):a};this.$get=["$window",function(d){function c(a){dc(a)&&(a.stack&&f?a=a.message&&-1===a.stack.indexOf(a.message)?"Error: "+a.message+"\n"+a.stack:a.stack:a.sourceURL&& (a=a.message+"\n"+a.sourceURL+":"+a.line));return a}function e(a){var b=d.console||{},e=b[a]||b.log||E;return function(){var a=[];r(arguments,function(b){a.push(c(b))});return Function.prototype.apply.call(e,b,a)}}var f=wa||/\bEdge\//.test(d.navigator&&d.navigator.userAgent);return{log:e("log"),info:e("info"),warn:e("warn"),error:e("error"),debug:function(){var c=e("debug");return function(){a&&c.apply(b,arguments)}}()}}]}function Tg(a){return a+""}function Ug(a,b){return"undefined"!==typeof a?a: b}function Gd(a,b){return"undefined"===typeof a?b:"undefined"===typeof b?a:a+b}function Vg(a,b){switch(a.type){case q.MemberExpression:if(a.computed)return!1;break;case q.UnaryExpression:return 1;case q.BinaryExpression:return"+"!==a.operator?1:!1;case q.CallExpression:return!1}return void 0===b?Hd:b}function Z(a,b,d){var c,e,f=a.isPure=Vg(a,d);switch(a.type){case q.Program:c=!0;r(a.body,function(a){Z(a.expression,b,f);c=c&&a.expression.constant});a.constant=c;break;case q.Literal:a.constant=!0;a.toWatch= [];break;case q.UnaryExpression:Z(a.argument,b,f);a.constant=a.argument.constant;a.toWatch=a.argument.toWatch;break;case q.BinaryExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.left.toWatch.concat(a.right.toWatch);break;case q.LogicalExpression:Z(a.left,b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=a.constant?[]:[a];break;case q.ConditionalExpression:Z(a.test,b,f);Z(a.alternate,b,f);Z(a.consequent,b,f);a.constant=a.test.constant&& a.alternate.constant&&a.consequent.constant;a.toWatch=a.constant?[]:[a];break;case q.Identifier:a.constant=!1;a.toWatch=[a];break;case q.MemberExpression:Z(a.object,b,f);a.computed&&Z(a.property,b,f);a.constant=a.object.constant&&(!a.computed||a.property.constant);a.toWatch=a.constant?[]:[a];break;case q.CallExpression:c=d=a.filter?!b(a.callee.name).$stateful:!1;e=[];r(a.arguments,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=d?e:[a];break;case q.AssignmentExpression:Z(a.left, b,f);Z(a.right,b,f);a.constant=a.left.constant&&a.right.constant;a.toWatch=[a];break;case q.ArrayExpression:c=!0;e=[];r(a.elements,function(a){Z(a,b,f);c=c&&a.constant;e.push.apply(e,a.toWatch)});a.constant=c;a.toWatch=e;break;case q.ObjectExpression:c=!0;e=[];r(a.properties,function(a){Z(a.value,b,f);c=c&&a.value.constant;e.push.apply(e,a.value.toWatch);a.computed&&(Z(a.key,b,!1),c=c&&a.key.constant,e.push.apply(e,a.key.toWatch))});a.constant=c;a.toWatch=e;break;case q.ThisExpression:a.constant= !1;a.toWatch=[];break;case q.LocalsExpression:a.constant=!1,a.toWatch=[]}}function Id(a){if(1===a.length){a=a[0].expression;var b=a.toWatch;return 1!==b.length?b:b[0]!==a?b:void 0}}function Jd(a){return a.type===q.Identifier||a.type===q.MemberExpression}function Kd(a){if(1===a.body.length&&Jd(a.body[0].expression))return{type:q.AssignmentExpression,left:a.body[0].expression,right:{type:q.NGValueParameter},operator:"="}}function Ld(a){this.$filter=a}function Md(a){this.$filter=a}function Nb(a,b,d){this.ast= new q(a,d);this.astCompiler=d.csp?new Md(b):new Ld(b)}function Bc(a){return B(a.valueOf)?a.valueOf():Wg.call(a)}function $f(){var a=T(),b={"true":!0,"false":!1,"null":null,undefined:void 0},d,c;this.addLiteral=function(a,c){b[a]=c};this.setIdentifierFns=function(a,b){d=a;c=b;return this};this.$get=["$filter",function(e){function f(b,c){var d,f;switch(typeof b){case "string":return f=b=b.trim(),d=a[f],d||(d=new Ob(G),d=(new Nb(d,e,G)).parse(b),a[f]=p(d)),s(d,c);case "function":return s(b,c);default:return s(E, c)}}function g(a,b,c){return null==a||null==b?a===b:"object"!==typeof a||(a=Bc(a),"object"!==typeof a||c)?a===b||a!==a&&b!==b:!1}function k(a,b,c,d,e){var f=d.inputs,h;if(1===f.length){var k=g,f=f[0];return a.$watch(function(a){var b=f(a);g(b,k,f.isPure)||(h=d(a,void 0,void 0,[b]),k=b&&Bc(b));return h},b,c,e)}for(var l=[],m=[],n=0,p=f.length;n=c.$$state.status&&e&&e.length&&a(function(){for(var a,c,f=0,g=e.length;fa)for(b in l++, f)ta.call(e,b)||(t--,delete f[b])}else f!==e&&(f=e,l++);return l}}c.$$pure=g(a).literal;c.$stateful=!c.$$pure;var d=this,e,f,h,k=1r&&(A=4-r,N[A]||(N[A]=[]),N[A].push({msg:B(a.exp)?"fn: "+(a.exp.name||a.exp.toString()):a.exp,newVal:g,oldVal:h}));else if(a===c){s= !1;break a}}catch(E){f(E)}if(!(n=!q.$$suspended&&q.$$watchersCount&&q.$$childHead||q!==y&&q.$$nextSibling))for(;q!==y&&!(n=q.$$nextSibling);)q=q.$parent}while(q=n);if((s||w.length)&&!r--)throw v.$$phase=null,d("infdig",b,N);}while(s||w.length);for(v.$$phase=null;Jwa)throw Ea("iequirks");var c=ja(W);c.isEnabled=function(){return a};c.trustAs=d.trustAs;c.getTrusted=d.getTrusted;c.valueOf=d.valueOf;a||(c.trustAs=c.getTrusted=function(a,b){return b},c.valueOf=Ta);c.parseAs=function(a,d){var e=b(d);return e.literal&&e.constant?e:b(d,function(b){return c.getTrusted(a,b)})};var e=c.parseAs,f=c.getTrusted,g=c.trustAs;r(W, function(a,b){var d=K(b);c[("parse_as_"+d).replace(Dc,xb)]=function(b){return e(a,b)};c[("get_trusted_"+d).replace(Dc,xb)]=function(b){return f(a,b)};c[("trust_as_"+d).replace(Dc,xb)]=function(b){return g(a,b)}});return c}]}function fg(){this.$get=["$window","$document",function(a,b){var d={},c=!((!a.nw||!a.nw.process)&&a.chrome&&(a.chrome.app&&a.chrome.app.runtime||!a.chrome.app&&a.chrome.runtime&&a.chrome.runtime.id))&&a.history&&a.history.pushState,e=fa((/android (\d+)/.exec(K((a.navigator||{}).userAgent))|| [])[1]),f=/Boxee/i.test((a.navigator||{}).userAgent),g=b[0]||{},k=g.body&&g.body.style,h=!1,l=!1;k&&(h=!!("transition"in k||"webkitTransition"in k),l=!!("animation"in k||"webkitAnimation"in k));return{history:!(!c||4>e||f),hasEvent:function(a){if("input"===a&&wa)return!1;if(A(d[a])){var b=g.createElement("div");d[a]="on"+a in b}return d[a]},csp:Ba(),transitions:h,animations:l,android:e}}]}function gg(){this.$get=ia(function(a){return new Yg(a)})}function Yg(a){function b(){var a=e.pop();return a&& a.cb}function d(a){for(var b=e.length-1;0<=b;--b){var c=e[b];if(c.type===a)return e.splice(b,1),c.cb}}var c={},e=[],f=this.ALL_TASKS_TYPE="$$all$$",g=this.DEFAULT_TASK_TYPE="$$default$$";this.completeTask=function(e,h){h=h||g;try{e()}finally{var l;l=h||g;c[l]&&(c[l]--,c[f]--);l=c[h];var m=c[f];if(!m||!l)for(l=m?d:b;m=l(h);)try{m()}catch(p){a.error(p)}}};this.incTaskCount=function(a){a=a||g;c[a]=(c[a]||0)+1;c[f]=(c[f]||0)+1};this.notifyWhenNoPendingTasks=function(a,b){b=b||f;c[b]?e.push({type:b,cb:a}): a()}}function ig(){var a;this.httpOptions=function(b){return b?(a=b,this):a};this.$get=["$exceptionHandler","$templateCache","$http","$q","$sce",function(b,d,c,e,f){function g(k,h){g.totalPendingRequests++;if(!C(k)||A(d.get(k)))k=f.getTrustedResourceUrl(k);var l=c.defaults&&c.defaults.transformResponse;H(l)?l=l.filter(function(a){return a!==wc}):l===wc&&(l=null);return c.get(k,S({cache:d,transformResponse:l},a)).finally(function(){g.totalPendingRequests--}).then(function(a){return d.put(k,a.data)}, function(a){h||(a=Zg("tpload",k,a.status,a.statusText),b(a));return e.reject(a)})}g.totalPendingRequests=0;return g}]}function jg(){this.$get=["$rootScope","$browser","$location",function(a,b,d){return{findBindings:function(a,b,d){a=a.getElementsByClassName("ng-binding");var g=[];r(a,function(a){var c=ca.element(a).data("$binding");c&&r(c,function(c){d?(new RegExp("(^|\\s)"+Od(b)+"(\\s|\\||$)")).test(c)&&g.push(a):-1!==c.indexOf(b)&&g.push(a)})});return g},findModels:function(a,b,d){for(var g=["ng-", "data-ng-","ng\\:"],k=0;kc&&(c=e),c+=+a.slice(e+1),a=a.substring(0,e)):0>c&&(c=a.length);for(e=0;a.charAt(e)===Fc;e++);if(e===(g=a.length))d=[0],c=1;else{for(g--;a.charAt(g)===Fc;)g--;c-=e;d=[];for(f=0;e<=g;e++,f++)d[f]=+a.charAt(e)}c>Yd&&(d=d.splice(0,Yd-1),b=c-1,c=1);return{d:d,e:b,i:c}}function ih(a, b,d,c){var e=a.d,f=e.length-a.i;b=A(b)?Math.min(Math.max(d,f),c):+b;d=b+a.i;c=e[d];if(0d-1){for(c=0;c>d;c--)e.unshift(0),a.i++;e.unshift(1);a.i++}else e[d-1]++;for(;fk;)h.unshift(0),k++;0=b.lgSize&&k.unshift(h.splice(-b.lgSize,h.length).join(""));h.length>b.gSize;)k.unshift(h.splice(-b.gSize,h.length).join(""));h.length&&k.unshift(h.join(""));h=k.join(d);f.length&&(h+=c+f.join(""));e&&(h+="e+"+e)}return 0>a&&!g?b.negPre+h+b.negSuf:b.posPre+ h+b.posSuf}function Pb(a,b,d,c){var e="";if(0>a||c&&0>=a)c?a=-a+1:(a=-a,e="-");for(a=""+a;a.length-d)f+=d;0===f&&-12===d&&(f=12);return Pb(f,b,c,e)}}function lb(a,b,d){return function(c,e){var f=c["get"+a](),g=vb((d?"STANDALONE":"")+(b?"SHORT":"")+a);return e[g][f]}}function Zd(a){var b=(new Date(a,0,1)).getDay();return new Date(a,0,(4>=b?5:12)-b)}function $d(a){return function(b){var d= Zd(b.getFullYear());b=+new Date(b.getFullYear(),b.getMonth(),b.getDate()+(4-b.getDay()))-+d;b=1+Math.round(b/6048E5);return Pb(b,a)}}function Gc(a,b){return 0>=a.getFullYear()?b.ERAS[0]:b.ERAS[1]}function Td(a){function b(a){var b;if(b=a.match(d)){a=new Date(0);var f=0,g=0,k=b[8]?a.setUTCFullYear:a.setFullYear,h=b[8]?a.setUTCHours:a.setHours;b[9]&&(f=fa(b[9]+b[10]),g=fa(b[9]+b[11]));k.call(a,fa(b[1]),fa(b[2])-1,fa(b[3]));f=fa(b[4]||0)-f;g=fa(b[5]||0)-g;k=fa(b[6]||0);b=Math.round(1E3*parseFloat("0."+ (b[7]||0)));h.call(a,f,g,k,b)}return a}var d=/^(\d{4})-?(\d\d)-?(\d\d)(?:T(\d\d)(?::?(\d\d)(?::?(\d\d)(?:\.(\d+))?)?)?(Z|([+-])(\d\d):?(\d\d))?)?$/;return function(c,d,f){var g="",k=[],h,l;d=d||"mediumDate";d=a.DATETIME_FORMATS[d]||d;C(c)&&(c=jh.test(c)?fa(c):b(c));X(c)&&(c=new Date(c));if(!ha(c)||!isFinite(c.getTime()))return c;for(;d;)(l=kh.exec(d))?(k=db(k,l,1),d=k.pop()):(k.push(d),d=null);var m=c.getTimezoneOffset();f&&(m=fc(f,m),c=gc(c,f,!0));r(k,function(b){h=lh[b];g+=h?h(c,a.DATETIME_FORMATS, m):"''"===b?"'":b.replace(/(^'|'$)/g,"").replace(/''/g,"'")});return g}}function ch(){return function(a,b){A(b)&&(b=2);return eb(a,b)}}function dh(){return function(a,b,d){b=Infinity===Math.abs(Number(b))?Number(b):fa(b);if(Y(b))return a;X(a)&&(a=a.toString());if(!za(a))return a;d=!d||isNaN(d)?0:fa(d);d=0>d?Math.max(0,a.length+d):d;return 0<=b?Hc(a,d,d+b):0===d?Hc(a,b,a.length):Hc(a,Math.max(0,d+b),d)}}function Hc(a,b,d){return C(a)?a.slice(b,d):Ha.call(a,b,d)}function Vd(a){function b(b){return b.map(function(b){var c= 1,d=Ta;if(B(b))d=b;else if(C(b)){if("+"===b.charAt(0)||"-"===b.charAt(0))c="-"===b.charAt(0)?-1:1,b=b.substring(1);if(""!==b&&(d=a(b),d.constant))var e=d(),d=function(a){return a[e]}}return{get:d,descending:c}})}function d(a){switch(typeof a){case "number":case "boolean":case "string":return!0;default:return!1}}function c(a,b){var c=0,d=a.type,h=b.type;if(d===h){var h=a.value,l=b.value;"string"===d?(h=h.toLowerCase(),l=l.toLowerCase()):"object"===d&&(D(h)&&(h=a.index),D(l)&&(l=b.index));h!==l&&(c= hb||37<=b&&40>=b|| m(a,this,this.value)});if(e.hasEvent("paste"))b.on("paste cut drop",m)}b.on("change",l);if(ee[g]&&c.$$hasNativeValidators&&g===d.type)b.on("keydown wheel mousedown",function(a){if(!h){var b=this.validity,c=b.badInput,d=b.typeMismatch;h=f.defer(function(){h=null;b.badInput===c&&b.typeMismatch===d||l(a)})}});c.$render=function(){var a=c.$isEmpty(c.$viewValue)?"":c.$viewValue;b.val()!==a&&b.val(a)}}function Rb(a,b){return function(d,c){var e,f;if(ha(d))return d;if(C(d)){'"'===d.charAt(0)&&'"'===d.charAt(d.length- 1)&&(d=d.substring(1,d.length-1));if(mh.test(d))return new Date(d);a.lastIndex=0;if(e=a.exec(d))return e.shift(),f=c?{yyyy:c.getFullYear(),MM:c.getMonth()+1,dd:c.getDate(),HH:c.getHours(),mm:c.getMinutes(),ss:c.getSeconds(),sss:c.getMilliseconds()/1E3}:{yyyy:1970,MM:1,dd:1,HH:0,mm:0,ss:0,sss:0},r(e,function(a,c){cf.yyyy&&e.setFullYear(f.yyyy),e}return NaN}}function ob(a,b,d,c){return function(e,f,g,k,h,l,m, p){function n(a){return a&&!(a.getTime&&a.getTime()!==a.getTime())}function s(a){return w(a)&&!ha(a)?r(a)||void 0:a}function r(a,b){var c=k.$options.getOption("timezone");v&&v!==c&&(b=Uc(b,fc(v)));var e=d(a,b);!isNaN(e)&&c&&(e=gc(e,c));return e}Jc(e,f,g,k,a);Sa(e,f,g,k,h,l);var t="time"===a||"datetimelocal"===a,q,v;k.$parsers.push(function(c){if(k.$isEmpty(c))return null;if(b.test(c))return r(c,q);k.$$parserName=a});k.$formatters.push(function(a){if(a&&!ha(a))throw pb("datefmt",a);if(n(a)){q=a;var b= k.$options.getOption("timezone");b&&(v=b,q=gc(q,b,!0));var d=c;t&&C(k.$options.getOption("timeSecondsFormat"))&&(d=c.replace("ss.sss",k.$options.getOption("timeSecondsFormat")).replace(/:$/,""));a=m("date")(a,d,b);t&&k.$options.getOption("timeStripZeroSeconds")&&(a=a.replace(/(?::00)?(?:\.000)?$/,""));return a}v=q=null;return""});if(w(g.min)||g.ngMin){var x=g.min||p(g.ngMin)(e),z=s(x);k.$validators.min=function(a){return!n(a)||A(z)||d(a)>=z};g.$observe("min",function(a){a!==x&&(z=s(a),x=a,k.$validate())})}if(w(g.max)|| g.ngMax){var y=g.max||p(g.ngMax)(e),J=s(y);k.$validators.max=function(a){return!n(a)||A(J)||d(a)<=J};g.$observe("max",function(a){a!==y&&(J=s(a),y=a,k.$validate())})}}}function Jc(a,b,d,c,e){(c.$$hasNativeValidators=D(b[0].validity))&&c.$parsers.push(function(a){var d=b.prop("validity")||{};if(d.badInput||d.typeMismatch)c.$$parserName=e;else return a})}function fe(a){a.$parsers.push(function(b){if(a.$isEmpty(b))return null;if(nh.test(b))return parseFloat(b);a.$$parserName="number"});a.$formatters.push(function(b){if(!a.$isEmpty(b)){if(!X(b))throw pb("numfmt", b);b=b.toString()}return b})}function na(a){w(a)&&!X(a)&&(a=parseFloat(a));return Y(a)?void 0:a}function Kc(a){var b=a.toString(),d=b.indexOf(".");return-1===d?-1a&&(a=/e-(\d+)$/.exec(b))?Number(a[1]):0:b.length-d-1}function ge(a,b,d){a=Number(a);var c=(a|0)!==a,e=(b|0)!==b,f=(d|0)!==d;if(c||e||f){var g=c?Kc(a):0,k=e?Kc(b):0,h=f?Kc(d):0,g=Math.max(g,k,h),g=Math.pow(10,g);a*=g;b*=g;d*=g;c&&(a=Math.round(a));e&&(b=Math.round(b));f&&(d=Math.round(d))}return 0===(a-b)%d}function he(a,b,d,c,e){if(w(c)){a= a(c);if(!a.constant)throw pb("constexpr",d,c);return a(b)}return e}function Lc(a,b){function d(a,b){if(!a||!a.length)return[];if(!b||!b.length)return a;var c=[],d=0;a:for(;d(?:<\/\1>|)$/,nc=/<|&#?\w+;/,rg=/<([\w:-]+)/,sg=/<(?!area|br|col|embed|hr|img|input|link|meta|param)(([\w:-]+)[^>]*)\/>/gi,qa={thead:["table"],col:["colgroup","table"],tr:["tbody","table"],td:["tr", "tbody","table"]};qa.tbody=qa.tfoot=qa.colgroup=qa.caption=qa.thead;qa.th=qa.td;var hb={option:[1,'"],_default:[0,"",""]},Nc;for(Nc in qa){var le=qa[Nc],me=le.slice().reverse();hb[Nc]=[me.length,"<"+me.join("><")+">",""]}hb.optgroup=hb.option;var zg=z.Node.prototype.contains||function(a){return!!(this.compareDocumentPosition(a)&16)},Wa=U.prototype={ready:hd,toString:function(){var a=[];r(this,function(b){a.push(""+b)});return"["+a.join(", ")+ "]"},eq:function(a){return 0<=a?x(this[a]):x(this[this.length+a])},length:0,push:ph,sort:[].sort,splice:[].splice},Hb={};r("multiple selected checked disabled readOnly required open".split(" "),function(a){Hb[K(a)]=a});var od={};r("input select option textarea button form details".split(" "),function(a){od[a]=!0});var vd={ngMinlength:"minlength",ngMaxlength:"maxlength",ngMin:"min",ngMax:"max",ngPattern:"pattern",ngStep:"step"};r({data:sc,removeData:rc,hasData:function(a){for(var b in Ka[a.ng339])return!0; return!1},cleanData:function(a){for(var b=0,d=a.length;b/,Cg=/^[^(]*\(\s*([^)]*)\)/m,sh=/,/,th=/^\s*(_?)(\S+?)\1\s*$/,Ag=/((\/\/.*$)|(\/\*[\s\S]*?\*\/))/mg,Ca=F("$injector");fb.$$annotate=function(a,b,d){var c;if("function"===typeof a){if(!(c=a.$inject)){c=[];if(a.length){if(b)throw C(d)&&d||(d=a.name||Dg(a)),Ca("strictdi",d);b=qd(a);r(b[1].split(sh),function(a){a.replace(th,function(a,b,d){c.push(d)})})}a.$inject=c}}else H(a)?(b=a.length-1,tb(a[b],"fn"),c=a.slice(0,b)):tb(a,"fn",!0);return c};var ne=F("$animate"), Ef=function(){this.$get=E},Ff=function(){var a=new Ib,b=[];this.$get=["$$AnimateRunner","$rootScope",function(d,c){function e(a,b,c){var d=!1;b&&(b=C(b)?b.split(" "):H(b)?b:[],r(b,function(b){b&&(d=!0,a[b]=c)}));return d}function f(){r(b,function(b){var c=a.get(b);if(c){var d=Eg(b.attr("class")),e="",f="";r(c,function(a,b){a!==!!d[b]&&(a?e+=(e.length?" ":"")+b:f+=(f.length?" ":"")+b)});r(b,function(a){e&&Eb(a,e);f&&Db(a,f)});a.delete(b)}});b.length=0}return{enabled:E,on:E,off:E,pin:E,push:function(g, k,h,l){l&&l();h=h||{};h.from&&g.css(h.from);h.to&&g.css(h.to);if(h.addClass||h.removeClass)if(k=h.addClass,l=h.removeClass,h=a.get(g)||{},k=e(h,k,!0),l=e(h,l,!1),k||l)a.set(g,h),b.push(g),1===b.length&&c.$$postDigest(f);g=new d;g.complete();return g}}}]},Cf=["$provide",function(a){var b=this,d=null,c=null;this.$$registeredAnimations=Object.create(null);this.register=function(c,d){if(c&&"."!==c.charAt(0))throw ne("notcsel",c);var g=c+"-animation";b.$$registeredAnimations[c.substr(1)]=g;a.factory(g, d)};this.customFilter=function(a){1===arguments.length&&(c=B(a)?a:null);return c};this.classNameFilter=function(a){if(1===arguments.length&&(d=a instanceof RegExp?a:null)&&/[(\s|\/)]ng-animate[(\s|\/)]/.test(d.toString()))throw d=null,ne("nongcls","ng-animate");return d};this.$get=["$$animateQueue",function(a){function b(a,c,d){if(d){var e;a:{for(e=0;e <= >= && || ! = |".split(" "),function(a){Vb[a]= !0});var wh={n:"\n",f:"\f",r:"\r",t:"\t",v:"\v","'":"'",'"':'"'},Ob=function(a){this.options=a};Ob.prototype={constructor:Ob,lex:function(a){this.text=a;this.index=0;for(this.tokens=[];this.index=a&&"string"=== typeof a},isWhitespace:function(a){return" "===a||"\r"===a||"\t"===a||"\n"===a||"\v"===a||"\u00a0"===a},isIdentifierStart:function(a){return this.options.isIdentifierStart?this.options.isIdentifierStart(a,this.codePointAt(a)):this.isValidIdentifierStart(a)},isValidIdentifierStart:function(a){return"a"<=a&&"z">=a||"A"<=a&&"Z">=a||"_"===a||"$"===a},isIdentifierContinue:function(a){return this.options.isIdentifierContinue?this.options.isIdentifierContinue(a,this.codePointAt(a)):this.isValidIdentifierContinue(a)}, isValidIdentifierContinue:function(a,b){return this.isValidIdentifierStart(a,b)||this.isNumber(a)},codePointAt:function(a){return 1===a.length?a.charCodeAt(0):(a.charCodeAt(0)<<10)+a.charCodeAt(1)-56613888},peekMultichar:function(){var a=this.text.charAt(this.index),b=this.peek();if(!b)return a;var d=a.charCodeAt(0),c=b.charCodeAt(0);return 55296<=d&&56319>=d&&56320<=c&&57343>=c?a+b:a},isExpOperator:function(a){return"-"===a||"+"===a||this.isNumber(a)},throwError:function(a,b,d){d=d||this.index;b= w(b)?"s "+b+"-"+this.index+" ["+this.text.substring(b,d)+"]":" "+d;throw Ya("lexerr",a,b,this.text);},readNumber:function(){for(var a="",b=this.index;this.index","<=",">=");)a={type:q.BinaryExpression,operator:b.text, left:a,right:this.additive()};return a},additive:function(){for(var a=this.multiplicative(),b;b=this.expect("+","-");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.multiplicative()};return a},multiplicative:function(){for(var a=this.unary(),b;b=this.expect("*","/","%");)a={type:q.BinaryExpression,operator:b.text,left:a,right:this.unary()};return a},unary:function(){var a;return(a=this.expect("+","-","!"))?{type:q.UnaryExpression,operator:a.text,prefix:!0,argument:this.unary()}:this.primary()}, primary:function(){var a;this.expect("(")?(a=this.filterChain(),this.consume(")")):this.expect("[")?a=this.arrayDeclaration():this.expect("{")?a=this.object():this.selfReferential.hasOwnProperty(this.peek().text)?a=Ia(this.selfReferential[this.consume().text]):this.options.literals.hasOwnProperty(this.peek().text)?a={type:q.Literal,value:this.options.literals[this.consume().text]}:this.peek().identifier?a=this.identifier():this.peek().constant?a=this.constant():this.throwError("not a primary expression", this.peek());for(var b;b=this.expect("(","[",".");)"("===b.text?(a={type:q.CallExpression,callee:a,arguments:this.parseArguments()},this.consume(")")):"["===b.text?(a={type:q.MemberExpression,object:a,property:this.expression(),computed:!0},this.consume("]")):"."===b.text?a={type:q.MemberExpression,object:a,property:this.identifier(),computed:!1}:this.throwError("IMPOSSIBLE");return a},filter:function(a){a=[a];for(var b={type:q.CallExpression,callee:this.identifier(),arguments:a,filter:!0};this.expect(":");)a.push(this.expression()); return b},parseArguments:function(){var a=[];if(")"!==this.peekToken().text){do a.push(this.filterChain());while(this.expect(","))}return a},identifier:function(){var a=this.consume();a.identifier||this.throwError("is not a valid identifier",a);return{type:q.Identifier,name:a.text}},constant:function(){return{type:q.Literal,value:this.consume().value}},arrayDeclaration:function(){var a=[];if("]"!==this.peekToken().text){do{if(this.peek("]"))break;a.push(this.expression())}while(this.expect(","))}this.consume("]"); return{type:q.ArrayExpression,elements:a}},object:function(){var a=[],b;if("}"!==this.peekToken().text){do{if(this.peek("}"))break;b={type:q.Property,kind:"init"};this.peek().constant?(b.key=this.constant(),b.computed=!1,this.consume(":"),b.value=this.expression()):this.peek().identifier?(b.key=this.identifier(),b.computed=!1,this.peek(":")?(this.consume(":"),b.value=this.expression()):b.value=b.key):this.peek("[")?(this.consume("["),b.key=this.expression(),this.consume("]"),b.computed=!0,this.consume(":"), b.value=this.expression()):this.throwError("invalid key",this.peek());a.push(b)}while(this.expect(","))}this.consume("}");return{type:q.ObjectExpression,properties:a}},throwError:function(a,b){throw Ya("syntax",b.text,a,b.index+1,this.text,this.text.substring(b.index));},consume:function(a){if(0===this.tokens.length)throw Ya("ueoe",this.text);var b=this.expect(a);b||this.throwError("is unexpected, expecting ["+a+"]",this.peek());return b},peekToken:function(){if(0===this.tokens.length)throw Ya("ueoe", this.text);return this.tokens[0]},peek:function(a,b,d,c){return this.peekAhead(0,a,b,d,c)},peekAhead:function(a,b,d,c,e){if(this.tokens.length>a){a=this.tokens[a];var f=a.text;if(f===b||f===d||f===c||f===e||!(b||d||c||e))return a}return!1},expect:function(a,b,d,c){return(a=this.peek(a,b,d,c))?(this.tokens.shift(),a):!1},selfReferential:{"this":{type:q.ThisExpression},$locals:{type:q.LocalsExpression}}};var Hd=2;Ld.prototype={compile:function(a){var b=this;this.state={nextId:0,filters:{},fn:{vars:[], body:[],own:{}},assign:{vars:[],body:[],own:{}},inputs:[]};Z(a,b.$filter);var d="",c;this.stage="assign";if(c=Kd(a))this.state.computing="assign",d=this.nextId(),this.recurse(c,d),this.return_(d),d="fn.assign="+this.generateFunction("assign","s,v,l");c=Id(a.body);b.stage="inputs";r(c,function(a,c){var d="fn"+c;b.state[d]={vars:[],body:[],own:{}};b.state.computing=d;var k=b.nextId();b.recurse(a,k);b.return_(k);b.state.inputs.push({name:d,isPure:a.isPure});a.watchId=c});this.state.computing="fn";this.stage= "main";this.recurse(a);a='"'+this.USE+" "+this.STRICT+'";\n'+this.filterPrefix()+"var fn="+this.generateFunction("fn","s,l,a,i")+d+this.watchFns()+"return fn;";a=(new Function("$filter","getStringValue","ifDefined","plus",a))(this.$filter,Tg,Ug,Gd);this.state=this.stage=void 0;return a},USE:"use",STRICT:"strict",watchFns:function(){var a=[],b=this.state.inputs,d=this;r(b,function(b){a.push("var "+b.name+"="+d.generateFunction(b.name,"s"));b.isPure&&a.push(b.name,".isPure="+JSON.stringify(b.isPure)+ ";")});b.length&&a.push("fn.inputs=["+b.map(function(a){return a.name}).join(",")+"];");return a.join("")},generateFunction:function(a,b){return"function("+b+"){"+this.varsPrefix(a)+this.body(a)+"};"},filterPrefix:function(){var a=[],b=this;r(this.state.filters,function(d,c){a.push(d+"=$filter("+b.escape(c)+")")});return a.length?"var "+a.join(",")+";":""},varsPrefix:function(a){return this.state[a].vars.length?"var "+this.state[a].vars.join(",")+";":""},body:function(a){return this.state[a].body.join("")}, recurse:function(a,b,d,c,e,f){var g,k,h=this,l,m,p;c=c||E;if(!f&&w(a.watchId))b=b||this.nextId(),this.if_("i",this.lazyAssign(b,this.computedMember("i",a.watchId)),this.lazyRecurse(a,b,d,c,e,!0));else switch(a.type){case q.Program:r(a.body,function(b,c){h.recurse(b.expression,void 0,void 0,function(a){k=a});c!==a.body.length-1?h.current().body.push(k,";"):h.return_(k)});break;case q.Literal:m=this.escape(a.value);this.assign(b,m);c(b||m);break;case q.UnaryExpression:this.recurse(a.argument,void 0, void 0,function(a){k=a});m=a.operator+"("+this.ifDefined(k,0)+")";this.assign(b,m);c(m);break;case q.BinaryExpression:this.recurse(a.left,void 0,void 0,function(a){g=a});this.recurse(a.right,void 0,void 0,function(a){k=a});m="+"===a.operator?this.plus(g,k):"-"===a.operator?this.ifDefined(g,0)+a.operator+this.ifDefined(k,0):"("+g+")"+a.operator+"("+k+")";this.assign(b,m);c(m);break;case q.LogicalExpression:b=b||this.nextId();h.recurse(a.left,b);h.if_("&&"===a.operator?b:h.not(b),h.lazyRecurse(a.right, b));c(b);break;case q.ConditionalExpression:b=b||this.nextId();h.recurse(a.test,b);h.if_(b,h.lazyRecurse(a.alternate,b),h.lazyRecurse(a.consequent,b));c(b);break;case q.Identifier:b=b||this.nextId();d&&(d.context="inputs"===h.stage?"s":this.assign(this.nextId(),this.getHasOwnProperty("l",a.name)+"?l:s"),d.computed=!1,d.name=a.name);h.if_("inputs"===h.stage||h.not(h.getHasOwnProperty("l",a.name)),function(){h.if_("inputs"===h.stage||"s",function(){e&&1!==e&&h.if_(h.isNull(h.nonComputedMember("s",a.name)), h.lazyAssign(h.nonComputedMember("s",a.name),"{}"));h.assign(b,h.nonComputedMember("s",a.name))})},b&&h.lazyAssign(b,h.nonComputedMember("l",a.name)));c(b);break;case q.MemberExpression:g=d&&(d.context=this.nextId())||this.nextId();b=b||this.nextId();h.recurse(a.object,g,void 0,function(){h.if_(h.notNull(g),function(){a.computed?(k=h.nextId(),h.recurse(a.property,k),h.getStringValue(k),e&&1!==e&&h.if_(h.not(h.computedMember(g,k)),h.lazyAssign(h.computedMember(g,k),"{}")),m=h.computedMember(g,k),h.assign(b, m),d&&(d.computed=!0,d.name=k)):(e&&1!==e&&h.if_(h.isNull(h.nonComputedMember(g,a.property.name)),h.lazyAssign(h.nonComputedMember(g,a.property.name),"{}")),m=h.nonComputedMember(g,a.property.name),h.assign(b,m),d&&(d.computed=!1,d.name=a.property.name))},function(){h.assign(b,"undefined")});c(b)},!!e);break;case q.CallExpression:b=b||this.nextId();a.filter?(k=h.filter(a.callee.name),l=[],r(a.arguments,function(a){var b=h.nextId();h.recurse(a,b);l.push(b)}),m=k+"("+l.join(",")+")",h.assign(b,m),c(b)): (k=h.nextId(),g={},l=[],h.recurse(a.callee,k,g,function(){h.if_(h.notNull(k),function(){r(a.arguments,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m=g.name?h.member(g.context,g.name,g.computed)+"("+l.join(",")+")":k+"("+l.join(",")+")";h.assign(b,m)},function(){h.assign(b,"undefined")});c(b)}));break;case q.AssignmentExpression:k=this.nextId();g={};this.recurse(a.left,void 0,g,function(){h.if_(h.notNull(g.context),function(){h.recurse(a.right,k);m=h.member(g.context, g.name,g.computed)+a.operator+k;h.assign(b,m);c(b||m)})},1);break;case q.ArrayExpression:l=[];r(a.elements,function(b){h.recurse(b,a.constant?void 0:h.nextId(),void 0,function(a){l.push(a)})});m="["+l.join(",")+"]";this.assign(b,m);c(b||m);break;case q.ObjectExpression:l=[];p=!1;r(a.properties,function(a){a.computed&&(p=!0)});p?(b=b||this.nextId(),this.assign(b,"{}"),r(a.properties,function(a){a.computed?(g=h.nextId(),h.recurse(a.key,g)):g=a.key.type===q.Identifier?a.key.name:""+a.key.value;k=h.nextId(); h.recurse(a.value,k);h.assign(h.member(b,g,a.computed),k)})):(r(a.properties,function(b){h.recurse(b.value,a.constant?void 0:h.nextId(),void 0,function(a){l.push(h.escape(b.key.type===q.Identifier?b.key.name:""+b.key.value)+":"+a)})}),m="{"+l.join(",")+"}",this.assign(b,m));c(b||m);break;case q.ThisExpression:this.assign(b,"s");c(b||"s");break;case q.LocalsExpression:this.assign(b,"l");c(b||"l");break;case q.NGValueParameter:this.assign(b,"v"),c(b||"v")}},getHasOwnProperty:function(a,b){var d=a+"."+ b,c=this.current().own;c.hasOwnProperty(d)||(c[d]=this.nextId(!1,a+"&&("+this.escape(b)+" in "+a+")"));return c[d]},assign:function(a,b){if(a)return this.current().body.push(a,"=",b,";"),a},filter:function(a){this.state.filters.hasOwnProperty(a)||(this.state.filters[a]=this.nextId(!0));return this.state.filters[a]},ifDefined:function(a,b){return"ifDefined("+a+","+this.escape(b)+")"},plus:function(a,b){return"plus("+a+","+b+")"},return_:function(a){this.current().body.push("return ",a,";")},if_:function(a, b,d){if(!0===a)b();else{var c=this.current().body;c.push("if(",a,"){");b();c.push("}");d&&(c.push("else{"),d(),c.push("}"))}},not:function(a){return"!("+a+")"},isNull:function(a){return a+"==null"},notNull:function(a){return a+"!=null"},nonComputedMember:function(a,b){var d=/[^$_a-zA-Z0-9]/g;return/^[$_a-zA-Z][$_a-zA-Z0-9]*$/.test(b)?a+"."+b:a+'["'+b.replace(d,this.stringEscapeFn)+'"]'},computedMember:function(a,b){return a+"["+b+"]"},member:function(a,b,d){return d?this.computedMember(a,b):this.nonComputedMember(a, b)},getStringValue:function(a){this.assign(a,"getStringValue("+a+")")},lazyRecurse:function(a,b,d,c,e,f){var g=this;return function(){g.recurse(a,b,d,c,e,f)}},lazyAssign:function(a,b){var d=this;return function(){d.assign(a,b)}},stringEscapeRegex:/[^ a-zA-Z0-9]/g,stringEscapeFn:function(a){return"\\u"+("0000"+a.charCodeAt(0).toString(16)).slice(-4)},escape:function(a){if(C(a))return"'"+a.replace(this.stringEscapeRegex,this.stringEscapeFn)+"'";if(X(a))return a.toString();if(!0===a)return"true";if(!1=== a)return"false";if(null===a)return"null";if("undefined"===typeof a)return"undefined";throw Ya("esc");},nextId:function(a,b){var d="v"+this.state.nextId++;a||this.current().vars.push(d+(b?"="+b:""));return d},current:function(){return this.state[this.state.computing]}};Md.prototype={compile:function(a){var b=this;Z(a,b.$filter);var d,c;if(d=Kd(a))c=this.recurse(d);d=Id(a.body);var e;d&&(e=[],r(d,function(a,c){var d=b.recurse(a);d.isPure=a.isPure;a.input=d;e.push(d);a.watchId=c}));var f=[];r(a.body, function(a){f.push(b.recurse(a.expression))});a=0===a.body.length?E:1===a.body.length?f[0]:function(a,b){var c;r(f,function(d){c=d(a,b)});return c};c&&(a.assign=function(a,b,d){return c(a,d,b)});e&&(a.inputs=e);return a},recurse:function(a,b,d){var c,e,f=this,g;if(a.input)return this.inputs(a.input,a.watchId);switch(a.type){case q.Literal:return this.value(a.value,b);case q.UnaryExpression:return e=this.recurse(a.argument),this["unary"+a.operator](e,b);case q.BinaryExpression:return c=this.recurse(a.left), e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.LogicalExpression:return c=this.recurse(a.left),e=this.recurse(a.right),this["binary"+a.operator](c,e,b);case q.ConditionalExpression:return this["ternary?:"](this.recurse(a.test),this.recurse(a.alternate),this.recurse(a.consequent),b);case q.Identifier:return f.identifier(a.name,b,d);case q.MemberExpression:return c=this.recurse(a.object,!1,!!d),a.computed||(e=a.property.name),a.computed&&(e=this.recurse(a.property)),a.computed?this.computedMember(c, e,b,d):this.nonComputedMember(c,e,b,d);case q.CallExpression:return g=[],r(a.arguments,function(a){g.push(f.recurse(a))}),a.filter&&(e=this.$filter(a.callee.name)),a.filter||(e=this.recurse(a.callee,!0)),a.filter?function(a,c,d,f){for(var p=[],n=0;n":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)>b(c,e,f,g);return d?{value:c}:c}},"binary<=":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)<=b(c,e,f,g);return d?{value:c}:c}},"binary>=":function(a,b,d){return function(c,e,f,g){c= a(c,e,f,g)>=b(c,e,f,g);return d?{value:c}:c}},"binary&&":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)&&b(c,e,f,g);return d?{value:c}:c}},"binary||":function(a,b,d){return function(c,e,f,g){c=a(c,e,f,g)||b(c,e,f,g);return d?{value:c}:c}},"ternary?:":function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k)?b(e,f,g,k):d(e,f,g,k);return c?{value:e}:e}},value:function(a,b){return function(){return b?{context:void 0,name:void 0,value:a}:a}},identifier:function(a,b,d){return function(c,e,f,g){c= e&&a in e?e:c;d&&1!==d&&c&&null==c[a]&&(c[a]={});e=c?c[a]:void 0;return b?{context:c,name:a,value:e}:e}},computedMember:function(a,b,d,c){return function(e,f,g,k){var h=a(e,f,g,k),l,m;null!=h&&(l=b(e,f,g,k),l+="",c&&1!==c&&h&&!h[l]&&(h[l]={}),m=h[l]);return d?{context:h,name:l,value:m}:m}},nonComputedMember:function(a,b,d,c){return function(e,f,g,k){e=a(e,f,g,k);c&&1!==c&&e&&null==e[b]&&(e[b]={});f=null!=e?e[b]:void 0;return d?{context:e,name:b,value:f}:f}},inputs:function(a,b){return function(d, c,e,f){return f?f[b]:a(d,c,e)}}};Nb.prototype={constructor:Nb,parse:function(a){a=this.getAst(a);var b=this.astCompiler.compile(a.ast),d=a.ast;b.literal=0===d.body.length||1===d.body.length&&(d.body[0].expression.type===q.Literal||d.body[0].expression.type===q.ArrayExpression||d.body[0].expression.type===q.ObjectExpression);b.constant=a.ast.constant;b.oneTime=a.oneTime;return b},getAst:function(a){var b=!1;a=a.trim();":"===a.charAt(0)&&":"===a.charAt(1)&&(b=!0,a=a.substring(2));return{ast:this.ast.ast(a), oneTime:b}}};var Ea=F("$sce"),W={HTML:"html",CSS:"css",MEDIA_URL:"mediaUrl",URL:"url",RESOURCE_URL:"resourceUrl",JS:"js"},Dc=/_([a-z])/g,Zg=F("$templateRequest"),$g=F("$timeout"),aa=z.document.createElement("a"),Qd=ga(z.location.href),Na;aa.href="http://[::1]";var ah="[::1]"===aa.hostname;Rd.$inject=["$document"];fd.$inject=["$provide"];var Yd=22,Xd=".",Fc="0";Sd.$inject=["$locale"];Ud.$inject=["$locale"];var lh={yyyy:ea("FullYear",4,0,!1,!0),yy:ea("FullYear",2,0,!0,!0),y:ea("FullYear",1,0,!1,!0), MMMM:lb("Month"),MMM:lb("Month",!0),MM:ea("Month",2,1),M:ea("Month",1,1),LLLL:lb("Month",!1,!0),dd:ea("Date",2),d:ea("Date",1),HH:ea("Hours",2),H:ea("Hours",1),hh:ea("Hours",2,-12),h:ea("Hours",1,-12),mm:ea("Minutes",2),m:ea("Minutes",1),ss:ea("Seconds",2),s:ea("Seconds",1),sss:ea("Milliseconds",3),EEEE:lb("Day"),EEE:lb("Day",!0),a:function(a,b){return 12>a.getHours()?b.AMPMS[0]:b.AMPMS[1]},Z:function(a,b,d){a=-1*d;return a=(0<=a?"+":"")+(Pb(Math[0=a.getFullYear()?b.ERANAMES[0]:b.ERANAMES[1]}},kh=/((?:[^yMLdHhmsaZEwG']+)|(?:'(?:[^']|'')*')|(?:E+|y+|M+|L+|d+|H+|h+|m+|s+|a|Z|G+|w+))([\s\S]*)/,jh=/^-?\d+$/;Td.$inject=["$locale"];var eh=ia(K),fh=ia(vb);Vd.$inject=["$parse"];var Re=ia({restrict:"E",compile:function(a,b){if(!b.href&&!b.xlinkHref)return function(a,b){if("a"===b[0].nodeName.toLowerCase()){var e="[object SVGAnimatedString]"===la.call(b.prop("href"))?"xlink:href":"href"; b.on("click",function(a){b.attr(e)||a.preventDefault()})}}}}),wb={};r(Hb,function(a,b){function d(a,d,e){a.$watch(e[c],function(a){e.$set(b,!!a)})}if("multiple"!==a){var c=xa("ng-"+b),e=d;"checked"===a&&(e=function(a,b,e){e.ngModel!==e[c]&&d(a,b,e)});wb[c]=function(){return{restrict:"A",priority:100,link:e}}}});r(vd,function(a,b){wb[b]=function(){return{priority:100,link:function(a,c,e){if("ngPattern"===b&&"/"===e.ngPattern.charAt(0)&&(c=e.ngPattern.match(ke))){e.$set("ngPattern",new RegExp(c[1], c[2]));return}a.$watch(e[b],function(a){e.$set(b,a)})}}}});r(["src","srcset","href"],function(a){var b=xa("ng-"+a);wb[b]=["$sce",function(d){return{priority:99,link:function(c,e,f){var g=a,k=a;"href"===a&&"[object SVGAnimatedString]"===la.call(e.prop("href"))&&(k="xlinkHref",f.$attr[k]="xlink:href",g=null);f.$set(b,d.getTrustedMediaUrl(f[b]));f.$observe(b,function(b){b?(f.$set(k,b),wa&&g&&e.prop(g,f[k])):"href"===a&&f.$set(k,null)})}}}]});var mb={$addControl:E,$getControls:ia([]),$$renameControl:function(a, b){a.$name=b},$removeControl:E,$setValidity:E,$setDirty:E,$setPristine:E,$setSubmitted:E,$$setSubmitted:E};Qb.$inject=["$element","$attrs","$scope","$animate","$interpolate"];Qb.prototype={$rollbackViewValue:function(){r(this.$$controls,function(a){a.$rollbackViewValue()})},$commitViewValue:function(){r(this.$$controls,function(a){a.$commitViewValue()})},$addControl:function(a){Ja(a.$name,"input");this.$$controls.push(a);a.$name&&(this[a.$name]=a);a.$$parentForm=this},$getControls:function(){return ja(this.$$controls)}, $$renameControl:function(a,b){var d=a.$name;this[d]===a&&delete this[d];this[b]=a;a.$name=b},$removeControl:function(a){a.$name&&this[a.$name]===a&&delete this[a.$name];r(this.$pending,function(b,d){this.$setValidity(d,null,a)},this);r(this.$error,function(b,d){this.$setValidity(d,null,a)},this);r(this.$$success,function(b,d){this.$setValidity(d,null,a)},this);cb(this.$$controls,a);a.$$parentForm=mb},$setDirty:function(){this.$$animate.removeClass(this.$$element,Za);this.$$animate.addClass(this.$$element, Wb);this.$dirty=!0;this.$pristine=!1;this.$$parentForm.$setDirty()},$setPristine:function(){this.$$animate.setClass(this.$$element,Za,Wb+" ng-submitted");this.$dirty=!1;this.$pristine=!0;this.$submitted=!1;r(this.$$controls,function(a){a.$setPristine()})},$setUntouched:function(){r(this.$$controls,function(a){a.$setUntouched()})},$setSubmitted:function(){for(var a=this;a.$$parentForm&&a.$$parentForm!==mb;)a=a.$$parentForm;a.$$setSubmitted()},$$setSubmitted:function(){this.$$animate.addClass(this.$$element, "ng-submitted");this.$submitted=!0;r(this.$$controls,function(a){a.$$setSubmitted&&a.$$setSubmitted()})}};ce({clazz:Qb,set:function(a,b,d){var c=a[b];c?-1===c.indexOf(d)&&c.push(d):a[b]=[d]},unset:function(a,b,d){var c=a[b];c&&(cb(c,d),0===c.length&&delete a[b])}});var oe=function(a){return["$timeout","$parse",function(b,d){function c(a){return""===a?d('this[""]').assign:d(a).assign||E}return{name:"form",restrict:a?"EAC":"E",require:["form","^^?form"],controller:Qb,compile:function(d,f){d.addClass(Za).addClass(nb); var g=f.name?"name":a&&f.ngForm?"ngForm":!1;return{pre:function(a,d,e,f){var p=f[0];if(!("action"in e)){var n=function(b){a.$apply(function(){p.$commitViewValue();p.$setSubmitted()});b.preventDefault()};d[0].addEventListener("submit",n);d.on("$destroy",function(){b(function(){d[0].removeEventListener("submit",n)},0,!1)})}(f[1]||p.$$parentForm).$addControl(p);var s=g?c(p.$name):E;g&&(s(a,p),e.$observe(g,function(b){p.$name!==b&&(s(a,void 0),p.$$parentForm.$$renameControl(p,b),s=c(p.$name),s(a,p))})); d.on("$destroy",function(){p.$$parentForm.$removeControl(p);s(a,void 0);S(p,mb)})}}}}}]},Se=oe(),df=oe(!0),mh=/^\d{4,}-[01]\d-[0-3]\dT[0-2]\d:[0-5]\d:[0-5]\d\.\d+(?:[+-][0-2]\d:[0-5]\d|Z)$/,xh=/^[a-z][a-z\d.+-]*:\/*(?:[^:@]+(?::[^@]+)?@)?(?:[^\s:/?#]+|\[[a-f\d:]+])(?::\d+)?(?:\/[^?#]*)?(?:\?[^#]*)?(?:#.*)?$/i,yh=/^(?=.{1,254}$)(?=.{1,64}@)[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+(\.[-!#$%&'*+/0-9=?A-Z^_`a-z{|}~]+)*@[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?(\.[A-Za-z0-9]([A-Za-z0-9-]{0,61}[A-Za-z0-9])?)*$/, nh=/^\s*(-|\+)?(\d+|(\d*(\.\d*)))([eE][+-]?\d+)?\s*$/,pe=/^(\d{4,})-(\d{2})-(\d{2})$/,qe=/^(\d{4,})-(\d\d)-(\d\d)T(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,Oc=/^(\d{4,})-W(\d\d)$/,re=/^(\d{4,})-(\d\d)$/,se=/^(\d\d):(\d\d)(?::(\d\d)(\.\d{1,3})?)?$/,ee=T();r(["date","datetime-local","month","time","week"],function(a){ee[a]=!0});var te={text:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c)},date:ob("date",pe,Rb(pe,["yyyy","MM","dd"]),"yyyy-MM-dd"),"datetime-local":ob("datetimelocal",qe,Rb(qe,"yyyy MM dd HH mm ss sss".split(" ")), "yyyy-MM-ddTHH:mm:ss.sss"),time:ob("time",se,Rb(se,["HH","mm","ss","sss"]),"HH:mm:ss.sss"),week:ob("week",Oc,function(a,b){if(ha(a))return a;if(C(a)){Oc.lastIndex=0;var d=Oc.exec(a);if(d){var c=+d[1],e=+d[2],f=d=0,g=0,k=0,h=Zd(c),e=7*(e-1);b&&(d=b.getHours(),f=b.getMinutes(),g=b.getSeconds(),k=b.getMilliseconds());return new Date(c,0,h.getDate()+e,d,f,g,k)}}return NaN},"yyyy-Www"),month:ob("month",re,Rb(re,["yyyy","MM"]),"yyyy-MM"),number:function(a,b,d,c,e,f,g,k){Jc(a,b,d,c,"number");fe(c);Sa(a, b,d,c,e,f);var h;if(w(d.min)||d.ngMin){var l=d.min||k(d.ngMin)(a);h=na(l);c.$validators.min=function(a,b){return c.$isEmpty(b)||A(h)||b>=h};d.$observe("min",function(a){a!==l&&(h=na(a),l=a,c.$validate())})}if(w(d.max)||d.ngMax){var m=d.max||k(d.ngMax)(a),p=na(m);c.$validators.max=function(a,b){return c.$isEmpty(b)||A(p)||b<=p};d.$observe("max",function(a){a!==m&&(p=na(a),m=a,c.$validate())})}if(w(d.step)||d.ngStep){var n=d.step||k(d.ngStep)(a),s=na(n);c.$validators.step=function(a,b){return c.$isEmpty(b)|| A(s)||ge(b,h||0,s)};d.$observe("step",function(a){a!==n&&(s=na(a),n=a,c.$validate())})}},url:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.url=function(a,b){var d=a||b;return c.$isEmpty(d)||xh.test(d)}},email:function(a,b,d,c,e,f){Sa(a,b,d,c,e,f);Ic(c);c.$validators.email=function(a,b){var d=a||b;return c.$isEmpty(d)||yh.test(d)}},radio:function(a,b,d,c){var e=!d.ngTrim||"false"!==V(d.ngTrim);A(d.name)&&b.attr("name",++qb);b.on("change",function(a){var g;b[0].checked&&(g=d.value,e&&(g= V(g)),c.$setViewValue(g,a&&a.type))});c.$render=function(){var a=d.value;e&&(a=V(a));b[0].checked=a===c.$viewValue};d.$observe("value",c.$render)},range:function(a,b,d,c,e,f){function g(a,c){b.attr(a,d[a]);var e=d[a];d.$observe(a,function(a){a!==e&&(e=a,c(a))})}function k(a){p=na(a);Y(c.$modelValue)||(m?(a=b.val(),p>a&&(a=p,b.val(a)),c.$setViewValue(a)):c.$validate())}function h(a){n=na(a);Y(c.$modelValue)||(m?(a=b.val(),n=p},g("min",k)); e&&(n=na(d.max),c.$validators.max=m?function(){return!0}:function(a,b){return c.$isEmpty(b)||A(n)||b<=n},g("max",h));f&&(s=na(d.step),c.$validators.step=m?function(){return!r.stepMismatch}:function(a,b){return c.$isEmpty(b)||A(s)||ge(b,p||0,s)},g("step",l))},checkbox:function(a,b,d,c,e,f,g,k){var h=he(k,a,"ngTrueValue",d.ngTrueValue,!0),l=he(k,a,"ngFalseValue",d.ngFalseValue,!1);b.on("change",function(a){c.$setViewValue(b[0].checked,a&&a.type)});c.$render=function(){b[0].checked=c.$viewValue};c.$isEmpty= function(a){return!1===a};c.$formatters.push(function(a){return va(a,h)});c.$parsers.push(function(a){return a?h:l})},hidden:E,button:E,submit:E,reset:E,file:E},$c=["$browser","$sniffer","$filter","$parse",function(a,b,d,c){return{restrict:"E",require:["?ngModel"],link:{pre:function(e,f,g,k){k[0]&&(te[K(g.type)]||te.text)(e,f,g,k[0],b,a,d,c)}}}}],Af=function(){var a={configurable:!0,enumerable:!1,get:function(){return this.getAttribute("value")||""},set:function(a){this.setAttribute("value",a)}}; return{restrict:"E",priority:200,compile:function(b,d){if("hidden"===K(d.type))return{pre:function(b,d,f,g){b=d[0];b.parentNode&&b.parentNode.insertBefore(b,b.nextSibling);Object.defineProperty&&Object.defineProperty(b,"value",a)}}}}},zh=/^(true|false|\d+)$/,xf=function(){function a(a,d,c){var e=w(c)?c:9===wa?"":null;a.prop("value",e);d.$set("value",c)}return{restrict:"A",priority:100,compile:function(b,d){return zh.test(d.ngValue)?function(b,d,f){b=b.$eval(f.ngValue);a(d,f,b)}:function(b,d,f){b.$watch(f.ngValue, function(b){a(d,f,b)})}}}},We=["$compile",function(a){return{restrict:"AC",compile:function(b){a.$$addBindingClass(b);return function(b,c,e){a.$$addBindingInfo(c,e.ngBind);c=c[0];b.$watch(e.ngBind,function(a){c.textContent=jc(a)})}}}}],Ye=["$interpolate","$compile",function(a,b){return{compile:function(d){b.$$addBindingClass(d);return function(c,d,f){c=a(d.attr(f.$attr.ngBindTemplate));b.$$addBindingInfo(d,c.expressions);d=d[0];f.$observe("ngBindTemplate",function(a){d.textContent=A(a)?"":a})}}}}], Xe=["$sce","$parse","$compile",function(a,b,d){return{restrict:"A",compile:function(c,e){var f=b(e.ngBindHtml),g=b(e.ngBindHtml,function(b){return a.valueOf(b)});d.$$addBindingClass(c);return function(b,c,e){d.$$addBindingInfo(c,e.ngBindHtml);b.$watch(g,function(){var d=f(b);c.html(a.getTrustedHtml(d)||"")})}}}}],wf=ia({restrict:"A",require:"ngModel",link:function(a,b,d,c){c.$viewChangeListeners.push(function(){a.$eval(d.ngChange)})}}),Ze=Lc("",!0),af=Lc("Odd",0),$e=Lc("Even",1),bf=Ra({compile:function(a, b){b.$set("ngCloak",void 0);a.removeClass("ng-cloak")}}),cf=[function(){return{restrict:"A",scope:!0,controller:"@",priority:500}}],ed={},Ah={blur:!0,focus:!0};r("click dblclick mousedown mouseup mouseover mouseout mousemove mouseenter mouseleave keydown keyup keypress submit focus blur copy cut paste".split(" "),function(a){var b=xa("ng-"+a);ed[b]=["$parse","$rootScope","$exceptionHandler",function(d,c,e){return sd(d,c,e,b,a,Ah[a])}]});var ff=["$animate","$compile",function(a,b){return{multiElement:!0, transclude:"element",priority:600,terminal:!0,restrict:"A",$$tlb:!0,link:function(d,c,e,f,g){var k,h,l;d.$watch(e.ngIf,function(d){d?h||g(function(d,f){h=f;d[d.length++]=b.$$createComment("end ngIf",e.ngIf);k={clone:d};a.enter(d,c.parent(),c)}):(l&&(l.remove(),l=null),h&&(h.$destroy(),h=null),k&&(l=ub(k.clone),a.leave(l).done(function(a){!1!==a&&(l=null)}),k=null))})}}}],gf=["$templateRequest","$anchorScroll","$animate",function(a,b,d){return{restrict:"ECA",priority:400,terminal:!0,transclude:"element", controller:ca.noop,compile:function(c,e){var f=e.ngInclude||e.src,g=e.onload||"",k=e.autoscroll;return function(c,e,m,p,n){var r=0,q,t,x,v=function(){t&&(t.remove(),t=null);q&&(q.$destroy(),q=null);x&&(d.leave(x).done(function(a){!1!==a&&(t=null)}),t=x,x=null)};c.$watch(f,function(f){var m=function(a){!1===a||!w(k)||k&&!c.$eval(k)||b()},t=++r;f?(a(f,!0).then(function(a){if(!c.$$destroyed&&t===r){var b=c.$new();p.template=a;a=n(b,function(a){v();d.enter(a,null,e).done(m)});q=b;x=a;q.$emit("$includeContentLoaded", f);c.$eval(g)}},function(){c.$$destroyed||t!==r||(v(),c.$emit("$includeContentError",f))}),c.$emit("$includeContentRequested",f)):(v(),p.template=null)})}}}}],zf=["$compile",function(a){return{restrict:"ECA",priority:-400,require:"ngInclude",link:function(b,d,c,e){la.call(d[0]).match(/SVG/)?(d.empty(),a(gd(e.template,z.document).childNodes)(b,function(a){d.append(a)},{futureParentElement:d})):(d.html(e.template),a(d.contents())(b))}}}],hf=Ra({priority:450,compile:function(){return{pre:function(a, b,d){a.$eval(d.ngInit)}}}}),vf=function(){return{restrict:"A",priority:100,require:"ngModel",link:function(a,b,d,c){var e=d.ngList||", ",f="false"!==d.ngTrim,g=f?V(e):e;c.$parsers.push(function(a){if(!A(a)){var b=[];a&&r(a.split(g),function(a){a&&b.push(f?V(a):a)});return b}});c.$formatters.push(function(a){if(H(a))return a.join(e)});c.$isEmpty=function(a){return!a||!a.length}}}},nb="ng-valid",be="ng-invalid",Za="ng-pristine",Wb="ng-dirty",pb=F("ngModel");Sb.$inject="$scope $exceptionHandler $attrs $element $parse $animate $timeout $q $interpolate".split(" "); Sb.prototype={$$initGetterSetters:function(){if(this.$options.getOption("getterSetter")){var a=this.$$parse(this.$$attr.ngModel+"()"),b=this.$$parse(this.$$attr.ngModel+"($$$p)");this.$$ngModelGet=function(b){var c=this.$$parsedNgModel(b);B(c)&&(c=a(b));return c};this.$$ngModelSet=function(a,c){B(this.$$parsedNgModel(a))?b(a,{$$$p:c}):this.$$parsedNgModelAssign(a,c)}}else if(!this.$$parsedNgModel.assign)throw pb("nonassign",this.$$attr.ngModel,Aa(this.$$element));},$render:E,$isEmpty:function(a){return A(a)|| ""===a||null===a||a!==a},$$updateEmptyClasses:function(a){this.$isEmpty(a)?(this.$$animate.removeClass(this.$$element,"ng-not-empty"),this.$$animate.addClass(this.$$element,"ng-empty")):(this.$$animate.removeClass(this.$$element,"ng-empty"),this.$$animate.addClass(this.$$element,"ng-not-empty"))},$setPristine:function(){this.$dirty=!1;this.$pristine=!0;this.$$animate.removeClass(this.$$element,Wb);this.$$animate.addClass(this.$$element,Za)},$setDirty:function(){this.$dirty=!0;this.$pristine=!1;this.$$animate.removeClass(this.$$element, Za);this.$$animate.addClass(this.$$element,Wb);this.$$parentForm.$setDirty()},$setUntouched:function(){this.$touched=!1;this.$untouched=!0;this.$$animate.setClass(this.$$element,"ng-untouched","ng-touched")},$setTouched:function(){this.$touched=!0;this.$untouched=!1;this.$$animate.setClass(this.$$element,"ng-touched","ng-untouched")},$rollbackViewValue:function(){this.$$timeout.cancel(this.$$pendingDebounce);this.$viewValue=this.$$lastCommittedViewValue;this.$render()},$validate:function(){if(!Y(this.$modelValue)){var a= this.$$lastCommittedViewValue,b=this.$$rawModelValue,d=this.$valid,c=this.$modelValue,e=this.$options.getOption("allowInvalid"),f=this;this.$$runValidators(b,a,function(a){e||d===a||(f.$modelValue=a?b:void 0,f.$modelValue!==c&&f.$$writeModelToScope())})}},$$runValidators:function(a,b,d){function c(){var c=!0;r(h.$validators,function(d,e){var g=Boolean(d(a,b));c=c&&g;f(e,g)});return c?!0:(r(h.$asyncValidators,function(a,b){f(b,null)}),!1)}function e(){var c=[],d=!0;r(h.$asyncValidators,function(e, g){var h=e(a,b);if(!h||!B(h.then))throw pb("nopromise",h);f(g,void 0);c.push(h.then(function(){f(g,!0)},function(){d=!1;f(g,!1)}))});c.length?h.$$q.all(c).then(function(){g(d)},E):g(!0)}function f(a,b){k===h.$$currentValidationRunId&&h.$setValidity(a,b)}function g(a){k===h.$$currentValidationRunId&&d(a)}this.$$currentValidationRunId++;var k=this.$$currentValidationRunId,h=this;(function(){var a=h.$$parserName;if(A(h.$$parserValid))f(a,null);else return h.$$parserValid||(r(h.$validators,function(a, b){f(b,null)}),r(h.$asyncValidators,function(a,b){f(b,null)})),f(a,h.$$parserValid),h.$$parserValid;return!0})()?c()?e():g(!1):g(!1)},$commitViewValue:function(){var a=this.$viewValue;this.$$timeout.cancel(this.$$pendingDebounce);if(this.$$lastCommittedViewValue!==a||""===a&&this.$$hasNativeValidators)this.$$updateEmptyClasses(a),this.$$lastCommittedViewValue=a,this.$pristine&&this.$setDirty(),this.$$parseAndValidate()},$$parseAndValidate:function(){var a=this.$$lastCommittedViewValue,b=this;this.$$parserValid= A(a)?void 0:!0;this.$setValidity(this.$$parserName,null);this.$$parserName="parse";if(this.$$parserValid)for(var d=0;dg||e.$isEmpty(b)||b.length<=g}}}}}],cd= ["$parse",function(a){return{restrict:"A",require:"?ngModel",link:function(b,d,c,e){if(e){var f=c.minlength||a(c.ngMinlength)(b),g=Ub(f)||-1;c.$observe("minlength",function(a){f!==a&&(g=Ub(a)||-1,f=a,e.$validate())});e.$validators.minlength=function(a,b){return e.$isEmpty(b)||b.length>=g}}}}}];z.angular.bootstrap?z.console&&console.log("WARNING: Tried to load AngularJS more than once."):(Je(),Oe(ca),ca.module("ngLocale",[],["$provide",function(a){function b(a){a+="";var b=a.indexOf(".");return-1== b?0:a.length-b-1}a.value("$locale",{DATETIME_FORMATS:{AMPMS:["AM","PM"],DAY:"Sunday Monday Tuesday Wednesday Thursday Friday Saturday".split(" "),ERANAMES:["Before Christ","Anno Domini"],ERAS:["BC","AD"],FIRSTDAYOFWEEK:6,MONTH:"January February March April May June July August September October November December".split(" "),SHORTDAY:"Sun Mon Tue Wed Thu Fri Sat".split(" "),SHORTMONTH:"Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec".split(" "),STANDALONEMONTH:"January February March April May June July August September October November December".split(" "), WEEKENDRANGE:[5,6],fullDate:"EEEE, MMMM d, y",longDate:"MMMM d, y",medium:"MMM d, y h:mm:ss a",mediumDate:"MMM d, y",mediumTime:"h:mm:ss a","short":"M/d/yy h:mm a",shortDate:"M/d/yy",shortTime:"h:mm a"},NUMBER_FORMATS:{CURRENCY_SYM:"$",DECIMAL_SEP:".",GROUP_SEP:",",PATTERNS:[{gSize:3,lgSize:3,maxFrac:3,minFrac:0,minInt:1,negPre:"-",negSuf:"",posPre:"",posSuf:""},{gSize:3,lgSize:3,maxFrac:2,minFrac:2,minInt:1,negPre:"-\u00a4",negSuf:"",posPre:"\u00a4",posSuf:""}]},id:"en-us",localeID:"en_US",pluralCat:function(a, c){var e=a|0,f=c;void 0===f&&(f=Math.min(b(a),3));Math.pow(10,f);return 1==e&&0==f?"one":"other"}})}]),x(function(){Ee(z.document,Wc)}))})(window);!window.angular.$$csp().noInlineStyle&&window.angular.element(document.head).prepend(window.angular.element("
1
9
17
25
33
41
49
57
65
73
81
89
97
105
113
121
129
137
145
153
161
169
177
185
193
201
209
217
225
233
241
249
257
265
273
281
289
297
305
313
321
329
337
345
353
361
369
377
385
393
401
409
417
425
433
441
449
457
465
473
481
489
497
505
ola-0.10.9/olad/www/incremental-discovery.png0000664000175000017500000000114014376533110016055 00000000000000‰PNG  IHDRóÿa'IDATxÚc`À´´´Ø’òòòVWVVî/++[TPPàË@ ðôô”‰ŒŒ¼àììüÏÌÁý«½OÈGwÏŸaaaÿnòññá§ŸÅßßÿ¬©ƒ×÷Ú•gRVÞÚÿŸáÿò[ŸÎ7.Ù|Ï70øwZZÚ"œº¶FØ8zü°©Úr$dƹýékî€ X}÷ëùMOŸqøÒа?@Wja5ÀÎÎn¾~pÍ-›ú}û§žÛŸº â‚¥7?ŸÝðè'ØüÆî7¡¡¡ùX 055ݬ5í4H.ܺtËooïF¬èéé­Õj¹bP¸m¿së¡ý¡3.€]P·÷é‘ßž_péýùâîÙÏ€Õa5ÀÜܼQÉÈýuɶ#æ•»ö»w²ìÆÉ‡Ÿœ›¸ÿþEßÀŸâââáX úMÝÄÄ䯾{ÊSך]Ç­«÷€ ð™pjÅŠ‹çB“ó>hjj¾*åÅÐ\ 'NÜÕÛÛû è•?–Îþ_¬#«X%vÞ°‹©|èýÃÐÐ𛤤d6Í@ÛÿüOJJjJNNúó‚®®î_##£ÿ:::¿544NmwÁÐ\XXØòO__ÿ?¿‹‹3ƒ¦Hv`rV¦@kwwwPòÆÐœŸŸß Ö tö‡˜˜b¥¥ešŸŸX3ЉœHœœœVÒÒÒŸ€þúäêêêÆ@`tº39zKYþRŸ*_ÇIEND®B`‚ola-0.10.9/olad/www/blank.gif0000664000175000017500000000006114376533110012620 00000000000000GIF89a‘ÿÿÿÿÀÀÀ!ù,T;ola-0.10.9/olad/www/forward.png0000664000175000017500000000070414376533110013220 00000000000000‰PNG  IHDRóÿasBIT|dˆtEXtSoftwarewww.inkscape.org›î<VIDAT8¥’½/CQÆï¹÷jÓR´*±Y ’Џ‚`ñH$b‘ØúˆÙ$ƒÄJR“Ï´j°ˆÕ`²!tÐÞ´z¡4âã¶å™NÎyžßÉû!Zkþ#åõ(™E= ÿ@sómmû2žêüMCD[dò"^?@0º‰D“2u9ñÝ2vÁïQˆ(U>£ç …F+îbñ™§ì²Þ‹o}\™˜Æ±Ž*¥”eYaZÂ2sÝ®“=«e€ë*œ\Mùwù6¬ÈôU;ù%·T/@pK½XfÌäÕ1x¹¯=ª‚µCÁ7¯ÓƒY1î(Û€€T>@DPÒ‡%]•°KÇX#o%ôE¿¯U–ÉÌ.~c€WýH^úÐÞüì1«”ZÞ“¢¾!' úØ>ûê¨ptмÌéSûö'‡7À!MAÖõ¹ýë˜<{P‹ÞÈc´@€çIEND®B`‚ola-0.10.9/olad/www/Makefile.mk0000664000175000017500000000601714376533110013117 00000000000000wwwdir = $(www_datadir) newdir = $(www_datadir)/new viewsdir = $(www_datadir)/new/views jsdir = $(www_datadir)/new/js cssdir = $(www_datadir)/new/css imgdir = $(www_datadir)/new/img jquerydir = $(www_datadir)/new/libs/jquery/js angularroutedir = $(www_datadir)/new/libs/angular-route/js angulardir = $(www_datadir)/new/libs/angular/js bootcssdir = $(www_datadir)/new/libs/bootstrap/css bootjsdir = $(www_datadir)/new/libs/bootstrap/js bootfontsdir = $(www_datadir)/new/libs/bootstrap/fonts dist_www_DATA = \ olad/www/back.png \ olad/www/blank.gif \ olad/www/button-bg.png \ olad/www/console_values.html \ olad/www/custombutton.css \ olad/www/discovery.png \ olad/www/editortoolbar.png \ olad/www/expander.png \ olad/www/forward.png \ olad/www/handle.vertical.png \ olad/www/hide_sections.png \ olad/www/incremental-discovery.png \ olad/www/landing.html \ olad/www/light_bulb_off.png \ olad/www/light_bulb.png \ olad/www/loader-mini.gif \ olad/www/loader.gif \ olad/www/logo-mini.png \ olad/www/logo.png \ olad/www/mobile.html \ olad/www/mobile.js \ olad/www/ola.html \ olad/www/ola.js \ olad/www/refresh.png \ olad/www/show_sections.png \ olad/www/tick.gif \ olad/www/toolbar-bg.png \ olad/www/toolbar.css \ olad/www/toolbar_sprites.png \ olad/www/vertical.gif \ olad/www/wand.png \ olad/www/warning.png dist_new_DATA = \ olad/www/new/index.html dist_views_DATA = \ olad/www/new/views/overview.html \ olad/www/new/views/plugin-info.html \ olad/www/new/views/plugins.html \ olad/www/new/views/universe-add.html \ olad/www/new/views/universe-faders.html \ olad/www/new/views/universe-header.html \ olad/www/new/views/universe-keypad.html \ olad/www/new/views/universe-overview.html \ olad/www/new/views/universe-patch.html \ olad/www/new/views/universe-rdm.html \ olad/www/new/views/universe-settings.html \ olad/www/new/views/universes.html dist_js_DATA = \ olad/www/new/js/app.min.js \ olad/www/new/js/app.min.js.map dist_css_DATA = \ olad/www/new/css/style.min.css dist_img_DATA = \ olad/www/new/img/light_bulb_off.png \ olad/www/new/img/light_bulb.png \ olad/www/new/img/logo-mini.png \ olad/www/new/img/logo.png dist_jquery_DATA = \ olad/www/new/libs/jquery/js/jquery.min.js dist_angularroute_DATA = \ olad/www/new/libs/angular-route/js/angular-route.min.js dist_angular_DATA = \ olad/www/new/libs/angular/js/angular.min.js dist_bootjs_DATA = \ olad/www/new/libs/bootstrap/js/bootstrap.min.js dist_bootfonts_DATA = \ olad/www/new/libs/bootstrap/fonts/glyphicons-halflings-regular.eot \ olad/www/new/libs/bootstrap/fonts/glyphicons-halflings-regular.svg \ olad/www/new/libs/bootstrap/fonts/glyphicons-halflings-regular.ttf \ olad/www/new/libs/bootstrap/fonts/glyphicons-halflings-regular.woff \ olad/www/new/libs/bootstrap/fonts/glyphicons-halflings-regular.woff2 dist_bootcss_DATA = \ olad/www/new/libs/bootstrap/css/bootstrap.min.css ola-0.10.9/olad/www/warning.png0000664000175000017500000000115414376533110013221 00000000000000‰PNG  IHDRóÿa3IDATxœ¥“_HSqÇ¿¿{ÛkÍ6°åæÌ•«‘‘D®?BRD–¡!$a½ôÐKÛ‡ÝhöDµ‡!¢ ð!‡”B…Z­‰^z ƒˆ¢t›³mw»÷ô˜“œ§óå×/ßÈ+¾Ô! Û9×&“‰¬$IÍ}Wú¾, `³ÙnoÜ¿µ@‚v÷Áëڊ ‰hÑvwñx¼0yÿ ÍM5S,Ë:ÞbZ¡Ôá°ÕÖl¶PU;jk «eð¿ôöô¶¿›zS˜>Eg%¹6VSêÃ½Š¿Ìù}þ“ÿtàv»£îJ‹¨)3àœƒ4 ºÜ#lÛ²Nïñx¢ë"ç/\j:rÐüýyæÓiÌ¥ŒzH¿ÐÚzÌÜ!wD‹¡°ÝåZßYªK€³4ÊʦҰ¡ªLSa5ÿ<ÏiY–‹œó{-ûJfâ°Y'`¾Âb)EE…(™Œß jgq¢íÐ*6° Äî®àÞñ§£Jöý Ê=Ñ‘6 ¢· Ô'NsŸ9Ñ,ˆ² R%ÊçoÑÈÈãŒì—÷ü Ñ`0ÜÞ½k»N¾Ѩ‚ €Â€Ãí;!Gš#ý@pƒó144Ô$I1›É…ލk)W_,9ÝêDpg¸õÞðÖV `;a-$©Jßß-`°çµ’IÓr'ŸÏ‘ïœï–Š\¼<_´eÀØ4™L [é;ÿò°5}‰ŠsIEND®B`‚ola-0.10.9/olad/www/tick.gif0000664000175000017500000000011314376533110012461 00000000000000GIF89a¡™™™™™™™™™!ù ,”§ ¹X€âÁf‚~•ç¦5–÷…y˜ µ`F;ola-0.10.9/olad/www/logo.png0000664000175000017500000000305314376533110012514 00000000000000‰PNG  IHDRo0$BòIDATxÚíÜylTUÆagÚŽ-[ T‘h""J\ˆaQ0j(ˆAÀ­)£‰…Ó ¨,j `ÀE²7\E[D@YLYìýü…@Ò|ùêÜ™¹[Ißäù‹éÜKß™;çž3§‰ÈY ©?9ßYCy åM6ò1ëQ†Ã¨FÊñ#Ö q .ä4BfXË‹bV ’ Ó؈‘ˆ!Ùˆ†D°ëÂV^ùØ qÉŒEúR^_È9ÃR^[¬‡xd'º\å•@ÎY†òîÇß:œÄ ¢7:"÷œŽ¸ ã±ÿ@êP…Âz\ÞMê|ªÑ.ÈòžG ÄðB8Mˆsé]€´zXÞ{eNPåM‡Ž`4ÒSü`„½Ã2¤Õ£ò:à D9Ž~—÷$İ­àVšáuˆan})Oý´gý,¯NC”©ˆÀ‹ŒBD)¨嵎sËtY~”× ¿A”gàu/š \òòfBâxÔò^2?týËãå+DCZ^ŽªóøÛŒÁ]ÔËòòŒK×7È€Ÿy¢Œ iyOA”.QzYÞkÆ}Ê ð;¹8¤Î¥ Ñ•ÃêJjM!–ªûÒ«òZá”:Ø|•q¥_ÈÊ{¢ôÁù< QzxQ^¡9;\²ð§:§wCT^eêøÛŒwæ}«åEyŸ©ƒ|„ ó‚:§SÈ Iyùet&ªÇÔ “›åeCôÑ:7B”ž!)ïkuìRD¡Óåê±o¹Y^ˆr‚Nĸt>‚òzAx±OU­Dk·Ê+2ÖØ¬DÐQ— j„º²J¿jCPÞZuÜ}q•sÁà,·Ê›ïàó®%¶BðKïÌö(Å,GtŠÕ¹m¸¼ÎÆ*K!âeŽú™£Èv£¼÷Õ¿éàƒwRÍbõœC 3A/Ú\ÞR½ÂâpI¬ªÕϹQÞZoéIê1Ó=øE s0]öK€å]n0N³Hýì~ÄR-o£ƒòšáS¾E.RÍÕµf(Jé ¼Ÿ,ïUc­®%œ¦“qÉ‘jy&°Ž–7‹3òšŠË¦=è(F¢Ñ¿ë]ˆ¤RÞBõ„Ë–ÌVç¶) ò¦Ãý6H4·@”»S)oб’–¬Òƒ)?ËÓ7ÚÙœJyCyÍÆø¿4…׉« “(¯â±.É–—Qî„•ŒZ×íÝIN^wÄTâÅx_¥Sºú\^ {![–ÊÄôž¸÷zö»t.¾¯ì+3ÔãNàbŸË{âƒ3¸"ÙòfÃàèŒP[ˆD³A=ÇÐÉ4:—ø¼$Á.uŒµ.nF9¢ž{^²å] qpš‰-À•°ÒMa¥'ŽÕšŠKsø]–¾>—×¢Ü ·2ÅXòÊu\žJ‰ñîk +yˆÁJªñ/†ÃJ:!lcó{D|.ïsõü[=¸w<®§“-¯»1°8MSµ6øÍkÞÓÇòºA”ûàv^6æJ;-Og D™ §ÉQóåH$ùÆ èD|.o¥ñÕ½4¸{Âz\²åµÂAcé~œ¦•8¡pš®8iì@ºÊ×/ÝÚsð*zueÒ–§s;NCÙ'à4Y nDéSu}_Óçò—²,x•kŒËT6š@ \ÞoçêØ13€&íPe|lxÕê˜Û/ÏžŒÕv£—Kƒ‚ÃBD(o¶11 ¯Ó¢ôNusej † ¸+ÁòîÁ&H^QÅùU^ pŸÆzBÀm̓q,ΦŃžhKÑÐaqœÙù Œ…Óˆ öךr›lLÐçÁ¯Ük ¯O± áñ´ôK/ÏY¯¤*ñà áÀ>NKp†û €1–Ÿ5qæi™!×öÞ-QUd©ÁßÊãoeqƒi8Û_¤î…±vŽàûþîP[k­Š*ðiº*¶“—ïQ–•Ê.#äð2€mNõ2µõÓ}9Ыdž&YÚÔ:D—AЛdlЍ¸èmò‰:l) ôyàVòYwkâK81IEND®B`‚ola-0.10.9/olad/DynamicPluginLoader.h0000664000175000017500000000270414376533110014267 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DynamicPluginLoader.h * Interface for the DynamicPluginLoader class * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_DYNAMICPLUGINLOADER_H_ #define OLAD_DYNAMICPLUGINLOADER_H_ #include #include "ola/base/Macro.h" #include "olad/PluginLoader.h" namespace ola { /** * @brief A PluginLoader which loads from shared (dynamic) libraries. */ class DynamicPluginLoader: public PluginLoader { public: DynamicPluginLoader() {} ~DynamicPluginLoader(); std::vector LoadPlugins(); void UnloadPlugins(); private: void PopulatePlugins(); std::vector m_plugins; DISALLOW_COPY_AND_ASSIGN(DynamicPluginLoader); }; } // namespace ola #endif // OLAD_DYNAMICPLUGINLOADER_H_ ola-0.10.9/olad/OlaDaemon.cpp0000664000175000017500000001306114376533110012565 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * OlaDaemon.cpp * This is the main ola daemon * Copyright (C) 2005 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include #include #ifdef _WIN32 #include #endif // _WIN32 #include #include "ola/ExportMap.h" #include "ola/Logging.h" #include "ola/base/Credentials.h" #include "ola/base/Flags.h" #include "ola/file/Util.h" #include "ola/network/SocketAddress.h" #include "ola/stl/STLUtils.h" #include "olad/DynamicPluginLoader.h" #include "olad/OlaDaemon.h" #include "olad/OlaServerServiceImpl.h" #include "olad/PluginLoader.h" #include "olad/Preferences.h" DEFINE_s_string(config_dir, c, "", "The path to the config directory, defaults to ~/.ola/ " \ "on *nix and %LOCALAPPDATA%\\.ola\\ on Windows."); namespace ola { using ola::io::SelectServer; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::network::TCPAcceptingSocket; using ola::thread::MutexLocker; using std::auto_ptr; using std::string; const char OlaDaemon::OLA_CONFIG_DIR[] = ".ola"; const char OlaDaemon::CONFIG_DIR_KEY[] = "config-dir"; const char OlaDaemon::UID_KEY[] = "uid"; const char OlaDaemon::GID_KEY[] = "gid"; const char OlaDaemon::USER_NAME_KEY[] = "user"; const char OlaDaemon::GROUP_NAME_KEY[] = "group"; OlaDaemon::OlaDaemon(const OlaServer::Options &options, ExportMap *export_map) : m_options(options), m_export_map(export_map), m_ss(m_export_map) { if (m_export_map) { uid_t uid; if (GetUID(&uid)) { m_export_map->GetIntegerVar(UID_KEY)->Set(uid); PasswdEntry passwd; if (GetPasswdUID(uid, &passwd)) { m_export_map->GetStringVar(USER_NAME_KEY)->Set(passwd.pw_name); } } gid_t gid; if (GetGID(&gid)) { m_export_map->GetIntegerVar(GID_KEY)->Set(gid); GroupEntry group; if (GetGroupGID(gid, &group)) { m_export_map->GetStringVar(GROUP_NAME_KEY)->Set(group.gr_name); } } } } OlaDaemon::~OlaDaemon() { Shutdown(); } bool OlaDaemon::Init() { if (m_server.get()) { return false; } string config_dir = FLAGS_config_dir; if (config_dir.empty()) { const string default_dir = DefaultConfigDir(); if (default_dir.empty()) { OLA_FATAL << "Unable to determine home directory"; return false; } else { config_dir = default_dir; } } // Ignore the return code so this isn't fatal // in macports the home directory isn't writeable InitConfigDir(config_dir); OLA_INFO << "Using configs in " << config_dir; if (m_export_map) { m_export_map->GetStringVar(CONFIG_DIR_KEY)->Set(config_dir); } auto_ptr preferences_factory( new FileBackedPreferencesFactory(config_dir)); // Order is important here as we won't load the same plugin twice. m_plugin_loaders.push_back(new DynamicPluginLoader()); auto_ptr server( new OlaServer(m_plugin_loaders, preferences_factory.get(), &m_ss, m_options, NULL, m_export_map)); bool ok = server->Init(); if (ok) { // Set the members m_preferences_factory.reset(preferences_factory.release()); m_server.reset(server.release()); } else { STLDeleteElements(&m_plugin_loaders); } return ok; } void OlaDaemon::Shutdown() { m_server.reset(); m_preferences_factory.reset(); STLDeleteElements(&m_plugin_loaders); } void OlaDaemon::Run() { m_ss.Run(); } ola::network::GenericSocketAddress OlaDaemon::RPCAddress() const { if (m_server.get()) { return m_server->LocalRPCAddress(); } else { return ola::network::GenericSocketAddress(); } } /* * Return the home directory for the current user */ string OlaDaemon::DefaultConfigDir() { if (SupportsUIDs()) { PasswdEntry passwd_entry; uid_t uid; if (!GetUID(&uid)) return ""; if (!GetPasswdUID(uid, &passwd_entry)) return ""; return passwd_entry.pw_dir + ola::file::PATH_SEPARATOR + OLA_CONFIG_DIR; } else { #ifdef _WIN32 char path[MAX_PATH]; if (SUCCEEDED(SHGetFolderPathA(NULL, CSIDL_LOCAL_APPDATA, NULL, 0, path))) { return string(path) + ola::file::PATH_SEPARATOR + OLA_CONFIG_DIR; } else { return ""; } #else return ""; #endif // _WIN32 } } /* * Create the config dir if it doesn't exist. This doesn't create parent * directories. */ bool OlaDaemon::InitConfigDir(const string &path) { if (chdir(path.c_str())) { // try and create it #ifdef _WIN32 if (mkdir(path.c_str())) { #else if (mkdir(path.c_str(), 0755)) { #endif // _WIN32 OLA_FATAL << "Couldn't mkdir " << path; return false; } if (chdir(path.c_str())) { OLA_FATAL << path << " doesn't exist"; return false; } } return true; } } // namespace ola ola-0.10.9/olad/plugin_api/0000775000175000017500000000000014376533271012440 500000000000000ola-0.10.9/olad/plugin_api/DeviceManagerTest.cpp0000664000175000017500000002635014376533110016414 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DeviceManagerTest.cpp * Test fixture for the DeviceManager class. * Copyright (C) 2005 Simon Newton */ #include #include #include #include "ola/Logging.h" #include "ola/DmxBuffer.h" #include "olad/Plugin.h" #include "olad/Port.h" #include "olad/PortBroker.h" #include "olad/Preferences.h" #include "olad/plugin_api/DeviceManager.h" #include "olad/plugin_api/PortManager.h" #include "olad/plugin_api/TestCommon.h" #include "olad/plugin_api/UniverseStore.h" #include "ola/testing/TestUtils.h" using ola::AbstractDevice; using ola::AbstractPlugin; using ola::DeviceManager; using ola::DmxBuffer; using ola::Port; using ola::PortManager; using ola::Universe; using ola::UniverseStore; using std::string; using std::vector; class DeviceManagerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DeviceManagerTest); CPPUNIT_TEST(testDeviceManager); CPPUNIT_TEST(testRestorePatchings); CPPUNIT_TEST(testRestorePriorities); CPPUNIT_TEST_SUITE_END(); public: void testDeviceManager(); void testRestorePatchings(); void testRestorePriorities(); }; CPPUNIT_TEST_SUITE_REGISTRATION(DeviceManagerTest); /* * Test that we can register devices and retrieve them. */ void DeviceManagerTest::testDeviceManager() { DeviceManager manager(NULL, NULL); OLA_ASSERT_EQ(0u, manager.DeviceCount()); TestMockPlugin plugin(NULL, ola::OLA_PLUGIN_ARTNET); MockDevice orphaned_device(NULL, "orphaned device"); MockDevice device1(&plugin, "test device 1"); MockDevice device2(&plugin, "test device 2"); // can't register NULL OLA_ASSERT_FALSE(manager.RegisterDevice(NULL)); // Can't register a device with no unique id OLA_ASSERT_FALSE(manager.RegisterDevice(&orphaned_device)); // register a device OLA_ASSERT(manager.RegisterDevice(&device1)); // the second time must fail OLA_ASSERT_FALSE(manager.RegisterDevice(&device1)); // register a second device OLA_ASSERT(manager.RegisterDevice(&device2)); OLA_ASSERT_EQ(2u, manager.DeviceCount()); vector devices = manager.Devices(); OLA_ASSERT_EQ(1u, devices[0].alias); OLA_ASSERT_EQ(static_cast(&device1), devices[0].device); OLA_ASSERT_EQ(2u, devices[1].alias); OLA_ASSERT_EQ(static_cast(&device2), devices[1].device); // test fetching a device by alias OLA_ASSERT_EQ(static_cast(&device1), manager.GetDevice(1)); OLA_ASSERT_EQ(static_cast(&device2), manager.GetDevice(2)); OLA_ASSERT_EQ(static_cast(NULL), manager.GetDevice(3)); // test fetching a device by id ola::device_alias_pair result = manager.GetDevice(device1.UniqueId()); OLA_ASSERT_EQ(1u, result.alias); OLA_ASSERT_EQ(static_cast(&device1), result.device); result = manager.GetDevice(device2.UniqueId()); OLA_ASSERT_EQ(2u, result.alias); OLA_ASSERT_EQ(static_cast(&device2), result.device); result = manager.GetDevice("foo"); OLA_ASSERT_EQ(DeviceManager::MISSING_DEVICE_ALIAS, result.alias); OLA_ASSERT_EQ(static_cast(NULL), result.device); result = manager.GetDevice(""); OLA_ASSERT_EQ(DeviceManager::MISSING_DEVICE_ALIAS, result.alias); OLA_ASSERT_EQ(static_cast(NULL), result.device); // test unregistering null or non-registered device OLA_ASSERT_FALSE(manager.UnregisterDevice(NULL)); OLA_ASSERT_FALSE(manager.UnregisterDevice(&orphaned_device)); // unregistering the first device doesn't change the ID of the second OLA_ASSERT(manager.UnregisterDevice(&device1)); OLA_ASSERT_EQ(1u, manager.DeviceCount()); OLA_ASSERT_EQ(static_cast(NULL), manager.GetDevice(1)); OLA_ASSERT_EQ(static_cast(&device2), manager.GetDevice(2)); devices = manager.Devices(); OLA_ASSERT_EQ((size_t) 1, devices.size()); OLA_ASSERT_EQ(2u, devices[0].alias); OLA_ASSERT_EQ(static_cast(&device2), devices[0].device); // unregister by id OLA_ASSERT_FALSE(manager.UnregisterDevice(device1.UniqueId())); OLA_ASSERT(manager.UnregisterDevice(device2.UniqueId())); OLA_ASSERT_EQ(0u, manager.DeviceCount()); manager.UnregisterAllDevices(); // add one back and check that ids reset OLA_ASSERT(manager.RegisterDevice(&device1)); OLA_ASSERT_EQ(1u, manager.DeviceCount()); devices = manager.Devices(); OLA_ASSERT_EQ(1u, devices[0].alias); OLA_ASSERT_EQ(static_cast(&device1), devices[0].device); OLA_ASSERT_EQ(static_cast(&device1), manager.GetDevice(1)); result = manager.GetDevice(device1.UniqueId()); OLA_ASSERT_EQ(1u, result.alias); OLA_ASSERT_EQ(static_cast(&device1), result.device); } /* * Check that we restore the port patchings */ void DeviceManagerTest::testRestorePatchings() { ola::MemoryPreferencesFactory prefs_factory; UniverseStore uni_store(NULL, NULL); ola::PortBroker broker; PortManager port_manager(&uni_store, &broker); DeviceManager manager(&prefs_factory, &port_manager); OLA_ASSERT_EQ(0u, manager.DeviceCount()); ola::Preferences *prefs = prefs_factory.NewPreference("port"); OLA_ASSERT(prefs); // Use a hyphen to confirm we can parse these correctly prefs->SetValue("2-test-device-1-I-1", "1"); prefs->SetValue("2-test-device-1-O-1", "3"); TestMockPlugin plugin(NULL, ola::OLA_PLUGIN_ARTNET); MockDevice device1(&plugin, "test-device-1"); TestMockInputPort input_port(&device1, 1, NULL); TestMockOutputPort output_port(&device1, 1); device1.AddPort(&input_port); device1.AddPort(&output_port); OLA_ASSERT(manager.RegisterDevice(&device1)); OLA_ASSERT_EQ(1u, manager.DeviceCount()); OLA_ASSERT(input_port.GetUniverse()); OLA_ASSERT_EQ(input_port.GetUniverse()->UniverseId(), 1u); OLA_ASSERT(output_port.GetUniverse()); OLA_ASSERT_EQ(output_port.GetUniverse()->UniverseId(), 3u); // Now check that patching a universe saves the settings Universe *uni = uni_store.GetUniverseOrCreate(10); OLA_ASSERT(uni); input_port.SetUniverse(uni); // unregister all manager.UnregisterAllDevices(); OLA_ASSERT_EQ(0u, manager.DeviceCount()); OLA_ASSERT_EQ(string("10"), prefs->GetValue("2-test-device-1-I-1")); OLA_ASSERT_EQ(string("3"), prefs->GetValue("2-test-device-1-O-1")); } /* * Test that port priorities are restored correctly. */ void DeviceManagerTest::testRestorePriorities() { ola::MemoryPreferencesFactory prefs_factory; UniverseStore uni_store(NULL, NULL); ola::PortBroker broker; PortManager port_manager(&uni_store, &broker); DeviceManager manager(&prefs_factory, &port_manager); OLA_ASSERT_EQ(0u, manager.DeviceCount()); ola::Preferences *prefs = prefs_factory.NewPreference("port"); OLA_ASSERT(prefs); prefs->SetValue("2-test_device_1-I-1_priority_mode", "0"); prefs->SetValue("2-test_device_1-I-1_priority_value", "120"); prefs->SetValue("2-test_device_1-O-1_priority_mode", "0"); prefs->SetValue("2-test_device_1-O-1_priority_value", "140"); prefs->SetValue("2-test_device_1-I-2_priority_mode", "1"); // override mode prefs->SetValue("2-test_device_1-I-2_priority_value", "160"); prefs->SetValue("2-test_device_1-O-2_priority_mode", "1"); // override mode prefs->SetValue("2-test_device_1-O-2_priority_value", "180"); prefs->SetValue("2-test_device_1-I-3_priority_mode", "0"); // inherit mode // invalid priority prefs->SetValue("2-test_device_1-I-3_priority_value", "210"); prefs->SetValue("2-test_device_1-O-3_priority_mode", "0"); // inherit mode prefs->SetValue("2-test_device_1-O-3_priority_value", "180"); TestMockPlugin plugin(NULL, ola::OLA_PLUGIN_ARTNET); MockDevice device1(&plugin, "test_device_1"); // these ports don't support priorities. TestMockInputPort input_port(&device1, 1, NULL); TestMockOutputPort output_port(&device1, 1); // these devices support priorities TestMockPriorityInputPort input_port2(&device1, 2, NULL); TestMockPriorityOutputPort output_port2(&device1, 2); TestMockPriorityInputPort input_port3(&device1, 3, NULL); TestMockPriorityOutputPort output_port3(&device1, 3); device1.AddPort(&input_port); device1.AddPort(&output_port); device1.AddPort(&input_port2); device1.AddPort(&output_port2); device1.AddPort(&input_port3); device1.AddPort(&output_port3); OLA_ASSERT(manager.RegisterDevice(&device1)); OLA_ASSERT_EQ(1u, manager.DeviceCount()); OLA_ASSERT_EQ(ola::CAPABILITY_STATIC, input_port.PriorityCapability()); OLA_ASSERT_EQ(ola::PRIORITY_MODE_STATIC, input_port.GetPriorityMode()); OLA_ASSERT_EQ((uint8_t) 120, input_port.GetPriority()); OLA_ASSERT_EQ(ola::CAPABILITY_NONE, output_port.PriorityCapability()); OLA_ASSERT_EQ(ola::PRIORITY_MODE_INHERIT, output_port.GetPriorityMode()); OLA_ASSERT_EQ((uint8_t) 100, output_port.GetPriority()); // these ports support priorities OLA_ASSERT_EQ(ola::CAPABILITY_FULL, input_port2.PriorityCapability()); OLA_ASSERT_EQ(ola::PRIORITY_MODE_STATIC, input_port2.GetPriorityMode()); OLA_ASSERT_EQ((uint8_t) 160, input_port2.GetPriority()); OLA_ASSERT_EQ(ola::CAPABILITY_FULL, output_port2.PriorityCapability()); OLA_ASSERT_EQ(ola::PRIORITY_MODE_STATIC, output_port2.GetPriorityMode()); OLA_ASSERT_EQ((uint8_t) 180, output_port2.GetPriority()); OLA_ASSERT_EQ(ola::CAPABILITY_FULL, input_port3.PriorityCapability()); OLA_ASSERT_EQ(ola::PRIORITY_MODE_INHERIT, input_port3.GetPriorityMode()); OLA_ASSERT_EQ((uint8_t) 200, input_port3.GetPriority()); OLA_ASSERT_EQ(ola::CAPABILITY_FULL, output_port3.PriorityCapability()); OLA_ASSERT_EQ(ola::PRIORITY_MODE_INHERIT, output_port3.GetPriorityMode()); OLA_ASSERT_EQ((uint8_t) 180, output_port3.GetPriority()); // Now make some changes input_port2.SetPriorityMode(ola::PRIORITY_MODE_INHERIT); output_port2.SetPriorityMode(ola::PRIORITY_MODE_INHERIT); input_port3.SetPriorityMode(ola::PRIORITY_MODE_STATIC); input_port3.SetPriority(40); output_port3.SetPriorityMode(ola::PRIORITY_MODE_STATIC); output_port3.SetPriority(60); // unregister all manager.UnregisterAllDevices(); OLA_ASSERT_EQ(0u, manager.DeviceCount()); OLA_ASSERT_EQ(string("0"), prefs->GetValue("2-test_device_1-I-2_priority_mode")); OLA_ASSERT_EQ(string("0"), prefs->GetValue("2-test_device_1-O-2_priority_mode")); OLA_ASSERT_EQ(string("1"), prefs->GetValue("2-test_device_1-I-3_priority_mode")); OLA_ASSERT_EQ(string("40"), prefs->GetValue("2-test_device_1-I-3_priority_value")); OLA_ASSERT_EQ(string("1"), prefs->GetValue("2-test_device_1-O-3_priority_mode")); OLA_ASSERT_EQ(string("60"), prefs->GetValue("2-test_device_1-O-3_priority_value")); } ola-0.10.9/olad/plugin_api/PluginAdaptor.cpp0000664000175000017500000001015114376533110015623 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PluginAdaptor.cpp * Provides a wrapper for the DeviceManager and SelectServer objects so that * the plugins can register devices and file handles for events * Copyright (C) 2005 Simon Newton */ #include #include "ola/Callback.h" #include "olad/PluginAdaptor.h" #include "olad/PortBroker.h" #include "olad/Preferences.h" #include "olad/plugin_api/DeviceManager.h" namespace ola { using ola::io::SelectServerInterface; using ola::thread::timeout_id; using std::string; PluginAdaptor::PluginAdaptor(DeviceManager *device_manager, SelectServerInterface *select_server, ExportMap *export_map, PreferencesFactory *preferences_factory, PortBrokerInterface *port_broker, const std::string *instance_name): m_device_manager(device_manager), m_ss(select_server), m_export_map(export_map), m_preferences_factory(preferences_factory), m_port_broker(port_broker), m_instance_name(instance_name) { } bool PluginAdaptor::AddReadDescriptor( ola::io::ReadFileDescriptor *descriptor) { return m_ss->AddReadDescriptor(descriptor); } bool PluginAdaptor::AddReadDescriptor( ola::io::ConnectedDescriptor *descriptor, bool delete_on_close) { return m_ss->AddReadDescriptor(descriptor, delete_on_close); } void PluginAdaptor::RemoveReadDescriptor( ola::io::ReadFileDescriptor *descriptor) { m_ss->RemoveReadDescriptor(descriptor); } void PluginAdaptor::RemoveReadDescriptor( ola::io::ConnectedDescriptor *descriptor) { m_ss->RemoveReadDescriptor(descriptor); } bool PluginAdaptor::AddWriteDescriptor( ola::io::WriteFileDescriptor *descriptor) { return m_ss->AddWriteDescriptor(descriptor); } void PluginAdaptor::RemoveWriteDescriptor( ola::io::WriteFileDescriptor *descriptor) { m_ss->RemoveWriteDescriptor(descriptor); } timeout_id PluginAdaptor::RegisterRepeatingTimeout( unsigned int ms, Callback0 *closure) { return m_ss->RegisterRepeatingTimeout(ms, closure); } timeout_id PluginAdaptor::RegisterRepeatingTimeout( const TimeInterval &interval, Callback0 *closure) { return m_ss->RegisterRepeatingTimeout(interval, closure); } timeout_id PluginAdaptor::RegisterSingleTimeout( unsigned int ms, SingleUseCallback0 *closure) { return m_ss->RegisterSingleTimeout(ms, closure); } timeout_id PluginAdaptor::RegisterSingleTimeout( const TimeInterval &interval, SingleUseCallback0 *closure) { return m_ss->RegisterSingleTimeout(interval, closure); } void PluginAdaptor::RemoveTimeout(timeout_id id) { m_ss->RemoveTimeout(id); } void PluginAdaptor::Execute(ola::BaseCallback0 *closure) { m_ss->Execute(closure); } void PluginAdaptor::DrainCallbacks() { m_ss->DrainCallbacks(); } bool PluginAdaptor::RegisterDevice(AbstractDevice *device) const { return m_device_manager->RegisterDevice(device); } bool PluginAdaptor::UnregisterDevice(AbstractDevice *device) const { return m_device_manager->UnregisterDevice(device); } Preferences *PluginAdaptor::NewPreference(const string &name) const { return m_preferences_factory->NewPreference(name); } const TimeStamp *PluginAdaptor::WakeUpTime() const { return m_ss->WakeUpTime(); } const std::string PluginAdaptor::InstanceName() { if (m_instance_name) { return *m_instance_name; } else { return ""; } } } // namespace ola ola-0.10.9/olad/plugin_api/Preferences.cpp0000664000175000017500000002727314376533110015330 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Preferences.cpp * This class stores preferences in files * Copyright (C) 2005 Simon Newton */ #define __STDC_LIMIT_MACROS // for UINT8_MAX & friends #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include "olad/Preferences.h" #include #include #ifdef _WIN32 // On MinGW, pthread.h pulls in Windows.h, which in turn pollutes the global // namespace. We define VC_EXTRALEAN and WIN32_LEAN_AND_MEAN to reduce this. #define VC_EXTRALEAN #define WIN32_LEAN_AND_MEAN #endif // _WIN32 #include #include #include #include #include #include #include #include #include #include #include #include #include #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/file/Util.h" #include "ola/network/IPV4Address.h" #include "ola/stl/STLUtils.h" #include "ola/thread/Thread.h" namespace ola { using ola::thread::Mutex; using ola::thread::ConditionVariable; using std::ifstream; using std::ofstream; using std::map; using std::pair; using std::string; using std::vector; namespace { void SavePreferencesToFile( const string *filename_ptr, const FilePreferenceSaverThread::PreferencesMap *pref_map_ptr) { std::auto_ptr filename(filename_ptr); std::auto_ptr pref_map( pref_map_ptr); FilePreferenceSaverThread::PreferencesMap::const_iterator iter; ofstream pref_file(filename->data()); if (!pref_file.is_open()) { OLA_WARN << "Could not open " << *filename_ptr << ": " << strerror(errno); return; } for (iter = pref_map->begin(); iter != pref_map->end(); ++iter) { pref_file << iter->first << " = " << iter->second << std::endl; } pref_file.flush(); pref_file.close(); } } // namespace const char BoolValidator::ENABLED[] = "true"; const char BoolValidator::DISABLED[] = "false"; const char FileBackedPreferences::OLA_CONFIG_PREFIX[] = "ola-"; const char FileBackedPreferences::OLA_CONFIG_SUFFIX[] = ".conf"; // Validators //----------------------------------------------------------------------------- bool StringValidator::IsValid(const string &value) const { return m_empty_ok || !value.empty(); } bool BoolValidator::IsValid(const string &value) const { return (value == ENABLED || value == DISABLED); } bool UIntValidator::IsValid(const string &value) const { unsigned int output; if (!StringToInt(value, &output)) { return false; } return (output >= m_gt && output <= m_lt); } bool IntValidator::IsValid(const string &value) const { int output; if (!StringToInt(value, &output)) { return false; } return (output >= m_gt && output <= m_lt); } template <> bool SetValidator::IsValid(const string &value) const { return STLContains(m_values, value); } template <> bool SetValidator::IsValid(const string &value) const { unsigned int output; // It's an integer based set validator, so if we can't parse it to an // integer, it can't possibly match an integer and be valid if (!StringToInt(value, &output)) { return false; } return STLContains(m_values, output); } template <> bool SetValidator::IsValid(const string &value) const { int output; // It's an integer based set validator, so if we can't parse it to an // integer, it can't possibly match an integer and be valid if (!StringToInt(value, &output)) { return false; } return STLContains(m_values, output); } bool IPv4Validator::IsValid(const string &value) const { if (value.empty()) { return m_empty_ok; } vector tokens; StringSplit(value, &tokens, "."); if (tokens.size() != ola::network::IPV4Address::LENGTH) { return false; } for (unsigned int i = 0 ; i < 4; i++) { unsigned int octet; if (!StringToInt(tokens[i], &octet)) { return false; } if (octet > UINT8_MAX) { return false; } } return true; } // Prefs Factory //----------------------------------------------------------------------------- PreferencesFactory::~PreferencesFactory() { map::const_iterator iter; for (iter = m_preferences_map.begin(); iter != m_preferences_map.end(); ++iter) { delete iter->second; } m_preferences_map.clear(); } Preferences *PreferencesFactory::NewPreference(const string &name) { map::iterator iter = m_preferences_map.find(name); if (iter == m_preferences_map.end()) { Preferences *pref = Create(name); m_preferences_map.insert(make_pair(name, pref)); return pref; } else { return iter->second; } } // Memory Preferences //----------------------------------------------------------------------------- MemoryPreferences::~MemoryPreferences() { m_pref_map.clear(); } void MemoryPreferences::Clear() { m_pref_map.clear(); } void MemoryPreferences::SetValue(const string &key, const string &value) { m_pref_map.erase(key); m_pref_map.insert(make_pair(key, value)); } void MemoryPreferences::SetValue(const string &key, unsigned int value) { SetValue(key, IntToString(value)); } void MemoryPreferences::SetValue(const string &key, int value) { SetValue(key, IntToString(value)); } void MemoryPreferences::SetMultipleValue(const string &key, const string &value) { m_pref_map.insert(make_pair(key, value)); } void MemoryPreferences::SetMultipleValue(const string &key, unsigned int value) { SetMultipleValue(key, IntToString(value)); } void MemoryPreferences::SetMultipleValue(const string &key, int value) { SetMultipleValue(key, IntToString(value)); } bool MemoryPreferences::SetDefaultValue(const string &key, const Validator &validator, const string &value) { PreferencesMap::const_iterator iter; iter = m_pref_map.find(key); if (iter == m_pref_map.end() || !validator.IsValid(iter->second)) { SetValue(key, value); return true; } return false; } bool MemoryPreferences::SetDefaultValue(const string &key, const Validator &validator, const char value[]) { return SetDefaultValue(key, validator, string(value)); } bool MemoryPreferences::SetDefaultValue(const string &key, const Validator &validator, unsigned int value) { return SetDefaultValue(key, validator, IntToString(value)); } bool MemoryPreferences::SetDefaultValue(const string &key, const Validator &validator, int value) { return SetDefaultValue(key, validator, IntToString(value)); } bool MemoryPreferences::SetDefaultValue(const string &key, const Validator &validator, const bool value) { return SetDefaultValue( key, validator, value ? BoolValidator::ENABLED : BoolValidator::DISABLED); } string MemoryPreferences::GetValue(const string &key) const { PreferencesMap::const_iterator iter; iter = m_pref_map.find(key); if (iter != m_pref_map.end()) return iter->second; return ""; } vector MemoryPreferences::GetMultipleValue(const string &key) const { vector values; PreferencesMap::const_iterator iter; for (iter = m_pref_map.find(key); iter != m_pref_map.end() && iter->first == key; ++iter) { values.push_back(iter->second); } return values; } bool MemoryPreferences::HasKey(const string &key) const { return STLContains(m_pref_map, key); } void MemoryPreferences::RemoveValue(const string &key) { m_pref_map.erase(key); } bool MemoryPreferences::GetValueAsBool(const string &key) const { PreferencesMap::const_iterator iter; iter = m_pref_map.find(key); if (iter != m_pref_map.end()) return iter->second == BoolValidator::ENABLED; return false; } void MemoryPreferences::SetValueAsBool(const string &key, bool value) { m_pref_map.erase(key); m_pref_map.insert(make_pair(key, (value ? BoolValidator::ENABLED : BoolValidator::DISABLED))); } // FilePreferenceSaverThread //----------------------------------------------------------------------------- FilePreferenceSaverThread::FilePreferenceSaverThread() : Thread(Thread::Options("pref-saver")) { // set a long poll interval so we don't spin m_ss.SetDefaultInterval(TimeInterval(60, 0)); } void FilePreferenceSaverThread::SavePreferences( const string &file_name, const PreferencesMap &preferences) { const string *file_name_ptr = new string(file_name); const PreferencesMap *save_map = new PreferencesMap(preferences); SingleUseCallback0 *cb = NewSingleCallback(SavePreferencesToFile, file_name_ptr, save_map); m_ss.Execute(cb); } void *FilePreferenceSaverThread::Run() { m_ss.Run(); return NULL; } bool FilePreferenceSaverThread::Join(void *ptr) { m_ss.Terminate(); return Thread::Join(ptr); } void FilePreferenceSaverThread::Syncronize() { Mutex syncronize_mutex; ConditionVariable condition_var; syncronize_mutex.Lock(); m_ss.Execute(NewSingleCallback( this, &FilePreferenceSaverThread::CompleteSyncronization, &condition_var, &syncronize_mutex)); condition_var.Wait(&syncronize_mutex); } void FilePreferenceSaverThread::CompleteSyncronization( ConditionVariable *condition, Mutex *mutex) { // calling lock here forces us to block until Wait() is called on the // condition_var. mutex->Lock(); mutex->Unlock(); condition->Signal(); } // FileBackedPreferences //----------------------------------------------------------------------------- bool FileBackedPreferences::Load() { return LoadFromFile(FileName()); } bool FileBackedPreferences::Save() const { m_saver_thread->SavePreferences(FileName(), m_pref_map); return true; } const string FileBackedPreferences::FileName() const { return (m_directory + ola::file::PATH_SEPARATOR + OLA_CONFIG_PREFIX + m_preference_name + OLA_CONFIG_SUFFIX); } bool FileBackedPreferences::LoadFromFile(const string &filename) { ifstream pref_file(filename.data()); if (!pref_file.is_open()) { OLA_INFO << "Missing " << filename << ": " << strerror(errno) << " - this isn't an error, we'll just use the defaults"; return false; } m_pref_map.clear(); string line; while (getline(pref_file, line)) { StringTrim(&line); if (line.empty() || line.at(0) == '#') { continue; } vector tokens; StringSplit(line, &tokens, "="); if (tokens.size() != 2) { OLA_INFO << "Skipping line: " << line; continue; } string key = tokens[0]; string value = tokens[1]; StringTrim(&key); StringTrim(&value); m_pref_map.insert(make_pair(key, value)); } pref_file.close(); return true; } } // namespace ola ola-0.10.9/olad/plugin_api/PreferencesTest.cpp0000664000175000017500000003177014376533110016165 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PreferencesTest.cpp * Test fixture for the Preferences classes * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include "ola/Logging.h" #include "ola/StringUtils.h" #include "olad/Preferences.h" #include "ola/testing/TestUtils.h" using ola::BoolValidator; using ola::FileBackedPreferences; using ola::FileBackedPreferencesFactory; using ola::IntToString; using ola::IntValidator; using ola::UIntValidator; using ola::MemoryPreferencesFactory; using ola::Preferences; using ola::SetValidator; using ola::StringValidator; using ola::IPv4Validator; using std::string; using std::vector; class PreferencesTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(PreferencesTest); CPPUNIT_TEST(testValidators); CPPUNIT_TEST(testGetSetRemove); CPPUNIT_TEST(testBool); CPPUNIT_TEST(testFactory); CPPUNIT_TEST(testLoad); CPPUNIT_TEST(testSave); CPPUNIT_TEST_SUITE_END(); public: void setUp() { ola::InitLogging(ola::OLA_LOG_DEBUG, ola::OLA_LOG_STDERR); } void testValidators(); void testGetSetRemove(); void testBool(); void testFactory(); void testLoad(); void testSave(); }; CPPUNIT_TEST_SUITE_REGISTRATION(PreferencesTest); /* * Check the validators work */ void PreferencesTest::testValidators() { StringValidator string_validator; OLA_ASSERT(string_validator.IsValid("foo")); OLA_ASSERT_FALSE(string_validator.IsValid("")); std::set values; values.insert("one"); values.insert("two"); SetValidator set_validator(values); OLA_ASSERT(set_validator.IsValid("one")); OLA_ASSERT(set_validator.IsValid("two")); OLA_ASSERT_FALSE(set_validator.IsValid("zero")); OLA_ASSERT_FALSE(set_validator.IsValid("three")); std::set values2; values2.insert(1); values2.insert(3); SetValidator set_validator2(values2); OLA_ASSERT(set_validator2.IsValid("1")); OLA_ASSERT(set_validator2.IsValid("3")); OLA_ASSERT_FALSE(set_validator2.IsValid("0")); OLA_ASSERT_FALSE(set_validator2.IsValid("2")); OLA_ASSERT_FALSE(set_validator2.IsValid("4")); // a string validator that allows empty strings StringValidator string_validator2(true); OLA_ASSERT(string_validator2.IsValid("foo")); OLA_ASSERT(string_validator2.IsValid("")); BoolValidator bool_validator; OLA_ASSERT(bool_validator.IsValid("true")); OLA_ASSERT(bool_validator.IsValid("false")); OLA_ASSERT_FALSE(bool_validator.IsValid("")); IntValidator int_validator(-3, 4); OLA_ASSERT(int_validator.IsValid("-3")); OLA_ASSERT(int_validator.IsValid("0")); OLA_ASSERT(int_validator.IsValid("4")); OLA_ASSERT_FALSE(int_validator.IsValid("-4")); OLA_ASSERT_FALSE(int_validator.IsValid("5")); UIntValidator uint_validator(10, 14); OLA_ASSERT(uint_validator.IsValid("10")); OLA_ASSERT(uint_validator.IsValid("14")); OLA_ASSERT_FALSE(uint_validator.IsValid("0")); OLA_ASSERT_FALSE(uint_validator.IsValid("9")); OLA_ASSERT_FALSE(uint_validator.IsValid("15")); IPv4Validator ipv4_validator; // empty ok OLA_ASSERT(ipv4_validator.IsValid("")); OLA_ASSERT(ipv4_validator.IsValid("1.2.3.4")); OLA_ASSERT(ipv4_validator.IsValid("10.0.255.1")); OLA_ASSERT_FALSE(ipv4_validator.IsValid("foo")); OLA_ASSERT_FALSE(ipv4_validator.IsValid("1.2.3")); OLA_ASSERT_FALSE(ipv4_validator.IsValid("1.2.3.4.5")); OLA_ASSERT_FALSE(ipv4_validator.IsValid("1.f00.3.4")); IPv4Validator ipv4_validator2(false); // empty not ok OLA_ASSERT_FALSE(ipv4_validator2.IsValid("")); } /* * Check that we can get/set the preferences */ void PreferencesTest::testGetSetRemove() { MemoryPreferencesFactory factory; Preferences *preferences = factory.NewPreference("dummy"); string key1 = "foo"; string key2 = "bat"; string value1 = "bar"; string value2 = "baz"; unsigned int value3 = 1; unsigned int value4 = 2; int value5 = 3; int value6 = 4; const char value7[] = "bar"; const char value8[] = "baz"; // test get/set/has single values string OLA_ASSERT_EQ(string(""), preferences->GetValue(key1)); preferences->SetValue(key1, value1); OLA_ASSERT_EQ(value1, preferences->GetValue(key1)); OLA_ASSERT(preferences->HasKey(key1)); preferences->SetValue(key1, value2); OLA_ASSERT_EQ(value2, preferences->GetValue(key1)); preferences->RemoveValue(key1); OLA_ASSERT_EQ(string(""), preferences->GetValue(key1)); OLA_ASSERT_FALSE(preferences->HasKey(key1)); // test get/set/has single values uint OLA_ASSERT_EQ(string(""), preferences->GetValue(key1)); preferences->SetValue(key1, value3); OLA_ASSERT_EQ(IntToString(value3), preferences->GetValue(key1)); OLA_ASSERT(preferences->HasKey(key1)); preferences->SetValue(key1, value4); OLA_ASSERT_EQ(IntToString(value4), preferences->GetValue(key1)); preferences->RemoveValue(key1); OLA_ASSERT_EQ(string(""), preferences->GetValue(key1)); OLA_ASSERT_FALSE(preferences->HasKey(key1)); // test get/set/has single values int OLA_ASSERT_EQ(string(""), preferences->GetValue(key1)); preferences->SetValue(key1, value5); OLA_ASSERT_EQ(IntToString(value5), preferences->GetValue(key1)); OLA_ASSERT(preferences->HasKey(key1)); preferences->SetValue(key1, value6); OLA_ASSERT_EQ(IntToString(value6), preferences->GetValue(key1)); preferences->RemoveValue(key1); OLA_ASSERT_EQ(string(""), preferences->GetValue(key1)); OLA_ASSERT_FALSE(preferences->HasKey(key1)); vector values; // test get/set multiple value string values = preferences->GetMultipleValue(key2); OLA_ASSERT_EQ((size_t) 0, values.size()); preferences->SetMultipleValue(key2, value1); values = preferences->GetMultipleValue(key2); OLA_ASSERT(preferences->HasKey(key2)); OLA_ASSERT_EQ((size_t) 1, values.size()); OLA_ASSERT_EQ(value1, values.at(0)); preferences->SetMultipleValue(key2, value2); values = preferences->GetMultipleValue(key2); OLA_ASSERT_EQ((size_t) 2, values.size()); OLA_ASSERT_EQ(value1, values.at(0)); OLA_ASSERT_EQ(value2, values.at(1)); preferences->RemoveValue(key2); // test get/set multiple value uint values = preferences->GetMultipleValue(key2); OLA_ASSERT_EQ((size_t) 0, values.size()); preferences->SetMultipleValue(key2, value3); values = preferences->GetMultipleValue(key2); OLA_ASSERT(preferences->HasKey(key2)); OLA_ASSERT_EQ((size_t) 1, values.size()); OLA_ASSERT_EQ(IntToString(value3), values.at(0)); preferences->SetMultipleValue(key2, value4); values = preferences->GetMultipleValue(key2); OLA_ASSERT_EQ((size_t) 2, values.size()); OLA_ASSERT_EQ(IntToString(value3), values.at(0)); OLA_ASSERT_EQ(IntToString(value4), values.at(1)); preferences->RemoveValue(key2); // test get/set multiple value int values = preferences->GetMultipleValue(key2); OLA_ASSERT_EQ((size_t) 0, values.size()); preferences->SetMultipleValue(key2, value5); values = preferences->GetMultipleValue(key2); OLA_ASSERT(preferences->HasKey(key2)); OLA_ASSERT_EQ((size_t) 1, values.size()); OLA_ASSERT_EQ(IntToString(value5), values.at(0)); preferences->SetMultipleValue(key2, value6); values = preferences->GetMultipleValue(key2); OLA_ASSERT_EQ((size_t) 2, values.size()); OLA_ASSERT_EQ(IntToString(value5), values.at(0)); OLA_ASSERT_EQ(IntToString(value6), values.at(1)); preferences->RemoveValue(key2); // test SetDefaultValue String OLA_ASSERT(preferences->SetDefaultValue(key1, StringValidator(), value1)); OLA_ASSERT_EQ(value1, preferences->GetValue(key1)); OLA_ASSERT_FALSE(preferences->SetDefaultValue(key1, StringValidator(), value2)); OLA_ASSERT_EQ(value1, preferences->GetValue(key1)); OLA_ASSERT(preferences->HasKey(key1)); preferences->RemoveValue(key1); // test SetDefaultValue uint UIntValidator uint_validator(0, 3); OLA_ASSERT(preferences->SetDefaultValue(key1, uint_validator, value3)); OLA_ASSERT_EQ(IntToString(value3), preferences->GetValue(key1)); OLA_ASSERT_FALSE(preferences->SetDefaultValue(key1, uint_validator, value4)); OLA_ASSERT_EQ(IntToString(value3), preferences->GetValue(key1)); OLA_ASSERT(preferences->HasKey(key1)); preferences->RemoveValue(key1); // test SetDefaultValue int IntValidator int_validator(0, 5); OLA_ASSERT(preferences->SetDefaultValue(key1, int_validator, value5)); OLA_ASSERT_EQ(IntToString(value5), preferences->GetValue(key1)); OLA_ASSERT_FALSE(preferences->SetDefaultValue(key1, int_validator, value6)); OLA_ASSERT_EQ(IntToString(value5), preferences->GetValue(key1)); OLA_ASSERT(preferences->HasKey(key1)); preferences->RemoveValue(key1); // test SetDefaultValue char[] OLA_ASSERT(preferences->SetDefaultValue(key1, StringValidator(), value7)); OLA_ASSERT_EQ(string(value7), preferences->GetValue(key1)); OLA_ASSERT_FALSE(preferences->SetDefaultValue(key1, StringValidator(), value8)); OLA_ASSERT_EQ(string(value7), preferences->GetValue(key1)); OLA_ASSERT(preferences->HasKey(key1)); preferences->RemoveValue(key1); // test SetDefaultValue bool OLA_ASSERT(preferences->SetDefaultValue(key1, BoolValidator(), true)); OLA_ASSERT_EQ(string(BoolValidator::ENABLED), preferences->GetValue(key1)); OLA_ASSERT_FALSE(preferences->SetDefaultValue(key1, BoolValidator(), false)); OLA_ASSERT_EQ(string(BoolValidator::ENABLED), preferences->GetValue(key1)); OLA_ASSERT(preferences->HasKey(key1)); preferences->RemoveValue(key1); } /* * Check that we can get/set the preferences */ void PreferencesTest::testBool() { MemoryPreferencesFactory factory; Preferences *preferences = factory.NewPreference("dummy"); string key1 = "foo"; string value1 = "bar"; // test get/set single values OLA_ASSERT_EQ(false, preferences->GetValueAsBool(key1)); preferences->SetValueAsBool(key1, true); OLA_ASSERT_EQ(true, preferences->GetValueAsBool(key1)); preferences->SetValueAsBool(key1, false); OLA_ASSERT_EQ(false, preferences->GetValueAsBool(key1)); preferences->SetValue(key1, value1); OLA_ASSERT_EQ(false, preferences->GetValueAsBool(key1)); } /* * Check that the factory works as intended */ void PreferencesTest::testFactory() { MemoryPreferencesFactory factory; string preferences_name = "dummy"; Preferences *preferences = factory.NewPreference(preferences_name); Preferences *preferences2 = factory.NewPreference(preferences_name); OLA_ASSERT_EQ(preferences, preferences2); } /* * Check that we can load from a file */ void PreferencesTest::testLoad() { FileBackedPreferences *preferences = new FileBackedPreferences( "", "dummy", NULL); preferences->Clear(); preferences->SetValue("foo", "bad"); preferences->LoadFromFile( TEST_SRC_DIR "/olad/testdata/test_preferences.conf"); OLA_ASSERT_EQ(string("bar"), preferences->GetValue("foo")); OLA_ASSERT(preferences->HasKey("foo")); OLA_ASSERT_EQ(string("bat"), preferences->GetValue("baz")); OLA_ASSERT(preferences->HasKey("baz")); vector values = preferences->GetMultipleValue("multi"); OLA_ASSERT_EQ((size_t) 3, values.size()); OLA_ASSERT_EQ(string("1"), values.at(0)); OLA_ASSERT_EQ(string("2"), values.at(1)); OLA_ASSERT_EQ(string("3"), values.at(2)); delete preferences; } void PreferencesTest::testSave() { const string data_path = TEST_BUILD_DIR "/olad/ola-output.conf"; ola::FilePreferenceSaverThread saver_thread; saver_thread.Start(); FileBackedPreferences *preferences = new FileBackedPreferences( TEST_BUILD_DIR "/olad", "output", &saver_thread); preferences->Clear(); unlink(data_path.c_str()); string key1 = "foo"; string key2 = "bat"; string key3 = "/dev/ttyUSB0"; string value1 = "bar"; string value2 = "baz"; string value3 = "boo"; string multi_key = "multi"; preferences->SetValue(key1, value1); preferences->SetValue(key2, value2); preferences->SetValue(key3, value3); preferences->SetMultipleValue(multi_key, "1"); preferences->SetMultipleValue(multi_key, "2"); preferences->SetMultipleValue(multi_key, "3"); preferences->Save(); saver_thread.Syncronize(); FileBackedPreferences *input_preferences = new FileBackedPreferences("", "input", NULL); input_preferences->LoadFromFile(data_path); OLA_ASSERT(*preferences == *input_preferences); delete preferences; delete input_preferences; saver_thread.Join(); } ola-0.10.9/olad/plugin_api/PortManager.h0000664000175000017500000001040014376533110014733 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PortManager.h * Provides a unified interface for controlling port patchings & priorities. * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_PLUGIN_API_PORTMANAGER_H_ #define OLAD_PLUGIN_API_PORTMANAGER_H_ #include #include "olad/Device.h" #include "olad/PortBroker.h" #include "olad/plugin_api/DeviceManager.h" #include "olad/plugin_api/UniverseStore.h" #include "ola/base/Macro.h" namespace ola { /** * @brief Responsible for performing Port operations. */ class PortManager { public: /** * @brief Create a new PortManager. * @param universe_store the UniverseStore used to lookup / create Universes. * @param broker the PortBroker to update when Ports are added / removed. */ PortManager(UniverseStore *universe_store, PortBroker *broker) : m_universe_store(universe_store), m_broker(broker) { } /** * @brief Destructor. */ ~PortManager() {} /** * @brief Patch an InputPort to a universe. * @param port the port to patch * @param universe the universe-id to patch to. * @returns true is successful, false otherwise */ bool PatchPort(InputPort *port, unsigned int universe); /** * @brief Patch an OutputPort to a universe. * @param port the port to patch * @param universe the universe-id to patch to. * @returns true is successful, false otherwise */ bool PatchPort(OutputPort *port, unsigned int universe); /** * @brief UnPatch an InputPort. * @param port the port to unpatch * @returns true is successful, false otherwise */ bool UnPatchPort(InputPort *port); /** * @brief UnPatch an OutputPort. * @param port the port to unpatch * @returns true is successful, false otherwise */ bool UnPatchPort(OutputPort *port); /** * @brief Set a port to 'inherit' priority mode. * @param port the port to configure */ bool SetPriorityInherit(Port *port); /** * @brief Set a port to 'override' priority mode. * @param port the port to configure * @param value the new priority */ bool SetPriorityStatic(Port *port, uint8_t value); private: template bool GenericPatchPort(PortClass *port, unsigned int new_universe_id); template bool GenericUnPatchPort(PortClass *port); template bool CheckLooping(const AbstractDevice *device, unsigned int new_universe_id) const; template bool CheckMultiPort(const AbstractDevice *device, unsigned int new_universe_id) const; /** * Check if any input ports in this device are bound to the universe. * @returns true if there is a match, false otherwise. */ bool CheckInputPortsForUniverse(const AbstractDevice *device, unsigned int universe_id) const; /** * Check if any output ports in this device are bound to the universe. * @returns true if there is a match, false otherwise. */ bool CheckOutputPortsForUniverse(const AbstractDevice *device, unsigned int universe_id) const; /** * Check for any port in a list that's bound to this universe. * @returns true if there is a match, false otherwise. */ template bool CheckForPortMatchingUniverse(const std::vector &ports, unsigned int universe_id) const; UniverseStore * const m_universe_store; PortBroker *m_broker; DISALLOW_COPY_AND_ASSIGN(PortManager); }; } // namespace ola #endif // OLAD_PLUGIN_API_PORTMANAGER_H_ ola-0.10.9/olad/plugin_api/Universe.cpp0000664000175000017500000007006614376533110014665 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Universe.cpp * Represents a universe of DMX data. * Copyright (C) 2005 Simon Newton * * Each universe has the following: * A human readable name * A DmxBuffer with the current dmx data * A MergeMode, either LTP (latest takes precedence) or HTP (highest takes * precedence) * A list of ports bound to this universe. If a port is an input, we use the * data to update the DmxBuffer according to the MergeMode. If a port is an * output, we notify the port whenever the DmxBuffer changes. * A list of source clients. which provide us with data for updating the * DmxBuffer per the merge mode. * A list of sink clients, which we update whenever the DmxBuffer changes. */ #include #include #include #include #include #include #include #include #include "ola/base/Array.h" #include "ola/Logging.h" #include "ola/MultiCallback.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/RDMEnums.h" #include "ola/stl/STLUtils.h" #include "ola/strings/Format.h" #include "olad/Port.h" #include "olad/Universe.h" #include "olad/plugin_api/Client.h" #include "olad/plugin_api/UniverseStore.h" namespace ola { using ola::rdm::RDMDiscoveryCallback; using ola::rdm::RDMReply; using ola::rdm::RDMRequest; using ola::rdm::RunRDMCallback; using ola::rdm::UID; using ola::strings::ToHex; using std::auto_ptr; using std::map; using std::ostringstream; using std::set; using std::string; using std::vector; const char Universe::K_UNIVERSE_UID_COUNT_VAR[] = "universe-uids"; const char Universe::K_FPS_VAR[] = "universe-dmx-frames"; const char Universe::K_MERGE_HTP_STR[] = "htp"; const char Universe::K_MERGE_LTP_STR[] = "ltp"; const char Universe::K_UNIVERSE_INPUT_PORT_VAR[] = "universe-input-ports"; const char Universe::K_UNIVERSE_MODE_VAR[] = "universe-mode"; const char Universe::K_UNIVERSE_NAME_VAR[] = "universe-name"; const char Universe::K_UNIVERSE_OUTPUT_PORT_VAR[] = "universe-output-ports"; const char Universe::K_UNIVERSE_RDM_REQUESTS[] = "universe-rdm-requests"; const char Universe::K_UNIVERSE_SINK_CLIENTS_VAR[] = "universe-sink-clients"; const char Universe::K_UNIVERSE_SOURCE_CLIENTS_VAR[] = "universe-source-clients"; /* * Create a new universe * @param uid the universe id of this universe * @param store the store this universe came from * @param export_map the ExportMap that we update */ Universe::Universe(unsigned int universe_id, UniverseStore *store, ExportMap *export_map, Clock *clock) : m_universe_name(""), m_universe_id(universe_id), m_active_priority(ola::dmx::SOURCE_PRIORITY_MIN), m_merge_mode(Universe::MERGE_LTP), m_universe_store(store), m_export_map(export_map), m_clock(clock), m_rdm_discovery_interval(), m_last_discovery_time(), m_transaction_number_sequence() { ostringstream universe_id_str, universe_name_str; universe_id_str << universe_id; m_universe_id_str = universe_id_str.str(); universe_name_str << "Universe " << universe_id; m_universe_name = universe_name_str.str(); UpdateName(); UpdateMode(); const char *vars[] = { K_FPS_VAR, K_UNIVERSE_INPUT_PORT_VAR, K_UNIVERSE_OUTPUT_PORT_VAR, K_UNIVERSE_RDM_REQUESTS, K_UNIVERSE_SINK_CLIENTS_VAR, K_UNIVERSE_SOURCE_CLIENTS_VAR, K_UNIVERSE_UID_COUNT_VAR, }; if (m_export_map) { for (unsigned int i = 0; i < arraysize(vars); ++i) { (*m_export_map->GetUIntMapVar(vars[i]))[m_universe_id_str] = 0; } } // We set the last discovery time to now, since most ports will trigger // discovery when they are patched. clock->CurrentMonotonicTime(&m_last_discovery_time); } /* * Delete this universe */ Universe::~Universe() { const char *string_vars[] = { K_UNIVERSE_NAME_VAR, K_UNIVERSE_MODE_VAR, }; const char *uint_vars[] = { K_FPS_VAR, K_UNIVERSE_INPUT_PORT_VAR, K_UNIVERSE_OUTPUT_PORT_VAR, K_UNIVERSE_RDM_REQUESTS, K_UNIVERSE_SINK_CLIENTS_VAR, K_UNIVERSE_SOURCE_CLIENTS_VAR, K_UNIVERSE_UID_COUNT_VAR, }; if (m_export_map) { for (unsigned int i = 0; i < arraysize(string_vars); ++i) { m_export_map->GetStringMapVar(string_vars[i])->Remove(m_universe_id_str); } for (unsigned int i = 0; i < arraysize(uint_vars); ++i) { m_export_map->GetUIntMapVar(uint_vars[i])->Remove(m_universe_id_str); } } } /* * Set the universe name * @param name the new universe name */ void Universe::SetName(const string &name) { m_universe_name = name; UpdateName(); // notify ports vector::const_iterator iter; for (iter = m_output_ports.begin(); iter != m_output_ports.end(); ++iter) { (*iter)->UniverseNameChanged(name); } } /* * Set the universe merge mode * @param merge_mode the new merge_mode */ void Universe::SetMergeMode(enum merge_mode merge_mode) { m_merge_mode = merge_mode; UpdateMode(); } /* * Add an InputPort to this universe. * @param port the port to add */ bool Universe::AddPort(InputPort *port) { return GenericAddPort(port, &m_input_ports); } /* * Add an OutputPort to this universe. * @param port the port to add */ bool Universe::AddPort(OutputPort *port) { return GenericAddPort(port, &m_output_ports); } /* * Remove a port from this universe. * @param port the port to remove * @return true if the port was removed, false if it didn't exist */ bool Universe::RemovePort(InputPort *port) { return GenericRemovePort(port, &m_input_ports); } /* * Remove a port from this universe. * @param port the port to remove * @return true if the port was removed, false if it didn't exist */ bool Universe::RemovePort(OutputPort *port) { bool ret = GenericRemovePort(port, &m_output_ports, &m_output_uids); if (m_export_map) { (*m_export_map->GetUIntMapVar(K_UNIVERSE_UID_COUNT_VAR))[m_universe_id_str] = m_output_uids.size(); } return ret; } /* * Check if this port is bound to this universe * @param port the port to check for * @return true if the port exists in this universe, false otherwise */ bool Universe::ContainsPort(InputPort *port) const { return GenericContainsPort(port, m_input_ports); } /* * Check if this port is bound to this universe * @param port the port to check for * @return true if the port exists in this universe, false otherwise */ bool Universe::ContainsPort(OutputPort *port) const { return GenericContainsPort(port, m_output_ports); } /* * Get a list of input ports associated with this universe * @param ports, the vector to be populated */ void Universe::InputPorts(vector *ports) const { ports->clear(); std::copy(m_input_ports.begin(), m_input_ports.end(), std::back_inserter(*ports)); } /* * Get a list of output ports associated with this universe * @param ports, the vector to be populated */ void Universe::OutputPorts(vector *ports) const { ports->clear(); std::copy(m_output_ports.begin(), m_output_ports.end(), std::back_inserter(*ports)); } /* * @brief Add a client as a source for this universe * @param client the client to add * @return true */ bool Universe::AddSourceClient(Client *client) { // Check to see if it exists already. It doesn't make sense to have multiple // clients if (STLReplace(&m_source_clients, client, false)) { return true; } OLA_INFO << "Added source client, " << client << " to universe " << m_universe_id; SafeIncrement(K_UNIVERSE_SOURCE_CLIENTS_VAR); return true; } /* * @param Remove this client from the universe. * @note After the client is removed we internally check if this universe is * still in use, and if not delete it * @param client the client to remove * @return true is this client was removed, false if it didn't exist */ bool Universe::RemoveSourceClient(Client *client) { if (!STLRemove(&m_source_clients, client)) { return false; } SafeDecrement(K_UNIVERSE_SOURCE_CLIENTS_VAR); OLA_INFO << "Source client " << client << " has been removed from uni " << m_universe_id; if (!IsActive()) { m_universe_store->AddUniverseGarbageCollection(this); } return true; } /* * Check if this universe contains a client as a source * @param client the client to check for * @returns true if this universe contains the client, false otherwise */ bool Universe::ContainsSourceClient(Client *client) const { return STLContains(m_source_clients, client); } /* * @brief Add a client as a sink for this universe * @param client the client to add * @return true if client was added, and false if it was already a sink client */ bool Universe::AddSinkClient(Client *client) { if (!STLInsertIfNotPresent(&m_sink_clients, client)) { return false; } OLA_INFO << "Added sink client, " << client << " to universe " << m_universe_id; SafeIncrement(K_UNIVERSE_SINK_CLIENTS_VAR); return true; } /* * @param Remove this sink client from the universe. * @note After the client is removed we internally check if this universe is * still in use, and if not delete it * @param client the client to remove * @return true is this client was removed, false if it didn't exist */ bool Universe::RemoveSinkClient(Client *client) { if (!STLRemove(&m_sink_clients, client)) { return false; } SafeDecrement(K_UNIVERSE_SINK_CLIENTS_VAR); OLA_INFO << "Sink client " << client << " has been removed from uni " << m_universe_id; if (!IsActive()) { m_universe_store->AddUniverseGarbageCollection(this); } return true; } /* * Check if this universe contains a client as a sink * @param client the client to check for * @returns true if this universe contains the client, false otherwise */ bool Universe::ContainsSinkClient(Client *client) const { return STLContains(m_sink_clients, client); } /* * Set the dmx data for this universe, this overrides anything from the clients * or ports but will be overridden in the next update. * @param buffer the dmx buffer with the data * @return true is we updated all ports/clients, false otherwise */ bool Universe::SetDMX(const DmxBuffer &buffer) { if (!buffer.Size()) { OLA_INFO << "Trying to SetDMX with a 0 length dmx buffer, universe " << UniverseId(); return true; } m_buffer.Set(buffer); return UpdateDependants(); } /* * Call this when the dmx in a port that is part of this universe changes * @param port the port that has changed */ bool Universe::PortDataChanged(InputPort *port) { if (!ContainsPort(port)) { OLA_INFO << "Trying to update a port which isn't bound to universe: " << UniverseId(); return false; } if (MergeAll(port, NULL)) { UpdateDependants(); } return true; } /* * Called to indicate that data from a client has changed */ bool Universe::SourceClientDataChanged(Client *client) { if (!client) { return false; } AddSourceClient(client); // always add since this may be the first call if (MergeAll(NULL, client)) { UpdateDependants(); } return true; } /** * @brief Clean old source clients */ void Universe::CleanStaleSourceClients() { SourceClientMap::iterator iter = m_source_clients.begin(); while (iter != m_source_clients.end()) { if (iter->second) { // if stale remove it m_source_clients.erase(iter++); SafeDecrement(K_UNIVERSE_SOURCE_CLIENTS_VAR); OLA_INFO << "Removed Stale Client"; if (!IsActive()) { m_universe_store->AddUniverseGarbageCollection(this); } } else { // clear the stale flag iter->second = true; ++iter; } } } /* * Handle a RDM request for this universe, ownership of the request object is * transferred to this method. */ void Universe::SendRDMRequest(RDMRequest *request_ptr, ola::rdm::RDMCallback *callback) { auto_ptr request(request_ptr); OLA_INFO << "Universe " << UniverseId() << ", RDM request to " << request->DestinationUID() << ", SD: " << request->SubDevice() << ", CC " << ToHex(request->CommandClass()) << ", TN " << static_cast(request->TransactionNumber()) << ", PID " << ToHex(request->ParamId()) << ", PDL: " << request->ParamDataSize(); SafeIncrement(K_UNIVERSE_RDM_REQUESTS); if (request->DestinationUID().IsBroadcast()) { if (m_output_ports.empty()) { RunRDMCallback( callback, request->IsDUB() ? ola::rdm::RDM_TIMEOUT : ola::rdm::RDM_WAS_BROADCAST); return; } // send this request to all ports broadcast_request_tracker *tracker = new broadcast_request_tracker; tracker->expected_count = m_output_ports.size(); tracker->current_count = 0; tracker->status_code = (request->IsDUB() ? ola::rdm::RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED : ola::rdm::RDM_WAS_BROADCAST); tracker->callback = callback; vector::iterator port_iter; for (port_iter = m_output_ports.begin(); port_iter != m_output_ports.end(); ++port_iter) { // because each port deletes the request, we need to copy it here if (request->IsDUB()) { (*port_iter)->SendRDMRequest( request->Duplicate(), NewSingleCallback(this, &Universe::HandleBroadcastDiscovery, tracker)); } else { (*port_iter)->SendRDMRequest( request->Duplicate(), NewSingleCallback(this, &Universe::HandleBroadcastAck, tracker)); } } } else { map::iterator iter = m_output_uids.find(request->DestinationUID()); if (iter == m_output_uids.end()) { OLA_WARN << "Can't find UID " << request->DestinationUID() << " in the output universe map, dropping request"; RunRDMCallback(callback, ola::rdm::RDM_UNKNOWN_UID); } else { iter->second->SendRDMRequest(request.release(), callback); } } } /* * Trigger RDM discovery for this universe */ void Universe::RunRDMDiscovery(RDMDiscoveryCallback *on_complete, bool full) { if (full) { OLA_INFO << "Full RDM discovery triggered for universe " << m_universe_id; } else { OLA_INFO << "Incremental RDM discovery triggered for universe " << m_universe_id; } m_clock->CurrentMonotonicTime(&m_last_discovery_time); // we need to make a copy of the ports first, because the callback may run at // any time so we need to guard against the port list changing. vector output_ports(m_output_ports.size()); copy(m_output_ports.begin(), m_output_ports.end(), output_ports.begin()); // the multicallback that indicates when discovery is done BaseCallback0 *discovery_complete = NewMultiCallback( output_ports.size(), NewSingleCallback(this, &Universe::DiscoveryComplete, on_complete)); // Send Discovery requests to all ports, as each of these return they'll // update the UID map. When all ports callbacks have run, the MultiCallback // will trigger, running the DiscoveryCallback. vector::iterator iter; for (iter = output_ports.begin(); iter != output_ports.end(); ++iter) { if (full) { (*iter)->RunFullDiscovery( NewSingleCallback(this, &Universe::PortDiscoveryComplete, discovery_complete, *iter)); } else { (*iter)->RunIncrementalDiscovery( NewSingleCallback(this, &Universe::PortDiscoveryComplete, discovery_complete, *iter)); } } } /* * Update the UID : port mapping with this new data */ void Universe::NewUIDList(OutputPort *port, const ola::rdm::UIDSet &uids) { map::iterator iter = m_output_uids.begin(); while (iter != m_output_uids.end()) { if (iter->second == port && !uids.Contains(iter->first)) { m_output_uids.erase(iter++); } else { ++iter; } } ola::rdm::UIDSet::Iterator set_iter = uids.Begin(); for (; set_iter != uids.End(); ++set_iter) { iter = m_output_uids.find(*set_iter); if (iter == m_output_uids.end()) { m_output_uids[*set_iter] = port; } else if (iter->second != port) { OLA_WARN << "UID " << *set_iter << " seen on more than one port"; } } if (m_export_map) { (*m_export_map->GetUIntMapVar(K_UNIVERSE_UID_COUNT_VAR))[m_universe_id_str] = m_output_uids.size(); } } /* * Returns the complete UIDSet for this universe */ void Universe::GetUIDs(ola::rdm::UIDSet *uids) const { map::const_iterator iter = m_output_uids.begin(); for (; iter != m_output_uids.end(); ++iter) { uids->AddUID(iter->first); } } /** * Return the number of uids in the universe */ unsigned int Universe::UIDCount() const { return m_output_uids.size(); } /** * Return the RDM transaction number to use */ uint8_t Universe::GetRDMTransactionNumber() { return m_transaction_number_sequence.Next(); } /* * Return true if this universe is in use (has at least one port or client). */ bool Universe::IsActive() const { // any of the following means the port is active return !(m_output_ports.empty() && m_input_ports.empty() && m_source_clients.empty() && m_sink_clients.empty()); } // Private Methods //----------------------------------------------------------------------------- /* * Called when the dmx data for this universe changes, * updates everyone who needs to know (patched ports and network clients) */ bool Universe::UpdateDependants() { vector::const_iterator iter; set::const_iterator client_iter; // write to all ports assigned to this universe for (iter = m_output_ports.begin(); iter != m_output_ports.end(); ++iter) { (*iter)->WriteDMX(m_buffer, m_active_priority); } // write to all clients for (client_iter = m_sink_clients.begin(); client_iter != m_sink_clients.end(); ++client_iter) { (*client_iter)->SendDMX(m_universe_id, m_active_priority, m_buffer); } SafeIncrement(K_FPS_VAR); return true; } /* * Update the name in the export map. */ void Universe::UpdateName() { if (!m_export_map) { return; } StringMap *name_map = m_export_map->GetStringMapVar(K_UNIVERSE_NAME_VAR); (*name_map)[m_universe_id_str] = m_universe_name; } /* * Update the mode in the export map. */ void Universe::UpdateMode() { if (!m_export_map) { return; } StringMap *mode_map = m_export_map->GetStringMapVar(K_UNIVERSE_MODE_VAR); (*mode_map)[m_universe_id_str] = (m_merge_mode == Universe::MERGE_LTP ? K_MERGE_LTP_STR : K_MERGE_HTP_STR); } /* * HTP Merge all sources (clients/ports) * @pre sources.size >= 2 * @param sources the list of DmxSources to merge */ void Universe::HTPMergeSources(const vector &sources) { vector::const_iterator iter; m_buffer.Reset(); for (iter = sources.begin(); iter != sources.end(); ++iter) { m_buffer.HTPMerge(iter->Data()); } } /* * Merge all port/client sources. * This does a priority based merge as documented at: * https://wiki.openlighting.org/index.php/OLA_Merging_Algorithms * @param port the input port that changed or NULL * @param client the client that changed or NULL * @returns true if the data for this universe changed, false otherwise */ bool Universe::MergeAll(const InputPort *port, const Client *client) { vector active_sources; vector::const_iterator iter; SourceClientMap::const_iterator client_iter; m_active_priority = ola::dmx::SOURCE_PRIORITY_MIN; TimeStamp now; m_clock->CurrentMonotonicTime(&now); bool changed_source_is_active = false; // Find the highest active ports for (iter = m_input_ports.begin(); iter != m_input_ports.end(); ++iter) { DmxSource source = (*iter)->SourceData(); if (!source.IsSet() || !source.IsActive(now) || !source.Data().Size()) { continue; } if (source.Priority() > m_active_priority) { changed_source_is_active = false; active_sources.clear(); m_active_priority = source.Priority(); } if (source.Priority() == m_active_priority) { active_sources.push_back(source); if (*iter == port) { changed_source_is_active = true; } } } // find the highest priority active clients for (client_iter = m_source_clients.begin(); client_iter != m_source_clients.end(); ++client_iter) { const DmxSource &source = client_iter->first->SourceData(UniverseId()); if (!source.IsSet() || !source.IsActive(now) || !source.Data().Size()) { continue; } if (source.Priority() > m_active_priority) { changed_source_is_active = false; active_sources.clear(); m_active_priority = source.Priority(); } if (source.Priority() == m_active_priority) { active_sources.push_back(source); if (client_iter->first == client) { changed_source_is_active = true; } } } if (active_sources.empty()) { OLA_WARN << "Something changed but we didn't find any active sources " << " for universe " << UniverseId(); return false; } if (!changed_source_is_active) { // this source didn't have any effect, skip return false; } // only one source at the active priority if (active_sources.size() == 1) { m_buffer.Set(active_sources[0].Data()); } else { // multi source merge if (m_merge_mode == Universe::MERGE_LTP) { vector::const_iterator source_iter = active_sources.begin(); DmxSource changed_source; if (port) { changed_source = port->SourceData(); } else { changed_source = client->SourceData(UniverseId()); } // check that the current port/client is newer than all other active // sources for (; source_iter != active_sources.end(); source_iter++) { if (changed_source.Timestamp() < source_iter->Timestamp()) { return false; } } // if we made it to here this is the newest source m_buffer.Set(changed_source.Data()); } else { HTPMergeSources(active_sources); } } return true; } /** * Called when discovery completes on a single ports. */ void Universe::PortDiscoveryComplete(BaseCallback0 *on_complete, OutputPort *output_port, const ola::rdm::UIDSet &uids) { NewUIDList(output_port, uids); on_complete->Run(); } /** * Called when discovery completes on all ports. */ void Universe::DiscoveryComplete(RDMDiscoveryCallback *on_complete) { ola::rdm::UIDSet uids; GetUIDs(&uids); if (on_complete) { on_complete->Run(uids); } } /** * Track fan-out responses for a broadcast request. * This increments the port counter until we reach the expected value, and * which point we run the callback for the client. */ void Universe::HandleBroadcastAck(broadcast_request_tracker *tracker, RDMReply *reply) { tracker->current_count++; if (reply->StatusCode() != ola::rdm::RDM_WAS_BROADCAST) { // propagate errors though tracker->status_code = reply->StatusCode(); } if (tracker->current_count == tracker->expected_count) { // all ports have completed RunRDMCallback(tracker->callback, tracker->status_code); delete tracker; } } /** * Handle the DUB responses. This is unique because unlike an RDM splitter can * can return the DUB responses from each port (485 line in the splitter * world). We do this by concatenating the vectors together. * * The response codes should be one of: * RDM_DUB_RESPONSE - got a DUB response * RDM_TIMEOUT - no response received * RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED - the port doesn't support DUB * * The above list is ordered in highest to lowest precedence, i.e. if we get * any port with a RDM_DUB_RESPONSE, this overrides any other message. */ void Universe::HandleBroadcastDiscovery( broadcast_request_tracker *tracker, RDMReply *reply) { tracker->current_count++; if (reply->StatusCode() == ola::rdm::RDM_DUB_RESPONSE) { // RDM_DUB_RESPONSE is the highest priority tracker->status_code = ola::rdm::RDM_DUB_RESPONSE; } else if (reply->StatusCode() == ola::rdm::RDM_TIMEOUT && tracker->status_code != ola::rdm::RDM_DUB_RESPONSE) { // RDM_TIMEOUT is the second highest tracker->status_code = reply->StatusCode(); } else if (tracker->status_code != ola::rdm::RDM_DUB_RESPONSE && tracker->status_code != ola::rdm::RDM_TIMEOUT) { // everything else follows tracker->status_code = reply->StatusCode(); } // append any packets to the main packets vector tracker->frames.insert(tracker->frames.end(), reply->Frames().begin(), reply->Frames().end()); if (tracker->current_count == tracker->expected_count) { // all ports have completed RDMReply reply(tracker->status_code, NULL, tracker->frames); tracker->callback->Run(&reply); delete tracker; } } /* * Helper function to increment an Export Map variable */ void Universe::SafeIncrement(const string &name) { if (m_export_map) { (*m_export_map->GetUIntMapVar(name))[m_universe_id_str]++; } } /* * Helper function to decrement an Export Map variable */ void Universe::SafeDecrement(const string &name) { if (m_export_map) { (*m_export_map->GetUIntMapVar(name))[m_universe_id_str]--; } } /* * Add an Input or Output port to this universe. * @param port, the port to add * @param ports, the vector of ports to add to */ template bool Universe::GenericAddPort(PortClass *port, vector *ports) { if (find(ports->begin(), ports->end(), port) != ports->end()) { return true; } ports->push_back(port); if (m_export_map) { UIntMap *map = m_export_map->GetUIntMapVar( IsInputPort() ? K_UNIVERSE_INPUT_PORT_VAR : K_UNIVERSE_OUTPUT_PORT_VAR); (*map)[m_universe_id_str]++; } return true; } /* * Remove an Input or Output port from this universe. * @param port, the port to add * @param ports, the vector of ports to remove from */ template bool Universe::GenericRemovePort(PortClass *port, vector *ports, map *uid_map) { typename vector::iterator iter = find(ports->begin(), ports->end(), port); if (iter == ports->end()) { OLA_DEBUG << "Could not find port " << port->UniqueId() << " in universe " << UniverseId(); return true; } ports->erase(iter); if (m_export_map) { UIntMap *map = m_export_map->GetUIntMapVar( IsInputPort() ? K_UNIVERSE_INPUT_PORT_VAR : K_UNIVERSE_OUTPUT_PORT_VAR); (*map)[m_universe_id_str]--; } if (!IsActive()) { m_universe_store->AddUniverseGarbageCollection(this); } // Remove any uids that mapped to this port if (uid_map) { typename map::iterator uid_iter = uid_map->begin(); while (uid_iter != uid_map->end()) { if (uid_iter->second == port) { uid_map->erase(uid_iter++); } else { ++uid_iter; } } } return true; } /* * Check if this universe contains a particular port. * @param port, the port to add * @param ports, the vector of ports to remove from */ template bool Universe::GenericContainsPort(PortClass *port, const vector &ports) const { return find(ports.begin(), ports.end(), port) != ports.end(); } } // namespace ola ola-0.10.9/olad/plugin_api/Port.cpp0000664000175000017500000001373014376533110014004 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Port.cpp * Base implementation of the Port class. * Copyright (C) 2005 Simon Newton * * Unfortunately this file contains a lot of code duplication. */ #include #include #include #include "ola/Logging.h" #include "ola/rdm/UIDSet.h" #include "olad/Device.h" #include "olad/Port.h" #include "olad/PortBroker.h" namespace ola { using std::auto_ptr; using std::string; using std::vector; BasicInputPort::BasicInputPort(AbstractDevice *parent, unsigned int port_id, const PluginAdaptor *plugin_adaptor, bool supports_rdm): m_port_id(port_id), m_priority(ola::dmx::SOURCE_PRIORITY_DEFAULT), m_priority_mode(PRIORITY_MODE_STATIC), m_port_string(""), m_universe(NULL), m_device(parent), m_plugin_adaptor(plugin_adaptor), m_supports_rdm(supports_rdm) { } bool BasicInputPort::SetUniverse(Universe *new_universe) { Universe *old_universe = GetUniverse(); if (old_universe == new_universe) return true; if (PreSetUniverse(old_universe, new_universe)) { m_universe = new_universe; PostSetUniverse(old_universe, new_universe); return true; } return false; } string BasicInputPort::UniqueId() const { if (m_port_string.empty()) { std::ostringstream str; if (m_device) str << m_device->UniqueId() << "-I-" << m_port_id; m_port_string = str.str(); } return m_port_string; } bool BasicInputPort::SetPriority(uint8_t priority) { if (priority > ola::dmx::SOURCE_PRIORITY_MAX) return false; m_priority = priority; return true; } void BasicInputPort::DmxChanged() { if (GetUniverse()) { const DmxBuffer &buffer = ReadDMX(); uint8_t priority = (PriorityCapability() == CAPABILITY_FULL && GetPriorityMode() == PRIORITY_MODE_INHERIT ? InheritedPriority() : GetPriority()); m_dmx_source.UpdateData(buffer, *m_plugin_adaptor->WakeUpTime(), priority); GetUniverse()->PortDataChanged(this); } } void BasicInputPort::HandleRDMRequest(ola::rdm::RDMRequest *request_ptr, ola::rdm::RDMCallback *callback) { auto_ptr request(request_ptr); if (m_universe) { m_plugin_adaptor->GetPortBroker()->SendRDMRequest( this, m_universe, request.release(), callback); } else { ola::rdm::RunRDMCallback(callback, ola::rdm::RDM_FAILED_TO_SEND); } } void BasicInputPort::TriggerRDMDiscovery( ola::rdm::RDMDiscoveryCallback *on_complete, bool full) { if (m_universe) { m_universe->RunRDMDiscovery(on_complete, full); } else { ola::rdm::UIDSet uids; on_complete->Run(uids); } } BasicOutputPort::BasicOutputPort(AbstractDevice *parent, unsigned int port_id, bool start_rdm_discovery_on_patch, bool supports_rdm): m_port_id(port_id), m_discover_on_patch(start_rdm_discovery_on_patch), m_priority(ola::dmx::SOURCE_PRIORITY_DEFAULT), m_priority_mode(PRIORITY_MODE_INHERIT), m_port_string(""), m_universe(NULL), m_device(parent), m_supports_rdm(supports_rdm) { } bool BasicOutputPort::SetUniverse(Universe *new_universe) { Universe *old_universe = GetUniverse(); if (old_universe == new_universe) return true; if (PreSetUniverse(old_universe, new_universe)) { m_universe = new_universe; PostSetUniverse(old_universe, new_universe); if (m_discover_on_patch) RunIncrementalDiscovery( NewSingleCallback(this, &BasicOutputPort::UpdateUIDs)); return true; } return false; } string BasicOutputPort::UniqueId() const { if (m_port_string.empty()) { std::ostringstream str; if (m_device) str << m_device->UniqueId() << "-O-" << m_port_id; m_port_string = str.str(); } return m_port_string; } bool BasicOutputPort::SetPriority(uint8_t priority) { if (priority > ola::dmx::SOURCE_PRIORITY_MAX) return false; m_priority = priority; return true; } void BasicOutputPort::SendRDMRequest(ola::rdm::RDMRequest *request_ptr, ola::rdm::RDMCallback *callback) { auto_ptr request(request_ptr); // broadcasts go to every port if (request->DestinationUID().IsBroadcast()) { ola::rdm::RunRDMCallback(callback, ola::rdm::RDM_WAS_BROADCAST); } else { OLA_WARN << "In base HandleRDMRequest, something has gone wrong with RDM" << " request routing"; ola::rdm::RunRDMCallback(callback, ola::rdm::RDM_FAILED_TO_SEND); } } void BasicOutputPort::RunFullDiscovery( ola::rdm::RDMDiscoveryCallback *on_complete) { ola::rdm::UIDSet uids; on_complete->Run(uids); } void BasicOutputPort::RunIncrementalDiscovery( ola::rdm::RDMDiscoveryCallback *on_complete) { ola::rdm::UIDSet uids; on_complete->Run(uids); } void BasicOutputPort::UpdateUIDs(const ola::rdm::UIDSet &uids) { Universe *universe = GetUniverse(); if (universe) universe->NewUIDList(this, uids); } template bool IsInputPort() { return true; } template<> bool IsInputPort() { return false; } template<> bool IsInputPort() { return true; } } // namespace ola ola-0.10.9/olad/plugin_api/TestCommon.h0000664000175000017500000002251314376533110014614 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * TestCommon.h * Test fixture for various olad classes * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_PLUGIN_API_TESTCOMMON_H_ #define OLAD_PLUGIN_API_TESTCOMMON_H_ #include #include #include #include #include #include "ola/Clock.h" #include "ola/DmxBuffer.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/UIDSet.h" #include "olad/Device.h" #include "olad/Plugin.h" #include "olad/Port.h" #include "olad/plugin_api/PortManager.h" /* * Mock out an Input Port */ class TestMockInputPort: public ola::BasicInputPort { public: TestMockInputPort(ola::AbstractDevice *parent, unsigned int port_id, const ola::PluginAdaptor *plugin_adaptor) : ola::BasicInputPort(parent, port_id, plugin_adaptor) {} ~TestMockInputPort() {} std::string Description() const { return ""; } bool WriteDMX(const ola::DmxBuffer &buffer) { m_buffer = buffer; return true; } const ola::DmxBuffer &ReadDMX() const { return m_buffer; } private: ola::DmxBuffer m_buffer; }; /* * Same as above but this supports priorities */ class TestMockPriorityInputPort: public TestMockInputPort { public: TestMockPriorityInputPort(ola::AbstractDevice *parent, unsigned int port_id, const ola::PluginAdaptor *plugin_adaptor) : TestMockInputPort(parent, port_id, plugin_adaptor), m_inherited_priority(ola::dmx::SOURCE_PRIORITY_DEFAULT) { } uint8_t InheritedPriority() const { return m_inherited_priority; } void SetInheritedPriority(uint8_t priority) { m_inherited_priority = priority; } protected: bool SupportsPriorities() const { return true; } private: uint8_t m_inherited_priority; }; /* * Mock out an OutputPort */ class TestMockOutputPort: public ola::BasicOutputPort { public: TestMockOutputPort(ola::AbstractDevice *parent, unsigned int port_id, bool start_rdm_discovery_on_patch = false, bool supports_rdm = false) : ola::BasicOutputPort(parent, port_id, start_rdm_discovery_on_patch, supports_rdm) { } ~TestMockOutputPort() {} std::string Description() const { return ""; } bool WriteDMX(const ola::DmxBuffer &buffer, uint8_t priority) { m_buffer = buffer; (void) priority; return true; } const ola::DmxBuffer &ReadDMX() const { return m_buffer; } private: ola::DmxBuffer m_buffer; }; /* * Mock out an RDM OutputPort */ class TestMockRDMOutputPort: public TestMockOutputPort { public: typedef ola::BaseCallback2 RDMRequestHandler; TestMockRDMOutputPort(ola::AbstractDevice *parent, unsigned int port_id, ola::rdm::UIDSet *uids, bool start_rdm_discovery_on_patch = false, RDMRequestHandler *rdm_handler = NULL) : TestMockOutputPort(parent, port_id, start_rdm_discovery_on_patch, true), m_uids(uids), m_rdm_handler(rdm_handler) { } ~TestMockRDMOutputPort() {} void SetRDMHandler(RDMRequestHandler *handler) { m_rdm_handler.reset(handler); } void SendRDMRequest(ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *callback) { // if a RDMRequestHandler was provided use that. if (m_rdm_handler.get()) { m_rdm_handler->Run(request, callback); return; } // otherwise just return a RDM_FAILED_TO_SEND delete request; RunRDMCallback(callback, ola::rdm::RDM_FAILED_TO_SEND); } void RunFullDiscovery(ola::rdm::RDMDiscoveryCallback *on_complete) { on_complete->Run(*m_uids); } void RunIncrementalDiscovery(ola::rdm::RDMDiscoveryCallback *on_complete) { on_complete->Run(*m_uids); } private: ola::rdm::UIDSet *m_uids; std::auto_ptr m_rdm_handler; }; /* * Same as above but this supports priorities */ class TestMockPriorityOutputPort: public TestMockOutputPort { public: TestMockPriorityOutputPort(ola::AbstractDevice *parent, unsigned int port_id): TestMockOutputPort(parent, port_id) {} protected: bool SupportsPriorities() const { return true; } }; /* * A mock device */ class MockDevice: public ola::Device { public: MockDevice(ola::AbstractPlugin *owner, const std::string &name) : Device(owner, name) {} std::string DeviceId() const { return Name(); } bool AllowLooping() const { return false; } bool AllowMultiPortPatching() const { return false; } }; /* * A mock device with looping and multiport patching enabled */ class MockDeviceLoopAndMulti: public ola::Device { public: MockDeviceLoopAndMulti(ola::AbstractPlugin *owner, const std::string &name) : Device(owner, name) {} std::string DeviceId() const { return Name(); } bool AllowLooping() const { return true; } bool AllowMultiPortPatching() const { return true; } }; /* * A mock plugin. */ class TestMockPlugin: public ola::Plugin { public: TestMockPlugin(ola::PluginAdaptor *plugin_adaptor, ola::ola_plugin_id plugin_id, bool enabled = true) : Plugin(plugin_adaptor), m_is_running(false), m_enabled(enabled), m_id(plugin_id) {} TestMockPlugin(ola::PluginAdaptor *plugin_adaptor, ola::ola_plugin_id plugin_id, const std::set &conflict_set, bool enabled = true) : Plugin(plugin_adaptor), m_is_running(false), m_enabled(enabled), m_id(plugin_id), m_conflict_set(conflict_set) {} void ConflictsWith(std::set *conflict_set) const { *conflict_set = m_conflict_set; } bool LoadPreferences() { m_preferences = m_plugin_adaptor->NewPreference(PluginPrefix()); return true; } std::string PreferencesSource() const { return ""; } bool IsEnabled() const { return m_enabled; } bool StartHook() { m_is_running = true; return true; } bool StopHook() { m_is_running = false; return true; } std::string Name() const { std::ostringstream str; str << m_id; return str.str(); } std::string Description() const { return "bar"; } ola::ola_plugin_id Id() const { return m_id; } std::string PluginPrefix() const { return "test"; } bool IsRunning() { return m_is_running; } private: bool m_is_running; bool m_enabled; ola::ola_plugin_id m_id; std::set m_conflict_set; }; /** * We mock this out so we can manipulate the wake up time. It was either this * or the mocking the plugin adaptor. */ class MockSelectServer: public ola::io::SelectServerInterface { public: explicit MockSelectServer(const ola::TimeStamp *wake_up) : SelectServerInterface(), m_wake_up(wake_up) {} ~MockSelectServer() {} bool AddReadDescriptor(ola::io::ReadFileDescriptor *descriptor) { (void) descriptor; return true; } bool AddReadDescriptor(ola::io::ConnectedDescriptor *descriptor, bool delete_on_close = false) { (void) descriptor; (void) delete_on_close; return true; } void RemoveReadDescriptor(ola::io::ReadFileDescriptor *descriptor) { (void) descriptor; } void RemoveReadDescriptor(ola::io::ConnectedDescriptor *descriptor) { (void) descriptor; } bool AddWriteDescriptor(ola::io::WriteFileDescriptor *descriptor) { (void) descriptor; return true; } void RemoveWriteDescriptor(ola::io::WriteFileDescriptor *descriptor) { (void) descriptor; } ola::thread::timeout_id RegisterRepeatingTimeout( unsigned int, ola::Callback0 *) { return ola::thread::INVALID_TIMEOUT; } ola::thread::timeout_id RegisterRepeatingTimeout( const ola::TimeInterval&, ola::Callback0*) { return ola::thread::INVALID_TIMEOUT; } ola::thread::timeout_id RegisterSingleTimeout( unsigned int, ola::SingleUseCallback0 *) { return ola::thread::INVALID_TIMEOUT; } ola::thread::timeout_id RegisterSingleTimeout( const ola::TimeInterval&, ola::SingleUseCallback0 *) { return ola::thread::INVALID_TIMEOUT; } void RemoveTimeout(ola::thread::timeout_id id) { (void) id; } const ola::TimeStamp *WakeUpTime() const { return m_wake_up; } void Execute(ola::BaseCallback0 *callback) { callback->Run(); } void DrainCallbacks() {} private: const ola::TimeStamp *m_wake_up; }; #endif // OLAD_PLUGIN_API_TESTCOMMON_H_ ola-0.10.9/olad/plugin_api/PortManagerTest.cpp0000664000175000017500000002512514376533110016140 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PortManagerTest.cpp * Test fixture for the PortManager classes * Copyright (C) 2005 Simon Newton */ #include #include #include "olad/DmxSource.h" #include "olad/PortBroker.h" #include "olad/plugin_api/PortManager.h" #include "olad/plugin_api/TestCommon.h" #include "olad/plugin_api/UniverseStore.h" #include "ola/testing/TestUtils.h" using ola::DmxSource; using ola::PortManager; using ola::Port; using ola::Universe; using std::string; class PortManagerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(PortManagerTest); CPPUNIT_TEST(testPortPatching); CPPUNIT_TEST(testPortPatchingLoopMulti); CPPUNIT_TEST(testInputPortSetPriority); CPPUNIT_TEST(testOutputPortSetPriority); CPPUNIT_TEST_SUITE_END(); public: void testPortPatching(); void testPortPatchingLoopMulti(); void testInputPortSetPriority(); void testOutputPortSetPriority(); }; CPPUNIT_TEST_SUITE_REGISTRATION(PortManagerTest); /* * Check that we can patch ports correctly. */ void PortManagerTest::testPortPatching() { ola::UniverseStore uni_store(NULL, NULL); ola::PortBroker broker; ola::PortManager port_manager(&uni_store, &broker); // mock device, this doesn't allow looping or multiport patching MockDevice device1(NULL, "test_device_1"); TestMockInputPort input_port(&device1, 1, NULL); TestMockInputPort input_port2(&device1, 2, NULL); TestMockOutputPort output_port(&device1, 1); TestMockOutputPort output_port2(&device1, 2); device1.AddPort(&input_port); device1.AddPort(&input_port2); device1.AddPort(&output_port); device1.AddPort(&output_port2); OLA_ASSERT_EQ(static_cast(NULL), input_port.GetUniverse()); OLA_ASSERT_EQ(static_cast(NULL), input_port2.GetUniverse()); OLA_ASSERT_EQ(static_cast(NULL), output_port.GetUniverse()); OLA_ASSERT_EQ(static_cast(NULL), output_port2.GetUniverse()); // simple patching OLA_ASSERT(port_manager.PatchPort(&input_port, 1)); OLA_ASSERT(port_manager.PatchPort(&output_port, 2)); OLA_ASSERT(input_port.GetUniverse()); OLA_ASSERT_EQ((unsigned int) 1, input_port.GetUniverse()->UniverseId()); OLA_ASSERT_EQ(static_cast(NULL), input_port2.GetUniverse()); OLA_ASSERT(output_port.GetUniverse()); OLA_ASSERT_EQ((unsigned int) 2, output_port.GetUniverse()->UniverseId()); OLA_ASSERT_EQ(static_cast(NULL), output_port2.GetUniverse()); // test looping OLA_ASSERT_FALSE(port_manager.PatchPort(&input_port2, 2)); OLA_ASSERT_FALSE(port_manager.PatchPort(&output_port2, 1)); OLA_ASSERT_EQ(static_cast(NULL), input_port2.GetUniverse()); OLA_ASSERT_EQ(static_cast(NULL), output_port2.GetUniverse()); // test multiport OLA_ASSERT_FALSE(port_manager.PatchPort(&input_port2, 1)); OLA_ASSERT_FALSE(port_manager.PatchPort(&output_port2, 2)); OLA_ASSERT_EQ(static_cast(NULL), input_port2.GetUniverse()); OLA_ASSERT_EQ(static_cast(NULL), output_port2.GetUniverse()); // test repatching OLA_ASSERT(port_manager.PatchPort(&input_port, 3)); OLA_ASSERT(port_manager.PatchPort(&output_port, 4)); OLA_ASSERT(input_port.GetUniverse()); OLA_ASSERT_EQ((unsigned int) 3, input_port.GetUniverse()->UniverseId()); OLA_ASSERT(output_port.GetUniverse()); OLA_ASSERT_EQ((unsigned int) 4, output_port.GetUniverse()->UniverseId()); // test unpatching OLA_ASSERT(port_manager.UnPatchPort(&input_port)); OLA_ASSERT(port_manager.UnPatchPort(&input_port2)); OLA_ASSERT(port_manager.UnPatchPort(&output_port)); OLA_ASSERT(port_manager.UnPatchPort(&output_port2)); OLA_ASSERT_EQ(static_cast(NULL), input_port.GetUniverse()); OLA_ASSERT_EQ(static_cast(NULL), input_port2.GetUniverse()); OLA_ASSERT_EQ(static_cast(NULL), output_port.GetUniverse()); OLA_ASSERT_EQ(static_cast(NULL), output_port2.GetUniverse()); } /* * test that patching works correctly for devices with looping and multiport * patching enabled. */ void PortManagerTest::testPortPatchingLoopMulti() { ola::UniverseStore uni_store(NULL, NULL); ola::PortBroker broker; ola::PortManager port_manager(&uni_store, &broker); // mock device that allows looping and multi port patching MockDeviceLoopAndMulti device1(NULL, "test_device_1"); TestMockInputPort input_port(&device1, 1, NULL); TestMockInputPort input_port2(&device1, 2, NULL); TestMockOutputPort output_port(&device1, 1); TestMockOutputPort output_port2(&device1, 2); device1.AddPort(&input_port); device1.AddPort(&input_port2); device1.AddPort(&output_port); device1.AddPort(&output_port2); OLA_ASSERT_EQ(static_cast(NULL), input_port.GetUniverse()); OLA_ASSERT_EQ(static_cast(NULL), input_port2.GetUniverse()); OLA_ASSERT_EQ(static_cast(NULL), output_port.GetUniverse()); OLA_ASSERT_EQ(static_cast(NULL), output_port2.GetUniverse()); // simple patching OLA_ASSERT(port_manager.PatchPort(&input_port, 1)); OLA_ASSERT(port_manager.PatchPort(&output_port, 2)); OLA_ASSERT(input_port.GetUniverse()); OLA_ASSERT_EQ((unsigned int) 1, input_port.GetUniverse()->UniverseId()); OLA_ASSERT_EQ(static_cast(NULL), input_port2.GetUniverse()); OLA_ASSERT(output_port.GetUniverse()); OLA_ASSERT_EQ((unsigned int) 2, output_port.GetUniverse()->UniverseId()); OLA_ASSERT_EQ(static_cast(NULL), output_port2.GetUniverse()); // test looping OLA_ASSERT(port_manager.PatchPort(&input_port2, 2)); OLA_ASSERT(port_manager.PatchPort(&output_port2, 1)); OLA_ASSERT(input_port2.GetUniverse()); OLA_ASSERT_EQ((unsigned int) 2, input_port2.GetUniverse()->UniverseId()); OLA_ASSERT(output_port2.GetUniverse()); OLA_ASSERT_EQ((unsigned int) 1, output_port2.GetUniverse()->UniverseId()); // test multiport OLA_ASSERT(port_manager.PatchPort(&input_port2, 1)); OLA_ASSERT(port_manager.PatchPort(&output_port2, 2)); OLA_ASSERT(input_port2.GetUniverse()); OLA_ASSERT_EQ((unsigned int) 1, input_port2.GetUniverse()->UniverseId()); OLA_ASSERT(output_port2.GetUniverse()); OLA_ASSERT_EQ((unsigned int) 2, output_port2.GetUniverse()->UniverseId()); } /* * Check that we can set priorities on an input port */ void PortManagerTest::testInputPortSetPriority() { // we're not testing patching so pass NULL here PortManager patcher(NULL, NULL); // Input port that doesn't support priorities TestMockInputPort input_port(NULL, 0, NULL); OLA_ASSERT_EQ(input_port.PriorityCapability(), ola::CAPABILITY_STATIC); OLA_ASSERT_EQ(input_port.GetPriorityMode(), ola::PRIORITY_MODE_STATIC); OLA_ASSERT_EQ(input_port.GetPriority(), ola::dmx::SOURCE_PRIORITY_DEFAULT); // this port doesn't support priorities so this is a noop OLA_ASSERT(patcher.SetPriorityInherit(&input_port)); OLA_ASSERT_EQ(input_port.GetPriorityMode(), ola::PRIORITY_MODE_STATIC); OLA_ASSERT_EQ(input_port.GetPriority(), ola::dmx::SOURCE_PRIORITY_DEFAULT); // set the static priority to 20 OLA_ASSERT(patcher.SetPriorityStatic(&input_port, 20)); OLA_ASSERT_EQ(input_port.GetPriorityMode(), ola::PRIORITY_MODE_STATIC); OLA_ASSERT_EQ(input_port.GetPriority(), (uint8_t) 20); // Now test an input port that does support priorities TestMockPriorityInputPort input_port2(NULL, 1, NULL); OLA_ASSERT_EQ(input_port2.PriorityCapability(), ola::CAPABILITY_FULL); OLA_ASSERT_EQ(input_port2.GetPriorityMode(), ola::PRIORITY_MODE_STATIC); OLA_ASSERT_EQ(input_port2.GetPriority(), ola::dmx::SOURCE_PRIORITY_DEFAULT); // try changing to static mode OLA_ASSERT(patcher.SetPriorityStatic(&input_port2, 20)); OLA_ASSERT_EQ(input_port2.GetPriorityMode(), ola::PRIORITY_MODE_STATIC); OLA_ASSERT_EQ(input_port2.GetPriority(), (uint8_t) 20); // bump priority OLA_ASSERT(patcher.SetPriorityStatic(&input_port2, 180)); OLA_ASSERT_EQ(input_port2.GetPriorityMode(), ola::PRIORITY_MODE_STATIC); OLA_ASSERT_EQ(input_port2.GetPriority(), (uint8_t) 180); // change to inherit mode OLA_ASSERT(patcher.SetPriorityInherit(&input_port2)); OLA_ASSERT_EQ(input_port2.GetPriorityMode(), ola::PRIORITY_MODE_INHERIT); OLA_ASSERT_EQ(input_port2.GetPriority(), (uint8_t) 180); } /* * Check that we can set priorities on an Output port */ void PortManagerTest::testOutputPortSetPriority() { // we're not testing patching so pass NULL here PortManager patcher(NULL, NULL); // Input port that doesn't support priorities TestMockOutputPort output_port(NULL, 0); OLA_ASSERT_EQ(output_port.PriorityCapability(), ola::CAPABILITY_NONE); OLA_ASSERT_EQ(output_port.GetPriorityMode(), ola::PRIORITY_MODE_INHERIT); OLA_ASSERT_EQ(output_port.GetPriority(), ola::dmx::SOURCE_PRIORITY_DEFAULT); // this port doesn't support priorities so these are all noops OLA_ASSERT(patcher.SetPriorityInherit(&output_port)); OLA_ASSERT(patcher.SetPriorityStatic(&output_port, 20)); OLA_ASSERT_EQ(output_port.GetPriorityMode(), ola::PRIORITY_MODE_INHERIT); OLA_ASSERT_EQ(output_port.GetPriority(), ola::dmx::SOURCE_PRIORITY_DEFAULT); // now test an output port that supports priorities TestMockPriorityOutputPort output_port2(NULL, 1); OLA_ASSERT_EQ(output_port2.PriorityCapability(), ola::CAPABILITY_FULL); OLA_ASSERT_EQ(output_port2.GetPriorityMode(), ola::PRIORITY_MODE_INHERIT); OLA_ASSERT_EQ(output_port2.GetPriority(), ola::dmx::SOURCE_PRIORITY_DEFAULT); // try changing to static mode OLA_ASSERT(patcher.SetPriorityStatic(&output_port2, 20)); OLA_ASSERT_EQ(output_port2.GetPriorityMode(), ola::PRIORITY_MODE_STATIC); OLA_ASSERT_EQ(output_port2.GetPriority(), (uint8_t) 20); // bump priority OLA_ASSERT(patcher.SetPriorityStatic(&output_port2, 180)); OLA_ASSERT_EQ(output_port2.GetPriorityMode(), ola::PRIORITY_MODE_STATIC); OLA_ASSERT_EQ(output_port2.GetPriority(), (uint8_t) 180); // change back to inherit mode OLA_ASSERT(patcher.SetPriorityInherit(&output_port2)); OLA_ASSERT_EQ(output_port2.GetPriorityMode(), ola::PRIORITY_MODE_INHERIT); OLA_ASSERT_EQ(output_port2.GetPriority(), (uint8_t) 180); } ola-0.10.9/olad/plugin_api/DeviceManager.h0000664000175000017500000001240314376533110015213 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DeviceManager.h * Interface to the DeviceManager class * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_PLUGIN_API_DEVICEMANAGER_H_ #define OLAD_PLUGIN_API_DEVICEMANAGER_H_ #include #include #include #include #include "ola/base/Macro.h" #include "ola/timecode/TimeCode.h" #include "olad/Device.h" #include "olad/Preferences.h" namespace ola { // pair a device with it's alias class device_alias_pair { public: unsigned int alias; AbstractDevice *device; device_alias_pair(unsigned int alias, AbstractDevice *device) : alias(alias), device(device) {} }; bool operator <(const device_alias_pair& left, const device_alias_pair &right); /** * @brief Keeps track of OLA's devices. * * Devices can be identified in one of two ways, by device-id or by alias. * device-ids are strings and are persistent across restarting olad and reload * the plugins. device-ids are the keys used in preference containers to * identify devices. * * Device aliases are unsigned integers and are only valid for the lifetime of * the DeviceManager object. Device aliases are used by users when patching / * controlling a device. since '1' is easier to understand / type * than 5-02050016. If a device is registered, then unregistered, then * registered again, it'll have the same device alias. */ class DeviceManager { public: /** * @brief Create a new DeviceManager. * @param prefs_factory the PreferencesFactory to use, ownership is not * transferred. * @param port_manager the PortManager to use, ownership is not transferred. */ DeviceManager(PreferencesFactory *prefs_factory, class PortManager *port_manager); /** * @brief Destructor. */ ~DeviceManager(); /** * @brief Register a device. * @param device The device to register, ownership is not transferred. * @returns true on success, false on failure. * * During registration, any saved port patchings for this device are restored. */ bool RegisterDevice(AbstractDevice *device); /** * @brief Unregister a device by id. * @param device_id the id of the device to remove * @returns true on success, false on failure */ bool UnregisterDevice(const std::string &device_id); /** * @brief Unregister a device by pointer. * @param device a pointer to the device. * @returns true on success, false on failure */ bool UnregisterDevice(const AbstractDevice *device); /** * @brief Return the number of devices. * @returns the number of devices. */ unsigned int DeviceCount() const; /** * @brief Return a list of all devices and their aliases. * @returns a vector of device_alias_pairs. */ std::vector Devices() const; /** * @brief Lookup a device using the device alias. * @returns a pointer to the device or NULL if the device wasn't found. */ AbstractDevice *GetDevice(unsigned int alias) const; /** * @brief Lookup a device using the device id. * @param unique_id the device id of the device. * @returns a device_alias_pair, if the device isn't found the alias is set to * MISSING_DEVICE_ALIAS and the device pointer is NULL. */ device_alias_pair GetDevice(const std::string &unique_id) const; /** * @brief Remove all devices. */ void UnregisterAllDevices(); /** * @brief Send timecode to all ports which support timecode. * @param timecode the TimeCode information. */ void SendTimeCode(const ola::timecode::TimeCode &timecode); static const unsigned int MISSING_DEVICE_ALIAS; private: typedef std::map DeviceIdMap; typedef std::map DeviceAliasMap; Preferences *m_port_preferences; class PortManager *m_port_manager; DeviceIdMap m_devices; DeviceAliasMap m_alias_map; unsigned int m_next_device_alias; std::set m_timecode_ports; void ReleaseDevice(const AbstractDevice *device); void RestoreDevicePortSettings(AbstractDevice *device); template void SavePortPatchings(const std::vector &ports) const; void SavePortPriority(const Port &port) const; void RestorePortPriority(Port *port) const; template void RestorePortSettings(const std::vector &ports) const; static const char PORT_PREFERENCES[]; static const unsigned int FIRST_DEVICE_ALIAS = 1; static const char PRIORITY_VALUE_SUFFIX[]; static const char PRIORITY_MODE_SUFFIX[]; DISALLOW_COPY_AND_ASSIGN(DeviceManager); }; } // namespace ola #endif // OLAD_PLUGIN_API_DEVICEMANAGER_H_ ola-0.10.9/olad/plugin_api/Client.cpp0000664000175000017500000000530114376533110014271 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Client.cpp * Represents a connected client. * Copyright (C) 2005 Simon Newton */ #include #include #include "common/protocol/Ola.pb.h" #include "common/protocol/OlaService.pb.h" #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/rdm/UID.h" #include "ola/stl/STLUtils.h" #include "olad/plugin_api/Client.h" namespace ola { using ola::rdm::UID; using ola::rpc::RpcController; using std::map; Client::Client(ola::proto::OlaClientService_Stub *client_stub, const ola::rdm::UID &uid) : m_client_stub(client_stub), m_uid(uid) { } Client::~Client() { m_data_map.clear(); } bool Client::SendDMX(unsigned int universe, uint8_t priority, const DmxBuffer &buffer) { if (!m_client_stub.get()) { OLA_FATAL << "client_stub is null"; return false; } RpcController *controller = new RpcController(); ola::proto::DmxData dmx_data; ola::proto::Ack *ack = new ola::proto::Ack(); dmx_data.set_priority(priority); dmx_data.set_universe(universe); dmx_data.set_data(buffer.Get()); m_client_stub->UpdateDmxData( controller, &dmx_data, ack, ola::NewSingleCallback(this, &ola::Client::SendDMXCallback, controller, ack)); return true; } void Client::DMXReceived(unsigned int universe, const DmxSource &source) { STLReplace(&m_data_map, universe, source); } const DmxSource Client::SourceData(unsigned int universe) const { map::const_iterator iter = m_data_map.find(universe); if (iter != m_data_map.end()) { return iter->second; } else { DmxSource source; return source; } } ola::rdm::UID Client::GetUID() const { return m_uid; } void Client::SetUID(const ola::rdm::UID &uid) { m_uid = uid; } /* * Called when UpdateDmxData completes. */ void Client::SendDMXCallback(RpcController *controller, ola::proto::Ack *reply) { delete controller; delete reply; } } // namespace ola ola-0.10.9/olad/plugin_api/UniverseStore.h0000664000175000017500000000632714376533110015346 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * UniverseStore.h * The Universe Store class - this manages the universes * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_PLUGIN_API_UNIVERSESTORE_H_ #define OLAD_PLUGIN_API_UNIVERSESTORE_H_ #include #include #include #include #include "ola/Clock.h" #include "ola/base/Macro.h" namespace ola { class Universe; /** * @brief Maintains a collection of Universe objects. */ class UniverseStore { public: /** * @brief Create a new UniverseStore. * @param preferences The Preferences store. * @param export_map the ExportMap to use for stats, may be NULL. */ UniverseStore(class Preferences *preferences, class ExportMap *export_map); /** * @brief Destructor. */ ~UniverseStore(); /** * @brief Lookup a universe from its universe-id. * @param universe_id the universe-id of the universe. * @return the universe, or NULL if the universe doesn't exist. */ Universe *GetUniverse(unsigned int universe_id) const; /** * @brief Lookup a universe, or create it if it does not exist. * @param universe_id the universe-id of the universe. * @return the universe, or NULL on error */ Universe *GetUniverseOrCreate(unsigned int universe_id); /** * @brief Return the number of universes. */ unsigned int UniverseCount() const { return m_universe_map.size(); } /** * @brief Returns a list of universes. This must be freed when you're * done with it. * @param[out] universes a pointer to a vector of Universes. */ void GetList(std::vector *universes) const; /** * @brief Delete all universes. */ void DeleteAll(); /** * @brief Mark a universe as a candidate for garbage collection. * @param universe the Universe which has no clients or ports bound. */ void AddUniverseGarbageCollection(Universe *universe); /** * @brief Garbage collect any pending universes. */ void GarbageCollectUniverses(); private: typedef std::map UniverseMap; Preferences *m_preferences; ExportMap *m_export_map; UniverseMap m_universe_map; std::set m_deletion_candidates; // list of universes we may be // able to delete Clock m_clock; bool RestoreUniverseSettings(Universe *universe) const; bool SaveUniverseSettings(Universe *universe) const; static const unsigned int MINIMUM_RDM_DISCOVERY_INTERVAL; DISALLOW_COPY_AND_ASSIGN(UniverseStore); }; } // namespace ola #endif // OLAD_PLUGIN_API_UNIVERSESTORE_H_ ola-0.10.9/olad/plugin_api/PortBroker.cpp0000664000175000017500000000556114376533110015154 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PortBroker.cpp * Acts as the glue between ports and the RDM request path. * Copyright (C) 2010 Simon Newton */ #include #include #include #include "ola/Callback.h" #include "ola/Logging.h" #include "olad/PortBroker.h" namespace ola { using std::pair; using std::set; using std::string; using std::vector; /** * Add a port to the broker */ void PortBroker::AddPort(const Port *port) { port_key key(port->UniqueId(), port); m_ports.insert(key); } /** * Remove a port from the broker */ void PortBroker::RemovePort(const Port *port) { port_key key(port->UniqueId(), port); m_ports.erase(key); } /** * Make an RDM call * @param port the OlaPortService that should exist when the call returns * @param universe the universe to send the RDM request on * @param request the RDM request * @param callback the callback to run when the request completes */ void PortBroker::SendRDMRequest(const Port *port, Universe *universe, ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *callback) { port_key key(port->UniqueId(), port); set::const_iterator iter = m_ports.find(key); if (iter == m_ports.end()) OLA_WARN << "Making an RDM call but the port doesn't exist in the broker!"; universe->SendRDMRequest( request, NewSingleCallback(this, &PortBroker::RequestComplete, key, callback)); } /** * Return from an RDM call * @param key the port associated with this request * @param callback the callback to run if the key still exists * @param status the status of the RDM request * @param response the RDM response */ void PortBroker::RequestComplete(port_key key, ola::rdm::RDMCallback *callback, ola::rdm::RDMReply *reply) { set::const_iterator iter = m_ports.find(key); if (iter == m_ports.end()) { OLA_INFO << "Port no longer exists, cleaning up from RDM response"; delete callback; } else { callback->Run(reply); } } } // namespace ola ola-0.10.9/olad/plugin_api/DmxSourceTest.cpp0000664000175000017500000000534414376533110015633 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DmxSourceTest.cpp * Test fixture for the DmxSource classes * Copyright (C) 2005 Simon Newton */ #include #include #include #include "ola/Clock.h" #include "ola/DmxBuffer.h" #include "olad/DmxSource.h" #include "ola/testing/TestUtils.h" class DmxSourceTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DmxSourceTest); CPPUNIT_TEST(testDmxSource); CPPUNIT_TEST(testIsActive); CPPUNIT_TEST_SUITE_END(); public: void testDmxSource(); void testIsActive(); private: ola::Clock m_clock; }; CPPUNIT_TEST_SUITE_REGISTRATION(DmxSourceTest); using ola::Clock; using ola::DmxBuffer; using ola::DmxSource; using ola::TimeInterval; using ola::TimeStamp; /* * Check that the base device class works correctly. */ void DmxSourceTest::testDmxSource() { DmxBuffer buffer("123456789"); TimeStamp timestamp; m_clock.CurrentMonotonicTime(×tamp); DmxSource source(buffer, timestamp, 100); OLA_ASSERT(source.IsSet()); OLA_ASSERT(buffer == source.Data()); OLA_ASSERT_EQ(timestamp, source.Timestamp()); OLA_ASSERT_EQ((uint8_t) 100, source.Priority()); DmxBuffer buffer2("987654321"); TimeStamp timestamp2; m_clock.CurrentMonotonicTime(×tamp2); OLA_ASSERT_TRUE(timestamp <= timestamp2); source.UpdateData(buffer2, timestamp2, 120); OLA_ASSERT(buffer2 == source.Data()); OLA_ASSERT_EQ(timestamp2, source.Timestamp()); OLA_ASSERT_EQ((uint8_t) 120, source.Priority()); DmxSource empty_source; OLA_ASSERT_FALSE(empty_source.IsSet()); } /* * Test the time based checks */ void DmxSourceTest::testIsActive() { DmxBuffer buffer("123456789"); TimeStamp timestamp; m_clock.CurrentMonotonicTime(×tamp); DmxSource source(buffer, timestamp, 100); OLA_ASSERT(source.IsSet()); OLA_ASSERT(source.IsActive(timestamp)); TimeInterval interval(1000000); TimeStamp later = timestamp + interval; OLA_ASSERT(source.IsActive(later)); later = timestamp + TimeInterval(2500000); OLA_ASSERT_FALSE(source.IsActive(later)); } ola-0.10.9/olad/plugin_api/DeviceManager.cpp0000664000175000017500000002215614376533110015554 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DeviceManager.cpp * Implementation of the Device Manager, this object tracks what devices are in * use. * Copyright (C) 2005 Simon Newton */ #include "olad/plugin_api/DeviceManager.h" #include #include #include #include #include #include #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/stl/STLUtils.h" #include "olad/Port.h" #include "olad/plugin_api/PortManager.h" namespace ola { using std::map; using std::set; using std::string; using std::vector; const unsigned int DeviceManager::MISSING_DEVICE_ALIAS = 0; const char DeviceManager::PORT_PREFERENCES[] = "port"; const char DeviceManager::PRIORITY_VALUE_SUFFIX[] = "_priority_value"; const char DeviceManager::PRIORITY_MODE_SUFFIX[] = "_priority_mode"; bool operator <(const device_alias_pair& left, const device_alias_pair &right) { if (left.alias < right.alias) return true; return false; } DeviceManager::DeviceManager(PreferencesFactory *prefs_factory, PortManager *port_manager) : m_port_preferences(NULL), m_port_manager(port_manager), m_next_device_alias(FIRST_DEVICE_ALIAS) { if (prefs_factory) { m_port_preferences = prefs_factory->NewPreference(PORT_PREFERENCES); m_port_preferences->Load(); } } DeviceManager::~DeviceManager() { if (m_port_preferences) { m_port_preferences->Save(); } } bool DeviceManager::RegisterDevice(AbstractDevice *device) { if (!device) { return false; } const string device_id = device->UniqueId(); if (device_id.empty()) { OLA_WARN << "Device: " << device->Name() << " is missing UniqueId"; return false; } // See if we already have an alias for this device. unsigned int alias; DeviceIdMap::iterator iter = m_devices.find(device_id); if (iter != m_devices.end()) { if (iter->second.device) { // already registered OLA_INFO << "Device " << device_id << " is already registered"; return false; } else { // was previously registered, reuse alias alias = iter->second.alias; iter->second.device = device; } } else { alias = m_next_device_alias++; device_alias_pair pair(alias, device); STLReplace(&m_devices, device_id, pair); } STLReplace(&m_alias_map, alias, device); OLA_INFO << "Installed device: " << device->Name() << ":" << device->UniqueId(); vector input_ports; device->InputPorts(&input_ports); RestorePortSettings(input_ports); vector output_ports; device->OutputPorts(&output_ports); RestorePortSettings(output_ports); // look for timecode ports and add them to the set vector::const_iterator output_iter = output_ports.begin(); for (; output_iter != output_ports.end(); ++output_iter) { if ((*output_iter)->SupportsTimeCode()) { m_timecode_ports.insert(*output_iter); } } return true; } bool DeviceManager::UnregisterDevice(const string &device_id) { device_alias_pair *pair = STLFind(&m_devices, device_id); if (!pair || !pair->device) { OLA_WARN << "Device " << device_id << "not found"; return false; } ReleaseDevice(pair->device); STLRemove(&m_alias_map, pair->alias); pair->device = NULL; return true; } bool DeviceManager::UnregisterDevice(const AbstractDevice *device) { if (!device) { return false; } string device_id = device->UniqueId(); if (device_id.empty()) { return false; } return UnregisterDevice(device_id); } unsigned int DeviceManager::DeviceCount() const { return m_alias_map.size(); } vector DeviceManager::Devices() const { vector result; map::const_iterator iter; for (iter = m_devices.begin(); iter != m_devices.end(); ++iter) { if (iter->second.device) { result.push_back(iter->second); } } return result; } AbstractDevice *DeviceManager::GetDevice(unsigned int alias) const { return STLFindOrNull(m_alias_map, alias); } device_alias_pair DeviceManager::GetDevice(const string &unique_id) const { const device_alias_pair *result = STLFind(&m_devices, unique_id); if (result) { return *result; } else { return device_alias_pair(MISSING_DEVICE_ALIAS, NULL); } } void DeviceManager::UnregisterAllDevices() { DeviceIdMap::iterator iter; for (iter = m_devices.begin(); iter != m_devices.end(); ++iter) { ReleaseDevice(iter->second.device); iter->second.device = NULL; } m_alias_map.clear(); } void DeviceManager::SendTimeCode(const ola::timecode::TimeCode &timecode) { set::iterator iter = m_timecode_ports.begin(); for (; iter != m_timecode_ports.end(); iter++) { (*iter)->SendTimeCode(timecode); } } /* * Save the port universe patchings for a device * @param device the device to save the settings for */ void DeviceManager::ReleaseDevice(const AbstractDevice *device) { if (!m_port_preferences || !device) { return; } vector input_ports; vector output_ports; device->InputPorts(&input_ports); device->OutputPorts(&output_ports); SavePortPatchings(input_ports); SavePortPatchings(output_ports); vector::const_iterator input_iter = input_ports.begin(); for (; input_iter != input_ports.end(); ++input_iter) { SavePortPriority(**input_iter); } vector::const_iterator output_iter = output_ports.begin(); for (; output_iter != output_ports.end(); ++output_iter) { SavePortPriority(**output_iter); // remove from the timecode port set STLRemove(&m_timecode_ports, *output_iter); } } /* * Save the patching information for a list of ports. */ template void DeviceManager::SavePortPatchings(const vector &ports) const { typename vector::const_iterator iter = ports.begin(); while (iter != ports.end()) { string port_id = (*iter)->UniqueId(); if (port_id.empty()) { return; } if ((*iter)->GetUniverse()) { m_port_preferences->SetValue( port_id, IntToString((*iter)->GetUniverse()->UniverseId())); } else { m_port_preferences->RemoveValue(port_id); } iter++; } } /* * Save the priorities for all ports on this device */ void DeviceManager::SavePortPriority(const Port &port) const { if (port.PriorityCapability() == CAPABILITY_NONE) { return; } string port_id = port.UniqueId(); if (port_id.empty()) { return; } m_port_preferences->SetValue(port_id + PRIORITY_VALUE_SUFFIX, IntToString(port.GetPriority())); if (port.PriorityCapability() == CAPABILITY_FULL) { m_port_preferences->SetValue(port_id + PRIORITY_MODE_SUFFIX, IntToString(port.GetPriorityMode())); } } /* * Restore the priority settings for a port */ void DeviceManager::RestorePortPriority(Port *port) const { if (port->PriorityCapability() == CAPABILITY_NONE) { return; } string port_id = port->UniqueId(); if (port_id.empty()) { return; } string priority_str = m_port_preferences->GetValue( port_id + PRIORITY_VALUE_SUFFIX); string priority_mode_str = m_port_preferences->GetValue( port_id + PRIORITY_MODE_SUFFIX); if (priority_str.empty() && priority_mode_str.empty()) { return; } uint8_t priority, priority_mode; // setting the priority to override mode first means we remember the over // value even if it's in inherit mode if (StringToInt(priority_str, &priority)) { m_port_manager->SetPriorityStatic(port, priority); } if (StringToInt(priority_mode_str, &priority_mode)) { if (priority_mode == PRIORITY_MODE_INHERIT) { m_port_manager->SetPriorityInherit(port); } } } /* * Restore the patching information for a port. */ template void DeviceManager::RestorePortSettings(const vector &ports) const { if (!m_port_preferences) { return; } typename vector::const_iterator iter = ports.begin(); while (iter != ports.end()) { RestorePortPriority(*iter); PortClass *port = *iter; iter++; string port_id = port->UniqueId(); if (port_id.empty()) continue; string uni_id = m_port_preferences->GetValue(port_id); if (uni_id.empty()) continue; errno = 0; int id = static_cast(strtol(uni_id.c_str(), NULL, 10)); if ((id == 0 && errno) || id < 0) continue; m_port_manager->PatchPort(port, id); } } } // namespace ola ola-0.10.9/olad/plugin_api/UniverseStore.cpp0000664000175000017500000001363414376533110015700 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * UniverseStore.cpp * The universe store class. This maintains the set of all active universes and * saves the settings. * Copyright (C) 2005 Simon Newton */ #include "olad/plugin_api/UniverseStore.h" #include #include #include #include #include #include #include "ola/ExportMap.h" #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/stl/STLUtils.h" #include "olad/Preferences.h" #include "olad/Universe.h" namespace ola { using std::pair; using std::set; using std::string; using std::vector; const unsigned int UniverseStore::MINIMUM_RDM_DISCOVERY_INTERVAL = 30; UniverseStore::UniverseStore(Preferences *preferences, ExportMap *export_map) : m_preferences(preferences), m_export_map(export_map) { if (export_map) { export_map->GetStringMapVar(Universe::K_UNIVERSE_NAME_VAR, "universe"); export_map->GetStringMapVar(Universe::K_UNIVERSE_MODE_VAR, "universe"); const char *vars[] = { Universe::K_FPS_VAR, Universe::K_UNIVERSE_INPUT_PORT_VAR, Universe::K_UNIVERSE_OUTPUT_PORT_VAR, Universe::K_UNIVERSE_SINK_CLIENTS_VAR, Universe::K_UNIVERSE_SOURCE_CLIENTS_VAR, Universe::K_UNIVERSE_UID_COUNT_VAR, }; for (unsigned int i = 0; i < sizeof(vars) / sizeof(vars[0]); ++i) { export_map->GetUIntMapVar(string(vars[i]), "universe"); } } } UniverseStore::~UniverseStore() { DeleteAll(); } Universe *UniverseStore::GetUniverse(unsigned int universe_id) const { return STLFindOrNull(m_universe_map, universe_id); } Universe *UniverseStore::GetUniverseOrCreate(unsigned int universe_id) { UniverseMap::iterator iter = STLLookupOrInsertNull( &m_universe_map, universe_id); if (!iter->second) { iter->second = new Universe(universe_id, this, m_export_map, &m_clock); if (iter->second) { if (m_preferences) { RestoreUniverseSettings(iter->second); } } else { OLA_WARN << "Failed to create universe " << universe_id; } } return iter->second; } void UniverseStore::GetList(vector *universes) const { STLValues(m_universe_map, universes); } void UniverseStore::DeleteAll() { UniverseMap::iterator iter; for (iter = m_universe_map.begin(); iter != m_universe_map.end(); iter++) { SaveUniverseSettings(iter->second); delete iter->second; } m_deletion_candidates.clear(); m_universe_map.clear(); } void UniverseStore::AddUniverseGarbageCollection(Universe *universe) { m_deletion_candidates.insert(universe); } void UniverseStore::GarbageCollectUniverses() { set::iterator iter; UniverseMap::iterator map_iter; for (iter = m_deletion_candidates.begin(); iter != m_deletion_candidates.end(); iter++) { if (!(*iter)->IsActive()) { SaveUniverseSettings(*iter); m_universe_map.erase((*iter)->UniverseId()); delete *iter; } } m_deletion_candidates.clear(); } /* * Restore a universe's settings * @param uni the universe to update */ bool UniverseStore::RestoreUniverseSettings(Universe *universe) const { string key, value; std::ostringstream oss; if (!universe) return 0; oss << std::dec << universe->UniverseId(); // load name key = "uni_" + oss.str() + "_name"; value = m_preferences->GetValue(key); if (!value.empty()) universe->SetName(value); // load merge mode key = "uni_" + oss.str() + "_merge"; value = m_preferences->GetValue(key); if (!value.empty()) { if (value == "HTP") universe->SetMergeMode(Universe::MERGE_HTP); else universe->SetMergeMode(Universe::MERGE_LTP); } // load RDM discovery interval key = "uni_" + oss.str() + "_rdm_discovery_interval"; value = m_preferences->GetValue(key); if (!value.empty()) { unsigned int interval; if (StringToInt(value, &interval, true)) { if (interval != 0 && interval < MINIMUM_RDM_DISCOVERY_INTERVAL) { OLA_WARN << "RDM Discovery interval for universe " << universe->UniverseId() << " less than the minimum of " << MINIMUM_RDM_DISCOVERY_INTERVAL; interval = MINIMUM_RDM_DISCOVERY_INTERVAL; } OLA_DEBUG << "RDM Discovery interval for " << oss.str() << " is " << interval; TimeInterval discovery_interval(interval, 0); universe->SetRDMDiscoveryInterval(discovery_interval); } else { OLA_WARN << "Invalid RDM discovery interval for universe " << universe->UniverseId() << ", value was " << value; } } return 0; } /* * Save this universe's settings. * @param universe, the universe to save */ bool UniverseStore::SaveUniverseSettings(Universe *universe) const { string key, mode; std::ostringstream oss; if (!universe || !m_preferences) return 0; oss << std::dec << universe->UniverseId(); // save name key = "uni_" + oss.str() + "_name"; m_preferences->SetValue(key, universe->Name()); // save merge mode key = "uni_" + oss.str() + "_merge"; mode = (universe->MergeMode() == Universe::MERGE_HTP ? "HTP" : "LTP"); m_preferences->SetValue(key, mode); // We don't save the RDM Discovery interval since it can only be set in the // config files for now. m_preferences->Save(); return 0; } } // namespace ola ola-0.10.9/olad/plugin_api/DmxSource.cpp0000664000175000017500000000166014376533110014770 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DmxSource.cpp * The DmxSource class. * Copyright (C) 2005 Simon Newton */ #include namespace ola { const TimeInterval DmxSource::TIMEOUT_INTERVAL(2500000); // 2.5s } // namespace ola ola-0.10.9/olad/plugin_api/Plugin.cpp0000664000175000017500000000443614376533110014321 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Plugin.cpp * Base plugin class for ola * Copyright (C) 2005 Simon Newton */ #include #include "ola/Logging.h" #include "olad/Plugin.h" #include "olad/PluginAdaptor.h" #include "olad/Preferences.h" namespace ola { using std::string; const char Plugin::ENABLED_KEY[] = "enabled"; bool Plugin::LoadPreferences() { if (m_preferences) { return true; } if (PluginPrefix() == "") { OLA_WARN << Name() << ", no prefix provided"; return false; } m_preferences = m_plugin_adaptor->NewPreference(PluginPrefix()); if (!m_preferences) { return false; } m_preferences->Load(); bool save = m_preferences->SetDefaultValue( ENABLED_KEY, BoolValidator(), DefaultMode()); if (save) { m_preferences->Save(); } if (!SetDefaultPreferences()) { OLA_INFO << Name() << ", SetDefaultPreferences failed"; return false; } return true; } string Plugin::PreferenceConfigLocation() const { return m_preferences->ConfigLocation(); } bool Plugin::IsEnabled() const { return m_preferences->GetValueAsBool(ENABLED_KEY); } void Plugin::SetEnabledState(bool enable) { m_preferences->SetValueAsBool(ENABLED_KEY, enable); m_preferences->Save(); } bool Plugin::Start() { string enabled; if (m_enabled) { return false; } // setup prefs if (!LoadPreferences()) { return false; } if (!StartHook()) { return false; } m_enabled = true; return true; } bool Plugin::Stop() { if (!m_enabled) { return false; } bool ret = StopHook(); m_enabled = false; return ret; } } // namespace ola ola-0.10.9/olad/plugin_api/DeviceTest.cpp0000664000175000017500000000665114376533110015123 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DeviceTest.cpp * Test fixture for the Device class. * Copyright (C) 2005 Simon Newton */ #include #include #include #include "olad/Device.h" #include "olad/Plugin.h" #include "olad/Port.h" #include "olad/Preferences.h" #include "olad/plugin_api/TestCommon.h" #include "ola/testing/TestUtils.h" using ola::AbstractDevice; using ola::AbstractPlugin; using ola::InputPort; using ola::OutputPort; using std::string; using std::vector; class DeviceTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DeviceTest); CPPUNIT_TEST(testDevice); CPPUNIT_TEST_SUITE_END(); public: void testDevice(); private: void AddPortsToDeviceAndCheck(ola::Device *device); }; CPPUNIT_TEST_SUITE_REGISTRATION(DeviceTest); /* * Check that the base device class works correctly. */ void DeviceTest::testDevice() { string device_name = "test"; MockDevice orphaned_device(NULL, device_name); OLA_ASSERT_EQ(device_name, orphaned_device.Name()); OLA_ASSERT_EQ(static_cast(NULL), orphaned_device.Owner()); OLA_ASSERT_EQ(string(""), orphaned_device.UniqueId()); AddPortsToDeviceAndCheck(&orphaned_device); // Non orphaned device TestMockPlugin plugin(NULL, ola::OLA_PLUGIN_ARTNET); MockDevice device(&plugin, device_name); OLA_ASSERT_EQ(device.Name(), device_name); OLA_ASSERT_EQ(static_cast(&plugin), device.Owner()); OLA_ASSERT_EQ(string("2-test"), device.UniqueId()); AddPortsToDeviceAndCheck(&device); } void DeviceTest::AddPortsToDeviceAndCheck(ola::Device *device) { // check we don't have any ports yet. vector input_ports; device->InputPorts(&input_ports); OLA_ASSERT_EQ((size_t) 0, input_ports.size()); vector output_ports; device->OutputPorts(&output_ports); OLA_ASSERT_EQ((size_t) 0, output_ports.size()); // add two input ports and an output port TestMockInputPort input_port1(device, 1, NULL); TestMockInputPort input_port2(device, 2, NULL); TestMockOutputPort output_port1(device, 1); device->AddPort(&input_port1); device->AddPort(&input_port2); device->AddPort(&output_port1); device->InputPorts(&input_ports); OLA_ASSERT_EQ((size_t) 2, input_ports.size()); device->OutputPorts(&output_ports); OLA_ASSERT_EQ((size_t) 1, output_ports.size()); InputPort *input_port = device->GetInputPort(1); OLA_ASSERT(input_port); OLA_ASSERT_EQ((unsigned int) 1, input_port->PortId()); input_port = device->GetInputPort(2); OLA_ASSERT(input_port); OLA_ASSERT_EQ((unsigned int) 2, input_port->PortId()); OutputPort *output_port = device->GetOutputPort(1); OLA_ASSERT(output_port); OLA_ASSERT_EQ((unsigned int) 1, output_port->PortId()); } ola-0.10.9/olad/plugin_api/PortTest.cpp0000664000175000017500000001160314376533110014641 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PortTest.cpp * Test fixture for the Port classes * Copyright (C) 2005 Simon Newton */ #include #include #include #include "olad/PluginAdaptor.h" #include "olad/PortBroker.h" #include "olad/Preferences.h" #include "olad/plugin_api/TestCommon.h" #include "olad/plugin_api/UniverseStore.h" #include "ola/testing/TestUtils.h" using ola::Clock; using ola::TimeStamp; using std::string; class PortTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(PortTest); CPPUNIT_TEST(testOutputPortPriorities); CPPUNIT_TEST(testInputPortPriorities); CPPUNIT_TEST_SUITE_END(); public: void testOutputPortPriorities(); void testInputPortPriorities(); private: Clock m_clock; }; CPPUNIT_TEST_SUITE_REGISTRATION(PortTest); /* * Check that we can set the priority & mode of output ports */ void PortTest::testOutputPortPriorities() { TestMockOutputPort output_port(NULL, 1); OLA_ASSERT_EQ(ola::dmx::SOURCE_PRIORITY_DEFAULT, output_port.GetPriority()); OLA_ASSERT_EQ(ola::PRIORITY_MODE_INHERIT, output_port.GetPriorityMode()); // test the setting of priorities OLA_ASSERT(output_port.SetPriority(120)); OLA_ASSERT_EQ((uint8_t) 120, output_port.GetPriority()); OLA_ASSERT_FALSE(output_port.SetPriority(201)); OLA_ASSERT_EQ((uint8_t) 120, output_port.GetPriority()); OLA_ASSERT(output_port.SetPriority(0)); OLA_ASSERT_EQ((uint8_t) 0, output_port.GetPriority()); // test the setting of modes output_port.SetPriorityMode(ola::PRIORITY_MODE_STATIC); OLA_ASSERT_EQ(ola::PRIORITY_MODE_STATIC, output_port.GetPriorityMode()); output_port.SetPriorityMode(ola::PRIORITY_MODE_INHERIT); OLA_ASSERT_EQ(ola::PRIORITY_MODE_INHERIT, output_port.GetPriorityMode()); } /* * Test that we can set the priorities & modes of input ports */ void PortTest::testInputPortPriorities() { unsigned int universe_id = 1; ola::MemoryPreferences preferences("foo"); ola::UniverseStore store(&preferences, NULL); ola::PortBroker broker; ola::PortManager port_manager(&store, &broker); MockDevice device(NULL, "foo"); TimeStamp time_stamp; MockSelectServer ss(&time_stamp); ola::PluginAdaptor plugin_adaptor(NULL, &ss, NULL, NULL, NULL, NULL); // This port operates in static priority mode TestMockInputPort input_port(&device, 1, &plugin_adaptor); port_manager.PatchPort(&input_port, universe_id); ola::DmxBuffer buffer("foo bar baz"); m_clock.CurrentMonotonicTime(&time_stamp); input_port.WriteDMX(buffer); input_port.DmxChanged(); ola::Universe *universe = store.GetUniverseOrCreate(universe_id); OLA_ASSERT(universe); OLA_ASSERT_EQ(ola::dmx::SOURCE_PRIORITY_DEFAULT, universe->ActivePriority()); // change the priority uint8_t new_priority = 120; port_manager.SetPriorityStatic(&input_port, new_priority); m_clock.CurrentMonotonicTime(&time_stamp); input_port.WriteDMX(buffer); input_port.DmxChanged(); OLA_ASSERT_EQ(new_priority, universe->ActivePriority()); new_priority = 0; port_manager.SetPriorityStatic(&input_port, new_priority); m_clock.CurrentMonotonicTime(&time_stamp); input_port.WriteDMX(buffer); input_port.DmxChanged(); OLA_ASSERT_EQ(new_priority, universe->ActivePriority()); port_manager.UnPatchPort(&input_port); // now try a port that supported priorities TestMockPriorityInputPort input_port2(&device, 2, &plugin_adaptor); port_manager.PatchPort(&input_port2, universe_id); // the default mode is static, lets change it to inherit input_port2.SetPriorityMode(ola::PRIORITY_MODE_INHERIT); input_port2.SetInheritedPriority(99); m_clock.CurrentMonotonicTime(&time_stamp); input_port2.WriteDMX(buffer); input_port2.DmxChanged(); OLA_ASSERT_EQ((uint8_t) 99, universe->ActivePriority()); input_port2.SetInheritedPriority(123); m_clock.CurrentMonotonicTime(&time_stamp); input_port2.WriteDMX(buffer); input_port2.DmxChanged(); OLA_ASSERT_EQ((uint8_t) 123, universe->ActivePriority()); // now try static mode new_priority = 108; port_manager.SetPriorityStatic(&input_port2, new_priority); m_clock.CurrentMonotonicTime(&time_stamp); input_port2.WriteDMX(buffer); input_port2.DmxChanged(); OLA_ASSERT_EQ(new_priority, universe->ActivePriority()); } ola-0.10.9/olad/plugin_api/Makefile.mk0000664000175000017500000000625414376533110014425 00000000000000# This file is included directly in Makefile.am rather than via # olad/Makefile.mk due to the order of dependencies between them; we need to # build olad/plugin_api, then the plugins, then olad # HEADERS ################################################## noinst_HEADERS += olad/plugin_api/TestCommon.h # LIBRARIES ################################################## # lib olaserverplugininterface lib_LTLIBRARIES += olad/plugin_api/libolaserverplugininterface.la olad_plugin_api_libolaserverplugininterface_la_SOURCES = \ olad/plugin_api/Client.cpp \ olad/plugin_api/Client.h \ olad/plugin_api/Device.cpp \ olad/plugin_api/DeviceManager.cpp \ olad/plugin_api/DeviceManager.h \ olad/plugin_api/DmxSource.cpp \ olad/plugin_api/Plugin.cpp \ olad/plugin_api/PluginAdaptor.cpp \ olad/plugin_api/Port.cpp \ olad/plugin_api/PortBroker.cpp \ olad/plugin_api/PortManager.cpp \ olad/plugin_api/PortManager.h \ olad/plugin_api/Preferences.cpp \ olad/plugin_api/Universe.cpp \ olad/plugin_api/UniverseStore.cpp \ olad/plugin_api/UniverseStore.h olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS = \ $(COMMON_PROTOBUF_CXXFLAGS) olad_plugin_api_libolaserverplugininterface_la_LIBADD = \ common/libolacommon.la \ common/web/libolaweb.la \ ola/libola.la # TESTS ################################################## test_programs += \ olad/plugin_api/ClientTester \ olad/plugin_api/DeviceTester \ olad/plugin_api/DmxSourceTester \ olad/plugin_api/PortTester \ olad/plugin_api/PreferencesTester \ olad/plugin_api/UniverseTester COMMON_OLAD_PLUGIN_API_TEST_LDADD = \ $(COMMON_TESTING_LIBS) \ $(libprotobuf_LIBS) \ olad/plugin_api/libolaserverplugininterface.la \ common/libolacommon.la olad_plugin_api_ClientTester_SOURCES = olad/plugin_api/ClientTest.cpp olad_plugin_api_ClientTester_CXXFLAGS = $(COMMON_TESTING_PROTOBUF_FLAGS) olad_plugin_api_ClientTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) olad_plugin_api_DeviceTester_SOURCES = olad/plugin_api/DeviceManagerTest.cpp \ olad/plugin_api/DeviceTest.cpp olad_plugin_api_DeviceTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) olad_plugin_api_DeviceTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) olad_plugin_api_DmxSourceTester_SOURCES = olad/plugin_api/DmxSourceTest.cpp olad_plugin_api_DmxSourceTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) olad_plugin_api_DmxSourceTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) olad_plugin_api_PortTester_SOURCES = olad/plugin_api/PortTest.cpp \ olad/plugin_api/PortManagerTest.cpp olad_plugin_api_PortTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) olad_plugin_api_PortTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) olad_plugin_api_PreferencesTester_SOURCES = olad/plugin_api/PreferencesTest.cpp olad_plugin_api_PreferencesTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) olad_plugin_api_PreferencesTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) olad_plugin_api_UniverseTester_SOURCES = olad/plugin_api/UniverseTest.cpp olad_plugin_api_UniverseTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) olad_plugin_api_UniverseTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) ola-0.10.9/olad/plugin_api/PortManager.cpp0000664000175000017500000001354514376533110015303 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PortManager.cpp * Enables the Patching of Ports * Copyright (C) 2005 Simon Newton */ #include "olad/plugin_api/PortManager.h" #include #include "ola/Logging.h" #include "ola/StringUtils.h" #include "olad/Port.h" namespace ola { using std::vector; bool PortManager::PatchPort(InputPort *port, unsigned int universe) { return GenericPatchPort(port, universe); } bool PortManager::PatchPort(OutputPort *port, unsigned int universe) { return GenericPatchPort(port, universe); } bool PortManager::UnPatchPort(InputPort *port) { return GenericUnPatchPort(port); } bool PortManager::UnPatchPort(OutputPort *port) { return GenericUnPatchPort(port); } bool PortManager::SetPriorityInherit(Port *port) { if (port->PriorityCapability() != CAPABILITY_FULL) return true; if (port->GetPriorityMode() != PRIORITY_MODE_INHERIT) { port->SetPriorityMode(PRIORITY_MODE_INHERIT); } return true; } bool PortManager::SetPriorityStatic(Port *port, uint8_t value) { if (port->PriorityCapability() == CAPABILITY_NONE) return true; if (port->PriorityCapability() == CAPABILITY_FULL && port->GetPriorityMode() != PRIORITY_MODE_STATIC) port->SetPriorityMode(PRIORITY_MODE_STATIC); if (value > ola::dmx::SOURCE_PRIORITY_MAX) { OLA_WARN << "Priority " << static_cast(value) << " is greater than the max priority (" << static_cast(ola::dmx::SOURCE_PRIORITY_MAX) << ")"; value = ola::dmx::SOURCE_PRIORITY_MAX; } if (port->GetPriority() != value) port->SetPriority(value); return true; } template bool PortManager::GenericPatchPort(PortClass *port, unsigned int new_universe_id) { if (!port) return false; Universe *universe = port->GetUniverse(); if (universe && universe->UniverseId() == new_universe_id) return true; AbstractDevice *device = port->GetDevice(); if (device) { if (!device->AllowLooping()) { // check ports of the opposite type if (CheckLooping(device, new_universe_id)) return false; } if (!device->AllowMultiPortPatching()) { if (CheckMultiPort(device, new_universe_id)) return false; } } // unpatch if required if (universe) { OLA_DEBUG << "Port " << port->UniqueId() << " is bound to universe " << universe->UniverseId(); m_broker->RemovePort(port); universe->RemovePort(port); } universe = m_universe_store->GetUniverseOrCreate(new_universe_id); if (!universe) return false; if (port->SetUniverse(universe)) { OLA_INFO << "Patched " << port->UniqueId() << " to universe " << universe->UniverseId(); m_broker->AddPort(port); universe->AddPort(port); } else { if (!universe->IsActive()) m_universe_store->AddUniverseGarbageCollection(universe); } return true; } template bool PortManager::GenericUnPatchPort(PortClass *port) { if (!port) return false; Universe *universe = port->GetUniverse(); m_broker->RemovePort(port); if (universe) { universe->RemovePort(port); port->SetUniverse(NULL); OLA_INFO << "Unpatched " << port->UniqueId() << " from uni " << universe->UniverseId(); } return true; } template bool PortManager::CheckLooping(const AbstractDevice *device, unsigned int new_universe_id) const { return CheckOutputPortsForUniverse(device, new_universe_id); } template <> bool PortManager::CheckLooping( const AbstractDevice *device, unsigned int new_universe_id) const { return CheckInputPortsForUniverse(device, new_universe_id); } template bool PortManager::CheckMultiPort(const AbstractDevice *device, unsigned int new_universe_id) const { return CheckInputPortsForUniverse(device, new_universe_id); } template <> bool PortManager::CheckMultiPort( const AbstractDevice *device, unsigned int new_universe_id) const { return CheckOutputPortsForUniverse(device, new_universe_id); } bool PortManager::CheckInputPortsForUniverse(const AbstractDevice *device, unsigned int universe_id) const { vector ports; device->InputPorts(&ports); return CheckForPortMatchingUniverse(ports, universe_id); } bool PortManager::CheckOutputPortsForUniverse(const AbstractDevice *device, unsigned int universe_id) const { vector ports; device->OutputPorts(&ports); return CheckForPortMatchingUniverse(ports, universe_id); } template bool PortManager::CheckForPortMatchingUniverse( const vector &ports, unsigned int universe_id) const { typename vector::const_iterator iter; for (iter = ports.begin(); iter != ports.end(); ++iter) { if ((*iter)->GetUniverse() && (*iter)->GetUniverse()->UniverseId() == universe_id) { OLA_INFO << "Port " << (*iter)->PortId() << " is already patched to " << universe_id; return true; } } return false; } } // namespace ola ola-0.10.9/olad/plugin_api/Client.h0000664000175000017500000000641714376533110013747 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Client.h * Header file for the olad Client class. * Copyright (C) 2005 Simon Newton */ #ifndef OLAD_PLUGIN_API_CLIENT_H_ #define OLAD_PLUGIN_API_CLIENT_H_ #include #include #include "common/rpc/RpcController.h" #include "ola/base/Macro.h" #include "ola/rdm/UID.h" #include "olad/DmxSource.h" namespace ola { namespace proto { class OlaClientService_Stub; class Ack; } } namespace ola { /** * @brief Represents a connected OLA client on the OLA server side. * * This stores the state of the client (i.e. DMX data) and allows us to push * DMX updates to the client via the OlaClientService_Stub. */ class Client { public : /** * @brief Create a new client. * @param client_stub The OlaClientService_Stub to use to communicate with * the client. Ownership is transferred to the client. * @param uid The default UID to use for this client. The client may set its * own UID later. */ Client(ola::proto::OlaClientService_Stub *client_stub, const ola::rdm::UID &uid); virtual ~Client(); /** * @brief Push a DMX update to this client. * @param universe_id the universe the DMX data belongs to * @param priority the priority of the DMX data * @param buffer the DMX data. * @return true if the update was sent, false otherwise */ virtual bool SendDMX(unsigned int universe_id, uint8_t priority, const DmxBuffer &buffer); /** * @brief Called when this client sends us new data * @param universe the id of the universe for the new data * @param source the new DMX data. */ void DMXReceived(unsigned int universe, const DmxSource &source); /** * @brief Get the most recent DMX data received from this client. * @param universe the id of the universe we're interested in */ const DmxSource SourceData(unsigned int universe) const; /** * @brief Return the UID associated with this client. * @returns The client's UID. * * This is normally the UID passed in the constructor, unless the client * itself overrides the UID. */ ola::rdm::UID GetUID() const; /** * @brief Set the UID for the client. * @param uid the new UID to use for this client. */ void SetUID(const ola::rdm::UID &uid); private: void SendDMXCallback(ola::rpc::RpcController *controller, ola::proto::Ack *ack); std::auto_ptr m_client_stub; std::map m_data_map; ola::rdm::UID m_uid; DISALLOW_COPY_AND_ASSIGN(Client); }; } // namespace ola #endif // OLAD_PLUGIN_API_CLIENT_H_ ola-0.10.9/olad/plugin_api/Device.cpp0000664000175000017500000001151314376533110014254 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Device.cpp * Base implementation of the device class. * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include #include "common/rpc/RpcController.h" #include "common/rpc/RpcService.h" #include "ola/Logging.h" #include "ola/stl/STLUtils.h" #include "olad/Device.h" #include "olad/Plugin.h" #include "olad/Port.h" #include "olad/Universe.h" namespace ola { using std::map; using std::pair; using std::string; using std::vector; /* * Create a new device * @param owner the plugin that owns this device * @param name a nice name for this device */ Device::Device(AbstractPlugin *owner, const string &name) : AbstractDevice(), m_enabled(false), m_owner(owner), m_name(name) { } /* * Stop this device */ Device::~Device() { // we can't call stop from here because it uses virtual methods if (m_enabled) OLA_FATAL << "Device " << m_name << " wasn't stopped before deleting, " << "this represents a serious programming error."; } /* * Start the Device */ bool Device::Start() { if (m_enabled) return true; bool ret = StartHook(); if (ret) m_enabled = true; return ret; } /* * Stop this device */ bool Device::Stop() { if (!m_enabled) return true; PrePortStop(); DeleteAllPorts(); PostPortStop(); m_enabled = false; return true; } /* * Add a port to this device * @param port the port to add * @return true on success, false if the port already exists */ bool Device::AddPort(InputPort *port) { return GenericAddPort(port, &m_input_ports); } /* * Add a port to this device * @param port the port to add * @return 0 on success, non 0 on failure */ bool Device::AddPort(OutputPort *port) { return GenericAddPort(port, &m_output_ports); } void Device::InputPorts(vector *ports) const { STLValues(m_input_ports, ports); } void Device::OutputPorts(vector *ports) const { STLValues(m_output_ports, ports); } /* * Returns the InputPort with the id port_id */ InputPort *Device::GetInputPort(unsigned int port_id) const { return STLFindOrNull(m_input_ports, port_id); } /* * Returns the OutputPort with the id port_id */ OutputPort *Device::GetOutputPort(unsigned int port_id) const { return STLFindOrNull(m_output_ports, port_id); } /* * Delete all ports and clear the port list */ void Device::DeleteAllPorts() { map::iterator input_iter; map::iterator output_iter; for (input_iter = m_input_ports.begin(); input_iter != m_input_ports.end(); ++input_iter) { GenericDeletePort(input_iter->second); } for (output_iter = m_output_ports.begin(); output_iter != m_output_ports.end(); ++output_iter) { GenericDeletePort(output_iter->second); } m_input_ports.clear(); m_output_ports.clear(); } /* * Returns a unique id for this device */ string Device::UniqueId() const { if (m_unique_id.empty()) { if (!Owner()) { OLA_WARN << "Device: " << Name() << " missing owner"; return ""; } std::ostringstream str; str << Owner()->Id() << "-" << DeviceId(); m_unique_id = str.str(); } return m_unique_id; } /* * Device Config request */ void Device::Configure(ola::rpc::RpcController *controller, const string &request, string *response, ConfigureCallback *done) { controller->SetFailed("Not Implemented"); done->Run(); (void) request; (void) response; } template bool Device::GenericAddPort(PortClass *port, map *port_map) { if (!port) return false; if (!STLInsertIfNotPresent(port_map, port->PortId(), port)) { OLA_WARN << "Attempt to insert a port but this port id is already " << "associated with a different port."; } return true; } template void Device::GenericDeletePort(PortClass *port) { Universe *universe = port->GetUniverse(); if (universe) universe->RemovePort(port); delete port; } } // namespace ola ola-0.10.9/olad/plugin_api/ClientTest.cpp0000664000175000017500000001070514376533110015135 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ClientTest.cpp * Test fixture for the Client class * Copyright (C) 2005 Simon Newton */ #include #include #include "common/protocol/Ola.pb.h" #include "common/protocol/OlaService.pb.h" #include "common/rpc/RpcController.h" #include "common/rpc/RpcService.h" #include "ola/Clock.h" #include "ola/Constants.h" #include "ola/DmxBuffer.h" #include "ola/rdm/UID.h" #include "ola/testing/TestUtils.h" #include "olad/DmxSource.h" #include "olad/plugin_api/Client.h" static unsigned int TEST_UNIVERSE = 1; static unsigned int TEST_UNIVERSE2 = 2; static const char TEST_DATA[] = "this is some test data"; static const char TEST_DATA2[] = "another set of test data"; using ola::Client; using ola::DmxBuffer; using std::string; class ClientTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ClientTest); CPPUNIT_TEST(testSendDMX); CPPUNIT_TEST(testGetSetDMX); CPPUNIT_TEST_SUITE_END(); public: ClientTest() : m_test_uid(ola::OPEN_LIGHTING_ESTA_CODE, 0) {} void testSendDMX(); void testGetSetDMX(); private: ola::Clock m_clock; ola::rdm::UID m_test_uid; }; CPPUNIT_TEST_SUITE_REGISTRATION(ClientTest); /* * Mock out the ClientStub for testing */ class MockClientStub: public ola::proto::OlaClientService_Stub { public: MockClientStub(): ola::proto::OlaClientService_Stub(NULL) {} void UpdateDmxData(ola::rpc::RpcController *controller, const ola::proto::DmxData *request, ola::proto::Ack *response, ola::rpc::RpcService::CompletionCallback *done); }; void MockClientStub::UpdateDmxData( ola::rpc::RpcController* controller, const ola::proto::DmxData *request, OLA_UNUSED ola::proto::Ack *response, ola::rpc::RpcService::CompletionCallback *done) { OLA_ASSERT(controller); OLA_ASSERT_FALSE(controller->Failed()); OLA_ASSERT_EQ(TEST_UNIVERSE, (unsigned int) request->universe()); OLA_ASSERT(TEST_DATA == request->data()); done->Run(); } /* * Check that the SendDMX method works correctly. */ void ClientTest::testSendDMX() { // check we survive a null pointer const DmxBuffer buffer(TEST_DATA); uint8_t priority = 100; Client client(NULL, m_test_uid); client.SendDMX(TEST_UNIVERSE, priority, buffer); // check the stub is called correctly Client client2(new MockClientStub(), m_test_uid); client2.SendDMX(TEST_UNIVERSE, priority, buffer); } /* * Check that the DMX get/set works correctly. */ void ClientTest::testGetSetDMX() { DmxBuffer buffer(TEST_DATA); const DmxBuffer empty; Client client(NULL, m_test_uid); ola::TimeStamp timestamp; m_clock.CurrentMonotonicTime(×tamp); ola::DmxSource source(buffer, timestamp, 100); // check get/set works client.DMXReceived(TEST_UNIVERSE, source); const ola::DmxSource &source2 = client.SourceData(TEST_UNIVERSE); OLA_ASSERT(source2.IsSet()); OLA_ASSERT(source2.Data() == buffer); OLA_ASSERT_EQ(timestamp, source2.Timestamp()); OLA_ASSERT_EQ((uint8_t) 100, source2.Priority()); // check update works ola::DmxBuffer old_data(buffer); buffer.Set(TEST_DATA2); OLA_ASSERT(source2.Data() == old_data); OLA_ASSERT_EQ(timestamp, source2.Timestamp()); OLA_ASSERT_EQ((uint8_t) 100, source2.Priority()); source.UpdateData(buffer, timestamp, 120); client.DMXReceived(TEST_UNIVERSE, source); const ola::DmxSource source3 = client.SourceData(TEST_UNIVERSE); OLA_ASSERT(source3.IsSet()); OLA_ASSERT(buffer == source3.Data()); OLA_ASSERT_EQ(timestamp, source3.Timestamp()); OLA_ASSERT_EQ((uint8_t) 120, source3.Priority()); // check fetching an unknown universe results in an empty buffer const ola::DmxSource source4 = client.SourceData(TEST_UNIVERSE2); OLA_ASSERT_FALSE(source4.IsSet()); OLA_ASSERT(empty == source4.Data()); } ola-0.10.9/olad/plugin_api/UniverseTest.cpp0000664000175000017500000006631014376533110015522 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * UniverseTest.cpp * Test fixture for the Universe and UniverseStore classes * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include "ola/Callback.h" #include "ola/Constants.h" #include "ola/Clock.h" #include "ola/DmxBuffer.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/RDMReply.h" #include "ola/rdm/RDMResponseCodes.h" #include "ola/rdm/UID.h" #include "olad/DmxSource.h" #include "olad/PluginAdaptor.h" #include "olad/Port.h" #include "olad/PortBroker.h" #include "olad/Preferences.h" #include "olad/Universe.h" #include "olad/plugin_api/Client.h" #include "olad/plugin_api/PortManager.h" #include "olad/plugin_api/TestCommon.h" #include "olad/plugin_api/UniverseStore.h" #include "ola/testing/TestUtils.h" using ola::AbstractDevice; using ola::Clock; using ola::DmxBuffer; using ola::NewCallback; using ola::NewSingleCallback; using ola::TimeStamp; using ola::Universe; using ola::rdm::NewDiscoveryUniqueBranchRequest; using ola::rdm::RDMCallback; using ola::rdm::RDMReply; using ola::rdm::RDMRequest; using ola::rdm::RDMResponse; using ola::rdm::UID; using ola::rdm::UIDSet; using ola::rdm::RDMStatusCode; using std::string; using std::vector; static unsigned int TEST_UNIVERSE = 1; static const char TEST_DATA[] = "this is some test data"; class UniverseTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(UniverseTest); CPPUNIT_TEST(testLifecycle); CPPUNIT_TEST(testSetGetDmx); CPPUNIT_TEST(testSendDmx); CPPUNIT_TEST(testReceiveDmx); CPPUNIT_TEST(testSourceClients); CPPUNIT_TEST(testSinkClients); CPPUNIT_TEST(testLtpMerging); CPPUNIT_TEST(testHtpMerging); CPPUNIT_TEST(testRDMDiscovery); CPPUNIT_TEST(testRDMSend); CPPUNIT_TEST_SUITE_END(); public: void setUp(); void tearDown(); void testLifecycle(); void testSetGetDmx(); void testSendDmx(); void testReceiveDmx(); void testSourceClients(); void testSinkClients(); void testLtpMerging(); void testHtpMerging(); void testRDMDiscovery(); void testRDMSend(); private: ola::MemoryPreferences *m_preferences; ola::UniverseStore *m_store; DmxBuffer m_buffer; ola::Clock m_clock; void ConfirmUIDs(UIDSet *expected, const UIDSet &uids); void ConfirmRDM(int line, RDMStatusCode expected_status_code, const RDMResponse *expected_response, RDMReply *reply); void ReturnRDMCode(RDMStatusCode status_code, const RDMRequest *request, RDMCallback *callback) { delete request; RunRDMCallback(callback, status_code); } }; class MockClient: public ola::Client { public: MockClient() : ola::Client(NULL, UID(ola::OPEN_LIGHTING_ESTA_CODE, 0)), m_dmx_set(false) { } bool SendDMX(unsigned int universe_id, uint8_t priority, const DmxBuffer &buffer) { OLA_ASSERT_EQ(TEST_UNIVERSE, universe_id); OLA_ASSERT_EQ(ola::dmx::SOURCE_PRIORITY_MIN, priority); OLA_ASSERT_EQ(string(TEST_DATA), buffer.Get()); m_dmx_set = true; return true; } bool m_dmx_set; }; CPPUNIT_TEST_SUITE_REGISTRATION(UniverseTest); void UniverseTest::setUp() { ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); m_preferences = new ola::MemoryPreferences("foo"); m_store = new ola::UniverseStore(m_preferences, NULL); m_buffer.Set(TEST_DATA); } void UniverseTest::tearDown() { delete m_store; delete m_preferences; } /* * Test that we can create universes and save their settings */ void UniverseTest::testLifecycle() { Universe *universe = m_store->GetUniverse(TEST_UNIVERSE); OLA_ASSERT_FALSE(universe); universe = m_store->GetUniverseOrCreate(TEST_UNIVERSE); OLA_ASSERT(universe); OLA_ASSERT_EQ(TEST_UNIVERSE, universe->UniverseId()); OLA_ASSERT_EQ((unsigned int) 1, m_store->UniverseCount()); OLA_ASSERT_EQ(Universe::MERGE_LTP, universe->MergeMode()); OLA_ASSERT_FALSE(universe->IsActive()); string universe_name = "New Name"; universe->SetName(universe_name); universe->SetMergeMode(Universe::MERGE_HTP); OLA_ASSERT_EQ(universe_name, universe->Name()); OLA_ASSERT_EQ(Universe::MERGE_HTP, universe->MergeMode()); // delete it m_store->AddUniverseGarbageCollection(universe); m_store->GarbageCollectUniverses(); OLA_ASSERT_EQ((unsigned int) 0, m_store->UniverseCount()); universe = m_store->GetUniverse(TEST_UNIVERSE); OLA_ASSERT_FALSE(universe); // now re-create it universe = m_store->GetUniverseOrCreate(TEST_UNIVERSE); OLA_ASSERT(universe); OLA_ASSERT_EQ((unsigned int) 1, m_store->UniverseCount()); OLA_ASSERT_EQ(TEST_UNIVERSE, universe->UniverseId()); OLA_ASSERT_EQ(universe_name, universe->Name()); OLA_ASSERT_EQ(Universe::MERGE_HTP, universe->MergeMode()); m_store->DeleteAll(); OLA_ASSERT_EQ((unsigned int) 0, m_store->UniverseCount()); } /* * Check that SetDMX/GetDMX works */ void UniverseTest::testSetGetDmx() { Universe *universe = m_store->GetUniverseOrCreate(TEST_UNIVERSE); OLA_ASSERT(universe); // a new universe should be all 0s DmxBuffer empty_buffer; OLA_ASSERT(empty_buffer == universe->GetDMX()); // check that SetDMX works OLA_ASSERT(universe->SetDMX(m_buffer)); OLA_ASSERT(m_buffer == universe->GetDMX()); } /* * Check that SendDmx updates all ports */ void UniverseTest::testSendDmx() { Universe *universe = m_store->GetUniverseOrCreate(TEST_UNIVERSE); OLA_ASSERT(universe); TestMockOutputPort port(NULL, 1); // output port universe->AddPort(&port); OLA_ASSERT_EQ((unsigned int) 0, universe->InputPortCount()); OLA_ASSERT_EQ((unsigned int) 1, universe->OutputPortCount()); OLA_ASSERT(universe->IsActive()); // send some data to the universe and check the port gets it OLA_ASSERT(universe->SetDMX(m_buffer)); OLA_ASSERT(m_buffer == port.ReadDMX()); // remove the port from the universe universe->RemovePort(&port); OLA_ASSERT_EQ((unsigned int) 0, universe->InputPortCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->OutputPortCount()); OLA_ASSERT_FALSE(universe->IsActive()); } /* * Check that we update when ports have new data */ void UniverseTest::testReceiveDmx() { ola::PortBroker broker; ola::PortManager port_manager(m_store, &broker); TimeStamp time_stamp; MockSelectServer ss(&time_stamp); ola::PluginAdaptor plugin_adaptor(NULL, &ss, NULL, NULL, NULL, NULL); MockDevice device(NULL, "foo"); TestMockInputPort port(&device, 1, &plugin_adaptor); // input port port_manager.PatchPort(&port, TEST_UNIVERSE); Universe *universe = m_store->GetUniverseOrCreate(TEST_UNIVERSE); OLA_ASSERT(universe); OLA_ASSERT_EQ((unsigned int) 1, universe->InputPortCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->OutputPortCount()); OLA_ASSERT(universe->IsActive()); // Setup the port with some data, and check that signalling the universe // works. m_clock.CurrentMonotonicTime(&time_stamp); port.WriteDMX(m_buffer); port.DmxChanged(); OLA_ASSERT_EQ(ola::dmx::SOURCE_PRIORITY_DEFAULT, universe->ActivePriority()); OLA_ASSERT_EQ(m_buffer.Size(), universe->GetDMX().Size()); OLA_ASSERT(m_buffer == universe->GetDMX()); // Remove the port from the universe universe->RemovePort(&port); OLA_ASSERT_FALSE(universe->IsActive()); OLA_ASSERT_EQ((unsigned int) 0, universe->InputPortCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->OutputPortCount()); } /* * Check that we can add/remove source clients from this universes */ void UniverseTest::testSourceClients() { Universe *universe = m_store->GetUniverseOrCreate(TEST_UNIVERSE); OLA_ASSERT(universe); OLA_ASSERT_EQ((unsigned int) 0, universe->SourceClientCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->SinkClientCount()); // test that we can add a source client MockClient client; universe->AddSourceClient(&client); OLA_ASSERT_EQ((unsigned int) 1, universe->SourceClientCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->SinkClientCount()); OLA_ASSERT(universe->ContainsSourceClient(&client)); OLA_ASSERT_FALSE(universe->ContainsSinkClient(&client)); OLA_ASSERT(universe->IsActive()); // Setting DMX now does nothing OLA_ASSERT_FALSE(client.m_dmx_set); universe->SetDMX(m_buffer); OLA_ASSERT_FALSE(client.m_dmx_set); // now remove it universe->RemoveSourceClient(&client); OLA_ASSERT_EQ((unsigned int) 0, universe->SourceClientCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->SinkClientCount()); OLA_ASSERT_FALSE(universe->ContainsSourceClient(&client)); OLA_ASSERT_FALSE(universe->ContainsSinkClient(&client)); OLA_ASSERT_FALSE(universe->IsActive()); // try to remove it again OLA_ASSERT_FALSE(universe->RemoveSourceClient(&client)); OLA_ASSERT_EQ((unsigned int) 0, universe->SourceClientCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->SinkClientCount()); OLA_ASSERT_FALSE(universe->ContainsSourceClient(&client)); OLA_ASSERT_FALSE(universe->ContainsSinkClient(&client)); OLA_ASSERT_FALSE(universe->IsActive()); } /* * Check that we can add/remove sink clients from this universes */ void UniverseTest::testSinkClients() { Universe *universe = m_store->GetUniverseOrCreate(TEST_UNIVERSE); OLA_ASSERT(universe); OLA_ASSERT_EQ((unsigned int) 0, universe->SourceClientCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->SinkClientCount()); // test that we can add a source client MockClient client; universe->AddSinkClient(&client); OLA_ASSERT_EQ((unsigned int) 1, universe->SinkClientCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->SourceClientCount()); OLA_ASSERT(universe->ContainsSinkClient(&client)); OLA_ASSERT_FALSE(universe->ContainsSourceClient(&client)); OLA_ASSERT(universe->IsActive()); // Setting DMX now should update the client OLA_ASSERT_FALSE(client.m_dmx_set); universe->SetDMX(m_buffer); OLA_ASSERT(client.m_dmx_set); // now remove it universe->RemoveSinkClient(&client); OLA_ASSERT_EQ((unsigned int) 0, universe->SinkClientCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->SourceClientCount()); OLA_ASSERT_FALSE(universe->ContainsSinkClient(&client)); OLA_ASSERT_FALSE(universe->ContainsSourceClient(&client)); OLA_ASSERT_FALSE(universe->IsActive()); // try to remove it again OLA_ASSERT_FALSE(universe->RemoveSinkClient(&client)); OLA_ASSERT_EQ((unsigned int) 0, universe->SinkClientCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->SourceClientCount()); OLA_ASSERT_FALSE(universe->ContainsSinkClient(&client)); OLA_ASSERT_FALSE(universe->ContainsSourceClient(&client)); OLA_ASSERT_FALSE(universe->IsActive()); } /* * Check that LTP merging works correctly */ void UniverseTest::testLtpMerging() { DmxBuffer buffer1, buffer2, htp_buffer; buffer1.SetFromString("1,0,0,10"); buffer2.SetFromString("0,255,0,5,6,7"); ola::PortBroker broker; ola::PortManager port_manager(m_store, &broker); TimeStamp time_stamp; MockSelectServer ss(&time_stamp); ola::PluginAdaptor plugin_adaptor(NULL, &ss, NULL, NULL, NULL, NULL); MockDevice device(NULL, "foo"); MockDevice device2(NULL, "bar"); TestMockInputPort port(&device, 1, &plugin_adaptor); // input port TestMockInputPort port2(&device2, 1, &plugin_adaptor); // input port port_manager.PatchPort(&port, TEST_UNIVERSE); port_manager.PatchPort(&port2, TEST_UNIVERSE); Universe *universe = m_store->GetUniverseOrCreate(TEST_UNIVERSE); OLA_ASSERT(universe); universe->SetMergeMode(Universe::MERGE_LTP); OLA_ASSERT_EQ((unsigned int) 2, universe->InputPortCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->OutputPortCount()); OLA_ASSERT(universe->IsActive()); OLA_ASSERT_EQ((unsigned int) 0, universe->GetDMX().Size()); // Setup the ports with some data, and check that signalling the universe // works. m_clock.CurrentMonotonicTime(&time_stamp); port.WriteDMX(buffer1); port.DmxChanged(); OLA_ASSERT_EQ(ola::dmx::SOURCE_PRIORITY_DEFAULT, universe->ActivePriority()); OLA_ASSERT_EQ(buffer1.Size(), universe->GetDMX().Size()); OLA_ASSERT(buffer1 == universe->GetDMX()); // Now the second port gets data m_clock.CurrentMonotonicTime(&time_stamp); port2.WriteDMX(buffer2); port2.DmxChanged(); OLA_ASSERT_EQ(ola::dmx::SOURCE_PRIORITY_DEFAULT, universe->ActivePriority()); OLA_ASSERT_EQ(buffer2.Size(), universe->GetDMX().Size()); OLA_ASSERT(buffer2 == universe->GetDMX()); // now resend the first port m_clock.CurrentMonotonicTime(&time_stamp); port.WriteDMX(buffer1); port.DmxChanged(); OLA_ASSERT_EQ(ola::dmx::SOURCE_PRIORITY_DEFAULT, universe->ActivePriority()); OLA_ASSERT_EQ(buffer1.Size(), universe->GetDMX().Size()); OLA_ASSERT(buffer1 == universe->GetDMX()); // now check a client DmxBuffer client_buffer; client_buffer.SetFromString("255,0,0,255,10"); m_clock.CurrentMonotonicTime(&time_stamp); ola::DmxSource source(client_buffer, time_stamp, ola::dmx::SOURCE_PRIORITY_DEFAULT); MockClient input_client; input_client.DMXReceived(TEST_UNIVERSE, source); universe->SourceClientDataChanged(&input_client); DmxBuffer client_htp_merge_result; client_htp_merge_result.SetFromString("255,255,0,255,10,7"); OLA_ASSERT_EQ(ola::dmx::SOURCE_PRIORITY_DEFAULT, universe->ActivePriority()); OLA_ASSERT_EQ(client_buffer.Size(), universe->GetDMX().Size()); OLA_ASSERT(client_buffer == universe->GetDMX()); // clean up universe->RemoveSourceClient(&input_client); universe->RemovePort(&port); universe->RemovePort(&port2); OLA_ASSERT_FALSE(universe->IsActive()); } /* * Check that HTP merging works correctly */ void UniverseTest::testHtpMerging() { DmxBuffer buffer1, buffer2, htp_buffer; buffer1.SetFromString("1,0,0,10"); buffer2.SetFromString("0,255,0,5,6,7"); htp_buffer.SetFromString("1,255,0,10,6,7"); ola::PortBroker broker; ola::PortManager port_manager(m_store, &broker); TimeStamp time_stamp; MockSelectServer ss(&time_stamp); ola::PluginAdaptor plugin_adaptor(NULL, &ss, NULL, NULL, NULL, NULL); MockDevice device(NULL, "foo"); MockDevice device2(NULL, "bar"); TestMockInputPort port(&device, 1, &plugin_adaptor); // input port TestMockInputPort port2(&device2, 1, &plugin_adaptor); // input port port_manager.PatchPort(&port, TEST_UNIVERSE); port_manager.PatchPort(&port2, TEST_UNIVERSE); Universe *universe = m_store->GetUniverseOrCreate(TEST_UNIVERSE); OLA_ASSERT(universe); universe->SetMergeMode(Universe::MERGE_HTP); OLA_ASSERT_EQ(universe->OutputPortCount(), (unsigned int) 0); OLA_ASSERT_EQ(universe->OutputPortCount(), (unsigned int) 0); OLA_ASSERT(universe->IsActive()); OLA_ASSERT_EQ((unsigned int) 0, universe->GetDMX().Size()); // Setup the ports with some data, and check that signalling the universe // works. m_clock.CurrentMonotonicTime(&time_stamp); port.WriteDMX(buffer1); port.DmxChanged(); OLA_ASSERT_EQ(ola::dmx::SOURCE_PRIORITY_DEFAULT, universe->ActivePriority()); OLA_ASSERT_EQ(buffer1.Size(), universe->GetDMX().Size()); OLA_ASSERT(buffer1 == universe->GetDMX()); // Now the second port gets data m_clock.CurrentMonotonicTime(&time_stamp); port2.WriteDMX(buffer2); port2.DmxChanged(); OLA_ASSERT_EQ(ola::dmx::SOURCE_PRIORITY_DEFAULT, universe->ActivePriority()); OLA_ASSERT_EQ(htp_buffer.Size(), universe->GetDMX().Size()); OLA_ASSERT(htp_buffer == universe->GetDMX()); // now raise the priority of the second port uint8_t new_priority = 120; port2.SetPriority(new_priority); m_clock.CurrentMonotonicTime(&time_stamp); port2.DmxChanged(); OLA_ASSERT_EQ(new_priority, universe->ActivePriority()); OLA_ASSERT_EQ(buffer2.Size(), universe->GetDMX().Size()); OLA_ASSERT(buffer2 == universe->GetDMX()); // raise the priority of the first port port.SetPriority(new_priority); m_clock.CurrentMonotonicTime(&time_stamp); port.DmxChanged(); OLA_ASSERT_EQ(new_priority, universe->ActivePriority()); OLA_ASSERT_EQ(htp_buffer.Size(), universe->GetDMX().Size()); OLA_ASSERT(htp_buffer == universe->GetDMX()); // now check a client DmxBuffer client_buffer; client_buffer.SetFromString("255,0,0,255,10"); m_clock.CurrentMonotonicTime(&time_stamp); ola::DmxSource source(client_buffer, time_stamp, new_priority); MockClient input_client; input_client.DMXReceived(TEST_UNIVERSE, source); universe->SourceClientDataChanged(&input_client); DmxBuffer client_htp_merge_result; client_htp_merge_result.SetFromString("255,255,0,255,10,7"); OLA_ASSERT_EQ(new_priority, universe->ActivePriority()); OLA_ASSERT_EQ(client_htp_merge_result.Size(), universe->GetDMX().Size()); OLA_ASSERT(client_htp_merge_result == universe->GetDMX()); // clean up universe->RemoveSourceClient(&input_client); universe->RemovePort(&port); universe->RemovePort(&port2); OLA_ASSERT_FALSE(universe->IsActive()); } /** * Test RDM discovery for a universe/ */ void UniverseTest::testRDMDiscovery() { Universe *universe = m_store->GetUniverseOrCreate(TEST_UNIVERSE); OLA_ASSERT(universe); // check the uid set is initially empty UIDSet universe_uids; universe->GetUIDs(&universe_uids); OLA_ASSERT_EQ(0u, universe_uids.Size()); UID uid1(0x7a70, 1); UID uid2(0x7a70, 2); UID uid3(0x7a70, 3); UIDSet port1_uids, port2_uids; port1_uids.AddUID(uid1); port2_uids.AddUID(uid2); TestMockRDMOutputPort port1(NULL, 1, &port1_uids); // this port is configured to update the uids on patch TestMockRDMOutputPort port2(NULL, 2, &port2_uids, true); universe->AddPort(&port1); port1.SetUniverse(universe); universe->AddPort(&port2); port2.SetUniverse(universe); OLA_ASSERT_EQ((unsigned int) 0, universe->InputPortCount()); OLA_ASSERT_EQ((unsigned int) 2, universe->OutputPortCount()); universe->GetUIDs(&universe_uids); OLA_ASSERT_EQ(1u, universe_uids.Size()); OLA_ASSERT(universe_uids.Contains(uid2)); OLA_ASSERT(universe->IsActive()); // now trigger discovery UIDSet expected_uids; expected_uids.AddUID(uid1); expected_uids.AddUID(uid2); universe->RunRDMDiscovery( NewSingleCallback(this, &UniverseTest::ConfirmUIDs, &expected_uids), true); // now add a uid to one port, and remove a uid from another port1_uids.AddUID(uid3); port2_uids.RemoveUID(uid2); expected_uids.AddUID(uid3); expected_uids.RemoveUID(uid2); universe->RunRDMDiscovery( NewSingleCallback(this, &UniverseTest::ConfirmUIDs, &expected_uids), true); // remove the first port from the universe and confirm there are no more UIDs universe->RemovePort(&port1); expected_uids.Clear(); universe->RunRDMDiscovery( NewSingleCallback(this, &UniverseTest::ConfirmUIDs, &expected_uids), true); universe_uids.Clear(); universe->GetUIDs(&universe_uids); OLA_ASSERT_EQ(0u, universe_uids.Size()); universe->RemovePort(&port2); OLA_ASSERT_EQ((unsigned int) 0, universe->InputPortCount()); OLA_ASSERT_EQ((unsigned int) 0, universe->OutputPortCount()); OLA_ASSERT_FALSE(universe->IsActive()); } /** * test Sending an RDM request */ void UniverseTest::testRDMSend() { Universe *universe = m_store->GetUniverseOrCreate(TEST_UNIVERSE); OLA_ASSERT(universe); // setup the ports with a UID on each UID uid1(0x7a70, 1); UID uid2(0x7a70, 2); UID uid3(0x7a70, 3); UIDSet port1_uids, port2_uids; port1_uids.AddUID(uid1); port2_uids.AddUID(uid2); TestMockRDMOutputPort port1(NULL, 1, &port1_uids, true); TestMockRDMOutputPort port2(NULL, 2, &port2_uids, true); universe->AddPort(&port1); port1.SetUniverse(universe); universe->AddPort(&port2); port2.SetUniverse(universe); UID source_uid(0x7a70, 100); // first try a command to a uid we don't know about RDMRequest *request = new ola::rdm::RDMGetRequest( source_uid, uid3, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, 0); universe->SendRDMRequest( request, NewSingleCallback(this, &UniverseTest::ConfirmRDM, __LINE__, ola::rdm::RDM_UNKNOWN_UID, #ifdef __FreeBSD__ reinterpret_cast(0))); #else reinterpret_cast(NULL))); #endif // __FreeBSD__ // ok, now try something that returns a response from the port request = new ola::rdm::RDMGetRequest( source_uid, uid1, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, 0); port1.SetRDMHandler( NewCallback(this, &UniverseTest::ReturnRDMCode, ola::rdm::RDM_TIMEOUT)); universe->SendRDMRequest( request, NewSingleCallback(this, &UniverseTest::ConfirmRDM, __LINE__, ola::rdm::RDM_TIMEOUT, #ifdef __FreeBSD__ reinterpret_cast(0))); #else reinterpret_cast(NULL))); #endif // __FreeBSD__ // now try a broadcast fan out UID vendorcast_uid = UID::VendorcastAddress(0x7a70); request = new ola::rdm::RDMGetRequest( source_uid, vendorcast_uid, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, 0); port1.SetRDMHandler( NewCallback(this, &UniverseTest::ReturnRDMCode, ola::rdm::RDM_WAS_BROADCAST)); port2.SetRDMHandler( NewCallback(this, &UniverseTest::ReturnRDMCode, ola::rdm::RDM_WAS_BROADCAST)); universe->SendRDMRequest( request, NewSingleCallback(this, &UniverseTest::ConfirmRDM, __LINE__, ola::rdm::RDM_WAS_BROADCAST, #ifdef __FreeBSD__ reinterpret_cast(0))); #else reinterpret_cast(NULL))); #endif // __FreeBSD__ // now confirm that if one of the ports fails to send, we see this response request = new ola::rdm::RDMGetRequest( source_uid, vendorcast_uid, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, 0); port2.SetRDMHandler( NewCallback(this, &UniverseTest::ReturnRDMCode, ola::rdm::RDM_FAILED_TO_SEND)); universe->SendRDMRequest( request, NewSingleCallback(this, &UniverseTest::ConfirmRDM, __LINE__, ola::rdm::RDM_FAILED_TO_SEND, #ifdef __FreeBSD__ reinterpret_cast(0))); #else reinterpret_cast(NULL))); #endif // __FreeBSD__ // DUB responses are slightly different request = NewDiscoveryUniqueBranchRequest(source_uid, uid1, uid2, 0); port1.SetRDMHandler( NewCallback(this, &UniverseTest::ReturnRDMCode, ola::rdm::RDM_DUB_RESPONSE)); port2.SetRDMHandler( NewCallback(this, &UniverseTest::ReturnRDMCode, ola::rdm::RDM_DUB_RESPONSE)); universe->SendRDMRequest( request, NewSingleCallback(this, &UniverseTest::ConfirmRDM, __LINE__, ola::rdm::RDM_DUB_RESPONSE, #ifdef __FreeBSD__ reinterpret_cast(0))); #else reinterpret_cast(NULL))); #endif // __FreeBSD__ // now check that we still get a RDM_DUB_RESPONSE even if one port returns an // RDM_TIMEOUT request = NewDiscoveryUniqueBranchRequest(source_uid, uid1, uid2, 0); port2.SetRDMHandler( NewCallback(this, &UniverseTest::ReturnRDMCode, ola::rdm::RDM_TIMEOUT)); universe->SendRDMRequest( request, NewSingleCallback(this, &UniverseTest::ConfirmRDM, __LINE__, ola::rdm::RDM_DUB_RESPONSE, #ifdef __FreeBSD__ reinterpret_cast(0))); #else reinterpret_cast(NULL))); #endif // __FreeBSD__ // and the same again but the second port returns // RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED request = NewDiscoveryUniqueBranchRequest(source_uid, uid1, uid2, 0); port2.SetRDMHandler( NewCallback(this, &UniverseTest::ReturnRDMCode, ola::rdm::RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED)); universe->SendRDMRequest( request, NewSingleCallback(this, &UniverseTest::ConfirmRDM, __LINE__, ola::rdm::RDM_DUB_RESPONSE, #ifdef __FreeBSD__ reinterpret_cast(0))); #else reinterpret_cast(NULL))); #endif // __FreeBSD__ // now the first port returns a RDM_TIMEOUT request = NewDiscoveryUniqueBranchRequest(source_uid, uid1, uid2, 0); port1.SetRDMHandler( NewCallback(this, &UniverseTest::ReturnRDMCode, ola::rdm::RDM_TIMEOUT)); universe->SendRDMRequest( request, NewSingleCallback(this, &UniverseTest::ConfirmRDM, __LINE__, ola::rdm::RDM_TIMEOUT, #ifdef __FreeBSD__ reinterpret_cast(0))); #else reinterpret_cast(NULL))); #endif // __FreeBSD__ // finally if neither ports support the DUB, we should return that request = NewDiscoveryUniqueBranchRequest(source_uid, uid1, uid2, 0); port1.SetRDMHandler( NewCallback(this, &UniverseTest::ReturnRDMCode, ola::rdm::RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED)); universe->SendRDMRequest( request, NewSingleCallback(this, &UniverseTest::ConfirmRDM, __LINE__, ola::rdm::RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED, #ifdef __FreeBSD__ reinterpret_cast(0))); #else reinterpret_cast(NULL))); #endif // __FreeBSD__ universe->RemovePort(&port1); universe->RemovePort(&port2); } /** * Check we got the uids we expect */ void UniverseTest::ConfirmUIDs(UIDSet *expected, const UIDSet &uids) { OLA_ASSERT_EQ(*expected, uids); } /** * Confirm an RDM response */ void UniverseTest::ConfirmRDM(int line, RDMStatusCode expected_status_code, const RDMResponse *expected_response, RDMReply *reply) { std::ostringstream str; str << "Line " << line; OLA_ASSERT_EQ_MSG(expected_status_code, reply->StatusCode(), str.str()); OLA_ASSERT_EQ_MSG(expected_response, reply->Response(), str.str()); } ola-0.10.9/olad/PluginManagerTest.cpp0000664000175000017500000001301114376533110014312 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PluginManagerTest.cpp * Test fixture for the PluginManager classes * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include "olad/Plugin.h" #include "olad/PluginAdaptor.h" #include "olad/PluginLoader.h" #include "olad/PluginManager.h" #include "olad/Preferences.h" #include "olad/plugin_api/TestCommon.h" #include "ola/testing/TestUtils.h" using ola::AbstractPlugin; using ola::PluginLoader; using ola::PluginManager; using std::set; using std::string; using std::vector; class PluginManagerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(PluginManagerTest); CPPUNIT_TEST(testPluginManager); CPPUNIT_TEST(testConflictingPlugins); CPPUNIT_TEST_SUITE_END(); public: void testPluginManager(); void testConflictingPlugins(); void setUp() { ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); } private: void VerifyPluginCounts(PluginManager *manager, size_t loaded_plugins, size_t active_plugins, const ola::testing::SourceLine &source_line) { vector plugins; manager->Plugins(&plugins); ola::testing::_AssertEquals(source_line, loaded_plugins, plugins.size(), "Loaded plugin count differs"); plugins.clear(); manager->ActivePlugins(&plugins); ola::testing::_AssertEquals(source_line, active_plugins, plugins.size(), "Active plugin count differs"); } }; CPPUNIT_TEST_SUITE_REGISTRATION(PluginManagerTest); /* * A Mock Loader */ class MockLoader: public ola::PluginLoader { public: explicit MockLoader(const vector &plugins): PluginLoader(), m_plugins(plugins) { } vector LoadPlugins() { return m_plugins; } void UnloadPlugins() {} private: vector m_plugins; }; /* * Check that we can load & unload plugins correctly. */ void PluginManagerTest::testPluginManager() { ola::MemoryPreferencesFactory factory; ola::PluginAdaptor adaptor(NULL, NULL, NULL, &factory, NULL, NULL); TestMockPlugin plugin1(&adaptor, ola::OLA_PLUGIN_ARTNET); TestMockPlugin plugin2(&adaptor, ola::OLA_PLUGIN_ESPNET, false); vector our_plugins; our_plugins.push_back(&plugin1); our_plugins.push_back(&plugin2); MockLoader loader(our_plugins); vector loaders; loaders.push_back(&loader); PluginManager manager(loaders, &adaptor); manager.LoadAll(); VerifyPluginCounts(&manager, 2, 1, OLA_SOURCELINE()); OLA_ASSERT(plugin1.IsRunning()); OLA_ASSERT_FALSE(plugin2.IsRunning()); manager.UnloadAll(); VerifyPluginCounts(&manager, 0, 0, OLA_SOURCELINE()); } /* * Check that we detect conflicting plugins */ void PluginManagerTest::testConflictingPlugins() { ola::MemoryPreferencesFactory factory; ola::PluginAdaptor adaptor(NULL, NULL, NULL, &factory, NULL, NULL); set conflict_set1, conflict_set2, conflict_set3; conflict_set1.insert(ola::OLA_PLUGIN_ARTNET); TestMockPlugin plugin1(&adaptor, ola::OLA_PLUGIN_DUMMY, conflict_set1); TestMockPlugin plugin2(&adaptor, ola::OLA_PLUGIN_ARTNET); conflict_set2.insert(ola::OLA_PLUGIN_ARTNET); TestMockPlugin plugin3(&adaptor, ola::OLA_PLUGIN_SHOWNET, conflict_set2); conflict_set3.insert(ola::OLA_PLUGIN_DUMMY); TestMockPlugin plugin4(&adaptor, ola::OLA_PLUGIN_SANDNET, conflict_set3); vector our_plugins; our_plugins.push_back(&plugin1); our_plugins.push_back(&plugin2); our_plugins.push_back(&plugin3); our_plugins.push_back(&plugin4); MockLoader loader(our_plugins); vector loaders; loaders.push_back(&loader); PluginManager manager(loaders, &adaptor); manager.LoadAll(); VerifyPluginCounts(&manager, 4, 2, OLA_SOURCELINE()); OLA_ASSERT_TRUE(plugin1.IsRunning()); OLA_ASSERT_FALSE(plugin2.IsRunning()); OLA_ASSERT_TRUE(plugin3.IsRunning()); // Try to enable the sandnet plugin, that conflicts with the dummy plugin OLA_ASSERT_FALSE(manager.EnableAndStartPlugin(ola::OLA_PLUGIN_SANDNET)); VerifyPluginCounts(&manager, 4, 2, OLA_SOURCELINE()); // Now disable the dummy plugin manager.DisableAndStopPlugin(ola::OLA_PLUGIN_DUMMY); VerifyPluginCounts(&manager, 4, 1, OLA_SOURCELINE()); OLA_ASSERT_FALSE(plugin1.IsRunning()); // Try to load sandnet again OLA_ASSERT_TRUE(manager.EnableAndStartPlugin(ola::OLA_PLUGIN_SANDNET)); VerifyPluginCounts(&manager, 4, 2, OLA_SOURCELINE()); OLA_ASSERT_TRUE(plugin4.IsRunning()); manager.UnloadAll(); VerifyPluginCounts(&manager, 0, 0, OLA_SOURCELINE()); } ola-0.10.9/olad/Makefile.mk0000664000175000017500000000566314376533110012301 00000000000000include olad/www/Makefile.mk dist_noinst_DATA += olad/testdata/test_preferences.conf # HEADERS ################################################## oladinclude_HEADERS += olad/OlaDaemon.h olad/OlaServer.h # LIBRARIES ################################################## ola_server_sources = \ olad/ClientBroker.cpp \ olad/ClientBroker.h \ olad/DiscoveryAgent.cpp \ olad/DiscoveryAgent.h \ olad/DynamicPluginLoader.cpp \ olad/DynamicPluginLoader.h \ olad/HttpServerActions.h \ olad/OlaServerServiceImpl.cpp \ olad/OlaServerServiceImpl.h \ olad/OladHTTPServer.h \ olad/PluginLoader.h \ olad/PluginManager.cpp \ olad/PluginManager.h \ olad/RDMHTTPModule.h ola_server_additional_libs = if HAVE_DNSSD ola_server_sources += olad/BonjourDiscoveryAgent.h \ olad/BonjourDiscoveryAgent.cpp endif if HAVE_AVAHI ola_server_sources += olad/AvahiDiscoveryAgent.h olad/AvahiDiscoveryAgent.cpp ola_server_additional_libs += $(avahi_LIBS) endif if HAVE_LIBMICROHTTPD ola_server_sources += olad/HttpServerActions.cpp \ olad/OladHTTPServer.cpp \ olad/RDMHTTPModule.cpp ola_server_additional_libs += common/http/libolahttp.la endif # lib olaserver lib_LTLIBRARIES += olad/libolaserver.la olad_libolaserver_la_SOURCES = $(ola_server_sources) \ olad/OlaServer.cpp \ olad/OlaDaemon.cpp olad_libolaserver_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) \ -DHTTP_DATA_DIR=\"${www_datadir}\" olad_libolaserver_la_LIBADD = $(PLUGIN_LIBS) \ common/libolacommon.la \ common/web/libolaweb.la \ ola/libola.la \ olad/plugin_api/libolaserverplugininterface.la \ $(ola_server_additional_libs) # Simon: I'm not too sure about this but it seems that because PLUGIN_LIBS is # determined at configure time, we need to add them here. EXTRA_olad_libolaserver_la_DEPENDENCIES = $(PLUGIN_LIBS) # PROGRAMS ################################################## bin_PROGRAMS += olad/olad olad_olad_SOURCES = olad/Olad.cpp if SUPPORTS_RDYNAMIC olad_olad_LDFLAGS = -rdynamic endif olad_olad_LDADD = olad/libolaserver.la \ common/libolacommon.la \ ola/libola.la # TESTS ################################################## test_programs += \ olad/OlaTester COMMON_OLAD_TEST_LDADD = $(COMMON_TESTING_LIBS) $(libprotobuf_LIBS) \ olad/plugin_api/libolaserverplugininterface.la \ olad/libolaserver.la \ common/libolacommon.la olad_OlaTester_SOURCES = \ olad/PluginManagerTest.cpp \ olad/OlaServerServiceImplTest.cpp olad_OlaTester_CXXFLAGS = $(COMMON_TESTING_PROTOBUF_FLAGS) olad_OlaTester_LDADD = $(COMMON_OLAD_TEST_LDADD) CLEANFILES += olad/ola-output.conf ola-0.10.9/olad/RDMHTTPModule.h0000664000175000017500000007417714376533110012702 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RDMHTTPModule.h * This module acts as the HTTP -> olad gateway for RDM commands. * Copyright (C) 2010 Simon Newton */ #ifndef OLAD_RDMHTTPMODULE_H_ #define OLAD_RDMHTTPMODULE_H_ #include #include #include #include #include #include "ola/base/Macro.h" #include "ola/client/ClientRDMAPIShim.h" #include "ola/client/OlaClient.h" #include "ola/http/HTTPServer.h" #include "ola/rdm/PidStore.h" #include "ola/rdm/RDMAPI.h" #include "ola/rdm/UID.h" #include "ola/thread/Mutex.h" #include "ola/web/JsonSections.h" namespace ola { /* * The module that deals with RDM requests. */ class RDMHTTPModule { public: RDMHTTPModule(ola::http::HTTPServer *http_server, ola::client::OlaClient *client); ~RDMHTTPModule(); void SetPidStore(const ola::rdm::RootPidStore *pid_store); int RunRDMDiscovery(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int JsonUIDs(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); // these are used by the RDM Patcher int JsonUIDInfo(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int JsonUIDIdentifyDevice(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int JsonUIDPersonalities(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); // these are used by the RDM Attributes Panel int JsonSupportedPIDs(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int JsonSupportedSections(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int JsonSectionInfo(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); int JsonSaveSectionInfo(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response); void PruneUniverseList(const std::vector &universes); private: typedef struct { std::string manufacturer; std::string device; bool active; } resolved_uid; typedef enum { RESOLVE_MANUFACTURER, RESOLVE_DEVICE, } uid_resolve_action; typedef struct { std::map resolved_uids; std::queue > pending_uids; bool uid_resolution_running; bool active; } uid_resolution_state; ola::http::HTTPServer *m_server; ola::client::OlaClient *m_client; ola::client::ClientRDMAPIShim m_shim; ola::rdm::RDMAPI m_rdm_api; std::map m_universe_uids; ola::thread::Mutex m_pid_store_mu; const ola::rdm::RootPidStore *m_pid_store; // GUARDED_BY(m_pid_store_mu); typedef struct { std::string id; std::string name; std::string hint; } section_info; struct lt_section_info { bool operator()(const section_info &left, const section_info &right) { return left.name < right.name; } }; typedef struct { unsigned int universe_id; const ola::rdm::UID uid; std::string hint; std::string device_model; std::string software_version; } device_info; typedef struct { unsigned int universe_id; const ola::rdm::UID *uid; bool include_descriptions; bool return_as_section; unsigned int active; unsigned int next; unsigned int total; std::vector > personalities; } personality_info; // UID resolution methods void HandleUIDList(ola::http::HTTPResponse *response, unsigned int universe_id, const client::Result &result, const ola::rdm::UIDSet &uids); void ResolveNextUID(unsigned int universe_id); void UpdateUIDManufacturerLabel(unsigned int universe, ola::rdm::UID uid, const ola::rdm::ResponseStatus &status, const std::string &device_label); void UpdateUIDDeviceLabel(unsigned int universe, ola::rdm::UID uid, const ola::rdm::ResponseStatus &status, const std::string &device_label); uid_resolution_state *GetUniverseUids(unsigned int universe); uid_resolution_state *GetUniverseUidsOrCreate(unsigned int universe); // uid info handler void UIDInfoHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, const ola::rdm::DeviceDescriptor &device); // uid identify handler void UIDIdentifyDeviceHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, bool value); // personality handler void SendPersonalityResponse(ola::http::HTTPResponse *response, personality_info *info); // supported params / sections void SupportedParamsHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, const std::vector &pids); void SupportedSectionsHandler(ola::http::HTTPResponse *response, unsigned int universe, ola::rdm::UID uid, const ola::rdm::ResponseStatus &status, const std::vector &pids); void SupportedSectionsDeviceInfoHandler( ola::http::HTTPResponse *response, const std::vector pids, const ola::rdm::ResponseStatus &status, const ola::rdm::DeviceDescriptor &device); // section methods std::string GetCommStatus(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void CommStatusHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint16_t short_messages, uint16_t length_mismatch, uint16_t checksum_fail); std::string ClearCommsCounters(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetProxiedDevices(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void ProxiedDevicesHandler(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::ResponseStatus &status, const std::vector &uids); std::string GetDeviceInfo(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void GetSoftwareVersionHandler(ola::http::HTTPResponse *response, device_info dev_info, const ola::rdm::ResponseStatus &status, const std::string &software_version); void GetDeviceModelHandler(ola::http::HTTPResponse *response, device_info dev_info, const ola::rdm::ResponseStatus &status, const std::string &device_model); void GetDeviceInfoHandler(ola::http::HTTPResponse *response, device_info dev_info, const ola::rdm::ResponseStatus &status, const ola::rdm::DeviceDescriptor &device); std::string GetProductIds(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void GetProductIdsHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, const std::vector &ids); std::string GetManufacturerLabel(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void GetManufacturerLabelHandler(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID uid, const ola::rdm::ResponseStatus &status, const std::string &label); std::string GetDeviceLabel(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void GetDeviceLabelHandler(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID uid, const ola::rdm::ResponseStatus &status, const std::string &label); std::string SetDeviceLabel(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetFactoryDefaults(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void FactoryDefaultsHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, bool defaults); std::string SetFactoryDefault(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetLanguage(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void GetSupportedLanguagesHandler( ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID uid, const ola::rdm::ResponseStatus &status, const std::vector &languages); void GetLanguageHandler(ola::http::HTTPResponse *response, std::vector languages, const ola::rdm::ResponseStatus &status, const std::string &language); std::string SetLanguage(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetBootSoftware(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void GetBootSoftwareLabelHandler(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID uid, const ola::rdm::ResponseStatus &status, const std::string &label); void GetBootSoftwareVersionHandler( ola::http::HTTPResponse *response, std::string label, const ola::rdm::ResponseStatus &status, uint32_t version); std::string GetPersonalities(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid, bool return_as_section, bool include_description = false); void GetPersonalityHandler( ola::http::HTTPResponse *response, personality_info *info, const ola::rdm::ResponseStatus &status, uint8_t current, uint8_t total); void GetNextPersonalityDescription(ola::http::HTTPResponse *response, personality_info *info); void GetPersonalityLabelHandler( ola::http::HTTPResponse *response, personality_info *info, const ola::rdm::ResponseStatus &status, uint8_t personality, uint16_t slot_count, const std::string &label); void SendSectionPersonalityResponse(ola::http::HTTPResponse *response, personality_info *info); std::string SetPersonality(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetStartAddress(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void GetStartAddressHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint16_t address); std::string SetStartAddress(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetSensor(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void SensorDefinitionHandler(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID uid, uint8_t sensor_id, const ola::rdm::ResponseStatus &status, const ola::rdm::SensorDescriptor &definition); void SensorValueHandler(ola::http::HTTPResponse *response, ola::rdm::SensorDescriptor *definition, const ola::rdm::ResponseStatus &status, const ola::rdm::SensorValueDescriptor &value); std::string RecordSensor(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetDeviceHours(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string SetDeviceHours(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetLampHours(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string SetLampHours(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetLampStrikes(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string SetLampStrikes(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetLampState(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void LampStateHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint8_t state); std::string SetLampState(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetLampMode(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void LampModeHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint8_t mode); std::string SetLampMode(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetPowerCycles(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string SetPowerCycles(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetDisplayInvert(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void DisplayInvertHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint8_t value); std::string SetDisplayInvert(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetDisplayLevel(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void DisplayLevelHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint8_t value); std::string SetDisplayLevel(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetPanInvert(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string SetPanInvert(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetTiltInvert(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string SetTiltInvert(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetPanTiltSwap(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string SetPanTiltSwap(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetClock(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void ClockHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, const ola::rdm::ClockValue &clock); std::string SyncClock(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetIdentifyDevice(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string SetIdentifyDevice(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetPowerState(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void PowerStateHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, uint8_t value); std::string SetPowerState(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetResetDevice(ola::http::HTTPResponse *response); std::string SetResetDevice(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetDnsHostname(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void GetDnsHostnameHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, const std::string &label); std::string SetDnsHostname(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); std::string GetDnsDomainName(ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); void GetDnsDomainNameHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status, const std::string &label); std::string SetDnsDomainName(const ola::http::HTTPRequest *request, ola::http::HTTPResponse *response, unsigned int universe_id, const ola::rdm::UID &uid); // util methods bool CheckForInvalidId(const ola::http::HTTPRequest *request, unsigned int *universe_id); bool CheckForInvalidUid(const ola::http::HTTPRequest *request, ola::rdm::UID **uid); uint16_t SubDeviceOrRoot(const ola::http::HTTPRequest *request); void SetHandler(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status); void GenericUIntHandler(ola::http::HTTPResponse *response, std::string description, const ola::rdm::ResponseStatus &status, uint32_t value); void GenericUInt8BoolHandler(ola::http::HTTPResponse *response, std::string description, const ola::rdm::ResponseStatus &status, uint8_t value); void GenericBoolHandler(ola::http::HTTPResponse *response, std::string description, const ola::rdm::ResponseStatus &status, bool value); bool CheckForRDMError(ola::http::HTTPResponse *response, const ola::rdm::ResponseStatus &status); int RespondWithError(ola::http::HTTPResponse *response, const std::string &error); void RespondWithSection(ola::http::HTTPResponse *response, const ola::web::JsonSection §ion); bool CheckForRDMSuccess(const ola::rdm::ResponseStatus &status); bool CheckForRDMSuccessWithError(const ola::rdm::ResponseStatus &status, std::string *error); void HandleBoolResponse(ola::http::HTTPResponse *response, const std::string &error); void AddSection(std::vector *sections, const std::string §ion_id, const std::string §ion_name, const std::string &hint = ""); static const uint32_t INVALID_PERSONALITY = 0xffff; static const char BACKEND_DISCONNECTED_ERROR[]; static const char HINT_KEY[]; static const char ID_KEY[]; static const char SECTION_KEY[]; static const char UID_KEY[]; static const char ADDRESS_FIELD[]; static const char DISPLAY_INVERT_FIELD[]; static const char GENERIC_BOOL_FIELD[]; static const char GENERIC_STRING_FIELD[]; static const char GENERIC_UINT_FIELD[]; static const char IDENTIFY_DEVICE_FIELD[]; static const char LABEL_FIELD[]; static const char LANGUAGE_FIELD[]; static const char RECORD_SENSOR_FIELD[]; static const char SUB_DEVICE_FIELD[]; static const char BOOT_SOFTWARE_SECTION[]; static const char CLOCK_SECTION[]; static const char COMMS_STATUS_SECTION[]; static const char DEVICE_HOURS_SECTION[]; static const char DEVICE_INFO_SECTION[]; static const char DEVICE_LABEL_SECTION[]; static const char DISPLAY_INVERT_SECTION[]; static const char DISPLAY_LEVEL_SECTION[]; static const char DMX_ADDRESS_SECTION[]; static const char DNS_DOMAIN_NAME_SECTION[]; static const char DNS_HOSTNAME_SECTION[]; static const char FACTORY_DEFAULTS_SECTION[]; static const char IDENTIFY_DEVICE_SECTION[]; static const char LAMP_HOURS_SECTION[]; static const char LAMP_MODE_SECTION[]; static const char LAMP_STATE_SECTION[]; static const char LAMP_STRIKES_SECTION[]; static const char LANGUAGE_SECTION[]; static const char MANUFACTURER_LABEL_SECTION[]; static const char PAN_INVERT_SECTION[]; static const char PAN_TILT_SWAP_SECTION[]; static const char PERSONALITY_SECTION[]; static const char POWER_CYCLES_SECTION[]; static const char POWER_STATE_SECTION[]; static const char PRODUCT_DETAIL_SECTION[]; static const char PROXIED_DEVICES_SECTION[]; static const char RESET_DEVICE_SECTION[]; static const char SENSOR_SECTION[]; static const char TILT_INVERT_SECTION[]; static const char BOOT_SOFTWARE_SECTION_NAME[]; static const char CLOCK_SECTION_NAME[]; static const char COMMS_STATUS_SECTION_NAME[]; static const char DEVICE_HOURS_SECTION_NAME[]; static const char DEVICE_INFO_SECTION_NAME[]; static const char DEVICE_LABEL_SECTION_NAME[]; static const char DISPLAY_INVERT_SECTION_NAME[]; static const char DISPLAY_LEVEL_SECTION_NAME[]; static const char DMX_ADDRESS_SECTION_NAME[]; static const char DNS_DOMAIN_NAME_SECTION_NAME[]; static const char DNS_HOSTNAME_SECTION_NAME[]; static const char FACTORY_DEFAULTS_SECTION_NAME[]; static const char IDENTIFY_DEVICE_SECTION_NAME[]; static const char LAMP_HOURS_SECTION_NAME[]; static const char LAMP_MODE_SECTION_NAME[]; static const char LAMP_STATE_SECTION_NAME[]; static const char LAMP_STRIKES_SECTION_NAME[]; static const char LANGUAGE_SECTION_NAME[]; static const char MANUFACTURER_LABEL_SECTION_NAME[]; static const char PAN_INVERT_SECTION_NAME[]; static const char PAN_TILT_SWAP_SECTION_NAME[]; static const char PERSONALITY_SECTION_NAME[]; static const char POWER_CYCLES_SECTION_NAME[]; static const char POWER_STATE_SECTION_NAME[]; static const char PRODUCT_DETAIL_SECTION_NAME[]; static const char PROXIED_DEVICES_SECTION_NAME[]; static const char RESET_DEVICE_SECTION_NAME[]; static const char TILT_INVERT_SECTION_NAME[]; DISALLOW_COPY_AND_ASSIGN(RDMHTTPModule); }; } // namespace ola #endif // OLAD_RDMHTTPMODULE_H_ ola-0.10.9/olad/ClientBroker.h0000664000175000017500000000744414376533110012766 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ClientBroker.h * The client broker exists to handle the case where a client may disconnect * while a RDM call is in flight. When the call completes, the client broker * will detect that the client has disconnected and not run the callback (which * would now point to an invalid memory location). * Copyright (C) 2010 Simon Newton */ #ifndef OLAD_CLIENTBROKER_H_ #define OLAD_CLIENTBROKER_H_ #include #include #include #include "ola/base/Macro.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/RDMControllerInterface.h" #include "ola/Callback.h" #include "olad/Universe.h" #include "olad/plugin_api/Client.h" namespace ola { /** * @brief Handles async client operations. * * Since some client operations such as RDM commands are asynchronous, * we can run into problems if the client disconnects while the operation * is in progress. This is because the completion callback will hold a pointer * to a client which has been deleted. * * The ClientBroker acts as an in-between by holding a list of active clients * and proxying RDM calls. When the RDM call returns, if the client responsible * for the call has been deleted, we delete the callback rather then executing * it. */ class ClientBroker { public: ClientBroker() {} ~ClientBroker() {} /** * @brief Add a client to the broker. * @param client the Client to add. Ownership is not transferred. */ void AddClient(const Client *client); /** * @brief Remove a client from the broker. * @param client The Client to remove. */ void RemoveClient(const Client *client); /** * @brief Make an RDM call. * @param client the Client responsible for making the call. * @param universe the universe to send the RDM request on. * @param request the RDM request. * @param callback the callback to run when the request completes. Ownership * is transferred. */ void SendRDMRequest(const Client *client, Universe *universe, ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *callback); /** * @brief Make an RDM call. * @param client the Client responsible for making the call. * @param universe the universe to send the RDM request on. * @param full_discovery true for full discovery, false for incremental. * @param callback the callback to run when the request completes. Ownership * is transferred. */ void RunRDMDiscovery(const Client *client, Universe *universe, bool full_discovery, ola::rdm::RDMDiscoveryCallback *callback); private: typedef std::set client_set; client_set m_clients; void RequestComplete(const Client *key, ola::rdm::RDMCallback *callback, ola::rdm::RDMReply *reply); void DiscoveryComplete(const Client *key, ola::rdm::RDMDiscoveryCallback *on_complete, const ola::rdm::UIDSet &uids); DISALLOW_COPY_AND_ASSIGN(ClientBroker); }; } // namespace ola #endif // OLAD_CLIENTBROKER_H_ ola-0.10.9/Doxyfile0000664000175000017500000023463514376533110011025 00000000000000# Doxyfile 1.8.3.1 # This file describes the settings to be used by the documentation system # doxygen (www.doxygen.org) for a project. # # All text after a hash (#) is considered a comment and will be ignored. # The format is: # TAG = value [value, ...] # For lists items can also be appended using: # TAG += value [value, ...] # Values that contain spaces should be placed between quotes (" "). #--------------------------------------------------------------------------- # Project related configuration options #--------------------------------------------------------------------------- # This tag specifies the encoding used for all characters in the config file # that follow. The default is UTF-8 which is also the encoding used for all # text before the first occurrence of this tag. Doxygen uses libiconv (or the # iconv built into libc) for the transcoding. See # http://www.gnu.org/software/libiconv for the list of possible encodings. DOXYFILE_ENCODING = UTF-8 # The PROJECT_NAME tag is a single word (or sequence of words) that should # identify the project. Note that if you do not use Doxywizard you need # to put quotes around the project name if it contains spaces. PROJECT_NAME = "Open Lighting Architecture" # The PROJECT_NUMBER tag can be used to enter a project or revision number. # This could be handy for archiving the generated documentation or # if some version control system is used. PROJECT_NUMBER = $(PROJECT_NUMBER) # Using the PROJECT_BRIEF tag one can provide an optional one line description # for a project that appears at the top of each page and should give viewer # a quick idea about the purpose of the project. Keep the description short. PROJECT_BRIEF = # With the PROJECT_LOGO tag one can specify an logo or icon that is # included in the documentation. The maximum height of the logo should not # exceed 55 pixels and the maximum width should not exceed 200 pixels. # Doxygen will copy the logo to the output directory. PROJECT_LOGO = "doxygen/OLA.png" # The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) # base path where the generated documentation will be put. # If a relative path is entered, it will be relative to the location # where doxygen was started. If left blank the current directory will be used. OUTPUT_DIRECTORY = # If the CREATE_SUBDIRS tag is set to YES, then doxygen will create # 4096 sub-directories (in 2 levels) under the output directory of each output # format and will distribute the generated files over these directories. # Enabling this option can be useful when feeding doxygen a huge amount of # source files, where putting all generated files in the same directory would # otherwise cause performance problems for the file system. CREATE_SUBDIRS = NO # The OUTPUT_LANGUAGE tag is used to specify the language in which all # documentation generated by doxygen is written. Doxygen will use this # information to generate all constant output in the proper language. # The default language is English, other supported languages are: # Afrikaans, Arabic, Brazilian, Catalan, Chinese, Chinese-Traditional, # Croatian, Czech, Danish, Dutch, Esperanto, Farsi, Finnish, French, German, # Greek, Hungarian, Italian, Japanese, Japanese-en (Japanese with English # messages), Korean, Korean-en, Lithuanian, Norwegian, Macedonian, Persian, # Polish, Portuguese, Romanian, Russian, Serbian, Serbian-Cyrillic, Slovak, # Slovene, Spanish, Swedish, Ukrainian, and Vietnamese. OUTPUT_LANGUAGE = English # If the BRIEF_MEMBER_DESC tag is set to YES (the default) Doxygen will # include brief member descriptions after the members that are listed in # the file and class documentation (similar to JavaDoc). # Set to NO to disable this. BRIEF_MEMBER_DESC = YES # If the REPEAT_BRIEF tag is set to YES (the default) Doxygen will prepend # the brief description of a member or function before the detailed description. # Note: if both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the # brief descriptions will be completely suppressed. REPEAT_BRIEF = YES # This tag implements a quasi-intelligent brief description abbreviator # that is used to form the text in various listings. Each string # in this list, if found as the leading text of the brief description, will be # stripped from the text and the result after processing the whole list, is # used as the annotated text. Otherwise, the brief description is used as-is. # If left blank, the following values are used ("$name" is automatically # replaced with the name of the entity): "The $name class" "The $name widget" # "The $name file" "is" "provides" "specifies" "contains" # "represents" "a" "an" "the" ABBREVIATE_BRIEF = # If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then # Doxygen will generate a detailed section even if there is only a brief # description. ALWAYS_DETAILED_SEC = NO # If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all # inherited members of a class in the documentation of that class as if those # members were ordinary class members. Constructors, destructors and assignment # operators of the base classes will not be shown. INLINE_INHERITED_MEMB = NO # If the FULL_PATH_NAMES tag is set to YES then Doxygen will prepend the full # path before files name in the file list and in the header files. If set # to NO the shortest path that makes the file name unique will be used. FULL_PATH_NAMES = YES # If the FULL_PATH_NAMES tag is set to YES then the STRIP_FROM_PATH tag # can be used to strip a user-defined part of the path. Stripping is # only done if one of the specified strings matches the left-hand part of # the path. The tag can be used to show relative paths in the file list. # If left blank the directory from which doxygen is run is used as the # path to strip. Note that you specify absolute paths here, but also # relative paths, which will be relative from the directory where doxygen is # started. STRIP_FROM_PATH = # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of # the path mentioned in the documentation of a class, which tells # the reader which header file to include in order to use a class. # If left blank only the name of the header file containing the class # definition is used. Otherwise one should specify the include paths that # are normally passed to the compiler using the -I flag. STRIP_FROM_INC_PATH = # If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter # (but less readable) file names. This can be useful if your file system # doesn't support long names like on DOS, Mac, or CD-ROM. SHORT_NAMES = NO # If the JAVADOC_AUTOBRIEF tag is set to YES then Doxygen # will interpret the first line (until the first dot) of a JavaDoc-style # comment as the brief description. If set to NO, the JavaDoc # comments will behave just like regular Qt-style comments # (thus requiring an explicit @brief command for a brief description.) JAVADOC_AUTOBRIEF = NO # If the QT_AUTOBRIEF tag is set to YES then Doxygen will # interpret the first line (until the first dot) of a Qt-style # comment as the brief description. If set to NO, the comments # will behave just like regular Qt-style comments (thus requiring # an explicit \brief command for a brief description.) QT_AUTOBRIEF = NO # The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make Doxygen # treat a multi-line C++ special comment block (i.e. a block of //! or /// # comments) as a brief description. This used to be the default behaviour. # The new default is to treat a multi-line C++ comment block as a detailed # description. Set this tag to YES if you prefer the old behaviour instead. MULTILINE_CPP_IS_BRIEF = NO # If the INHERIT_DOCS tag is set to YES (the default) then an undocumented # member inherits the documentation from any documented member that it # re-implements. INHERIT_DOCS = YES # If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce # a new page for each member. If set to NO, the documentation of a member will # be part of the file/class/namespace that contains it. SEPARATE_MEMBER_PAGES = NO # The TAB_SIZE tag can be used to set the number of spaces in a tab. # Doxygen uses this value to replace tabs by spaces in code fragments. TAB_SIZE = 4 # This tag can be used to specify a number of aliases that acts # as commands in the documentation. An alias has the form "name=value". # For example adding "sideeffect=\par Side Effects:\n" will allow you to # put the command \sideeffect (or @sideeffect) in the documentation, which # will result in a user-defined paragraph with heading "Side Effects:". # You can put \n's in the value part of an alias to insert newlines. ALIASES = "examplepara=\par Example" # This tag can be used to specify a number of word-keyword mappings (TCL only). # A mapping has the form "name=value". For example adding # "class=itcl::class" will allow you to use the command class in the # itcl::class meaning. TCL_SUBST = # Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C # sources only. Doxygen will then generate output that is more tailored for C. # For instance, some of the names that are used will be different. The list # of all members will be omitted, etc. OPTIMIZE_OUTPUT_FOR_C = NO # Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java # sources only. Doxygen will then generate output that is more tailored for # Java. For instance, namespaces will be presented as packages, qualified # scopes will look different, etc. OPTIMIZE_OUTPUT_JAVA = NO # Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran # sources only. Doxygen will then generate output that is more tailored for # Fortran. OPTIMIZE_FOR_FORTRAN = NO # Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL # sources. Doxygen will then generate output that is tailored for # VHDL. OPTIMIZE_OUTPUT_VHDL = NO # Doxygen selects the parser to use depending on the extension of the files it # parses. With this tag you can assign which parser to use for a given # extension. Doxygen has a built-in mapping, but you can override or extend it # using this tag. The format is ext=language, where ext is a file extension, # and language is one of the parsers supported by doxygen: IDL, Java, # Javascript, CSharp, C, C++, D, PHP, Objective-C, Python, Fortran, VHDL, C, # C++. For instance to make doxygen treat .inc files as Fortran files (default # is PHP), and .f files as C (default is Fortran), use: inc=Fortran f=C. Note # that for custom extensions you also need to set FILE_PATTERNS otherwise the # files are not read by doxygen. EXTENSION_MAPPING = # If MARKDOWN_SUPPORT is enabled (the default) then doxygen pre-processes all # comments according to the Markdown format, which allows for more readable # documentation. See http://daringfireball.net/projects/markdown/ for details. # The output of markdown processing is further processed by doxygen, so you # can mix doxygen, HTML, and XML commands with Markdown formatting. # Disable only in case of backward compatibilities issues. # Commented out due to lack of support on Travis and causing spurious errors # MARKDOWN_SUPPORT = YES # When enabled doxygen tries to link words that correspond to documented classes, # or namespaces to their corresponding documentation. Such a link can be # prevented in individual cases by putting a % sign in front of the word or # globally by setting AUTOLINK_SUPPORT to NO. # Commented out due to lack of support on Travis and causing spurious errors # AUTOLINK_SUPPORT = YES # If you use STL classes (i.e. std::string, std::vector, etc.) but do not want # to include (a tag file for) the STL sources as input, then you should # set this tag to YES in order to let doxygen match functions declarations and # definitions whose arguments contain STL classes (e.g. func(std::string); v.s. # func(std::string) {}). This also makes the inheritance and collaboration # diagrams that involve STL classes more complete and accurate. BUILTIN_STL_SUPPORT = YES # If you use Microsoft's C++/CLI language, you should set this option to YES to # enable parsing support. CPP_CLI_SUPPORT = NO # Set the SIP_SUPPORT tag to YES if your project consists of sip sources only. # Doxygen will parse them like normal C++ but will assume all classes use public # instead of private inheritance when no explicit protection keyword is present. SIP_SUPPORT = NO # For Microsoft's IDL there are propget and propput attributes to indicate # getter and setter methods for a property. Setting this option to YES (the # default) will make doxygen replace the get and set methods by a property in # the documentation. This will only work if the methods are indeed getting or # setting a simple type. If this is not the case, or you want to show the # methods anyway, you should set this option to NO. IDL_PROPERTY_SUPPORT = YES # If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC # tag is set to YES, then doxygen will reuse the documentation of the first # member in the group (if any) for the other members of the group. By default # all members of a group must be documented explicitly. DISTRIBUTE_GROUP_DOC = NO # Set the SUBGROUPING tag to YES (the default) to allow class member groups of # the same type (for instance a group of public functions) to be put as a # subgroup of that type (e.g. under the Public Functions section). Set it to # NO to prevent subgrouping. Alternatively, this can be done per class using # the \nosubgrouping command. SUBGROUPING = YES # When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and # unions are shown inside the group in which they are included (e.g. using # @ingroup) instead of on a separate page (for HTML and Man pages) or # section (for LaTeX and RTF). INLINE_GROUPED_CLASSES = NO # When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and # unions with only public data fields will be shown inline in the documentation # of the scope in which they are defined (i.e. file, namespace, or group # documentation), provided this scope is documented. If set to NO (the default), # structs, classes, and unions are shown on a separate page (for HTML and Man # pages) or section (for LaTeX and RTF). INLINE_SIMPLE_STRUCTS = NO # When TYPEDEF_HIDES_STRUCT is enabled, a typedef of a struct, union, or enum # is documented as struct, union, or enum with the name of the typedef. So # typedef struct TypeS {} TypeT, will appear in the documentation as a struct # with name TypeT. When disabled the typedef will appear as a member of a file, # namespace, or class. And the struct will be named TypeS. This can typically # be useful for C code in case the coding convention dictates that all compound # types are typedef'ed and only the typedef is referenced, never the tag name. TYPEDEF_HIDES_STRUCT = NO # Similar to the SYMBOL_CACHE_SIZE the size of the symbol lookup cache can be # set using LOOKUP_CACHE_SIZE. This cache is used to resolve symbols given # their name and scope. Since this can be an expensive process and often the # same symbol appear multiple times in the code, doxygen keeps a cache of # pre-resolved symbols. If the cache is too small doxygen will become slower. # If the cache is too large, memory is wasted. The cache size is given by this # formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range is 0..9, the default is 0, # corresponding to a cache size of 2^16 = 65536 symbols. LOOKUP_CACHE_SIZE = 0 #--------------------------------------------------------------------------- # Build related configuration options #--------------------------------------------------------------------------- # If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in # documentation are documented, even if no documentation was available. # Private class members and static file members will be hidden unless # the EXTRACT_PRIVATE and EXTRACT_STATIC tags are set to YES EXTRACT_ALL = NO # If the EXTRACT_PRIVATE tag is set to YES all private members of a class # will be included in the documentation. EXTRACT_PRIVATE = NO # If the EXTRACT_PACKAGE tag is set to YES all members with package or internal # scope will be included in the documentation. # Commented out due to lack of support on Travis and causing spurious errors # EXTRACT_PACKAGE = NO # If the EXTRACT_STATIC tag is set to YES all static members of a file # will be included in the documentation. EXTRACT_STATIC = YES # If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) # defined locally in source files will be included in the documentation. # If set to NO only classes defined in header files are included. EXTRACT_LOCAL_CLASSES = YES # This flag is only useful for Objective-C code. When set to YES local # methods, which are defined in the implementation section but not in # the interface are included in the documentation. # If set to NO (the default) only methods in the interface are included. EXTRACT_LOCAL_METHODS = NO # If this flag is set to YES, the members of anonymous namespaces will be # extracted and appear in the documentation as a namespace called # 'anonymous_namespace{file}', where file will be replaced with the base # name of the file that contains the anonymous namespace. By default # anonymous namespaces are hidden. EXTRACT_ANON_NSPACES = NO # If the HIDE_UNDOC_MEMBERS tag is set to YES, Doxygen will hide all # undocumented members of documented classes, files or namespaces. # If set to NO (the default) these members will be included in the # various overviews, but no documentation section is generated. # This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_MEMBERS = NO # If the HIDE_UNDOC_CLASSES tag is set to YES, Doxygen will hide all # undocumented classes that are normally visible in the class hierarchy. # If set to NO (the default) these classes will be included in the various # overviews. This option has no effect if EXTRACT_ALL is enabled. HIDE_UNDOC_CLASSES = NO # If the HIDE_FRIEND_COMPOUNDS tag is set to YES, Doxygen will hide all # friend (class|struct|union) declarations. # If set to NO (the default) these declarations will be included in the # documentation. HIDE_FRIEND_COMPOUNDS = NO # If the HIDE_IN_BODY_DOCS tag is set to YES, Doxygen will hide any # documentation blocks found inside the body of a function. # If set to NO (the default) these blocks will be appended to the # function's detailed documentation block. HIDE_IN_BODY_DOCS = NO # The INTERNAL_DOCS tag determines if documentation # that is typed after a \internal command is included. If the tag is set # to NO (the default) then the documentation will be excluded. # Set it to YES to include the internal documentation. INTERNAL_DOCS = NO # If the CASE_SENSE_NAMES tag is set to NO then Doxygen will only generate # file names in lower-case letters. If set to YES upper-case letters are also # allowed. This is useful if you have classes or files whose names only differ # in case and if your file system supports case sensitive file names. Windows # and Mac users are advised to set this option to NO. CASE_SENSE_NAMES = NO # If the HIDE_SCOPE_NAMES tag is set to NO (the default) then Doxygen # will show members with their full class and namespace scopes in the # documentation. If set to YES the scope will be hidden. HIDE_SCOPE_NAMES = NO # If the SHOW_INCLUDE_FILES tag is set to YES (the default) then Doxygen # will put a list of the files that are included by a file in the documentation # of that file. SHOW_INCLUDE_FILES = NO # If the FORCE_LOCAL_INCLUDES tag is set to YES then Doxygen # will list include files with double quotes in the documentation # rather than with sharp brackets. FORCE_LOCAL_INCLUDES = NO # If the INLINE_INFO tag is set to YES (the default) then a tag [inline] # is inserted in the documentation for inline members. INLINE_INFO = YES # If the SORT_MEMBER_DOCS tag is set to YES (the default) then doxygen # will sort the (detailed) documentation of file and class members # alphabetically by member name. If set to NO the members will appear in # declaration order. SORT_MEMBER_DOCS = YES # If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the # brief documentation of file, namespace and class members alphabetically # by member name. If set to NO (the default) the members will appear in # declaration order. SORT_BRIEF_DOCS = NO # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen # will sort the (brief and detailed) documentation of class members so that # constructors and destructors are listed first. If set to NO (the default) # the constructors will appear in the respective orders defined by # SORT_MEMBER_DOCS and SORT_BRIEF_DOCS. # This tag will be ignored for brief docs if SORT_BRIEF_DOCS is set to NO # and ignored for detailed docs if SORT_MEMBER_DOCS is set to NO. SORT_MEMBERS_CTORS_1ST = NO # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the # hierarchy of group names into alphabetical order. If set to NO (the default) # the group names will appear in their defined order. SORT_GROUP_NAMES = NO # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be # sorted by fully-qualified names, including namespaces. If set to # NO (the default), the class list will be sorted only by class name, # not including the namespace part. # Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. # Note: This option applies only to the class list, not to the # alphabetical list. SORT_BY_SCOPE_NAME = NO # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to # do proper type resolution of all parameters of a function it will reject a # match between the prototype and the implementation of a member function even # if there is only one candidate or it is obvious which candidate to choose # by doing a simple string match. By disabling STRICT_PROTO_MATCHING doxygen # will still accept a match between prototype and implementation in such cases. STRICT_PROTO_MATCHING = NO # The GENERATE_TODOLIST tag can be used to enable (YES) or # disable (NO) the todo list. This list is created by putting \todo # commands in the documentation. GENERATE_TODOLIST = YES # The GENERATE_TESTLIST tag can be used to enable (YES) or # disable (NO) the test list. This list is created by putting \test # commands in the documentation. GENERATE_TESTLIST = YES # The GENERATE_BUGLIST tag can be used to enable (YES) or # disable (NO) the bug list. This list is created by putting \bug # commands in the documentation. GENERATE_BUGLIST = YES # The GENERATE_DEPRECATEDLIST tag can be used to enable (YES) or # disable (NO) the deprecated list. This list is created by putting # \deprecated commands in the documentation. GENERATE_DEPRECATEDLIST= YES # The ENABLED_SECTIONS tag can be used to enable conditional # documentation sections, marked by \if section-label ... \endif # and \cond section-label ... \endcond blocks. ENABLED_SECTIONS = # The MAX_INITIALIZER_LINES tag determines the maximum number of lines # the initial value of a variable or macro consists of for it to appear in # the documentation. If the initializer consists of more lines than specified # here it will be hidden. Use a value of 0 to hide initializers completely. # The appearance of the initializer of individual variables and macros in the # documentation can be controlled using \showinitializer or \hideinitializer # command in the documentation regardless of this setting. MAX_INITIALIZER_LINES = 30 # Set the SHOW_USED_FILES tag to NO to disable the list of files generated # at the bottom of the documentation of classes and structs. If set to YES the # list will mention the files that were used to generate the documentation. SHOW_USED_FILES = YES # Set the SHOW_FILES tag to NO to disable the generation of the Files page. # This will remove the Files entry from the Quick Index and from the # Folder Tree View (if specified). The default is YES. SHOW_FILES = YES # Set the SHOW_NAMESPACES tag to NO to disable the generation of the # Namespaces page. # This will remove the Namespaces entry from the Quick Index # and from the Folder Tree View (if specified). The default is YES. SHOW_NAMESPACES = YES # The FILE_VERSION_FILTER tag can be used to specify a program or script that # doxygen should invoke to get the current version for each file (typically from # the version control system). Doxygen will invoke the program by executing (via # popen()) the command , where is the value of # the FILE_VERSION_FILTER tag, and is the name of an input file # provided by doxygen. Whatever the program writes to standard output # is used as the file version. See the manual for examples. FILE_VERSION_FILTER = # The LAYOUT_FILE tag can be used to specify a layout file which will be parsed # by doxygen. The layout file controls the global structure of the generated # output files in an output format independent way. To create the layout file # that represents doxygen's defaults, run doxygen with the -l option. # You can optionally specify a file name after the option, if omitted # DoxygenLayout.xml will be used as the name of the layout file. LAYOUT_FILE = doxygen/OLALayout.xml # The CITE_BIB_FILES tag can be used to specify one or more bib files # containing the references data. This must be a list of .bib files. The # .bib extension is automatically appended if omitted. Using this command # requires the bibtex tool to be installed. See also # http://en.wikipedia.org/wiki/BibTeX for more info. For LaTeX the style # of the bibliography can be controlled using LATEX_BIB_STYLE. To use this # feature you need bibtex and perl available in the search path. Do not use # file names with spaces, bibtex cannot handle them. CITE_BIB_FILES = #--------------------------------------------------------------------------- # configuration options related to warning and progress messages #--------------------------------------------------------------------------- # The QUIET tag can be used to turn on/off the messages that are generated # by doxygen. Possible values are YES and NO. If left blank NO is used. QUIET = $(QUIET) # The WARNINGS tag can be used to turn on/off the warning messages that are # generated by doxygen. Possible values are YES and NO. If left blank # NO is used. WARNINGS = YES # If WARN_IF_UNDOCUMENTED is set to YES, then doxygen will generate warnings # for undocumented members. If EXTRACT_ALL is set to YES then this flag will # automatically be disabled. WARN_IF_UNDOCUMENTED = NO # If WARN_IF_DOC_ERROR is set to YES, doxygen will generate warnings for # potential errors in the documentation, such as not documenting some # parameters in a documented function, or documenting parameters that # don't exist or using markup commands wrongly. WARN_IF_DOC_ERROR = YES # The WARN_NO_PARAMDOC option can be enabled to get warnings for # functions that are documented, but have no documentation for their parameters # or return value. If set to NO (the default) doxygen will only warn about # wrong or incomplete parameter documentation, but not about the absence of # documentation. WARN_NO_PARAMDOC = NO # The WARN_FORMAT tag determines the format of the warning messages that # doxygen can produce. The string should contain the $file, $line, and $text # tags, which will be replaced by the file and line number from which the # warning originated and the warning text. Optionally the format may contain # $version, which will be replaced by the version of the file (if it could # be obtained via FILE_VERSION_FILTER) WARN_FORMAT = "$file:$line: $text" # The WARN_LOGFILE tag can be used to specify a file to which warning # and error messages should be written. If left blank the output is written # to stderr. WARN_LOGFILE = #--------------------------------------------------------------------------- # configuration options related to the input files #--------------------------------------------------------------------------- # The INPUT tag can be used to specify the files and/or directories that contain # documented source files. You may enter file names like "myfile.cpp" or # directories like "/usr/src/myproject". Separate the files or directories # with spaces. INPUT = # This tag can be used to specify the character encoding of the source files # that doxygen parses. Internally doxygen uses the UTF-8 encoding, which is # also the default input encoding. Doxygen uses libiconv (or the iconv built # into libc) for the transcoding. See http://www.gnu.org/software/libiconv for # the list of possible encodings. INPUT_ENCODING = UTF-8 # If the value of the INPUT tag contains directories, you can use the # FILE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank the following patterns are tested: # *.c *.cc *.cxx *.cpp *.c++ *.d *.java *.ii *.ixx *.ipp *.i++ *.inl *.h *.hh # *.hxx *.hpp *.h++ *.idl *.odl *.cs *.php *.php3 *.inc *.m *.mm *.dox *.py # *.f90 *.f *.for *.vhd *.vhdl FILE_PATTERNS = *.cpp *.h *.dox # The RECURSIVE tag can be used to turn specify whether or not subdirectories # should be searched for input files as well. Possible values are YES and NO. # If left blank NO is used. RECURSIVE = YES # The EXCLUDE tag can be used to specify files and/or directories that should be # excluded from the INPUT source files. This way you can easily exclude a # subdirectory from a directory tree whose root is specified with the INPUT tag. # Note that relative paths are relative to the directory from which doxygen is # run. EXCLUDE = config data debian examples html java javascript \ man python scripts slp tests tools \ config.h \ plugins/kinet/kinet.cpp \ plugins/usbdmx/SunliteFirmware.h \ plugins/usbpro/MockEndpoint.cpp \ plugins/usbpro/MockEndpoint.h # The EXCLUDE_SYMLINKS tag can be used to select whether or not files or # directories that are symbolic links (a Unix file system feature) are excluded # from the input. EXCLUDE_SYMLINKS = NO # If the value of the INPUT tag contains directories, you can use the # EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude # certain files from those directories. Note that the wildcards are matched # against the file with absolute path, so to exclude all test directories # for example use the pattern */test/* EXCLUDE_PATTERNS = .git* *Test* *.pb.* # The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names # (namespaces, classes, functions, etc.) that should be excluded from the # output. The symbol name can be a fully qualified name, a word, or if the # wildcard * is used, a substring. Examples: ANamespace, AClass, # AClass::ANamespace, ANamespace::*Test EXCLUDE_SYMBOLS = # The EXAMPLE_PATH tag can be used to specify one or more files or # directories that contain example code fragments that are included (see # the \include command). EXAMPLE_PATH = doxygen/examples # If the value of the EXAMPLE_PATH tag contains directories, you can use the # EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp # and *.h) to filter out the source-files in the directories. If left # blank all files are included. EXAMPLE_PATTERNS = # If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be # searched for input files to be used with the \include or \dontinclude # commands irrespective of the value of the RECURSIVE tag. # Possible values are YES and NO. If left blank NO is used. EXAMPLE_RECURSIVE = NO # The IMAGE_PATH tag can be used to specify one or more files or # directories that contain image that are included in the documentation (see # the \image command). IMAGE_PATH = doxygen # The INPUT_FILTER tag can be used to specify a program that doxygen should # invoke to filter for each input file. Doxygen will invoke the filter program # by executing (via popen()) the command , where # is the value of the INPUT_FILTER tag, and is the name of an # input file. Doxygen will then use the output that the filter program writes # to standard output. # If FILTER_PATTERNS is specified, this tag will be # ignored. INPUT_FILTER = # The FILTER_PATTERNS tag can be used to specify filters on a per file pattern # basis. # Doxygen will compare the file name with each pattern and apply the # filter if there is a match. # The filters are a list of the form: # pattern=filter (like *.cpp=my_cpp_filter). See INPUT_FILTER for further # info on how filters are used. If FILTER_PATTERNS is empty or if # non of the patterns match the file name, INPUT_FILTER is applied. FILTER_PATTERNS = # If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using # INPUT_FILTER) will be used to filter the input files when producing source # files to browse (i.e. when SOURCE_BROWSER is set to YES). FILTER_SOURCE_FILES = NO # The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file # pattern. A pattern will override the setting for FILTER_PATTERN (if any) # and it is also possible to disable source filtering for a specific pattern # using *.ext= (so without naming a filter). This option only has effect when # FILTER_SOURCE_FILES is enabled. FILTER_SOURCE_PATTERNS = # If the USE_MD_FILE_AS_MAINPAGE tag refers to the name of a markdown file that # is part of the input, its contents will be placed on the main page (index.html). # This can be useful if you have a project on for instance GitHub and want reuse # the introduction page also for the doxygen output. # Commented out due to lack of support on Travis and causing spurious errors # USE_MDFILE_AS_MAINPAGE = #--------------------------------------------------------------------------- # configuration options related to source browsing #--------------------------------------------------------------------------- # If the SOURCE_BROWSER tag is set to YES then a list of source files will # be generated. Documented entities will be cross-referenced with these sources. # Note: To get rid of all source code in the generated output, make sure also # VERBATIM_HEADERS is set to NO. SOURCE_BROWSER = NO # Setting the INLINE_SOURCES tag to YES will include the body # of functions and classes directly in the documentation. INLINE_SOURCES = NO # Setting the STRIP_CODE_COMMENTS tag to YES (the default) will instruct # doxygen to hide any special comment blocks from generated source code # fragments. Normal C, C++ and Fortran comments will always remain visible. STRIP_CODE_COMMENTS = YES # If the REFERENCED_BY_RELATION tag is set to YES # then for each documented function all documented # functions referencing it will be listed. REFERENCED_BY_RELATION = NO # If the REFERENCES_RELATION tag is set to YES # then for each documented function all documented entities # called/used by that function will be listed. REFERENCES_RELATION = NO # If the REFERENCES_LINK_SOURCE tag is set to YES (the default) # and SOURCE_BROWSER tag is set to YES, then the hyperlinks from # functions in REFERENCES_RELATION and REFERENCED_BY_RELATION lists will # link to the source code. # Otherwise they will link to the documentation. REFERENCES_LINK_SOURCE = YES # If the USE_HTAGS tag is set to YES then the references to source code # will point to the HTML generated by the htags(1) tool instead of doxygen # built-in source browser. The htags tool is part of GNU's global source # tagging system (see http://www.gnu.org/software/global/global.html). You # will need version 4.8.6 or higher. USE_HTAGS = NO # If the VERBATIM_HEADERS tag is set to YES (the default) then Doxygen # will generate a verbatim copy of the header file for each class for # which an include is specified. Set to NO to disable this. VERBATIM_HEADERS = YES #--------------------------------------------------------------------------- # configuration options related to the alphabetical class index #--------------------------------------------------------------------------- # If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index # of all compounds will be generated. Enable this if the project # contains a lot of classes, structs, unions or interfaces. ALPHABETICAL_INDEX = YES # If the alphabetical index is enabled (see ALPHABETICAL_INDEX) then # the COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns # in which this list will be split (can be a number in the range [1..20]) COLS_IN_ALPHA_INDEX = 5 # In case all classes in a project start with a common prefix, all # classes will be put under the same header in the alphabetical index. # The IGNORE_PREFIX tag can be used to specify one or more prefixes that # should be ignored while generating the index headers. IGNORE_PREFIX = #--------------------------------------------------------------------------- # configuration options related to the HTML output #--------------------------------------------------------------------------- # If the GENERATE_HTML tag is set to YES (the default) Doxygen will # generate HTML output. GENERATE_HTML = $(GENERATE_HTML) # The HTML_OUTPUT tag is used to specify where the HTML docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `html' will be used as the default path. HTML_OUTPUT = html # The HTML_FILE_EXTENSION tag can be used to specify the file extension for # each generated HTML page (for example: .htm,.php,.asp). If it is left blank # doxygen will generate files with .html extension. HTML_FILE_EXTENSION = .html # The HTML_HEADER tag can be used to specify a personal HTML header for # each generated HTML page. If it is left blank doxygen will generate a # standard header. Note that when using a custom header you are responsible # for the proper inclusion of any scripts and style sheets that doxygen # needs, which is dependent on the configuration options used. # It is advised to generate a default header using "doxygen -w html # header.html footer.html stylesheet.css YourConfigFile" and then modify # that header. Note that the header is subject to change so you typically # have to redo this when upgrading to a newer version of doxygen or when # changing the value of configuration settings such as GENERATE_TREEVIEW! HTML_HEADER = # The HTML_FOOTER tag can be used to specify a personal HTML footer for # each generated HTML page. If it is left blank doxygen will generate a # standard footer. HTML_FOOTER = # The HTML_STYLESHEET tag can be used to specify a user-defined cascading # style sheet that is used by each HTML page. It can be used to # fine-tune the look of the HTML output. If left blank doxygen will # generate a default style sheet. Note that it is recommended to use # HTML_EXTRA_STYLESHEET instead of this one, as it is more robust and this # tag will in the future become obsolete. HTML_STYLESHEET = # The HTML_EXTRA_STYLESHEET tag can be used to specify an additional # user-defined cascading style sheet that is included after the standard # style sheets created by doxygen. Using this option one can overrule # certain style aspects. This is preferred over using HTML_STYLESHEET # since it does not replace the standard style sheet and is therefore more # robust against future updates. Doxygen will copy the style sheet file to # the output directory. # Commented out due to lack of support on Travis and causing spurious errors # HTML_EXTRA_STYLESHEET = # The HTML_EXTRA_FILES tag can be used to specify one or more extra images or # other source files which should be copied to the HTML output directory. Note # that these files will be copied to the base HTML output directory. Use the # $relpath$ marker in the HTML_HEADER and/or HTML_FOOTER files to load these # files. In the HTML_STYLESHEET file, use the file name only. Also note that # the files will be copied as-is; there are no commands or markers available. HTML_EXTRA_FILES = # The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. # Doxygen will adjust the colors in the style sheet and background images # according to this color. Hue is specified as an angle on a colorwheel, # see http://en.wikipedia.org/wiki/Hue for more information. # For instance the value 0 represents red, 60 is yellow, 120 is green, # 180 is cyan, 240 is blue, 300 purple, and 360 is red again. # The allowed range is 0 to 359. HTML_COLORSTYLE_HUE = 220 # The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of # the colors in the HTML output. For a value of 0 the output will use # grayscales only. A value of 255 will produce the most vivid colors. HTML_COLORSTYLE_SAT = 100 # The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to # the luminance component of the colors in the HTML output. Values below # 100 gradually make the output lighter, whereas values above 100 make # the output darker. The value divided by 100 is the actual gamma applied, # so 80 represents a gamma of 0.8, The value 220 represents a gamma of 2.2, # and 100 does not change the gamma. HTML_COLORSTYLE_GAMMA = 80 # If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML # page will contain the date and time when the page was generated. Setting # this to NO can help when comparing the output of multiple runs. HTML_TIMESTAMP = YES # If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML # documentation will contain sections that can be hidden and shown after the # page has loaded. HTML_DYNAMIC_SECTIONS = NO # With HTML_INDEX_NUM_ENTRIES one can control the preferred number of # entries shown in the various tree structured indices initially; the user # can expand and collapse entries dynamically later on. Doxygen will expand # the tree to such a level that at most the specified number of entries are # visible (unless a fully collapsed tree already exceeds this amount). # So setting the number of entries 1 will produce a full collapsed tree by # default. 0 is a special value representing an infinite number of entries # and will result in a full expanded tree by default. # Commented out due to lack of support on Travis and causing spurious errors # HTML_INDEX_NUM_ENTRIES = 100 # If the GENERATE_DOCSET tag is set to YES, additional index files # will be generated that can be used as input for Apple's Xcode 3 # integrated development environment, introduced with OSX 10.5 (Leopard). # To create a documentation set, doxygen will generate a Makefile in the # HTML output directory. Running make will produce the docset in that # directory and running "make install" will install the docset in # ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find # it at startup. # See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html # for more information. GENERATE_DOCSET = NO # When GENERATE_DOCSET tag is set to YES, this tag determines the name of the # feed. A documentation feed provides an umbrella under which multiple # documentation sets from a single provider (such as a company or product suite) # can be grouped. DOCSET_FEEDNAME = "Doxygen generated docs" # When GENERATE_DOCSET tag is set to YES, this tag specifies a string that # should uniquely identify the documentation set bundle. This should be a # reverse domain-name style string, e.g. com.mycompany.MyDocSet. Doxygen # will append .docset to the name. DOCSET_BUNDLE_ID = org.doxygen.Project # When GENERATE_PUBLISHER_ID tag specifies a string that should uniquely # identify the documentation publisher. This should be a reverse domain-name # style string, e.g. com.mycompany.MyDocSet.documentation. DOCSET_PUBLISHER_ID = org.doxygen.Publisher # The GENERATE_PUBLISHER_NAME tag identifies the documentation publisher. DOCSET_PUBLISHER_NAME = Publisher # If the GENERATE_HTMLHELP tag is set to YES, additional index files # will be generated that can be used as input for tools like the # Microsoft HTML help workshop to generate a compiled HTML help file (.chm) # of the generated HTML documentation. GENERATE_HTMLHELP = $(GENERATE_HTMLHELP) # If the GENERATE_HTMLHELP tag is set to YES, the CHM_FILE tag can # be used to specify the file name of the resulting .chm file. You # can add a path in front of the file if the result should not be # written to the html output directory. CHM_FILE = # If the GENERATE_HTMLHELP tag is set to YES, the HHC_LOCATION tag can # be used to specify the location (absolute path including file name) of # the HTML help compiler (hhc.exe). If non-empty doxygen will try to run # the HTML help compiler on the generated index.hhp. HHC_LOCATION = # If the GENERATE_HTMLHELP tag is set to YES, the GENERATE_CHI flag # controls if a separate .chi index file is generated (YES) or that # it should be included in the master .chm file (NO). GENERATE_CHI = $(GENERATE_CHI) # If the GENERATE_HTMLHELP tag is set to YES, the CHM_INDEX_ENCODING # is used to encode HtmlHelp index (hhk), content (hhc) and project file # content. CHM_INDEX_ENCODING = # If the GENERATE_HTMLHELP tag is set to YES, the BINARY_TOC flag # controls whether a binary table of contents is generated (YES) or a # normal table of contents (NO) in the .chm file. BINARY_TOC = NO # The TOC_EXPAND flag can be set to YES to add extra items for group members # to the contents of the HTML help documentation and to the tree view. TOC_EXPAND = NO # If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and # QHP_VIRTUAL_FOLDER are set, an additional index file will be generated # that can be used as input for Qt's qhelpgenerator to generate a # Qt Compressed Help (.qch) of the generated HTML documentation. GENERATE_QHP = NO # If the QHG_LOCATION tag is specified, the QCH_FILE tag can # be used to specify the file name of the resulting .qch file. # The path specified is relative to the HTML output folder. QCH_FILE = # The QHP_NAMESPACE tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#namespace QHP_NAMESPACE = org.doxygen.Project # The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating # Qt Help Project output. For more information please see # http://doc.trolltech.com/qthelpproject.html#virtual-folders QHP_VIRTUAL_FOLDER = doc # If QHP_CUST_FILTER_NAME is set, it specifies the name of a custom filter to # add. For more information please see # http://doc.trolltech.com/qthelpproject.html#custom-filters QHP_CUST_FILTER_NAME = # The QHP_CUST_FILT_ATTRS tag specifies the list of the attributes of the # custom filter to add. For more information please see # # Qt Help Project / Custom Filters. QHP_CUST_FILTER_ATTRS = # The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this # project's # filter section matches. # # Qt Help Project / Filter Attributes. QHP_SECT_FILTER_ATTRS = # If the GENERATE_QHP tag is set to YES, the QHG_LOCATION tag can # be used to specify the location of Qt's qhelpgenerator. # If non-empty doxygen will try to run qhelpgenerator on the generated # .qhp file. QHG_LOCATION = # If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files # will be generated, which together with the HTML files, form an Eclipse help # plugin. To install this plugin and make it available under the help contents # menu in Eclipse, the contents of the directory containing the HTML and XML # files needs to be copied into the plugins directory of eclipse. The name of # the directory within the plugins directory should be the same as # the ECLIPSE_DOC_ID value. After copying Eclipse needs to be restarted before # the help appears. GENERATE_ECLIPSEHELP = NO # A unique identifier for the eclipse help plugin. When installing the plugin # the directory name containing the HTML and XML files should also have # this name. ECLIPSE_DOC_ID = org.doxygen.Project # The DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) # at top of each HTML page. The value NO (the default) enables the index and # the value YES disables it. Since the tabs have the same information as the # navigation tree you can set this option to NO if you already set # GENERATE_TREEVIEW to YES. DISABLE_INDEX = NO # The GENERATE_TREEVIEW tag is used to specify whether a tree-like index # structure should be generated to display hierarchical information. # If the tag value is set to YES, a side panel will be generated # containing a tree-like index structure (just like the one that # is generated for HTML Help). For this to work a browser that supports # JavaScript, DHTML, CSS and frames is required (i.e. any modern browser). # Windows users are probably better off using the HTML help feature. # Since the tree basically has the same information as the tab index you # could consider to set DISABLE_INDEX to NO when enabling this option. GENERATE_TREEVIEW = NO # The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values # (range [0,1..20]) that doxygen will group on one line in the generated HTML # documentation. Note that a value of 0 will completely suppress the enum # values from appearing in the overview section. ENUM_VALUES_PER_LINE = 4 # If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be # used to set the initial width (in pixels) of the frame in which the tree # is shown. TREEVIEW_WIDTH = 250 # When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open # links to external symbols imported via tag files in a separate window. EXT_LINKS_IN_WINDOW = NO # Use this tag to change the font size of Latex formulas included # as images in the HTML documentation. The default is 10. Note that # when you change the font size after a successful doxygen run you need # to manually remove any form_*.png images from the HTML output directory # to force them to be regenerated. FORMULA_FONTSIZE = 10 # Use the FORMULA_TRANSPARENT tag to determine whether or not the images # generated for formulas are transparent PNGs. Transparent PNGs are # not supported properly for IE 6.0, but are supported on all modern browsers. # Note that when changing this option you need to delete any form_*.png files # in the HTML output before the changes have effect. FORMULA_TRANSPARENT = YES # Enable the USE_MATHJAX option to render LaTeX formulas using MathJax # (see http://www.mathjax.org) which uses client side Javascript for the # rendering instead of using prerendered bitmaps. Use this if you do not # have LaTeX installed or if you want to formulas look prettier in the HTML # output. When enabled you may also need to install MathJax separately and # configure the path to it using the MATHJAX_RELPATH option. USE_MATHJAX = NO # When MathJax is enabled you can set the default output format to be used for # the MathJax output. Supported types are HTML-CSS, NativeMML (i.e. MathML) and # SVG. The default value is HTML-CSS, which is slower, but has the best # compatibility. # Commented out due to lack of support on Travis and causing spurious errors # MATHJAX_FORMAT = HTML-CSS # When MathJax is enabled you need to specify the location relative to the # HTML output directory using the MATHJAX_RELPATH option. The destination # directory should contain the MathJax.js script. For instance, if the mathjax # directory is located at the same level as the HTML output directory, then # MATHJAX_RELPATH should be ../mathjax. The default value points to # the MathJax Content Delivery Network so you can quickly see the result without # installing MathJax. # However, it is strongly recommended to install a local # copy of MathJax from http://www.mathjax.org before deployment. MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest # The MATHJAX_EXTENSIONS tag can be used to specify one or MathJax extension # names that should be enabled during MathJax rendering. MATHJAX_EXTENSIONS = # When the SEARCHENGINE tag is enabled doxygen will generate a search box # for the HTML output. The underlying search engine uses javascript # and DHTML and should work on any modern browser. Note that when using # HTML help (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets # (GENERATE_DOCSET) there is already a search function so this one should # typically be disabled. For large projects the javascript based search engine # can be slow, then enabling SERVER_BASED_SEARCH may provide a better solution. SEARCHENGINE = YES # When the SERVER_BASED_SEARCH tag is enabled the search engine will be # implemented using a web server instead of a web client using Javascript. # There are two flavours of web server based search depending on the # EXTERNAL_SEARCH setting. When disabled, doxygen will generate a PHP script for # searching and an index file used by the script. When EXTERNAL_SEARCH is # enabled the indexing and searching needs to be provided by external tools. # See the manual for details. SERVER_BASED_SEARCH = NO # When EXTERNAL_SEARCH is enabled doxygen will no longer generate the PHP # script for searching. Instead the search results are written to an XML file # which needs to be processed by an external indexer. Doxygen will invoke an # external search engine pointed to by the SEARCHENGINE_URL option to obtain # the search results. Doxygen ships with an example indexer (doxyindexer) and # search engine (doxysearch.cgi) which are based on the open source search engine # library Xapian. See the manual for configuration details. # Commented out due to lack of support on Travis and causing spurious errors # EXTERNAL_SEARCH = NO # The SEARCHENGINE_URL should point to a search engine hosted by a web server # which will returned the search results when EXTERNAL_SEARCH is enabled. # Doxygen ships with an example search engine (doxysearch) which is based on # the open source search engine library Xapian. See the manual for configuration # details. # Commented out due to lack of support on Travis and causing spurious errors # SEARCHENGINE_URL = # When SERVER_BASED_SEARCH and EXTERNAL_SEARCH are both enabled the unindexed # search data is written to a file for indexing by an external tool. With the # SEARCHDATA_FILE tag the name of this file can be specified. # Commented out due to lack of support on Travis and causing spurious errors # SEARCHDATA_FILE = searchdata.xml # When SERVER_BASED_SEARCH AND EXTERNAL_SEARCH are both enabled the # EXTERNAL_SEARCH_ID tag can be used as an identifier for the project. This is # useful in combination with EXTRA_SEARCH_MAPPINGS to search through multiple # projects and redirect the results back to the right project. # Commented out due to lack of support on Travis and causing spurious errors # EXTERNAL_SEARCH_ID = # The EXTRA_SEARCH_MAPPINGS tag can be used to enable searching through doxygen # projects other than the one defined by this configuration file, but that are # all added to the same external search index. Each project needs to have a # unique id set via EXTERNAL_SEARCH_ID. The search mapping then maps the id # of to a relative location where the documentation can be found. # The format is: EXTRA_SEARCH_MAPPINGS = id1=loc1 id2=loc2 ... # Commented out due to lack of support on Travis and causing spurious errors # EXTRA_SEARCH_MAPPINGS = #--------------------------------------------------------------------------- # configuration options related to the LaTeX output #--------------------------------------------------------------------------- # If the GENERATE_LATEX tag is set to YES (the default) Doxygen will # generate Latex output. GENERATE_LATEX = $(GENERATE_LATEX) # The LATEX_OUTPUT tag is used to specify where the LaTeX docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `latex' will be used as the default path. LATEX_OUTPUT = latex # The LATEX_CMD_NAME tag can be used to specify the LaTeX command name to be # invoked. If left blank `latex' will be used as the default command name. # Note that when enabling USE_PDFLATEX this option is only used for # generating bitmaps for formulas in the HTML output, but not in the # Makefile that is written to the output directory. LATEX_CMD_NAME = latex # The MAKEINDEX_CMD_NAME tag can be used to specify the command name to # generate index for LaTeX. If left blank `makeindex' will be used as the # default command name. MAKEINDEX_CMD_NAME = makeindex # If the COMPACT_LATEX tag is set to YES Doxygen generates more compact # LaTeX documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_LATEX = NO # The PAPER_TYPE tag can be used to set the paper type that is used # by the printer. Possible values are: a4, letter, legal and # executive. If left blank a4wide will be used. PAPER_TYPE = a4 # The EXTRA_PACKAGES tag can be to specify one or more names of LaTeX # packages that should be included in the LaTeX output. EXTRA_PACKAGES = # The LATEX_HEADER tag can be used to specify a personal LaTeX header for # the generated latex document. The header should contain everything until # the first chapter. If it is left blank doxygen will generate a # standard header. Notice: only use this tag if you know what you are doing! LATEX_HEADER = # The LATEX_FOOTER tag can be used to specify a personal LaTeX footer for # the generated latex document. The footer should contain everything after # the last chapter. If it is left blank doxygen will generate a # standard footer. Notice: only use this tag if you know what you are doing! LATEX_FOOTER = # If the PDF_HYPERLINKS tag is set to YES, the LaTeX that is generated # is prepared for conversion to pdf (using ps2pdf). The pdf file will # contain links (just like the HTML output) instead of page references # This makes the output suitable for online browsing using a pdf viewer. PDF_HYPERLINKS = YES # If the USE_PDFLATEX tag is set to YES, pdflatex will be used instead of # plain latex in the generated Makefile. Set this option to YES to get a # higher quality PDF documentation. USE_PDFLATEX = YES # If the LATEX_BATCHMODE tag is set to YES, doxygen will add the \\batchmode. # command to the generated LaTeX files. This will instruct LaTeX to keep # running if errors occur, instead of asking the user for help. # This option is also used when generating formulas in HTML. LATEX_BATCHMODE = NO # If LATEX_HIDE_INDICES is set to YES then doxygen will not # include the index chapters (such as File Index, Compound Index, etc.) # in the output. LATEX_HIDE_INDICES = NO # If LATEX_SOURCE_CODE is set to YES then doxygen will include # source code with syntax highlighting in the LaTeX output. # Note that which sources are shown also depends on other settings # such as SOURCE_BROWSER. LATEX_SOURCE_CODE = NO # The LATEX_BIB_STYLE tag can be used to specify the style to use for the # bibliography, e.g. plainnat, or ieeetr. The default style is "plain". See # http://en.wikipedia.org/wiki/BibTeX for more info. LATEX_BIB_STYLE = plain #--------------------------------------------------------------------------- # configuration options related to the RTF output #--------------------------------------------------------------------------- # If the GENERATE_RTF tag is set to YES Doxygen will generate RTF output # The RTF output is optimized for Word 97 and may not look very pretty with # other RTF readers or editors. GENERATE_RTF = $(GENERATE_RTF) # The RTF_OUTPUT tag is used to specify where the RTF docs will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `rtf' will be used as the default path. RTF_OUTPUT = rtf # If the COMPACT_RTF tag is set to YES Doxygen generates more compact # RTF documents. This may be useful for small projects and may help to # save some trees in general. COMPACT_RTF = NO # If the RTF_HYPERLINKS tag is set to YES, the RTF that is generated # will contain hyperlink fields. The RTF file will # contain links (just like the HTML output) instead of page references. # This makes the output suitable for online browsing using WORD or other # programs which support those fields. # Note: wordpad (write) and others do not support links. RTF_HYPERLINKS = NO # Load style sheet definitions from file. Syntax is similar to doxygen's # config file, i.e. a series of assignments. You only have to provide # replacements, missing definitions are set to their default value. RTF_STYLESHEET_FILE = # Set optional variables used in the generation of an rtf document. # Syntax is similar to doxygen's config file. RTF_EXTENSIONS_FILE = #--------------------------------------------------------------------------- # configuration options related to the man page output #--------------------------------------------------------------------------- # If the GENERATE_MAN tag is set to YES (the default) Doxygen will # generate man pages GENERATE_MAN = $(GENERATE_MAN) # The MAN_OUTPUT tag is used to specify where the man pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `man' will be used as the default path. MAN_OUTPUT = man # The MAN_EXTENSION tag determines the extension that is added to # the generated man pages (default is the subroutine's section .3) MAN_EXTENSION = .3 # If the MAN_LINKS tag is set to YES and Doxygen generates man output, # then it will generate one additional man file for each entity # documented in the real man page(s). These additional files # only source the real man page, but without them the man command # would be unable to find the correct page. The default is NO. MAN_LINKS = NO #--------------------------------------------------------------------------- # configuration options related to the XML output #--------------------------------------------------------------------------- # If the GENERATE_XML tag is set to YES Doxygen will # generate an XML file that captures the structure of # the code including all documentation. GENERATE_XML = $(GENERATE_XML) # The XML_OUTPUT tag is used to specify where the XML pages will be put. # If a relative path is entered the value of OUTPUT_DIRECTORY will be # put in front of it. If left blank `xml' will be used as the default path. XML_OUTPUT = xml # If the XML_PROGRAMLISTING tag is set to YES Doxygen will # dump the program listings (including syntax highlighting # and cross-referencing information) to the XML output. Note that # enabling this will significantly increase the size of the XML output. XML_PROGRAMLISTING = YES #--------------------------------------------------------------------------- # configuration options for the AutoGen Definitions output #--------------------------------------------------------------------------- # If the GENERATE_AUTOGEN_DEF tag is set to YES Doxygen will # generate an AutoGen Definitions (see autogen.sf.net) file # that captures the structure of the code including all # documentation. Note that this feature is still experimental # and incomplete at the moment. GENERATE_AUTOGEN_DEF = NO #--------------------------------------------------------------------------- # configuration options related to the Perl module output #--------------------------------------------------------------------------- # If the GENERATE_PERLMOD tag is set to YES Doxygen will # generate a Perl module file that captures the structure of # the code including all documentation. Note that this # feature is still experimental and incomplete at the # moment. GENERATE_PERLMOD = NO # If the PERLMOD_LATEX tag is set to YES Doxygen will generate # the necessary Makefile rules, Perl scripts and LaTeX code to be able # to generate PDF and DVI output from the Perl module output. PERLMOD_LATEX = NO # If the PERLMOD_PRETTY tag is set to YES the Perl module output will be # nicely formatted so it can be parsed by a human reader. # This is useful # if you want to understand what is going on. # On the other hand, if this # tag is set to NO the size of the Perl module output will be much smaller # and Perl will parse it just the same. PERLMOD_PRETTY = YES # The names of the make variables in the generated doxyrules.make file # are prefixed with the string contained in PERLMOD_MAKEVAR_PREFIX. # This is useful so different doxyrules.make files included by the same # Makefile don't overwrite each other's variables. PERLMOD_MAKEVAR_PREFIX = #--------------------------------------------------------------------------- # Configuration options related to the preprocessor #--------------------------------------------------------------------------- # If the ENABLE_PREPROCESSING tag is set to YES (the default) Doxygen will # evaluate all C-preprocessor directives found in the sources and include # files. ENABLE_PREPROCESSING = YES # If the MACRO_EXPANSION tag is set to YES Doxygen will expand all macro # names in the source code. If set to NO (the default) only conditional # compilation will be performed. Macro expansion can be done in a controlled # way by setting EXPAND_ONLY_PREDEF to YES. MACRO_EXPANSION = YES # If the EXPAND_ONLY_PREDEF and MACRO_EXPANSION tags are both set to YES # then the macro expansion is limited to the macros specified with the # PREDEFINED and EXPAND_AS_DEFINED tags. EXPAND_ONLY_PREDEF = YES # If the SEARCH_INCLUDES tag is set to YES (the default) the includes files # pointed to by INCLUDE_PATH will be searched when a #include is found. SEARCH_INCLUDES = YES # The INCLUDE_PATH tag can be used to specify one or more directories that # contain include files that are not input files but should be processed by # the preprocessor. INCLUDE_PATH = # You can use the INCLUDE_FILE_PATTERNS tag to specify one or more wildcard # patterns (like *.h and *.hpp) to filter out the header-files in the # directories. If left blank, the patterns specified with FILE_PATTERNS will # be used. INCLUDE_FILE_PATTERNS = # The PREDEFINED tag can be used to specify one or more macro names that # are defined before the preprocessor is started (similar to the -D option of # gcc). The argument of the tag is a list of macros of the form: name # or name=definition (no spaces). If the definition and the = are # omitted =1 is assumed. To prevent a macro definition from being # undefined via #undef or recursively expanded use the := operator # instead of the = operator. PREDEFINED = OLA_UNUSED= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then # this tag can be used to specify a list of macro names that should be expanded. # The macro definition that is found in the sources will be used. # Use the PREDEFINED tag if you want to use a different macro definition that # overrules the definition found in the source code. EXPAND_AS_DEFINED = # If the SKIP_FUNCTION_MACROS tag is set to YES (the default) then # doxygen's preprocessor will remove all references to function-like macros # that are alone on a line, have an all uppercase name, and do not end with a # semicolon, because these will confuse the parser if not removed. SKIP_FUNCTION_MACROS = YES #--------------------------------------------------------------------------- # Configuration::additions related to external references #--------------------------------------------------------------------------- # The TAGFILES option can be used to specify one or more tagfiles. For each # tag file the location of the external documentation should be added. The # format of a tag file without this location is as follows: # # TAGFILES = file1 file2 ... # Adding location for the tag files is done as follows: # # TAGFILES = file1=loc1 "file2 = loc2" ... # where "loc1" and "loc2" can be relative or absolute paths # or URLs. Note that each tag file must have a unique name (where the name does # NOT include the path). If a tag file is not located in the directory in which # doxygen is run, you must also specify the path to the tagfile here. TAGFILES = # When a file name is specified after GENERATE_TAGFILE, doxygen will create # a tag file that is based on the input files it reads. GENERATE_TAGFILE = # If the ALLEXTERNALS tag is set to YES all external classes will be listed # in the class index. If set to NO only the inherited external classes # will be listed. ALLEXTERNALS = NO # If the EXTERNAL_GROUPS tag is set to YES all external groups will be listed # in the modules index. If set to NO, only the current project's groups will # be listed. EXTERNAL_GROUPS = YES # The PERL_PATH should be the absolute path and name of the perl script # interpreter (i.e. the result of `which perl'). PERL_PATH = /usr/bin/perl #--------------------------------------------------------------------------- # Configuration options related to the dot tool #--------------------------------------------------------------------------- # If the CLASS_DIAGRAMS tag is set to YES (the default) Doxygen will # generate a inheritance diagram (in HTML, RTF and LaTeX) for classes with base # or super classes. Setting the tag to NO turns the diagrams off. Note that # this option also works with HAVE_DOT disabled, but it is recommended to # install and use dot, since it yields more powerful graphs. CLASS_DIAGRAMS = YES # You can define message sequence charts within doxygen comments using the \msc # command. Doxygen will then run the mscgen tool (see # http://www.mcternan.me.uk/mscgen/) to produce the chart and insert it in the # documentation. The MSCGEN_PATH tag allows you to specify the directory where # the mscgen tool resides. If left empty the tool is assumed to be found in the # default search path. MSCGEN_PATH = # If set to YES, the inheritance and collaboration graphs will hide # inheritance and usage relations if the target is undocumented # or is not a class. HIDE_UNDOC_RELATIONS = YES # If you set the HAVE_DOT tag to YES then doxygen will assume the dot tool is # available from the path. This tool is part of Graphviz, a graph visualization # toolkit from AT&T and Lucent Bell Labs. The other options in this section # have no effect if this option is set to NO (the default) HAVE_DOT = $(HAVE_DOT) # The DOT_NUM_THREADS specifies the number of dot invocations doxygen is # allowed to run in parallel. When set to 0 (the default) doxygen will # base this on the number of processors available in the system. You can set it # explicitly to a value larger than 0 to get control over the balance # between CPU load and processing speed. DOT_NUM_THREADS = 0 # By default doxygen will use the Helvetica font for all dot files that # doxygen generates. When you want a differently looking font you can specify # the font name using DOT_FONTNAME. You need to make sure dot is able to find # the font, which can be done by putting it in a standard location or by setting # the DOTFONTPATH environment variable or by setting DOT_FONTPATH to the # directory containing the font. DOT_FONTNAME = Helvetica # The DOT_FONTSIZE tag can be used to set the size of the font of dot graphs. # The default size is 10pt. DOT_FONTSIZE = 10 # By default doxygen will tell dot to use the Helvetica font. # If you specify a different font using DOT_FONTNAME you can use DOT_FONTPATH to # set the path where dot can find it. DOT_FONTPATH = # If the CLASS_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect inheritance relations. Setting this tag to YES will force the # CLASS_DIAGRAMS tag to NO. CLASS_GRAPH = YES # If the COLLABORATION_GRAPH and HAVE_DOT tags are set to YES then doxygen # will generate a graph for each documented class showing the direct and # indirect implementation dependencies (inheritance, containment, and # class references variables) of the class with other documented classes. COLLABORATION_GRAPH = YES # If the GROUP_GRAPHS and HAVE_DOT tags are set to YES then doxygen # will generate a graph for groups, showing the direct groups dependencies GROUP_GRAPHS = YES # If the UML_LOOK tag is set to YES doxygen will generate inheritance and # collaboration diagrams in a style similar to the OMG's Unified Modeling # Language. UML_LOOK = NO # If the UML_LOOK tag is enabled, the fields and methods are shown inside # the class node. If there are many fields or methods and many nodes the # graph may become too big to be useful. The UML_LIMIT_NUM_FIELDS # threshold limits the number of items for each type to make the size more # manageable. Set this to 0 for no limit. Note that the threshold may be # exceeded by 50% before the limit is enforced. # Commented out due to lack of support on Travis and causing spurious errors # UML_LIMIT_NUM_FIELDS = 10 # If set to YES, the inheritance and collaboration graphs will show the # relations between templates and their instances. TEMPLATE_RELATIONS = NO # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDE_GRAPH, and HAVE_DOT # tags are set to YES then doxygen will generate a graph for each documented # file showing the direct and indirect include dependencies of the file with # other documented files. INCLUDE_GRAPH = YES # If the ENABLE_PREPROCESSING, SEARCH_INCLUDES, INCLUDED_BY_GRAPH, and # HAVE_DOT tags are set to YES then doxygen will generate a graph for each # documented header file showing the documented files that directly or # indirectly include this file. INCLUDED_BY_GRAPH = YES # If the CALL_GRAPH and HAVE_DOT options are set to YES then # doxygen will generate a call dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable call graphs # for selected functions only using the \callgraph command. CALL_GRAPH = NO # If the CALLER_GRAPH and HAVE_DOT tags are set to YES then # doxygen will generate a caller dependency graph for every global function # or class method. Note that enabling this option will significantly increase # the time of a run. So in most cases it will be better to enable caller # graphs for selected functions only using the \callergraph command. CALLER_GRAPH = NO # If the GRAPHICAL_HIERARCHY and HAVE_DOT tags are set to YES then doxygen # will generate a graphical hierarchy of all classes instead of a textual one. GRAPHICAL_HIERARCHY = YES # If the DIRECTORY_GRAPH and HAVE_DOT tags are set to YES # then doxygen will show the dependencies a directory has on other directories # in a graphical way. The dependency relations are determined by the #include # relations between the files in the directories. DIRECTORY_GRAPH = YES # The DOT_IMAGE_FORMAT tag can be used to set the image format of the images # generated by dot. Possible values are svg, png, jpg, or gif. # If left blank png will be used. If you choose svg you need to set # HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible in IE 9+ (other browsers do not have this requirement). DOT_IMAGE_FORMAT = png # If DOT_IMAGE_FORMAT is set to svg, then this option can be set to YES to # enable generation of interactive SVG images that allow zooming and panning. # Note that this requires a modern browser other than Internet Explorer. # Tested and working are Firefox, Chrome, Safari, and Opera. For IE 9+ you # need to set HTML_FILE_EXTENSION to xhtml in order to make the SVG files # visible. Older versions of IE do not have SVG support. INTERACTIVE_SVG = NO # The tag DOT_PATH can be used to specify the path where the dot tool can be # found. If left blank, it is assumed the dot tool can be found in the path. DOT_PATH = # The DOTFILE_DIRS tag can be used to specify one or more directories that # contain dot files that are included in the documentation (see the # \dotfile command). DOTFILE_DIRS = # The MSCFILE_DIRS tag can be used to specify one or more directories that # contain msc files that are included in the documentation (see the # \mscfile command). MSCFILE_DIRS = # The DOT_GRAPH_MAX_NODES tag can be used to set the maximum number of # nodes that will be shown in the graph. If the number of nodes in a graph # becomes larger than this value, doxygen will truncate the graph, which is # visualized by representing a node as a red box. Note that doxygen if the # number of direct children of the root node in a graph is already larger than # DOT_GRAPH_MAX_NODES then the graph will not be shown at all. Also note # that the size of a graph can be further restricted by MAX_DOT_GRAPH_DEPTH. DOT_GRAPH_MAX_NODES = 250 # The MAX_DOT_GRAPH_DEPTH tag can be used to set the maximum depth of the # graphs generated by dot. A depth value of 3 means that only nodes reachable # from the root by following a path via at most 3 edges will be shown. Nodes # that lay further from the root node will be omitted. Note that setting this # option to 1 or 2 may greatly reduce the computation time needed for large # code bases. Also note that the size of a graph can be further restricted by # DOT_GRAPH_MAX_NODES. Using a depth of 0 means no depth restriction. MAX_DOT_GRAPH_DEPTH = 0 # Set the DOT_TRANSPARENT tag to YES to generate images with a transparent # background. This is disabled by default, because dot on Windows does not # seem to support this out of the box. Warning: Depending on the platform used, # enabling this option may lead to badly anti-aliased labels on the edges of # a graph (i.e. they become hard to read). DOT_TRANSPARENT = NO # Set the DOT_MULTI_TARGETS tag to YES allow dot to generate multiple output # files in one run (i.e. multiple -o and -T options on the command line). This # makes dot run faster, but since only newer versions of dot (>1.8.10) # support this, this feature is disabled by default. DOT_MULTI_TARGETS = NO # If the GENERATE_LEGEND tag is set to YES (the default) Doxygen will # generate a legend page explaining the meaning of the various boxes and # arrows in the dot generated graphs. GENERATE_LEGEND = YES # If the DOT_CLEANUP tag is set to YES (the default) Doxygen will # remove the intermediate dot files that are used to generate # the various graphs. DOT_CLEANUP = YES ola-0.10.9/AUTHORS0000664000175000017500000000250114376533110010350 00000000000000Please do not email the author directly, instead use open-lighting@googlegroups.com Primary author: Simon Newton Contributors: Bastien Andrès, contributed to the dmx4linux plugin Bruce Lowekamp, various fixes and python updates Carsten Presser, Karate USB plugin Dave Olsthoorn, working on a new web-ui E.S. Rosenberg, further work on ftdidmx plugin. Hakan Lindestaf, Renard plugin Harry F, for the Eurolite USB Pro code Heikki Junnila, bug fixes for the debian packaging files Jannis Achstetter, compile fixes for newer dependencies and various fixes Laurent (Renzo), Debian packages, FreeBSD & RDM testing. Lukas Erlinghagen, win32 port. Johan Nilsson, Philips Hue trigger config Joshua Moyerman, ArtNet fixes. Masaki Muranaka, various patches Nicolas, for the win32 port of libartnet Nils Van Zuijlen, typos and python lib small update Perry Naseck, EPoll delay fix, various GitHub Actions CI workflows Peter Newman, MilInst Plugin, Scanlime Fadecandy support and numerous fixes Ravindra Nath Kakarla, RDM Test Server (Google Summer of Code 2012) Rowan Maclachlan (hippy) for various changes Rui Barreiros, ftdidmx plugin Sean Sill, various fixes. Stefan Krüger, added APA102 support to the SPI Plugin Tobi Schäfer, for the MacPort files Stefan S, improved timing with monotonic clock ola-0.10.9/ola.spec0000664000175000017500000001224414376533242010742 00000000000000#python2_sitelib macro shim %{!?python2_sitelib:%global python2_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} #udev macro shim %{!?_udevrulesdir:%global _udevrulesdir %{_sysconfdir}/udev/rules.d/ } Name: ola Version: 0.10.9 Release: 1%{?dist} Summary: Open Lighting Architecture Group: Applications/Multimedia License: GPLv2 and LGPLv2 URL: https://github.com/OpenLightingProject/ola Source: https://github.com/OpenLightingProject/ola/releases/download/%{version}/%{name}-%{version}.tar.gz BuildRequires: pkgconfig,pkgconfig(cppunit),pkgconfig(uuid),pkgconfig(avahi-client) BuildRequires: pkgconfig(libusb-1.0) >= 1.0.2,pkgconfig(libmicrohttpd) >= 0.4.0%{!?el6:,pkgconfig(systemd)} BuildRequires: libtool,bison,flex,python2-devel,openslp-devel,pkgconfig(libftdi%{!?el6:1}) >= 0.18 BuildRequires: protobuf-devel >= 0.2,protobuf-compiler,protobuf-python,numpy %if 0%{?fedora} >= 21 BuildRequires: liblo-devel %endif Requires: %{name}-data = %{version}-%{release} %description The Open Lighting Architecture is a framework for lighting control information. It supports a range of protocols and over a dozen USB devices. It can run as a standalone service, which is useful for converting signals between protocols, or alternatively using the OLA API, it can be used as the back-end for lighting control software. OLA runs on many different platforms including ARM, which makes it a perfect fit for low cost Ethernet to DMX gateways. %package devel Requires: %{name}%{?_isa} = %{version}-%{release} Group: Development/Libraries Summary: C/C++ Development files for OLA %description devel The OLA C/C++ library %package -n python2-%{name} Requires: %{name} = %{version}-%{release}, protobuf-python Group: Development/Libraries Summary: Python Development files for OLA BuildArch: noarch %{?python_provide:%python_provide python2-%{name}} %description -n python2-%{name} The OLA python library %package rdm-tests Requires: %{name} = %{version}-%{release}, python2-%{name}, numpy Group: Development/Libraries BuildArch: noarch Summary: RDM test suite using OLA and python Provides: bundled(jquery) = 1.7.2, bundled(jquery-ui) = 1.8.21 %description rdm-tests The rdm test suite for OLA %package data Group: Development/Libraries BuildArch: noarch Summary: data for OLA Provides: bundled(bootstrap) = 3.3.2, bundled(jquery) = 2.1.3 Provides: bundled(angularjs) = 1.3.14, bundled(angular-route) = 1.3.14 %description data HTML, CSS, JS and RDM PIDs files for OLA %prep %setup -q -n %{name}-%{version} %build export LD_LIBRARY_PATH="%buildroot%{_libdir}" autoreconf -i %configure --enable-rdm-tests --enable-shared --disable-static #only link as needed sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool #rpath, please die sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool #we can't fix this upstream (I think) sed -i "s|\$(LN_S) -f \$(bindir)\/|\$(LN_S) -f |g" Makefile make %{!?el6:%{?_smp_mflags}} #el6 has problems with parallel building %check export LD_LIBRARY_PATH="%buildroot%{_libdir}" make check %{!?el6:%{?_smp_mflags}} #el6 has problems with parallel building find %buildroot -name "*\.la" -delete find %buildroot -name "*\.a" -delete %install export LD_LIBRARY_PATH="%buildroot%{_libdir}" %make_install mkdir -p %buildroot/%{_udevrulesdir} cp debian/ola.udev %buildroot/%{_udevrulesdir} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files #license shim %{!?_licensedir:%global license %doc} %doc AUTHORS NEWS README %{_bindir}/ola* %{_bindir}/rdmpro_sniffer %{_bindir}/usbpro_firmware %{_libdir}/libola*\.so\.* %{_mandir}/man1/** %{_udevrulesdir}/ola.udev %license LICENCE tools/rdm/static/MIT-LICENSE.txt javascript/new-src/README.md COPYING %files devel %doc README.developer %{_includedir}/ola** %{_libdir}/libola*\.so %{_libdir}/pkgconfig/* %files -n python2-%{name} %dir %{python2_sitelib}/ola %{python2_sitelib}/ola/*\.py* %{python2_sitelib}/ola/rpc %files rdm-tests %{_bindir}/rdm_model_collector.py* %{_bindir}/rdm_responder_test.py* %{_bindir}/rdm_test_server.py* %{_datadir}/ola/rdm-server %{python2_sitelib}/ola/testing %files data %{_datadir}/olad %dir %{_datadir}/ola %{_datadir}/ola/pids %changelog * Thu Nov 12 2015 Dave Olsthoorn - 0.9.8-1 - update to 0.9.8 full changelog here: https://github.com/OpenLightingProject/ola/releases/tag/0.9.8 * Sat Sep 19 2015 Dave Olsthoorn - 0.9.7-1 - update to 0.9.7 - OLA now requires libusb * Thu Aug 27 2009 Kevin Deldycke 0.3.1.trunk.20090827-1mdv2009.1 - Rename all project from lla to OLA - Upgrade to the latest OLA 0.3.1 from the master branch of the git repository - OLA now requires libmicrohttpd, libcppunit, protobuf and libctemplate - Disable the --no-undefined option and make all undefined symbols weakly bound - Add check step - Rebuild RPM for Mandriva 2009.1 * Mon May 12 2008 Kevin Deldycke 0.2.3.200710210908-1mdv2008.1 - Ported from Fedora Core 8 ( http://rpms.netmindz.net/FC8/SRPMS.netmindz/lla-0.2.3.200710210908-1.fc8.src.rpm ) to Mandriva 2008.1 * Sun Apr 29 2007 Will Tatam 0.1.3-1 - First Build ola-0.10.9/libs/0000775000175000017500000000000014376533270010322 500000000000000ola-0.10.9/libs/acn/0000775000175000017500000000000014376533271011064 500000000000000ola-0.10.9/libs/acn/DMPInflator.cpp0000664000175000017500000000406414376533110013623 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPInflator.cpp * The Inflator for the DMP PDUs * Copyright (C) 2007 Simon Newton */ #include "ola/Logging.h" #include "libs/acn/DMPInflator.h" namespace ola { namespace acn { /* * Decode the DMP header. If data is null we're expected to use the last * header we got. * @param headers the HeaderSet to add to * @param data a pointer to the data * @param length length of the data * @returns true if successful, false otherwise */ bool DMPInflator::DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int length, unsigned int *bytes_used) { if (data) { // the header bit was set, decode it if (length >= DMPHeader::DMP_HEADER_SIZE) { DMPHeader header(*data); m_last_header = header; m_last_header_valid = true; headers->SetDMPHeader(header); *bytes_used = DMPHeader::DMP_HEADER_SIZE; return true; } *bytes_used = 0; return false; } // use the last header if it exists *bytes_used = 0; if (!m_last_header_valid) { OLA_WARN << "Missing DMP Header data"; return false; } headers->SetDMPHeader(m_last_header); return true; } /* * Reset the header field */ void DMPInflator::ResetHeaderField() { m_last_header_valid = false; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/PDUTest.cpp0000664000175000017500000000565614376533110013004 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PDUTest.cpp * Test fixture for the PDU class * Copyright (C) 2005 Simon Newton */ #include #include "ola/Logging.h" #include "ola/io/IOQueue.h" #include "ola/io/OutputStream.h" #include "ola/testing/TestUtils.h" #include "libs/acn/PDU.h" #include "libs/acn/PDUTestCommon.h" namespace ola { namespace acn { using ola::io::IOQueue; using ola::io::OutputStream; class PDUTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(PDUTest); CPPUNIT_TEST(testPDUBlock); CPPUNIT_TEST(testBlockToOutputStream); CPPUNIT_TEST_SUITE_END(); public: void testPDUBlock(); void testBlockToOutputStream(); void setUp() { ola::InitLogging(ola::OLA_LOG_DEBUG, ola::OLA_LOG_STDERR); } }; CPPUNIT_TEST_SUITE_REGISTRATION(PDUTest); /* * Test that packing a PDUBlock works. */ void PDUTest::testPDUBlock() { FakePDU pdu1(1); FakePDU pdu2(2); FakePDU pdu42(42); PDUBlock block; block.AddPDU(&pdu1); block.AddPDU(&pdu2); block.AddPDU(&pdu42); unsigned int block_size = block.Size(); OLA_ASSERT_EQ(12u, block_size); uint8_t *data = new uint8_t[block_size]; unsigned int bytes_used = block_size; OLA_ASSERT(block.Pack(data, &bytes_used)); OLA_ASSERT_EQ(block_size, bytes_used); unsigned int *test = (unsigned int*) data; OLA_ASSERT_EQ(1u, *test++); OLA_ASSERT_EQ(2u, *test++); OLA_ASSERT_EQ(42u, *test); delete[] data; block.Clear(); OLA_ASSERT_EQ(0u, block.Size()); } /* * Test that writing to an OutputStream works. */ void PDUTest::testBlockToOutputStream() { FakePDU pdu1(1); FakePDU pdu2(2); FakePDU pdu42(42); PDUBlock block; block.AddPDU(&pdu1); block.AddPDU(&pdu2); block.AddPDU(&pdu42); IOQueue output; OutputStream stream(&output); block.Write(&stream); OLA_ASSERT_EQ(12u, output.Size()); uint8_t *block_data = new uint8_t[output.Size()]; unsigned int block_size = output.Peek(block_data, output.Size()); OLA_ASSERT_EQ(output.Size(), block_size); uint8_t EXPECTED[] = { 0, 0, 0, 1, 0, 0, 0, 2, 0, 0, 0, 42 }; OLA_ASSERT_DATA_EQUALS(EXPECTED, sizeof(EXPECTED), block_data, block_size); output.Pop(output.Size()); delete[] block_data; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/E133Header.h0000664000175000017500000000407014376533110012672 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133Header.h * The E1.33 Header * Copyright (C) 2011 Simon Newton */ #ifndef LIBS_ACN_E133HEADER_H_ #define LIBS_ACN_E133HEADER_H_ #include #include #include namespace ola { namespace acn { /* * Header for the E133 layer */ class E133Header { public: E133Header() : m_sequence(0), m_endpoint(0) { } E133Header(const std::string &source, uint32_t sequence, uint16_t endpoint) : m_source(source), m_sequence(sequence), m_endpoint(endpoint) { } ~E133Header() {} const std::string Source() const { return m_source; } uint32_t Sequence() const { return m_sequence; } uint16_t Endpoint() const { return m_endpoint; } bool operator==(const E133Header &other) const { return m_source == other.m_source && m_sequence == other.m_sequence && m_endpoint == other.m_endpoint; } enum { SOURCE_NAME_LEN = 64 }; PACK( struct e133_pdu_header_s { char source[SOURCE_NAME_LEN]; uint32_t sequence; uint16_t endpoint; uint8_t reserved; }); typedef struct e133_pdu_header_s e133_pdu_header; private: std::string m_source; uint32_t m_sequence; uint16_t m_endpoint; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_E133HEADER_H_ ola-0.10.9/libs/acn/E131DiscoveryInflator.h0000664000175000017500000000403014376533110015142 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131DiscoveryInflator.h * An inflator for E1.31 discovery messages. * Copyright (C) 2014 Simon Newton */ #ifndef LIBS_ACN_E131DISCOVERYINFLATOR_H_ #define LIBS_ACN_E131DISCOVERYINFLATOR_H_ #include #include #include "ola/Callback.h" #include "ola/acn/ACNVectors.h" #include "libs/acn/BaseInflator.h" namespace ola { namespace acn { class E131DiscoveryInflator: public InflatorInterface { public: struct DiscoveryPage { public: const uint8_t page_number; const uint8_t last_page; const uint32_t page_sequence; std::vector universes; DiscoveryPage(uint8_t page_number, uint8_t last_page) : page_number(page_number), last_page(last_page), page_sequence(0) { // not yet part of the standard } }; typedef ola::Callback2 PageCallback; explicit E131DiscoveryInflator(PageCallback *callback) : m_page_callback(callback) {} uint32_t Id() const { return acn::VECTOR_E131_DISCOVERY; } unsigned int InflatePDUBlock(HeaderSet *headers, const uint8_t *data, unsigned int len); private: std::auto_ptr m_page_callback; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_E131DISCOVERYINFLATOR_H_ ola-0.10.9/libs/acn/PreamblePacker.h0000664000175000017500000000354414376533110014030 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PreamblePacker.h * This class takes a block of Root Layer PDUs, prepends the ACN preamble and * writes the data to a buffer. * Copyright (C) 2012 Simon Newton */ #ifndef LIBS_ACN_PREAMBLEPACKER_H_ #define LIBS_ACN_PREAMBLEPACKER_H_ #include "ola/io/IOStack.h" #include "libs/acn/PDU.h" namespace ola { namespace acn { /* * Pack a Root PDU block and the ACN Preamble into a memory block. This class * isn't reentrant so be careful where you use it. */ class PreamblePacker { public: PreamblePacker() : m_send_buffer(NULL) {} ~PreamblePacker(); const uint8_t *Pack(const PDUBlock &pdu_block, unsigned int *length); static void AddUDPPreamble(ola::io::IOStack *stack); static void AddTCPPreamble(ola::io::IOStack *stack); static const uint8_t ACN_HEADER[]; static const unsigned int ACN_HEADER_SIZE; static const unsigned int MAX_DATAGRAM_SIZE = 1472; private: uint8_t *m_send_buffer; void Init(); static const uint8_t TCP_ACN_HEADER[]; static const unsigned int TCP_ACN_HEADER_SIZE; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_PREAMBLEPACKER_H_ ola-0.10.9/libs/acn/DMPPDU.cpp0000664000175000017500000000725414376533110012501 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPPDU.cpp * The DMPPDU * Copyright (C) 2007 Simon Newton */ #include "ola/Logging.h" #include "libs/acn/DMPPDU.h" namespace ola { namespace acn { using ola::io::OutputStream; /* * Pack the header portion. */ bool DMPPDU::PackHeader(uint8_t *data, unsigned int *length) const { if (*length < DMPHeader::DMP_HEADER_SIZE) { OLA_WARN << "DMPPDU::PackHeader: buffer too small, got " << *length << " required " << DMPHeader::DMP_HEADER_SIZE; *length = 0; return false; } *data = m_header.Header(); *length = DMPHeader::DMP_HEADER_SIZE; return true; } /* * Pack the header into a buffer. */ void DMPPDU::PackHeader(OutputStream *stream) const { *stream << m_header.Header(); } /* * Create a new Single Address GetProperty PDU. * @param is_virtual set to true if this is a virtual address * @param is_relative set to true if this is a relative address * @param start the start offset * @return A pointer to a DMPGetProperty. */ const DMPPDU *NewDMPGetProperty(bool is_virtual, bool is_relative, unsigned int start) { if (start > MAX_TWO_BYTE) return _CreateDMPGetProperty(is_virtual, is_relative, start); else if (start > MAX_ONE_BYTE) return _CreateDMPGetProperty(is_virtual, is_relative, start); return _CreateDMPGetProperty(is_virtual, is_relative, start); } /* * Create a new range address GetProperty PDU. * @param is_virtual set to true if this is a virtual address * @param is_relative set to true if this is a relative address * @param start the start offset * @param increment the increments between addresses * @param number the number of addresses defined * @return A pointer to a DMPGetProperty. */ const DMPPDU *NewRangeDMPGetProperty( bool is_virtual, bool is_relative, unsigned int start, unsigned int increment, unsigned int number) { if (start > MAX_TWO_BYTE || increment > MAX_TWO_BYTE || number > MAX_TWO_BYTE) return _CreateRangeDMPGetProperty(is_virtual, is_relative, start, increment, number); else if (start > MAX_ONE_BYTE || increment > MAX_ONE_BYTE || number > MAX_ONE_BYTE) return _CreateRangeDMPGetProperty(is_virtual, is_relative, start, increment, number); return _CreateRangeDMPGetProperty(is_virtual, is_relative, start, increment, number); } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/E133PDU.cpp0000664000175000017500000000715714376533110012476 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133PDU.cpp * The E133PDU * Copyright (C) 2011 Simon Newton */ #include #include #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/network/NetworkUtils.h" #include "ola/strings/Utils.h" #include "libs/acn/E133PDU.h" namespace ola { namespace acn { using ola::io::OutputStream; using ola::network::HostToNetwork; using std::string; /* * Size of the header portion. */ unsigned int E133PDU::HeaderSize() const { return sizeof(E133Header::e133_pdu_header); } /* * Size of the data portion */ unsigned int E133PDU::DataSize() const { return m_pdu ? m_pdu->Size() : 0; } /* * Pack the header portion. */ bool E133PDU::PackHeader(uint8_t *data, unsigned int *length) const { unsigned int header_size = HeaderSize(); if (*length < header_size) { OLA_WARN << "E133PDU::PackHeader: buffer too small, got " << *length << " required " << header_size; *length = 0; return false; } E133Header::e133_pdu_header header; strings::CopyToFixedLengthBuffer(m_header.Source(), header.source, arraysize(header.source)); header.sequence = HostToNetwork(m_header.Sequence()); header.endpoint = HostToNetwork(m_header.Endpoint()); header.reserved = 0; *length = sizeof(E133Header::e133_pdu_header); memcpy(data, &header, *length); return true; } /* * Pack the data portion. */ bool E133PDU::PackData(uint8_t *data, unsigned int *length) const { if (m_pdu) return m_pdu->Pack(data, length); *length = 0; return true; } /* * Pack the header into a buffer. */ void E133PDU::PackHeader(OutputStream *stream) const { E133Header::e133_pdu_header header; strings::CopyToFixedLengthBuffer(m_header.Source(), header.source, arraysize(header.source)); header.sequence = HostToNetwork(m_header.Sequence()); header.endpoint = HostToNetwork(m_header.Endpoint()); header.reserved = 0; stream->Write(reinterpret_cast(&header), sizeof(E133Header::e133_pdu_header)); } /* * Pack the data into a buffer */ void E133PDU::PackData(OutputStream *stream) const { if (m_pdu) m_pdu->Write(stream); } void E133PDU::PrependPDU(ola::io::IOStack *stack, uint32_t vector, const string &source_name, uint32_t sequence_number, uint16_t endpoint_id) { E133Header::e133_pdu_header header; strings::CopyToFixedLengthBuffer(source_name, header.source, arraysize(header.source)); header.sequence = HostToNetwork(sequence_number); header.endpoint = HostToNetwork(endpoint_id); header.reserved = 0; stack->Write(reinterpret_cast(&header), sizeof(E133Header::e133_pdu_header)); vector = HostToNetwork(vector); stack->Write(reinterpret_cast(&vector), sizeof(vector)); PrependFlagsAndLength(stack); } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/E131InflatorTest.cpp0000664000175000017500000001547614376533110014465 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131InflatorTest.cpp * Test fixture for the E131Inflator class * Copyright (C) 2005 Simon Newton */ #include #include #include #include "ola/Logging.h" #include "ola/network/NetworkUtils.h" #include "libs/acn/HeaderSet.h" #include "libs/acn/PDUTestCommon.h" #include "libs/acn/E131Inflator.h" #include "libs/acn/E131PDU.h" #include "ola/testing/TestUtils.h" namespace ola { namespace acn { using ola::network::HostToNetwork; using std::string; class E131InflatorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(E131InflatorTest); CPPUNIT_TEST(testDecodeRev2Header); CPPUNIT_TEST(testDecodeHeader); CPPUNIT_TEST(testInflateRev2PDU); CPPUNIT_TEST(testInflatePDU); CPPUNIT_TEST_SUITE_END(); public: void testDecodeRev2Header(); void testDecodeHeader(); void testInflatePDU(); void testInflateRev2PDU(); }; CPPUNIT_TEST_SUITE_REGISTRATION(E131InflatorTest); /* * Check that we can decode headers properly */ void E131InflatorTest::testDecodeRev2Header() { E131Rev2Header::e131_rev2_pdu_header header; E131InflatorRev2 inflator; HeaderSet header_set, header_set2; unsigned int bytes_used; const string source_name = "foobar"; strncpy(header.source, source_name.data(), source_name.size() + 1); header.priority = 99; header.sequence = 10; header.universe = HostToNetwork(static_cast(42)); OLA_ASSERT(inflator.DecodeHeader(&header_set, reinterpret_cast(&header), sizeof(header), &bytes_used)); OLA_ASSERT_EQ((unsigned int) sizeof(header), bytes_used); E131Header decoded_header = header_set.GetE131Header(); OLA_ASSERT(source_name == decoded_header.Source()); OLA_ASSERT_EQ((uint8_t) 99, decoded_header.Priority()); OLA_ASSERT_EQ((uint8_t) 10, decoded_header.Sequence()); OLA_ASSERT_EQ((uint16_t) 42, decoded_header.Universe()); // try an undersized header OLA_ASSERT_FALSE(inflator.DecodeHeader( &header_set, reinterpret_cast(&header), static_cast(sizeof(header) - 1), &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); // test inheriting the header from the prev call OLA_ASSERT(inflator.DecodeHeader(&header_set2, NULL, 0, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); decoded_header = header_set2.GetE131Header(); OLA_ASSERT(source_name == decoded_header.Source()); OLA_ASSERT_EQ((uint8_t) 99, decoded_header.Priority()); OLA_ASSERT_EQ((uint8_t) 10, decoded_header.Sequence()); OLA_ASSERT_EQ((uint16_t) 42, decoded_header.Universe()); inflator.ResetHeaderField(); OLA_ASSERT_FALSE(inflator.DecodeHeader(&header_set2, NULL, 0, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } /* * Check that we can decode headers properly */ void E131InflatorTest::testDecodeHeader() { E131Header::e131_pdu_header header; E131Inflator inflator; HeaderSet header_set, header_set2; unsigned int bytes_used; const string source_name = "foobar"; strncpy(header.source, source_name.data(), source_name.size() + 1); header.priority = 99; header.sequence = 10; header.universe = HostToNetwork(static_cast(42)); OLA_ASSERT(inflator.DecodeHeader(&header_set, reinterpret_cast(&header), sizeof(header), &bytes_used)); OLA_ASSERT_EQ((unsigned int) sizeof(header), bytes_used); E131Header decoded_header = header_set.GetE131Header(); OLA_ASSERT(source_name == decoded_header.Source()); OLA_ASSERT_EQ((uint8_t) 99, decoded_header.Priority()); OLA_ASSERT_EQ((uint8_t) 10, decoded_header.Sequence()); OLA_ASSERT_EQ((uint16_t) 42, decoded_header.Universe()); // try an undersized header OLA_ASSERT_FALSE(inflator.DecodeHeader( &header_set, reinterpret_cast(&header), static_cast(sizeof(header) - 1), &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); // test inheriting the header from the prev call OLA_ASSERT(inflator.DecodeHeader(&header_set2, NULL, 0, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); decoded_header = header_set2.GetE131Header(); OLA_ASSERT(source_name == decoded_header.Source()); OLA_ASSERT_EQ((uint8_t) 99, decoded_header.Priority()); OLA_ASSERT_EQ((uint8_t) 10, decoded_header.Sequence()); OLA_ASSERT_EQ((uint16_t) 42, decoded_header.Universe()); inflator.ResetHeaderField(); OLA_ASSERT_FALSE(inflator.DecodeHeader(&header_set2, NULL, 0, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } /* * Check that we can inflate a E131 PDU that contains other PDUs */ void E131InflatorTest::testInflateRev2PDU() { const string source = "foo source"; E131Rev2Header header(source, 1, 2, 6000); // TODO(simon): pass a DMP msg here as well E131PDU pdu(3, header, NULL); OLA_ASSERT_EQ((unsigned int) 42, pdu.Size()); unsigned int size = pdu.Size(); uint8_t *data = new uint8_t[size]; unsigned int bytes_used = size; OLA_ASSERT(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ((unsigned int) size, bytes_used); E131InflatorRev2 inflator; HeaderSet header_set; OLA_ASSERT_EQ( size, (unsigned int) inflator.InflatePDUBlock(&header_set, data, size)); OLA_ASSERT(header == header_set.GetE131Header()); delete[] data; } /* * Check that we can inflate a E131 PDU that contains other PDUs */ void E131InflatorTest::testInflatePDU() { const string source = "foobar source"; E131Header header(source, 1, 2, 6000); // TODO(simon): pass a DMP msg here as well E131PDU pdu(3, header, NULL); OLA_ASSERT_EQ((unsigned int) 77, pdu.Size()); unsigned int size = pdu.Size(); uint8_t *data = new uint8_t[size]; unsigned int bytes_used = size; OLA_ASSERT(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ((unsigned int) size, bytes_used); E131Inflator inflator; HeaderSet header_set; OLA_ASSERT(inflator.InflatePDUBlock(&header_set, data, size)); OLA_ASSERT(header == header_set.GetE131Header()); delete[] data; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/E133PDU.h0000664000175000017500000000354714376533110012142 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133PDU.h * Interface for the E133PDU class * Copyright (C) 2011 Simon Newton */ #ifndef LIBS_ACN_E133PDU_H_ #define LIBS_ACN_E133PDU_H_ #include #include #include "libs/acn/PDU.h" #include "libs/acn/E133Header.h" namespace ola { namespace acn { class RDMPDU; class E133PDU: public PDU { public: E133PDU(unsigned int vector, const E133Header &header, const PDU *pdu): PDU(vector), m_header(header), m_pdu(pdu) {} ~E133PDU() {} unsigned int HeaderSize() const; unsigned int DataSize() const; bool PackHeader(uint8_t *data, unsigned int *length) const; bool PackData(uint8_t *data, unsigned int *length) const; void PackHeader(ola::io::OutputStream *stream) const; void PackData(ola::io::OutputStream *stream) const; static void PrependPDU(ola::io::IOStack *stack, uint32_t vector, const std::string &source, uint32_t sequence_number, uint16_t endpoint_id); private: E133Header m_header; const PDU *m_pdu; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_E133PDU_H_ ola-0.10.9/libs/acn/E133PDUTest.cpp0000664000175000017500000001103714376533110013326 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133PDUTest.cpp * Test fixture for the E133PDU class * Copyright (C) 2011 Simon Newton */ #include #include #include #include "ola/Logging.h" #include "ola/io/IOQueue.h" #include "ola/io/OutputStream.h" #include "ola/network/NetworkUtils.h" #include "ola/testing/TestUtils.h" #include "libs/acn/E133PDU.h" #include "libs/acn/PDUTestCommon.h" namespace ola { namespace acn { using ola::io::IOQueue; using ola::io::OutputStream; using ola::network::HostToNetwork; using std::string; class E133PDUTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(E133PDUTest); CPPUNIT_TEST(testSimpleE133PDU); CPPUNIT_TEST(testSimpleE133PDUToOutputStream); CPPUNIT_TEST_SUITE_END(); public: void testSimpleE133PDU(); void testSimpleE133PDUToOutputStream(); void setUp() { ola::InitLogging(ola::OLA_LOG_DEBUG, ola::OLA_LOG_STDERR); } private: static const unsigned int TEST_VECTOR; }; CPPUNIT_TEST_SUITE_REGISTRATION(E133PDUTest); const unsigned int E133PDUTest::TEST_VECTOR = 39; /* * Test that packing a E133PDU without data works. */ void E133PDUTest::testSimpleE133PDU() { const string source = "foo source"; E133Header header(source, 101, 2); E133PDU pdu(TEST_VECTOR, header, NULL); OLA_ASSERT_EQ(71u, pdu.HeaderSize()); OLA_ASSERT_EQ(0u, pdu.DataSize()); OLA_ASSERT_EQ(77u, pdu.Size()); unsigned int size = pdu.Size(); uint8_t *data = new uint8_t[size]; unsigned int bytes_used = size; OLA_ASSERT(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ(size, bytes_used); // spot check the data OLA_ASSERT_EQ((uint8_t) 0x70, data[0]); OLA_ASSERT_EQ((uint8_t) bytes_used, data[1]); unsigned int actual_value; memcpy(&actual_value, data + 2, sizeof(actual_value)); OLA_ASSERT_EQ(HostToNetwork(TEST_VECTOR), actual_value); OLA_ASSERT_FALSE(memcmp(&data[6], source.data(), source.length())); // universe OLA_ASSERT_EQ((uint8_t) 0, data[6 + E133Header::SOURCE_NAME_LEN]); OLA_ASSERT_EQ((uint8_t) 0, data[6 + E133Header::SOURCE_NAME_LEN + 1]); OLA_ASSERT_EQ((uint8_t) 0, data[6 + E133Header::SOURCE_NAME_LEN + 2]); OLA_ASSERT_EQ((uint8_t) 101, data[6 + E133Header::SOURCE_NAME_LEN + 3]); // endpoint OLA_ASSERT_EQ((uint8_t) 0, data[6 + E133Header::SOURCE_NAME_LEN + 4]); OLA_ASSERT_EQ((uint8_t) 2, data[6 + E133Header::SOURCE_NAME_LEN + 5]); // options OLA_ASSERT_EQ((uint8_t) 0, data[6 + E133Header::SOURCE_NAME_LEN + 6]); // test undersized buffer bytes_used = size - 1; OLA_ASSERT_FALSE(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ(0u, bytes_used); // test oversized buffer bytes_used = size + 1; OLA_ASSERT(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ(size, bytes_used); delete[] data; } /* * Test that writing to an output stream works. */ void E133PDUTest::testSimpleE133PDUToOutputStream() { const string source = "foo source"; E133Header header(source, 101, 2); E133PDU pdu(TEST_VECTOR, header, NULL); OLA_ASSERT_EQ(71u, pdu.HeaderSize()); OLA_ASSERT_EQ(0u, pdu.DataSize()); OLA_ASSERT_EQ(77u, pdu.Size()); IOQueue output; OutputStream stream(&output); pdu.Write(&stream); OLA_ASSERT_EQ(77u, output.Size()); uint8_t *pdu_data = new uint8_t[output.Size()]; unsigned int pdu_size = output.Peek(pdu_data, output.Size()); OLA_ASSERT_EQ(output.Size(), pdu_size); uint8_t EXPECTED[] = { 0x70, 77, 0, 0, 0, 39, 'f', 'o', 'o', ' ', 's', 'o', 'u', 'r', 'c', 'e', 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 101, // seq # 0, 2, // endpoint 0, }; OLA_ASSERT_DATA_EQUALS(EXPECTED, sizeof(EXPECTED), pdu_data, pdu_size); output.Pop(output.Size()); delete[] pdu_data; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/CID.cpp0000664000175000017500000000374414376533110012107 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * CID.cpp * CID class, passes everything through to CIDImpl. * Copyright (C) 2007 Simon Newton */ #include #include #include "libs/acn/CIDImpl.h" namespace ola { namespace acn { using std::string; CID::CID() : m_impl(new CIDImpl()) {} CID::CID(const CID& other) : m_impl(new CIDImpl(*other.m_impl)) {} CID::CID(CIDImpl *impl) : m_impl(impl) {} CID::~CID() { delete m_impl; } bool CID::IsNil() const { return m_impl->IsNil(); } void CID::Pack(uint8_t *buffer) const { return m_impl->Pack(buffer); } CID& CID::operator=(const CID& other) { *m_impl = *other.m_impl; return *this; } bool CID::operator==(const CID& other) const { return (*m_impl == *other.m_impl); } bool CID::operator!=(const CID& c1) const { return !(*this == c1); } bool CID::operator<(const CID& c1) const { return *m_impl < *c1.m_impl; } string CID::ToString() const { return m_impl->ToString(); } void CID::Write(ola::io::OutputBufferInterface *output) const { m_impl->Write(output); } CID CID::Generate() { return CID(CIDImpl::Generate()); } CID CID::FromData(const uint8_t *data) { return CID(CIDImpl::FromData(data)); } CID CID::FromString(const string &cid) { return CID(CIDImpl::FromString(cid)); } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/E131DiscoveryInflator.cpp0000664000175000017500000000376614376533110015514 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131DiscoveryInflator.cpp * An inflator for E1.31 discovery messages. * Copyright (C) 2014 Simon Newton */ #include #include "ola/Logging.h" #include "ola/base/Macro.h" #include "libs/acn/E131DiscoveryInflator.h" namespace ola { namespace acn { using std::vector; unsigned int E131DiscoveryInflator::InflatePDUBlock(HeaderSet *headers, const uint8_t *data, unsigned int len) { if (!m_page_callback.get()) { return len; } PACK( struct page_header { uint8_t page_number; uint8_t last_page; }); STATIC_ASSERT(sizeof(page_header) == 2); page_header header; if (len < sizeof(header)) { OLA_WARN << "Universe Discovery packet is too small: " << len; return len; } memcpy(reinterpret_cast(&header), data, sizeof(header)); DiscoveryPage page(header.page_number, header.last_page); for (const uint8_t *ptr = data + sizeof(header); ptr != data + len; ptr += 2) { uint16_t universe; memcpy(reinterpret_cast(&universe), ptr, sizeof(universe)); page.universes.push_back(ola::network::NetworkToHost(universe)); } m_page_callback->Run(*headers, page); return len; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/E133StatusPDU.h0000664000175000017500000000244414376533110013341 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133StatusPDU.h * The E133StatusPDU * Copyright (C) 2013 Simon Newton */ #ifndef LIBS_ACN_E133STATUSPDU_H_ #define LIBS_ACN_E133STATUSPDU_H_ #include #include #include "ola/e133/E133Enums.h" #include "libs/acn/PDU.h" namespace ola { namespace acn { class E133StatusPDU : private PDU { public: static void PrependPDU(ola::io::IOStack *stack, ola::e133::E133StatusCode status_code, const std::string &status); }; } // namespace acn } // namespace ola #endif // LIBS_ACN_E133STATUSPDU_H_ ola-0.10.9/libs/acn/E131Inflator.cpp0000664000175000017500000000771514376533110013622 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131Inflator.cpp * The Inflator for the E1.31 PDUs * Copyright (C) 2007 Simon Newton */ #include #include "ola/Logging.h" #include "ola/network/NetworkUtils.h" #include "libs/acn/E131Inflator.h" namespace ola { namespace acn { using ola::network::NetworkToHost; /* * Decode the E1.31 headers. If data is null we're expected to use the last * header we got. * @param headers the HeaderSet to add to * @param data a pointer to the data * @param length length of the data * @returns true if successful, false otherwise */ bool E131Inflator::DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int length, unsigned int *bytes_used) { if (data) { // the header bit was set, decode it if (length >= sizeof(E131Header::e131_pdu_header)) { E131Header::e131_pdu_header raw_header; memcpy(&raw_header, data, sizeof(E131Header::e131_pdu_header)); raw_header.source[E131Header::SOURCE_NAME_LEN - 1] = 0x00; E131Header header( raw_header.source, raw_header.priority, raw_header.sequence, NetworkToHost(raw_header.universe), raw_header.options & E131Header::PREVIEW_DATA_MASK, raw_header.options & E131Header::STREAM_TERMINATED_MASK); m_last_header = header; m_last_header_valid = true; headers->SetE131Header(header); *bytes_used = sizeof(E131Header::e131_pdu_header); return true; } *bytes_used = 0; return false; } // use the last header if it exists *bytes_used = 0; if (!m_last_header_valid) { OLA_WARN << "Missing E131 Header data"; return false; } headers->SetE131Header(m_last_header); return true; } /* * Decode the E1.31 headers. If data is null we're expected to use the last * header we got. * @param headers the HeaderSet to add to * @param data a pointer to the data * @param length length of the data * @returns true if successful, false otherwise */ bool E131InflatorRev2::DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int length, unsigned int *bytes_used) { if (data) { // the header bit was set, decode it if (length >= sizeof(E131Rev2Header::e131_rev2_pdu_header)) { E131Rev2Header::e131_rev2_pdu_header raw_header; memcpy(&raw_header, data, sizeof(E131Rev2Header::e131_rev2_pdu_header)); raw_header.source[E131Rev2Header::REV2_SOURCE_NAME_LEN - 1] = 0x00; E131Rev2Header header(raw_header.source, raw_header.priority, raw_header.sequence, NetworkToHost(raw_header.universe)); m_last_header = header; m_last_header_valid = true; headers->SetE131Header(header); *bytes_used = sizeof(E131Rev2Header::e131_rev2_pdu_header); return true; } *bytes_used = 0; return false; } // use the last header if it exists *bytes_used = 0; if (!m_last_header_valid) { OLA_WARN << "Missing E131 Header data"; return false; } headers->SetE131Header(m_last_header); return true; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/TCPTransport.cpp0000664000175000017500000002217314376533110014050 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * TCPTransport.cpp * The classes for transporting ACN over TCP. * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include #include "libs/acn/BaseInflator.h" #include "libs/acn/HeaderSet.h" #include "libs/acn/TCPTransport.h" namespace ola { namespace acn { const uint8_t ACN_HEADER[] = { 0x00, 0x14, // preamble size 0x00, 0x00, // post amble size 0x41, 0x53, 0x43, 0x2d, 0x45, 0x31, 0x2e, 0x31, 0x37, 0x00, 0x00, 0x00 // For TCP, the next 4 bytes are the block size }; const unsigned int ACN_HEADER_SIZE = sizeof(ACN_HEADER); // TODO(simon): tune this once we have an idea of what the sizes will be const unsigned int IncomingStreamTransport::INITIAL_SIZE = 500; /** * Create a new IncomingStreamTransport. * @param inflator the inflator to call for each PDU * @param descriptor the descriptor to read from * @param source the IP and port to use in the transport header */ IncomingStreamTransport::IncomingStreamTransport( BaseInflator *inflator, ola::io::ConnectedDescriptor *descriptor, const ola::network::IPV4SocketAddress &source) : m_transport_header(source, TransportHeader::TCP), m_inflator(inflator), m_descriptor(descriptor), m_buffer_start(NULL), m_buffer_end(NULL), m_data_end(NULL), m_block_size(0), m_consumed_block_size(0), m_stream_valid(true), m_pdu_length_size(TWO_BYTES), m_pdu_size(0) { EnterWaitingForPreamble(); } /** * Clean up */ IncomingStreamTransport::~IncomingStreamTransport() { if (m_buffer_start) delete[] m_buffer_start; } /** * Read from this stream, looking for ACN messages. * @returns false if the stream is no longer consistent. At this point the * caller should close the descriptor since the data is no longer valid. */ bool IncomingStreamTransport::Receive() { while (true) { OLA_DEBUG << "start read, outstanding bytes is " << m_outstanding_data; // Read as much as we need ReadRequiredData(); OLA_DEBUG << "done read, bytes outstanding is " << m_outstanding_data; // if we still don't have enough, return if (m_stream_valid == false || m_outstanding_data) return m_stream_valid; OLA_DEBUG << "state is " << m_state; switch (m_state) { case WAITING_FOR_PREAMBLE: HandlePreamble(); break; case WAITING_FOR_PDU_FLAGS: HandlePDUFlags(); break; case WAITING_FOR_PDU_LENGTH: HandlePDULength(); break; case WAITING_FOR_PDU: HandlePDU(); break; } if (!m_stream_valid) return false; } } /** * Handle the Preamble data. * @pre 20 bytes in the buffer */ void IncomingStreamTransport::HandlePreamble() { OLA_DEBUG << "in handle preamble, data len is " << DataLength(); if (memcmp(m_buffer_start, ACN_HEADER, ACN_HEADER_SIZE) != 0) { ola::FormatData(&std::cout, m_buffer_start, ACN_HEADER_SIZE); ola::FormatData(&std::cout, ACN_HEADER, ACN_HEADER_SIZE); OLA_WARN << "bad ACN header"; m_stream_valid = false; return; } // read the PDU block length memcpy(reinterpret_cast(&m_block_size), m_buffer_start + ACN_HEADER_SIZE, sizeof(m_block_size)); m_block_size = ola::network::NetworkToHost(m_block_size); OLA_DEBUG << "pdu block size is " << m_block_size; if (m_block_size) { m_consumed_block_size = 0; EnterWaitingForPDU(); } else { EnterWaitingForPreamble(); } } /** * Handle the PDU Flag data, this allows us to figure out how many bytes we * need to read the length. * @pre 1 byte in the buffer */ void IncomingStreamTransport::HandlePDUFlags() { OLA_DEBUG << "Reading PDU flags, data size is " << DataLength(); m_pdu_length_size = (*m_buffer_start & BaseInflator::LFLAG_MASK) ? THREE_BYTES : TWO_BYTES; m_outstanding_data += static_cast(m_pdu_length_size) - 1; OLA_DEBUG << "PDU length size is " << static_cast(m_pdu_length_size) << " bytes"; m_state = WAITING_FOR_PDU_LENGTH; } /** * Handle the PDU Length data. * @pre 2 or 3 bytes of data in the buffer, depending on m_pdu_length_size */ void IncomingStreamTransport::HandlePDULength() { if (m_pdu_length_size == THREE_BYTES) { m_pdu_size = ( m_buffer_start[2] + static_cast(m_buffer_start[1] << 8) + static_cast((m_buffer_start[0] & BaseInflator::LENGTH_MASK) << 16)); } else { m_pdu_size = m_buffer_start[1] + static_cast( (m_buffer_start[0] & BaseInflator::LENGTH_MASK) << 8); } OLA_DEBUG << "PDU size is " << m_pdu_size; if (m_pdu_size < static_cast(m_pdu_length_size)) { OLA_WARN << "PDU length was set to " << m_pdu_size << " but " << static_cast(m_pdu_length_size) << " bytes were used in the header"; m_stream_valid = false; return; } m_outstanding_data += ( m_pdu_size - static_cast(m_pdu_length_size)); OLA_DEBUG << "Processed length, now waiting on another " << m_outstanding_data << " bytes"; m_state = WAITING_FOR_PDU; } /** * Handle a PDU * @pre m_pdu_size bytes in the buffer */ void IncomingStreamTransport::HandlePDU() { OLA_DEBUG << "Got PDU, data length is " << DataLength() << ", expected " << m_pdu_size; if (DataLength() != m_pdu_size) { OLA_WARN << "PDU size doesn't match the available data"; m_stream_valid = false; return; } HeaderSet header_set; header_set.SetTransportHeader(m_transport_header); unsigned int data_consumed = m_inflator->InflatePDUBlock( &header_set, m_buffer_start, m_pdu_size); OLA_DEBUG << "inflator consumed " << data_consumed << " bytes"; if (m_pdu_size != data_consumed) { OLA_WARN << "PDU inflation size mismatch, " << m_pdu_size << " != " << data_consumed; m_stream_valid = false; return; } m_consumed_block_size += data_consumed; if (m_consumed_block_size == m_block_size) { // all PDUs in this block have been processed EnterWaitingForPreamble(); } else { EnterWaitingForPDU(); } } /** * Grow the rx buffer to the new size. */ void IncomingStreamTransport::IncreaseBufferSize(unsigned int new_size) { if (new_size <= BufferSize()) return; new_size = std::max(new_size, INITIAL_SIZE); unsigned int data_length = DataLength(); if (!m_buffer_start) data_length = 0; // allocate new buffer and copy the data over uint8_t *buffer = new uint8_t[new_size]; if (m_buffer_start) { if (data_length > 0) // this moves the data to the start of the buffer if it wasn't already memcpy(buffer, m_buffer_start, data_length); delete[] m_buffer_start; } m_buffer_start = buffer; m_buffer_end = buffer + new_size; m_data_end = buffer + data_length; } /** * Read data until we reach the number of bytes we required or there is no more * data to be read */ void IncomingStreamTransport::ReadRequiredData() { if (m_outstanding_data == 0) return; if (m_outstanding_data > FreeSpace()) IncreaseBufferSize(DataLength() + m_outstanding_data); unsigned int data_read; int ok = m_descriptor->Receive(m_data_end, m_outstanding_data, data_read); if (ok != 0) OLA_WARN << "tcp rx failed"; OLA_DEBUG << "read " << data_read; m_data_end += data_read; m_outstanding_data -= data_read; } /** * Enter the wait-for-preamble state */ void IncomingStreamTransport::EnterWaitingForPreamble() { m_data_end = m_buffer_start; m_state = WAITING_FOR_PREAMBLE; m_outstanding_data = ACN_HEADER_SIZE + PDU_BLOCK_SIZE; } /** * Enter the wait-for-pdu state */ void IncomingStreamTransport::EnterWaitingForPDU() { m_state = WAITING_FOR_PDU_FLAGS; m_data_end = m_buffer_start; // we need 1 byte to read the flags m_outstanding_data = 1; } /** * Create a new IncomingTCPTransport */ IncomingTCPTransport::IncomingTCPTransport(BaseInflator *inflator, ola::network::TCPSocket *socket) : m_transport(NULL) { ola::network::GenericSocketAddress address = socket->GetPeerAddress(); if (address.Family() == AF_INET) { ola::network::IPV4SocketAddress v4_addr = address.V4Addr(); m_transport.reset( new IncomingStreamTransport(inflator, socket, v4_addr)); } else { OLA_WARN << "Invalid address for fd " << socket->ReadDescriptor(); } } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/RDMInflator.cpp0000664000175000017500000000500414376533110013620 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RDMInflator.cpp * The Inflator for the RDM PDUs * Copyright (C) 2011 Simon Newton */ #include #include #include "ola/Logging.h" #include "ola/rdm/RDMCommand.h" #include "libs/acn/RDMInflator.h" namespace ola { namespace acn { using std::string; /** * Create a new RDM inflator */ RDMInflator::RDMInflator() : BaseInflator(PDU::ONE_BYTE) { } /** * Set a RDMHandler to run when receiving a RDM message. * @param handler the callback to invoke when there is rdm data for this * universe. */ void RDMInflator::SetRDMHandler(RDMMessageHandler *handler) { m_rdm_handler.reset(handler); } /* * Decode the RDM 'header', which is 0 bytes in length. * @param headers the HeaderSet to add to * @param data a pointer to the data * @param length length of the data * @returns true if successful, false otherwise */ bool RDMInflator::DecodeHeader(HeaderSet *, const uint8_t*, unsigned int, unsigned int *bytes_used) { *bytes_used = 0; return true; } /* * Handle a DMP PDU for E1.33. */ bool RDMInflator::HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_len) { if (vector != VECTOR_RDMNET_DATA) { OLA_INFO << "Not a RDM message, vector was " << vector; return true; } string rdm_message(reinterpret_cast(&data[0]), pdu_len); E133Header e133_header = headers.GetE133Header(); if (m_rdm_handler.get()) { m_rdm_handler->Run(&headers.GetTransportHeader(), &e133_header, rdm_message); } else { OLA_WARN << "No RDM handler defined!"; } return true; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/RootInflatorTest.cpp0000664000175000017500000000416014376533110014763 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RootInflatorTest.cpp * Test fixture for the RootInflator class * Copyright (C) 2005 Simon Newton */ #include #include "libs/acn/HeaderSet.h" #include "libs/acn/PDUTestCommon.h" #include "libs/acn/RootInflator.h" #include "libs/acn/RootPDU.h" #include "ola/testing/TestUtils.h" namespace ola { namespace acn { using ola::acn::CID; class RootInflatorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RootInflatorTest); CPPUNIT_TEST(testInflatePDU); CPPUNIT_TEST_SUITE_END(); public: void testInflatePDU(); }; CPPUNIT_TEST_SUITE_REGISTRATION(RootInflatorTest); /* * Check that we can inflate a Root PDU that contains other PDUs */ void RootInflatorTest::testInflatePDU() { MockPDU pdu1(1, 2); MockPDU pdu2(4, 8); PDUBlock block; block.AddPDU(&pdu1); block.AddPDU(&pdu2); CID cid = CID::Generate(); RootPDU pdu(MockPDU::TEST_VECTOR, cid, &block); OLA_ASSERT_EQ((unsigned int) 50, pdu.Size()); unsigned int size = pdu.Size(); uint8_t *data = new uint8_t[size]; unsigned int bytes_used = size; OLA_ASSERT(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ((unsigned int) size, bytes_used); MockInflator mock_inflator(cid); RootInflator inflator; inflator.AddInflator(&mock_inflator); HeaderSet header_set; OLA_ASSERT(inflator.InflatePDUBlock(&header_set, data, size)); delete[] data; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/PreamblePacker.cpp0000664000175000017500000000647114376533110014365 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PreamblePacker.cpp * The PreamblePacker class * Copyright (C) 2007 Simon Newton */ #include #include #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/io/BigEndianStream.h" #include "ola/network/IPV4Address.h" #include "ola/network/NetworkUtils.h" #include "libs/acn/BaseInflator.h" #include "libs/acn/HeaderSet.h" #include "libs/acn/PreamblePacker.h" namespace ola { namespace acn { using ola::network::HostToNetwork; using ola::network::IPV4Address; using ola::io::IOStack; const uint8_t PreamblePacker::ACN_HEADER[] = { 0x00, 0x10, 0x00, 0x00, 0x41, 0x53, 0x43, 0x2d, 0x45, 0x31, 0x2e, 0x31, 0x37, 0x00, 0x00, 0x00 }; const unsigned int PreamblePacker::ACN_HEADER_SIZE = sizeof(ACN_HEADER); const uint8_t PreamblePacker::TCP_ACN_HEADER[] = { 0x00, 0x14, // preamble size 0x00, 0x00, // post amble size 0x41, 0x53, 0x43, 0x2d, 0x45, 0x31, 0x2e, 0x31, 0x37, 0x00, 0x00, 0x00 // For TCP, the next 4 bytes are the block size }; const unsigned int PreamblePacker::TCP_ACN_HEADER_SIZE = sizeof(TCP_ACN_HEADER); /* * Clean up */ PreamblePacker::~PreamblePacker() { if (m_send_buffer) delete[] m_send_buffer; } /* * Pack the PDU block along with the preamble into a memory location. * @param pdu_block the block of pdus to send * @param length the size of the data buffer to send. * @return */ const uint8_t *PreamblePacker::Pack(const PDUBlock &pdu_block, unsigned int *length) { if (!m_send_buffer) Init(); unsigned int size = MAX_DATAGRAM_SIZE - static_cast(sizeof(ACN_HEADER)); if (!pdu_block.Pack(m_send_buffer + sizeof(ACN_HEADER), &size)) { OLA_WARN << "Failed to pack E1.31 PDU"; return NULL; } *length = static_cast(sizeof(ACN_HEADER) + size); return m_send_buffer; } /** * Add the UDP Preamble to an IOStack */ void PreamblePacker::AddUDPPreamble(IOStack *stack) { ola::io::BigEndianOutputStream output(stack); stack->Write(ACN_HEADER, ACN_HEADER_SIZE); } /** * Add the TCP Preamble to an IOStack */ void PreamblePacker::AddTCPPreamble(IOStack *stack) { ola::io::BigEndianOutputStream output(stack); output << stack->Size(); stack->Write(TCP_ACN_HEADER, TCP_ACN_HEADER_SIZE); } /* * Allocate memory for the data. */ void PreamblePacker::Init() { if (!m_send_buffer) { m_send_buffer = new uint8_t[MAX_DATAGRAM_SIZE]; memset(m_send_buffer + sizeof(ACN_HEADER), 0, MAX_DATAGRAM_SIZE - sizeof(ACN_HEADER)); memcpy(m_send_buffer, ACN_HEADER, sizeof(ACN_HEADER)); } } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/UDPTransport.h0000664000175000017500000000630314376533110013514 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * UDPTransport.h * Interface for the UDPTransport class * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_UDPTRANSPORT_H_ #define LIBS_ACN_UDPTRANSPORT_H_ #include "ola/acn/ACNPort.h" #include "ola/network/IPV4Address.h" #include "ola/network/Socket.h" #include "libs/acn/PDU.h" #include "libs/acn/PreamblePacker.h" #include "libs/acn/Transport.h" namespace ola { namespace acn { /* * The OutgoingUDPTransport is a small shim that provides the options to * UDPTransportImpl. */ class OutgoingUDPTransport: public OutgoingTransport { public: OutgoingUDPTransport(class OutgoingUDPTransportImpl *impl, const ola::network::IPV4Address &destination, uint16_t port = ola::acn::ACN_PORT) : m_impl(impl), m_destination(destination, port) { } ~OutgoingUDPTransport() {} bool Send(const PDUBlock &pdu_block); private: class OutgoingUDPTransportImpl *m_impl; ola::network::IPV4SocketAddress m_destination; OutgoingUDPTransport(const OutgoingUDPTransport&); OutgoingUDPTransport& operator=(const OutgoingUDPTransport&); }; /** * OutgoingUDPTransportImpl is the class that actually does the sending. */ class OutgoingUDPTransportImpl { public: OutgoingUDPTransportImpl(ola::network::UDPSocket *socket, PreamblePacker *packer = NULL) : m_socket(socket), m_packer(packer), m_free_packer(false) { if (!m_packer) { m_packer = new PreamblePacker(); m_free_packer = true; } } ~OutgoingUDPTransportImpl() { if (m_free_packer) delete m_packer; } bool Send(const PDUBlock &pdu_block, const ola::network::IPV4SocketAddress &destination); private: ola::network::UDPSocket *m_socket; PreamblePacker *m_packer; bool m_free_packer; }; /** * IncomingUDPTransport is responsible for receiving over UDP * TODO(simon): pass the socket as an argument to receive so we can reuse the * transport for multiple sockets. */ class IncomingUDPTransport { public: IncomingUDPTransport(ola::network::UDPSocket *socket, class BaseInflator *inflator); ~IncomingUDPTransport() { if (m_recv_buffer) delete[] m_recv_buffer; } void Receive(); private: ola::network::UDPSocket *m_socket; class BaseInflator *m_inflator; uint8_t *m_recv_buffer; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_UDPTRANSPORT_H_ ola-0.10.9/libs/acn/RootPDU.cpp0000664000175000017500000000437314376533110013003 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RootPDU.cpp * The RootPDU class * Copyright (C) 2007 Simon Newton */ #include "ola/Logging.h" #include "ola/io/IOStack.h" #include "libs/acn/BaseInflator.h" #include "libs/acn/RootPDU.h" namespace ola { namespace acn { using ola::acn::CID; using ola::io::IOStack; using ola::io::OutputStream; using ola::network::HostToNetwork; /* * Pack the header into a buffer. */ bool RootPDU::PackHeader(uint8_t *data, unsigned int *length) const { if (*length < HeaderSize()) { *length = 0; return false; } m_cid.Pack(data); *length = HeaderSize(); return true; } /* * Pack the data into a buffer */ bool RootPDU::PackData(uint8_t *data, unsigned int *length) const { if (m_block) return m_block->Pack(data, length); *length = 0; return true; } /* * Pack the header into a buffer. */ void RootPDU::PackHeader(OutputStream *stream) const { uint8_t cid[CID::CID_LENGTH]; m_cid.Pack(cid); stream->Write(cid, CID::CID_LENGTH); } /* * Pack the data into a buffer */ void RootPDU::PackData(OutputStream *stream) const { if (m_block) m_block->Write(stream); } void RootPDU::SetBlock(const PDUBlock *block) { m_block = block; m_block_size = m_block ? block->Size() : 0; } /* * Prepend a Root Layer flags, length, vector & header */ void RootPDU::PrependPDU(IOStack *stack, uint32_t vector, const CID &cid) { cid.Write(stack); vector = HostToNetwork(vector); stack->Write(reinterpret_cast(&vector), sizeof(vector)); PrependFlagsAndLength(stack); } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/UDPTransport.cpp0000664000175000017500000000611414376533110014047 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * UDPTransport.cpp * The OutgoingUDPTransport and IncomingUDPTransport classes * Copyright (C) 2007 Simon Newton */ #include #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/network/NetworkUtils.h" #include "ola/network/SocketAddress.h" #include "libs/acn/BaseInflator.h" #include "libs/acn/HeaderSet.h" #include "libs/acn/UDPTransport.h" namespace ola { namespace acn { using ola::network::HostToNetwork; using ola::network::IPV4SocketAddress; /* * Send a block of PDU messages. * @param pdu_block the block of pdus to send */ bool OutgoingUDPTransport::Send(const PDUBlock &pdu_block) { return m_impl->Send(pdu_block, m_destination); } /* * Send a block of PDU messages using UDP. * @param pdu_block the block of pdus to send * @param destination the ipv4 address to send to * @param port the destination port to send to */ bool OutgoingUDPTransportImpl::Send(const PDUBlock &pdu_block, const IPV4SocketAddress &destination) { unsigned int data_size; const uint8_t *data = m_packer->Pack(pdu_block, &data_size); if (!data) return false; return m_socket->SendTo(data, data_size, destination); } IncomingUDPTransport::IncomingUDPTransport(ola::network::UDPSocket *socket, BaseInflator *inflator) : m_socket(socket), m_inflator(inflator), m_recv_buffer(NULL) { } /* * Called when new data arrives. */ void IncomingUDPTransport::Receive() { if (!m_recv_buffer) m_recv_buffer = new uint8_t[PreamblePacker::MAX_DATAGRAM_SIZE]; ssize_t size = PreamblePacker::MAX_DATAGRAM_SIZE; ola::network::IPV4SocketAddress source; if (!m_socket->RecvFrom(m_recv_buffer, &size, &source)) return; unsigned int header_size = PreamblePacker::ACN_HEADER_SIZE; if (size < static_cast(header_size)) { OLA_WARN << "short ACN frame, discarding"; return; } if (memcmp(m_recv_buffer, PreamblePacker::ACN_HEADER, header_size)) { OLA_WARN << "ACN header is bad, discarding"; return; } HeaderSet header_set; TransportHeader transport_header(source, TransportHeader::UDP); header_set.SetTransportHeader(transport_header); m_inflator->InflatePDUBlock( &header_set, m_recv_buffer + header_size, static_cast(size) - header_size); return; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/RootInflator.cpp0000664000175000017500000000426014376533110014124 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RootInflator.cpp * The Inflator for the root level packets over UDP * Copyright (C) 2007 Simon Newton */ #include "ola/Logging.h" #include "libs/acn/RootInflator.h" namespace ola { namespace acn { using ola::acn::CID; /* * Decode the root headers. If data is null we're expected to use the last * header we got. * @param headers the HeaderSet to add to * @param data a pointer to the data * @param length length of the data * @returns true if successful, false otherwise */ bool RootInflator::DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int length, unsigned int *bytes_used) { if (data) { if (length >= CID::CID_LENGTH) { CID cid = CID::FromData(data); m_last_hdr.SetCid(cid); headers->SetRootHeader(m_last_hdr); *bytes_used = CID::CID_LENGTH; return true; } return false; } *bytes_used = 0; if (m_last_hdr.GetCid().IsNil()) { OLA_WARN << "Missing CID data"; return false; } headers->SetRootHeader(m_last_hdr); return true; } /* * Reset the header field */ void RootInflator::ResetHeaderField() { CID cid; m_last_hdr.SetCid(cid); } /** * This runs the on_data callback if we have one */ bool RootInflator::PostHeader(uint32_t, const HeaderSet &headers) { if (m_on_data.get()) m_on_data->Run(headers.GetTransportHeader()); return true; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/DMPAddress.cpp0000664000175000017500000001025614376533110013432 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPAddress.cpp * Defines the DMP property address types * Copyright (C) 2007 Simon Newton */ #include "ola/network/NetworkUtils.h" #include "libs/acn/DMPAddress.h" namespace ola { namespace acn { using ola::network::NetworkToHost; /* * Return the number of bytes that correspond to a DMPType */ unsigned int DMPSizeToByteSize(dmp_address_size size) { switch (size) { case ONE_BYTES: return 1; case TWO_BYTES: return 2; case FOUR_BYTES: return 4; default: return 0; } } /* * Create a new single address */ const BaseDMPAddress *NewSingleAddress(unsigned int value) { if (value > MAX_TWO_BYTE) return new FourByteDMPAddress(value); else if (value > MAX_ONE_BYTE) return new TwoByteDMPAddress((uint16_t) value); return new OneByteDMPAddress((uint8_t) value); } /* * Create a new range address. */ const BaseDMPAddress *NewRangeAddress(unsigned int value, unsigned int increment, unsigned int number) { if (value > MAX_TWO_BYTE || increment > MAX_TWO_BYTE || number > MAX_TWO_BYTE) return new FourByteRangeDMPAddress(value, increment, number); else if (value > MAX_ONE_BYTE || increment > MAX_ONE_BYTE || number > MAX_ONE_BYTE) return new TwoByteRangeDMPAddress((uint16_t) value, (uint16_t) increment, (uint16_t) number); return new OneByteRangeDMPAddress((uint8_t) value, (uint8_t) increment, (uint8_t) number); } /* * Decode a block of data into a DMPAddress */ const BaseDMPAddress *DecodeAddress(dmp_address_size size, dmp_address_type type, const uint8_t *data, unsigned int *length) { unsigned int byte_count = (type == NON_RANGE ? 1 : 3) * DMPSizeToByteSize(size); if (size == RES_BYTES || *length < byte_count) { *length = 0; return NULL; } *length = byte_count; const uint8_t *addr1 = data; // We have to do a memcpy to avoid the word alignment issues on ARM uint16_t addr2[3]; uint32_t addr4[3]; if (type == NON_RANGE) { switch (size) { case ONE_BYTES: return new OneByteDMPAddress(*data); case TWO_BYTES: memcpy(addr2, data, sizeof(addr2)); return new TwoByteDMPAddress(NetworkToHost(addr2[0])); case FOUR_BYTES: memcpy(addr4, data, sizeof(addr4)); return new FourByteDMPAddress(NetworkToHost(addr4[0])); default: return NULL; // should never make it here because we checked above } } switch (size) { case ONE_BYTES: return new OneByteRangeDMPAddress(addr1[0], addr1[1], addr1[2]); case TWO_BYTES: memcpy(addr2, data, sizeof(addr2)); return new TwoByteRangeDMPAddress(NetworkToHost(addr2[0]), NetworkToHost(addr2[1]), NetworkToHost(addr2[2])); case FOUR_BYTES: memcpy(addr4, data, sizeof(addr4)); return new FourByteRangeDMPAddress(NetworkToHost(addr4[0]), NetworkToHost(addr4[1]), NetworkToHost(addr4[2])); default: return NULL; // should never make it here because we checked above } } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/DMPE131Inflator.cpp0000664000175000017500000002637514376533110014166 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPE131Inflator.cpp * The Inflator for the DMP PDUs * Copyright (C) 2007 Simon Newton */ #include #include #include #include #include #include "ola/Logging.h" #include "libs/acn/DMPE131Inflator.h" #include "libs/acn/DMPHeader.h" #include "libs/acn/DMPPDU.h" namespace ola { namespace acn { using ola::Callback0; using ola::acn::CID; using ola::io::OutputStream; using std::map; using std::pair; using std::vector; const TimeInterval DMPE131Inflator::EXPIRY_INTERVAL(2500000); DMPE131Inflator::~DMPE131Inflator() { UniverseHandlers::iterator iter; for (iter = m_handlers.begin(); iter != m_handlers.end(); ++iter) { delete iter->second.closure; } m_handlers.clear(); } /* * Handle a DMP PDU for E1.31. */ bool DMPE131Inflator::HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_len) { if (vector != ola::acn::DMP_SET_PROPERTY_VECTOR) { OLA_INFO << "not a set property msg: " << vector; return true; } E131Header e131_header = headers.GetE131Header(); UniverseHandlers::iterator universe_iter = m_handlers.find(e131_header.Universe()); if (e131_header.PreviewData() && m_ignore_preview) { OLA_DEBUG << "Ignoring preview data"; return true; } if (universe_iter == m_handlers.end()) return true; DMPHeader dmp_header = headers.GetDMPHeader(); if (!dmp_header.IsVirtual() || dmp_header.IsRelative() || dmp_header.Size() != TWO_BYTES || dmp_header.Type() != RANGE_EQUAL) { OLA_INFO << "malformed E1.31 dmp header " << dmp_header.Header(); return true; } if (e131_header.Priority() > MAX_E131_PRIORITY) { OLA_INFO << "Priority " << static_cast(e131_header.Priority()) << " is greater than the max priority (" << static_cast(MAX_E131_PRIORITY) << "), ignoring data"; return true; } unsigned int available_length = pdu_len; std::auto_ptr address( DecodeAddress(dmp_header.Size(), dmp_header.Type(), data, &available_length)); if (!address.get()) { OLA_INFO << "DMP address parsing failed, the length is probably too small"; return true; } if (address->Increment() != 1) { OLA_INFO << "E1.31 DMP packet with increment " << address->Increment() << ", disarding"; return true; } unsigned int length_remaining = pdu_len - available_length; int start_code = -1; if (e131_header.UsingRev2()) start_code = static_cast(address->Start()); else if (length_remaining && address->Number()) start_code = *(data + available_length); // The only time we want to continue processing a non-0 start code is if it // contains a Terminate message. if (start_code && !e131_header.StreamTerminated()) { OLA_INFO << "Skipping packet with non-0 start code: " << start_code; return true; } DmxBuffer *target_buffer; if (!TrackSourceIfRequired(&universe_iter->second, headers, &target_buffer)) { // no need to continue processing return true; } // Reaching here means that we actually have new data and we should merge. if (target_buffer && start_code == 0) { unsigned int channels = std::min(length_remaining, address->Number()); if (e131_header.UsingRev2()) target_buffer->Set(data + available_length, channels); else target_buffer->Set(data + available_length + 1, channels - 1); } if (universe_iter->second.priority) *universe_iter->second.priority = universe_iter->second.active_priority; // merge the sources switch (universe_iter->second.sources.size()) { case 0: universe_iter->second.buffer->Reset(); break; case 1: universe_iter->second.buffer->Set( universe_iter->second.sources[0].buffer); universe_iter->second.closure->Run(); break; default: // HTP Merge universe_iter->second.buffer->Reset(); std::vector::const_iterator source_iter = universe_iter->second.sources.begin(); for (; source_iter != universe_iter->second.sources.end(); ++source_iter) universe_iter->second.buffer->HTPMerge(source_iter->buffer); universe_iter->second.closure->Run(); } return true; } /* * Set the closure to be called when we receive data for this universe. * @param universe the universe to register the handler for * @param buffer the DmxBuffer to update with the data * @param handler the Callback0 to call when there is data for this universe. * Ownership of the closure is transferred to the node. */ bool DMPE131Inflator::SetHandler(uint16_t universe, ola::DmxBuffer *buffer, uint8_t *priority, ola::Callback0 *closure) { if (!closure || !buffer) return false; UniverseHandlers::iterator iter = m_handlers.find(universe); if (iter == m_handlers.end()) { universe_handler handler; handler.buffer = buffer; handler.closure = closure; handler.active_priority = 0; handler.priority = priority; m_handlers[universe] = handler; } else { Callback0 *old_closure = iter->second.closure; iter->second.closure = closure; iter->second.buffer = buffer; iter->second.priority = priority; delete old_closure; } return true; } /* * Remove the handler for this universe * @param universe the universe handler to remove * @param true if removed, false if it didn't exist */ bool DMPE131Inflator::RemoveHandler(uint16_t universe) { UniverseHandlers::iterator iter = m_handlers.find(universe); if (iter != m_handlers.end()) { Callback0 *old_closure = iter->second.closure; m_handlers.erase(iter); delete old_closure; return true; } return false; } /** * Get the list of registered universes * @param universes a pointer to a vector which is populated with the list of * universes that have handlers installed. */ void DMPE131Inflator::RegisteredUniverses(vector *universes) { universes->clear(); UniverseHandlers::iterator iter; for (iter = m_handlers.begin(); iter != m_handlers.end(); ++iter) { universes->push_back(iter->first); } } /* * Check if this source is operating at the highest priority for this universe. * This takes care of tracking all sources for a universe at the active * priority. * @param universe_data the universe_handler struct for this universe, * @param HeaderSet the set of headers in this packet * @param buffer, if set to a non-NULL pointer, the caller should copy the data * in the buffer. * @returns true if we should remerge the data, false otherwise. */ bool DMPE131Inflator::TrackSourceIfRequired( universe_handler *universe_data, const HeaderSet &headers, DmxBuffer **buffer) { *buffer = NULL; // default the buffer to NULL ola::TimeStamp now; m_clock.CurrentMonotonicTime(&now); const E131Header &e131_header = headers.GetE131Header(); uint8_t priority = e131_header.Priority(); vector &sources = universe_data->sources; vector::iterator iter = sources.begin(); while (iter != sources.end()) { if (iter->cid != headers.GetRootHeader().GetCid()) { TimeStamp expiry_time = iter->last_heard_from + EXPIRY_INTERVAL; if (now > expiry_time) { OLA_INFO << "source " << iter->cid.ToString() << " has expired"; iter = sources.erase(iter); continue; } } iter++; } if (sources.empty()) universe_data->active_priority = 0; for (iter = sources.begin(); iter != sources.end(); ++iter) { if (iter->cid == headers.GetRootHeader().GetCid()) break; } if (iter == sources.end()) { // This is an untracked source if (e131_header.StreamTerminated() || priority < universe_data->active_priority) return false; if (priority > universe_data->active_priority) { OLA_INFO << "Raising priority for universe " << e131_header.Universe() << " from " << static_cast(universe_data->active_priority) << " to " << static_cast(priority); sources.clear(); universe_data->active_priority = priority; } if (sources.size() == MAX_MERGE_SOURCES) { // TODO(simon): flag this in the export map OLA_WARN << "Max merge sources reached for universe " << e131_header.Universe() << ", " << headers.GetRootHeader().GetCid().ToString() << " won't be tracked"; return false; } else { OLA_INFO << "Added new E1.31 source: " << headers.GetRootHeader().GetCid().ToString(); dmx_source new_source; new_source.cid = headers.GetRootHeader().GetCid(); new_source.sequence = e131_header.Sequence(); new_source.last_heard_from = now; iter = sources.insert(sources.end(), new_source); *buffer = &iter->buffer; return true; } } else { // We already know about this one, check the seq # int8_t seq_diff = static_cast(e131_header.Sequence() - iter->sequence); if (seq_diff <= 0 && seq_diff > SEQUENCE_DIFF_THRESHOLD) { OLA_INFO << "Old packet received, ignoring, this # " << static_cast(e131_header.Sequence()) << ", last " << static_cast(iter->sequence); return false; } iter->sequence = e131_header.Sequence(); if (e131_header.StreamTerminated()) { OLA_INFO << "CID " << headers.GetRootHeader().GetCid().ToString() << " sent a termination for universe " << e131_header.Universe(); sources.erase(iter); if (sources.empty()) universe_data->active_priority = 0; // We need to trigger a merge here else the buffer will be stale, we keep // the buffer as NULL though so we don't use the data. return true; } iter->last_heard_from = now; if (priority < universe_data->active_priority) { if (sources.size() == 1) { universe_data->active_priority = priority; } else { sources.erase(iter); return true; } } else if (priority > universe_data->active_priority) { // new active priority universe_data->active_priority = priority; if (sources.size() != 1) { // clear all sources other than this one dmx_source this_source = *iter; sources.clear(); iter = sources.insert(sources.end(), this_source); } } *buffer = &iter->buffer; return true; } } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/RootSender.h0000664000175000017500000000427514376533110013241 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RootSender.h * The RootSender class manages the sending of Root Layer PDUs. * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_ROOTSENDER_H_ #define LIBS_ACN_ROOTSENDER_H_ #include "ola/acn/CID.h" #include "libs/acn/PDU.h" #include "libs/acn/RootPDU.h" #include "libs/acn/Transport.h" namespace ola { namespace acn { class RootSender { public: explicit RootSender(const ola::acn::CID &cid); ~RootSender() {} // Convenience method to encapsulate & send a single PDU bool SendPDU(unsigned int vector, const PDU &pdu, OutgoingTransport *transport); // Send a RootPDU with no data bool SendEmpty(unsigned int vector, OutgoingTransport *transport); // Use for testing to force a message from a particular cid bool SendPDU(unsigned int vector, const PDU &pdu, const ola::acn::CID &cid, OutgoingTransport *transport); // Encapsulation & send a block of PDUs bool SendPDUBlock(unsigned int vector, const PDUBlock &block, OutgoingTransport *transport); // TODO(simon): add methods to queue and send PDUs/blocks with different // vectors private: PDUBlock m_working_block; PDUBlock m_root_block; RootPDU m_root_pdu; RootSender(const RootSender&); RootSender& operator=(const RootSender&); }; } // namespace acn } // namespace ola #endif // LIBS_ACN_ROOTSENDER_H_ ola-0.10.9/libs/acn/PDU.h0000664000175000017500000001210014376533110011567 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PDU.h * Interface for the PDU and PDUBlock classes * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_PDU_H_ #define LIBS_ACN_PDU_H_ #include #include #include #include namespace ola { namespace acn { /* * The Base PDU class * TODO(simon): make this into a template based on vector size. */ class PDU { public: typedef enum { ONE_BYTE = 1, TWO_BYTES = 2, FOUR_BYTES = 4, } vector_size; explicit PDU(unsigned int vector, vector_size size = FOUR_BYTES): m_vector(vector), m_vector_size(size) {} virtual ~PDU() {} // Returns the size of this PDU virtual unsigned int Size() const; virtual unsigned int VectorSize() const { return m_vector_size; } virtual unsigned int HeaderSize() const = 0; virtual unsigned int DataSize() const = 0; // Set the vector void SetVector(unsigned int vector) { m_vector = vector; } /* * Pack the PDU into the memory pointed to by data * @return true on success, false on failure */ virtual bool Pack(uint8_t *data, unsigned int *length) const; virtual bool PackHeader(uint8_t *data, unsigned int *length) const = 0; virtual bool PackData(uint8_t *data, unsigned int *length) const = 0; /** * Write the PDU to an OutputStream */ virtual void Write(ola::io::OutputStream *stream) const; virtual void PackHeader(ola::io::OutputStream *stream) const = 0; virtual void PackData(ola::io::OutputStream *stream) const = 0; static void PrependFlagsAndLength( ola::io::OutputBufferInterface *output, uint8_t flags = VFLAG_MASK | HFLAG_MASK | DFLAG_MASK); static void PrependFlagsAndLength( ola::io::OutputBufferInterface *output, unsigned int length, uint8_t flags); // This indicates a vector is present static const uint8_t VFLAG_MASK = 0x40; // This indicates a header field is present static const uint8_t HFLAG_MASK = 0x20; // This indicates a data field is present static const uint8_t DFLAG_MASK = 0x10; private: unsigned int m_vector; unsigned int m_vector_size; // The max PDU length that can be represented with the 2 byte format for // the length field. static const unsigned int TWOB_LENGTH_LIMIT = 0x0FFF; }; /* * Represents a block of pdus */ template class PDUBlock { public: PDUBlock(): m_size(0) {} ~PDUBlock() {} // Add a PDU to this block void AddPDU(const C *msg) { m_pdus.push_back(msg); m_size += msg->Size(); } // Remove all PDUs from the block void Clear() { m_pdus.clear(); m_size = 0; } // The number of bytes this block would consume, this ignores optimizations // like repeating headers/vectors. unsigned int Size() const { return m_size; } /* * Pack this PDUBlock into memory pointed to by data * @return true on success, false on failure */ bool Pack(uint8_t *data, unsigned int *length) const; /** * Write this PDU block to an OutputStream */ void Write(ola::io::OutputStream *stream) const; private: std::vector m_pdus; unsigned int m_size; }; /* * Pack this block of PDUs into a buffer * @param data a pointer to the buffer * @param length size of the buffer, updated with the number of bytes used * @return true on success, false on failure */ template bool PDUBlock::Pack(uint8_t *data, unsigned int *length) const { bool status = true; unsigned int i = 0; typename std::vector::const_iterator iter; for (iter = m_pdus.begin(); iter != m_pdus.end(); ++iter) { // TODO(simon): optimize repeated headers & vectors here unsigned int remaining = i < *length ? *length - i : 0; status &= (*iter)->Pack(data + i, &remaining); i+= remaining; } *length = i; return status; } /* * Write this block of PDUs to an OutputStream. * @param stream the OutputStream to write to * @return true on success, false on failure */ template void PDUBlock::Write(ola::io::OutputStream *stream) const { typename std::vector::const_iterator iter; for (iter = m_pdus.begin(); iter != m_pdus.end(); ++iter) { // TODO(simon): optimize repeated headers & vectors here (*iter)->Write(stream); } } } // namespace acn } // namespace ola #endif // LIBS_ACN_PDU_H_ ola-0.10.9/libs/acn/E131Node.h0000664000175000017500000002056114376533110012370 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131Node.h * Header file for the E131Node class, this is the interface between OLA and * the E1.31 library. * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_E131NODE_H_ #define LIBS_ACN_E131NODE_H_ #include #include #include #include #include "ola/Callback.h" #include "ola/Constants.h" #include "ola/DmxBuffer.h" #include "ola/acn/ACNPort.h" #include "ola/acn/CID.h" #include "ola/base/Macro.h" #include "ola/io/SelectServerInterface.h" #include "ola/thread/SchedulerInterface.h" #include "ola/network/Interface.h" #include "ola/network/Socket.h" #include "libs/acn/DMPE131Inflator.h" #include "libs/acn/E131DiscoveryInflator.h" #include "libs/acn/E131Inflator.h" #include "libs/acn/E131Sender.h" #include "libs/acn/RootInflator.h" #include "libs/acn/RootSender.h" #include "libs/acn/UDPTransport.h" namespace ola { namespace acn { class E131Node { public: /** * @brief Options for the E131Node. */ struct Options { public: Options() : use_rev2(false), ignore_preview(true), enable_draft_discovery(false), dscp(0), port(ola::acn::ACN_PORT), source_name(ola::OLA_DEFAULT_INSTANCE_NAME) { } bool use_rev2; /**< Use Revision 0.2 of the 2009 draft */ bool ignore_preview; /**< Ignore preview data */ bool enable_draft_discovery; /**< Enable 2014 draft discovery */ uint8_t dscp; /**< The DSCP value to tag packets with */ uint16_t port; /**< The UDP port to use, defaults to ACN_PORT */ std::string source_name; /**< The source name to use */ }; struct KnownController { acn::CID cid; ola::network::IPV4Address ip_address; std::string source_name; std::set universes; }; /** * @brief Create a new E1.31 node. * @param ss the SchedulerInterface to use. * @param ip_address the IP address to prefer to listen on * @param options the Options to use for the node. * @param cid the CID to use, if not provided we generate one. */ E131Node(ola::thread::SchedulerInterface *ss, const std::string &ip_address, const Options &options, const ola::acn::CID &cid = ola::acn::CID::Generate()); ~E131Node(); /** * @brief Start this node */ bool Start(); /** * @brief Stop this node */ bool Stop(); /** * @brief Set the name for a universe. * @param universe the id of the universe to send * @param source the new source name. */ bool SetSourceName(uint16_t universe, const std::string &source); /** * @brief Signal that we will start sending on this particular universe. * Without sending any DMX data. * @param universe to start sending on. */ bool StartStream(uint16_t universe); /** * @brief Signal that we will no longer send on this particular universe. * @param universe to terminate sending on. * @param priority the priority to use in the stream terminated message. */ bool TerminateStream(uint16_t universe, uint8_t priority = DEFAULT_PRIORITY); /** * @brief Send some DMX data. * @param universe the id of the universe to send * @param buffer the DMX data. * @param priority the priority to use * @param preview set to true to turn on the preview bit * @return true if it was sent successfully, false otherwise */ bool SendDMX(uint16_t universe, const ola::DmxBuffer &buffer, uint8_t priority = DEFAULT_PRIORITY, bool preview = false); /** * @brief Send some DMX data, allowing finer grained control of parameters. * * The method is provided for the testing framework. Don't use it in * production code! * * @param universe the id of the universe to send * @param buffer the DMX data * @param sequence_offset used to twiddle the sequence numbers, this doesn't * increment the sequence counter. * @param priority the priority to use * @param preview set to true to turn on the preview bit * @return true if it was sent successfully, false otherwise */ bool SendDMXWithSequenceOffset(uint16_t universe, const ola::DmxBuffer &buffer, int8_t sequence_offset, uint8_t priority = DEFAULT_PRIORITY, bool preview = false); /** * @brief Signal termination of the stream for a universe. * @param universe the id of the universe to send * @param buffer the last DmxBuffer to send. * @param priority the priority to use, this doesn't actually make a * difference. * * This does not remove the universe from the list of active TX universes, so * it should only be used for testing purposes. */ bool SendStreamTerminated(uint16_t universe, const ola::DmxBuffer &buffer = DmxBuffer(), uint8_t priority = DEFAULT_PRIORITY); /** * @brief Set the Callback to be run when we receive data for this universe. * @param universe the universe to register the handler for * @param buffer the DmxBuffer to copy the data to. * @param priority the priority to set. * @param handler the Callback to call when there is data for this universe. * Ownership is transferred. */ bool SetHandler(uint16_t universe, ola::DmxBuffer *buffer, uint8_t *priority, ola::Callback0 *handler); /** * @brief Remove the handler for a particular universe. * @param universe the universe handler to remove * @return true if removed, false if it didn't exist */ bool RemoveHandler(uint16_t universe); /** * @brief Return the Interface this node is using. */ const ola::network::Interface &GetInterface() const { return m_interface; } /** * @brief Return the UDP socket this node is using. */ ola::network::UDPSocket* GetSocket() { return &m_socket; } /** * @brief Return a list of known controllers. * * This will return an empty list unless enable_draft_discovery was set in * the node Options. */ void GetKnownControllers(std::vector *controllers); private: struct tx_universe { std::string source; uint8_t sequence; }; typedef std::map ActiveTxUniverses; typedef std::map TrackedSources; ola::thread::SchedulerInterface *m_ss; const Options m_options; const std::string m_preferred_ip; const ola::acn::CID m_cid; ola::network::Interface m_interface; ola::network::UDPSocket m_socket; // senders RootSender m_root_sender; E131Sender m_e131_sender; // inflators RootInflator m_root_inflator; E131Inflator m_e131_inflator; E131InflatorRev2 m_e131_rev2_inflator; DMPE131Inflator m_dmp_inflator; E131DiscoveryInflator m_discovery_inflator; IncomingUDPTransport m_incoming_udp_transport; ActiveTxUniverses m_tx_universes; uint8_t *m_send_buffer; // Discovery members ola::thread::timeout_id m_discovery_timeout; TrackedSources m_discovered_sources; tx_universe *SetupOutgoingSettings(uint16_t universe); bool PerformDiscoveryHousekeeping(); void NewDiscoveryPage(const HeaderSet &headers, const E131DiscoveryInflator::DiscoveryPage &page); void SendDiscoveryPage(const std::vector &universes, uint8_t page, uint8_t last_page, uint32_t sequence_number); static const uint16_t DEFAULT_PRIORITY = 100; static const uint16_t UNIVERSE_DISCOVERY_INTERVAL = 10000; // milliseconds static const uint16_t DISCOVERY_UNIVERSE_ID = 64214; static const uint16_t DISCOVERY_PAGE_SIZE = 512; DISALLOW_COPY_AND_ASSIGN(E131Node); }; } // namespace acn } // namespace ola #endif // LIBS_ACN_E131NODE_H_ ola-0.10.9/libs/acn/E133StatusInflator.h0000664000175000017500000000472414376533110014472 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133StatusInflator.h * Copyright (C) 2013 Simon Newton */ #ifndef LIBS_ACN_E133STATUSINFLATOR_H_ #define LIBS_ACN_E133STATUSINFLATOR_H_ #include #include #include "ola/Callback.h" #include "ola/acn/ACNVectors.h" #include "ola/e133/E133Enums.h" #include "libs/acn/BaseInflator.h" #include "libs/acn/TransportHeader.h" #include "libs/acn/E133Header.h" namespace ola { namespace acn { class E133StatusInflator: public BaseInflator { public: // These are pointers so the callers don't have to pull in all the headers. typedef ola::Callback4 StatusMessageHandler; E133StatusInflator(); uint32_t Id() const { return ola::acn::VECTOR_FRAMING_STATUS; } // Ownership is transferred. void SetStatusHandler(StatusMessageHandler *handler) { m_handler.reset(handler); } protected: // The 'header' is 0 bytes in length. bool DecodeHeader(HeaderSet*, const uint8_t*, unsigned int, unsigned int *bytes_used) { *bytes_used = 0; return true; } void ResetHeaderField() {} // namespace noop virtual bool HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_len); private: std::auto_ptr m_handler; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_E133STATUSINFLATOR_H_ ola-0.10.9/libs/acn/CIDImpl.cpp0000664000175000017500000001177614376533110012735 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * CIDImpl.cpp * The actual implementation of a CID. The implementation changes based on * which uuid library is installed. * Copyright (C) 2007 Simon Newton */ #include #include #include "libs/acn/CIDImpl.h" namespace ola { namespace acn { using std::string; #ifdef USE_OSSP_UUID CIDImpl::CIDImpl() : m_uuid(NULL) { } CIDImpl::CIDImpl(uuid_t *uuid) : m_uuid(uuid) { } CIDImpl::CIDImpl(const CIDImpl& other) : m_uuid(NULL) { if (other.m_uuid) uuid_clone(other.m_uuid, &m_uuid); } CIDImpl::~CIDImpl() { if (m_uuid) uuid_destroy(m_uuid); } bool CIDImpl::IsNil() const { if (!m_uuid) return true; int result; uuid_isnil(m_uuid, &result); return result; } /** * Pack a CIDImpl into the binary representation */ void CIDImpl::Pack(uint8_t *buffer) const { size_t data_length = CIDImpl_LENGTH; // buffer may not be 4 byte aligned char uid_data[CIDImpl_LENGTH]; void *ptr = static_cast(uid_data); if (m_uuid) { uuid_export(m_uuid, UUID_FMT_BIN, &ptr, &data_length); memcpy(buffer, uid_data, CIDImpl_LENGTH); } else { memset(buffer, 0, CIDImpl_LENGTH); } } CIDImpl& CIDImpl::operator=(const CIDImpl& other) { if (this != &other) { if (m_uuid) uuid_destroy(m_uuid); if (other.m_uuid) uuid_clone(other.m_uuid, &m_uuid); else m_uuid = NULL; } return *this; } bool CIDImpl::operator==(const CIDImpl& c1) const { int result; uuid_compare(m_uuid, c1.m_uuid, &result); return 0 == result; } bool CIDImpl::operator!=(const CIDImpl& c1) const { return !(*this == c1); } bool CIDImpl::operator<(const CIDImpl& c1) const { int result; uuid_compare(m_uuid, c1.m_uuid, &result); return result < 0; } string CIDImpl::ToString() const { char cid[UUID_LEN_STR + 1]; void *str = static_cast(cid); size_t length = UUID_LEN_STR + 1; uuid_export(m_uuid, UUID_FMT_STR, &str, &length); return string(cid); } void CIDImpl::Write(ola::io::OutputBufferInterface *output) const { size_t data_length = CIDImpl_LENGTH; // buffer may not be 4 byte aligned uint8_t uid_data[CIDImpl_LENGTH]; void *ptr = static_cast(uid_data); if (m_uuid) { uuid_export(m_uuid, UUID_FMT_BIN, &ptr, &data_length); } else { memset(ptr, 0, CIDImpl_LENGTH); } output->Write(uid_data, CIDImpl_LENGTH); } CIDImpl* CIDImpl::Generate() { uuid_t *uuid; uuid_create(&uuid); uuid_make(uuid, UUID_MAKE_V4); return new CIDImpl(uuid); } CIDImpl* CIDImpl::FromData(const uint8_t *data) { uuid_t *uuid; uuid_create(&uuid); uuid_import(uuid, UUID_FMT_BIN, data, CIDImpl_LENGTH); return new CIDImpl(uuid); } CIDImpl* CIDImpl::FromString(const string &cid) { uuid_t *uuid; uuid_create(&uuid); uuid_import(uuid, UUID_FMT_STR, cid.data(), cid.length()); return new CIDImpl(uuid); } #else // We're using the e2fs utils uuid library CIDImpl::CIDImpl() { uuid_clear(m_uuid); } CIDImpl::CIDImpl(uuid_t uuid) { uuid_copy(m_uuid, uuid); } CIDImpl::CIDImpl(const CIDImpl& other) { uuid_copy(m_uuid, other.m_uuid); } CIDImpl::~CIDImpl() {} bool CIDImpl::IsNil() const { return uuid_is_null(m_uuid); } void CIDImpl::Pack(uint8_t *buf) const { memcpy(buf, m_uuid, CIDImpl_LENGTH); } void CIDImpl::Write(ola::io::OutputBufferInterface *output) const { output->Write(m_uuid, CIDImpl_LENGTH); } CIDImpl& CIDImpl::operator=(const CIDImpl& other) { if (this != &other) { uuid_copy(m_uuid, other.m_uuid); } return *this; } bool CIDImpl::operator==(const CIDImpl& c1) const { return !uuid_compare(m_uuid, c1.m_uuid); } bool CIDImpl::operator!=(const CIDImpl& c1) const { return uuid_compare(m_uuid, c1.m_uuid); } bool CIDImpl::operator<(const CIDImpl& c1) const { return uuid_compare(m_uuid, c1.m_uuid) < 0; } string CIDImpl::ToString() const { char str[37]; uuid_unparse(m_uuid, str); return string(str); } CIDImpl* CIDImpl::Generate() { uuid_t uuid; uuid_generate(uuid); return new CIDImpl(uuid); } CIDImpl* CIDImpl::FromData(const uint8_t *data) { uuid_t uuid; uuid_copy(uuid, data); return new CIDImpl(uuid); } CIDImpl* CIDImpl::FromString(const string &cid) { uuid_t uuid; int ret = uuid_parse(cid.data(), uuid); if (ret == -1) uuid_clear(uuid); return new CIDImpl(uuid); } #endif // end the e2fs progs uuid implementation } // namespace acn } // namespace ola ola-0.10.9/libs/acn/BaseInflator.h0000664000175000017500000001052714376533110013523 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * BaseInflator.h * Provides the base class for inflating PDU blocks. * Copyright (C) 2007 Simon Newton * * The BaseInflator takes care of most of the heavy lifting when inflating PDU * blocks. To create a specific Inflator, subclass BaseInflator and implement * the Id() and DecodeHeader() methods. */ #ifndef LIBS_ACN_BASEINFLATOR_H_ #define LIBS_ACN_BASEINFLATOR_H_ #include #include #include "libs/acn/HeaderSet.h" #include "libs/acn/PDU.h" namespace ola { namespace acn { class BaseInflatorTest; /** * The inflator interface. */ class InflatorInterface { public: virtual ~InflatorInterface() {} /* * Return the id for this inflator */ virtual uint32_t Id() const = 0; /* * Parse a block of PDU data */ virtual unsigned int InflatePDUBlock(HeaderSet *headers, const uint8_t *data, unsigned int len) = 0; }; /* * An abstract PDU inflator */ class BaseInflator : public InflatorInterface { friend class BaseInflatorTest; public: explicit BaseInflator(PDU::vector_size v_size = PDU::FOUR_BYTES); virtual ~BaseInflator() {} /* * Add another inflator as a handler. Ownership is not transferred. */ bool AddInflator(InflatorInterface *inflator); /* * Return the inflator used for a particular vector. */ class InflatorInterface *GetInflator(uint32_t vector) const; /* * Parse a block of PDU data */ virtual unsigned int InflatePDUBlock(HeaderSet *headers, const uint8_t *data, unsigned int len); // masks for the flag fields // This indicates a 20 bit length field (default is 12 bits) static const uint8_t LFLAG_MASK = 0x80; // This masks the first 4 bits of the length field static const uint8_t LENGTH_MASK = 0x0F; protected: uint32_t m_last_vector; bool m_vector_set; PDU::vector_size m_vector_size; // size of the vector field // map protos to inflators std::map m_proto_map; // Reset repeated pdu fields virtual void ResetPDUFields(); virtual void ResetHeaderField() = 0; // determine the length of a pdu bool DecodeLength(const uint8_t *data, unsigned int data_length, unsigned int *pdu_length, unsigned int *bytes_used) const; // determine the vector of a pdu bool DecodeVector(uint8_t flags, const uint8_t *data, unsigned int length, uint32_t *vector, unsigned int *bytes_used); // Decode a header block and adds any PduHeaders to the HeaderSet object virtual bool DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int len, unsigned int *bytes_used) = 0; // parse the body of a pdu bool InflatePDU(HeaderSet *headers, uint8_t flags, const uint8_t *data, unsigned int pdu_len); // called after the header is parsed virtual bool PostHeader(uint32_t vector, const HeaderSet &headers); // called in the absence of an inflator to handle the pdu data virtual bool HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_len); }; } // namespace acn } // namespace ola #endif // LIBS_ACN_BASEINFLATOR_H_ ola-0.10.9/libs/acn/E131Node.cpp0000664000175000017500000003551314376533110012726 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131Node.cpp * A E1.31 node * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/network/InterfacePicker.h" #include "ola/stl/STLUtils.h" #include "libs/acn/E131Node.h" namespace ola { namespace acn { using ola::Callback0; using ola::DmxBuffer; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::network::HostToNetwork; using std::auto_ptr; using std::map; using std::string; using std::set; using std::vector; class TrackedSource { public: TrackedSource() : clean_counter(0), current_sequence_number(0), total_pages(0) { } IPV4Address ip_address; string source_name; set universes; uint8_t clean_counter; void NewPage(uint8_t page_number, uint8_t last_page, uint32_t sequence_number, const vector &universes); private: uint32_t current_sequence_number; uint16_t total_pages; set received_pages; set new_universes; }; void TrackedSource::NewPage(uint8_t page_number, uint8_t last_page, uint32_t sequence_number, const vector &rx_universes) { clean_counter = 0; // This is broken because we don't actually get a sequence number in the // packet yet. // TODO(simon): Get the draft updated and fix this. if (sequence_number != current_sequence_number || total_pages != last_page) { current_sequence_number = sequence_number; total_pages = last_page; received_pages.clear(); new_universes.clear(); } received_pages.insert(page_number); std::copy(rx_universes.begin(), rx_universes.end(), std::inserter(new_universes, new_universes.end())); uint8_t expected_page = 0; set::const_iterator iter = received_pages.begin(); for (; iter != received_pages.end(); ++iter) { if (*iter != expected_page) return; expected_page++; } if (expected_page == total_pages + 1) { universes = new_universes; received_pages.clear(); new_universes.clear(); total_pages = 0; } } E131Node::E131Node(ola::thread::SchedulerInterface *ss, const string &ip_address, const Options &options, const ola::acn::CID &cid) : m_ss(ss), m_options(options), m_preferred_ip(ip_address), m_cid(cid), m_root_sender(m_cid), m_e131_sender(&m_socket, &m_root_sender), m_dmp_inflator(options.ignore_preview), m_discovery_inflator(NewCallback(this, &E131Node::NewDiscoveryPage)), m_incoming_udp_transport(&m_socket, &m_root_inflator), m_send_buffer(NULL), m_discovery_timeout(ola::thread::INVALID_TIMEOUT) { if (!m_options.use_rev2) { // Allocate a buffer for the dmx data + start code m_send_buffer = new uint8_t[DMX_UNIVERSE_SIZE + 1]; m_send_buffer[0] = 0; // start code is 0 } // setup all the inflators m_root_inflator.AddInflator(&m_e131_inflator); m_root_inflator.AddInflator(&m_e131_rev2_inflator); m_e131_inflator.AddInflator(&m_dmp_inflator); m_e131_inflator.AddInflator(&m_discovery_inflator); m_e131_rev2_inflator.AddInflator(&m_dmp_inflator); } /* * Cleanup */ E131Node::~E131Node() { // remove handlers for all universes. This also leaves the multicast groups. vector universes; m_dmp_inflator.RegisteredUniverses(&universes); vector::const_iterator iter = universes.begin(); for (; iter != universes.end(); ++iter) { RemoveHandler(*iter); } Stop(); if (m_send_buffer) delete[] m_send_buffer; STLDeleteValues(&m_discovered_sources); } bool E131Node::Start() { auto_ptr picker( ola::network::InterfacePicker::NewPicker()); if (!picker->ChooseInterface(&m_interface, m_preferred_ip)) { OLA_INFO << "Failed to find an interface"; return false; } if (!m_socket.Init()) { return false; } if (!m_socket.Bind( IPV4SocketAddress(IPV4Address::WildCard(), m_options.port))) return false; if (!m_socket.EnableBroadcast()) return false; m_socket.SetTos(m_options.dscp); m_socket.SetMulticastInterface(m_interface.ip_address); m_socket.SetOnData(NewCallback(&m_incoming_udp_transport, &IncomingUDPTransport::Receive)); if (m_options.enable_draft_discovery) { IPV4Address addr; m_e131_sender.UniverseIP(DISCOVERY_UNIVERSE_ID, &addr); if (!m_socket.JoinMulticast(m_interface.ip_address, addr)) { OLA_WARN << "Failed to join multicast group " << addr; } m_discovery_timeout = m_ss->RegisterRepeatingTimeout( UNIVERSE_DISCOVERY_INTERVAL, ola::NewCallback(this, &E131Node::PerformDiscoveryHousekeeping)); } return true; } bool E131Node::Stop() { m_ss->RemoveTimeout(m_discovery_timeout); m_discovery_timeout = ola::thread::INVALID_TIMEOUT; return true; } bool E131Node::SetSourceName(uint16_t universe, const string &source) { ActiveTxUniverses::iterator iter = m_tx_universes.find(universe); if (iter == m_tx_universes.end()) { tx_universe *settings = SetupOutgoingSettings(universe); settings->source = source; } else { iter->second.source = source; } return true; } bool E131Node::StartStream(uint16_t universe) { ActiveTxUniverses::iterator iter = m_tx_universes.find(universe); if (iter == m_tx_universes.end()) { SetupOutgoingSettings(universe); } else { OLA_WARN << "Trying to StartStream on universe " << universe << " which " << "is already started"; return false; } return true; } bool E131Node::TerminateStream(uint16_t universe, uint8_t priority) { // The standard says to send this 3 times for (unsigned int i = 0; i < 3; i++) { SendStreamTerminated(universe, DmxBuffer(), priority); } STLRemove(&m_tx_universes, universe); return true; } bool E131Node::SendDMX(uint16_t universe, const ola::DmxBuffer &buffer, uint8_t priority, bool preview) { return SendDMXWithSequenceOffset(universe, buffer, 0, priority, preview); } bool E131Node::SendDMXWithSequenceOffset(uint16_t universe, const ola::DmxBuffer &buffer, int8_t sequence_offset, uint8_t priority, bool preview) { ActiveTxUniverses::iterator iter = m_tx_universes.find(universe); tx_universe *settings; if (iter == m_tx_universes.end()) { settings = SetupOutgoingSettings(universe); } else { settings = &iter->second; } const uint8_t *dmp_data; unsigned int dmp_data_length; if (m_options.use_rev2) { dmp_data = buffer.GetRaw(); dmp_data_length = buffer.Size(); } else { unsigned int data_size = DMX_UNIVERSE_SIZE; buffer.Get(m_send_buffer + 1, &data_size); dmp_data = m_send_buffer; dmp_data_length = data_size + 1; } TwoByteRangeDMPAddress range_addr(0, 1, (uint16_t) dmp_data_length); DMPAddressData range_chunk(&range_addr, dmp_data, dmp_data_length); vector > ranged_chunks; ranged_chunks.push_back(range_chunk); const DMPPDU *pdu = NewRangeDMPSetProperty(true, false, ranged_chunks); E131Header header(settings->source, priority, static_cast(settings->sequence + sequence_offset), universe, preview, // preview false, // terminated m_options.use_rev2); bool result = m_e131_sender.SendDMP(header, pdu); if (result && !sequence_offset) settings->sequence++; delete pdu; return result; } bool E131Node::SendStreamTerminated(uint16_t universe, const ola::DmxBuffer &buffer, uint8_t priority) { ActiveTxUniverses::iterator iter = m_tx_universes.find(universe); string source_name; uint8_t sequence_number; if (iter == m_tx_universes.end()) { source_name = m_options.source_name; sequence_number = 0; } else { source_name = iter->second.source; sequence_number = iter->second.sequence; } unsigned int data_size = DMX_UNIVERSE_SIZE; buffer.Get(m_send_buffer + 1, &data_size); data_size++; TwoByteRangeDMPAddress range_addr(0, 1, (uint16_t) data_size); DMPAddressData range_chunk( &range_addr, m_send_buffer, data_size); vector > ranged_chunks; ranged_chunks.push_back(range_chunk); const DMPPDU *pdu = NewRangeDMPSetProperty( true, false, ranged_chunks); E131Header header(source_name, priority, sequence_number, universe, false, // preview true, // terminated false); bool result = m_e131_sender.SendDMP(header, pdu); // only update if we were previously tracking this universe if (result && iter != m_tx_universes.end()) iter->second.sequence++; delete pdu; return result; } bool E131Node::SetHandler(uint16_t universe, DmxBuffer *buffer, uint8_t *priority, Callback0 *closure) { IPV4Address addr; if (!m_e131_sender.UniverseIP(universe, &addr)) { OLA_WARN << "Unable to determine multicast group for universe " << universe; return false; } if (!m_socket.JoinMulticast(m_interface.ip_address, addr)) { OLA_WARN << "Failed to join multicast group " << addr; return false; } return m_dmp_inflator.SetHandler(universe, buffer, priority, closure); } bool E131Node::RemoveHandler(uint16_t universe) { IPV4Address addr; if (!m_e131_sender.UniverseIP(universe, &addr)) { OLA_WARN << "Unable to determine multicast group for universe " << universe; return false; } if (!m_socket.LeaveMulticast(m_interface.ip_address, addr)) { OLA_WARN << "Failed to leave multicast group " << addr; return false; } return m_dmp_inflator.RemoveHandler(universe); } void E131Node::GetKnownControllers(std::vector *controllers) { TrackedSources::const_iterator iter = m_discovered_sources.begin(); for (; iter != m_discovered_sources.end(); ++iter) { controllers->push_back(KnownController()); KnownController &controller = controllers->back(); controller.cid = iter->first; controller.ip_address = iter->second->ip_address; controller.source_name = iter->second->source_name; controller.universes = iter->second->universes; } } /* * Create a settings entry for an outgoing universe */ E131Node::tx_universe *E131Node::SetupOutgoingSettings(uint16_t universe) { tx_universe settings; settings.source = m_options.source_name; settings.sequence = 0; ActiveTxUniverses::iterator iter = m_tx_universes.insert(std::make_pair(universe, settings)).first; return &iter->second; } bool E131Node::PerformDiscoveryHousekeeping() { // Send the Universe Discovery packets. vector universes; STLKeys(m_tx_universes, &universes); uint8_t last_page = static_cast( universes.size() / DISCOVERY_PAGE_SIZE); uint32_t sequence_number = 0; for (uint8_t i = 0; i <= last_page; i++) { SendDiscoveryPage(universes, i, last_page, sequence_number); } // Delete any sources that we haven't heard from in 2 x // UNIVERSE_DISCOVERY_INTERVAL. TrackedSources::iterator iter = m_discovered_sources.begin(); while (iter != m_discovered_sources.end()) { if (iter->second->clean_counter >= 2) { delete iter->second; OLA_INFO << "Removing " << iter->first.ToString() << " due to inactivity"; m_discovered_sources.erase(iter++); } else { iter->second->clean_counter++; iter++; } } return true; } void E131Node::NewDiscoveryPage( const HeaderSet &headers, const E131DiscoveryInflator::DiscoveryPage &page) { if (!m_options.enable_draft_discovery) { return; } TrackedSources::iterator iter = STLLookupOrInsertNull( &m_discovered_sources, headers.GetRootHeader().GetCid()); if (!iter->second) { iter->second = new TrackedSource(); iter->second->ip_address = headers.GetTransportHeader().Source().Host(); iter->second->source_name = headers.GetE131Header().Source(); } TrackedSource *source = iter->second; if (source->ip_address != headers.GetTransportHeader().Source().Host()) { OLA_INFO << "CID " << headers.GetRootHeader().GetCid().ToString() << " changed from " << source->ip_address << " to " << headers.GetTransportHeader().Source().Host(); source->ip_address = headers.GetTransportHeader().Source().Host(); } source->source_name = headers.GetE131Header().Source(); source->NewPage(page.page_number, page.last_page, page.page_sequence, page.universes); } void E131Node::SendDiscoveryPage(const std::vector &universes, uint8_t this_page, uint8_t last_page, OLA_UNUSED uint32_t sequence_number) { uint16_t in_this_page = static_cast(this_page == last_page ? universes.size() % DISCOVERY_PAGE_SIZE : DISCOVERY_PAGE_SIZE); uint16_t *page_data = new uint16_t[in_this_page + 1]; page_data[0] = HostToNetwork( static_cast(this_page << 8 | last_page)); for (unsigned int i = 0; i < in_this_page; i++) { page_data[i + 1] = HostToNetwork( universes[this_page * DISCOVERY_PAGE_SIZE + i]); } E131Header header(m_options.source_name, 0, 0, DISCOVERY_UNIVERSE_ID); m_e131_sender.SendDiscoveryData( header, reinterpret_cast(page_data), (in_this_page + 1) * 2); delete[] page_data; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/DMPAddress.h0000664000175000017500000001661314376533110013102 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPAddress.h * Defines the DMP property address types * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_DMPADDRESS_H_ #define LIBS_ACN_DMPADDRESS_H_ #include #include #include "ola/io/OutputStream.h" #include "ola/network/NetworkUtils.h" namespace ola { namespace acn { typedef enum { ONE_BYTES = 0x00, TWO_BYTES = 0x01, FOUR_BYTES = 0x02, RES_BYTES = 0x03 } dmp_address_size; typedef enum { NON_RANGE = 0x00, RANGE_SINGLE = 0x01, RANGE_EQUAL = 0x02, RANGE_MIXED = 0x03, } dmp_address_type; static const unsigned int MAX_TWO_BYTE = 0xffff; static const unsigned int MAX_ONE_BYTE = 0xff; /* * Return the dmp_address_size that corresponds to a type */ template dmp_address_size TypeToDMPSize() { switch (sizeof(type)) { case 1: return ONE_BYTES; case 2: return TWO_BYTES; case 4: return FOUR_BYTES; default: return RES_BYTES; } } /* * Return the number of bytes that correspond to a DMPType */ unsigned int DMPSizeToByteSize(dmp_address_size size); /* * The Base DMPAddress class. * The addresses represented by this class may be actual or virtual & relative * or absolute, ranged or non-ranged. */ class BaseDMPAddress { public: BaseDMPAddress() {} virtual ~BaseDMPAddress() {} // The start address virtual unsigned int Start() const = 0; // The increment virtual unsigned int Increment() const = 0; // The number of properties referenced virtual unsigned int Number() const = 0; // Size of this address structure virtual unsigned int Size() const { return (IsRange() ? 3 : 1) * BaseSize(); } virtual dmp_address_size AddressSize() const = 0; // Pack this address into memory virtual bool Pack(uint8_t *data, unsigned int *length) const = 0; // Write this address to an OutputStream virtual void Write(ola::io::OutputStream *stream) const = 0; // True if this is a range address. virtual bool IsRange() const = 0; protected: virtual unsigned int BaseSize() const = 0; }; /* * These type of addresses only reference one property. */ template class DMPAddress: public BaseDMPAddress { public: explicit DMPAddress(type start): BaseDMPAddress(), m_start(start) {} unsigned int Start() const { return m_start; } unsigned int Increment() const { return 0; } unsigned int Number() const { return 1; } dmp_address_size AddressSize() const { return TypeToDMPSize(); } bool Pack(uint8_t *data, unsigned int *length) const { if (*length < Size()) { *length = 0; return false; } type field = ola::network::HostToNetwork(m_start); memcpy(data, &field, BaseSize()); *length = Size(); return true; } void Write(ola::io::OutputStream *stream) const { *stream << ola::network::HostToNetwork(m_start); } bool IsRange() const { return false; } protected: unsigned int BaseSize() const { return sizeof(type); } private: type m_start; }; typedef DMPAddress OneByteDMPAddress; typedef DMPAddress TwoByteDMPAddress; typedef DMPAddress FourByteDMPAddress; /* * Create a new single address */ const BaseDMPAddress *NewSingleAddress(unsigned int value); /* * These type of addresses reference multiple properties. */ template class RangeDMPAddress: public BaseDMPAddress { public: RangeDMPAddress(type start, type increment, type number): BaseDMPAddress(), m_start(start), m_increment(increment), m_number(number) {} unsigned int Start() const { return m_start; } unsigned int Increment() const { return m_increment; } unsigned int Number() const { return m_number; } dmp_address_size AddressSize() const { return TypeToDMPSize(); } bool Pack(uint8_t *data, unsigned int *length) const { if (*length < Size()) { *length = 0; return false; } type field[3]; field[0] = ola::network::HostToNetwork(m_start); field[1] = ola::network::HostToNetwork(m_increment); field[2] = ola::network::HostToNetwork(m_number); memcpy(data, &field, Size()); *length = Size(); return true; } void Write(ola::io::OutputStream *stream) const { type field[3]; field[0] = ola::network::HostToNetwork(m_start); field[1] = ola::network::HostToNetwork(m_increment); field[2] = ola::network::HostToNetwork(m_number); stream->Write(reinterpret_cast(&field), Size()); } bool IsRange() const { return true; } protected: unsigned int BaseSize() const { return sizeof(type); } private: type m_start, m_increment, m_number; }; typedef RangeDMPAddress OneByteRangeDMPAddress; typedef RangeDMPAddress TwoByteRangeDMPAddress; typedef RangeDMPAddress FourByteRangeDMPAddress; /* * Create a new range address. */ const BaseDMPAddress *NewRangeAddress(unsigned int value, unsigned int increment, unsigned int number); /* * Decode an Address */ const BaseDMPAddress *DecodeAddress(dmp_address_size size, dmp_address_type type, const uint8_t *data, unsigned int *length); /* * A DMPAddressData object, this hold an address/data pair * @param type either DMPAddress<> or RangeDMPAddress<> */ template class DMPAddressData { public: DMPAddressData(const type *address, const uint8_t *data, unsigned int length): m_address(address), m_data(data), m_length(length) {} const type *Address() const { return m_address; } const uint8_t *Data() const { return m_data; } unsigned int Size() const { return m_address->Size() + m_length; } // Pack the data into a buffer bool Pack(uint8_t *data, unsigned int *length) const { if (!m_data) return false; unsigned int total = *length; if (!m_address->Pack(data, length)) { length = 0; return false; } if (total - *length < m_length) { length = 0; return false; } memcpy(data + *length, m_data, m_length); *length += m_length; return true; } void Write(ola::io::OutputStream *stream) const { if (!m_data) return; m_address->Write(stream); stream->Write(m_data, m_length); } private: const type *m_address; const uint8_t *m_data; unsigned int m_length; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_DMPADDRESS_H_ ola-0.10.9/libs/acn/RootInflator.h0000664000175000017500000000452614376533110013576 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RootInflator.h * Interface for the RootInflator class. * Copyright (C) 2009 Simon Newton */ #ifndef LIBS_ACN_ROOTINFLATOR_H_ #define LIBS_ACN_ROOTINFLATOR_H_ #include #include #include #include "ola/acn/ACNVectors.h" #include "libs/acn/BaseInflator.h" namespace ola { namespace acn { class NullInflator : public InflatorInterface { public: uint32_t Id() const { return ola::acn::VECTOR_ROOT_NULL; } unsigned int InflatePDUBlock(OLA_UNUSED HeaderSet *headers, OLA_UNUSED const uint8_t *data, unsigned int len) { if (len) { OLA_WARN << "VECTOR_ROOT_NULL contained data of size " << len; } return 0; } }; class RootInflator: public BaseInflator { public: typedef ola::Callback1 OnDataCallback; /** * The OnDataCallback is a hook for the health checking mechanism */ explicit RootInflator(OnDataCallback *on_data = NULL) : BaseInflator(), m_on_data(on_data) { AddInflator(&m_null_inflator); } uint32_t Id() const { return 0; } // no effect for the root inflator protected: // Decode a header block and adds any PduHeaders to the HeaderSet object bool DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int len, unsigned int *bytes_used); void ResetHeaderField(); bool PostHeader(uint32_t vector, const HeaderSet &headers); private : NullInflator m_null_inflator; RootHeader m_last_hdr; std::auto_ptr m_on_data; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_ROOTINFLATOR_H_ ola-0.10.9/libs/acn/Transport.h0000664000175000017500000000263514376533110013147 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Transport.h * Interface for the Transport class * Copyright (C) 2012 Simon Newton */ #ifndef LIBS_ACN_TRANSPORT_H_ #define LIBS_ACN_TRANSPORT_H_ #include #include "ola/acn/ACNPort.h" #include "ola/network/Interface.h" #include "ola/network/Socket.h" #include "libs/acn/PDU.h" namespace ola { namespace acn { /* * The interface that all Outgoing (sending) Transports inherit from. This * allows us to support several different protocol transports. */ class OutgoingTransport { public: OutgoingTransport() {} virtual ~OutgoingTransport() {} virtual bool Send(const PDUBlock &pdu_block) = 0; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_TRANSPORT_H_ ola-0.10.9/libs/acn/RDMPDUTest.cpp0000664000175000017500000000353714376533110013343 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RDMPDUTest.cpp * Test fixture for the RDMPDU class * Copyright (C) 2012 Simon Newton */ #include #include #include #include "ola/Logging.h" #include "ola/io/IOStack.h" #include "ola/network/NetworkUtils.h" #include "ola/testing/TestUtils.h" #include "libs/acn/PDUTestCommon.h" #include "libs/acn/RDMPDU.h" namespace ola { namespace acn { using ola::io::IOStack; class RDMPDUTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RDMPDUTest); CPPUNIT_TEST(testPrepend); CPPUNIT_TEST_SUITE_END(); public: void testPrepend(); private: static const unsigned int TEST_VECTOR; }; CPPUNIT_TEST_SUITE_REGISTRATION(RDMPDUTest); const unsigned int RDMPDUTest::TEST_VECTOR = 0xcc; void RDMPDUTest::testPrepend() { IOStack stack; RDMPDU::PrependPDU(&stack); unsigned int length = stack.Size(); uint8_t *buffer = new uint8_t[length]; OLA_ASSERT(stack.Read(buffer, length)); const uint8_t expected_data[] = {0x70, 3, TEST_VECTOR}; OLA_ASSERT_DATA_EQUALS(expected_data, sizeof(expected_data), buffer, length); delete[] buffer; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/BaseInflator.cpp0000664000175000017500000001736514376533110014065 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * BaseInflator.cpp * The BaseInflator, other Inflators inherit from this one. * Copyright (C) 2007 Simon Newton */ #include "libs/acn/BaseInflator.h" #include #include #include "ola/Logging.h" #include "ola/stl/STLUtils.h" #include "ola/network/NetworkUtils.h" #include "ola/util/Utils.h" namespace ola { namespace acn { using ola::network::NetworkToHost; using ola::utils::JoinUInt8; /* * Setup the base inflator */ BaseInflator::BaseInflator(PDU::vector_size v_size) : m_last_vector(0), m_vector_set(false), m_vector_size(v_size) { } /* * Set the inflator for a particular protocol * @param inflator a inflator * @return true if added, false if an inflator with this id already exists. */ bool BaseInflator::AddInflator(InflatorInterface *inflator) { return STLInsertIfNotPresent(&m_proto_map, inflator->Id(), inflator); } /* * Get the current inflator for a protocol * @param proto the vector ID * @return the inflator for this vector, or NULL if there isn't one set. */ InflatorInterface *BaseInflator::GetInflator(uint32_t vector) const { return STLFindOrNull(m_proto_map, vector); } /* * Parse a block of PDUs * @param headers the HeaderSet for this PDU * @param data pointer to the data * @param length length of the data * @returns the amount of data used */ unsigned int BaseInflator::InflatePDUBlock(HeaderSet *headers, const uint8_t *data, unsigned int length) { unsigned int offset = 0; ResetPDUFields(); if (length == 0) { return 0; } do { unsigned int bytes_used = 0; unsigned int pdu_length = 0; if (!DecodeLength(data + offset, length - offset, &pdu_length, &bytes_used)) { return offset; } if (offset + pdu_length <= length) { InflatePDU(headers, data[offset], data + offset + bytes_used, pdu_length - bytes_used); } offset += pdu_length; } while (offset < length); return std::min(offset, length); } /* * Reset the pdu fields */ void BaseInflator::ResetPDUFields() { m_vector_set = false; ResetHeaderField(); } /* * Fetch the length from a pdu header * @param data pointer to the head of the PDU * @param length length of the PDU data * @param pdu_length set to the length of the PDU * @param bytes_used set to the number of bytes used for the length field * @return true if everything worked, false if invalid data was found */ bool BaseInflator::DecodeLength(const uint8_t *data, unsigned int length, unsigned int *pdu_length, unsigned int *bytes_used) const { uint8_t flags = data[0]; if (!length) { *bytes_used = 0; *pdu_length = 0; return false; } if (flags & LFLAG_MASK) { if (length < 3) { OLA_WARN << "PDU length " << length << " < 3 and the LENGTH bit is set"; return false; } *bytes_used = 3; *pdu_length = JoinUInt8(0, (data[0] & LENGTH_MASK), data[1], data[2]); } else { if (length < 2) { OLA_WARN << "PDU length " << length << " < 2"; return false; } *bytes_used = 2; *pdu_length = JoinUInt8((data[0] & LENGTH_MASK), data[1]); } if (*pdu_length < *bytes_used) { OLA_WARN << "PDU length was set to " << *pdu_length << " but " << *bytes_used << " bytes were used in the header"; *bytes_used = 0; return false; } return true; } /* * @brief Decode the vector field * @param flags the PDU flags * @param data pointer to the pdu data * @param length length of the data * @param vector the result of the vector * @param bytes_used the number of bytes consumed */ bool BaseInflator::DecodeVector(uint8_t flags, const uint8_t *data, unsigned int length, uint32_t *vector, unsigned int *bytes_used) { if (flags & PDU::VFLAG_MASK) { if ((unsigned int) m_vector_size > length) { *vector = 0; *bytes_used = 0; return false; } switch (m_vector_size) { case PDU::ONE_BYTE: *vector = *data; break; case PDU::TWO_BYTES: *vector = JoinUInt8(data[0], data[1]); break; case PDU::FOUR_BYTES: // careful: we can't cast to a uint32 because this isn't word aligned *vector = JoinUInt8(data[0], data[1], data[2], data[3]); break; default: OLA_WARN << "Unknown vector size " << m_vector_size; return false; } m_vector_set = true; *bytes_used = m_vector_size; m_last_vector = *vector; } else { *bytes_used = 0; if (m_vector_set) { *vector = m_last_vector; } else { *vector = 0; *bytes_used = 0; OLA_WARN << "Vector not set and no field to inherit from"; return false; } } return true; } /* * @brief Parse a generic PDU structure * @param headers a reference to the header set * @param flags the flag field * @param data pointer to the vector field * @param pdu_len length of the PDU * @return true if we inflated without errors */ bool BaseInflator::InflatePDU(HeaderSet *headers, uint8_t flags, const uint8_t *data, unsigned int pdu_len) { uint32_t vector; unsigned int data_offset, header_bytes_used; bool result; if (!DecodeVector(flags, data, pdu_len, &vector, &data_offset)) { return false; } if (flags & PDU::HFLAG_MASK) { result = DecodeHeader(headers, data + data_offset, pdu_len - data_offset, &header_bytes_used); } else { result = DecodeHeader(headers, NULL, 0, &header_bytes_used); header_bytes_used = 0; } if (!result) { return false; } if (!PostHeader(vector, *headers)) { return true; } // TODO(simon): handle the crazy DFLAG here data_offset += header_bytes_used; InflatorInterface *inflator = STLFindOrNull(m_proto_map, vector); if (inflator) { return inflator->InflatePDUBlock(headers, data + data_offset, pdu_len - data_offset); } else { return HandlePDUData(vector, *headers, data + data_offset, pdu_len - data_offset); } } /* * @brief The Post header hook. * * This is called once the header has been decoded but before either the next * inflator or handle_data is called. * @return false will cease processing this PDU */ bool BaseInflator::PostHeader(OLA_UNUSED uint32_t, OLA_UNUSED const HeaderSet &headers) { return true; } /* * @brief The base handle data method - does nothing */ bool BaseInflator::HandlePDUData(uint32_t vector, OLA_UNUSED const HeaderSet &headers, const uint8_t *, unsigned int) { OLA_WARN << "In BaseInflator::HandlePDUData, someone forgot to add" << " a handler, vector id " << vector; return false; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/RootSenderTest.cpp0000664000175000017500000001051114376533110014422 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RootSenderTest.cpp * Test fixture for the RootSender class * Copyright (C) 2005 Simon Newton */ #include #include #include "ola/io/SelectServer.h" #include "ola/network/InterfacePicker.h" #include "ola/network/NetworkUtils.h" #include "ola/network/Socket.h" #include "libs/acn/PDUTestCommon.h" #include "libs/acn/RootInflator.h" #include "libs/acn/RootSender.h" #include "libs/acn/UDPTransport.h" #include "ola/testing/TestUtils.h" namespace ola { namespace acn { using ola::acn::CID; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; class RootSenderTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RootSenderTest); CPPUNIT_TEST(testRootSender); CPPUNIT_TEST(testRootSenderWithCustomCID); CPPUNIT_TEST_SUITE_END(); public: RootSenderTest(): TestFixture(), m_ss(NULL) {} void testRootSender(); void testRootSenderWithCustomCID(); void setUp(); void tearDown(); void Stop(); void FatalStop() { OLA_ASSERT(false); } private: void testRootSenderWithCIDs(const CID &root_cid, const CID &send_cid); ola::io::SelectServer *m_ss; static const int ABORT_TIMEOUT_IN_MS = 1000; }; CPPUNIT_TEST_SUITE_REGISTRATION(RootSenderTest); void RootSenderTest::setUp() { m_ss = new ola::io::SelectServer(); } void RootSenderTest::tearDown() { delete m_ss; } void RootSenderTest::Stop() { if (m_ss) m_ss->Terminate(); } /* * Test the RootSender */ void RootSenderTest::testRootSender() { CID cid = CID::Generate(); testRootSenderWithCIDs(cid, cid); } /* * Test the method to send using a custom cid works */ void RootSenderTest::testRootSenderWithCustomCID() { CID cid = CID::Generate(); CID send_cid = CID::Generate(); testRootSenderWithCIDs(cid, send_cid); } void RootSenderTest::testRootSenderWithCIDs(const CID &root_cid, const CID &send_cid) { std::auto_ptr > stop_closure( NewCallback(this, &RootSenderTest::Stop)); // inflators MockInflator inflator(send_cid, stop_closure.get()); RootInflator root_inflator; OLA_ASSERT(root_inflator.AddInflator(&inflator)); // sender RootSender root_sender(root_cid); // setup the socket ola::network::UDPSocket socket; OLA_ASSERT(socket.Init()); OLA_ASSERT( socket.Bind(IPV4SocketAddress(IPV4Address::Loopback(), 0))); OLA_ASSERT(socket.EnableBroadcast()); IncomingUDPTransport incoming_udp_transport(&socket, &root_inflator); socket.SetOnData(NewCallback(&incoming_udp_transport, &IncomingUDPTransport::Receive)); OLA_ASSERT(m_ss->AddReadDescriptor(&socket)); // Get the port we bound to. IPV4SocketAddress local_address; OLA_ASSERT(socket.GetSocketAddress(&local_address)); OutgoingUDPTransportImpl udp_transport_impl(&socket); OutgoingUDPTransport outgoing_udp_transport(&udp_transport_impl, IPV4Address::Loopback(), local_address.Port()); // now actually send some data MockPDU mock_pdu(4, 8); if (root_cid == send_cid) OLA_ASSERT(root_sender.SendPDU(MockPDU::TEST_VECTOR, mock_pdu, &outgoing_udp_transport)); else OLA_ASSERT(root_sender.SendPDU(MockPDU::TEST_VECTOR, mock_pdu, send_cid, &outgoing_udp_transport)); SingleUseCallback0 *closure = NewSingleCallback(this, &RootSenderTest::FatalStop); m_ss->RegisterSingleTimeout(ABORT_TIMEOUT_IN_MS, closure); m_ss->Run(); } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/e131_loadtest.cpp0000664000175000017500000000431014376533110014046 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * e131_loadtest.cpp * A simple E1.31 load tester * Copyright (C) 2013 Simon Newton */ #include #include #include #include "ola/Callback.h" #include "ola/DmxBuffer.h" #include "ola/Logging.h" #include "ola/base/Flags.h" #include "ola/base/Init.h" #include "ola/io/SelectServer.h" #include "libs/acn/E131Node.h" using ola::DmxBuffer; using ola::io::SelectServer; using ola::acn::E131Node; using ola::NewCallback; using std::min; DEFINE_s_uint32(fps, s, 10, "Frames per second per universe [1 - 40]"); DEFINE_s_uint16(universes, u, 1, "Number of universes to send"); /** * Send N DMX frames using E1.31, where N is given by number_of_universes. */ bool SendFrames(E131Node *node, DmxBuffer *buffer, uint16_t number_of_universes) { for (uint16_t i = 1; i < number_of_universes + 1; i++) { node->SendDMX(i, *buffer); } return true; } int main(int argc, char* argv[]) { ola::AppInit(&argc, argv, "", "Run the E1.31 load test."); if (FLAGS_universes == 0 || FLAGS_fps == 0) return -1; unsigned int fps = min(40u, static_cast(FLAGS_fps)); uint16_t universes = FLAGS_universes; DmxBuffer output; output.Blackout(); SelectServer ss; E131Node node(&ss, "", E131Node::Options()); if (!node.Start()) return -1; ss.AddReadDescriptor(node.GetSocket()); ss.RegisterRepeatingTimeout( 1000 / fps, NewCallback(&SendFrames, &node, &output, universes)); OLA_INFO << "Starting loadtester..."; ss.Run(); } ola-0.10.9/libs/acn/E133Inflator.h0000664000175000017500000000324514376533110013263 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133Inflator.h * Interface for the E133Inflator class. * Copyright (C) 2011 Simon Newton */ #ifndef LIBS_ACN_E133INFLATOR_H_ #define LIBS_ACN_E133INFLATOR_H_ #include "ola/acn/ACNVectors.h" #include "libs/acn/BaseInflator.h" #include "libs/acn/E133Header.h" namespace ola { namespace acn { class E133Inflator: public BaseInflator { friend class E133InflatorTest; public: E133Inflator() : BaseInflator(), m_last_header_valid(false) { } ~E133Inflator() {} uint32_t Id() const { return ola::acn::VECTOR_ROOT_E133; } protected: bool DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int len, unsigned int *bytes_used); void ResetHeaderField() { m_last_header_valid = false; } private: E133Header m_last_header; bool m_last_header_valid; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_E133INFLATOR_H_ ola-0.10.9/libs/acn/CIDImpl.h0000664000175000017500000000413414376533110012370 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * CIDImpl.h * The actual implementation of a CID. The implementation changes based on * which uuid library is installed. * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_CIDIMPL_H_ #define LIBS_ACN_CIDIMPL_H_ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #ifdef HAVE_OSSP_UUID_H #include #else #ifdef HAVE_UUID_UUID_H #include #else #include #endif // HAVE_UUID_UUID_H #endif // HAVE_OSSP_UUID_H #include #include #include "ola/io/OutputBuffer.h" namespace ola { namespace acn { class CIDImpl { public : enum { CIDImpl_LENGTH = 16 }; CIDImpl(); CIDImpl(const CIDImpl& other); ~CIDImpl(); bool IsNil() const; void Pack(uint8_t *buf) const; std::string ToString() const; void Write(ola::io::OutputBufferInterface *output) const; CIDImpl& operator=(const CIDImpl& c1); bool operator==(const CIDImpl& c1) const; bool operator!=(const CIDImpl& c1) const; bool operator<(const CIDImpl& c1) const; static CIDImpl* Generate(); static CIDImpl* FromData(const uint8_t *data); static CIDImpl* FromString(const std::string &cid); private: #ifdef USE_OSSP_UUID uuid_t *m_uuid; explicit CIDImpl(uuid_t *uuid); #else uuid_t m_uuid; explicit CIDImpl(uuid_t uuid); #endif // HAVE_OSSP_UUID }; } // namespace acn } // namespace ola #endif // LIBS_ACN_CIDIMPL_H_ ola-0.10.9/libs/acn/PDU.cpp0000664000175000017500000001227614376533110012140 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PDU.cpp * The base PDU class * Copyright (C) 2007 Simon Newton */ #include "ola/Logging.h" #include "ola/network/NetworkUtils.h" #include "libs/acn/PDU.h" namespace ola { namespace acn { using ola::io::OutputStream; using ola::network::HostToNetwork; /* * Return the length of this PDU * @return length of the pdu */ unsigned int PDU::Size() const { unsigned int length = m_vector_size + HeaderSize() + DataSize(); if (length > TWOB_LENGTH_LIMIT - 2) length += 1; length += 2; return length; } /* * Pack this PDU into a buffer * @param buffer pointer to the buffer * @param length length of the buffer * @return false on error, true otherwise */ bool PDU::Pack(uint8_t *buffer, unsigned int *length) const { unsigned int size = Size(); unsigned int offset = 0; if (*length < size) { OLA_WARN << "PDU Pack: buffer too small, required " << size << ", got " << *length; *length = 0; return false; } if (size <= TWOB_LENGTH_LIMIT) { buffer[0] = (uint8_t) ((size & 0x0f00) >> 8); buffer[1] = (uint8_t) (size & 0xff); } else { buffer[0] = (uint8_t) ((size & 0x0f0000) >> 16); buffer[1] = (uint8_t) ((size & 0xff00) >> 8); buffer[2] = (uint8_t) (size & 0xff); offset += 1; } buffer[0] |= VFLAG_MASK; buffer[0] |= HFLAG_MASK; buffer[0] |= DFLAG_MASK; offset += 2; switch (m_vector_size) { case PDU::ONE_BYTE: buffer[offset++] = (uint8_t) m_vector; break; case PDU::TWO_BYTES: buffer[offset++] = static_cast(0xff & (m_vector >> 8)); buffer[offset++] = static_cast(0xff & m_vector); break; case PDU::FOUR_BYTES: buffer[offset++] = static_cast(0xff & (m_vector >> 24)); buffer[offset++] = static_cast(0xff & (m_vector >> 16)); buffer[offset++] = static_cast(0xff & (m_vector >> 8)); buffer[offset++] = static_cast(0xff & m_vector); break; default: OLA_WARN << "unknown vector size " << m_vector_size; return false; } unsigned int bytes_used = *length - offset; if (!PackHeader(buffer + offset, &bytes_used)) { *length = 0; return false; } offset += bytes_used; bytes_used = *length - offset; if (!PackData(buffer + offset, &bytes_used)) { *length = 0; return false; } offset += bytes_used; *length = offset; return true; } /** * Write this PDU to an OutputStream. */ void PDU::Write(OutputStream *stream) const { unsigned int size = Size(); if (size <= TWOB_LENGTH_LIMIT) { uint16_t flags_and_length = static_cast(size); flags_and_length |= (VFLAG_MASK | HFLAG_MASK | DFLAG_MASK) << 8u; *stream << HostToNetwork(flags_and_length); } else { uint8_t vhl_flags = static_cast((size & 0x0f0000) >> 16); vhl_flags |= VFLAG_MASK | HFLAG_MASK | DFLAG_MASK; *stream << vhl_flags; *stream << (uint8_t) ((size & 0xff00) >> 8); *stream << (uint8_t) (size & 0xff); } switch (m_vector_size) { case PDU::ONE_BYTE: *stream << static_cast(m_vector); break; case PDU::TWO_BYTES: *stream << HostToNetwork(static_cast(m_vector)); break; case PDU::FOUR_BYTES: *stream << HostToNetwork(m_vector); break; } PackHeader(stream); PackData(stream); } /** * Prepend the flags and length to an OutputBufferInterface. */ void PDU::PrependFlagsAndLength(ola::io::OutputBufferInterface *output, uint8_t flags) { PrependFlagsAndLength(output, output->Size(), flags); } /** * Prepend the flags and length to an OutputBufferInterface. */ void PDU::PrependFlagsAndLength(ola::io::OutputBufferInterface *output, unsigned int size, uint8_t flags) { if (size + 2 <= TWOB_LENGTH_LIMIT) { size += 2; uint16_t flags_and_length = static_cast(size); flags_and_length |= static_cast(flags << 8u); flags_and_length = HostToNetwork(flags_and_length); output->Write(reinterpret_cast(&flags_and_length), sizeof(flags_and_length)); } else { size += 3; uint8_t flags_and_length[3]; flags_and_length[0] = static_cast((size & 0x0f0000) >> 16); flags_and_length[0] |= flags; flags_and_length[1] = static_cast((size & 0xff00) >> 8); flags_and_length[2] = static_cast(size & 0xff); output->Write(flags_and_length, sizeof(flags_and_length)); } } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/E133Inflator.cpp0000664000175000017500000000455614376533110013624 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133Inflator.cpp * The Inflator for the E1.33 PDUs * Copyright (C) 2011 Simon Newton */ #include #include "ola/Logging.h" #include "ola/network/NetworkUtils.h" #include "libs/acn/E133Inflator.h" namespace ola { namespace acn { using ola::network::NetworkToHost; /* * Decode the E1.33 headers. If data is null we're expected to use the last * header we got. * @param headers the HeaderSet to add to * @param data a pointer to the data * @param length length of the data * @returns true if successful, false otherwise */ bool E133Inflator::DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int length, unsigned int *bytes_used) { if (data) { // the header bit was set, decode it if (length >= sizeof(E133Header::e133_pdu_header)) { E133Header::e133_pdu_header raw_header; memcpy(&raw_header, data, sizeof(E133Header::e133_pdu_header)); raw_header.source[E133Header::SOURCE_NAME_LEN - 1] = 0x00; E133Header header( raw_header.source, NetworkToHost(raw_header.sequence), NetworkToHost(raw_header.endpoint)); m_last_header = header; m_last_header_valid = true; headers->SetE133Header(header); *bytes_used = sizeof(E133Header::e133_pdu_header); return true; } *bytes_used = 0; return false; } // use the last header if it exists *bytes_used = 0; if (!m_last_header_valid) { OLA_WARN << "Missing E1.33 Header data"; return false; } headers->SetE133Header(m_last_header); return true; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/E133StatusInflator.cpp0000664000175000017500000000345514376533110015025 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133StatusInflator.cpp * The Inflator for the E1.33 Status messages. * Copyright (C) 2013 Simon Newton */ #include #include #include "ola/e133/E133Enums.h" #include "libs/acn/E133StatusInflator.h" namespace ola { namespace acn { using std::string; /** * Create a new E1.33 status inflator */ E133StatusInflator::E133StatusInflator() : BaseInflator(PDU::TWO_BYTES) { } /* * Handle a E1.33 Status PDU. */ bool E133StatusInflator::HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_len) { unsigned int size = std::min( pdu_len, static_cast(ola::e133::MAX_E133_STATUS_STRING_SIZE)); string description(reinterpret_cast(&data[0]), size); m_handler->Run(&headers.GetTransportHeader(), &headers.GetE133Header(), static_cast(vector), description); return true; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/DMPPDUTest.cpp0000664000175000017500000001651614376533110013342 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPPDUTest.cpp * Test fixture for the DMPPDU class * Copyright (C) 2005 Simon Newton */ #include #include #include #include "ola/Logging.h" #include "ola/acn/ACNVectors.h" #include "libs/acn/DMPAddress.h" #include "libs/acn/DMPInflator.h" #include "libs/acn/DMPPDU.h" #include "libs/acn/HeaderSet.h" #include "libs/acn/PDUTestCommon.h" #include "ola/testing/TestUtils.h" namespace ola { namespace acn { using ola::acn::DMP_GET_PROPERTY_VECTOR; using ola::acn::DMP_SET_PROPERTY_VECTOR; using std::vector; class MockDMPInflator: public DMPInflator { public: MockDMPInflator(): DMPInflator(), expected_vector(0), expected_virtual(false), expected_relative(false), expected_type(NON_RANGE), expected_size(RES_BYTES) , expected_start(0), expected_increment(0), expected_number(0) {} ~MockDMPInflator() {} unsigned int expected_length; unsigned int expected_data_length; unsigned int expected_vector; bool expected_virtual; bool expected_relative; dmp_address_type expected_type; dmp_address_size expected_size; unsigned int expected_start; unsigned int expected_increment; unsigned int expected_number; protected: bool HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_len); }; class DMPPDUTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DMPPDUTest); CPPUNIT_TEST(testGetProperty); CPPUNIT_TEST(testSetProperty); CPPUNIT_TEST_SUITE_END(); public: void testGetProperty(); void testSetProperty(); private: void PackPduAndInflate(const DMPPDU *pdu); MockDMPInflator m_inflator; }; CPPUNIT_TEST_SUITE_REGISTRATION(DMPPDUTest); /* * Verify a PDU is what we expected */ bool MockDMPInflator::HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_len) { DMPHeader header = headers.GetDMPHeader(); OLA_ASSERT_EQ(expected_vector, vector); OLA_ASSERT_EQ(expected_virtual, header.IsVirtual()); OLA_ASSERT_EQ(expected_relative, header.IsRelative()); OLA_ASSERT(expected_type == header.Type()); OLA_ASSERT(expected_size == header.Size()); if (vector == DMP_GET_PROPERTY_VECTOR || vector == DMP_SET_PROPERTY_VECTOR) { unsigned int length = pdu_len; const BaseDMPAddress *addr = DecodeAddress(header.Size(), header.Type(), data, &length); OLA_ASSERT(addr); OLA_ASSERT_EQ(expected_start, addr->Start()); OLA_ASSERT_EQ(expected_increment, addr->Increment()); OLA_ASSERT_EQ(expected_number, addr->Number()); delete addr; } return true; } /* * Pack a PDU and check it inflates correctly. */ void DMPPDUTest::PackPduAndInflate(const DMPPDU *pdu) { unsigned int size = pdu->Size() + 10; // overallocate to catch overflows uint8_t *data = new uint8_t[size]; OLA_ASSERT(pdu->Pack(data, &size)); OLA_ASSERT_EQ(pdu->Size(), size); HeaderSet headers; m_inflator.InflatePDUBlock(&headers, data, size); delete[] data; } /* * Test that GetProperty PDUs can be constructed */ void DMPPDUTest::testGetProperty() { m_inflator.expected_vector = DMP_GET_PROPERTY_VECTOR; m_inflator.expected_type = NON_RANGE; m_inflator.expected_size = ONE_BYTES; m_inflator.expected_virtual = false; m_inflator.expected_relative = true; m_inflator.expected_start = 10; m_inflator.expected_increment = 0; m_inflator.expected_number = 1; // Non-ranged GetProperty PDUs const DMPPDU *pdu = NewDMPGetProperty(false, true, 10); OLA_ASSERT(pdu); OLA_ASSERT_EQ((unsigned int) 5, pdu->Size()); PackPduAndInflate(pdu); delete pdu; m_inflator.expected_start = 1024; pdu = NewDMPGetProperty(true, true, 1024); OLA_ASSERT(pdu); OLA_ASSERT_EQ((unsigned int) 6, pdu->Size()); m_inflator.expected_size = TWO_BYTES; m_inflator.expected_virtual = true; PackPduAndInflate(pdu); delete pdu; // Ranged GetProperty PDUs m_inflator.expected_start = 10; m_inflator.expected_increment = 1; m_inflator.expected_number = 20; m_inflator.expected_type = RANGE_SINGLE; pdu = NewRangeDMPGetProperty(true, false, 10, 1, 20); OLA_ASSERT(pdu); OLA_ASSERT_EQ((unsigned int) 7, pdu->Size()); m_inflator.expected_size = ONE_BYTES; m_inflator.expected_relative = false; PackPduAndInflate(pdu); delete pdu; m_inflator.expected_start = 10; m_inflator.expected_increment = 1; m_inflator.expected_number = 1024; pdu = NewRangeDMPGetProperty(false, false, 10, 1, 1024); OLA_ASSERT(pdu); OLA_ASSERT_EQ((unsigned int) 10, pdu->Size()); m_inflator.expected_size = TWO_BYTES; m_inflator.expected_virtual = false; PackPduAndInflate(pdu); delete pdu; } /* * Test that packing a DMPPDU without data works. */ void DMPPDUTest::testSetProperty() { m_inflator.expected_vector = DMP_SET_PROPERTY_VECTOR; m_inflator.expected_type = NON_RANGE; m_inflator.expected_size = ONE_BYTES; m_inflator.expected_virtual = false; m_inflator.expected_relative = false; m_inflator.expected_start = 10; m_inflator.expected_increment = 0; m_inflator.expected_number = 1; // non-range first uint8_t data = 0xab; OneByteDMPAddress addr(10); DMPAddressData chunk(&addr, &data, sizeof(data)); vector > chunks; chunks.push_back(chunk); const DMPPDU *pdu = NewDMPSetProperty(false, false, chunks); OLA_ASSERT(pdu); OLA_ASSERT_EQ((unsigned int) 6, pdu->Size()); PackPduAndInflate(pdu); delete pdu; // ranged address m_inflator.expected_type = RANGE_SINGLE; m_inflator.expected_increment = 1; m_inflator.expected_number = 20; OneByteRangeDMPAddress range_addr(10, 1, 20); DMPAddressData range_chunk(&range_addr, &data, sizeof(data)); vector > ranged_chunks; ranged_chunks.push_back(range_chunk); // range single first pdu = NewRangeDMPSetProperty(false, false, ranged_chunks, false); OLA_ASSERT(pdu); OLA_ASSERT_EQ((unsigned int) 8, pdu->Size()); PackPduAndInflate(pdu); delete pdu; // range equal m_inflator.expected_type = RANGE_EQUAL; pdu = NewRangeDMPSetProperty(false, false, ranged_chunks); OLA_ASSERT(pdu); OLA_ASSERT_EQ((unsigned int) 8, pdu->Size()); PackPduAndInflate(pdu); delete pdu; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/e131_transmit_test.cpp0000664000175000017500000002332714376533110015140 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * e131_transmit_test.cpp * This sends custom E1.31 packets in order to test the implementation of a * remote node. * Copyright (C) 2010 Simon Newton * * The remote node needs to be listening for Universe 1. */ #include #include #include #include "ola/DmxBuffer.h" #include "ola/Logging.h" #include "libs/acn/E131TestFramework.h" using ola::DmxBuffer; using std::string; using std::vector; DmxBuffer BufferFromString(const string &data) { DmxBuffer buffer; buffer.SetFromString(data); return buffer; } DmxBuffer BufferFromValue(uint8_t value) { DmxBuffer buffer; buffer.SetRangeToValue(0, value, ola::DMX_UNIVERSE_SIZE); return buffer; } TestState s1("Single Source Send", new NodeSimpleSend(20), new NodeInactive(), "512 x 20", BufferFromValue(20)); TestState s2("Single Source Timeout", new NodeInactive(), new NodeInactive(), "Loss of data after 2.5s", DmxBuffer()); TestState s3("Single Source Send", new NodeSimpleSend(10), new NodeInactive(), "512 x 10", BufferFromValue(10)); TestState s4("Single Source Terminate", new NodeTerminate(), new NodeInactive(), "Immediate loss of data", DmxBuffer()); TestState s5("Single Source Send", new NodeSimpleSend(30), new NodeInactive(), "512 x 30", BufferFromValue(30)); TestState s6("Single Source Terminate with data", new NodeTerminateWithData(10), new NodeInactive(), "Immediate loss of data, no values of 10", DmxBuffer()); TestState s7("Single Source priority = 201", new NodeSimpleSend(201), new NodeInactive(), "No data, priority > 200 should be ignored", DmxBuffer()); TestState s8("Single Source priority = 100", new NodeSimpleSend(100), new NodeInactive(), "512 x 100", BufferFromValue(100)); TestState s9("Single Source priority = 99", new NodeSimpleSend(99), new NodeInactive(), "512 x 99, missing data indicates a problem when a source reduces" " it's priority", BufferFromValue(99)); // stay in this state for 3s TestState s10("Single Source Timeout", new NodeInactive(), new NodeInactive(), "Loss of data after 2.5s", DmxBuffer()); TestState s11("Single Source Terminate with data", new NodeTerminateWithData(10), new NodeInactive(), "No effect, source should have already timed out", DmxBuffer()); // now test sequence handling TestState s12("Single Source Sequence Test", // 1 in 4 chance of sending a packet with 0s rather than 255s new NodeVarySequenceNumber(255, 0, 4), new NodeInactive(), "512x255, any 0s indicate a problem with seq #", BufferFromValue(255)); TestState s13("Single Source Terminate", new NodeTerminate(), new NodeInactive(), "Immediate loss of data", DmxBuffer()); // now we do the merge tests, this tests a second source appearing with a // priority less than the active one TestState s14("Single Source Send", new NodeSimpleSend(20), new NodeInactive(), "512 x 20", BufferFromValue(20)); TestState s15("Dual Sources with pri 20 & 10", new NodeSimpleSend(20), new NodeSimpleSend(10), "512 x 20, no values of 10 otherwise this indicates a priority " "problem", BufferFromValue(20)); RelaxedTestState s16("Dual Sources with pri 20 & 30", new NodeSimpleSend(20), new NodeSimpleSend(30), "One packet of 512x20, the 512 x 30", BufferFromValue(20), BufferFromValue(30)); RelaxedTestState s17("Dual Sources with pri 20 & 10", new NodeSimpleSend(20), new NodeSimpleSend(10, "100,100,100,100"), "512 x 20, may see single packet with 4 x 100", BufferFromString("100,100,100,100"), BufferFromValue(20)); RelaxedTestState s18("Dual Sources with pri 20 & 20, HTP merge", new NodeSimpleSend(20, "1,1,100,100"), new NodeSimpleSend(20, "100,100,1,1"), "4 x 100 if we HTP merge for arbitration", BufferFromString("1,1,100,100"), BufferFromString("100,100,100,100")); RelaxedTestState s19("Dual Sources with pri 20 & 20, HTP merge", new NodeSimpleSend(20, "1,1,100,0"), new NodeSimpleSend(20, "100,0,1,1"), "[100,1,100,1] if we HTP merge for arbitration", BufferFromString("100,100,100,1"), BufferFromString("100,1,100,1")); // timing is important here OrderedTestState s20("Dual Sources with one timing out", new NodeInactive(), new NodeSimpleSend(20, "100,0,1,1"), "[100,0,1,1] after 2.5s", BufferFromString("100,1,100,1"), BufferFromString("100,0,1,1")); TestState s21("Timeout", new NodeInactive(), new NodeInactive(), "Loss of all data after 2.5s", BufferFromString("100,0,1,1")); // now we test the case where a data arrives from a new source more than the // active priority TestState s22("Single Source Send", new NodeSimpleSend(20), new NodeInactive(), "512 x 20", BufferFromValue(20)); RelaxedTestState s23("Dual Sources with pri 20 & 30", new NodeSimpleSend(20), new NodeSimpleSend(30), "512 x 20, followed by 512 x 30", BufferFromValue(20), BufferFromValue(30)); TestState s24("Both Sources Terminate", new NodeTerminate(), new NodeTerminate(), "Loss of data, may see 512 x 20", DmxBuffer()); // now we test the case where a data arrives from a new source equal to the // active priority TestState s25("Single Source Send", new NodeSimpleSend(20, "20,20,20,20"), new NodeInactive(), "20,20,20,20", BufferFromString("20,20,20,20")); RelaxedTestState s26("Dual Sources with pri 20 & 20", new NodeSimpleSend(20, "20,20,20,20"), new NodeSimpleSend(20, "100,100,100,100"), "[20,20,20,20], then [100,100,100,100]", BufferFromString("20,20,20,20"), BufferFromString("100,100,100,100")); RelaxedTestState s27("Terminate second source", new NodeSimpleSend(20, "20,20,20,20"), new NodeTerminate(), "512 x 20", BufferFromString("100,100,100,100"), BufferFromString("20,20,20,20")); TestState *states[] = {&s1, &s2, &s3, &s4, &s5, &s6, &s7, &s8, &s9, &s10, &s11, &s11, &s12, &s13, &s14, &s15, &s16, &s17, &s18, &s19, &s20, &s21, &s22, &s23, &s24, &s25, &s26, &s27, NULL}; /* * Display the help message */ void DisplayHelp(const char *binary_name) { std::cout << "Usage: " << binary_name << " [--interactive]\n" "\n" "Run the E1.31 Transmit test. This test can run in one of two modes:\n" " * interactive mode. This sends data to the multicast addresses\n" " and a human gets to verify it.\n" " * local mode (default). This starts a local E131Node and sends it data,\n" " verifying against the expected output.\n" "\n" " -h, --help Display this help message and exit.\n" " -i, --interactive Run in interactive mode.\n" << std::endl; } int main(int argc, char* argv[]) { bool interactive_mode = false; ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); vector test_states; TestState **ptr = states; while (*ptr) test_states.push_back(*ptr++); static struct option long_options[] = { {"interactive", no_argument, 0, 'i'}, {"help", no_argument, 0, 'h'}, {0, 0, 0, 0} }; int option_index = 0; while (1) { int c = getopt_long(argc, argv, "ih", long_options, &option_index); if (c == -1) break; switch (c) { case 0: break; case 'h': DisplayHelp(argv[0]); return 0; case 'i': interactive_mode = true; break; case '?': break; default: break; } } StateManager manager(test_states, interactive_mode); manager.Init(); manager.Run(); return manager.Passed() ? 0 : 1; } ola-0.10.9/libs/acn/DMPInflatorTest.cpp0000664000175000017500000000704714376533110014467 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPInflatorTest.cpp * Test fixture for the DMPInflator class * Copyright (C) 2005 Simon Newton */ #include #include "libs/acn/DMPAddress.h" #include "libs/acn/DMPInflator.h" #include "libs/acn/DMPPDU.h" #include "libs/acn/HeaderSet.h" #include "libs/acn/PDUTestCommon.h" #include "ola/testing/TestUtils.h" namespace ola { namespace acn { class DMPInflatorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DMPInflatorTest); CPPUNIT_TEST(testDecodeHeader); CPPUNIT_TEST(testInflatePDU); CPPUNIT_TEST_SUITE_END(); public: void testDecodeHeader(); void testInflatePDU(); }; CPPUNIT_TEST_SUITE_REGISTRATION(DMPInflatorTest); /* * Check that we can decode headers properly */ void DMPInflatorTest::testDecodeHeader() { DMPHeader header(true, true, NON_RANGE, TWO_BYTES); DMPInflator inflator; HeaderSet header_set, header_set2; unsigned int bytes_used; uint8_t header_data = header.Header(); OLA_ASSERT(inflator.DecodeHeader(&header_set, &header_data, sizeof(header_data), &bytes_used)); OLA_ASSERT_EQ((unsigned int) sizeof(header_data), bytes_used); DMPHeader decoded_header = header_set.GetDMPHeader(); OLA_ASSERT(decoded_header.IsVirtual()); OLA_ASSERT(decoded_header.IsRelative()); OLA_ASSERT(NON_RANGE == decoded_header.Type()); OLA_ASSERT(TWO_BYTES == decoded_header.Size()); // try an undersized header OLA_ASSERT_FALSE(inflator.DecodeHeader(&header_set, &header_data, 0, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); // test inheriting the header from the prev call OLA_ASSERT(inflator.DecodeHeader(&header_set2, NULL, 0, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); decoded_header = header_set2.GetDMPHeader(); OLA_ASSERT(decoded_header.IsVirtual()); OLA_ASSERT(decoded_header.IsRelative()); OLA_ASSERT(NON_RANGE == decoded_header.Type()); OLA_ASSERT(TWO_BYTES == decoded_header.Size()); inflator.ResetHeaderField(); OLA_ASSERT_FALSE(inflator.DecodeHeader(&header_set2, NULL, 0, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } /* * Check that we can inflate a DMP PDU that contains other PDUs */ void DMPInflatorTest::testInflatePDU() { DMPHeader header(true, true, NON_RANGE, ONE_BYTES); const DMPPDU *pdu = NewDMPGetProperty(true, true, 1); OLA_ASSERT_EQ((unsigned int) 5, pdu->Size()); unsigned int size = pdu->Size(); uint8_t *data = new uint8_t[size]; unsigned int bytes_used = size; OLA_ASSERT(pdu->Pack(data, &bytes_used)); OLA_ASSERT_EQ((unsigned int) size, bytes_used); DMPInflator inflator; HeaderSet header_set; OLA_ASSERT(inflator.InflatePDUBlock(&header_set, data, size)); OLA_ASSERT(header == header_set.GetDMPHeader()); delete[] data; delete pdu; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/libolaacn.pc.in0000664000175000017500000000033714376533110013654 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libolaacn Version: @VERSION@ Description: Open Lighting Architecture ACN Requires: Libs: -L${libdir} -lolaacn Cflags: -I${includedir} ola-0.10.9/libs/acn/BaseInflatorTest.cpp0000664000175000017500000003101214376533110014706 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * BaseInflatorTest.cpp * Test fixture for the BaseInflator class * Copyright (C) 2005 Simon Newton */ #include #include #include "libs/acn/BaseInflator.h" #include "libs/acn/HeaderSet.h" #include "ola/testing/TestUtils.h" namespace ola { namespace acn { uint8_t PDU_DATA[] = "this is some test data"; class BaseInflatorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(BaseInflatorTest); CPPUNIT_TEST(testChildInflators); CPPUNIT_TEST(testDecodeLength); CPPUNIT_TEST(testDecodeVector); CPPUNIT_TEST(testInflatePDU); CPPUNIT_TEST(testInflatePDUBlock); CPPUNIT_TEST_SUITE_END(); public: void testChildInflators(); void testDecodeLength(); void testDecodeVector(); void testInflatePDU(); void testInflatePDUBlock(); private: }; class TestInflator: public ola::acn::BaseInflator { public: explicit TestInflator(unsigned int id = 0, PDU::vector_size v_size = PDU::TWO_BYTES) : BaseInflator(v_size), m_id(id), m_blocks_handled(0) {} uint32_t Id() const { return m_id; } unsigned int BlocksHandled() const { return m_blocks_handled; } protected: void ResetHeaderField() {} bool DecodeHeader(HeaderSet*, const uint8_t*, unsigned int, unsigned int *bytes_used) { *bytes_used = 0; return true; } bool HandlePDUData(uint32_t vector, OLA_UNUSED const HeaderSet &headers, const uint8_t *data, unsigned int pdu_length) { OLA_ASSERT_EQ((uint32_t) 289, vector); OLA_ASSERT_EQ((unsigned int) sizeof(PDU_DATA), pdu_length); OLA_ASSERT_FALSE(memcmp(data, PDU_DATA, pdu_length)); m_blocks_handled++; return true; } private: unsigned int m_id; unsigned int m_blocks_handled; }; CPPUNIT_TEST_SUITE_REGISTRATION(BaseInflatorTest); /* * Test that we can setup the child inflators correctly */ void BaseInflatorTest::testChildInflators() { TestInflator inflator; TestInflator inflator1(1); TestInflator inflator2(2); OLA_ASSERT_EQ((uint32_t) 1, inflator1.Id()); OLA_ASSERT_EQ((uint32_t) 2, inflator2.Id()); OLA_ASSERT(inflator.AddInflator(&inflator1)); OLA_ASSERT(inflator.AddInflator(&inflator2)); OLA_ASSERT(&inflator1 == inflator.GetInflator(inflator1.Id())); OLA_ASSERT(&inflator2 == inflator.GetInflator(inflator2.Id())); OLA_ASSERT(NULL == inflator.GetInflator(3)); // Once an inflator is set it can't be changed. OLA_ASSERT_FALSE(inflator.AddInflator(&inflator1)); OLA_ASSERT_FALSE(inflator.AddInflator(&inflator2)); } /* * Test that DecodeLength works */ void BaseInflatorTest::testDecodeLength() { TestInflator inflator; uint8_t data[] = {0, 0, 0, 0}; // the test data unsigned int pdu_length; unsigned int bytes_used = 0; // with the length data set to 0, any length should fail. for (unsigned int i = 0; i <= sizeof(data); i++) { OLA_ASSERT_FALSE(inflator.DecodeLength(data, i, &pdu_length, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } // Set the length of the pdu to 1, note that as the length includes the // size of the length, vector & header fields, this is less than the number // of bytes required to determine the length and so it fails data[1] = 1; for (unsigned int i = 0; i <= sizeof(data); i++) { OLA_ASSERT_FALSE(inflator.DecodeLength(data, i, &pdu_length, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } // now set the length to 2, a data length of 0 or 1 should fail, but anything // more than that should return correctly. data[1] = 2; for (unsigned int i = 0; i <= 1; i++) { OLA_ASSERT_FALSE(inflator.DecodeLength(data, i, &pdu_length, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } for (unsigned int i = 2; i <= sizeof(data) ; i++) { OLA_ASSERT(inflator.DecodeLength(data, i, &pdu_length, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 2, pdu_length); OLA_ASSERT_EQ((unsigned int) 2, bytes_used); } // now check that both bytes are used data[0] = 1; // total length of 258 OLA_ASSERT(inflator.DecodeLength(data, sizeof(data), &pdu_length, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 258, pdu_length); OLA_ASSERT_EQ((unsigned int) 2, bytes_used); // now check that the extend length format works data[0] = BaseInflator::LFLAG_MASK; // with the length data set to 0, any length should fail. data[1] = 0; for (unsigned int i = 0; i <= sizeof(data); i++) { OLA_ASSERT_FALSE(inflator.DecodeLength(data, i, &pdu_length, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } // Set the length of the pdu to 1, note that as the length includes the // size of the length, vector & header fields, this is less than the number // of bytes required to determine the length and so it fails data[2] = 1; for (unsigned int i = 0; i <= sizeof(data); i++) { OLA_ASSERT_FALSE(inflator.DecodeLength(data, i, &pdu_length, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } // now set the length to 3, a data length of 0, 1 or 2 should fail, but // anything more than that should return correctly. data[2] = 3; for (unsigned int i = 0; i <= 2; i++) { OLA_ASSERT_FALSE(inflator.DecodeLength(data, i, &pdu_length, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } for (unsigned int i = 3; i <= sizeof(data) ; i++) { OLA_ASSERT(inflator.DecodeLength(data, i, &pdu_length, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 3, pdu_length); OLA_ASSERT_EQ((unsigned int) 3, bytes_used); } // now check that all 3 bytes are used data[0] = BaseInflator::LFLAG_MASK + 1; data[1] = 0x01; OLA_ASSERT(inflator.DecodeLength(data, sizeof(data), &pdu_length, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 65795, pdu_length); OLA_ASSERT_EQ((unsigned int) 3, bytes_used); } /* * test that DecodeVector works */ void BaseInflatorTest::testDecodeVector() { TestInflator inflator(0, PDU::ONE_BYTE); uint8_t data[] = {1, 2, 3, 4, 5, 6}; // the test data unsigned int vector = 1; unsigned int bytes_used = 0; uint8_t flags = PDU::VFLAG_MASK; OLA_ASSERT_FALSE(inflator.DecodeVector(flags, data, 0, &vector, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, vector); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); data[0] = 42; for (unsigned int i = 1; i < sizeof(data); i++) { OLA_ASSERT(inflator.DecodeVector(flags, data, i, &vector, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 42, vector); OLA_ASSERT_EQ((unsigned int) 1, bytes_used); } // now make sure we can reuse the vector flags = 0; for (unsigned int i = 0; i < sizeof(data); i++) { OLA_ASSERT(inflator.DecodeVector(flags, data, i, &vector, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 42, vector); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } // resetting doesn't allow us to reuse the vector inflator.ResetPDUFields(); for (unsigned int i = 0; i < sizeof(data); i++) { OLA_ASSERT_FALSE(inflator.DecodeVector(flags, data, i, &vector, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, vector); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } // now try with a vector size of 2 flags = PDU::VFLAG_MASK; TestInflator inflator2(0, PDU::TWO_BYTES); for (unsigned int i = 0; i < 2; i++) { OLA_ASSERT_FALSE( inflator2.DecodeVector(flags, data, i, &vector, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, vector); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } data[0] = 0x80; data[1] = 0x21; for (unsigned int i = 2; i < sizeof(data); i++) { OLA_ASSERT(inflator2.DecodeVector(flags, data, i, &vector, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 32801, vector); OLA_ASSERT_EQ((unsigned int) 2, bytes_used); } // now make sure we can reuse the vector flags = 0; for (unsigned int i = 0; i < sizeof(data); i++) { OLA_ASSERT(inflator2.DecodeVector(flags, data, i, &vector, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 32801, vector); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } // resetting doesn't allow us to reuse the vector inflator2.ResetPDUFields(); for (unsigned int i = 0; i < sizeof(data); i++) { OLA_ASSERT_FALSE( inflator2.DecodeVector(flags, data, i, &vector, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, vector); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } // now try with a vector size of 4 flags = PDU::VFLAG_MASK; TestInflator inflator4(0, PDU::FOUR_BYTES); for (unsigned int i = 0; i < 4; i++) { OLA_ASSERT_FALSE( inflator4.DecodeVector(flags, data, i, &vector, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, vector); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } data[0] = 0x01; data[1] = 0x21; data[2] = 0x32; data[3] = 0x45; for (unsigned int i = 4; i < 8; i++) { OLA_ASSERT(inflator4.DecodeVector(flags, data, i, &vector, &bytes_used)); OLA_ASSERT_EQ((uint32_t) 18952773, vector); OLA_ASSERT_EQ((unsigned int) 4, bytes_used); } } /* * Check that we can inflate a PDU */ void BaseInflatorTest::testInflatePDU() { TestInflator inflator; // test with a vector size of 2 HeaderSet header_set; uint8_t flags = PDU::VFLAG_MASK; unsigned int data_size = static_cast(PDU::TWO_BYTES + sizeof(PDU_DATA)); uint8_t *data = new uint8_t[data_size]; // setup the vector data[0] = 0x01; data[1] = 0x21; memcpy(data + PDU::TWO_BYTES, PDU_DATA, sizeof(PDU_DATA)); OLA_ASSERT(inflator.InflatePDU(&header_set, flags, data, data_size)); delete[] data; } /* * Check that we can inflate a PDU block correctly. */ void BaseInflatorTest::testInflatePDUBlock() { TestInflator inflator; // test with a vector size of 2 HeaderSet header_set; const unsigned int length_size = 2; // inflate a single pdu block unsigned int data_size = static_cast( length_size + PDU::TWO_BYTES + sizeof(PDU_DATA)); uint8_t *data = new uint8_t[data_size]; // setup the vector data[0] = PDU::VFLAG_MASK; data[1] = static_cast(data_size); data[2] = 0x01; data[3] = 0x21; memcpy(data + length_size + PDU::TWO_BYTES, PDU_DATA, sizeof(PDU_DATA)); OLA_ASSERT_EQ(data_size, inflator.InflatePDUBlock(&header_set, data, data_size)); OLA_ASSERT_EQ(1u, inflator.BlocksHandled()); delete[] data; // inflate a multi-pdu block data = new uint8_t[2 * data_size]; data[0] = PDU::VFLAG_MASK; data[1] = static_cast(data_size); data[2] = 0x01; data[3] = 0x21; memcpy(data + length_size + PDU::TWO_BYTES, PDU_DATA, sizeof(PDU_DATA)); data[data_size] = PDU::VFLAG_MASK; data[data_size + 1] = static_cast(data_size); data[data_size + 2] = 0x01; data[data_size + 3] = 0x21; memcpy(data + data_size + length_size + PDU::TWO_BYTES, PDU_DATA, sizeof(PDU_DATA)); OLA_ASSERT_EQ( 2 * data_size, inflator.InflatePDUBlock(&header_set, data, 2 * data_size)); delete[] data; OLA_ASSERT_EQ(3u, inflator.BlocksHandled()); // inflate with nested inflators TestInflator child_inflator(289); inflator.AddInflator(&child_inflator); unsigned int pdu_size = data_size + length_size + PDU::TWO_BYTES; data = new uint8_t[pdu_size]; data[0] = PDU::VFLAG_MASK; data[1] = static_cast(pdu_size); data[2] = 0x01; data[3] = 0x21; data[4] = PDU::VFLAG_MASK; data[5] = static_cast(data_size); data[6] = 0x01; data[7] = 0x21; memcpy(data + 2 * (length_size + PDU::TWO_BYTES), PDU_DATA, sizeof(PDU_DATA)); OLA_ASSERT_EQ(pdu_size, inflator.InflatePDUBlock(&header_set, data, pdu_size)); OLA_ASSERT_EQ((unsigned int) 3, inflator.BlocksHandled()); OLA_ASSERT_EQ((unsigned int) 1, child_inflator.BlocksHandled()); delete[] data; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/TCPTransport.h0000664000175000017500000001046414376533110013515 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * TCPTransport.h * Copyright (C) 2012 Simon Newton * * This defines the OutgoingStreamTransport and IncomingStreamTransport for * sending and receiving PDUs over stream connections. * * When receiving, the BaseInflator is passed a header containing the source IP * & port (since many higher layer protocols require this). When using the * IncomingStreamTransport you need to provide a fake ip:port pair. * * It's unlikely you want to use IncomingTCPTransport directly, since all * real world connections are TCP (rather than pipes etc.). The * IncomingStreamTransport is separate because it assists in testing. */ #ifndef LIBS_ACN_TCPTRANSPORT_H_ #define LIBS_ACN_TCPTRANSPORT_H_ #include #include "ola/io/OutputBuffer.h" #include "ola/io/OutputStream.h" #include "ola/io/Descriptor.h" #include "ola/network/TCPSocket.h" #include "libs/acn/PDU.h" #include "libs/acn/Transport.h" #include "libs/acn/TransportHeader.h" namespace ola { namespace acn { /** * Read ACN messages from a stream. Generally you want to use the * IncomingTCPTransport directly. This class is used for testing. */ class IncomingStreamTransport { public: IncomingStreamTransport(class BaseInflator *inflator, ola::io::ConnectedDescriptor *descriptor, const ola::network::IPV4SocketAddress &source); ~IncomingStreamTransport(); bool Receive(); private: // The receiver is a state machine. typedef enum { WAITING_FOR_PREAMBLE, WAITING_FOR_PDU_FLAGS, WAITING_FOR_PDU_LENGTH, WAITING_FOR_PDU, } RXState; typedef enum { TWO_BYTES = 2, THREE_BYTES = 3, } PDULengthSize; TransportHeader m_transport_header; class BaseInflator *m_inflator; ola::io::ConnectedDescriptor *m_descriptor; // end points to the byte after the data uint8_t *m_buffer_start, *m_buffer_end, *m_data_end; // the amount of data we need before we can move to the next stage unsigned int m_outstanding_data; // the state we're currently in RXState m_state; unsigned int m_block_size; unsigned int m_consumed_block_size; bool m_stream_valid; PDULengthSize m_pdu_length_size; unsigned int m_pdu_size; void HandlePreamble(); void HandlePDUFlags(); void HandlePDULength(); void HandlePDU(); void IncreaseBufferSize(unsigned int new_size); void ReadRequiredData(); void EnterWaitingForPreamble(); void EnterWaitingForPDU(); /** * Returns the free space at the end of the buffer. */ inline unsigned int FreeSpace() const { return m_buffer_start ? static_cast(m_buffer_end - m_data_end) : 0u; } /** * Return the amount of data in the buffer */ inline unsigned int DataLength() const { return m_buffer_start ? static_cast(m_data_end - m_buffer_start) : 0u; } /** * Return the size of the buffer */ inline unsigned int BufferSize() const { return static_cast(m_buffer_end - m_buffer_start); } static const unsigned int INITIAL_SIZE; static const unsigned int PDU_BLOCK_SIZE = 4; }; /** * IncomingTCPTransport is responsible for receiving ACN over TCP. */ class IncomingTCPTransport { public: IncomingTCPTransport(class BaseInflator *inflator, ola::network::TCPSocket *socket); ~IncomingTCPTransport() {} bool Receive() { return m_transport->Receive(); } private: std::auto_ptr m_transport; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_TCPTRANSPORT_H_ ola-0.10.9/libs/acn/E131PDU.cpp0000664000175000017500000001121014376533110012455 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131PDU.cpp * The E131PDU * Copyright (C) 2007 Simon Newton */ #include #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/network/NetworkUtils.h" #include "ola/strings/Utils.h" #include "libs/acn/DMPPDU.h" #include "libs/acn/E131PDU.h" namespace ola { namespace acn { using ola::io::OutputStream; using ola::network::HostToNetwork; /* * Size of the header portion. */ unsigned int E131PDU::HeaderSize() const { if (m_header.UsingRev2()) return sizeof(E131Rev2Header::e131_rev2_pdu_header); else return sizeof(E131Header::e131_pdu_header); } /* * Size of the data portion */ unsigned int E131PDU::DataSize() const { if (m_dmp_pdu) return m_dmp_pdu->Size(); if (m_data) return m_data_size; return 0; } /* * Pack the header portion. */ bool E131PDU::PackHeader(uint8_t *data, unsigned int *length) const { unsigned int header_size = HeaderSize(); if (*length < header_size) { OLA_WARN << "E131PDU::PackHeader: buffer too small, got " << *length << " required " << header_size; *length = 0; return false; } if (m_header.UsingRev2()) { E131Rev2Header::e131_rev2_pdu_header header; strings::CopyToFixedLengthBuffer(m_header.Source(), header.source, arraysize(header.source)); header.priority = m_header.Priority(); header.sequence = m_header.Sequence(); header.universe = HostToNetwork(m_header.Universe()); *length = sizeof(E131Rev2Header::e131_rev2_pdu_header); memcpy(data, &header, *length); } else { E131Header::e131_pdu_header header; strings::CopyToFixedLengthBuffer(m_header.Source(), header.source, arraysize(header.source)); header.priority = m_header.Priority(); header.reserved = 0; header.sequence = m_header.Sequence(); header.options = static_cast( (m_header.PreviewData() ? E131Header::PREVIEW_DATA_MASK : 0) | (m_header.StreamTerminated() ? E131Header::STREAM_TERMINATED_MASK : 0)); header.universe = HostToNetwork(m_header.Universe()); *length = sizeof(E131Header::e131_pdu_header); memcpy(data, &header, *length); } return true; } /* * Pack the data portion. */ bool E131PDU::PackData(uint8_t *data, unsigned int *length) const { if (m_dmp_pdu) return m_dmp_pdu->Pack(data, length); if (m_data) { memcpy(data, m_data, m_data_size); *length = m_data_size; return true; } *length = 0; return true; } /* * Pack the header into a buffer. */ void E131PDU::PackHeader(OutputStream *stream) const { if (m_header.UsingRev2()) { E131Rev2Header::e131_rev2_pdu_header header; strings::CopyToFixedLengthBuffer(m_header.Source(), header.source, arraysize(header.source)); header.priority = m_header.Priority(); header.sequence = m_header.Sequence(); header.universe = HostToNetwork(m_header.Universe()); stream->Write(reinterpret_cast(&header), sizeof(E131Rev2Header::e131_rev2_pdu_header)); } else { E131Header::e131_pdu_header header; strings::CopyToFixedLengthBuffer(m_header.Source(), header.source, arraysize(header.source)); header.priority = m_header.Priority(); header.reserved = 0; header.sequence = m_header.Sequence(); header.options = static_cast( (m_header.PreviewData() ? E131Header::PREVIEW_DATA_MASK : 0) | (m_header.StreamTerminated() ? E131Header::STREAM_TERMINATED_MASK : 0)); header.universe = HostToNetwork(m_header.Universe()); stream->Write(reinterpret_cast(&header), sizeof(E131Header::e131_pdu_header)); } } /* * Pack the data into a buffer */ void E131PDU::PackData(OutputStream *stream) const { if (m_dmp_pdu) { m_dmp_pdu->Write(stream); } else if (m_data) { stream->Write(m_data, m_data_size); } } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/CIDTest.cpp0000664000175000017500000000715614376533110012750 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * CIDTest.cpp * Test fixture for the CID class * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include "ola/acn/CID.h" #include "ola/io/IOQueue.h" #include "ola/io/OutputBuffer.h" #include "ola/testing/TestUtils.h" using ola::acn::CID; using std::string; class CIDTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(CIDTest); CPPUNIT_TEST(testCID); CPPUNIT_TEST(testSetPack); CPPUNIT_TEST(testGenerate); CPPUNIT_TEST(testToString); CPPUNIT_TEST(testFromString); CPPUNIT_TEST(testToOutputBuffer); CPPUNIT_TEST_SUITE_END(); public: void testCID(); void testSetPack(); void testGenerate(); void testToString(); void testFromString(); void testToOutputBuffer(); private: static const uint8_t TEST_DATA[]; }; const uint8_t CIDTest::TEST_DATA[] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15}; CPPUNIT_TEST_SUITE_REGISTRATION(CIDTest); /* * Check that basic assignment & equality works */ void CIDTest::testCID() { CID cid; OLA_ASSERT(cid.IsNil()); CID cid1 = CID::Generate(); OLA_ASSERT_FALSE(cid1.IsNil()); CID cid2 = cid1; OLA_ASSERT(cid2 == cid1); OLA_ASSERT_FALSE(cid2.IsNil()); CID cid3; cid3 = cid1; OLA_ASSERT(cid3 == cid1); OLA_ASSERT_FALSE(cid3.IsNil()); } void CIDTest::testSetPack() { uint8_t buffer[CID::CID_LENGTH]; CID cid = CID::FromData(TEST_DATA); cid.Pack(buffer); OLA_ASSERT_FALSE(memcmp(TEST_DATA, buffer, CID::CID_LENGTH)); } /* * Check that generate works */ void CIDTest::testGenerate() { CID cid1 = CID::Generate(); CID cid2 = CID::Generate(); OLA_ASSERT_NE(cid1, cid2); } /* * Check that ToString works. */ void CIDTest::testToString() { CID cid = CID::FromData(TEST_DATA); string cid_str = cid.ToString(); transform(cid_str.begin(), cid_str.end(), cid_str.begin(), toupper); OLA_ASSERT_EQ(string("00010203-0405-0607-0809-0A0B0C0D0E0F"), cid_str); } /* * Check that from string works. */ void CIDTest::testFromString() { const string uuid = "00010203-0405-0607-0809-0A0B0C0D0E0F"; CID cid = CID::FromString(uuid); string cid_str = cid.ToString(); transform(cid_str.begin(), cid_str.end(), cid_str.begin(), toupper); OLA_ASSERT_EQ(uuid, cid_str); const string bad_uuid = "foo"; cid = CID::FromString(bad_uuid); OLA_ASSERT(cid.IsNil()); } /** * Check writing to an OutputBuffer works. */ void CIDTest::testToOutputBuffer() { ola::io::IOQueue output; const string uuid = "00010203-0405-0607-0809-0A0B0C0D0E0F"; CID cid = CID::FromString(uuid); cid.Write(&output); OLA_ASSERT_EQ(16u, output.Size()); unsigned int size = output.Size(); uint8_t cid_data[size]; OLA_ASSERT_EQ(size, output.Read(cid_data, size)); OLA_ASSERT_DATA_EQUALS(TEST_DATA, sizeof(TEST_DATA), cid_data, size); } ola-0.10.9/libs/acn/DMPAddressTest.cpp0000664000175000017500000001640014376533110014267 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPAddressTest.cpp * Test fixture for the DMPAddress class * Copyright (C) 2005 Simon Newton */ #include #include #include "ola/network/NetworkUtils.h" #include "libs/acn/PDUTestCommon.h" #include "libs/acn/DMPAddress.h" #include "ola/testing/TestUtils.h" namespace ola { namespace acn { using ola::network::NetworkToHost; class DMPAddressTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DMPAddressTest); CPPUNIT_TEST(testAddress); CPPUNIT_TEST(testRangeAddress); CPPUNIT_TEST(testAddressData); CPPUNIT_TEST_SUITE_END(); public: void testAddress(); void testRangeAddress(); void testAddressData(); private: void checkAddress( const BaseDMPAddress *address, unsigned int start, unsigned int increment, unsigned int number, unsigned int size, dmp_address_size address_size, bool is_range); }; CPPUNIT_TEST_SUITE_REGISTRATION(DMPAddressTest); /* * Check the properties match, pack the address, decode it, and check the * decoded address matches the first one. */ void DMPAddressTest::checkAddress( const BaseDMPAddress *address, unsigned int start, unsigned int increment, unsigned int number, unsigned int size, dmp_address_size address_size, bool is_range) { OLA_ASSERT_EQ(size, address->Size()); OLA_ASSERT_EQ(address_size, address->AddressSize()); OLA_ASSERT_EQ(is_range, address->IsRange()); OLA_ASSERT_EQ(start, address->Start()); OLA_ASSERT_EQ(increment, address->Increment()); OLA_ASSERT_EQ(number, address->Number()); unsigned int length = address->Size(); uint8_t *buffer = new uint8_t[length]; OLA_ASSERT(address->Pack(buffer, &length)); OLA_ASSERT_EQ(size, length); const BaseDMPAddress *addr = DecodeAddress( address_size, is_range ? RANGE_SINGLE: NON_RANGE, buffer, &length); OLA_ASSERT_EQ(size, length); OLA_ASSERT_EQ(start, address->Start()); OLA_ASSERT_EQ(increment, address->Increment()); OLA_ASSERT_EQ(number, address->Number()); length--; OLA_ASSERT_FALSE(DecodeAddress(address_size, is_range ? RANGE_SINGLE: NON_RANGE, buffer, &length)); length = 0; OLA_ASSERT_FALSE(DecodeAddress(address_size, is_range ? RANGE_SINGLE: NON_RANGE, buffer, &length)); delete[] buffer; delete addr; } /* * Test that addresses work. */ void DMPAddressTest::testAddress() { OneByteDMPAddress addr1(10); checkAddress(&addr1, 10, 0, 1, 1, ONE_BYTES, false); TwoByteDMPAddress addr2(1024); checkAddress(&addr2, 1024, 0, 1, 2, TWO_BYTES, false); FourByteDMPAddress addr3(66000); checkAddress(&addr3, 66000, 0, 1, 4, FOUR_BYTES, false); const BaseDMPAddress *addr4 = NewSingleAddress(10); checkAddress(addr4, 10, 0, 1, 1, ONE_BYTES, false); delete addr4; const BaseDMPAddress *addr5 = NewSingleAddress(1024); checkAddress(addr5, 1024, 0, 1, 2, TWO_BYTES, false); delete addr5; const BaseDMPAddress *addr6 = NewSingleAddress(66000); checkAddress(addr6, 66000, 0, 1, 4, FOUR_BYTES, false); delete addr6; } /* * Test that Ranged Addresses work */ void DMPAddressTest::testRangeAddress() { uint8_t buffer[12]; uint16_t *p = reinterpret_cast(buffer); uint32_t *pp = reinterpret_cast(buffer); unsigned int length = sizeof(buffer); OneByteRangeDMPAddress addr1(10, 2, 4); checkAddress(&addr1, 10, 2, 4, 3, ONE_BYTES, true); OLA_ASSERT(addr1.Pack(buffer, &length)); OLA_ASSERT_EQ(addr1.Size(), length); OLA_ASSERT_EQ((uint8_t) 10, buffer[0]); OLA_ASSERT_EQ((uint8_t) 2, buffer[1]); OLA_ASSERT_EQ((uint8_t) 4, buffer[2]); length = sizeof(buffer); TwoByteRangeDMPAddress addr2(1024, 2, 99); checkAddress(&addr2, 1024, 2, 99, 6, TWO_BYTES, true); OLA_ASSERT(addr2.Pack(buffer, &length)); OLA_ASSERT_EQ(addr2.Size(), length); OLA_ASSERT_EQ((uint16_t) 1024, NetworkToHost(*p++)); OLA_ASSERT_EQ((uint16_t) 2, NetworkToHost(*p++)); OLA_ASSERT_EQ((uint16_t) 99, NetworkToHost(*p)); length = sizeof(buffer); FourByteRangeDMPAddress addr3(66000, 2, 100); checkAddress(&addr3, 66000, 2, 100, 12, FOUR_BYTES, true); OLA_ASSERT(addr3.Pack(buffer, &length)); OLA_ASSERT_EQ(addr3.Size(), length); OLA_ASSERT_EQ((uint32_t) 66000, NetworkToHost(*pp++)); OLA_ASSERT_EQ((uint32_t) 2, NetworkToHost(*pp++)); OLA_ASSERT_EQ((uint32_t) 100, NetworkToHost(*pp)); const BaseDMPAddress *addr4 = NewRangeAddress(10, 1, 10); length = sizeof(buffer); checkAddress(addr4, 10, 1, 10, 3, ONE_BYTES, true); OLA_ASSERT(addr4->Pack(buffer, &length)); OLA_ASSERT_EQ(addr4->Size(), length); OLA_ASSERT_EQ((uint8_t) 10, buffer[0]); OLA_ASSERT_EQ((uint8_t) 1, buffer[1]); OLA_ASSERT_EQ((uint8_t) 10, buffer[2]); delete addr4; p = reinterpret_cast(buffer); const BaseDMPAddress *addr5 = NewRangeAddress(10, 1, 1024); length = sizeof(buffer); checkAddress(addr5, 10, 1, 1024, 6, TWO_BYTES, true); OLA_ASSERT(addr5->Pack(buffer, &length)); OLA_ASSERT_EQ(addr5->Size(), length); OLA_ASSERT_EQ((uint16_t) 10, NetworkToHost(*p++)); OLA_ASSERT_EQ((uint16_t) 1, NetworkToHost(*p++)); OLA_ASSERT_EQ((uint16_t) 1024, NetworkToHost(*p)); delete addr5; pp = reinterpret_cast(buffer); const BaseDMPAddress *addr6 = NewRangeAddress(66000, 1, 1024); length = sizeof(buffer); checkAddress(addr6, 66000, 1, 1024, 12, FOUR_BYTES, true); OLA_ASSERT(addr6->Pack(buffer, &length)); OLA_ASSERT_EQ(addr6->Size(), length); OLA_ASSERT_EQ((uint32_t) 66000, NetworkToHost(*pp++)); OLA_ASSERT_EQ((uint32_t) 1, NetworkToHost(*pp++)); OLA_ASSERT_EQ((uint32_t) 1024, NetworkToHost(*pp)); delete addr6; } /* * test that AddressData objects work */ void DMPAddressTest::testAddressData() { uint8_t buffer[12]; unsigned int length = sizeof(buffer); OneByteDMPAddress addr1(10); DMPAddressData chunk(&addr1, NULL, 0); OLA_ASSERT_EQ((const OneByteDMPAddress*) &addr1, chunk.Address()); OLA_ASSERT_EQ((const uint8_t*) NULL, chunk.Data()); OLA_ASSERT_EQ((unsigned int) 1, chunk.Size()); OLA_ASSERT_FALSE(chunk.Pack(buffer, &length)); length = sizeof(buffer); TwoByteRangeDMPAddress addr2(10, 2, 10); DMPAddressData chunk2(&addr2, NULL, 0); OLA_ASSERT_EQ((const TwoByteRangeDMPAddress*) &addr2, chunk2.Address()); OLA_ASSERT_EQ((const uint8_t*) NULL, chunk2.Data()); OLA_ASSERT_EQ((unsigned int) 6, chunk2.Size()); OLA_ASSERT_FALSE(chunk2.Pack(buffer, &length)); } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/HeaderSetTest.cpp0000664000175000017500000002004514376533110014205 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * HeaderSetTest.cpp * Test fixture for the HeaderSet class * Copyright (C) 2007 Simon Newton */ #include #include #include #include "ola/acn/CID.h" #include "ola/network/SocketAddress.h" #include "ola/network/NetworkUtils.h" #include "libs/acn/HeaderSet.h" #include "ola/testing/TestUtils.h" using ola::acn::CID; using ola::network::IPV4SocketAddress; using ola::acn::DMPHeader; using ola::acn::E131Header; using ola::acn::E131Rev2Header; using ola::acn::E133Header; using ola::acn::FOUR_BYTES; using ola::acn::HeaderSet; using ola::acn::NON_RANGE; using ola::acn::ONE_BYTES; using ola::acn::RANGE_EQUAL; using ola::acn::RootHeader; using ola::acn::TransportHeader; class HeaderSetTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(HeaderSetTest); CPPUNIT_TEST(testTransportHeader); CPPUNIT_TEST(testRootHeader); CPPUNIT_TEST(testE131Header); CPPUNIT_TEST(testE133Header); CPPUNIT_TEST(testDMPHeader); CPPUNIT_TEST(testHeaderSet); CPPUNIT_TEST_SUITE_END(); public: void testRootHeader(); void testTransportHeader(); void testE131Header(); void testE133Header(); void testDMPHeader(); void testHeaderSet(); }; CPPUNIT_TEST_SUITE_REGISTRATION(HeaderSetTest); /* * Check that the transport header works. */ void HeaderSetTest::testTransportHeader() { IPV4SocketAddress address = IPV4SocketAddress::FromStringOrDie( "192.168.1.1:42"); TransportHeader header(address, TransportHeader::UDP); OLA_ASSERT(address == header.Source()); OLA_ASSERT_EQ(TransportHeader::UDP, header.Transport()); // test copy and assign TransportHeader header2 = header; OLA_ASSERT(address == header2.Source()); OLA_ASSERT(header2 == header); TransportHeader header3(header); OLA_ASSERT(address == header3.Source()); OLA_ASSERT(header3 == header); } /* * Check that the root header works. */ void HeaderSetTest::testRootHeader() { CID cid = CID::Generate(); RootHeader header; header.SetCid(cid); OLA_ASSERT(cid == header.GetCid()); // test copy and assign RootHeader header2 = header; OLA_ASSERT(cid == header2.GetCid()); OLA_ASSERT(header2 == header); RootHeader header3(header); OLA_ASSERT(cid == header3.GetCid()); OLA_ASSERT(header3 == header); } /* * test the E1.31 Header */ void HeaderSetTest::testE131Header() { E131Header header("foo", 1, 2, 2050); OLA_ASSERT("foo" == header.Source()); OLA_ASSERT_EQ((uint8_t) 1, header.Priority()); OLA_ASSERT_EQ((uint8_t) 2, header.Sequence()); OLA_ASSERT_EQ((uint16_t) 2050, header.Universe()); OLA_ASSERT_EQ(false, header.PreviewData()); OLA_ASSERT_EQ(false, header.StreamTerminated()); OLA_ASSERT_FALSE(header.UsingRev2()); // test copy and assign E131Header header2 = header; OLA_ASSERT(header.Source() == header2.Source()); OLA_ASSERT_EQ(header.Priority(), header2.Priority()); OLA_ASSERT_EQ(header.Sequence(), header2.Sequence()); OLA_ASSERT_EQ(header.Universe(), header2.Universe()); OLA_ASSERT_EQ(false, header2.PreviewData()); OLA_ASSERT_EQ(false, header2.StreamTerminated()); OLA_ASSERT_FALSE(header2.UsingRev2()); E131Header header3(header); OLA_ASSERT(header.Source() == header3.Source()); OLA_ASSERT_EQ(header.Priority(), header3.Priority()); OLA_ASSERT_EQ(header.Sequence(), header3.Sequence()); OLA_ASSERT_EQ(header.Universe(), header3.Universe()); OLA_ASSERT(header == header3); // test a rev 2 header E131Rev2Header header_rev2("foo", 1, 2, 2050); OLA_ASSERT("foo" == header_rev2.Source()); OLA_ASSERT_EQ((uint8_t) 1, header_rev2.Priority()); OLA_ASSERT_EQ((uint8_t) 2, header_rev2.Sequence()); OLA_ASSERT_EQ((uint16_t) 2050, header_rev2.Universe()); OLA_ASSERT(header_rev2.UsingRev2()); OLA_ASSERT_FALSE((header == header_rev2)); E131Rev2Header header2_rev2 = header_rev2; OLA_ASSERT(header2_rev2 == header_rev2); // test a header with the special bits set E131Header header4("foo", 1, 2, 2050, true, true); OLA_ASSERT("foo" == header4.Source()); OLA_ASSERT_EQ((uint8_t) 1, header4.Priority()); OLA_ASSERT_EQ((uint8_t) 2, header4.Sequence()); OLA_ASSERT_EQ((uint16_t) 2050, header4.Universe()); OLA_ASSERT_EQ(true, header4.PreviewData()); OLA_ASSERT_EQ(true, header4.StreamTerminated()); OLA_ASSERT_FALSE(header4.UsingRev2()); } /* * test the E1.33 Header */ void HeaderSetTest::testE133Header() { E133Header header("foo", 9840, 2); OLA_ASSERT("foo" == header.Source()); OLA_ASSERT_EQ((uint32_t) 9840, header.Sequence()); OLA_ASSERT_EQ((uint16_t) 2, header.Endpoint()); // test copy and assign E133Header header2 = header; OLA_ASSERT(header.Source() == header2.Source()); OLA_ASSERT_EQ(header.Sequence(), header2.Sequence()); OLA_ASSERT_EQ(header.Endpoint(), header2.Endpoint()); E133Header header3(header); OLA_ASSERT(header.Source() == header3.Source()); OLA_ASSERT_EQ(header.Sequence(), header3.Sequence()); OLA_ASSERT_EQ(header.Endpoint(), header3.Endpoint()); OLA_ASSERT(header == header3); } /* * test the DMP Header */ void HeaderSetTest::testDMPHeader() { DMPHeader header(false, false, NON_RANGE, ONE_BYTES); OLA_ASSERT_EQ(false, header.IsVirtual()); OLA_ASSERT_EQ(false, header.IsRelative()); OLA_ASSERT_EQ(NON_RANGE, header.Type()); OLA_ASSERT_EQ(ONE_BYTES, header.Size()); OLA_ASSERT_EQ((uint8_t) 0, header.Header()); DMPHeader test_header(0); OLA_ASSERT(test_header == header); DMPHeader header2(false, true, RANGE_EQUAL, FOUR_BYTES); OLA_ASSERT_EQ(false, header2.IsVirtual()); OLA_ASSERT_EQ(true, header2.IsRelative()); OLA_ASSERT_EQ(RANGE_EQUAL, header2.Type()); OLA_ASSERT_EQ(FOUR_BYTES, header2.Size()); OLA_ASSERT_EQ((uint8_t) 0x62, header2.Header()); DMPHeader test_header2(0x62); OLA_ASSERT_TRUE(test_header2 == header2); // test copy and assign DMPHeader header3 = header; OLA_ASSERT_TRUE(header3 == header); OLA_ASSERT_NE(header3, header2); DMPHeader header4(header); OLA_ASSERT_TRUE(header4 == header); OLA_ASSERT_NE(header4, header2); } /* * Check that the header set works */ void HeaderSetTest::testHeaderSet() { HeaderSet headers; RootHeader root_header; E131Header e131_header("e131", 1, 2, 6001); E133Header e133_header("foo", 1, 2050); DMPHeader dmp_header(false, false, NON_RANGE, ONE_BYTES); // test the root header component CID cid = CID::Generate(); root_header.SetCid(cid); headers.SetRootHeader(root_header); OLA_ASSERT(root_header == headers.GetRootHeader()); // test the E1.31 header component headers.SetE131Header(e131_header); OLA_ASSERT(e131_header == headers.GetE131Header()); // test the E1.33 header component headers.SetE133Header(e133_header); OLA_ASSERT(e133_header == headers.GetE133Header()); // test the DMP headers component headers.SetDMPHeader(dmp_header); OLA_ASSERT(dmp_header == headers.GetDMPHeader()); // test assign HeaderSet headers2 = headers; OLA_ASSERT(root_header == headers2.GetRootHeader()); OLA_ASSERT(e131_header == headers2.GetE131Header()); OLA_ASSERT(e133_header == headers2.GetE133Header()); OLA_ASSERT(dmp_header == headers2.GetDMPHeader()); OLA_ASSERT(headers2 == headers); // test copy HeaderSet headers3(headers); OLA_ASSERT(root_header == headers3.GetRootHeader()); OLA_ASSERT(e131_header == headers3.GetE131Header()); OLA_ASSERT(e133_header == headers3.GetE133Header()); OLA_ASSERT(dmp_header == headers3.GetDMPHeader()); OLA_ASSERT(headers3 == headers); } ola-0.10.9/libs/acn/DMPInflator.h0000664000175000017500000000320514376533110013264 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPInflator.h * Interface for the DMPInflator class. * Copyright (C) 2009 Simon Newton */ #ifndef LIBS_ACN_DMPINFLATOR_H_ #define LIBS_ACN_DMPINFLATOR_H_ #include "ola/acn/ACNVectors.h" #include "libs/acn/BaseInflator.h" #include "libs/acn/DMPHeader.h" namespace ola { namespace acn { class DMPInflator: public BaseInflator { friend class DMPInflatorTest; public: DMPInflator(): BaseInflator(PDU::ONE_BYTE), m_last_header_valid(false) { } virtual ~DMPInflator() {} uint32_t Id() const { return ola::acn::VECTOR_E131_DATA; } protected: bool DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int len, unsigned int *bytes_used); void ResetHeaderField(); private: DMPHeader m_last_header; bool m_last_header_valid; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_DMPINFLATOR_H_ ola-0.10.9/libs/acn/E131Header.h0000664000175000017500000000732614376533110012677 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131Header.h * The E1.31 Header * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_E131HEADER_H_ #define LIBS_ACN_E131HEADER_H_ #include #include #include namespace ola { namespace acn { /* * Header for the E131 layer */ class E131Header { public: E131Header() : m_priority(0), m_sequence(0), m_universe(0), m_is_preview(false), m_has_terminated(false), m_is_rev2(false) { } E131Header(const std::string &source, uint8_t priority, uint8_t sequence, uint16_t universe, bool is_preview = false, bool has_terminated = false, bool is_rev2 = false) : m_source(source), m_priority(priority), m_sequence(sequence), m_universe(universe), m_is_preview(is_preview), m_has_terminated(has_terminated), m_is_rev2(is_rev2) { } ~E131Header() {} const std::string Source() const { return m_source; } uint8_t Priority() const { return m_priority; } uint8_t Sequence() const { return m_sequence; } uint16_t Universe() const { return m_universe; } bool PreviewData() const { return m_is_preview; } bool StreamTerminated() const { return m_has_terminated; } bool UsingRev2() const { return m_is_rev2; } bool operator==(const E131Header &other) const { return m_source == other.m_source && m_priority == other.m_priority && m_sequence == other.m_sequence && m_universe == other.m_universe && m_is_preview == other.m_is_preview && m_has_terminated == other.m_has_terminated && m_is_rev2 == other.m_is_rev2; } enum { SOURCE_NAME_LEN = 64 }; PACK( struct e131_pdu_header_s { char source[SOURCE_NAME_LEN]; uint8_t priority; uint16_t reserved; uint8_t sequence; uint8_t options; uint16_t universe; }); typedef struct e131_pdu_header_s e131_pdu_header; static const uint8_t PREVIEW_DATA_MASK = 0x80; static const uint8_t STREAM_TERMINATED_MASK = 0x40; private: std::string m_source; uint8_t m_priority; uint8_t m_sequence; uint16_t m_universe; bool m_is_preview; bool m_has_terminated; bool m_is_rev2; }; class E131Rev2Header: public E131Header { public: E131Rev2Header(const std::string &source, uint8_t priority, uint8_t sequence, uint16_t universe, bool is_preview = false, bool has_terminated = false) : E131Header(source, priority, sequence, universe, is_preview, has_terminated, true) { } enum { REV2_SOURCE_NAME_LEN = 32 }; typedef struct { char source[REV2_SOURCE_NAME_LEN]; uint8_t priority; uint8_t sequence; uint16_t universe; } e131_rev2_pdu_header; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_E131HEADER_H_ ola-0.10.9/libs/acn/PDUTestCommon.h0000664000175000017500000001356014376533110013613 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * PDUTestCommon.h * Provides a simple PDU class for testing * Copyright (C) 2005 Simon Newton */ #ifndef LIBS_ACN_PDUTESTCOMMON_H_ #define LIBS_ACN_PDUTESTCOMMON_H_ #include "ola/Callback.h" #include "ola/acn/CID.h" #include "ola/io/OutputStream.h" #include "ola/io/IOStack.h" #include "libs/acn/BaseInflator.h" #include "libs/acn/PDU.h" namespace ola { namespace acn { /* * This isn't a PDU at all, it just packs a uint32 for testing. */ class FakePDU: public PDU { public: explicit FakePDU(unsigned int value): PDU(0), m_value(value) {} unsigned int Size() const { return sizeof(m_value); } unsigned int HeaderSize() const { return 0; } unsigned int DataSize() const { return 0; } bool Pack(uint8_t *data, unsigned int *length) const { if (*length < sizeof(m_value)) return false; memcpy(data, &m_value, sizeof(m_value)); *length = sizeof(m_value); return true; } bool PackHeader(OLA_UNUSED uint8_t *data, OLA_UNUSED unsigned int *length) const { return true; } bool PackData(OLA_UNUSED uint8_t *data, OLA_UNUSED unsigned int *length) const { return true; } void Write(ola::io::OutputStream *stream) const { *stream << ola::network::HostToNetwork(m_value); } void PackHeader(ola::io::OutputStream*) const {} void PackData(ola::io::OutputStream*) const {} private: unsigned int m_value; }; /* * A Mock PDU class that can be used for testing. * Mock PDUs have a 4 byte header, and a 4 byte data payload which the inflator * will check is 2x the header value. */ class MockPDU: public PDU { public: MockPDU(unsigned int header, unsigned int value): PDU(TEST_DATA_VECTOR), m_header(header), m_value(value) {} unsigned int HeaderSize() const { return sizeof(m_header); } unsigned int DataSize() const { return sizeof(m_value); } bool PackHeader(uint8_t *data, unsigned int *length) const { if (*length < HeaderSize()) { *length = 0; return false; } memcpy(data, &m_header, sizeof(m_header)); *length = HeaderSize(); return true; } void PackHeader(ola::io::OutputStream *stream) const { stream->Write(reinterpret_cast(&m_header), sizeof(m_header)); } bool PackData(uint8_t *data, unsigned int *length) const { if (*length < DataSize()) { *length = 0; return false; } memcpy(data, &m_value, sizeof(m_value)); *length = DataSize(); return true; } void PackData(ola::io::OutputStream *stream) const { stream->Write(reinterpret_cast(&m_value), sizeof(m_value)); } static void PrependPDU(ola::io::IOStack *stack, unsigned int header, unsigned int data) { stack->Write(reinterpret_cast(&data), sizeof(data)); stack->Write(reinterpret_cast(&header), sizeof(header)); unsigned int vector = ola::network::HostToNetwork(TEST_DATA_VECTOR); stack->Write(reinterpret_cast(&vector), sizeof(vector)); PrependFlagsAndLength( stack, static_cast( sizeof(data) + sizeof(header) + sizeof(vector)), VFLAG_MASK | HFLAG_MASK | DFLAG_MASK); } // This is used to id 'Mock' PDUs in the higher level protocol static const unsigned int TEST_VECTOR = 42; // This is the vector used by MockPDUs static const unsigned int TEST_DATA_VECTOR = 43; private: unsigned int m_header; unsigned int m_value; }; /* * The inflator the works with MockPDUs. We check that the data = 2 * header */ class MockInflator: public BaseInflator { public: explicit MockInflator(const ola::acn::CID &cid, Callback0 *on_recv = NULL): BaseInflator(), m_cid(cid), m_on_recv(on_recv) {} uint32_t Id() const { return MockPDU::TEST_VECTOR; } protected: void ResetHeaderField() {} bool DecodeHeader(HeaderSet*, const uint8_t *data, unsigned int, unsigned int *bytes_used) { if (data) { *bytes_used = 4; memcpy(&m_last_header, data, sizeof(m_last_header)); } return true; } bool HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_length) { CPPUNIT_ASSERT_EQUAL((uint32_t) MockPDU::TEST_DATA_VECTOR, vector); CPPUNIT_ASSERT_EQUAL((unsigned int) 4, pdu_length); unsigned int *value = (unsigned int*) data; CPPUNIT_ASSERT_EQUAL(m_last_header * 2, *value); if (!m_cid.IsNil()) { // check the CID as well RootHeader root_header = headers.GetRootHeader(); CPPUNIT_ASSERT(m_cid == root_header.GetCid()); } if (m_on_recv) m_on_recv->Run(); return true; } private: ola::acn::CID m_cid; Callback0 *m_on_recv; unsigned int m_last_header; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_PDUTESTCOMMON_H_ ola-0.10.9/libs/acn/RootPDU.h0000664000175000017500000000423214376533110012442 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RootPDU.h * Interface for the RootPDU class * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_ROOTPDU_H_ #define LIBS_ACN_ROOTPDU_H_ #include #include "ola/acn/CID.h" #include "ola/io/IOStack.h" #include "libs/acn/PDU.h" namespace ola { namespace acn { class RootPDU: public PDU { public: explicit RootPDU(unsigned int vector): PDU(vector), m_block(NULL), m_block_size(0) {} RootPDU(unsigned int vector, const ola::acn::CID &cid, const PDUBlock *block): PDU(vector), m_cid(cid), m_block(block) { m_block_size = block ? block->Size() : 0; } ~RootPDU() {} unsigned int HeaderSize() const { return ola::acn::CID::CID_LENGTH; } unsigned int DataSize() const { return m_block_size; } bool PackHeader(uint8_t *data, unsigned int *length) const; bool PackData(uint8_t *data, unsigned int *length) const; void PackHeader(ola::io::OutputStream *stream) const; void PackData(ola::io::OutputStream *stream) const; const ola::acn::CID &Cid() const { return m_cid; } const ola::acn::CID &Cid(const ola::acn::CID &cid) { return m_cid = cid; } void SetBlock(const PDUBlock *block); static void PrependPDU(ola::io::IOStack *stack, uint32_t vector, const ola::acn::CID &cid); private: ola::acn::CID m_cid; const PDUBlock *m_block; unsigned int m_block_size; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_ROOTPDU_H_ ola-0.10.9/libs/acn/E133InflatorTest.cpp0000664000175000017500000001000614376533110014447 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133InflatorTest.cpp * Test fixture for the E133Inflator class * Copyright (C) 2011 Simon Newton */ #include #include #include #include "ola/Logging.h" #include "ola/network/NetworkUtils.h" #include "libs/acn/HeaderSet.h" #include "libs/acn/PDUTestCommon.h" #include "libs/acn/E133Inflator.h" #include "libs/acn/E133PDU.h" #include "ola/testing/TestUtils.h" namespace ola { namespace acn { using ola::network::HostToNetwork; using std::string; class E133InflatorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(E133InflatorTest); CPPUNIT_TEST(testDecodeHeader); CPPUNIT_TEST(testInflatePDU); CPPUNIT_TEST_SUITE_END(); public: void testDecodeHeader(); void testInflatePDU(); }; CPPUNIT_TEST_SUITE_REGISTRATION(E133InflatorTest); /* * Check that we can decode headers properly */ void E133InflatorTest::testDecodeHeader() { E133Header::e133_pdu_header header; memset(&header, 0, sizeof(header)); E133Inflator inflator; HeaderSet header_set, header_set2; unsigned int bytes_used; const string source_name = "foobar"; strncpy(header.source, source_name.data(), source_name.size() + 1); header.sequence = HostToNetwork(72650u); header.endpoint = HostToNetwork(static_cast(42)); OLA_ASSERT(inflator.DecodeHeader(&header_set, reinterpret_cast(&header), sizeof(header), &bytes_used)); OLA_ASSERT_EQ((unsigned int) sizeof(header), bytes_used); E133Header decoded_header = header_set.GetE133Header(); OLA_ASSERT(source_name == decoded_header.Source()); OLA_ASSERT_EQ((uint32_t) 72650, decoded_header.Sequence()); OLA_ASSERT_EQ((uint16_t) 42, decoded_header.Endpoint()); // try an undersized header OLA_ASSERT_FALSE(inflator.DecodeHeader( &header_set, reinterpret_cast(&header), static_cast(sizeof(header) - 1), &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); // test inheriting the header from the prev call OLA_ASSERT(inflator.DecodeHeader(&header_set2, NULL, 0, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); decoded_header = header_set2.GetE133Header(); OLA_ASSERT(source_name == decoded_header.Source()); OLA_ASSERT_EQ((uint32_t) 72650, decoded_header.Sequence()); OLA_ASSERT_EQ((uint16_t) 42, decoded_header.Endpoint()); inflator.ResetHeaderField(); OLA_ASSERT_FALSE(inflator.DecodeHeader(&header_set2, NULL, 0, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); } /* * Check that we can inflate a E133 PDU that contains other PDUs */ void E133InflatorTest::testInflatePDU() { const string source = "foobar source"; E133Header header(source, 2370, 2); // TODO(simon): pass a DMP msg here as well E133PDU pdu(3, header, NULL); OLA_ASSERT_EQ((unsigned int) 77, pdu.Size()); unsigned int size = pdu.Size(); uint8_t *data = new uint8_t[size]; unsigned int bytes_used = size; OLA_ASSERT(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ((unsigned int) size, bytes_used); E133Inflator inflator; HeaderSet header_set; OLA_ASSERT(inflator.InflatePDUBlock(&header_set, data, size)); OLA_ASSERT(header == header_set.GetE133Header()); delete[] data; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/HeaderSet.h0000664000175000017500000000505414376533110013015 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * HeaderSet.h * Interface for the HeaderSet class * HeaderSet is passed down the parsing stack and contains a collection of PDU * headers * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_HEADERSET_H_ #define LIBS_ACN_HEADERSET_H_ #include "libs/acn/DMPHeader.h" #include "libs/acn/E131Header.h" #include "libs/acn/E133Header.h" #include "libs/acn/RootHeader.h" #include "libs/acn/TransportHeader.h" namespace ola { namespace acn { class HeaderSet { public: HeaderSet() {} ~HeaderSet() {} const TransportHeader &GetTransportHeader() const { return m_transport_header; } void SetTransportHeader(const TransportHeader &header) { m_transport_header = header; } const RootHeader &GetRootHeader() const { return m_root_header; } void SetRootHeader(const RootHeader &header) { m_root_header = header; } const E131Header &GetE131Header() const { return m_e131_header; } void SetE131Header(const E131Header &header) { m_e131_header = header; } const E133Header &GetE133Header() const { return m_e133_header; } void SetE133Header(const E133Header &header) { m_e133_header = header; } const DMPHeader &GetDMPHeader() const { return m_dmp_header; } void SetDMPHeader(const DMPHeader &header) { m_dmp_header = header; } bool operator==(const HeaderSet &other) const { return ( m_transport_header == other.m_transport_header && m_root_header == other.m_root_header && m_e131_header == other.m_e131_header && m_e133_header == other.m_e133_header && m_dmp_header == other.m_dmp_header); } private: TransportHeader m_transport_header; RootHeader m_root_header; E131Header m_e131_header; E133Header m_e133_header; DMPHeader m_dmp_header; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_HEADERSET_H_ ola-0.10.9/libs/acn/RootPDUTest.cpp0000664000175000017500000001453614376533110013645 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RootPDUTest.cpp * Test fixture for the RootPDU class * Copyright (C) 2005 Simon Newton */ #include #include #include "ola/Logging.h" #include "ola/acn/CID.h" #include "ola/io/IOQueue.h" #include "ola/io/OutputStream.h" #include "ola/network/NetworkUtils.h" #include "ola/testing/TestUtils.h" #include "libs/acn/PDUTestCommon.h" #include "libs/acn/RootPDU.h" namespace ola { namespace acn { using ola::acn::CID; using ola::io::IOQueue; using ola::io::OutputStream; using ola::network::NetworkToHost; using ola::network::HostToNetwork; class RootPDUTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RootPDUTest); CPPUNIT_TEST(testSimpleRootPDU); CPPUNIT_TEST(testSimpleRootPDUToOutputStream); CPPUNIT_TEST(testNestedRootPDU); CPPUNIT_TEST(testNestedRootPDUToOutputStream); CPPUNIT_TEST_SUITE_END(); public: void testSimpleRootPDU(); void testSimpleRootPDUToOutputStream(); void testNestedRootPDU(); void testNestedRootPDUToOutputStream(); void setUp() { ola::InitLogging(ola::OLA_LOG_DEBUG, ola::OLA_LOG_STDERR); } private: static const unsigned int TEST_VECTOR = 4; static const unsigned int TEST_VECTOR2 = 99; }; CPPUNIT_TEST_SUITE_REGISTRATION(RootPDUTest); /* * Test that packing a RootPDU without data works. */ void RootPDUTest::testSimpleRootPDU() { CID cid = CID::Generate(); RootPDU pdu1(TEST_VECTOR, cid, NULL); OLA_ASSERT(cid == pdu1.Cid()); OLA_ASSERT_EQ(22u, pdu1.Size()); unsigned int size = pdu1.Size(); uint8_t *data = new uint8_t[size]; unsigned int bytes_used = size; OLA_ASSERT(pdu1.Pack(data, &bytes_used)); OLA_ASSERT_EQ(size, bytes_used); // spot check the data OLA_ASSERT_EQ((uint8_t) 0x70, data[0]); OLA_ASSERT_EQ((uint8_t) bytes_used, data[1]); unsigned int actual_value; memcpy(&actual_value, data + 2, sizeof(actual_value)); OLA_ASSERT_EQ(HostToNetwork(TEST_VECTOR), actual_value); CID cid2 = CID::FromData(&data[6]); OLA_ASSERT(cid2 == cid); // test undersized buffer bytes_used = size - 1; OLA_ASSERT_FALSE(pdu1.Pack(data, &bytes_used)); OLA_ASSERT_EQ(0u, bytes_used); // test oversized buffer bytes_used = size + 1; OLA_ASSERT(pdu1.Pack(data, &bytes_used)); OLA_ASSERT_EQ(size, bytes_used); // change the vector pdu1.SetVector(TEST_VECTOR2); OLA_ASSERT(pdu1.Pack(data, &bytes_used)); OLA_ASSERT_EQ(size, bytes_used); OLA_ASSERT_EQ((uint8_t) 0x70, data[0]); OLA_ASSERT_EQ((uint8_t) bytes_used, data[1]); memcpy(&actual_value, data + 2, sizeof(actual_value)); OLA_ASSERT_EQ(HostToNetwork(TEST_VECTOR2), actual_value); cid2 = CID::FromData(&data[6]); OLA_ASSERT(cid2 == cid); // use the other constructor RootPDU pdu2(TEST_VECTOR); pdu2.Cid(cid); OLA_ASSERT(cid == pdu1.Cid()); OLA_ASSERT_EQ(22u, pdu1.Size()); bytes_used = size; uint8_t *data2 = new uint8_t[size]; OLA_ASSERT(pdu1.Pack(data2, &bytes_used)); OLA_ASSERT_EQ(size, bytes_used); OLA_ASSERT_FALSE(memcmp(data, data2, bytes_used)); delete[] data; delete[] data2; } /** * Check that writing an Root PDU to an output stream works */ void RootPDUTest::testSimpleRootPDUToOutputStream() { CID cid = CID::Generate(); RootPDU pdu1(TEST_VECTOR, cid, NULL); OLA_ASSERT(cid == pdu1.Cid()); OLA_ASSERT_EQ(16u, pdu1.HeaderSize()); OLA_ASSERT_EQ(4u, pdu1.VectorSize()); OLA_ASSERT_EQ(0u, pdu1.DataSize()); OLA_ASSERT_EQ(22u, pdu1.Size()); IOQueue output; OutputStream stream(&output); pdu1.Write(&stream); OLA_ASSERT_EQ(22u, output.Size()); uint8_t *raw_pdu = new uint8_t[output.Size()]; unsigned int raw_pdu_size = output.Peek(raw_pdu, output.Size()); OLA_ASSERT_EQ(output.Size(), raw_pdu_size); uint8_t EXPECTED[] = { 0x70, 22, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; cid.Pack(EXPECTED + 6); OLA_ASSERT_DATA_EQUALS(EXPECTED, sizeof(EXPECTED), raw_pdu, raw_pdu_size); output.Pop(output.Size()); delete[] raw_pdu; } /* * Test that packing a RootPDU with nested data works */ void RootPDUTest::testNestedRootPDU() { FakePDU pdu1(1); FakePDU pdu2(42); PDUBlock block; block.AddPDU(&pdu1); block.AddPDU(&pdu2); CID cid = CID::Generate(); RootPDU pdu(TEST_VECTOR, cid, &block); OLA_ASSERT(cid == pdu.Cid()); OLA_ASSERT_EQ(30u, pdu.Size()); unsigned int size = pdu.Size(); uint8_t *data = new uint8_t[size]; unsigned int bytes_used = size; OLA_ASSERT(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ(size, bytes_used); // spot check unsigned int actual_value; memcpy(&actual_value, data + 22, sizeof(actual_value)); OLA_ASSERT_EQ(1u, actual_value); memcpy(&actual_value, data + 26, sizeof(actual_value)); OLA_ASSERT_EQ(42u, actual_value); delete[] data; } /* * Test that packing a RootPDU with nested data works */ void RootPDUTest::testNestedRootPDUToOutputStream() { FakePDU pdu1(1); FakePDU pdu2(42); PDUBlock block; block.AddPDU(&pdu1); block.AddPDU(&pdu2); CID cid = CID::Generate(); RootPDU pdu(TEST_VECTOR, cid, &block); OLA_ASSERT(cid == pdu.Cid()); OLA_ASSERT_EQ(30u, pdu.Size()); IOQueue output; OutputStream stream(&output); pdu.Write(&stream); OLA_ASSERT_EQ(30u, output.Size()); uint8_t *raw_pdu = new uint8_t[output.Size()]; unsigned int raw_pdu_size = output.Peek(raw_pdu, output.Size()); OLA_ASSERT_EQ(output.Size(), raw_pdu_size); uint8_t EXPECTED[] = { 0x70, 30, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 42 }; cid.Pack(EXPECTED + 6); OLA_ASSERT_DATA_EQUALS(EXPECTED, sizeof(EXPECTED), raw_pdu, raw_pdu_size); output.Pop(output.Size()); delete[] raw_pdu; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/RDMPDU.cpp0000664000175000017500000000233714376533110012500 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RDMPDU.cpp * The RDMPDU * Copyright (C) 2012 Simon Newton */ #include "libs/acn/RDMPDU.h" #include #include namespace ola { namespace acn { using ola::io::OutputStream; using ola::network::HostToNetwork; void RDMPDU::PrependPDU(ola::io::IOStack *stack) { uint8_t vector = HostToNetwork(ola::rdm::START_CODE); stack->Write(reinterpret_cast(&vector), sizeof(vector)); PrependFlagsAndLength(stack); } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/E131Sender.h0000664000175000017500000000361414376533110012723 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131Sender.h * Interface for the E131Sender class, this abstracts the encapsulation and * sending of DMP PDUs contained within E131PDUs. * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_E131SENDER_H_ #define LIBS_ACN_E131SENDER_H_ #include "ola/network/Socket.h" #include "libs/acn/DMPPDU.h" #include "libs/acn/E131Header.h" #include "libs/acn/PreamblePacker.h" #include "libs/acn/Transport.h" #include "libs/acn/UDPTransport.h" namespace ola { namespace acn { class DMPInflator; class E131Sender { public: E131Sender(ola::network::UDPSocket *socket, class RootSender *root_sender); ~E131Sender() {} bool SendDMP(const E131Header &header, const DMPPDU *pdu); bool SendDiscoveryData(const E131Header &header, const uint8_t *data, unsigned int data_size); static bool UniverseIP(uint16_t universe, class ola::network::IPV4Address *addr); private: ola::network::UDPSocket *m_socket; PreamblePacker m_packer; OutgoingUDPTransportImpl m_transport_impl; class RootSender *m_root_sender; DISALLOW_COPY_AND_ASSIGN(E131Sender); }; } // namespace acn } // namespace ola #endif // LIBS_ACN_E131SENDER_H_ ola-0.10.9/libs/acn/RootSender.cpp0000664000175000017500000000651614376533110013574 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RootSender.cpp * The RootSender class manages the sending of Root Layer PDUs. * Copyright (C) 2007 Simon Newton */ #include "ola/Logging.h" #include "libs/acn/RootSender.h" #include "libs/acn/Transport.h" namespace ola { namespace acn { using ola::acn::CID; /* * Create a new RootSender * @param cid The CID to send in the Root PDU. */ RootSender::RootSender(const CID &cid) : m_root_pdu(0) { m_root_pdu.Cid(cid); } /* * Encapsulate this PDU in a RootPDU and send it to the destination. * @param vector the vector to use at the root level * @param pdu the pdu to send. * @param transport the OutgoingTransport to use when sending the message. */ bool RootSender::SendPDU(unsigned int vector, const PDU &pdu, OutgoingTransport *transport) { m_working_block.Clear(); m_working_block.AddPDU(&pdu); return SendPDUBlock(vector, m_working_block, transport); } /* * Send a RootPDU with no data. * @param vector the vector to use at the root level * @param transport the OutgoingTransport to use when sending the message. */ bool RootSender::SendEmpty(unsigned int vector, OutgoingTransport *transport) { m_working_block.Clear(); return SendPDUBlock(vector, m_working_block, transport); } /* * This is used to inject a packet from a different CID. * @param vector the vector to use at the root level * @param pdu the pdu to send. * @param cid the cid to send from * @param transport the OutgoingTransport to use when sending the message. */ bool RootSender::SendPDU(unsigned int vector, const PDU &pdu, const CID &cid, OutgoingTransport *transport) { if (!transport) return false; PDUBlock root_block, working_block; working_block.AddPDU(&pdu); RootPDU root_pdu(vector); root_pdu.Cid(cid); root_pdu.SetBlock(&working_block); root_block.AddPDU(&root_pdu); return transport->Send(root_block); } /* * Encapsulate this PDUBlock in a RootPDU and send it to the destination. * @param vector the vector to use at the root level * @param block the PDUBlock to send. * @param transport the OutgoingTransport to use when sending the message. */ bool RootSender::SendPDUBlock(unsigned int vector, const PDUBlock &block, OutgoingTransport *transport) { if (!transport) return false; m_root_pdu.SetVector(vector); m_root_pdu.SetBlock(&block); m_root_block.Clear(); m_root_block.AddPDU(&m_root_pdu); return transport->Send(m_root_block); } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/RDMInflator.h0000664000175000017500000000442014376533110013266 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RDMInflator.h * Copyright (C) 2011 Simon Newton */ #ifndef LIBS_ACN_RDMINFLATOR_H_ #define LIBS_ACN_RDMINFLATOR_H_ #include #include "ola/Callback.h" #include "ola/acn/ACNVectors.h" #include "libs/acn/BaseInflator.h" #include "libs/acn/TransportHeader.h" #include "libs/acn/E133Header.h" namespace ola { namespace acn { class RDMInflator: public BaseInflator { friend class RDMInflatorTest; public: // These are pointers so the callers don't have to pull in all the headers. typedef ola::Callback3 RDMMessageHandler; RDMInflator(); ~RDMInflator() {} uint32_t Id() const { return ola::acn::VECTOR_FRAMING_RDMNET; } void SetRDMHandler(RDMMessageHandler *handler); static const unsigned int VECTOR_RDMNET_DATA = 0xcc; protected: bool DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int len, unsigned int *bytes_used); void ResetHeaderField() {} // namespace noop virtual bool HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_len); private: std::auto_ptr m_rdm_handler; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_RDMINFLATOR_H_ ola-0.10.9/libs/acn/E131PDU.h0000664000175000017500000000367414376533110012141 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131PDU.h * Interface for the E131PDU class * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_E131PDU_H_ #define LIBS_ACN_E131PDU_H_ #include "libs/acn/PDU.h" #include "libs/acn/E131Header.h" namespace ola { namespace acn { class DMPPDU; class E131PDU: public PDU { public: E131PDU(unsigned int vector, const E131Header &header, const DMPPDU *dmp_pdu): PDU(vector), m_header(header), m_dmp_pdu(dmp_pdu), m_data(NULL), m_data_size(0) {} E131PDU(unsigned int vector, const E131Header &header, const uint8_t *data, unsigned int data_size): PDU(vector), m_header(header), m_dmp_pdu(NULL), m_data(data), m_data_size(data_size) {} ~E131PDU() {} unsigned int HeaderSize() const; unsigned int DataSize() const; bool PackHeader(uint8_t *data, unsigned int *length) const; bool PackData(uint8_t *data, unsigned int *length) const; void PackHeader(ola::io::OutputStream *stream) const; void PackData(ola::io::OutputStream *stream) const; private: E131Header m_header; const DMPPDU *m_dmp_pdu; const uint8_t *m_data; const unsigned int m_data_size; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_E131PDU_H_ ola-0.10.9/libs/acn/DMPE131Inflator.h0000664000175000017500000000567114376533110013627 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPE131Inflator.h * This is a subclass of the DMPInflator which knows how to handle DMP over * E1.31 messages. * Copyright (C) 2009 Simon Newton */ #ifndef LIBS_ACN_DMPE131INFLATOR_H_ #define LIBS_ACN_DMPE131INFLATOR_H_ #include #include #include "ola/Clock.h" #include "ola/Callback.h" #include "ola/DmxBuffer.h" #include "libs/acn/DMPInflator.h" namespace ola { namespace acn { class DMPE131Inflator: public DMPInflator { friend class DMPE131InflatorTest; public: explicit DMPE131Inflator(bool ignore_preview): DMPInflator(), m_ignore_preview(ignore_preview) { } ~DMPE131Inflator(); bool SetHandler(uint16_t universe, ola::DmxBuffer *buffer, uint8_t *priority, ola::Callback0 *handler); bool RemoveHandler(uint16_t universe); void RegisteredUniverses(std::vector *universes); protected: virtual bool HandlePDUData(uint32_t vector, const HeaderSet &headers, const uint8_t *data, unsigned int pdu_len); private: typedef struct { ola::acn::CID cid; uint8_t sequence; TimeStamp last_heard_from; DmxBuffer buffer; } dmx_source; typedef struct { DmxBuffer *buffer; Callback0 *closure; uint8_t active_priority; uint8_t *priority; std::vector sources; } universe_handler; typedef std::map UniverseHandlers; UniverseHandlers m_handlers; bool m_ignore_preview; ola::Clock m_clock; bool TrackSourceIfRequired(universe_handler *universe_data, const HeaderSet &headers, DmxBuffer **buffer); // The max number of sources we'll track per universe. static const uint8_t MAX_MERGE_SOURCES = 6; // The max merge priority. static const uint8_t MAX_E131_PRIORITY = 200; // ignore packets that differ by less than this amount from the last one static const int8_t SEQUENCE_DIFF_THRESHOLD = -20; // expire sources after 2.5s static const TimeInterval EXPIRY_INTERVAL; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_DMPE131INFLATOR_H_ ola-0.10.9/libs/acn/E131TestFramework.cpp0000664000175000017500000001334214376533110014632 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131TestFramework.cpp * Allows testing of a remote E1.31 implementation. * Copyright (C) 2010 Simon Newton * * The remote node needs to be listening for Universe 1. */ #include #include #include #include #include #include "ola/acn/CID.h" #include "ola/Callback.h" #include "ola/Constants.h" #include "ola/DmxBuffer.h" #include "ola/Logging.h" #include "ola/io/SelectServer.h" #include "ola/io/StdinHandler.h" #include "ola/network/Socket.h" #include "libs/acn/E131Node.h" #include "libs/acn/E131TestFramework.h" using ola::DmxBuffer; using ola::acn::CID; using ola::io::SelectServer; using ola::io::StdinHandler; using ola::acn::E131Node; using std::cout; using std::endl; using std::string; using std::vector; StateManager::StateManager(const std::vector &states, bool interactive_mode) : m_interactive(interactive_mode), m_count(0), m_ticker(0), m_local_node(NULL), m_node1(NULL), m_node2(NULL), m_ss(NULL), m_stdin_handler(NULL), m_states(states) { } bool StateManager::Init() { m_cid1 = CID::Generate(); m_cid2 = CID::Generate(); m_ss = new SelectServer(); // setup notifications for stdin m_stdin_handler.reset(new StdinHandler( m_ss, ola::NewCallback(this, &StateManager::Input))); if (!m_interactive) { // local node test CID local_cid = CID::Generate(); m_local_node = new E131Node(m_ss, "", E131Node::Options(), local_cid); assert(m_local_node->Start()); assert(m_ss->AddReadDescriptor(m_local_node->GetSocket())); assert(m_local_node->SetHandler( UNIVERSE_ID, &m_recv_buffer, NULL, // don't track the priority ola::NewCallback(this, &StateManager::NewDMX))); } E131Node::Options options1; options1.port = 5567; E131Node::Options options2(options1); options1.port = 5569; m_node1 = new E131Node(m_ss, "", options1, m_cid1); m_node2 = new E131Node(m_ss, "", options2, m_cid2); assert(m_node1->Start()); assert(m_node2->Start()); assert(m_ss->AddReadDescriptor(m_node1->GetSocket())); assert(m_ss->AddReadDescriptor(m_node2->GetSocket())); m_node1->SetSourceName(UNIVERSE_ID, "E1.31 Merge Test Node 1"); m_node2->SetSourceName(UNIVERSE_ID, "E1.31 Merge Test Node 2"); // tick every 200ms m_ss->RegisterRepeatingTimeout( TICK_INTERVAL_MS, ola::NewCallback(this, &StateManager::Tick)); cout << endl; cout << "========= E1.31 Tester ==========" << endl; if (m_interactive) { cout << "Space for the next state, 'e' for expected results, 'q' to quit" << endl; } EnterState(m_states[0]); return true; } StateManager::~StateManager() { if (m_node1) { m_ss->RemoveReadDescriptor(m_node1->GetSocket()); delete m_node1; } if (m_node2) { m_ss->RemoveReadDescriptor(m_node2->GetSocket()); delete m_node2; } if (m_local_node) { m_ss->RemoveReadDescriptor(m_local_node->GetSocket()); delete m_local_node; } m_stdin_handler.reset(); delete m_ss; } bool StateManager::Tick() { if (m_ticker > (TIME_PER_STATE_MS / TICK_INTERVAL_MS) && !m_interactive) { NextState(); if (m_count == m_states.size()) { return false; } } else { m_ticker++; } m_states[m_count]->Tick(); switch (m_ticker % 4) { case 0: cout << "|"; break; case 1: cout << "/"; break; case 2: cout << "-"; break; case 3: cout << "\\"; break; } cout << '\b' << std::flush; return true; } void StateManager::Input(int c) { switch (c) { case 'e': cout << m_states[m_count]->ExpectedResults() << endl; break; case 'q': m_ss->Terminate(); ShowStatus(); break; case ' ': NextState(); break; default: break; } } /* * Called when new DMX is received by the local node */ void StateManager::NewDMX() { if (!m_states[m_count]->Verify(m_recv_buffer)) { cout << "FAILED TEST" << endl; } } /* * Switch states */ void StateManager::EnterState(TestState *state) { cout << "------------------------------------" << endl; cout << "Test Case: " << static_cast(m_count + 1) << "/" << m_states.size() << endl; cout << "Test Name: " << state->StateName() << endl; state->SetNodes(m_node1, m_node2); m_ticker = 0; } void StateManager::NextState() { if (!m_states[m_count]->Passed()) { m_failed_tests.push_back(m_states[m_count]); } m_count++; if (m_count == m_states.size()) { cout << "------------------------------------" << endl; cout << "Tests complete!" << endl; ShowStatus(); m_ss->Terminate(); } else { EnterState(m_states[m_count]); } } void StateManager::ShowStatus() { if (!m_failed_tests.empty()) { cout << "Some tests failed:" << endl; vector::iterator iter; for (iter = m_failed_tests.begin(); iter != m_failed_tests.end(); ++iter) { cout << " " << (*iter)->StateName() << endl; } } else { cout << "All tests passed." << endl; } } ola-0.10.9/libs/acn/TransportHeader.h0000664000175000017500000000436614376533110014263 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * TransportHeader.h * Interface for the TransportHeader class. * This holds the source IP of the packet which is used to address replies * correctly. At some point in the future we should try to abstract the * transport protocol (IP/UDP in this case). * Copyright (C) 2011 Simon Newton */ #ifndef LIBS_ACN_TRANSPORTHEADER_H_ #define LIBS_ACN_TRANSPORTHEADER_H_ #include "ola/network/SocketAddress.h" namespace ola { namespace acn { /* * The header for the transport layer */ class TransportHeader { public: enum TransportType { TCP, UDP, UNDEFINED, }; TransportHeader() : m_transport_type(UNDEFINED) {} TransportHeader(const TransportHeader& other) : m_source(other.m_source), m_transport_type(other.m_transport_type) {} TransportHeader(const ola::network::IPV4SocketAddress &source, TransportType type) : m_source(source), m_transport_type(type) {} ~TransportHeader() {} const ola::network::IPV4SocketAddress& Source() const { return m_source; } TransportType Transport() const { return m_transport_type; } bool operator==(const TransportHeader &other) const { return (m_source == other.m_source && m_transport_type == other.m_transport_type); } void operator=(const TransportHeader &other) { m_source = other.m_source; m_transport_type = other.m_transport_type; } private: ola::network::IPV4SocketAddress m_source; TransportType m_transport_type; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_TRANSPORTHEADER_H_ ola-0.10.9/libs/acn/Makefile.mk0000664000175000017500000001107414376533110013045 00000000000000COMMON_E131_CXXFLAGS = $(COMMON_CXXFLAGS) -Wconversion # pkg-config ################################################## if INSTALL_E133 pkgconfig_DATA += libs/acn/libolaacn.pc endif # LIBRARIES ################################################## if INSTALL_ACN lib_LTLIBRARIES += libs/acn/libolaacn.la else noinst_LTLIBRARIES += libs/acn/libolaacn.la endif # libolaacn.la libs_acn_libolaacn_la_SOURCES = \ libs/acn/CID.cpp \ libs/acn/CIDImpl.cpp \ libs/acn/CIDImpl.h libs_acn_libolaacn_la_CXXFLAGS = $(COMMON_E131_CXXFLAGS) $(uuid_CFLAGS) libs_acn_libolaacn_la_LIBADD = $(uuid_LIBS) \ common/libolacommon.la # libolae131core.la # This needs to be after libolaacn.la since it depends on it. Otherwise it # breaks the freeBSD build noinst_LTLIBRARIES += libs/acn/libolae131core.la libs_acn_libolae131core_la_SOURCES = \ libs/acn/BaseInflator.cpp \ libs/acn/BaseInflator.h \ libs/acn/DMPAddress.cpp \ libs/acn/DMPAddress.h \ libs/acn/DMPE131Inflator.cpp \ libs/acn/DMPE131Inflator.h \ libs/acn/DMPHeader.h \ libs/acn/DMPInflator.cpp \ libs/acn/DMPInflator.h \ libs/acn/DMPPDU.cpp \ libs/acn/DMPPDU.h \ libs/acn/E131DiscoveryInflator.cpp \ libs/acn/E131DiscoveryInflator.h \ libs/acn/E131Header.h \ libs/acn/E131Inflator.cpp \ libs/acn/E131Inflator.h \ libs/acn/E131Node.cpp \ libs/acn/E131Node.h \ libs/acn/E131PDU.cpp \ libs/acn/E131PDU.h \ libs/acn/E131Sender.cpp \ libs/acn/E131Sender.h \ libs/acn/E133Header.h \ libs/acn/E133Inflator.cpp \ libs/acn/E133Inflator.h \ libs/acn/E133PDU.cpp \ libs/acn/E133PDU.h \ libs/acn/E133StatusInflator.cpp \ libs/acn/E133StatusInflator.h \ libs/acn/E133StatusPDU.cpp \ libs/acn/E133StatusPDU.h \ libs/acn/HeaderSet.h \ libs/acn/PDU.cpp \ libs/acn/PDU.h \ libs/acn/PDUTestCommon.h \ libs/acn/PreamblePacker.cpp \ libs/acn/PreamblePacker.h \ libs/acn/RDMInflator.cpp \ libs/acn/RDMInflator.h \ libs/acn/RDMPDU.cpp \ libs/acn/RDMPDU.h \ libs/acn/RootHeader.h \ libs/acn/RootInflator.cpp \ libs/acn/RootInflator.h \ libs/acn/RootPDU.cpp \ libs/acn/RootPDU.h \ libs/acn/RootSender.cpp \ libs/acn/RootSender.h \ libs/acn/TCPTransport.cpp \ libs/acn/TCPTransport.h \ libs/acn/Transport.h \ libs/acn/TransportHeader.h \ libs/acn/UDPTransport.cpp \ libs/acn/UDPTransport.h libs_acn_libolae131core_la_CXXFLAGS = \ $(COMMON_E131_CXXFLAGS) $(uuid_CFLAGS) libs_acn_libolae131core_la_LIBADD = $(uuid_LIBS) \ common/libolacommon.la \ libs/acn/libolaacn.la # PROGRAMS ################################################## noinst_PROGRAMS += libs/acn/e131_transmit_test \ libs/acn/e131_loadtest libs_acn_e131_transmit_test_SOURCES = \ libs/acn/e131_transmit_test.cpp \ libs/acn/E131TestFramework.cpp \ libs/acn/E131TestFramework.h libs_acn_e131_transmit_test_LDADD = libs/acn/libolae131core.la libs_acn_e131_loadtest_SOURCES = libs/acn/e131_loadtest.cpp libs_acn_e131_loadtest_LDADD = libs/acn/libolae131core.la # TESTS ################################################## test_programs += \ libs/acn/E131Tester \ libs/acn/E133Tester \ libs/acn/TransportTester libs_acn_E131Tester_SOURCES = \ libs/acn/BaseInflatorTest.cpp \ libs/acn/CIDTest.cpp \ libs/acn/DMPAddressTest.cpp \ libs/acn/DMPInflatorTest.cpp \ libs/acn/DMPPDUTest.cpp \ libs/acn/E131InflatorTest.cpp \ libs/acn/E131PDUTest.cpp \ libs/acn/HeaderSetTest.cpp \ libs/acn/PDUTest.cpp \ libs/acn/RootInflatorTest.cpp \ libs/acn/RootPDUTest.cpp \ libs/acn/RootSenderTest.cpp libs_acn_E131Tester_CPPFLAGS = $(COMMON_TESTING_FLAGS) # For some completely messed up reason on mac CPPUNIT_LIBS has to come after # the ossp uuid library. # CPPUNIT_LIBS contains -ldl which causes the tests to fail in strange ways libs_acn_E131Tester_LDADD = \ libs/acn/libolae131core.la \ $(COMMON_TESTING_LIBS) libs_acn_E133Tester_SOURCES = \ libs/acn/E133InflatorTest.cpp \ libs/acn/E133PDUTest.cpp \ libs/acn/RDMPDUTest.cpp libs_acn_E133Tester_CPPFLAGS = $(COMMON_TESTING_FLAGS) libs_acn_E133Tester_LDADD = \ libs/acn/libolae131core.la \ $(COMMON_TESTING_LIBS) libs_acn_TransportTester_SOURCES = \ libs/acn/TCPTransportTest.cpp \ libs/acn/UDPTransportTest.cpp libs_acn_TransportTester_CPPFLAGS = $(COMMON_TESTING_FLAGS) libs_acn_TransportTester_LDADD = libs/acn/libolae131core.la \ $(COMMON_TESTING_LIBS) ola-0.10.9/libs/acn/DMPHeader.h0000664000175000017500000000454614376533110012707 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPHeader.h * The DMP Header * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_DMPHEADER_H_ #define LIBS_ACN_DMPHEADER_H_ #include #include "libs/acn/DMPAddress.h" namespace ola { namespace acn { /* * Header for the DMP layer */ class DMPHeader { public: static const unsigned int DMP_HEADER_SIZE = 1; explicit DMPHeader(uint8_t header = 0): m_header(header) {} DMPHeader(bool is_virtual, bool is_relative, dmp_address_type type, dmp_address_size size) { m_header = (uint8_t) (is_virtual << 7 | is_relative << 6 | type << 4 | size); } ~DMPHeader() {} bool IsVirtual() const { return m_header & VIRTUAL_MASK; } bool IsRelative() const { return m_header & RELATIVE_MASK; } dmp_address_type Type() const { return (dmp_address_type) ((m_header & TYPE_MASK) >> 4); } dmp_address_size Size() const { return (dmp_address_size) (m_header & SIZE_MASK); } unsigned int Bytes() const { return DMPSizeToByteSize(Size()); } bool operator==(const DMPHeader &other) const { return m_header == other.m_header; } bool operator!=(const DMPHeader &other) const { return m_header != other.m_header; } uint8_t Header() const { return m_header; } private: static const uint8_t VIRTUAL_MASK = 0x80; static const uint8_t RELATIVE_MASK = 0x40; static const uint8_t TYPE_MASK = 0x30; static const uint8_t SIZE_MASK = 0x03; uint8_t m_header; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_DMPHEADER_H_ ola-0.10.9/libs/acn/E131Inflator.h0000664000175000017500000000464514376533110013266 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131Inflator.h * Interface for the E131Inflator class. * Copyright (C) 2009 Simon Newton * * This contains two inflators a E131Inflator as per the standard and an * E131InflatorRev2 which implements the revision 2 draft specification. */ #ifndef LIBS_ACN_E131INFLATOR_H_ #define LIBS_ACN_E131INFLATOR_H_ #include "ola/acn/ACNVectors.h" #include "libs/acn/BaseInflator.h" #include "libs/acn/E131Header.h" namespace ola { namespace acn { class E131Inflator: public BaseInflator { friend class E131InflatorTest; public: E131Inflator(): BaseInflator(), m_last_header_valid(false) { } ~E131Inflator() {} uint32_t Id() const { return ola::acn::VECTOR_ROOT_E131; } protected: bool DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int len, unsigned int *bytes_used); void ResetHeaderField() { m_last_header_valid = false; } private: E131Header m_last_header; bool m_last_header_valid; }; /* * A Revision 2 version of the inflator. */ class E131InflatorRev2: public BaseInflator { friend class E131InflatorTest; public: E131InflatorRev2(): BaseInflator(), m_last_header_valid(false) { } ~E131InflatorRev2() {} uint32_t Id() const { return ola::acn::VECTOR_ROOT_E131_REV2; } protected: bool DecodeHeader(HeaderSet *headers, const uint8_t *data, unsigned int len, unsigned int *bytes_used); void ResetHeaderField() { m_last_header_valid = false; } private: E131Header m_last_header; bool m_last_header_valid; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_E131INFLATOR_H_ ola-0.10.9/libs/acn/E131Sender.cpp0000664000175000017500000000736614376533110013266 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131Sender.cpp * The E131Sender * Copyright (C) 2007 Simon Newton */ #include "ola/Logging.h" #include "ola/acn/ACNVectors.h" #include "ola/network/IPV4Address.h" #include "ola/network/NetworkUtils.h" #include "ola/util/Utils.h" #include "libs/acn/DMPE131Inflator.h" #include "libs/acn/E131Inflator.h" #include "libs/acn/E131Sender.h" #include "libs/acn/E131PDU.h" #include "libs/acn/RootSender.h" #include "libs/acn/UDPTransport.h" namespace ola { namespace acn { using ola::network::IPV4Address; using ola::network::HostToNetwork; /* * Create a new E131Sender * @param root_sender the root layer to use */ E131Sender::E131Sender(ola::network::UDPSocket *socket, RootSender *root_sender) : m_socket(socket), m_transport_impl(socket, &m_packer), m_root_sender(root_sender) { if (!m_root_sender) { OLA_WARN << "root_sender is null, this won't work"; } } /* * Send a DMPPDU * @param header the E131Header * @param dmp_pdu the DMPPDU to send */ bool E131Sender::SendDMP(const E131Header &header, const DMPPDU *dmp_pdu) { if (!m_root_sender) { return false; } IPV4Address addr; if (!UniverseIP(header.Universe(), &addr)) { OLA_INFO << "Could not convert universe " << header.Universe() << " to IP."; return false; } OutgoingUDPTransport transport(&m_transport_impl, addr); E131PDU pdu(ola::acn::VECTOR_E131_DATA, header, dmp_pdu); unsigned int vector = ola::acn::VECTOR_ROOT_E131; if (header.UsingRev2()) { vector = ola::acn::VECTOR_ROOT_E131_REV2; } return m_root_sender->SendPDU(vector, pdu, &transport); } bool E131Sender::SendDiscoveryData(const E131Header &header, const uint8_t *data, unsigned int data_size) { if (!m_root_sender) { return false; } IPV4Address addr; if (!UniverseIP(header.Universe(), &addr)) { OLA_INFO << "Could not convert universe " << header.Universe() << " to IP."; return false; } OutgoingUDPTransport transport(&m_transport_impl, addr); E131PDU pdu(ola::acn::VECTOR_E131_DISCOVERY, header, data, data_size); unsigned int vector = ola::acn::VECTOR_ROOT_E131; return m_root_sender->SendPDU(vector, pdu, &transport); } /* * Calculate the IP that corresponds to a universe. * @param universe the universe id * @param addr where to store the address * @return true if this is a valid E1.31 universe, false otherwise */ bool E131Sender::UniverseIP(uint16_t universe, IPV4Address *addr) { uint8_t universe_high; uint8_t universe_low; ola::utils::SplitUInt16(universe, &universe_high, &universe_low); *addr = IPV4Address( HostToNetwork(ola::utils::JoinUInt8(239, 255, universe_high, universe_low))); if (universe && (universe != 0xFFFF)) { return true; } OLA_WARN << "Universe " << universe << " isn't a valid E1.31 universe"; return false; } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/E131PDUTest.cpp0000664000175000017500000001164314376533110013327 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131PDUTest.cpp * Test fixture for the E131PDU class * Copyright (C) 2005 Simon Newton */ #include #include #include #include "ola/network/NetworkUtils.h" #include "libs/acn/PDUTestCommon.h" #include "libs/acn/E131PDU.h" #include "ola/testing/TestUtils.h" namespace ola { namespace acn { using ola::network::HostToNetwork; using std::string; class E131PDUTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(E131PDUTest); CPPUNIT_TEST(testSimpleRev2E131PDU); CPPUNIT_TEST(testSimpleE131PDU); CPPUNIT_TEST(testNestedE131PDU); CPPUNIT_TEST_SUITE_END(); public: void testSimpleRev2E131PDU(); void testSimpleE131PDU(); void testNestedE131PDU(); private: static const unsigned int TEST_VECTOR; }; CPPUNIT_TEST_SUITE_REGISTRATION(E131PDUTest); const unsigned int E131PDUTest::TEST_VECTOR = 39; /* * Test that packing a E131PDU without data works. */ void E131PDUTest::testSimpleRev2E131PDU() { const string source = "foo source"; E131Rev2Header header(source, 1, 2, 6000); E131PDU pdu(TEST_VECTOR, header, NULL); OLA_ASSERT_EQ((unsigned int) 36, pdu.HeaderSize()); OLA_ASSERT_EQ((unsigned int) 0, pdu.DataSize()); OLA_ASSERT_EQ((unsigned int) 42, pdu.Size()); unsigned int size = pdu.Size(); uint8_t *data = new uint8_t[size]; unsigned int bytes_used = size; OLA_ASSERT(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ((unsigned int) size, bytes_used); // spot check the data OLA_ASSERT_EQ((uint8_t) 0x70, data[0]); OLA_ASSERT_EQ((uint8_t) bytes_used, data[1]); unsigned int actual_value; memcpy(&actual_value, data + 2, sizeof(actual_value)); OLA_ASSERT_EQ((unsigned int) HostToNetwork(TEST_VECTOR), actual_value); OLA_ASSERT_FALSE(memcmp(&data[6], source.data(), source.length())); OLA_ASSERT_EQ((uint8_t) 1, data[6 + E131Rev2Header::REV2_SOURCE_NAME_LEN]); OLA_ASSERT_EQ((uint8_t) 2, data[7 + E131Rev2Header::REV2_SOURCE_NAME_LEN]); OLA_ASSERT_EQ( HostToNetwork((uint16_t) 6000), *(reinterpret_cast( data + 8 + E131Rev2Header::REV2_SOURCE_NAME_LEN))); // test undersized buffer bytes_used = size - 1; OLA_ASSERT_FALSE(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); // test oversized buffer bytes_used = size + 1; OLA_ASSERT(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ((unsigned int) size, bytes_used); delete[] data; } /* * Test that packing a E131PDU without data works. */ void E131PDUTest::testSimpleE131PDU() { const string source = "foo source"; E131Header header(source, 1, 2, 6000, true, true); E131PDU pdu(TEST_VECTOR, header, NULL); OLA_ASSERT_EQ((unsigned int) 71, pdu.HeaderSize()); OLA_ASSERT_EQ((unsigned int) 0, pdu.DataSize()); OLA_ASSERT_EQ((unsigned int) 77, pdu.Size()); unsigned int size = pdu.Size(); uint8_t *data = new uint8_t[size]; unsigned int bytes_used = size; OLA_ASSERT(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ((unsigned int) size, bytes_used); // spot check the data OLA_ASSERT_EQ((uint8_t) 0x70, data[0]); OLA_ASSERT_EQ((uint8_t) bytes_used, data[1]); unsigned int actual_value; memcpy(&actual_value, data + 2, sizeof(actual_value)); OLA_ASSERT_EQ((unsigned int) HostToNetwork(TEST_VECTOR), actual_value); OLA_ASSERT_FALSE(memcmp(&data[6], source.data(), source.length())); OLA_ASSERT_EQ((uint8_t) 1, data[6 + E131Header::SOURCE_NAME_LEN]); OLA_ASSERT_EQ((uint8_t) 2, data[9 + E131Header::SOURCE_NAME_LEN]); uint16_t actual_universe; memcpy(&actual_universe, data + 11 + E131Header::SOURCE_NAME_LEN, sizeof(actual_universe)); OLA_ASSERT_EQ(HostToNetwork((uint16_t) 6000), actual_universe); // test undersized buffer bytes_used = size - 1; OLA_ASSERT_FALSE(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ((unsigned int) 0, bytes_used); // test oversized buffer bytes_used = size + 1; OLA_ASSERT(pdu.Pack(data, &bytes_used)); OLA_ASSERT_EQ((unsigned int) size, bytes_used); delete[] data; } /* * Test that packing a E131PDU with nested data works */ void E131PDUTest::testNestedE131PDU() { // TODO(simon): add this test } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/DMPPDU.h0000664000175000017500000002173314376533110012144 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMPPDU.h * Interface for the DMP PDU * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_DMPPDU_H_ #define LIBS_ACN_DMPPDU_H_ #include #include #include "ola/acn/ACNVectors.h" #include "libs/acn/DMPAddress.h" #include "libs/acn/DMPHeader.h" #include "libs/acn/PDU.h" namespace ola { namespace acn { /* * The base DMPPDU class. * More specific dmp pdus like the SetPropery inherit from this. */ class DMPPDU: public PDU { public: DMPPDU(unsigned int vector, const DMPHeader &dmp_header): PDU(vector, ONE_BYTE), m_header(dmp_header) { } ~DMPPDU() {} unsigned int HeaderSize() const { return DMPHeader::DMP_HEADER_SIZE; } bool PackHeader(uint8_t *data, unsigned int *length) const; void PackHeader(ola::io::OutputStream *stream) const; protected: DMPHeader m_header; }; /* * A DMPGetPropertyPDU, templatized by the address type. * Don't create these directly, instead use the helper function below which * enforces compile time consistency. */ template class DMPGetProperty: public DMPPDU { public: DMPGetProperty(const DMPHeader &header, const std::vector
&addresses): DMPPDU(ola::acn::DMP_GET_PROPERTY_VECTOR, header), m_addresses(addresses) {} unsigned int DataSize() const { return static_cast(m_addresses.size() * m_header.Bytes() * (m_header.Type() == NON_RANGE ? 1 : 3)); } bool PackData(uint8_t *data, unsigned int *length) const { typename std::vector
::const_iterator iter; unsigned int offset = 0; for (iter = m_addresses.begin(); iter != m_addresses.end(); ++iter) { unsigned int remaining = *length - offset; if (!iter->Pack(data + offset, &remaining)) return false; offset += remaining; } *length = offset; return true; } void PackData(ola::io::OutputStream *stream) const { typename std::vector
::const_iterator iter; for (iter = m_addresses.begin(); iter != m_addresses.end(); ++iter) iter->Write(stream); } private: std::vector
m_addresses; }; /* * Create a non-ranged GetProperty PDU * @param type uint8_t, uint16_t or uint32_t * @param is_virtual set to true if this is a virtual address * @param is_relative set to true if this is a relative address * @param addresses a vector of DMPAddress objects */ template const DMPPDU *NewDMPGetProperty( bool is_virtual, bool is_relative, const std::vector > &addresses) { DMPHeader header(is_virtual, is_relative, NON_RANGE, TypeToDMPSize()); return new DMPGetProperty >(header, addresses); } /* * Create a non-ranged DMP GetProperty PDU * @param type uint8_t, uint16_t, uint32_t */ template const DMPPDU *_CreateDMPGetProperty(bool is_virtual, bool is_relative, unsigned int start) { DMPAddress address((type) start); std::vector > addresses; addresses.push_back(address); return NewDMPGetProperty(is_virtual, is_relative, addresses); } /* * A helper to create a new single, non-ranged GetProperty PDU. * @param is_virtual set to true if this is a virtual address * @param is_relative set to true if this is a relative address * @param start the start offset * @return A pointer to a DMPPDU. */ const DMPPDU *NewDMPGetProperty(bool is_virtual, bool is_relative, unsigned int start); /* * Create a Ranged DMP GetProperty Message. * @param type uint8_t, uint16_t or uint32_t * @param is_virtual set to true if this is a virtual address * @param is_relative set to true if this is a relative address * @param addresses a vector of addresses that match the type * @return A pointer to a DMPPDU. */ template const DMPPDU *NewRangeDMPGetProperty( bool is_virtual, bool is_relative, const std::vector > &addresses) { DMPHeader header(is_virtual, is_relative, RANGE_SINGLE, TypeToDMPSize()); return new DMPGetProperty >(header, addresses); } template const DMPPDU *_CreateRangeDMPGetProperty(bool is_virtual, bool is_relative, unsigned int start, unsigned int increment, unsigned int number) { std::vector > addresses; RangeDMPAddress address((type) start, (type) increment, (type) number); addresses.push_back(address); return NewRangeDMPGetProperty(is_virtual, is_relative, addresses); } /* * A helper to create a new ranged address GetProperty PDU. * @param is_virtual set to true if this is a virtual address * @param is_relative set to true if this is a relative address * @param start the start offset * @param increment the increments between addresses * @param number the number of addresses defined * @return A pointer to a DMPGetProperty. */ const DMPPDU *NewRangeDMPGetProperty( bool is_virtual, bool is_relative, unsigned int start, unsigned int increment, unsigned int number); /* * A DMPSetPropertyPDU, templatized by the address type. * Don't create these directly, instead use the helper functions below which * enforce compile time consistency. * @param type either DMPAddress<> or RangeDMPAddress<> */ template class DMPSetProperty: public DMPPDU { public: typedef std::vector > AddressDataChunks; DMPSetProperty(const DMPHeader &header, const AddressDataChunks &chunks): DMPPDU(ola::acn::DMP_SET_PROPERTY_VECTOR, header), m_chunks(chunks) {} unsigned int DataSize() const { typename AddressDataChunks::const_iterator iter; unsigned int length = 0; for (iter = m_chunks.begin(); iter != m_chunks.end(); ++iter) length += iter->Size(); return length; } bool PackData(uint8_t *data, unsigned int *length) const { typename AddressDataChunks::const_iterator iter; unsigned int offset = 0; for (iter = m_chunks.begin(); iter != m_chunks.end(); ++iter) { unsigned int remaining = *length - offset; if (!iter->Pack(data + offset, &remaining)) return false; offset += remaining; } *length = offset; return true; } void PackData(ola::io::OutputStream *stream) const { typename AddressDataChunks::const_iterator iter; for (iter = m_chunks.begin(); iter != m_chunks.end(); ++iter) iter->Write(stream); } private: AddressDataChunks m_chunks; }; /* * Create a new DMP SetProperty Message */ template const DMPPDU *NewDMPSetProperty( bool is_virtual, bool is_relative, const std::vector > > &chunks) { DMPHeader header(is_virtual, is_relative, NON_RANGE, TypeToDMPSize()); return new DMPSetProperty >(header, chunks); } /* * Create a new DMP SetProperty PDU * @param type either DMPAddress or RangeDMPAddress * @param is_virtual set to true if this is a virtual address * @param is_relative set to true if this is a relative address * @param chunks a vector of DMPAddressData objects */ template const DMPPDU *NewRangeDMPSetProperty( bool is_virtual, bool is_relative, const std::vector > > &chunks, bool multiple_elements = true, bool equal_size_elements = true) { dmp_address_type address_type; if (multiple_elements) { if (equal_size_elements) address_type = RANGE_EQUAL; else address_type = RANGE_MIXED; } else { address_type = RANGE_SINGLE; } DMPHeader header(is_virtual, is_relative, address_type, TypeToDMPSize()); return new DMPSetProperty >(header, chunks); } } // namespace acn } // namespace ola #endif // LIBS_ACN_DMPPDU_H_ ola-0.10.9/libs/acn/RDMPDU.h0000664000175000017500000000212514376533110012140 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RDMPDU.h * The RDMPDU class * Copyright (C) 2012 Simon Newton */ #ifndef LIBS_ACN_RDMPDU_H_ #define LIBS_ACN_RDMPDU_H_ #include #include "libs/acn/PDU.h" namespace ola { namespace acn { class RDMPDU : private PDU { public: static void PrependPDU(ola::io::IOStack *stack); }; } // namespace acn } // namespace ola #endif // LIBS_ACN_RDMPDU_H_ ola-0.10.9/libs/acn/UDPTransportTest.cpp0000664000175000017500000000653514376533110014716 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * UDPTransportTest.cpp * Test fixture for the UDPTransport class * Copyright (C) 2005 Simon Newton */ #include #include #include "ola/Logging.h" #include "ola/io/SelectServer.h" #include "ola/network/InterfacePicker.h" #include "ola/network/NetworkUtils.h" #include "ola/network/Socket.h" #include "ola/testing/TestUtils.h" #include "libs/acn/PDUTestCommon.h" #include "libs/acn/UDPTransport.h" namespace ola { namespace acn { using ola::acn::CID; using ola::network::HostToNetwork; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; class UDPTransportTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(UDPTransportTest); CPPUNIT_TEST(testUDPTransport); CPPUNIT_TEST_SUITE_END(); public: UDPTransportTest(): TestFixture(), m_ss(NULL) {} void testUDPTransport(); void setUp(); void tearDown(); void Stop(); void FatalStop() { OLA_ASSERT(false); } private: ola::io::SelectServer *m_ss; static const int ABORT_TIMEOUT_IN_MS = 1000; }; CPPUNIT_TEST_SUITE_REGISTRATION(UDPTransportTest); void UDPTransportTest::setUp() { m_ss = new ola::io::SelectServer(); } void UDPTransportTest::tearDown() { delete m_ss; } void UDPTransportTest::Stop() { if (m_ss) m_ss->Terminate(); } /* * Test the UDPTransport */ void UDPTransportTest::testUDPTransport() { CID cid; std::auto_ptr > stop_closure( NewCallback(this, &UDPTransportTest::Stop)); MockInflator inflator(cid, stop_closure.get()); // setup the socket ola::network::UDPSocket socket; OLA_ASSERT(socket.Init()); OLA_ASSERT(socket.Bind(IPV4SocketAddress(IPV4Address::Loopback(), 0))); OLA_ASSERT(socket.EnableBroadcast()); // Get the port we bound to. IPV4SocketAddress local_address; OLA_ASSERT(socket.GetSocketAddress(&local_address)); IncomingUDPTransport incoming_udp_transport(&socket, &inflator); socket.SetOnData(NewCallback(&incoming_udp_transport, &IncomingUDPTransport::Receive)); OLA_ASSERT(m_ss->AddReadDescriptor(&socket)); // outgoing transport OutgoingUDPTransportImpl udp_transport_impl(&socket); OutgoingUDPTransport outgoing_udp_transport(&udp_transport_impl, IPV4Address::Loopback(), local_address.Port()); // now actually send some data PDUBlock pdu_block; MockPDU mock_pdu(4, 8); pdu_block.AddPDU(&mock_pdu); OLA_ASSERT(outgoing_udp_transport.Send(pdu_block)); SingleUseCallback0 *closure = NewSingleCallback(this, &UDPTransportTest::FatalStop); m_ss->RegisterSingleTimeout(ABORT_TIMEOUT_IN_MS, closure); m_ss->Run(); } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/TCPTransportTest.cpp0000664000175000017500000001660114376533110014707 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * TCPTransportTest.cpp * Test fixture for the TCPTransport class * Copyright (C) 2012 Simon Newton */ #include #include #include #include "ola/Clock.h" #include "ola/Logging.h" #include "ola/io/IOQueue.h" #include "ola/io/IOStack.h" #include "ola/io/SelectServer.h" #include "libs/acn/PDUTestCommon.h" #include "libs/acn/PreamblePacker.h" #include "libs/acn/TCPTransport.h" #include "ola/testing/TestUtils.h" namespace ola { namespace acn { using ola::TimeInterval; using ola::acn::CID; using ola::io::IOQueue; using ola::io::IOStack; using ola::network::IPV4SocketAddress; using std::auto_ptr; using std::string; class TCPTransportTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(TCPTransportTest); CPPUNIT_TEST(testSinglePDU); CPPUNIT_TEST(testShortPreamble); CPPUNIT_TEST(testBadPreamble); CPPUNIT_TEST(testZeroLengthPDUBlock); CPPUNIT_TEST(testMultiplePDUs); CPPUNIT_TEST(testSinglePDUBlock); CPPUNIT_TEST_SUITE_END(); public: TCPTransportTest(): TestFixture(), m_ss(NULL) {} void testSinglePDU(); void testShortPreamble(); void testBadPreamble(); void testZeroLengthPDUBlock(); void testMultiplePDUs(); void testMultiplePDUsWithExtraData(); void testSinglePDUBlock(); void setUp(); void tearDown(); void Stop(); void FatalStop() { OLA_ASSERT(false); } void PDUReceived() { m_pdus_received++; } void Receive(); private: unsigned int m_pdus_received; bool m_stream_ok; ola::network::IPV4SocketAddress m_localhost; auto_ptr m_ss; ola::io::LoopbackDescriptor m_loopback; CID m_cid; auto_ptr > m_rx_callback; auto_ptr m_inflator; auto_ptr m_transport; void SendEmptyPDUBLock(const ola::testing::SourceLine &source_line); void SendPDU(const ola::testing::SourceLine &source_line); void SendPDUBlock(const ola::testing::SourceLine &source_line); void SendPacket(const ola::testing::SourceLine &source_line, IOStack *packet); static const int ABORT_TIMEOUT_IN_MS = 1000; }; CPPUNIT_TEST_SUITE_REGISTRATION(TCPTransportTest); void TCPTransportTest::setUp() { ola::InitLogging(ola::OLA_LOG_DEBUG, ola::OLA_LOG_STDERR); m_stream_ok = true; m_pdus_received = 0; m_localhost = IPV4SocketAddress::FromStringOrDie("127.0.0.1:9999"); // mock inflator CID cid; m_rx_callback.reset(NewCallback(this, &TCPTransportTest::PDUReceived)); m_inflator.reset(new MockInflator(m_cid, m_rx_callback.get())); // transport to test m_transport.reset( new IncomingStreamTransport(m_inflator.get(), &m_loopback, m_localhost)); // SelectServer m_ss.reset(new ola::io::SelectServer()); m_ss->RegisterSingleTimeout( ABORT_TIMEOUT_IN_MS, NewSingleCallback(this, &TCPTransportTest::FatalStop)); // loopback descriptor OLA_ASSERT(m_loopback.Init()); m_loopback.SetOnClose(NewSingleCallback(this, &TCPTransportTest::Stop)); m_loopback.SetOnData( NewCallback(this, &TCPTransportTest::Receive)); OLA_ASSERT(m_ss->AddReadDescriptor(&m_loopback)); } void TCPTransportTest::tearDown() { // Close the loopback descriptor and drain the ss m_loopback.Close(); m_ss->RunOnce(); } /** * Called when the descriptor is closed. */ void TCPTransportTest::Stop() { if (m_ss.get()) m_ss->Terminate(); } /** * Receive data and terminate if the stream is bad. */ void TCPTransportTest::Receive() { m_stream_ok = m_transport->Receive(); if (!m_stream_ok) m_ss->Terminate(); } /* * Send a single PDU. */ void TCPTransportTest::testSinglePDU() { OLA_ASSERT_EQ(0u, m_pdus_received); SendPDU(OLA_SOURCELINE()); m_ss->RunOnce(TimeInterval(1, 0)); m_loopback.CloseClient(); m_ss->RunOnce(TimeInterval(1, 0)); OLA_ASSERT(m_stream_ok); OLA_ASSERT_EQ(1u, m_pdus_received); } /** * Test a short preamble. */ void TCPTransportTest::testShortPreamble() { uint8_t bogus_data[] = { 1, 2, 3, 4, 1, 2, 3, 4}; m_loopback.Send(bogus_data, sizeof(bogus_data)); m_ss->RunOnce(TimeInterval(1, 0)); m_loopback.CloseClient(); m_ss->RunOnce(TimeInterval(1, 0)); OLA_ASSERT(m_stream_ok); OLA_ASSERT_EQ(0u, m_pdus_received); } /** * Test bogus data, this should show up as an invalid stream */ void TCPTransportTest::testBadPreamble() { uint8_t bogus_data[] = { 1, 2, 3, 4, 5, 0, 1, 0, 0, 4, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4}; m_loopback.Send(bogus_data, sizeof(bogus_data)); m_ss->RunOnce(TimeInterval(1, 0)); m_loopback.CloseClient(); m_ss->RunOnce(TimeInterval(1, 0)); OLA_ASSERT_FALSE(m_stream_ok); OLA_ASSERT_EQ(0u, m_pdus_received); } /** * Test a 0-length PDU block */ void TCPTransportTest::testZeroLengthPDUBlock() { SendEmptyPDUBLock(OLA_SOURCELINE()); SendPDU(OLA_SOURCELINE()); m_ss->RunOnce(TimeInterval(1, 0)); m_loopback.CloseClient(); m_ss->RunOnce(TimeInterval(1, 0)); OLA_ASSERT(m_stream_ok); OLA_ASSERT_EQ(1u, m_pdus_received); } /** * Send multiple PDUs. */ void TCPTransportTest::testMultiplePDUs() { SendPDU(OLA_SOURCELINE()); SendPDU(OLA_SOURCELINE()); SendPDU(OLA_SOURCELINE()); m_ss->RunOnce(TimeInterval(1, 0)); m_loopback.CloseClient(); m_ss->RunOnce(TimeInterval(1, 0)); OLA_ASSERT(m_stream_ok); OLA_ASSERT_EQ(3u, m_pdus_received); } /** * Send a block of PDUs */ void TCPTransportTest::testSinglePDUBlock() { SendPDUBlock(OLA_SOURCELINE()); m_ss->RunOnce(TimeInterval(1, 0)); m_loopback.CloseClient(); m_ss->RunOnce(TimeInterval(1, 0)); OLA_ASSERT(m_stream_ok); OLA_ASSERT_EQ(3u, m_pdus_received); } /** * Send empty PDU block. */ void TCPTransportTest::SendEmptyPDUBLock( const ola::testing::SourceLine &source_line) { IOStack packet; PreamblePacker::AddTCPPreamble(&packet); SendPacket(source_line, &packet); } /** * Send a PDU */ void TCPTransportTest::SendPDU(const ola::testing::SourceLine &source_line) { IOStack packet; MockPDU::PrependPDU(&packet, 4, 8); PreamblePacker::AddTCPPreamble(&packet); SendPacket(source_line, &packet); } /** * Send a block of PDUs */ void TCPTransportTest::SendPDUBlock( const ola::testing::SourceLine &source_line) { IOStack packet; MockPDU::PrependPDU(&packet, 1, 2); MockPDU::PrependPDU(&packet, 2, 4); MockPDU::PrependPDU(&packet, 3, 6); PreamblePacker::AddTCPPreamble(&packet); SendPacket(source_line, &packet); } void TCPTransportTest::SendPacket(const ola::testing::SourceLine &source_line, IOStack *packet) { IOQueue output; packet->MoveToIOQueue(&output); ola::testing::_FailIf( source_line, !m_loopback.Send(&output), "Loopback send failed"); } } // namespace acn } // namespace ola ola-0.10.9/libs/acn/RootHeader.h0000664000175000017500000000252614376533110013206 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * RootHeader.h * Interface for the RootHeader class * Copyright (C) 2007 Simon Newton */ #ifndef LIBS_ACN_ROOTHEADER_H_ #define LIBS_ACN_ROOTHEADER_H_ #include "ola/acn/CID.h" namespace ola { namespace acn { /* * The header for the root layer */ class RootHeader { public: RootHeader() {} ~RootHeader() {} void SetCid(ola::acn::CID cid) { m_cid = cid; } ola::acn::CID GetCid() const { return m_cid; } bool operator==(const RootHeader &other) const { return m_cid == other.m_cid; } private: ola::acn::CID m_cid; }; } // namespace acn } // namespace ola #endif // LIBS_ACN_ROOTHEADER_H_ ola-0.10.9/libs/acn/E131TestFramework.h0000664000175000017500000002154114376533110014277 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E131TestFramework.h * Allows testing of a remote E1.31 implementation. * Copyright (C) 2010 Simon Newton * * The remote node needs to be listening for Universe 1. */ #ifndef LIBS_ACN_E131TESTFRAMEWORK_H_ #define LIBS_ACN_E131TESTFRAMEWORK_H_ #include #include #include #include #include "ola/Constants.h" #include "ola/DmxBuffer.h" #include "ola/acn/CID.h" #include "ola/io/Descriptor.h" #include "ola/io/SelectServer.h" #include "ola/io/StdinHandler.h" #include "ola/math/Random.h" #include "libs/acn/E131Node.h" static const unsigned int UNIVERSE_ID = 1; /* * NodeAction, this reflects an action to be performed on a node. */ class NodeAction { public: virtual ~NodeAction() {} void SetNode(ola::acn::E131Node *node) { m_node = node; } virtual void Tick() {} protected: ola::acn::E131Node *m_node; }; /* * A TestState, this represents a particular state of the testing engine. This * one specifies the behaviour of two nodes. */ class TestState { public: TestState(const std::string &name, NodeAction *action1, NodeAction *action2, const std::string &expected, const ola::DmxBuffer &expected_result): m_passed(true), m_expected_result(expected_result), m_name(name), m_expected(expected), m_action1(action1), m_action2(action2) { } virtual ~TestState() { delete m_action1; delete m_action2; } void SetNodes(ola::acn::E131Node *node1, ola::acn::E131Node *node2) { m_action1->SetNode(node1); m_action2->SetNode(node2); } void Tick() { m_action1->Tick(); m_action2->Tick(); } virtual bool Verify(const ola::DmxBuffer &data) { if (!(data == m_expected_result)) return m_passed = false; return true; } std::string StateName() const { return m_name; } std::string ExpectedResults() const { return m_expected; } bool Passed() const { return m_passed; } protected: bool m_passed; ola::DmxBuffer m_expected_result; private: std::string m_name, m_expected; NodeAction *m_action1, *m_action2; }; /* * This is similar to a TestState but it checks for a particular first packet. * It's useful for state transitions. */ class RelaxedTestState: public TestState { public: RelaxedTestState(const std::string &name, NodeAction *action1, NodeAction *action2, const std::string &expected, const ola::DmxBuffer &expected_first_result, const ola::DmxBuffer &expected_result): TestState(name, action1, action2, expected, expected_result), m_first(true), m_expected_first_result(expected_first_result) { } bool Verify(const ola::DmxBuffer &buffer) { if (m_first) { m_first = false; if (!(m_expected_first_result == buffer)) return m_passed = false; return true; } else { if (!(m_expected_result == buffer)) return m_passed = false; return true; } } private: bool m_first; ola::DmxBuffer m_expected_first_result; }; /* * This is similar to a TestState but it checks for one style of packet, * followed by another. It's useful for state transitions. */ class OrderedTestState: public TestState { public: OrderedTestState(const std::string &name, NodeAction *action1, NodeAction *action2, const std::string &expected, const ola::DmxBuffer &expected_first_result, const ola::DmxBuffer &expected_result): TestState(name, action1, action2, expected, expected_result), m_found_second(false), m_expected_first_result(expected_first_result) { } bool Verify(const ola::DmxBuffer &buffer) { if (m_found_second) { if (!(m_expected_result == buffer)) return m_passed = false; return true; } else { if (m_expected_result == buffer) { m_found_second = true; return true; } if (!(m_expected_first_result == buffer)) return m_passed = false; return true; } } private: bool m_found_second; ola::DmxBuffer m_expected_first_result; }; /* * This action does nothing. */ class NodeInactive: public NodeAction { public: NodeInactive() {} void Tick() {} }; /* * This action just sends some data with the selected priority. */ class NodeSimpleSend: public NodeAction { public: explicit NodeSimpleSend(uint8_t priority, const std::string &data = "") : m_priority(priority) { if (data.empty()) m_buffer.SetRangeToValue(0, m_priority, ola::DMX_UNIVERSE_SIZE); else m_buffer.SetFromString(data); } void Tick() { m_node->SendDMX(UNIVERSE_ID, m_buffer, m_priority); } private: ola::DmxBuffer m_buffer; uint8_t m_priority; }; /* * This action sends a terminated msg that does nothing. */ class NodeTerminate: public NodeAction { public: NodeTerminate(): m_sent(false) { } void Tick() { if (!m_sent) m_node->SendStreamTerminated(UNIVERSE_ID); m_sent = true; } private: bool m_sent; }; /* * This state sends a terminated msg with data then does nothing */ class NodeTerminateWithData: public NodeAction { public: explicit NodeTerminateWithData(uint8_t data): m_data(data), m_sent(false) { } void Tick() { if (!m_sent) { ola::DmxBuffer output; output.SetRangeToValue(0, m_data, ola::DMX_UNIVERSE_SIZE); m_node->SendStreamTerminated(UNIVERSE_ID, output); } m_sent = true; } private: uint8_t m_data; bool m_sent; }; /* * This state sends data and occasionally sends old packets to test sequence # * handling. */ class NodeVarySequenceNumber: public NodeAction { public: NodeVarySequenceNumber(uint8_t good_value, uint8_t bad_value, unsigned int chance): m_counter(0), m_chance(chance), m_good(good_value), m_bad(bad_value) { ola::math::InitRandom(); } void Tick() { int random = ola::math::Random(0, static_cast(m_chance) - 1); if (!m_counter || random) { // start off with good data ola::DmxBuffer output; output.SetRangeToValue(0, m_good, ola::DMX_UNIVERSE_SIZE); m_node->SendDMX(UNIVERSE_ID, output); } else { // fake an old packet, 1 to 18 packets behind. ola::DmxBuffer output; output.SetRangeToValue(0, m_bad, ola::DMX_UNIVERSE_SIZE); int offset = ola::math::Random(1, 18); m_node->SendDMXWithSequenceOffset(UNIVERSE_ID, output, static_cast(-offset)); } m_counter++; } private: unsigned int m_counter, m_chance; uint8_t m_good, m_bad; }; /* * The state manager can run in one of three modes: * - local, non-interactive. This starts a local E131Node and sends it data, * verifying against the expected output. * - interactive mode. This sends data to the multicast addresses and a human * gets to verify it. */ class StateManager { public: StateManager(const std::vector &states, bool interactive_mode = false); ~StateManager(); bool Init(); void Run() { m_ss->Run(); } bool Tick(); void Input(int c); void NewDMX(); bool Passed() const { return m_failed_tests.empty(); } private: bool m_interactive; unsigned int m_count, m_ticker; ola::acn::CID m_cid1, m_cid2; ola::acn::E131Node *m_local_node, *m_node1, *m_node2; ola::io::SelectServer *m_ss; std::auto_ptr m_stdin_handler; std::vector m_states; ola::DmxBuffer m_recv_buffer; std::vector m_failed_tests; void EnterState(TestState *state); void NextState(); void ShowStatus(); static const unsigned int TICK_INTERVAL_MS = 100; static const unsigned int TIME_PER_STATE_MS = 3000; }; #endif // LIBS_ACN_E131TESTFRAMEWORK_H_ ola-0.10.9/libs/acn/E133StatusPDU.cpp0000664000175000017500000000335514376533110013676 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133StatusPDU.cpp * The E133StatusPDU * Copyright (C) 2013 Simon Newton */ #include #include #include #include "libs/acn/E133StatusPDU.h" namespace ola { namespace acn { using ola::network::HostToNetwork; using std::string; void E133StatusPDU::PrependPDU(ola::io::IOStack *stack, ola::e133::E133StatusCode status_code_enum, const string &status) { const string truncated_status_code = status.substr( 0, std::min(status.size(), static_cast(ola::e133::MAX_E133_STATUS_STRING_SIZE))); stack->Write(reinterpret_cast(truncated_status_code.data()), static_cast(truncated_status_code.size())); uint16_t status_code = HostToNetwork(static_cast(status_code_enum)); stack->Write(reinterpret_cast(&status_code), sizeof(status_code)); PrependFlagsAndLength(stack); } } // namespace acn } // namespace ola ola-0.10.9/libs/usb/0000775000175000017500000000000014376533271011114 500000000000000ola-0.10.9/libs/usb/LibUsbThread.h0000664000175000017500000001265614376533110013517 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * LibUsbThread.h * The thread for asynchronous libusb communication. * Copyright (C) 2014 Simon Newton */ #ifndef LIBS_USB_LIBUSBTHREAD_H_ #define LIBS_USB_LIBUSBTHREAD_H_ #include #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include "ola/base/Macro.h" #include "ola/thread/Thread.h" namespace ola { namespace usb { /** * @brief The base class for the dedicated libusb thread. * * Asynchronous I/O for libusb requires either i) a dedicated thread ii) * integration with the i/o event loop. From the libusb documentation, i) has * the advantage that it works on Windows, so we do that. * * However, there is no easy way to interrupt libusb_handle_events(). Instead * we use either libusb_close (for the non-hotplug case) or * libusb_hotplug_deregister_callback() (for the hotplug case) to wake * libusb_handle_events(). * * Both these techniques have require care to avoid deadlocks / race * conditions. For the non-hotplug case, it's imperative that libusb_open() and * libusb_close() are paired with calls to OpenHandle() and CloseHandle(). * * http://libusb.sourceforge.net/api-1.0/group__asyncio.html covers both * approaches. */ class LibUsbThread : private ola::thread::Thread { public: /** * @brief Base constructor * @param context the libusb context to use. */ explicit LibUsbThread(libusb_context *context) : m_context(context), m_term(false) { } /** * @brief Destructor. */ virtual ~LibUsbThread() {} /** * @brief Initialize the thread. */ virtual bool Init() { return true; } /** * @brief Shutdown the thread. */ virtual void Shutdown() {} /** * @brief The entry point to the libusb thread. * * Don't call this directly. It's executed when the thread starts. */ void *Run(); /** * @brief This must be called whenever libusb_open() is called. */ virtual void OpenHandle() = 0; /** * @brief This must be called whenever libusb_close() is called. */ virtual void CloseHandle(libusb_device_handle *handle) = 0; protected: /** * @brief Indicate that the libusb thread should terminate. * * This doesn't wake up libusb_handle_events(), it simply sets m_term to * true. */ void SetTerminate() { ola::thread::MutexLocker locker(&m_term_mutex); m_term = true; } /** * @brief Start the libusb thread. */ void LaunchThread(); /** * @brief Join the libusb thread. */ void JoinThread(); /** * @brief Return the libusb_context this thread uses. * @returns A libusb_context. */ libusb_context* Context() const { return m_context; } private: libusb_context *m_context; bool m_term; // GUARDED_BY(m_term_mutex) ola::thread::Mutex m_term_mutex; }; #if HAVE_LIBUSB_HOTPLUG_API /** * @brief The hotplug version of the LibUsbThread. */ class LibUsbHotplugThread : public LibUsbThread { public: /** * @brief Create a new LibUsbHotplugThread * @param context the libusb context to use. * @param callback_fn The callback function to run when hotplug events occur. * @param user_data User data to pass to the callback function. * * The thread is started in Init(). When the object is * destroyed, the handle is de-registered as part of the thread shutdown * sequence. */ LibUsbHotplugThread(libusb_context *context, libusb_hotplug_callback_fn callback_fn, void *user_data); bool Init(); void Shutdown(); void OpenHandle() {} void CloseHandle(libusb_device_handle *handle); private: libusb_hotplug_callback_handle m_hotplug_handle; libusb_hotplug_callback_fn m_callback_fn; void *m_user_data; DISALLOW_COPY_AND_ASSIGN(LibUsbHotplugThread); }; #endif // HAVE_LIBUSB_HOTPLUG_API /** * @brief The non-hotplug version of LibUsbThread. * * The libusb thread is only run when one of more handles are open. Otherwise * there is no way to interrupt libusb_handle_events(). See the libusb Async * documentation at http://libusb.sourceforge.net/api-1.0/group__asyncio.html * for more information. */ class LibUsbSimpleThread : public LibUsbThread { public: /** * @brief Create a new LibUsbHotplugThread * @param context the libusb context to use. * * The thread is starts as soon as this object is created. When the object is * destroyed, the handle is de-registered as part of the thread shutdown * sequence. */ explicit LibUsbSimpleThread(libusb_context *context) : LibUsbThread(context), m_device_count(0) { } void OpenHandle(); void CloseHandle(libusb_device_handle *handle); private: unsigned int m_device_count; DISALLOW_COPY_AND_ASSIGN(LibUsbSimpleThread); }; } // namespace usb } // namespace ola #endif // LIBS_USB_LIBUSBTHREAD_H_ ola-0.10.9/libs/usb/JaRulePortHandleImpl.cpp0000664000175000017500000003233714376533110015525 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * JaRulePortHandleImpl.cpp * The implementation of the Ja Rule Widget. * Copyright (C) 2015 Simon Newton */ #include "libs/usb/JaRulePortHandleImpl.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "libs/usb/JaRuleWidgetPort.h" namespace ola { namespace usb { using ola::NewSingleCallback; using ola::io::ByteString; using ola::rdm::DiscoveryAgent; using ola::rdm::DiscoverableQueueingRDMController; using ola::rdm::RDMCallback; using ola::rdm::RDMCommand; using ola::rdm::RDMCommandSerializer; using ola::rdm::RDMDiscoveryCallback; using ola::rdm::RDMDiscoveryResponse; using ola::rdm::RDMReply; using ola::rdm::RDMRequest; using ola::rdm::RDMResponse; using ola::rdm::RDMSetRequest; using ola::rdm::RunRDMCallback; using ola::rdm::UID; using ola::rdm::UIDSet; using ola::rdm::RDMStatusCode; using ola::strings::ToHex; using std::auto_ptr; using std::vector; JaRulePortHandleImpl::JaRulePortHandleImpl(JaRuleWidgetPort *parent_port, const ola::rdm::UID &uid, uint8_t physical_port) : m_port(parent_port), m_uid(uid), m_physical_port(physical_port), m_in_shutdown(false), m_dmx_in_progress(false), m_dmx_queued(false), m_dmx_callback(NewCallback(this, &JaRulePortHandleImpl::DMXComplete)), m_discovery_agent(this) { } JaRulePortHandleImpl::~JaRulePortHandleImpl() { m_in_shutdown = true; m_discovery_agent.Abort(); m_port->CancelAll(); delete m_dmx_callback; } void JaRulePortHandleImpl::RunFullDiscovery(RDMDiscoveryCallback *callback) { OLA_INFO << "Full discovery triggered"; m_discovery_agent.StartFullDiscovery( NewSingleCallback(this, &JaRulePortHandleImpl::DiscoveryComplete, callback)); } void JaRulePortHandleImpl::RunIncrementalDiscovery( RDMDiscoveryCallback *callback) { OLA_INFO << "Incremental discovery triggered"; m_discovery_agent.StartIncrementalDiscovery( NewSingleCallback(this, &JaRulePortHandleImpl::DiscoveryComplete, callback)); } void JaRulePortHandleImpl::SendRDMRequest(RDMRequest *request, ola::rdm::RDMCallback *on_complete) { request->SetSourceUID(m_uid); request->SetPortId(m_physical_port + 1); request->SetTransactionNumber(m_transaction_number.Next()); ByteString frame; if (!RDMCommandSerializer::Pack(*request, &frame)) { RunRDMCallback(on_complete, ola::rdm::RDM_FAILED_TO_SEND); delete request; return; } m_port->SendCommand( GetCommandFromRequest(request), frame.data(), frame.size(), NewSingleCallback(this, &JaRulePortHandleImpl::RDMComplete, static_cast(request), on_complete)); } void JaRulePortHandleImpl::MuteDevice(const UID &target, MuteDeviceCallback *mute_complete) { auto_ptr request( ola::rdm::NewMuteRequest(m_uid, target, m_transaction_number.Next(), m_physical_port + 1)); ByteString frame; RDMCommandSerializer::Pack(*request, &frame); m_port->SendCommand( JARULE_CMD_RDM_REQUEST, frame.data(), frame.size(), NewSingleCallback(this, &JaRulePortHandleImpl::MuteDeviceComplete, mute_complete)); } void JaRulePortHandleImpl::UnMuteAll(UnMuteDeviceCallback *unmute_complete) { auto_ptr request( ola::rdm::NewUnMuteRequest(m_uid, UID::AllDevices(), m_transaction_number.Next(), m_physical_port + 1)); ByteString frame; RDMCommandSerializer::Pack(*request, &frame); m_port->SendCommand( JARULE_CMD_RDM_BROADCAST_REQUEST, frame.data(), frame.size(), NewSingleCallback(this, &JaRulePortHandleImpl::UnMuteDeviceComplete, unmute_complete)); } void JaRulePortHandleImpl::Branch(const UID &lower, const UID &upper, BranchCallback *branch_complete) { auto_ptr request( ola::rdm::NewDiscoveryUniqueBranchRequest(m_uid, lower, upper, m_transaction_number.Next())); ByteString frame; RDMCommandSerializer::Pack(*request, &frame); OLA_INFO << "Sending RDM DUB: " << lower << " - " << upper; m_port->SendCommand( JARULE_CMD_RDM_DUB_REQUEST, frame.data(), frame.size(), NewSingleCallback(this, &JaRulePortHandleImpl::DUBComplete, branch_complete)); } bool JaRulePortHandleImpl::SendDMX(const DmxBuffer &buffer) { if (m_dmx_in_progress) { m_dmx = buffer; m_dmx_queued = true; } else { m_dmx_in_progress = true; m_port->SendCommand(JARULE_CMD_TX_DMX, buffer.GetRaw(), buffer.Size(), m_dmx_callback); } return true; } bool JaRulePortHandleImpl::SetPortMode(JaRulePortMode new_mode) { uint8_t port_mode = new_mode; m_port->SendCommand(JARULE_CMD_SET_MODE, &port_mode, sizeof(port_mode), NULL); return true; } void JaRulePortHandleImpl::CheckStatusFlags(uint8_t flags) { if (flags & FLAGS_CHANGED_FLAG) { OLA_INFO << "Flags changed!"; } if (flags & MSG_TRUNCATED_FLAG) { OLA_INFO << "Message truncated"; } } void JaRulePortHandleImpl::DMXComplete( OLA_UNUSED USBCommandResult result, OLA_UNUSED JaRuleReturnCode return_code, uint8_t status_flags, OLA_UNUSED const ola::io::ByteString &payload) { CheckStatusFlags(status_flags); // We ignore status and return_code, since DMX is streaming. if (m_dmx_queued && !m_in_shutdown) { m_port->SendCommand(JARULE_CMD_TX_DMX, m_dmx.GetRaw(), m_dmx.Size(), m_dmx_callback); m_dmx_queued = false; } else { m_dmx_in_progress = false; } } void JaRulePortHandleImpl::MuteDeviceComplete( MuteDeviceCallback *mute_complete, USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ola::io::ByteString &payload) { CheckStatusFlags(status_flags); bool muted_ok = false; if (result == COMMAND_RESULT_OK && return_code == RC_OK && payload.size() > sizeof(GetSetTiming)) { // Skip the timing data & the start code. ola::rdm::RDMStatusCode status_code = rdm::RDM_INVALID_RESPONSE; auto_ptr response(RDMResponse::InflateFromData( payload.substr(sizeof(GetSetTiming) + 1), &status_code)); // TODO(simon): I guess we could ack timer the MUTE. Handle this case // someday. muted_ok = ( status_code == rdm::RDM_COMPLETED_OK && response.get() && response->CommandClass() == RDMCommand::DISCOVER_COMMAND_RESPONSE && response->ResponseType() == rdm::RDM_ACK); } else { OLA_INFO << "Mute failed! Result: " << result << ", RC: " << return_code << ", payload size: " << payload.size(); } mute_complete->Run(muted_ok); } void JaRulePortHandleImpl::UnMuteDeviceComplete( UnMuteDeviceCallback *unmute_complete, OLA_UNUSED USBCommandResult result, OLA_UNUSED JaRuleReturnCode return_code, OLA_UNUSED uint8_t status_flags, OLA_UNUSED const ola::io::ByteString &payload) { CheckStatusFlags(status_flags); if (result != COMMAND_RESULT_OK) { OLA_INFO << "JaRule Unmute failed!"; } // TODO(simon): At some point we need to account for failures here. unmute_complete->Run(); } void JaRulePortHandleImpl::DUBComplete(BranchCallback *callback, USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ola::io::ByteString &payload) { CheckStatusFlags(status_flags); ByteString discovery_data; if (payload.size() >= sizeof(DUBTiming)) { discovery_data = payload.substr(sizeof(DUBTiming)); } if (result == COMMAND_RESULT_OK && return_code == RC_OK) { callback->Run(discovery_data.data(), discovery_data.size()); } else { callback->Run(NULL, 0); } } void JaRulePortHandleImpl::RDMComplete(const ola::rdm::RDMRequest *request_ptr, ola::rdm::RDMCallback *callback, USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ola::io::ByteString &payload) { CheckStatusFlags(status_flags); auto_ptr request(request_ptr); ola::rdm::RDMFrames frames; if (result != COMMAND_RESULT_OK) { RunRDMCallback(callback, rdm::RDM_FAILED_TO_SEND); } CommandClass command = GetCommandFromRequest(request.get()); ola::rdm::RDMStatusCode status_code = rdm::RDM_INVALID_RESPONSE; ola::rdm::RDMResponse *response = NULL; if (command == JARULE_CMD_RDM_DUB_REQUEST && return_code == RC_OK) { if (payload.size() > sizeof(DUBTiming)) { DUBTiming timing; memcpy(reinterpret_cast(&timing), payload.data(), sizeof(timing)); OLA_INFO << "Start time " << (timing.start / 10.0) << "uS, End: " << (timing.end / 10.0) << "uS"; ola::rdm::RDMFrame frame(payload.substr(sizeof(DUBTiming))); frame.timing.response_time = 100 * timing.start; frame.timing.data_time = 100 * (timing.end - timing.start); frames.push_back(frame); } status_code = rdm::RDM_DUB_RESPONSE; } else if (command == JARULE_CMD_RDM_BROADCAST_REQUEST && return_code == RC_OK) { status_code = rdm::RDM_WAS_BROADCAST; } else if (command == JARULE_CMD_RDM_BROADCAST_REQUEST && return_code == RC_RDM_BCAST_RESPONSE) { if (payload.size() > sizeof(GetSetTiming)) { response = UnpackRDMResponse( request.get(), payload.substr(sizeof(GetSetTiming)), &status_code); } } else if (command == JARULE_CMD_RDM_REQUEST && return_code == RC_OK) { if (payload.size() > sizeof(GetSetTiming)) { GetSetTiming timing; memcpy(reinterpret_cast(&timing), payload.data(), sizeof(timing)); OLA_INFO << "Response time " << (timing.break_start / 10.0) << "uS, Break: " << (timing.mark_start - timing.break_start) / 10.0 << "uS, Mark: " << (timing.mark_end - timing.mark_start) / 10.0 << "uS"; response = UnpackRDMResponse( request.get(), payload.substr(sizeof(GetSetTiming)), &status_code); ola::rdm::RDMFrame frame(payload.substr(sizeof(GetSetTiming))); frame.timing.response_time = 100 * timing.break_start; frame.timing.break_time = 100 * (timing.mark_start - timing.break_start); frame.timing.mark_time = 100 * (timing.mark_end - timing.mark_start); frames.push_back(frame); } } else if (return_code == RC_RDM_TIMEOUT) { status_code = rdm::RDM_TIMEOUT; } else if (return_code == RC_TX_ERROR || return_code == RC_BUFFER_FULL) { status_code = rdm::RDM_FAILED_TO_SEND; } else { OLA_WARN << "Unknown Ja Rule RDM RC: " << ToHex(return_code); status_code = rdm::RDM_FAILED_TO_SEND; } RDMReply reply(status_code, response, frames); callback->Run(&reply); } ola::rdm::RDMResponse* JaRulePortHandleImpl::UnpackRDMResponse( const RDMRequest *request, const ByteString &payload, ola::rdm::RDMStatusCode *status_code) { if (payload.empty() || payload[0] != RDMCommand::START_CODE) { *status_code = rdm::RDM_INVALID_RESPONSE; return NULL; } return ola::rdm::RDMResponse::InflateFromData( payload.data() + 1, payload.size() - 1, status_code, request); } void JaRulePortHandleImpl::DiscoveryComplete(RDMDiscoveryCallback *callback, OLA_UNUSED bool ok, const UIDSet& uids) { m_uids = uids; if (callback) { callback->Run(m_uids); } } CommandClass JaRulePortHandleImpl::GetCommandFromRequest( const ola::rdm::RDMRequest *request) { if (request->IsDUB()) { return JARULE_CMD_RDM_DUB_REQUEST; } return request->DestinationUID().IsBroadcast() ? JARULE_CMD_RDM_BROADCAST_REQUEST : JARULE_CMD_RDM_REQUEST; } } // namespace usb } // namespace ola ola-0.10.9/libs/usb/LibUsbThread.cpp0000664000175000017500000000707714376533110014053 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * LibUsbThread.cpp * The thread for asynchronous libusb communication. * Copyright (C) 2014 Simon Newton */ #include "libs/usb/LibUsbThread.h" #include "libs/usb/LibUsbAdaptor.h" #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/stl/STLUtils.h" namespace ola { namespace usb { // LibUsbThread // ----------------------------------------------------------------------------- void *LibUsbThread::Run() { OLA_INFO << "----libusb event thread is running"; while (1) { { ola::thread::MutexLocker locker(&m_term_mutex); if (m_term) { break; } } libusb_handle_events(m_context); } OLA_INFO << "----libusb thread exiting"; return NULL; } void LibUsbThread::LaunchThread() { OLA_INFO << "-- Starting libusb thread"; Start(); } void LibUsbThread::JoinThread() { OLA_INFO << "-- Stopping libusb thread"; Join(); m_term = false; } // LibUsbHotplugThread // ----------------------------------------------------------------------------- #if HAVE_LIBUSB_HOTPLUG_API LibUsbHotplugThread::LibUsbHotplugThread(libusb_context *context, libusb_hotplug_callback_fn callback_fn, void *user_data) : LibUsbThread(context), m_hotplug_handle(0), m_callback_fn(callback_fn), m_user_data(user_data) { } bool LibUsbHotplugThread::Init() { /* check for hotplug support */ if (!LibUsbAdaptor::HotplugSupported()) { OLA_WARN << "No hotplug capability, giving up trying to start this thread"; return false; } int rc = libusb_hotplug_register_callback( NULL, static_cast(LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED | LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT), LIBUSB_HOTPLUG_ENUMERATE, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY, LIBUSB_HOTPLUG_MATCH_ANY, m_callback_fn, m_user_data, &m_hotplug_handle); if (LIBUSB_SUCCESS != rc) { OLA_WARN << "Error creating a hotplug callback " << LibUsbAdaptor::ErrorCodeToString(rc); return false; } LaunchThread(); return true; } void LibUsbHotplugThread::Shutdown() { SetTerminate(); libusb_hotplug_deregister_callback(Context(), m_hotplug_handle); JoinThread(); } void LibUsbHotplugThread::CloseHandle(libusb_device_handle *handle) { libusb_close(handle); } #endif // HAVE_LIBUSB_HOTPLUG_API // LibUsbSimpleThread // ----------------------------------------------------------------------------- void LibUsbSimpleThread::OpenHandle() { m_device_count++; if (m_device_count == 1) { LaunchThread(); } } void LibUsbSimpleThread::CloseHandle(libusb_device_handle *handle) { if (m_device_count == 1) { SetTerminate(); } libusb_close(handle); if (m_device_count == 1) { JoinThread(); } m_device_count--; } } // namespace usb } // namespace ola ola-0.10.9/libs/usb/HotplugAgent.cpp0000664000175000017500000001655714376533110014147 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * HotplugAgent.cpp * Handles auto-detection of USB devices. * Copyright (C) 2015 Simon Newton */ #include "libs/usb/HotplugAgent.h" #include #include #include #include #include #include #include #include #include #include #include "libs/usb/LibUsbAdaptor.h" #include "libs/usb/LibUsbThread.h" namespace ola { namespace usb { using ola::usb::AsyncronousLibUsbAdaptor; using ola::usb::LibUsbAdaptor; using std::auto_ptr; using std::pair; namespace { #ifdef HAVE_LIBUSB_HOTPLUG_API int LIBUSB_CALL hotplug_callback(OLA_UNUSED struct libusb_context *ctx, struct libusb_device *dev, libusb_hotplug_event event, void *user_data) { HotplugAgent *agent = reinterpret_cast(user_data); agent->HotPlugEvent(dev, event); return 0; } #endif // HAVE_LIBUSB_HOTPLUG_API } // namespace HotplugAgent::HotplugAgent(NotificationCallback* notification_cb, int debug_level) : m_notification_cb(notification_cb), m_debug_level(debug_level), m_use_hotplug(false), m_context(NULL), m_suppress_hotplug_events(false) { } HotplugAgent::~HotplugAgent() { if (m_context) { Stop(); } } AsyncronousLibUsbAdaptor *HotplugAgent::GetUSBAdaptor() const { return m_usb_adaptor.get(); } bool HotplugAgent::Init() { if (!LibUsbAdaptor::Initialize(&m_context)) { return false; } #ifdef HAVE_LIBUSB_SET_OPTION OLA_DEBUG << "libusb_set_option(LIBUSB_OPTION_LOG_LEVEL, " << m_debug_level << ")"; libusb_set_option(m_context, LIBUSB_OPTION_LOG_LEVEL, m_debug_level); #else OLA_DEBUG << "libusb_set_debug(" << m_debug_level << ")"; libusb_set_debug(m_context, m_debug_level); #endif // HAVE_LIBUSB_SET_OPTION m_use_hotplug = ola::usb::LibUsbAdaptor::HotplugSupported(); OLA_DEBUG << "HotplugSupported(): " << m_use_hotplug; #ifdef HAVE_LIBUSB_HOTPLUG_API if (m_use_hotplug) { m_usb_thread.reset(new ola::usb::LibUsbHotplugThread( m_context, hotplug_callback, this)); } #endif // HAVE_LIBUSB_HOTPLUG_API if (!m_usb_thread.get()) { m_usb_thread.reset(new ola::usb::LibUsbSimpleThread(m_context)); } m_usb_adaptor.reset( new ola::usb::AsyncronousLibUsbAdaptor(m_usb_thread.get())); return true; } bool HotplugAgent::Start() { // If we're using hotplug, this starts the hotplug thread. if (!m_usb_thread->Init()) { m_usb_adaptor.reset(); m_usb_thread.reset(); return false; } if (!m_use_hotplug) { // Either we don't support hotplug or the setup failed. // As poor man's hotplug, we call libusb_get_device_list periodically to // check for new devices. m_scanner_thread.reset(new ola::thread::PeriodicThread( TimeInterval(5, 0), NewCallback(this, &HotplugAgent::ScanUSBDevices))); } return true; } void HotplugAgent::HaltNotifications() { // To prevent any further notifications, we need to either: // - suppress hotplug events so we don't add any new devices. // OR // - Stop the scanner thread, same idea above applies. if (m_scanner_thread.get()) { m_scanner_thread->Stop(); } { ola::thread::MutexLocker locker(&m_mutex); m_suppress_hotplug_events = true; } } bool HotplugAgent::Stop() { // Prevent any further notifications if we haven't already. // Once this completes, we're free to access m_devices without a lock. HaltNotifications(); m_devices.clear(); // Stop the usb_thread (if using hotplug, otherwise this is a noop). m_usb_thread->Shutdown(); m_usb_thread.reset(); m_usb_adaptor.reset(); libusb_exit(m_context); m_context = NULL; return true; } #ifdef HAVE_LIBUSB_HOTPLUG_API void HotplugAgent::HotPlugEvent(struct libusb_device *usb_device, libusb_hotplug_event event) { ola::thread::MutexLocker locker(&m_mutex); if (m_suppress_hotplug_events) { return; } USBDeviceID device_id = m_usb_adaptor->GetDeviceId(usb_device); OLA_INFO << "USB hotplug event: " << device_id << " @" << usb_device << " [" << (event == LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED ? "add" : "del") << "]"; if (event == LIBUSB_HOTPLUG_EVENT_DEVICE_ARRIVED) { pair p = m_devices.insert( DeviceMap::value_type(device_id, usb_device)); if (!p.second) { // already an entry in the map if (p.first->second != usb_device) { OLA_WARN << "Received double hotplug notification for " << device_id; } return; } m_notification_cb->Run(DEVICE_ADDED, usb_device); } else if (event == LIBUSB_HOTPLUG_EVENT_DEVICE_LEFT) { DeviceMap::iterator iter = m_devices.find(device_id); if (iter == m_devices.end()) { OLA_WARN << "Failed to find " << device_id; return; } if (iter->second != usb_device) { OLA_WARN << "Device mismatch for " << device_id; return; } m_devices.erase(iter); m_notification_cb->Run(DEVICE_REMOVED, usb_device); } } #endif // HAVE_LIBUSB_HOTPLUG_API /** * @brief Check if this platform supports hotplug. * @returns true if hotplug is supported and enabled on this platform, false * otherwise. * @deprecated This is only here for backwards compatibility. New code should * use ola::usb::LibUsbAdaptor::HotplugSupported(). */ bool HotplugAgent::HotplugSupported() { return ola::usb::LibUsbAdaptor::HotplugSupported(); } /* * If hotplug isn't supported, this is called periodically to check for * USB devices that have been added or removed. */ bool HotplugAgent::ScanUSBDevices() { std::set current_device_ids; libusb_device **device_list; size_t device_count = libusb_get_device_list(m_context, &device_list); for (unsigned int i = 0; i < device_count; i++) { libusb_device *usb_device = device_list[i]; USBDeviceID device_id = m_usb_adaptor->GetDeviceId(usb_device); current_device_ids.insert(device_id); pair p = m_devices.insert( DeviceMap::value_type(device_id, usb_device)); if (p.second) { m_notification_cb->Run(DEVICE_ADDED, usb_device); } } libusb_free_device_list(device_list, 1); // unref devices // Remove any old ones. DeviceMap::iterator iter = m_devices.begin(); while (iter != m_devices.end()) { if (!STLContains(current_device_ids, iter->first)) { m_notification_cb->Run(DEVICE_REMOVED, iter->second); m_devices.erase(iter++); } else { iter++; } } return true; } } // namespace usb } // namespace ola ola-0.10.9/libs/usb/Types.h0000664000175000017500000000241514376533110012303 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Types.h * Types used with the USB subsystem. * Copyright (C) 2015 Simon Newton */ #ifndef LIBS_USB_TYPES_H_ #define LIBS_USB_TYPES_H_ #include #include namespace ola { namespace usb { class USBDeviceID { public: USBDeviceID(uint8_t bus_number, uint8_t device_address); const uint8_t bus_number; const uint8_t device_address; bool operator<(const USBDeviceID &id) const; friend std::ostream& operator<<(std::ostream& os, const USBDeviceID &id); }; } // namespace usb } // namespace ola #endif // LIBS_USB_TYPES_H_ ola-0.10.9/libs/usb/JaRuleWidgetPort.h0000664000175000017500000001450214376533110014372 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * JaRuleWidgetPort.h * A Ja Rule widget port. * Copyright (C) 2015 Simon Newton */ #ifndef LIBS_USB_JARULEWIDGETPORT_H_ #define LIBS_USB_JARULEWIDGETPORT_H_ #include #include #include #include #include #include #include #include #include "libs/usb/JaRulePortHandle.h" #include "libs/usb/LibUsbAdaptor.h" #include "libs/usb/JaRuleWidget.h" namespace ola { namespace usb { /** * @brief The internal model of a port on a JaRule device. * * Each port has its own libusb transfers as well as a command queue. This * avoids slow commands on one port blocking another. */ class JaRuleWidgetPort { public: /** * @brief Create a new JaRuleWidgetPort. * @param executor The Executor to run the callbacks on. * @param adaptor The LibUsbAdaptor to use. * @param usb_handle the libusb_device_handle for the Ja Rule widget. * @param endpoint_number The endpoint to use for transfers. * @param uid The device's UID. * @param physical_port The physical port index. */ JaRuleWidgetPort(ola::thread::ExecutorInterface *executor, LibUsbAdaptor *adaptor, libusb_device_handle *usb_handle, uint8_t endpoint_number, const ola::rdm::UID &uid, uint8_t physical_port); /** * @brief Destructor */ ~JaRuleWidgetPort(); /** * @brief Claim the handle to this port. * @returns a port handle, ownership is not transferred. Will return NULL if * the port is already claimed. */ JaRulePortHandle* ClaimPort(); /** * @brief Release a handle to a port. * @returns a port handle, ownership is not transferred. */ void ReleasePort(); /** * @brief Cancel all commands for this port. */ void CancelAll(); /** * @brief Send a command on this port. * @param command the Command type. * @param data the payload data. The data is copied and can be freed once the * method returns. * @param size the payload size. * @param callback The callback to run when the command completes. * This may be run immediately in some conditions. * * SendCommand() can be called from any thread, and messages will be queued. */ void SendCommand(CommandClass command, const uint8_t *data, unsigned int size, CommandCompleteCallback *callback); /** * @brief Called by the libusb callback when the transfer completes or is * cancelled. */ void _OutTransferComplete(); /** * @brief Called by the libusb callback when the transfer completes or is * cancelled. */ void _InTransferComplete(); private: // This must be a multiple of the USB packet size otherwise we can experience // overflows. A message can be a maximum of 640 bytes, so we'll use 1k here // to be safe. enum { IN_BUFFER_SIZE = 1024 }; enum { OUT_BUFFER_SIZE = 1024 }; // The arguments passed to the user supplied callback. typedef struct { USBCommandResult result; JaRuleReturnCode return_code; uint8_t status_flags; const ola::io::ByteString payload; } CallbackArgs; class PendingCommand { public: PendingCommand(CommandClass command, CommandCompleteCallback *callback, const ola::io::ByteString &payload) : command(command), callback(callback), payload(payload) { } CommandClass command; CommandCompleteCallback *callback; ola::io::ByteString payload; TimeStamp out_time; // When this cmd was sent }; typedef std::map PendingCommandMap; typedef std::queue CommandQueue; ola::Clock m_clock; ola::thread::ExecutorInterface* const m_executor; LibUsbAdaptor* const m_adaptor; libusb_device_handle* const m_usb_handle; const uint8_t m_endpoint_number; const ola::rdm::UID m_uid; const uint8_t m_physical_port; JaRulePortHandle *m_handle; // NULL if the port isn't claimed ola::SequenceNumber m_token; ola::thread::Mutex m_mutex; CommandQueue m_queued_commands; // GUARDED_BY(m_mutex); PendingCommandMap m_pending_commands; // GUARDED_BY(m_mutex); libusb_transfer *m_out_transfer; // GUARDED_BY(m_mutex); bool m_out_in_progress; // GUARDED_BY(m_mutex); uint8_t m_in_buffer[IN_BUFFER_SIZE]; // GUARDED_BY(m_mutex); libusb_transfer *m_in_transfer; // GUARDED_BY(m_mutex); bool m_in_in_progress; // GUARDED_BY(m_mutex); void MaybeSendCommand(); // LOCK_REQUIRED(m_mutex); bool SubmitInTransfer(); // LOCK_REQUIRED(m_mutex); void HandleResponse(const uint8_t *data, unsigned int size); // LOCK_REQUIRED(m_mutex); void ScheduleCallback(CommandCompleteCallback *callback, USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ola::io::ByteString &payload); void RunCallback(CommandCompleteCallback *callback, CallbackArgs args); static const uint8_t EOF_IDENTIFIER = 0xa5; static const uint8_t SOF_IDENTIFIER = 0x5a; static const unsigned int MAX_PAYLOAD_SIZE = 513; static const unsigned int MIN_RESPONSE_SIZE = 9; static const unsigned int USB_PACKET_SIZE = 64; static const unsigned int MAX_IN_FLIGHT = 2; static const unsigned int MAX_QUEUED_MESSAGES = 10; static const unsigned int ENDPOINT_TIMEOUT_MS = 1000; DISALLOW_COPY_AND_ASSIGN(JaRuleWidgetPort); }; } // namespace usb } // namespace ola #endif // LIBS_USB_JARULEWIDGETPORT_H_ ola-0.10.9/libs/usb/JaRuleConstants.h0000664000175000017500000001167414376533110014265 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * JaRuleConstants.h * Constants used with Ja Rule devices. * Copyright (C) 2015 Simon Newton */ #ifndef LIBS_USB_JARULECONSTANTS_H_ #define LIBS_USB_JARULECONSTANTS_H_ #include #include #include namespace ola { namespace usb { /** * @brief Ja Rule status flags. */ typedef enum { FLAGS_CHANGED_FLAG = 0x02, //!< Flags have changed MSG_TRUNCATED_FLAG = 0x04 //!< The message has been truncated. } JaRuleStatusFlags; /** * @brief Ja Rule Port modes. */ typedef enum { CONTROLLER_MODE, //!< DMX/RDM Controller mode RESPONDER_MODE, //!< DMX/RDM Responder mode SELF_TEST_MODE, //!< Self test mode } JaRulePortMode; /** * @brief Indicates the eventual state of a Ja Rule command. * * Various failures can occur at the libusb layer. */ typedef enum { /** * @brief The command was sent and a response was received. */ COMMAND_RESULT_OK, /** * @brief The command is malformed. * * This could mean the payload is too big or a NULL pointer with a non-0 * size was provided. */ COMMAND_RESULT_MALFORMED, /** * @brief An error occurred when trying to send the command. */ COMMAND_RESULT_SEND_ERROR, /** * @brief The command was not sent as the TX queue was full. */ COMMAND_RESULT_QUEUE_FULL, /** * @brief The command was sent but no response was received. */ COMMAND_RESULT_TIMEOUT, /** * @brief The command class returned did not match the request. */ COMMAND_RESULT_CLASS_MISMATCH, /** * @brief The command was cancelled. */ COMMAND_RESULT_CANCELLED, /** * @brief Invalid port */ COMMAND_RESULT_INVALID_PORT } USBCommandResult; /** * @brief The Ja Rule command set. */ typedef enum { JARULE_CMD_RESET_DEVICE = 0x00, JARULE_CMD_SET_MODE = 0x01, JARULE_CMD_GET_HARDWARE_INFO = 0x02, JARULE_CMD_RUN_SELF_TEST = 0x03, JARULE_CMD_SET_BREAK_TIME = 0x10, JARULE_CMD_GET_BREAK_TIME = 0x11, JARULE_CMD_SET_MARK_TIME = 0x12, JARULE_CMD_GET_MARK_TIME = 0x13, JARULE_CMD_SET_RDM_BROADCAST_TIMEOUT = 0x20, JARULE_CMD_GET_RDM_BROADCAST_TIMEOUT = 0x21, JARULE_CMD_SET_RDM_RESPONSE_TIMEOUT = 0x22, JARULE_CMD_GET_RDM_RESPONSE_TIMEOUT = 0x23, JARULE_CMD_SET_RDM_DUB_RESPONSE_LIMIT = 0x24, JARULE_CMD_GET_RDM_DUB_RESPONSE_LIMIT = 0x25, JARULE_CMD_SET_RDM_RESPONDER_DELAY = 0x26, JARULE_CMD_GET_RDM_RESPONDER_DELAY = 0x27, JARULE_CMD_SET_RDM_RESPONDER_JITTER = 0x28, JARULE_CMD_GET_RDM_RESPONDER_JITTER = 0x29, JARULE_CMD_TX_DMX = 0x30, JARULE_CMD_RDM_DUB_REQUEST = 0x40, JARULE_CMD_RDM_REQUEST = 0x41, JARULE_CMD_RDM_BROADCAST_REQUEST = 0x42, // Experimental / testing JARULE_CMD_ECHO = 0xf0, JARULE_CMD_GET_FLAGS = 0xf2, } CommandClass; /** * @brief JaRule command return codes. */ typedef enum { RC_OK, //!< The command completed successfully. RC_UNKNOWN, //!< Unknown command /** * @brief The command could not be completed due to a full memory buffer */ RC_BUFFER_FULL, RC_BAD_PARAM, //!< The command was malformed. RC_TX_ERROR, //!< There was an error during transceiver transmit. RC_RDM_TIMEOUT, //!< No RDM response was received. /** * @brief Data was received in response to a broadcast RDM command. * * This usually indicates a broken responder. */ RC_RDM_BCAST_RESPONSE, RC_RDM_INVALID_RESPONSE, //!< An invalid RDM response was received. RC_INVALID_MODE, //!< The command is invalid in the current mode. RC_LAST //!< One past the last valid return code. } JaRuleReturnCode; /** * @brief A command completion callback. * @tparam The result of the command operation * @tparam The return code from the Ja Rule device. * @tparam The status flags. * @tparam The response payload. * * If the USBCommandResult is not COMMAND_COMPLETED_OK, the remaining values * are undefined. */ typedef ola::BaseCallback4 CommandCompleteCallback; std::ostream& operator<<(std::ostream& os, const USBCommandResult &result); std::ostream& operator<<(std::ostream& os, const CommandClass &command_class); std::ostream& operator<<(std::ostream& os, const JaRuleReturnCode &rc); } // namespace usb } // namespace ola #endif // LIBS_USB_JARULECONSTANTS_H_ ola-0.10.9/libs/usb/HotplugAgent.h0000664000175000017500000001174714376533110013610 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * HotplugAgent.h * Handles auto-detection of USB devices. * Copyright (C) 2015 Simon Newton */ #ifndef LIBS_USB_HOTPLUGAGENT_H_ #define LIBS_USB_HOTPLUGAGENT_H_ #include #include #include #include #include #include "libs/usb/LibUsbAdaptor.h" #include "libs/usb/LibUsbThread.h" #include "libs/usb/Types.h" namespace ola { namespace usb { /** * @brief Detects when USB devices are added or removed. * * The HotplugAgent will run a callback when a USB device is added or removed. * On systems with libusb >= 1.0.16 which also support hotplug we'll use the * Hotplug API, otherwise we'll periodically check for devices. */ class HotplugAgent { public: enum EventType { DEVICE_ADDED, //!< The device was added. DEVICE_REMOVED, //!< The device ws removed. }; /** * @brief Called when a USB device has been added or removed * @tparam EventType The type of the event. * @tparam The libusb device for this event. * * The callback can be run in either the thread calling Start() or from * an internal hotplug thread. However it won't be called from both at once. */ typedef ola::Callback2 NotificationCallback; /** * @brief Create a new HotplugAgent. * @param notification_cb The callback to run when the device is added or * removed. Ownership is transferred. * @param debug_level The libusb debug level. */ HotplugAgent(NotificationCallback* notification_cb, int debug_level); /** * @brief Destructor. * * This will stop the HotplugAgent if it's still running. */ ~HotplugAgent(); /** * @brief Get the AsyncronousLibUsbAdaptor to use. * @returns An AsyncronousLibUsbAdaptor, ownership is not transferred. * @pre Must be called after Init() * * The adaptor is valid until the call to Stop(). */ AsyncronousLibUsbAdaptor *GetUSBAdaptor() const; /** * @brief Initialize the hotplug agent. * @returns true if the agent started correctly, false otherwise. */ bool Init(); /** * @brief Start the hotplug agent. * @returns true if the agent started correctly, false otherwise. * @pre Init() has been called and returned true. */ bool Start(); /** * @brief Prevent any further notifications from occurring. * * Once this returns, the NotificationCallback will not be called. */ void HaltNotifications(); /** * @brief Stop the HotplugAgent. * @returns true if stopped correctly, false otherwise. * * Stop() may result in notifications being run, however once Stop() returns, * no further calls to the notification callback will be made. */ bool Stop(); #ifdef HAVE_LIBUSB_HOTPLUG_API /** * @brief Called when a USB hotplug event occurs. * @param dev the libusb_device the event occurred for. * @param event indicates if the device was added or removed. * * This can be called from either the thread that called * Start(), or from the libusb thread. It can't be called from both threads at * once though, since the libusb thread is only started once the initial call * to libusb_hotplug_register_callback returns. */ void HotPlugEvent(struct libusb_device *dev, libusb_hotplug_event event); #endif // HAVE_LIBUSB_HOTPLUG_API private: typedef std::map DeviceMap; std::auto_ptr const m_notification_cb; const int m_debug_level; bool m_use_hotplug; libusb_context *m_context; std::auto_ptr m_usb_thread; std::auto_ptr m_usb_adaptor; std::auto_ptr m_scanner_thread; ola::thread::Mutex m_mutex; bool m_suppress_hotplug_events; // GUARDED_BY(m_mutex); // In hotplug mode, this is guarded by m_mutex while // m_suppress_hotplug_events is false. // In non-hotplug mode, this is only accessed from the scanner thread, unless // the thread is no longer running in which case it's accessed from the main // thread during cleanup DeviceMap m_devices; bool HotplugSupported(); bool ScanUSBDevices(); DISALLOW_COPY_AND_ASSIGN(HotplugAgent); }; } // namespace usb } // namespace ola #endif // LIBS_USB_HOTPLUGAGENT_H_ ola-0.10.9/libs/usb/JaRulePortHandle.cpp0000664000175000017500000000457714376533110014710 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * JaRulePortHandle.cpp * A Ja Rule Port Handle. * Copyright (C) 2015 Simon Newton */ #include "libs/usb/JaRulePortHandle.h" #include #include #include #include #include #include "libs/usb/JaRulePortHandleImpl.h" namespace ola { namespace usb { JaRulePortHandle::JaRulePortHandle(class JaRuleWidgetPort *parent_port, const ola::rdm::UID &uid, uint8_t physical_port) : m_impl(new JaRulePortHandleImpl(parent_port, uid, physical_port)), m_queueing_controller(m_impl.get(), RDM_QUEUE_SIZE) { } JaRulePortHandle::~JaRulePortHandle() { // Pause the queuing controller so it stops sending anything more to the // impl. m_queueing_controller.Pause(); // This will run any remaining callbacks. m_impl.reset(); // m_queueing_controller will be destroyed next. } void JaRulePortHandle::SendRDMRequest(ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *on_complete) { m_queueing_controller.SendRDMRequest(request, on_complete); } void JaRulePortHandle::RunFullDiscovery( ola::rdm::RDMDiscoveryCallback *callback) { m_queueing_controller.RunFullDiscovery(callback); } void JaRulePortHandle::RunIncrementalDiscovery( ola::rdm::RDMDiscoveryCallback *callback) { m_queueing_controller.RunIncrementalDiscovery(callback); } bool JaRulePortHandle::SendDMX(const DmxBuffer &buffer) { return m_impl->SendDMX(buffer); } bool JaRulePortHandle::SetPortMode(JaRulePortMode new_mode) { return m_impl->SetPortMode(new_mode); } } // namespace usb } // namespace ola ola-0.10.9/libs/usb/JaRuleConstants.cpp0000664000175000017500000001126314376533110014612 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * JaRuleConstants.cpp * Constants used with Ja Rule devices. * Copyright (C) 2015 Simon Newton */ #include "libs/usb/JaRuleConstants.h" #include namespace ola { namespace usb { using std::ostream; ostream& operator<<(ostream& os, const USBCommandResult &result) { switch (result) { case COMMAND_RESULT_OK: os << "OK"; break; case COMMAND_RESULT_MALFORMED: os << "MALFORMED"; break; case COMMAND_RESULT_SEND_ERROR: os << "SEND_ERROR"; break; case COMMAND_RESULT_QUEUE_FULL: os << "QUEUE_FULL"; break; case COMMAND_RESULT_TIMEOUT: os << "TIMEOUT"; break; case COMMAND_RESULT_CLASS_MISMATCH: os << "CLASS_MISMATCH"; break; case COMMAND_RESULT_CANCELLED: os << "CANCELLED"; break; case COMMAND_RESULT_INVALID_PORT: os << "INVALID_PORT"; break; default: os << "Unknown"; } os << " (" << static_cast(result) << ")"; return os; } ostream& operator<<(ostream& os, const CommandClass &command_class) { switch (command_class) { case JARULE_CMD_RESET_DEVICE: os << "RESET_DEVICE"; break; case JARULE_CMD_SET_MODE: os << "SET_MODE"; break; case JARULE_CMD_GET_HARDWARE_INFO: os << "GET_HARDWARE_INFO"; break; case JARULE_CMD_RUN_SELF_TEST: os << "RUN_SELF_TEST"; break; case JARULE_CMD_SET_BREAK_TIME: os << "SET_BREAK_TIME"; break; case JARULE_CMD_GET_BREAK_TIME: os << "GET_BREAK_TIME"; break; case JARULE_CMD_SET_MARK_TIME: os << "SET_MARK_TIME"; break; case JARULE_CMD_GET_MARK_TIME: os << "GET_MARK_TIME"; break; case JARULE_CMD_SET_RDM_BROADCAST_TIMEOUT: os << "SET_RDM_BROADCAST_TIMEOUT"; break; case JARULE_CMD_GET_RDM_BROADCAST_TIMEOUT: os << "GET_RDM_BROADCAST_TIMEOUT"; break; case JARULE_CMD_SET_RDM_RESPONSE_TIMEOUT: os << "SET_RDM_RESPONSE_TIMEOUT"; break; case JARULE_CMD_GET_RDM_RESPONSE_TIMEOUT: os << "GET_RDM_RESPONSE_TIMEOUT"; break; case JARULE_CMD_SET_RDM_DUB_RESPONSE_LIMIT: os << "SET_RDM_DUB_RESPONSE_LIMIT"; break; case JARULE_CMD_GET_RDM_DUB_RESPONSE_LIMIT: os << "GET_RDM_DUB_RESPONSE_LIMIT"; break; case JARULE_CMD_SET_RDM_RESPONDER_DELAY: os << "SET_RDM_RESPONDER_DELAY"; break; case JARULE_CMD_GET_RDM_RESPONDER_DELAY: os << "GET_RDM_RESPONDER_DELAY"; break; case JARULE_CMD_SET_RDM_RESPONDER_JITTER: os << "SET_RDM_RESPONDER_JITTER"; break; case JARULE_CMD_GET_RDM_RESPONDER_JITTER: os << "GET_RDM_RESPONDER_JITTER"; break; case JARULE_CMD_TX_DMX: os << "TX_DMX"; break; case JARULE_CMD_RDM_DUB_REQUEST: os << "RDM_DUB_REQUEST"; break; case JARULE_CMD_RDM_REQUEST: os << "RDM_REQUEST"; break; case JARULE_CMD_RDM_BROADCAST_REQUEST: os << "RDM_BROADCAST_REQUEST"; break; case JARULE_CMD_ECHO: os << "ECHO"; break; case JARULE_CMD_GET_FLAGS: os << "GET_FLAGS"; break; default: os << "Unknown"; } os << " (" << static_cast(command_class) << ")"; return os; } ostream& operator<<(ostream& os, const JaRuleReturnCode &rc) { switch (rc) { case RC_OK: os << "OK"; break; case RC_UNKNOWN: os << "UNKNOWN"; break; case RC_BUFFER_FULL: os << "BUFFER_FULL"; break; case RC_BAD_PARAM: os << "BAD_PARAM"; break; case RC_TX_ERROR: os << "TX_ERROR"; break; case RC_RDM_TIMEOUT: os << "RDM_TIMEOUT"; break; case RC_RDM_BCAST_RESPONSE: os << "RDM_BCAST_RESPONSE"; break; case RC_RDM_INVALID_RESPONSE: os << "RDM_INVALID_RESPONSE"; break; case RC_INVALID_MODE: os << "INVALID_MODE"; break; default: os << "Unknown"; } os << " (" << static_cast(rc) << ")"; return os; } } // namespace usb } // namespace ola ola-0.10.9/libs/usb/LibUsbThreadTest.cpp0000664000175000017500000000705014376533110014702 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * LibUsbThreadTest.cpp * Test fixture for the LibUsbThread class * Copyright (C) 2014 Simon Newton */ #include #include #include "libs/usb/LibUsbAdaptor.h" #include "libs/usb/LibUsbThread.h" #include "ola/Logging.h" #include "ola/testing/TestUtils.h" namespace { #if HAVE_LIBUSB_HOTPLUG_API int LIBUSB_CALL hotplug_callback(OLA_UNUSED struct libusb_context *ctx, OLA_UNUSED struct libusb_device *dev, OLA_UNUSED libusb_hotplug_event event, OLA_UNUSED void *user_data) { return 0; } #endif // HAVE_LIBUSB_HOTPLUG_API } // namespace class LibUsbThreadTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(LibUsbThreadTest); CPPUNIT_TEST(testNonHotplug); #if HAVE_LIBUSB_HOTPLUG_API CPPUNIT_TEST(testHotplug); #endif // HAVE_LIBUSB_HOTPLUG_API CPPUNIT_TEST_SUITE_END(); public: LibUsbThreadTest() : m_context(NULL) {} void setUp(); void tearDown(); void testNonHotplug(); #if HAVE_LIBUSB_HOTPLUG_API void testHotplug(); #endif // HAVE_LIBUSB_HOTPLUG_API private: libusb_context *m_context; void AttemptDeviceOpen(ola::usb::LibUsbThread *thread); }; CPPUNIT_TEST_SUITE_REGISTRATION(LibUsbThreadTest); void LibUsbThreadTest::setUp() { if (libusb_init(&m_context)) { OLA_INFO << "Failed to init libusb"; } } void LibUsbThreadTest::tearDown() { if (m_context) { libusb_exit(m_context); } } void LibUsbThreadTest::testNonHotplug() { if (!m_context) { return; } ola::usb::LibUsbSimpleThread thread(m_context); OLA_ASSERT_TRUE(thread.Init()); AttemptDeviceOpen(&thread); } #if HAVE_LIBUSB_HOTPLUG_API void LibUsbThreadTest::testHotplug() { if (!m_context) { return; } bool hotplug_support = ola::usb::LibUsbAdaptor::HotplugSupported(); OLA_DEBUG << "HotplugSupported(): " << hotplug_support; ola::usb::LibUsbHotplugThread thread(m_context, hotplug_callback, NULL); if (hotplug_support) { OLA_ASSERT_TRUE(thread.Init()); AttemptDeviceOpen(&thread); thread.Shutdown(); } else { OLA_WARN << "No hotplug support, check that starting the thread fails"; OLA_ASSERT_FALSE(thread.Init()); } } #endif // HAVE_LIBUSB_HOTPLUG_API /* * Try to open any USB device so we can test interaction with the thread. */ void LibUsbThreadTest::AttemptDeviceOpen(ola::usb::LibUsbThread *thread) { libusb_device_handle *usb_handle = NULL; libusb_device **device_list; size_t device_count = libusb_get_device_list(m_context, &device_list); for (unsigned int i = 0; i < device_count; i++) { libusb_device *usb_device = device_list[i]; if (libusb_open(usb_device, &usb_handle) == 0) { thread->OpenHandle(); break; } } if (usb_handle) { thread->CloseHandle(usb_handle); } libusb_free_device_list(device_list, 1); } ola-0.10.9/libs/usb/JaRuleWidget.h0000664000175000017500000001245414376533110013531 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * JaRuleWidget.h * A Ja Rule widget. * Copyright (C) 2015 Simon Newton */ #ifndef LIBS_USB_JARULEWIDGET_H_ #define LIBS_USB_JARULEWIDGET_H_ #include #include #include #include #include #include #include #include "libs/usb/LibUsbAdaptor.h" #include "libs/usb/JaRuleConstants.h" #include "libs/usb/Types.h" namespace ola { namespace usb { /** * @brief A Ja Rule hardware device (widget). * * Ja Rule devices may have more than one DMX/RDM port. * * This class provides two ways to control the ports on the device: * - The low level SendCommand() method, which sends a single request and * invokes a callback when the response is received. * - The high level API where the port is accessed via a JaRulePortHandle. * Since the JaRulePortHandle implements the * ola::rdm::DiscoverableRDMControllerInterface, the usual RDM methods can * be used. * * To obtain a JaRulePortHandle, call ClaimPort(), when you're finished with * the JaRulePortHandle you must call ReleasePort(). */ class JaRuleWidget { public: /** * @brief Create a new Ja Rule widget. * @param executor The Executor to run the callbacks on. * @param adaptor The LibUsbAdaptor to use. * @param usb_device the libusb_device for the Ja Rule widget. */ JaRuleWidget(ola::thread::ExecutorInterface *executor, AsyncronousLibUsbAdaptor *adaptor, libusb_device *usb_device); /** * @brief Destructor */ ~JaRuleWidget(); /** * @brief Initialize the Ja Rule widget. * @returns true if the USB device was opened and claimed correctly, false * otherwise. */ bool Init(); /** * @brief The device ID of this widget. * @returns The USBDeviceID. */ USBDeviceID GetDeviceId() const; /** * @brief Cancel all queued and inflight commands. * @param port_id The port id of the commands to cancel * * This will immediately run all CommandCompleteCallbacks with the * COMMAND_CANCELLED code. */ void CancelAll(uint8_t port_id); /** * @brief The number of ports on the widget. * @pre Init() has been called and returned true; * @returns The number of ports. * * Ports are numbered consecutively from 0. */ uint8_t PortCount() const; /** * @brief The UID of the widget. * @pre Init() has been called and returned true; * @returns The UID for the device. */ ola::rdm::UID GetUID() const; /** * @brief Get the manufacturer string. * @pre Init() has been called and returned true; * @returns The manufacturer string. */ std::string ManufacturerString() const; /** * @brief Get the product string. * @pre Init() has been called and returned true; * @returns The product string. */ std::string ProductString() const; /** * @brief Claim a handle to a port. * @param port_index The port to claim. * @returns a port handle, ownership is not transferred. Will return NULL if * the port id is invalid, or already claimed. */ class JaRulePortHandle* ClaimPort(uint8_t port_index); /** * @brief Release a handle to a port. * @param port_index The port to claim * @returns a port handle, ownership is not transferred. */ void ReleasePort(uint8_t port_index); /** * @brief The low level API to send a command to the widget. * @param port_index The port on which to send the command. * @param command the Command type. * @param data the payload data. The data is copied and can be freed once the * method returns. * @param size the payload size. * @param callback The callback to run when the command completes. * This may be run immediately in some conditions. * * SendCommand() can be called from any thread, and messages will be queued. */ void SendCommand(uint8_t port_index, CommandClass command, const uint8_t *data, unsigned int size, CommandCompleteCallback *callback); private: typedef std::vector PortHandles; ola::thread::ExecutorInterface *m_executor; LibUsbAdaptor *m_adaptor; libusb_device *m_device; libusb_device_handle *m_usb_handle; ola::rdm::UID m_uid; // The UID of the device, or 0000:00000000 if unset std::string m_manufacturer; std::string m_product; PortHandles m_ports; // The list of port handles. bool InternalInit(); static const uint8_t SUBCLASS_VALUE = 0xff; static const uint8_t PROTOCOL_VALUE = 0xff; DISALLOW_COPY_AND_ASSIGN(JaRuleWidget); }; } // namespace usb } // namespace ola #endif // LIBS_USB_JARULEWIDGET_H_ ola-0.10.9/libs/usb/JaRuleWidget.cpp0000664000175000017500000001725514376533110014070 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * JaRuleWidget.cpp * A Ja Rule widget. * Copyright (C) 2015 Simon Newton */ #include "libs/usb/JaRuleWidget.h" #include #include #include #include #include #include #include #include #include #include #include #include #include #include "libs/usb/JaRulePortHandle.h" #include "libs/usb/JaRuleWidgetPort.h" namespace ola { namespace usb { using ola::io::ByteString; using ola::rdm::UID; using std::auto_ptr; using std::string; namespace { struct EndpointCapabilties { EndpointCapabilties() : in_supported(false), out_supported(false), in_interface(0), out_interface(0) {} bool in_supported; bool out_supported; int in_interface; int out_interface; }; } // namespace JaRuleWidget::JaRuleWidget(ola::thread::ExecutorInterface *executor, AsyncronousLibUsbAdaptor *adaptor, libusb_device *usb_device) : m_executor(executor), m_adaptor(adaptor), m_device(usb_device), m_usb_handle(NULL), m_uid(0, 0) { m_adaptor->RefDevice(m_device); } JaRuleWidget::~JaRuleWidget() { STLDeleteElements(&m_ports); if (m_usb_handle) { m_adaptor->Close(m_usb_handle); } m_adaptor->UnrefDevice(m_device); } bool JaRuleWidget::Init() { bool ok = InternalInit(); if (!ok) { STLDeleteElements(&m_ports); if (m_usb_handle) { m_adaptor->Close(m_usb_handle); m_usb_handle = NULL; } } return ok; } USBDeviceID JaRuleWidget::GetDeviceId() const { return m_adaptor->GetDeviceId(m_device); } void JaRuleWidget::CancelAll(uint8_t port_index) { if (port_index > m_ports.size() - 1) { return; } JaRuleWidgetPort *port_info = m_ports[port_index]; port_info->CancelAll(); } uint8_t JaRuleWidget::PortCount() const { return m_ports.size(); } UID JaRuleWidget::GetUID() const { return m_uid; } string JaRuleWidget::ManufacturerString() const { return m_manufacturer; } string JaRuleWidget::ProductString() const { return m_product; } JaRulePortHandle* JaRuleWidget::ClaimPort(uint8_t port_index) { if (port_index > m_ports.size() - 1) { return NULL; } return m_ports[port_index]->ClaimPort(); } void JaRuleWidget::ReleasePort(uint8_t port_index) { if (port_index > m_ports.size() - 1) { return; } m_ports[port_index]->ReleasePort(); } void JaRuleWidget::SendCommand(uint8_t port_index, CommandClass command, const uint8_t *data, unsigned int size, CommandCompleteCallback *callback) { if (port_index > m_ports.size() - 1) { OLA_WARN << "Invalid JaRule Port " << static_cast(port_index); if (callback) { callback->Run(COMMAND_RESULT_INVALID_PORT, RC_UNKNOWN, 0, ByteString()); } return; } m_ports[port_index]->SendCommand(command, data, size, callback); } // Private Methods // ---------------------------------------------------------------------------- bool JaRuleWidget::InternalInit() { struct libusb_config_descriptor *config; int error = m_adaptor->GetActiveConfigDescriptor(m_device, &config); if (error) { return false; } // Each endpoint address is 8 bits. Bit 7 is the endpoint direction (in/out). // The lower 4 bits are the endpoint number. We try to find bulk endpoints // with matching numbers. typedef std::map EndpointMap; EndpointMap endpoint_map; for (uint8_t iface_index = 0; iface_index < config->bNumInterfaces; iface_index++) { const struct libusb_interface &iface = config->interface[iface_index]; // We don't support alt settings. if (iface.num_altsetting != 1) { continue; } const struct libusb_interface_descriptor &iface_descriptor = iface.altsetting[0]; if (iface_descriptor.bInterfaceClass == LIBUSB_CLASS_VENDOR_SPEC && iface_descriptor.bInterfaceSubClass == SUBCLASS_VALUE && iface_descriptor.bInterfaceProtocol == PROTOCOL_VALUE) { // Vendor class, subclass & protocol for (uint8_t endpoint_index = 0; endpoint_index < iface_descriptor.bNumEndpoints; endpoint_index++) { const struct libusb_endpoint_descriptor &endpoint = iface_descriptor.endpoint[endpoint_index]; if ((endpoint.bmAttributes & LIBUSB_TRANSFER_TYPE_MASK) != LIBUSB_TRANSFER_TYPE_BULK) { continue; } uint8_t endpoint_address = endpoint.bEndpointAddress; uint8_t endpoint_number = ( endpoint_address & LIBUSB_ENDPOINT_ADDRESS_MASK); uint8_t endpoint_direction = ( endpoint_address & LIBUSB_ENDPOINT_DIR_MASK); if (endpoint_direction == LIBUSB_ENDPOINT_IN) { endpoint_map[endpoint_number].in_supported = true; endpoint_map[endpoint_number].in_interface = iface_index; } if (endpoint_direction == LIBUSB_ENDPOINT_OUT) { endpoint_map[endpoint_number].out_supported = true; endpoint_map[endpoint_number].out_interface = iface_index; } } } } m_adaptor->FreeConfigDescriptor(config); if (!m_adaptor->OpenDevice(m_device, &m_usb_handle)) { return false; } // Get the serial number (UID) of the device. libusb_device_descriptor device_descriptor; if (m_adaptor->GetDeviceDescriptor(m_device, &device_descriptor)) { return false; } AsyncronousLibUsbAdaptor::DeviceInformation device_info; if (!m_adaptor->GetDeviceInfo(m_device, device_descriptor, &device_info)) { return false; } auto_ptr uid(UID::FromString(device_info.serial)); if (!uid.get() || uid->IsBroadcast()) { OLA_WARN << "Invalid JaRule serial number: " << device_info.serial; return false; } m_uid = *uid; m_manufacturer = device_info.manufacturer; m_product = device_info.product; std::set interfaces_to_claim; EndpointMap::const_iterator endpoint_iter = endpoint_map.begin(); uint8_t port_index = 0; for (; endpoint_iter != endpoint_map.end(); ++endpoint_iter) { const EndpointCapabilties &capabilities = endpoint_iter->second; if (capabilities.in_supported && capabilities.out_supported) { interfaces_to_claim.insert(capabilities.in_interface); interfaces_to_claim.insert(capabilities.out_interface); OLA_INFO << "Found Ja Rule port at " << static_cast(endpoint_iter->first); m_ports.push_back(new JaRuleWidgetPort( m_executor, m_adaptor, m_usb_handle, endpoint_iter->first, m_uid, port_index++)); } } std::set::const_iterator iface_iter = interfaces_to_claim.begin(); for (; iface_iter != interfaces_to_claim.end(); ++iface_iter) { if (m_adaptor->ClaimInterface(m_usb_handle, *iface_iter)) { return false; } } OLA_INFO << "Found JaRule device : " << m_uid; return true; } } // namespace usb } // namespace ola ola-0.10.9/libs/usb/Types.cpp0000664000175000017500000000301414376533110012632 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Types.cpp * Types used with the USB subsystem. * Copyright (C) 2015 Simon Newton */ #include "libs/usb/Types.h" #include #include "ola/strings/Format.h" namespace ola { namespace usb { using std::ostream; USBDeviceID::USBDeviceID(uint8_t bus_number, uint8_t device_address) : bus_number(bus_number), device_address(device_address) { } bool USBDeviceID::operator<(const USBDeviceID &id) const { if (bus_number < id.bus_number) { return true; } else if (bus_number == id.bus_number) { return device_address < id.device_address; } return false; } ostream& operator<<(ostream& os, const USBDeviceID &id) { return os << ola::strings::IntToString(id.bus_number) << ":" << ola::strings::IntToString(id.device_address); } } // namespace usb } // namespace ola ola-0.10.9/libs/usb/LibUsbAdaptor.cpp0000664000175000017500000003505114376533110014227 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * LibUsbAdaptor.cpp * The wrapper around libusb calls. * Copyright (C) 2014 Simon Newton */ #include "libs/usb/LibUsbAdaptor.h" #include #include #include #include #include "libs/usb/LibUsbThread.h" namespace ola { namespace usb { using std::ostringstream; using std::string; namespace { /** * @brief A wrapper around libusb_get_string_descriptor_ascii. */ bool GetStringDescriptorAscii(libusb_device_handle *usb_handle, uint8_t desc_index, string *data) { enum { buffer_size = 32 }; // static arrays FTW! unsigned char buffer[buffer_size]; int r = libusb_get_string_descriptor_ascii( usb_handle, desc_index, buffer, buffer_size); if (r <= 0) { OLA_INFO << "libusb_get_string_descriptor_ascii failed: " << LibUsbAdaptor::ErrorCodeToString(r); return false; } data->assign(reinterpret_cast(buffer)); return true; } /** * @brief A wrapper around libusb_open. */ bool Open(libusb_device *usb_device, libusb_device_handle **usb_handle) { int r = libusb_open(usb_device, usb_handle); if (r) { OLA_WARN << "Failed to open libusb device: " << usb_device << ": " << LibUsbAdaptor::ErrorCodeToString(r); return false; } return true; } bool OpenHandleAndClaimInterface(libusb_device *usb_device, int interface, libusb_device_handle **usb_handle) { if (!Open(usb_device, usb_handle)) { return false; } int r = libusb_claim_interface(*usb_handle, interface); if (r) { OLA_WARN << "Failed to claim interface " << interface << " on device: " << usb_device << ": " << LibUsbAdaptor::ErrorCodeToString(r); libusb_close(*usb_handle); *usb_handle = NULL; return false; } return true; } } // namespace // LibUsbAdaptor // ---------------------------------------------------------------------------- bool LibUsbAdaptor::Initialize(struct libusb_context **context) { int r = libusb_init(context); if (r) { OLA_WARN << "libusb_init() failed: " << ErrorCodeToString(r); return false; } return true; } bool LibUsbAdaptor::GetDeviceInfo( struct libusb_device *usb_device, const struct libusb_device_descriptor &device_descriptor, DeviceInformation *device_info) { // Since the calls on the handle are synchronous, we don't bother adding the // handle to the thread. libusb_device_handle *usb_handle; if (!Open(usb_device, &usb_handle)) { return false; } if (!GetStringDescriptorAscii(usb_handle, device_descriptor.iManufacturer, &device_info->manufacturer)) { OLA_INFO << "Failed to get manufacturer name"; } if (!GetStringDescriptorAscii(usb_handle, device_descriptor.iProduct, &device_info->product)) { OLA_INFO << "Failed to get product name"; } if (!GetStringDescriptorAscii(usb_handle, device_descriptor.iSerialNumber, &device_info->serial)) { OLA_WARN << "Failed to read serial number, the device probably doesn't " << "have one"; } libusb_close(usb_handle); return true; } bool LibUsbAdaptor::CheckManufacturer(const string &expected, const DeviceInformation &device_info) { if (expected != device_info.manufacturer) { OLA_WARN << "Manufacturer mismatch: " << expected << " != " << device_info.manufacturer; return false; } return true; } bool LibUsbAdaptor::CheckProduct(const string &expected, const DeviceInformation &device_info) { if (expected != device_info.product) { OLA_WARN << "Product mismatch: " << expected << " != " << device_info.product; return false; } return true; } bool LibUsbAdaptor::HotplugSupported() { #ifdef HAVE_LIBUSB_HOTPLUG_API return libusb_has_capability(LIBUSB_CAP_HAS_HOTPLUG) != 0; #else return false; #endif // HAVE_LIBUSB_HOTPLUG_API } string LibUsbAdaptor::ErrorCodeToString(const int error_code) { #ifdef HAVE_LIBUSB_ERROR_NAME return libusb_error_name(error_code); #else ostringstream str; str << "Error code " << error_code; return str.str(); #endif // HAVE_LIBUSB_ERROR_NAME } // BaseLibUsbAdaptor // ---------------------------------------------------------------------------- libusb_device* BaseLibUsbAdaptor::RefDevice(libusb_device *dev) { return libusb_ref_device(dev); } void BaseLibUsbAdaptor::UnrefDevice(libusb_device *dev) { libusb_unref_device(dev); } int BaseLibUsbAdaptor::SetConfiguration(libusb_device_handle *dev, int configuration) { return libusb_set_configuration(dev, configuration); } int BaseLibUsbAdaptor::ClaimInterface(libusb_device_handle *dev, int interface_number) { return libusb_claim_interface(dev, interface_number); } int BaseLibUsbAdaptor::DetachKernelDriver(libusb_device_handle *dev, int interface_number) { if (libusb_kernel_driver_active(dev, interface_number)) { int r = libusb_detach_kernel_driver(dev, interface_number); if (r) { OLA_WARN << "libusb_detach_kernel_driver failed for: " << dev << ": " << LibUsbAdaptor::ErrorCodeToString(r); } return r; } else { return 0; } } int BaseLibUsbAdaptor::GetActiveConfigDescriptor( libusb_device *dev, struct libusb_config_descriptor **config) { int r = libusb_get_active_config_descriptor(dev, config); if (r) { OLA_WARN << "libusb_get_active_config_descriptor failed for: " << dev << ": " << LibUsbAdaptor::ErrorCodeToString(r); } return r; } int BaseLibUsbAdaptor::GetDeviceDescriptor( libusb_device *dev, struct libusb_device_descriptor *desc) { int r = libusb_get_device_descriptor(dev, desc); if (r) { OLA_WARN << "libusb_get_device_descriptor failed for: " << dev << ": " << LibUsbAdaptor::ErrorCodeToString(r); } return r; } int BaseLibUsbAdaptor::GetConfigDescriptor( libusb_device *dev, uint8_t config_index, struct libusb_config_descriptor **config) { int r = libusb_get_config_descriptor(dev, config_index, config); if (r) { OLA_WARN << "libusb_get_config_descriptor failed for: " << dev << ": " << LibUsbAdaptor::ErrorCodeToString(r); } return r; } void BaseLibUsbAdaptor::FreeConfigDescriptor( struct libusb_config_descriptor *config) { libusb_free_config_descriptor(config); } bool BaseLibUsbAdaptor::GetStringDescriptor( libusb_device_handle *usb_handle, uint8_t descriptor_index, string *data) { return GetStringDescriptorAscii(usb_handle, descriptor_index, data); } struct libusb_transfer* BaseLibUsbAdaptor::AllocTransfer(int iso_packets) { return libusb_alloc_transfer(iso_packets); } void BaseLibUsbAdaptor::FreeTransfer(struct libusb_transfer *transfer) { return libusb_free_transfer(transfer); } int BaseLibUsbAdaptor::SubmitTransfer(struct libusb_transfer *transfer) { return libusb_submit_transfer(transfer); } int BaseLibUsbAdaptor::CancelTransfer(struct libusb_transfer *transfer) { return libusb_cancel_transfer(transfer); } void BaseLibUsbAdaptor::FillControlSetup(unsigned char *buffer, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint16_t wLength) { return libusb_fill_control_setup(buffer, bmRequestType, bRequest, wValue, wIndex, wLength); } void BaseLibUsbAdaptor::FillControlTransfer( struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char *buffer, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout) { return libusb_fill_control_transfer(transfer, dev_handle, buffer, callback, user_data, timeout); } void BaseLibUsbAdaptor::FillBulkTransfer(struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *buffer, int length, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout) { libusb_fill_bulk_transfer(transfer, dev_handle, endpoint, buffer, length, callback, user_data, timeout); } void BaseLibUsbAdaptor::FillInterruptTransfer(struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *buffer, int length, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout) { libusb_fill_interrupt_transfer(transfer, dev_handle, endpoint, buffer, length, callback, user_data, timeout); } int BaseLibUsbAdaptor::ControlTransfer( libusb_device_handle *dev_handle, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, unsigned char *data, uint16_t wLength, unsigned int timeout) { return libusb_control_transfer(dev_handle, bmRequestType, bRequest, wValue, wIndex, data, wLength, timeout); } int BaseLibUsbAdaptor::BulkTransfer(struct libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *transferred, unsigned int timeout) { return libusb_bulk_transfer(dev_handle, endpoint, data, length, transferred, timeout); } int BaseLibUsbAdaptor::InterruptTransfer(libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *actual_length, unsigned int timeout) { return libusb_interrupt_transfer(dev_handle, endpoint, data, length, actual_length, timeout); } USBDeviceID BaseLibUsbAdaptor::GetDeviceId(libusb_device *device) const { return USBDeviceID(libusb_get_bus_number(device), libusb_get_device_address(device)); } // SyncronousLibUsbAdaptor // ----------------------------------------------------------------------------- bool SyncronousLibUsbAdaptor::OpenDevice(libusb_device *usb_device, libusb_device_handle **usb_handle) { return Open(usb_device, usb_handle); } bool SyncronousLibUsbAdaptor::OpenDeviceAndClaimInterface( libusb_device *usb_device, int interface, libusb_device_handle **usb_handle) { return OpenHandleAndClaimInterface(usb_device, interface, usb_handle); } void SyncronousLibUsbAdaptor::Close(libusb_device_handle *usb_handle) { libusb_close(usb_handle); } // AsyncronousLibUsbAdaptor // ----------------------------------------------------------------------------- bool AsyncronousLibUsbAdaptor::OpenDevice(libusb_device *usb_device, libusb_device_handle **usb_handle) { bool ok = Open(usb_device, usb_handle); if (ok) { m_thread->OpenHandle(); } return ok; } bool AsyncronousLibUsbAdaptor::OpenDeviceAndClaimInterface( libusb_device *usb_device, int interface, libusb_device_handle **usb_handle) { bool ok = OpenHandleAndClaimInterface(usb_device, interface, usb_handle); if (ok) { m_thread->OpenHandle(); } return ok; } void AsyncronousLibUsbAdaptor::Close(libusb_device_handle *handle) { m_thread->CloseHandle(handle); } int AsyncronousLibUsbAdaptor::ControlTransfer( OLA_UNUSED libusb_device_handle *dev_handle, OLA_UNUSED uint8_t bmRequestType, OLA_UNUSED uint8_t bRequest, OLA_UNUSED uint16_t wValue, OLA_UNUSED uint16_t wIndex, OLA_UNUSED unsigned char *data, OLA_UNUSED uint16_t wLength, OLA_UNUSED unsigned int timeout) { OLA_DEBUG << "libusb_control_transfer in an AsyncronousLibUsbAdaptor"; return BaseLibUsbAdaptor::ControlTransfer(dev_handle, bmRequestType, bRequest, wValue, wIndex, data, wLength, timeout); } int AsyncronousLibUsbAdaptor::BulkTransfer( struct libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *transferred, unsigned int timeout) { OLA_DEBUG << "libusb_bulk_transfer in an AsyncronousLibUsbAdaptor"; return BaseLibUsbAdaptor::BulkTransfer(dev_handle, endpoint, data, length, transferred, timeout); } int AsyncronousLibUsbAdaptor::InterruptTransfer( OLA_UNUSED libusb_device_handle *dev_handle, OLA_UNUSED unsigned char endpoint, OLA_UNUSED unsigned char *data, OLA_UNUSED int length, OLA_UNUSED int *actual_length, OLA_UNUSED unsigned int timeout) { OLA_DEBUG << "libusb_interrupt_transfer in an AsyncronousLibUsbAdaptor"; return BaseLibUsbAdaptor::InterruptTransfer(dev_handle, endpoint, data, length, actual_length, timeout); } } // namespace usb } // namespace ola ola-0.10.9/libs/usb/JaRuleWidgetPort.cpp0000664000175000017500000003141614376533110014730 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * JaRuleWidgetPort.cpp * A Ja Rule Widget Port. * Copyright (C) 2015 Simon Newton */ #include "libs/usb/JaRuleWidgetPort.h" #include #include #include #include #include #include #include #include #include #include namespace ola { namespace usb { using ola::NewSingleCallback; using ola::io::ByteString; using ola::strings::ToHex; using ola::thread::MutexLocker; using ola::utils::JoinUInt8; using ola::utils::SplitUInt16; using std::cerr; using std::string; using std::auto_ptr; namespace { #ifdef _WIN32 __attribute__((__stdcall__)) #endif // _WIN32 void InTransferCompleteHandler(struct libusb_transfer *transfer) { JaRuleWidgetPort *port = static_cast(transfer->user_data); return port->_InTransferComplete(); } #ifdef _WIN32 __attribute__((__stdcall__)) #endif // _WIN32 void OutTransferCompleteHandler(struct libusb_transfer *transfer) { JaRuleWidgetPort *port = static_cast(transfer->user_data); return port->_OutTransferComplete(); } } // namespace JaRuleWidgetPort::JaRuleWidgetPort(ola::thread::ExecutorInterface *executor, LibUsbAdaptor *adaptor, libusb_device_handle *usb_handle, uint8_t endpoint_number, const ola::rdm::UID &uid, uint8_t physical_port) : m_executor(executor), m_adaptor(adaptor), m_usb_handle(usb_handle), m_endpoint_number(endpoint_number), m_uid(uid), m_physical_port(physical_port), m_handle(NULL), m_out_transfer(adaptor->AllocTransfer(0)), m_out_in_progress(false), m_in_transfer(adaptor->AllocTransfer(0)), m_in_in_progress(false) { } JaRuleWidgetPort::~JaRuleWidgetPort() { if (m_handle) { OLA_WARN << "JaRulePortHandle is still claimed!"; delete m_handle; } { MutexLocker locker(&m_mutex); if (!m_queued_commands.empty()) { OLA_WARN << "Queued commands remain, did we forget to call " "CancelTransfer()?"; } if (!m_pending_commands.empty()) { OLA_WARN << "Pending commands remain, did we forget to call " "CancelTransfer()?"; } // Cancelling may take up to a second if the endpoint has stalled. I can't // really see a way to speed this up. if (m_out_in_progress) { m_adaptor->CancelTransfer(m_out_transfer); } if (m_in_in_progress) { m_adaptor->CancelTransfer(m_in_transfer); } } OLA_DEBUG << "Waiting for transfers to complete"; bool transfers_pending = true; while (transfers_pending) { // Spin waiting for the transfers to complete. MutexLocker locker(&m_mutex); transfers_pending = m_out_in_progress || m_in_in_progress; } if (m_out_transfer) { m_adaptor->FreeTransfer(m_out_transfer); } if (m_in_transfer) { m_adaptor->FreeTransfer(m_in_transfer); } } JaRulePortHandle* JaRuleWidgetPort::ClaimPort() { if (m_handle) { return NULL; } m_handle = new JaRulePortHandle(this, m_uid, m_physical_port); return m_handle; } void JaRuleWidgetPort::ReleasePort() { if (m_handle) { delete m_handle; m_handle = NULL; } } void JaRuleWidgetPort::CancelAll() { CommandQueue queued_commands; PendingCommandMap pending_commands; { MutexLocker locker(&m_mutex); queued_commands = m_queued_commands; while (!m_queued_commands.empty()) { m_queued_commands.pop(); } pending_commands.swap(m_pending_commands); } while (!queued_commands.empty()) { auto_ptr command(queued_commands.front()); if (command->callback) { command->callback->Run(COMMAND_RESULT_CANCELLED, RC_UNKNOWN, 0, ByteString()); } queued_commands.pop(); } PendingCommandMap::iterator iter = pending_commands.begin(); for (; iter != pending_commands.end(); ++iter) { if (iter->second->callback) { iter->second->callback->Run(COMMAND_RESULT_CANCELLED, RC_UNKNOWN, 0, ByteString()); delete iter->second; } } { MutexLocker locker(&m_mutex); if (!(m_queued_commands.empty() && m_pending_commands.empty())) { OLA_WARN << "Some commands have not been cancelled"; } } } void JaRuleWidgetPort::SendCommand( CommandClass command_class, const uint8_t *data, unsigned int size, CommandCompleteCallback *callback) { if (size > MAX_PAYLOAD_SIZE) { OLA_WARN << "JaRule message exceeds max payload size"; if (callback) { callback->Run(COMMAND_RESULT_MALFORMED, RC_UNKNOWN, 0, ByteString()); } return; } if (size != 0 && data == NULL) { OLA_WARN << "JaRule data is NULL, size was " << size; callback->Run(COMMAND_RESULT_MALFORMED, RC_UNKNOWN, 0, ByteString()); return; } // Create the payload ByteString payload; payload.reserve(size + MIN_RESPONSE_SIZE); payload.push_back(SOF_IDENTIFIER); payload.push_back(0); // token, will be set on TX payload.push_back(command_class & 0xff); payload.push_back(command_class >> 8); payload.push_back(size & 0xff); payload.push_back(size >> 8); payload.append(data, size); payload.push_back(EOF_IDENTIFIER); if (payload.size() % USB_PACKET_SIZE == 0) { // We need to pad the message so that the transfer completes on the // Device side. We could use LIBUSB_TRANSFER_ADD_ZERO_PACKET instead but // that isn't available on all platforms. payload.push_back(0); } auto_ptr command(new PendingCommand( command_class, callback, payload)); OLA_INFO << "Adding new command " << ToHex(command_class); MutexLocker locker(&m_mutex); if (m_queued_commands.size() > MAX_QUEUED_MESSAGES) { locker.Release(); OLA_WARN << "JaRule outbound queue is full"; if (callback) { callback->Run(COMMAND_RESULT_QUEUE_FULL, RC_UNKNOWN, 0, ByteString()); } return; } m_queued_commands.push(command.release()); MaybeSendCommand(); } void JaRuleWidgetPort::_OutTransferComplete() { OLA_DEBUG << "Out Command status is " << LibUsbAdaptor::ErrorCodeToString(m_in_transfer->status); if (m_out_transfer->status == LIBUSB_TRANSFER_COMPLETED) { if (m_out_transfer->actual_length != m_out_transfer->length) { // TODO(simon): Decide what to do here OLA_WARN << "Only sent " << m_out_transfer->actual_length << " / " << m_out_transfer->length << " bytes"; } } MutexLocker locker(&m_mutex); m_out_in_progress = false; MaybeSendCommand(); } void JaRuleWidgetPort::_InTransferComplete() { OLA_DEBUG << "In transfer completed status is " << LibUsbAdaptor::ErrorCodeToString(m_in_transfer->status); MutexLocker locker(&m_mutex); m_in_in_progress = false; if (m_in_transfer->status == LIBUSB_TRANSFER_COMPLETED) { HandleResponse(m_in_transfer->buffer, m_in_transfer->actual_length); } PendingCommandMap::iterator iter = m_pending_commands.begin(); TimeStamp time_limit; m_clock.CurrentMonotonicTime(&time_limit); time_limit -= TimeInterval(1, 0); while (iter != m_pending_commands.end()) { PendingCommand *command = iter->second; if (command->out_time < time_limit) { ScheduleCallback(command->callback, COMMAND_RESULT_TIMEOUT, RC_UNKNOWN, 0, ByteString()); delete command; m_pending_commands.erase(iter++); } else { iter++; } } if (!m_pending_commands.empty()) { SubmitInTransfer(); } } void JaRuleWidgetPort::MaybeSendCommand() { if (m_out_in_progress || m_pending_commands.size() > MAX_IN_FLIGHT || m_queued_commands.empty()) { return; } PendingCommand *command = m_queued_commands.front(); m_queued_commands.pop(); uint8_t token = m_token.Next(); command->payload[1] = token; m_adaptor->FillBulkTransfer( m_out_transfer, m_usb_handle, m_endpoint_number | LIBUSB_ENDPOINT_OUT, const_cast(command->payload.data()), command->payload.size(), OutTransferCompleteHandler, static_cast(this), ENDPOINT_TIMEOUT_MS); int r = m_adaptor->SubmitTransfer(m_out_transfer); if (r) { OLA_WARN << "Failed to submit outbound transfer: " << LibUsbAdaptor::ErrorCodeToString(r); ScheduleCallback(command->callback, COMMAND_RESULT_SEND_ERROR, RC_UNKNOWN, 0, ByteString()); delete command; return; } m_clock.CurrentMonotonicTime(&command->out_time); std::pair p = m_pending_commands.insert( PendingCommandMap::value_type(token, command)); if (!p.second) { // We had an old entry, cancel it. ScheduleCallback(p.first->second->callback, COMMAND_RESULT_CANCELLED, RC_UNKNOWN, 0, ByteString()); delete p.first->second; p.first->second = command; } m_out_in_progress = true; if (!m_in_in_progress) { SubmitInTransfer(); } return; } bool JaRuleWidgetPort::SubmitInTransfer() { if (m_in_in_progress) { OLA_WARN << "Read already pending"; return true; } m_adaptor->FillBulkTransfer(m_in_transfer, m_usb_handle, m_endpoint_number | LIBUSB_ENDPOINT_IN, m_in_buffer, IN_BUFFER_SIZE, InTransferCompleteHandler, static_cast(this), ENDPOINT_TIMEOUT_MS); int r = m_adaptor->SubmitTransfer(m_in_transfer); if (r) { OLA_WARN << "Failed to submit input transfer: " << LibUsbAdaptor::ErrorCodeToString(r); return false; } m_in_in_progress = true; return true; } /* * */ void JaRuleWidgetPort::HandleResponse(const uint8_t *data, unsigned int size) { if (size < MIN_RESPONSE_SIZE) { OLA_WARN << "Response was too small, " << size << " bytes, min was " << MIN_RESPONSE_SIZE; return; } if (data[0] != SOF_IDENTIFIER) { OLA_WARN << "SOF_IDENTIFIER mismatch, was " << ToHex(data[0]); return; } uint8_t token = data[1]; uint16_t command_class = JoinUInt8(data[3], data[2]); uint16_t payload_size = JoinUInt8(data[5], data[4]); JaRuleReturnCode return_code = RC_UNKNOWN; if (data[6] < RC_LAST) { return_code = static_cast(data[6]); } uint8_t status_flags = data[7]; if (payload_size + MIN_RESPONSE_SIZE > size) { OLA_WARN << "Message size of " << (payload_size + MIN_RESPONSE_SIZE) << " is greater than rx size of " << size; return; } // TODO(simon): Remove this. if (LogLevel() >= OLA_LOG_INFO) { ola::strings::FormatData(&std::cerr, data, size); } if (data[MIN_RESPONSE_SIZE + payload_size - 1] != EOF_IDENTIFIER) { OLA_WARN << "EOF_IDENTIFIER mismatch, was " << ToHex(data[payload_size + MIN_RESPONSE_SIZE - 1]); return; } PendingCommand *command; if (!STLLookupAndRemove(&m_pending_commands, token, &command)) { return; } USBCommandResult status = COMMAND_RESULT_OK; if (command->command != command_class) { status = COMMAND_RESULT_CLASS_MISMATCH; } ByteString payload; if (payload_size) { payload.assign(data + MIN_RESPONSE_SIZE - 1, payload_size); } ScheduleCallback( command->callback, status, return_code, status_flags, payload); delete command; } /* * @brief Schedule a callback to be run on the Executor. */ void JaRuleWidgetPort::ScheduleCallback( CommandCompleteCallback *callback, USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ByteString &payload) { if (!callback) { return; } CallbackArgs args = { result, return_code, status_flags, payload }; if (callback) { m_executor->Execute(NewSingleCallback( this, &JaRuleWidgetPort::RunCallback, callback, args)); } } /* * @brief Only ever run in the Executor thread. */ void JaRuleWidgetPort::RunCallback(CommandCompleteCallback *callback, CallbackArgs args) { callback->Run(args.result, args.return_code, args.status_flags, args.payload); } } // namespace usb } // namespace ola ola-0.10.9/libs/usb/Makefile.mk0000664000175000017500000000264114376533110013075 00000000000000# LIBRARIES ################################################## if USE_LIBUSB noinst_LTLIBRARIES += libs/usb/libolausb.la libs_usb_libolausb_la_SOURCES = \ libs/usb/HotplugAgent.cpp \ libs/usb/HotplugAgent.h \ libs/usb/JaRuleConstants.h \ libs/usb/JaRuleConstants.cpp \ libs/usb/JaRulePortHandle.cpp \ libs/usb/JaRulePortHandle.h \ libs/usb/JaRulePortHandleImpl.cpp \ libs/usb/JaRulePortHandleImpl.h \ libs/usb/JaRuleWidget.cpp \ libs/usb/JaRuleWidget.h \ libs/usb/JaRuleWidgetPort.cpp \ libs/usb/JaRuleWidgetPort.h \ libs/usb/LibUsbAdaptor.cpp \ libs/usb/LibUsbAdaptor.h \ libs/usb/LibUsbThread.cpp \ libs/usb/LibUsbThread.h \ libs/usb/Types.cpp \ libs/usb/Types.h libs_usb_libolausb_la_CXXFLAGS = $(COMMON_CXXFLAGS) \ $(libusb_CFLAGS) libs_usb_libolausb_la_LIBADD = $(libusb_LIBS) \ common/libolacommon.la # TESTS ################################################## test_programs += libs/usb/LibUsbThreadTester LIBS_USB_TEST_LDADD = $(COMMON_TESTING_LIBS) \ $(libusb_LIBS) \ libs/usb/libolausb.la libs_usb_LibUsbThreadTester_SOURCES = \ libs/usb/LibUsbThreadTest.cpp libs_usb_LibUsbThreadTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) \ $(libusb_CFLAGS) libs_usb_LibUsbThreadTester_LDADD = $(LIBS_USB_TEST_LDADD) endif ola-0.10.9/libs/usb/LibUsbAdaptor.h0000664000175000017500000005561714376533110013706 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * LibUsbAdaptor.h * The wrapper around libusb calls. * Copyright (C) 2014 Simon Newton */ #ifndef LIBS_USB_LIBUSBADAPTOR_H_ #define LIBS_USB_LIBUSBADAPTOR_H_ #include #include #include "ola/base/Macro.h" #include "libs/usb/Types.h" namespace ola { namespace usb { /** * @brief Wraps calls to libusb so we can test the code. */ class LibUsbAdaptor { public: struct DeviceInformation { std::string manufacturer; std::string product; std::string serial; }; virtual ~LibUsbAdaptor() {} // Device handling and enumeration /** * @brief Wraps libusb_ref_device. * @param dev the device to reference * @returns the same device */ virtual libusb_device* RefDevice(libusb_device *dev) = 0; /** * @brief Wraps libusb_unref_device. * @param dev the device to unreference. */ virtual void UnrefDevice(libusb_device *dev) = 0; /** * @brief Open a libusb device. * @param usb_device The usb device to open. * @param[out] usb_handle the new device handle. * @returns true if the device was opened, false otherwise. */ virtual bool OpenDevice(libusb_device *usb_device, libusb_device_handle **usb_handle) = 0; /** * @brief Open a libusb device and claim an interface. * @param usb_device The usb device to open. * @param interface the interface index to claim. * @param[out] usb_handle the new device handle. * @returns true if the device was opened and the interface claimed, * false otherwise. */ virtual bool OpenDeviceAndClaimInterface( libusb_device *usb_device, int interface, libusb_device_handle **usb_handle) = 0; /** * @brief Close a libusb handle. * @param usb_handle the handle to close. */ virtual void Close(libusb_device_handle *usb_handle) = 0; /** * @brief Wraps libusb_set_configuration. * @param dev a device handle * @param configuration the bConfigurationValue of the configuration you * wish to activate, or -1 if you wish to put the device in an unconfigured * state. * @returns 0 on success * @returns LIBUSB_ERROR_NOT_FOUND if the requested configuration does not * exist. * @returns LIBUSB_ERROR_BUSY if interfaces are currently claimed * @returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected * @returns another LIBUSB_ERROR code on other failure */ virtual int SetConfiguration(libusb_device_handle *dev, int configuration) = 0; /** * @brief Wraps libusb_claim_interface. * @param dev a device handle * @param interface_number the bInterfaceNumber of the interface you * wish to claim * @returns 0 on success * @returns LIBUSB_ERROR_NOT_FOUND if the requested interface does not exist * @returns LIBUSB_ERROR_BUSY if another program or driver has claimed the * interface * @returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected * @returns a LIBUSB_ERROR code on other failure */ virtual int ClaimInterface(libusb_device_handle *dev, int interface_number) = 0; /** * @brief Detach a kernel driver. * @param dev a device handle * @param interface_number the interface to detach the driver from * @returns 0 on success * @returns LIBUSB_ERROR_NOT_FOUND if no kernel driver was active * @returns LIBUSB_ERROR_INVALID_PARAM if the interface does not exist * @returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected * @returns LIBUSB_ERROR_NOT_SUPPORTED on platforms where the functionality * is not available * @returns another LIBUSB_ERROR code on other failure * */ virtual int DetachKernelDriver(libusb_device_handle *dev, int interface_number) = 0; // USB descriptors /** * @brief Wraps libusb_get_device_descriptor. * @param dev a device * @param[out] descriptor The device descriptor. * @returns 0 on success * @returns another LIBUSB_ERROR code on error */ virtual int GetDeviceDescriptor( libusb_device *dev, struct libusb_device_descriptor *descriptor) = 0; /** * @brief Wraps libusb_get_active_config_descriptor. * @param dev a device * @param[out] config output location for the USB configuration descriptor. * Only valid if 0 was returned. Must be freed with * libusb_free_config_descriptor() after use. * @returns 0 on success * @returns LIBUSB_ERROR_NOT_FOUND if the device is in unconfigured state * @returns another LIBUSB_ERROR code on error */ virtual int GetActiveConfigDescriptor( libusb_device *dev, struct libusb_config_descriptor **config) = 0; /** * @brief Wraps libusb_get_config_descriptor. * @param dev a device * @param config_index the index of the configuration you wish to retrieve * @param[out] config output location for the USB configuration descriptor. * Only valid if 0 was returned. Must be freed with * libusb_free_config_descriptor() after use. * @returns 0 on success * @returns LIBUSB_ERROR_NOT_FOUND if the configuration does not exist * @returns another LIBUSB_ERROR code on error */ virtual int GetConfigDescriptor(libusb_device *dev, uint8_t config_index, struct libusb_config_descriptor **config) = 0; /** * @brief Wraps busb_free_config_descriptor. * @param config the configuration descriptor to free */ virtual void FreeConfigDescriptor( struct libusb_config_descriptor *config) = 0; /** * @brief Get the value of a string descriptor. * @param usb_handle The USB device handle * @param descriptor_index The index of the string descriptor to fetch. * @param[out] data The value of the string descriptor. * @returns true if the string descriptor was retrieved, false otherwise. */ virtual bool GetStringDescriptor(libusb_device_handle *usb_handle, uint8_t descriptor_index, std::string *data) = 0; // Asynchronous device I/O /** * @brief Wraps libusb_alloc_transfer * @param iso_packets number of isochronous packet descriptors to allocate * @returns a newly allocated transfer, or NULL on error */ virtual struct libusb_transfer* AllocTransfer(int iso_packets) = 0; /** * @brief Wraps libusb_free_transfer. * @param transfer the transfer to free */ virtual void FreeTransfer(struct libusb_transfer *transfer) = 0; /** * @brief Wraps libusb_submit_transfer. * @param transfer the transfer to submit * @returns 0 on success * @returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected * @returns LIBUSB_ERROR_BUSY if the transfer has already been submitted. * @returns LIBUSB_ERROR_NOT_SUPPORTED if the transfer flags are not supported * by the operating system. * @returns another LIBUSB_ERROR code on other failure */ virtual int SubmitTransfer(struct libusb_transfer *transfer) = 0; /** * @brief Wraps libusb_cancel_transfer * @param transfer the transfer to cancel * @returns 0 on success * @returns LIBUSB_ERROR_NOT_FOUND if the transfer is already complete or * cancelled. * @returns a LIBUSB_ERROR code on failure */ virtual int CancelTransfer(struct libusb_transfer *transfer) = 0; /** * @brief Wraps libusb_fill_control_setup * @param[out] buffer buffer to output the setup packet into * This pointer must be aligned to at least 2 bytes boundary. * @param bmRequestType the request type field for the setup packet * @param bRequest the request field for the setup packet * @param wValue the value field for the setup packet * @param wIndex the index field for the setup packet * @param wLength the length field for the setup packet. The data buffer * should be at least this size. */ virtual void FillControlSetup(unsigned char *buffer, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint16_t wLength) = 0; /** * @brief Wraps libusb_fill_control_transfer * @param[out] transfer the transfer to populate * @param dev_handle handle of the device that will handle the transfer * @param buffer data buffer. If provided, this function will interpret the * first 8 bytes as a setup packet and infer the transfer length from that. * This pointer must be aligned to at least 2 bytes boundary. * @param callback callback function to be invoked on transfer completion * @param user_data user data to pass to callback function * @param timeout timeout for the transfer in milliseconds */ virtual void FillControlTransfer(struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char *buffer, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout) = 0; /** * @brief Wraps libusb_fill_bulk_transfer. * @param[out] transfer the transfer to populate * @param dev_handle handle of the device that will handle the transfer * @param endpoint address of the endpoint where this transfer will be sent * @param buffer data buffer. If provided, this function will interpret the * first 8 bytes as a setup packet and infer the transfer length from that. * This pointer must be aligned to at least 2 bytes boundary. * @param length length of data buffer * @param callback callback function to be invoked on transfer completion * @param user_data user data to pass to callback function * @param timeout timeout for the transfer in milliseconds */ virtual void FillBulkTransfer(struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *buffer, int length, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout) = 0; /** * @brief Wraps libusb_fill_interrupt_transfer. * @param[out] transfer the transfer to populate * @param dev_handle handle of the device that will handle the transfer * @param endpoint address of the endpoint where this transfer will be sent * @param buffer data buffer * @param length length of data buffer * @param callback callback function to be invoked on transfer completion * @param user_data user data to pass to callback function * @param timeout timeout for the transfer in milliseconds */ virtual void FillInterruptTransfer(struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *buffer, int length, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout) = 0; // Synchronous device I/O /** * @brief Wraps libusb_control_transfer(). * @param dev_handle a handle for the device to communicate with * @param bmRequestType the request type field for the setup packet * @param bRequest the request field for the setup packet * @param wValue the value field for the setup packet * @param wIndex the index field for the setup packet * @param [in,out] data a suitably-sized data buffer for either input or * output (depending on direction bits within bmRequestType) * @param wLength the length field for the setup packet. The data buffer * should be at least this size. * @param timeout timeout (in milliseconds) that this function should wait * before giving up due to no response being received. For an unlimited * timeout, use value 0. * @returns on success, the number of bytes actually transferred * */ virtual int ControlTransfer(libusb_device_handle *dev_handle, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, unsigned char *data, uint16_t wLength, unsigned int timeout) = 0; /** * @brief Wraps libusb_bulk_transfer. * @returns 0 on success and populates transferred * @returns LIBUSB_ERROR_TIMEOUT if the transfer timed out (and populates * transferred) * @returns LIBUSB_ERROR_PIPE if the endpoint halted * @returns LIBUSB_ERROR_OVERFLOW if the device offered more data, see * @returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected * @returns another LIBUSB_ERROR code on other failures */ virtual int BulkTransfer(struct libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *transferred, unsigned int timeout) = 0; /** * @brief Wraps libusb_interrupt_transfer * @returns 0 on success and populates transferred * @returns LIBUSB_ERROR_TIMEOUT if the transfer timed out * @returns LIBUSB_ERROR_PIPE if the endpoint halted * @returns LIBUSB_ERROR_OVERFLOW if the device offered more data, see * @returns LIBUSB_ERROR_NO_DEVICE if the device has been disconnected * @returns another LIBUSB_ERROR code on other error */ virtual int InterruptTransfer(libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *actual_length, unsigned int timeout) = 0; /** * @brief Get the USBDeviceID for a device. * @param device The libusb device to get the ID of. * @returns The USBDeviceID for this device. */ virtual USBDeviceID GetDeviceId(libusb_device *device) const = 0; // Static helper methods. /** * @brief Initialize a new libusb context. * @param context A pointer to a libusb context. * @returns true if the context is initialized, false otherwise. */ static bool Initialize(struct libusb_context **context); /** * @brief Fetch the manufacturer, product and serial strings from a device. * @param usb_device The USB device to get information for. * @param device_descriptor The descriptor to use * @param[out] device_info The DeviceInformation struct to populate. * @returns true if we fetched the information, false otherwise. */ static bool GetDeviceInfo( struct libusb_device *usb_device, const struct libusb_device_descriptor &device_descriptor, DeviceInformation *device_info); /** * @brief Check if the manufacturer string matches the expected value. * @param expected The expected manufacturer string. * @param device_info The DeviceInformation struct to check against. * @returns true if the strings matched, false otherwise. */ static bool CheckManufacturer(const std::string &expected, const DeviceInformation &device_info); /** * @brief Check if the product string matches the expected value. * @param expected The expected product string. * @param device_info The DeviceInformation struct to check against. * @returns true if the strings matched, false otherwise. */ static bool CheckProduct(const std::string &expected, const DeviceInformation &device_info); /** * @brief Check if this platform supports hotplug. * @returns true if hotplug is supported and enabled on this platform, false * otherwise. */ static bool HotplugSupported(); /** * @brief Try and convert an error code to a string * @param error_code The error code. * @returns A string representing the error code. */ static std::string ErrorCodeToString(const int error_code); }; /** * @brief The base LibUsbAdaptor that passes most calls through to libusb. */ class BaseLibUsbAdaptor : public LibUsbAdaptor { public: // Device handling and enumeration libusb_device* RefDevice(libusb_device *dev); void UnrefDevice(libusb_device *dev); int SetConfiguration(libusb_device_handle *dev, int configuration); int ClaimInterface(libusb_device_handle *dev, int interface_number); int DetachKernelDriver(libusb_device_handle *dev, int interface_number); // USB descriptors int GetDeviceDescriptor(libusb_device *dev, struct libusb_device_descriptor *descriptor); int GetActiveConfigDescriptor( libusb_device *dev, struct libusb_config_descriptor **config); int GetConfigDescriptor(libusb_device *dev, uint8_t config_index, struct libusb_config_descriptor **config); void FreeConfigDescriptor(struct libusb_config_descriptor *config); bool GetStringDescriptor(libusb_device_handle *usb_handle, uint8_t descriptor_index, std::string *data); // Asynchronous device I/O struct libusb_transfer* AllocTransfer(int iso_packets); void FreeTransfer(struct libusb_transfer *transfer); int SubmitTransfer(struct libusb_transfer *transfer); int CancelTransfer(struct libusb_transfer *transfer); void FillControlSetup(unsigned char *buffer, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, uint16_t wLength); void FillControlTransfer(struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char *buffer, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout); void FillBulkTransfer(struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *buffer, int length, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout); void FillInterruptTransfer(struct libusb_transfer *transfer, libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *buffer, int length, libusb_transfer_cb_fn callback, void *user_data, unsigned int timeout); // Synchronous device I/O int ControlTransfer(libusb_device_handle *dev_handle, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, unsigned char *data, uint16_t wLength, unsigned int timeout); int BulkTransfer(struct libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *transferred, unsigned int timeout); int InterruptTransfer(libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *actual_length, unsigned int timeout); USBDeviceID GetDeviceId(libusb_device *device) const; }; /** * @brief A LibUsbAdaptor for use with Syncronous widgets. * * When using syncronous mode, we don't have the requirement of interacting * with a LibUsbThread. */ class SyncronousLibUsbAdaptor : public BaseLibUsbAdaptor { public: SyncronousLibUsbAdaptor() {} bool OpenDevice(libusb_device *usb_device, libusb_device_handle **usb_handle); bool OpenDeviceAndClaimInterface(libusb_device *usb_device, int interface, libusb_device_handle **usb_handle); void Close(libusb_device_handle *usb_handle); private: DISALLOW_COPY_AND_ASSIGN(SyncronousLibUsbAdaptor); }; /** * @brief A LibUsbAdaptor for use with Asyncronous widgets. * * Asyncronous mode requires notifying the LibUsbThread when handles are opened * and closed. */ class AsyncronousLibUsbAdaptor : public BaseLibUsbAdaptor { public: explicit AsyncronousLibUsbAdaptor(class LibUsbThread *thread) : m_thread(thread) { } bool OpenDevice(libusb_device *usb_device, libusb_device_handle **usb_handle); bool OpenDeviceAndClaimInterface(libusb_device *usb_device, int interface, libusb_device_handle **usb_handle); void Close(libusb_device_handle *usb_handle); int ControlTransfer(libusb_device_handle *dev_handle, uint8_t bmRequestType, uint8_t bRequest, uint16_t wValue, uint16_t wIndex, unsigned char *data, uint16_t wLength, unsigned int timeout); int BulkTransfer(struct libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *transferred, unsigned int timeout); int InterruptTransfer(libusb_device_handle *dev_handle, unsigned char endpoint, unsigned char *data, int length, int *actual_length, unsigned int timeout); private: class LibUsbThread *m_thread; DISALLOW_COPY_AND_ASSIGN(AsyncronousLibUsbAdaptor); }; } // namespace usb } // namespace ola #endif // LIBS_USB_LIBUSBADAPTOR_H_ ola-0.10.9/libs/usb/JaRulePortHandleImpl.h0000664000175000017500000001262414376533110015167 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * JaRulePortHandleImpl.h * The implementation of the Ja Rule Port Handle. * Copyright (C) 2015 Simon Newton */ #ifndef LIBS_USB_JARULEPORTHANDLEIMPL_H_ #define LIBS_USB_JARULEPORTHANDLEIMPL_H_ #include #include #include #include #include #include #include #include #include #include "libs/usb/JaRuleConstants.h" namespace ola { namespace usb { /** * @brief The internal implementation of a Ja Rule Port Handle. * * This class is responsible for translating high level intent, e.g. "send RDM * command" to the binary messages that can then be passed to a JaRuleWidget. */ class JaRulePortHandleImpl : public ola::rdm::DiscoveryTargetInterface, public ola::rdm::DiscoverableRDMControllerInterface { public: /** * @brief Create a new JaRulePortHandleImpl. */ JaRulePortHandleImpl(class JaRuleWidgetPort *parent_port, const ola::rdm::UID &uid, uint8_t physical_port); ~JaRulePortHandleImpl(); // From DiscoverableRDMControllerInterface void RunFullDiscovery(ola::rdm::RDMDiscoveryCallback *callback); void RunIncrementalDiscovery(ola::rdm::RDMDiscoveryCallback *callback); void SendRDMRequest(ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *on_complete); // From DiscoveryTargetInterface void MuteDevice(const ola::rdm::UID &target, MuteDeviceCallback *mute_complete); void UnMuteAll(UnMuteDeviceCallback *unmute_complete); void Branch(const ola::rdm::UID &lower, const ola::rdm::UID &upper, BranchCallback *branch_complete); /** * @brief Send DMX data from this widget * @param buffer The DmxBuffer containing the data to send. * @returns true if the data was sent, false otherwise. */ bool SendDMX(const DmxBuffer &buffer); /** * @brief Change the mode of this port. */ bool SetPortMode(JaRulePortMode new_mode); private: PACK( struct DUBTiming { uint16_t start; //!< The start of the discovery response. uint16_t end; //!< The end of the discovery response. }); PACK( struct GetSetTiming { uint16_t break_start; //!< The start of the break. uint16_t mark_start; //!< The start of the mark / end of the break. uint16_t mark_end; //!< The end of the mark. }); class JaRuleWidgetPort* const m_port; // not owned const ola::rdm::UID m_uid; const uint8_t m_physical_port; bool m_in_shutdown; // DMX members DmxBuffer m_dmx; bool m_dmx_in_progress; bool m_dmx_queued; CommandCompleteCallback *m_dmx_callback; // RDM members ola::rdm::DiscoveryAgent m_discovery_agent; ola::SequenceNumber m_transaction_number; ola::rdm::UIDSet m_uids; void CheckStatusFlags(uint8_t flags); void DMXComplete(USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ola::io::ByteString &payload); void MuteDeviceComplete(MuteDeviceCallback *mute_complete, USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ola::io::ByteString &payload); void UnMuteDeviceComplete(UnMuteDeviceCallback *unmute_complete, USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ola::io::ByteString &payload); void DUBComplete(BranchCallback *callback, USBCommandResult status, JaRuleReturnCode return_code, uint8_t status_flags, const ola::io::ByteString &payload); void RDMComplete(const ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *m_rdm_callback, USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ola::io::ByteString &payload); ola::rdm::RDMResponse* UnpackRDMResponse( const ola::rdm::RDMRequest *request, const ola::io::ByteString &payload, ola::rdm::RDMStatusCode *status_code); void DiscoveryComplete(ola::rdm::RDMDiscoveryCallback *callback, OLA_UNUSED bool ok, const ola::rdm::UIDSet &uids); CommandClass GetCommandFromRequest(const ola::rdm::RDMRequest *request); DISALLOW_COPY_AND_ASSIGN(JaRulePortHandleImpl); }; } // namespace usb } // namespace ola #endif // LIBS_USB_JARULEPORTHANDLEIMPL_H_ ola-0.10.9/libs/usb/JaRulePortHandle.h0000664000175000017500000000476114376533110014350 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * JaRulePortHandle.h * A Ja Rule Port Handle. * Copyright (C) 2015 Simon Newton */ #ifndef LIBS_USB_JARULEPORTHANDLE_H_ #define LIBS_USB_JARULEPORTHANDLE_H_ #include #include #include #include #include #include #include "libs/usb/JaRuleConstants.h" namespace ola { namespace usb { /** * @brief Represents a DMX/RDM port on a Ja Rule device. */ class JaRulePortHandle : public ola::rdm::DiscoverableRDMControllerInterface { public: /** * @brief Create a new Ja Rule Port Handle. */ JaRulePortHandle(class JaRuleWidgetPort *parent_port, const ola::rdm::UID &uid, uint8_t physical_port); ~JaRulePortHandle(); void SendRDMRequest(ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *on_complete); void RunFullDiscovery(ola::rdm::RDMDiscoveryCallback *callback); void RunIncrementalDiscovery(ola::rdm::RDMDiscoveryCallback *callback); /** * @brief Send DMX data from this widget * @param buffer The DmxBuffer containing the data to send. * @returns true if the data was sent, false otherwise. */ bool SendDMX(const DmxBuffer &buffer); /** * @brief Change the mode of the port. * * @todo I need to think about how to return errors from this since it's * async. */ bool SetPortMode(JaRulePortMode new_mode); private: // Order of destruction is important. std::auto_ptr m_impl; ola::rdm::DiscoverableQueueingRDMController m_queueing_controller; static const unsigned int RDM_QUEUE_SIZE = 50; DISALLOW_COPY_AND_ASSIGN(JaRulePortHandle); }; } // namespace usb } // namespace ola #endif // LIBS_USB_JARULEPORTHANDLE_H_ ola-0.10.9/libs/Makefile.mk0000664000175000017500000000007214376533110012300 00000000000000include libs/acn/Makefile.mk include libs/usb/Makefile.mk ola-0.10.9/NEWS0000664000175000017500000012011014376533110007774 0000000000000026/2/2023 ola-0.10.9 Features: * Python 3 compatibility across the board (including the RDM Responder Tests)! #1506 * Support for the JMS USB2DMX PRO V2.1 device via the FTDI plugin #1728 API: * Python: Add a fetch current DMX example. RDM Tests: * Python 3 compatibility of the RDM Tests #1599 * Fix a longstanding bug in the GetMaxPacketSize RDM test around timeouts Bugs: * Fix some tests not working on Big Endian machines because our RPC is encoded with native format and those tests used sample data from a Little Endian machine * Renamed EndpointNoticationEvent(sic) to EndpointNotificationEvent in the E1.33 EndpointManager code * Check if librt exists and add it to the build if required * Ensure we can build on later Protobuf and C++ and silence deprecation messages where required * Fix the NetBSD build * Clarify the usage of some of the various Enttec Open DMX USB plugins * Relax the timing on the ClientWrapperTest so it doesn't fail occasionally #1714 * Correct the documentation of some existing limits in the E1.31 plugin * Fix some undefined behaviour in TimeoutManager::ExecuteTimeouts #1726 * Fix UARTs on Debian Bullseye #1749 * Fix Python version detection for versions > 3.9 #1755, #1780 * Update Angular and Angular-Route versions used by the new web UI and add workaround to be compatible #1782 Debian #1016447 * Significantly reduce the delay when using StreamingClient with EPoll and multiple universes #1793 Internal: * Add more debugging so we can tell why setting the baud rate failed * Replace "currentThread" with "current_thread" in Python since the former has been deprecated * Fix lots more internal typos and grammar * Add unit tests for more of the Python RDM Test classes * Sort the Python imports with isort 22/11/2020 ola-0.10.8 Features: * Support DragonFly BSD * Add another Debian test * Add the E1.33 NACK Reasons * Add the E1.37-7 NACK Reasons * Use clock_gettime's CLOCK_MONOTONIC if available * Collect the PDL size in the model collector API: * Deprecated Clock::CurrentTime and added Clock::CurrentMonotonicTime and Clock::CurrentRealTime. Occurrences of Clock::CurrentTime have been replaced with either variant as applicable. RDM Tests: * Fix a bug in the RDM tests to ensure they can cope with 255 personalities #1508 * Only add valid network interface IDs to the test list so future tests don't fail * Add a label to the GetOutOfRangePersonalityDescription test Bugs: * Fix a few more minor documentation spelling errors found by codespell * Point to the main site rather than the wiki for RDM test help * Fix the build on FreeBSD 10.0, 10.4 and 11 * Make PID store loading more robust * Clarify some of the man page options for olad * Fix some dead links in documentation * Properly close socket on destruction of Python OlaClient * Fix various Python 3 compatibility issues * Try and fetch index and type via sockaddr_dl struct for better *BSD support * Backport some Debian changes * Use C++11 if required by random #1477 * Correct uartdmx plugin documentation for the example UART #1320 * Ensure we don't return unsuitable network indices via RDM #1478 * Ensure a non-existent UID exits with a non-zero exit code * Fix a bug in how we simulate RDM responses and collisions * Fix an RDM discovery bug for how we handle phantom UIDs * Ensure _close_callback is assigned before we might need to run it in the Python API * Fix a bug with the Python ola_rdm_get and PROXIED_DEVICES display * Renamed RESONSE_INVALID_DESTINATION(sic) to RESPONSE_INVALID_DESTINATION in the ArduinoWidget code * Fix compatibility with GCC 9 #1553 Debian #925793 * Ensure the GPIO plugin correctly writes to the last configured pin * Fix compatibility with ncurses 6 * Fix compatibility with Protobuf 3.7 and newer (tested with up to 3.12.2) #1550, #1634 * Rename CircularDepdendancyException(sic) to CircularDependencyException in the Python RDM Test code, also the relevant comments * Fix a minor longstanding logging bug with Avahi subtype registration errors * Fix Enttec USB Pro Mk2 firmware >=4.15 RDM Discovery #1631 * Fix compatibility with libmicrohttpd v0.9.71 and newer #1650 * Fix some Doxygen escaping * Rename AppendMultipler(sic) to AppendMultiplier in the RDM messaging code * Fix a few edge cases in ola_trigger around whitespace in the config files * Fix compatibility with clang 7 and newer (tested with up to 11) #1564 Internal: * Replace "readdir_r" with "readdir" since the former has been deprecated * Add a unit test for the functions that used readdir_r before * Add a new 'make flake8' target #1619 * Add a new 'make cpplint' target * Add a new 'make lint' target which runs the flake8 and cpplint runs 13/7/2018 ola-0.10.7 Features: * Allow multiple KiNet ports to be patched to the same universe #1414 * Allow multiple FTDI ports to be patched to the same universe * Support libftdi1 as well as libftdi0 in FTDI DMX #1012 Debian #810374 * Support FTDI DMX via libftdi1 on Windows RDM Tests: * Fix a bug in the RDM tests when a responder supports sensor PIDs #1388 * Fix a bug in imports for rdm_responder_test.py Bugs: * Fix the build on Windows * Entire codebase now passes codespell testing * Fix a Python 3 bug in the API * Fix a few longstanding bugs in the Python ola_rdm_discover * Correct the OSC config option name for output format in the documentation * Use top_builddir in more places in the build * Use libusb_set_option where available * Fix the udev rules * Downstream Debian fixes * Fix an incorrect response if we have the sensor PIDs but no sensors * Stop trying to build opendmx kernel plugin on Windows * Prefer Avahi over Bonjour for our DiscoveryAgent, in case the Bonjour version is actually just Avahi's compatibility layer * Clean up the libolaserver pkg-config file Internal: * Various minor log formatting tidying up 07/01/2018 ola-0.10.6 Bugs: * Renamed fempto(sic) to femto in the RDM code (C++ and Python) * Renamed terra(sic) to tera in the RDM code (C++ and Python) * Fixes for RDM test server forward compatibility with later JQuery versions * Fix a man page typo * Fix a longstanding copy-paste typo in the Python client's RegisterUniverse function * Increment the Transaction Number for each Art-Net RDM packet #189 * Fix lots of minor documentation spelling errors found by spellintian and codespell * Renamed protocol convertor(sic) to protocol converter in the RDM code (C++ and Python) 17/07/2017 ola-0.10.5 Features: * Make some error logs more verbose Bugs: * C++11 compatibility fix (for cppunit 1.14.0) #1244 * Always print frames in ola_rdm_get/set, even if we get an error * Ensure man files ship in the correct packages #1276 * Check protobuf is old enough, until we fix #1192 21/05/2017 ola-0.10.4 Features: * Add more help regarding the ArtNet use_limited_broadcast option Bugs: * Ensure Pathport node actually uses configured IP #1166 * Improve some debugging around flag parsing #1198 * Disable warnings for readdir_r deprecation until we can rewrite our code to stop using it. Related to #1055 * Stop replacing -I with -isystem and correctly work around the resultant errors #1125 * Exit, rather than continuing, if ola_throughput failed to send DMX * Implement OLA_FALLTHROUGH macro for adding fallthrough attributes to switchcases in gcc versions higher than 7 #1193 Debian #853583 * Fix Protobuf 2.6 not building on the latest OS X * Update some URLs in the Windows build documentation * Skip interface count checks on Windows, as it may fail them if it's not on a network due to a lack of loopback interface * Fix LibUSB code on Windows, especially when the Hotplug functionality exists but isn't available * Support wireless interfaces on Windows since Vista * Add a cast to fix an error when running execlp * Ensure configure checks for tcmalloc's presence before adding it to the libs when asked for #1201 * Add some more detail to the Logic RDM sniffer and Enttec RDM USB Pro sniffer documentation 06/12/2016 ola-0.10.3 Features: * Add a message explaining why the auto start test may fail Bugs: * Work around a clang warning in our protobuf generator code * Force gnu++98 mode if compiler supports 98 and 11 modes so we keep std::auto_ptr #1028 Debian #831103 * JsonPatchParser.h tries to include a project header file; move the OptionalItem header to includes to resolve #1086 * Reset the client socket once we've closed it, so it can be re-used * Silence a warning in the code so it builds with Protobuf 3 #1110 Debian #835433 * Work around include failure on MIPS Debian #836383 * Update GPIO and SPI pin limits for CHIP as its pin numbers are higher #1095 * Clarify some details in ola_set_dmx and ola_streaming_client help #1109 Debian #830972 * Fix a logging error regarding USB product name detection Internal: * Add more debugging of opening and acquiring locks 21/5/2016 ola-0.10.2 Features: * Add support for Enttec USB Pro Mk 2 B * Make DNS-SD functionality optional at build time * Name multi-port Enttec Pro Mk 2 ports to match the labelling on the device RDM Tests: * Correct expected NAck type in GetSettingDescriptionsMixin, as spotted by ETC * Fix the mute all devices test for controllers that don't support discovery Bugs: * Allow one slot devices to correctly be set to any start address, including 512 * Check Python numpy exists during configure if required * Allow the PID location to be set in the rdmpro_sniffer * Actually decode PID param data when requested when using the logic_rdm_sniffer * Correct the operation of the --full-rdm option in the logic_rdm_sniffer, this inverts how it used to behave * Fix a segfault with the client if auto start is off or olad fails to start 29/2/2016 ola-0.10.1 Features: * Add support for Osram Lightify products via a Philips Hue bridge * Add Stellascapes Lightwidgets Number1 PIDs * Add a warning to the Web UIs if Javascript is disabled. Bugs: * Check if a device exists before trying to acquire a UUCP lock file for it #1006 * Fix the build on FreeBSD * Fix the build when using the musl C library * Python RpcChannel incorrectly decodes message header on big-endian machines * Fix a configure warning on OpenBSD * Allow you to set DMX address of a one slot device to 512 #1042. The JSON API now returns min and max inclusive * Switch to pkg-config for cppunit detection #1043 3/1/2016 ola-0.10.0 Features: * Add better logging for open() * Added more man pages. * Added a DMX keypad to the new web UI * OLA Trigger config to control Philips Hue Lux lights * Added hotplug support for usbdmx devices * Add support for JaRule widgets. * Add UUCP locking support #888 * Fix issues encountered when packaging for openSUSE and fedora #904 * Add support for the Nodle U1 widget * Add validation of OSC output format types * Add an example Stdin handler to the documentation * Increase the port limit for E1.31 up to 512 from 128 RDM Tests: * Add some more E1.37-2 tests * Fix event handling in the RDM test server #948 * Mute all devices before running the DUB tests * Add timing stats to the RDM responder tests Bugs: * Remove a number of obsolete Autotools macros, we now require Automake 1.11.2 #931 * Work around the case where an Enttec USB Pro widget doesn't respond #341 * Fix a crash if a client disconnects during RDM discovery #950 * Stop e131_transmit_test from segfaulting #966 * Fix the build on Windows * Split libolaserver into two parts to stop dpkg-shlibdeps warnings Internal: * All the Python code now passes flake8 checking * The new web UI now passes jscs checking * Switched to using the new command line flags module in ola_rdm_discover * Move the ACN code to libs/acn 30/9/2015 ola-0.9.8 Features: * Add support for the DMXter4A * Tidy the output of the Python ola_rdm_get for supported_parameters RDM Tests: * Fix a bug related to split levels not being supported in the dimmer PIDs * Allow NR_UNSUPPORTED_COMMAND_CLASS for SET DMX_ADDRESS when the address is not required * Switch from a warning to an advisory if it's a manufacturer specific use in GetSensorDefinition * Fix some other minor RDM test bugs Bugs: * Fix some Xcode build errors * Fix the build on Windows * Fix a bug in Artnet universe mapping #856 * NACK requests for IPv4 default route PID with data * NACK with format error requests for DNS PIDs with data * Fix a bug regarding stack traces error messages with Python RDM gets #884 * Support 0.9.43 of microhttpd 13/7/2015 ola-0.9.7 Bugs: * RDM NACK codes displayed with incorrect byte ordering in the C++ client #812 * Fix endian issues on s390x and PPC architectures. * Fix ShowNet endian issues. * Add some missing files to the tarball. * Restore binary compatibility with 0.9.5 #826 30/6/2015 ola-0.9.6 Features: * Default to using epoll() rather than select() if it exists, * Default to the async libusb implementation in the usbdmx plugin. * Added support for the APA102 family of SPI pixels. * Allow plugins to be enabled/disabled from the new web UI & CLI tools #682. * Add an option to display the frame and timing data in the RDM CLI tools where available. * Add additional C++ client documentation and examples. * Support an overrides.proto file to load system specific PID data #732. * Respect UUCP lock files before opening devices #716. * Initial partial E1.37-2 support in the web UI. API: * Python: Fix a bug where callbacks weren't run if the operation failed. * Python: improve Python 3 compatibility. * Add patched ports in Universe protobuf message. * Python: Add a patch/unpatch example. * Python Add GetCandidatePorts and an example. RDM Tests: * Initial E1.37-2 tests. * Fix a bug in the SetDeviceHours test for devices that NAck set DEVICE_HOURS with a NR_WRITE_PROTECT. Bugs: * Fix port with unset universe appearing as bound to universe 0 in the Python client. * Ensure universe names and LTP priorities are always written to the config file #661. * Stop tests from failing when no non-loopback interfaces are present #763 Debian #769670. * Fix various configure script behaviour issues #773. * Fix build issues with GCC-5 #765 Debian #778038. * Restore LIBS when we can't find the Saleae library during configure. * Fix the async libusb Eurolite Pro implementation. Internal: * Rename the method Source to ConfigLocation for Preference classes and associated changes. * Major cleanup of RDM code. * Switch to using pthread_equal rather than operator==. * Switch to using Dot for Doxygen diagrams where present. 1/3/2015 ola-0.9.5 Features: * Work on a new Web-UI which is built with AngularJS * Added E1.37-2 support to the SPI plugin RDM responder * USB DMX plug now works on Windows (Scanlime Fadecandy tested working) * Update the deb package's udev rules Bugs: * Fix finding ola_protoc_plugin when cross-compiling. * Fix ncurses flags issues between configure and the Makefile. * Fix some more build issues on Windows XP * Fix our E1.37-2 implementation to match the E1.37-2 standard. * Fix the old website's RDM patcher identify function 29/1/2015 ola-0.9.4 Features: * Added support for hotplugging USB devices using the usbdmx plugin, #374. * Added support for setting the thread scheduling options, #399. * Added support for the Open Pixel Control protocol, #502. * Added support for the Scanlime Fadecandy device, #503. * Added a GPIO Plugin, closes #299. * Added support for the Open DMX clone from KWMATIK. API: * Plugin libraries that were previously installed under $PREFIX/lib/olad/ are now in $PREFIX/lib/ RDM Tests: * Fix a bug with the GetPresetInfo test around display multipliers. Bugs: * Add a workaround to make the Windows HTTP server more responsive. * Fixed defects detected by Coverity Scan. Internal: * Remove the SLP code since it's no longer required for E1.33. 16/11/2014 ola-0.9.3 Features: * Send the E1.31 Stream Terminated message on shutdown and/or port unpatching. * Add support for the draft E1.31 discovery protocol. * Switch the dummy responder which implements the E1.37-2 PIDs to their final values. * Add the ability to whitelist rather than blacklist plugins during configure (via --disable-all-plugins) and switch the Windows build to this method. * Convert ola_trigger to our flags module; change it's default universe value to be 0 to align with other programs. * Make the ola_trigger config syntax more flexible, including dots in program names and quoted program names #507 * Add an instance name to OLA server and use it within E1.31 and the DNS-SD code to make multiple instances of OLA easier to track. #473 Bugs: * Fix some build issues on OS X 10.5.8 #493 * Fix some build issues on Windows XP * Use the correct ifdefs within plugin loading so we only load stuff if we asked for it * Fix the inability to Ctrl+C in ola_recorder API: * Update ola::network::IPV4Address and ola::network::IPV4SocketAddress so they sort the same regardless of endianness and in a logical way for humans. Internal: * Update the configure version method to ensure the version files are updated automatically when it changes. * Add a generic RpcServer class and switch OlaServer to use it. * SelectServer now runs any remaining pending callbacks during shutdown. 20/8/2014 ola-0.9.2 Features: * Added --use-epoll which uses epoll() rather than select(). * Added --use-kqueue which uses kqueue() rather than select(). * Add some more additional slot definitions. * Allow the FTDI thread to switch from BAD to GOOD timing granularity. * Change the flags so the negated ones are --no-, this mostly affects --nohttp and --nohttp-quit in olad * Partial Windows support using MinGW. Build instructions are in README.mingw32. Working: * Building simple client applications * olad, with the web UI * Plugins: Dummy, ArtNet, ShowNet, ESP Net, SandNet, Pathport, OSC, KiNet * Python bindings Not working yet: * all other plugins, especially device-based ones (USB, serial, SPI) * Java bindings * Use the PID (process ID) and current time to init the random seed - #227 * Standardise some flags, using --device consistently. This affects ola_artnet, ola_e131 and ola_usbpro * Remove -l long name short option from ola_artnet as it clashes with the global -l log level option. Remove the -e subnet short option too. * Allow the SPI RDM responder's device label to be set and store it in the preferences file. * Added new E1.33 example programs that follow the latest draft document. Bugs: * Don't build ola_protoc if --with-ola-protoc= is provided. * Fix the inter-test delay in the RDM tests to work with values less than 1s. Internal: * Changed to a non-recursive build. Reduced build times by 5-25%. * Convert more of our programs to our flags module * Standardise the bool flag behaviour to require an argument like string and int do, add a default bool for the old use case. * Standardise ArtnetConfigMessages to ArtNetConfigMessages and ripple related changes through. 21/6/2014 ola-0.9.1 Features: * Pretty print IPV4 addresses within the Python RDM code. * Add some additional slot definitions and status messages. * Add a timestamp to model data filenames so they're unique. * Allow OSC ports to be looped. * Add the ability to reload plugins via RPC. * Added a plugin which uses the onboard UART. * Added a Python fade controller demo. API: * Change GetIdentifyMode to GetIdentifyDevice in the RDM API to clarify it's the IDENTIFY_DEVICE PID not the newer IDENTIFY_MODE one. RDM Tests: * Added the inter-test delay option to the Web UI. * Show transaction numbers in the responder tests to aid debugging * Don't warn about unknown slot definitions if they are manufacturer ones * Added a number of missing Get...WithData tests. Bugs: * Fix sensor numbering from 0 on web UI so it matches CLI * Fix the minimum and maximum level supported RDM tests * Stop the Python client throwing an AttributeError if the universe doesn't exist. * Ensure the RDM Model Collector works if the fixture doesn't have personality descriptions. * Only try and fetch supported params for manufacturer PIDs in the model collector. * Fix an issue with strings in hash maps on OS X 10.5 * Ensure Rpc_pb2.py is always built. * Fix the recent code changes to work with FreeBSD, NetBSD and OpenBSD * Stop ola_trigger segfaulting at startup - #409 Internal: * Convert stringstream to ostringstream where possible * Tidy up copyright messages so we're Debian compliant. * Correct FSF address within licenses * Removed #ifdefs from the installed headers. * Clean up the ShowNet code. * Added a JSON & JSON Schame parser. * Documented the RPC format. * First changes required to run on Windows. 1/3/2014 ola-0.9.0 Features: * Added priority support for input ports - #259 * Added DNS-SD registration support with both Bonjour and Avahi so that the OLA web UI appears as _http._tcp - #270 * Added plugin for Renard serial protocol (Renard SS24, SS8, etc) - #277 * Refactor sensor functionality in the software RDM responders and add a load average sensor to them and the SPI responder. * Add a class to represent MAC addresses and support for MAC address RDM types * Added pretty printing of sensor definition messages. * Added a --duration option to the show recorder - #255. * Add a warning if the firmware in an Enttec USB Pro widget doesn't support RDM - #275. * Print a warning if no Logic device is found when using the RDM sniffer. * Added support for the P9813 family of SPI pixels. * Show dashes in the CLI DMX monitor if a universe has fewer than 512 channels. * Added initial support for the MilInst 1-553 interface. * Added a version option to all flags based commands; removed the -v verify short option from ola_recorder that clashed. * Added a dummy responder which implements the draft E1.37-2 PIDs. * Standardised all the following long arguments from _ to - in programs and completion: --skip_queued_messages --www_dir --log_directory --world_writeable * Standardised on --pid-location in Python programs and completion. API: * Added the ability to specify the priority of the DMX data in the C++ API - #266 * Clean up of the C++ client API. deprecated ola::OlaCallbackClient. * Added a Version API. * Renamed DMXRecieved(sic) to DMXReceived in ola::Client * Renamed valiator(sic) to validator, incomming(sic) to incoming, mimimun(sic) to minimum and overiding(sic) to overriding, all of which may or may not have impact to APIs. RDM Tests: * Added more RDM responder tests to cover some slot related edge cases. * Log an error if we try and run an RDM test that doesn't exist. * Added the --inter-test-delay option * Added checks to the RDM tests to flag if non-printable characters are returned in any RDM strings - #262. * Fixed bugs in the MuteDevice, Fail & Startup mode tests. Bugs: * Build fixes for OS X 10.9 - #265. * Build fixes for FreeBSD 10.0-BETA3. * Fix the web and CLI UIs so they work if strings from RDM devices have unprintable characters in them - #263. * Fix a bug in the KiNet plugin - #276 Internal: * Cleaned up the autotools configuration, `make distcheck` now works. * Cleaned up public header files. * Added configuration for Travis continuous integration. * Switched to using a custom generator for the C++ RPC Code. * Split PID data into 3 files. * Added more code documentation, cleaned up some new linter warnings. * Added the DISALLOW_COPY_AND_ASSIGN macro. * Refactor load average function out into system utils. * Switch the SPI RDM responders to using the core personality management code. * Renamed SetDecription(sic) to SetDescription in ola::Flags Documentation: * Changed links from google code to github. * Added more doxygen comments. * Added more man pages. * Updated README, CONTRIBUTING and README.developer 22/10/2013 ola-0.8.33 * Fix the build breakage when using XCode 5 (clang 500) * Save the SPI pixel count during shutdown * Fix E1.31 merge timeouts - #256 * Fixed 2 bugs in the RDM responder tests. * Fix a bug where OLA wouldn't receive on ArtNet universe 0 - #260 * Expose the source priority in the C++ API 29/9/2013 ola-0.8.32 * Added more RDM responder tests to cover E1.37-1 * Print the UID, manufacturer, model description, software version and timestamp in the RDM test logs * Added pretty printing of slot info messages * Added support for new OSC formats * Added support for more than 4 ArtNet output ports * Added a simple ArtNet loadtest * Fixed a couple of bugs in the Dummy RDM responders * Added support for templates in the OSC target addresses. * Re-wrote the SPI backend with loads of new options. * Improved the performance of the RPC system on Linux, leading to a 1000x reduction in RPC latency and 4x speedup of the RDM tests. 12/8/2013 ola-0.8.31 * Changed the max number of E1.31 ports to 128 * Added support for the MilInst 1-463 interface. * Added support for the KMTRONIC usb device (ftdi clone). * Added more RDM responder tests for E1.37-1 PIDs * Display the OLA version in the RDM responder test output * Display the response param data length in the responder test output * Added new software RDM responders (Sensor, Dimmer, Moving Light, etc.) * Added slot info support to the software RDM responders * Updates to the Saleae Logic RDM sniffer * Fixed a crash when a USB device was unplugged - bug #248 * Fixed sub device RDM request fan out - bug #246 * Fixed universe garbage collection - bug #149 * Added Bash completions of UIDs for the RDM commands * Change the examples and SLP programs to write errors to STDERR not STDOUT. * Renamed AllManufactureDevices(sic) to VendorcastAddress in UID interface * Add vendorcast and broadcast options to ola_rdm_discover. * Started commenting the codebase with doxygen * Added more man pages. * Added support for reset device to the web UI * Added more PIDs to the RDM model collector 16/6/2013 ola-0.8.30 * Clean up olad signal handling to avoid race conditions. * Added support for the new Jese USB widgets * Fixed a bug in the python API which broke the RDM test server. * Fixed the E1.33 library install. * Add an OLA manufacturer specific PID to the Dummy RDM Responder. * Update the model collector to gather info on manufacturer specific PIDs. 29/5/2013 ola-0.8.29 * Added KiNet output support. * Added support for the Karate USB devices. * More E1.33 enhancements * Added usage information to the json urls * Minor fixes to the RDM responder tests * Lint the entire C++ codebase. * Fixed various flaky unittests * Introduced a new command line flags handling * Print command classes in the RDM Responder tests * Fix a memory leak detected by the leak checker * Patches to build correctly on Android 20/4/2013 ola-0.8.28 * Add support for the LPD8806 pixels using SPI. * Fix the build on OS X Lion 10.7 - #231 * Fix the build with clang 4.2 * Added a simple E1.31 load test tool * Added the first E1.33 (RDMNet) tools * Switched to using the new command line flags module in some programs. * Man page for dmxmonitor - #219 * Rename ola_universe_stats to ola_uni_stats, standardising names * Bash Completions for all programs in ola and ola-rdm-tests * Various minor fixes of program help * Addition and standardisation of PID options between ola_rdm_get/set and e133_controller * Standardised all the following long arguments from _ to - in programs and completion: --long_name --plugin_id --port_id --preview_mode --list_pids --sub_device * Complete plugin and universe ids in completions and add options to ola_uni_info and ola_plugin_info to assist with this * Internal cleanup 2/3/2013 ola-0.8.27 * Changed the arguments to dmxmonitor - #219 * Build fixes for various platforms * Added a SLP implementation (not installed right now) * Updated E1.33 to work with the latest draft * Add a script to enforce code licences * Add the slp_sa_test program * Improved support for the RDM-TRI * Added support for using the loopback interface with the ArtNet plugin * Fixed some bugs in the RDM tests * Add configure time options to disable each plugin * Fixed a bug in the sniffer tool * Display the amount of time the RDM tests take in the web UI * Update to support automake 1.13 * Show the plugin state and config file location on the web UI * Added support for the Enttec USB Pro Mk II. * Added an SPI plugin for driving LED pixels based on the WS2801 chip. 11/11/2012 ola-0.8.26 * Added the OSC plugin * Fixed the bug with displaying the TRI serial number * Added a script to save and restore RDM settings for a rig * Added a script to compare RDM configuration at different times * Merged in hip's test refactoring changes - #215 * Allow the number of E1.31 ports to be specified in the config file * Better RDM ACK_OVERFLOW support - #216 * Fixes for the RDM Tests - #213, #214 9/10/2012 ola-0.8.25 * Bug fixes for the RDM Responder tests * Add some missing files to the tarball * Rename the debian init scripts 3/10/2012 ola-0.8.24 * Add support for soh.cz devices * Added the RDM model collector to the RDM Test Server * Enhance the RDM Responder Tests page * Clean up the Python Wrapper a bit * RDM Test fixes for devices with a personality with a slot count of 0 * RDM Test fixes for some of the new E1.37-1 PIDs * Switched the Debian init script to use a pidfile * Added a Debian init script for the RDM Test Server 9/9/2012 ola-0.8.23 * Added the ftdidmx plugin thanks to Rui Barreiros - #164 * Debian package improvements from RenZO (init script) * RDM Test server is now installed if --enable-rdm-tests is used * Bug fixes in the RDM Test Server * Switched to the new logo * Fixed the build for gcc 4.7.1 * Network library cleanup * Added the ola_universe_stats scripts 10/8/2012 ola-0.8.22 * Added the first version of the RDM Test Server * Added a configure time option to disable unittests * Various fixes for the debian package files * Added a DMX Monitor to the web UI * Various fixes so that the FreeBSD build works * Moved all JSON generation code to a module * Defend against exhausting the connection pool in the web UI - #186 * Fix errors with clang v3.1 * Fixed a RDM discovery bug. 18/7/2012 ola-0.8.21 * Fix the broken Eurolite plugin on Mac * Add a configure option to install the RDM tests * Add a configure option to downgrade warnings to non-fatal * Add support for the UID type to PID definitions * Add support for timestamps in the RDM sniffer * Ignore Enttec Sniffer devices within OLAD * Add a script to launch olad for the RDM tests * Add Mute/Unmute cases to the RDM tests * Added Discovery cases to the RDM tests 18/6/2012 ola-0.8.20 * Fix uuid library detection - #187 * Fix the Java build on Linux * Add some Robe RDM debugging * Print the version when olad starts * Fix the E1.31 tests 7/6/2012 ola-0.8.19 * Simple Java API * Significant changes to the underlying I/O code * Add support for IPv4 RDM types * Configure time flag to disable the root check * Large Refactor of the E1.31 code to enable E1.33 later * Switched to using the standard command set for TRI devices - #171 * Add support for multiple devices to the DummyPort - #178 * Fixed a bug in the Dummy Responder - #184 * Added --version to olad 01/03/2012 ola-0.8.18 * Added RDM support for the Enttec USB Pro - #146 * Added support for reading/writing RDM sniffer logs to a file * Fixed a bug in the Eurolite device - #165 * Added support for multiple Open DMX USB devices (still Linux Only) - #166 * Fixed a build error in the StageProfi widget - #169 * Added an option to choose the NIC olad uses - #173 * Add support for listing remote ArtNet nodes - #167 23/01/2012 ola-0.8.17 * fix a bug in the RDM sniffer * change olad not to fail if it can't create the preferences directory * fix the ArtNetTest if stdin receives data 19/01/2012 ola-0.8.16 * Added a configure test for the python google.protobuf module * Added the ola_trigger program * Changed the ForceDiscovery rpc to only return once discovery completes * Fixed ArtNet RDM discovery so DMXWorkshop works correctly - #160 * Fixed a memory leak in the ArtNet RDM implementation * Add an option for using the limited broadcast address for ArtNet dmx data * Add an option to ignore specific USB serial devices * Added a program to sniff traffic using the RDM USB Pro * Added many more unit tests for the ArtNet plugin * Fixed build warnings found by newer versions of clang * Fix a bug in the RDM discovery code for the Robe Widget 12/12/2011 ola-0.8.15 * Add DMX IN support for the Robe widget - #156 * Add an option to send DMX during RDM tests - #153 * Add basic support for sending ArtNet timecode - #150 * Added a DMX keypad to the mobile UI, thanks to Chris Stranex * Fix a race condition in the WidgetDectectorThreadTest * Fix compile errors with new versions of clang * Fix compile errors with new versions of gcc - #158 * Fix the python tests so they pass with macports * Update debian package configs * Use relative paths in the web UI so they work behind proxies - #163 2/11/2011 ola-0.8.14 * fix a bug in the port limiter * minor RDM test fixes * change the default limit for the TRI devices to 40fps * add support for the ultraDMX Pro devices * add an option to skip factory defaults in the RDM tests 22/10/2011 ola-0.8.13 * Attempt to reconnect to usb devices periodically - #143 * Add support for ArtNet 3 - #144 * Add support for the Eurolite USB Pro - thanks Harry F * Large cleanup of the build rules * Added a script to collect device model information using RDM * Added a basic show recorder program * Add TX & RDM support for the Robe Universal Interface - #148 * Added a frame limiter for the DMX/RDM-TRI devices 3/9/2011 ola-0.8.12 * Add the generic messaging framework and use it to handle RDM PIDs * Add support for manufacturer specific PIDs in the C++ RDM CLI tools - #112 * Add proper ACK_TIMER handling the in C++ RDM CLI tools - #93 * Added STATUS_MESSAGES support in the C++ RDM CLI tools - #111 * Further improvements of the RDM test suite * Fixed link errors with the new version of gcc - #142, #145 * Fixed sorting of Sensors in the RDM web UI - #137 * Improvements to the threading model to support more async operations. * Enabled SO_REUSEPORT so that local ArtNet applications work - #141 * Reduced the cost of logging by using lazy evaluation * Added more PIDs to the dummy responder * Refactored the core I/O classes, removed the "socket operation on non-socket" warning * Fixed a bug sorting UIDs in the python libs 28/6/2011 ola-0.8.11 * Fix bugs on big endian systems * Move ola-examples into the main package * Add SLP support to the e133_controller 22/6/2011 ola-0.8.10 * Added support for the VX8062 device * Fixed a compile bug caused by bad libprotobuf handling * Add some more warnings / advisories to the RDM Responder tests * Internal network API cleanup * Fixed a crashing bug in the RDM responder tests * Added tools for testing the E1.33 / SLP protocol * Fixes for OS X 10.4 24/4/2011 ola-0.8.9 * Added support for the Arduino RDM RGB Mixer * Fixed a bug when a broadcast RDM request was sent to a universe with multiple ports bound * Fixed a memory leak in the RDM code * Added more RDM tests including broadcast & vendorcast tests * Added a command line flag to specify the config directory * Added some additional log messages to assist users with troubleshooting * Fixed a memory leak in the RDM UI code. 26/3/2011 ola-0.8.8 * Added RDM discovery for the DMXter widgets * Added a bunch more RDM responder tests * Two RDM memory leaks fixed * Incremental RDM discovery added (where supported) * Minor code cleanup 19/2/2011 ola-0.8.7 * Added a Python RDM API & example programs. * Integrated the python rdm code with the PID store (rdm.openlighting.org) * Added around 128 RDM responder test cases 9/12/2010 ola-0.8.6 * added the graphical RDM patcher * improved support for picking the outgoing multicast interface * add RDM support for the DMXters * fixed a couple of memory leaks in the UI * internal refactoring to support testing * merged the Callback & Closure classes * added extensive testing for the DMX-TRI and DMXter widgets * simplified internal RDM handling 06/11/2010 ola-0.8.5 Added a simple mobile web UI Fixed the web UI so it works on Opera Start olad automatically from the c++ clients if it's not already running Add more attributes to the RDM web UI Bug fixes for the RDM TRI Python API bug fixes 19/10/2010 ola-0.8.4 Add the RDM web UI Work around an ArtNet RDM bug Handle ACK overflow in the DMX-TRI 23/9/2010 ola-0.8.3 Add Manufacturer / Device name resolution to the web UI for RDM devices. Fix a couple of compile bugs. For each DMX-over-IP plugin, display the bound IP address in the device name. Change the DMX console to send a packet every second even if nothing changes. Fix a memory leak in the RDM controller 19/9/2010 ola-0.8.2 Moved the DMX Console to the new UI Removed the old web UI, no more requirements for ctemplate Added ACK_OVERFLOW support for RDM over ArtNet Added Support for the last remaining E1.20 PIDS Re-factored the Ola Client code to fix the problem of de-multiplexing responses. Add the OlaCallbackClient as the recommended C++ API Moved the HTTP Server to using the OlaCallbackClient directly. 2/9/2010 ola-0.8.1 New web UI Fixed some bugs in the device shutdown code Fixed some compiler warnings with gcc 4.4 7/8/2010 ola-0.8.0 Initial RDM support for the ArtNet, Dummy & DMX-TRI devices New ArtNet stack to support RDM - no more dependency on libartnet Support for packetheads DMX dongle Make the FPS limit for USB Pro devices configurable 20/5/2010 ola-0.7.4 Fixed the python API Fixed the client deadlock issue Fixed the USBDMX2 firmware loading Fixed ARM alignment bug in E1.31 Fixed ambiguous errors when plugins were disabled Added the /reload handler the reload plugins Turn off SIGPIPEs Clean up the streaming client API Use the serial number to identify uDMX devices 18/4/2010 ola-0.7.2 / 0.7.3 Added support for the Velleman 8062 Added support for the uDMX Added support for the USBDMX2 Added support for the DMXKing Fixed a crash if olad was started while another instance was running Random build fixes 27/3/2010 ola-0.7.1 Implemented the Usb Protocol Extensions Added output rate throttling for the Usb Pro devices Added the streaming DMX client Fixed some uuid detection issues Made the server more resistant to bad clients ./configure script fixes 28/2/2010 ola-0.7.0 Added E1.31 merging & sequencing support Improved USB Pro handling Added port priorities & multi source merging TX support for the DMX-TRI Support for the Arduino RGB Mixer DSCP for E1.31 Support for using the OSSP uuid library Removal of run-time loadable plugins. 10/1/2010 ola-0.6.0 Added Pathport support Added support for the final version of the E1.31 Standard Changed to link time plugins rather than run time (required for win32 port) Cleanup of the dmx4linux plugin (thanks to Bastien) Linted almost everything Many more export map variables Restructure of the Port class internals 21/11/2009 ola-0.5.0 Added Sandnet Support Added automatic USB Pro device detection Fixed a HTP merging bug 18/10/2009 ola-0.4.0 Added E1.13 Support 26/8/2009 ola-0.3.1 Fixed the open dmx usb off by one bug Minor build tool fixes 8/8/2009 ola-0.3.0 Changed the name of the project to Open Lighting Architecture Major rewrite - added export_map - added http server & web interface - added web dmx console - now works on mac - converted to using protocol buffers - supports embedding - port patches persist across restarts - plenty of unittests (more required) 14/10/2007 lla-0.2.3 Plugins can now be disabled from the config files 14/9/2007 lla-0.2.2 Fixed a bug with the DMX USB Pro Refinements to the StageProfi plugin 1/1/2007 lla-0.2.1 Added support for the Stage Profi widget Added Pathport support 1/1/2007 lla-0.2.0 Added Sandnet Support Added Open DMX USB Support Re-write of the client library Added universe merge modes Added persistent universe names and merge modes Added device config messages 27/4/2006 lla-0.1.3 Bugfixes 17/4/2006 lla-0.1.2 Support for multiple Enttec Pro devices Logging levels can be changed with -USR1 signals ola-0.10.9/INSTALL0000644000175000017500000003661014376533146010350 00000000000000Installation Instructions ************************* Copyright (C) 1994-1996, 1999-2002, 2004-2013 Free Software Foundation, Inc. Copying and distribution of this file, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without warranty of any kind. Basic Installation ================== Briefly, the shell command `./configure && make && make install' should configure, build, and install this package. The following more-detailed instructions are generic; see the `README' file for instructions specific to this package. Some packages provide this `INSTALL' file but do not implement all of the features documented below. The lack of an optional feature in a given package is not necessarily a bug. More recommendations for GNU packages can be found in *note Makefile Conventions: (standards)Makefile Conventions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. Caching is disabled by default to prevent problems with accidental use of stale cache files. If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' might take a while. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package, generally using the just-built uninstalled binaries. 4. Type `make install' to install the programs and any data files and documentation. When installing into a prefix owned by root, it is recommended that the package be configured and built as a regular user, and only the `make install' phase executed with root privileges. 5. Optionally, type `make installcheck' to repeat any self-tests, but this time using the binaries in their final installed location. This target does not install anything. Running this target as a regular user, particularly if the prior `make install' required root privileges, verifies that the installation completed correctly. 6. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. 7. Often, you can also type `make uninstall' to remove the installed files again. In practice, not all packages have tested that uninstallation works correctly, even though it is required by the GNU Coding Standards. 8. Some packages, particularly those that use Automake, provide `make distcheck', which can by used by developers to test that all other targets like `make install' and `make uninstall' work correctly. This target is generally not run by end users. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c99 CFLAGS=-g LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you can use GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. This is known as a "VPATH" build. With a non-GNU `make', it is safer to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. On MacOS X 10.5 and later systems, you can create libraries and executables that work on multiple system types--known as "fat" or "universal" binaries--by specifying multiple `-arch' options to the compiler but only a single `-arch' option to the preprocessor. Like this: ./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \ CPP="gcc -E" CXXCPP="g++ -E" This is not guaranteed to produce working output in all cases, you may have to build one architecture at a time and combine the results using the `lipo' tool if you have problems. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX', where PREFIX must be an absolute file name. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. In general, the default for these options is expressed in terms of `${prefix}', so that specifying just `--prefix' will affect all of the other directory specifications that were not explicitly provided. The most portable way to affect installation locations is to pass the correct locations to `configure'; however, many packages provide one or both of the following shortcuts of passing variable assignments to the `make install' command line to change installation locations without having to reconfigure or recompile. The first method involves providing an override variable for each affected directory. For example, `make install prefix=/alternate/directory' will choose an alternate location for all directory configuration variables that were expressed in terms of `${prefix}'. Any directories that were specified during `configure', but not in terms of `${prefix}', must each be overridden at install time for the entire installation to be relocated. The approach of makefile variable overrides for each directory variable is required by the GNU Coding Standards, and ideally causes no recompilation. However, some platforms have known limitations with the semantics of shared libraries that end up requiring recompilation when using this method, particularly noticeable in packages that use GNU Libtool. The second method involves providing the `DESTDIR' variable. For example, `make install DESTDIR=/alternate/directory' will prepend `/alternate/directory' before all installation names. The approach of `DESTDIR' overrides is not required by the GNU Coding Standards, and does not work on platforms that have drive letters. On the other hand, it does better at avoiding recompilation issues, and works well even when some directory options were not specified in terms of `${prefix}' at `configure' time. Optional Features ================= If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Some packages offer the ability to configure how verbose the execution of `make' will be. For these packages, running `./configure --enable-silent-rules' sets the default to minimal output, which can be overridden with `make V=1'; while running `./configure --disable-silent-rules' sets the default to verbose, which can be overridden with `make V=0'. Particular systems ================== On HP-UX, the default C compiler is not ANSI C compatible. If GNU CC is not installed, it is recommended to use the following options in order to use an ANSI C compiler: ./configure CC="cc -Ae -D_XOPEN_SOURCE=500" and if that doesn't work, install pre-built binaries of GCC for HP-UX. HP-UX `make' updates targets which have the same time stamps as their prerequisites, which makes it generally unusable when shipped generated files such as `configure' are involved. Use GNU `make' instead. On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot parse its `' header file. The option `-nodtk' can be used as a workaround. If GNU CC is not installed, it is therefore recommended to try ./configure CC="cc" and if that doesn't work, try ./configure CC="cc -nodtk" On Solaris, don't put `/usr/ucb' early in your `PATH'. This directory contains several dysfunctional programs; working variants of these programs are available in `/usr/bin'. So, if you need `/usr/ucb' in your `PATH', put it _after_ `/usr/bin'. On Haiku, software installed for all users goes in `/boot/common', not `/usr/local'. It is recommended to use the following options: ./configure --prefix=/boot/common Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Unfortunately, this technique does not work for `CONFIG_SHELL' due to an Autoconf limitation. Until the limitation is lifted, you can use this workaround: CONFIG_SHELL=/bin/bash ./configure CONFIG_SHELL=/bin/bash `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of all of the options to `configure', and exit. `--help=short' `--help=recursive' Print a summary of the options unique to this package's `configure', and exit. The `short' variant lists options used only in the top level, while the `recursive' variant lists options also present in any nested packages. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `--prefix=DIR' Use DIR as the installation prefix. *note Installation Names:: for more details, including other options available for fine-tuning the installation locations. `--no-create' `-n' Run the configure checks, but stop before creating any output files. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. ola-0.10.9/README0000664000175000017500000000623214376533110010165 00000000000000# Open Lighting Architecture - OLA [www.openlighting.org/ola](https://www.openlighting.org/ola) [![Build Status](https://travis-ci.com/github/OpenLightingProject/ola.svg?branch=master)](https://travis-ci.com/github/OpenLightingProject/ola) [![Coverity Scan Status](https://scan.coverity.com/projects/3514/badge.svg)](https://scan.coverity.com/projects/3514) [![Coverage Status](https://coveralls.io/repos/OpenLightingProject/ola/badge.svg?branch=master)](https://coveralls.io/r/OpenLightingProject/ola?branch=master) The Open Lighting Architecture (OLA) is a framework for controlling entertainment lighting equipment. Within the entertainment lighting industry, the [Digital Multiplex protocol](https://en.wikipedia.org/wiki/DMX512) (DMX-512) and IP variants such as [Streaming ACN](https://en.wikipedia.org/wiki/Architecture_for_Control_Networks#External_Extensions) (sACN) are used to control lighting fixtures. OLA provides the distribution layer that abstracts away the various protocols used. This allows authors of lighting control software to focus on generating the control information, rather than having to implement support for different hardware devices & network protocols. OLA runs on Linux & Mac OS X, some features will also work on Windows. OLA can also be used to convert between different network protocols. With the use of a USB to DMX512 device, OLA can act as a DMX-over-IP to DMX512 gateway. OLA consists of three parts, the daemon olad, the olad plugins and the client library, libola. Documentation on OLA, including examples on how to get started, are provided on the [Open Lighting Architecture Docs](https://docs.openlighting.org/ola/doc/latest/) site. The pages are automatically updated from the git repository. ## Downloading OLA OLA is distributed in a number of formats, including [Debian](https://www.debian.org/) / [Ubuntu](http://www.ubuntu.com/) Packages and [MacPorts](https://www.macports.org/). The [OLA Downloads](https://www.openlighting.org/ola/getting-started/downloads/) page has more information. Tagged releases in the git repository are signed. To import the public key, run: $ git cat-file blob simon-pubkey | gpg --import and then to verify the release: $ git tag -v 0.9.6 ## Support Support for OLA is provided via the mailing list and IRC channel. The [Getting Help](https://www.openlighting.org/ola/get-help/) page has more details. ## Components ### Plugins The OLA plugins are located in ./plugins. For a walkthrough of an example see plugins/osc/README. ### C++ Library The C++ Client is in ./ola. The [C++ DMX Client API Tutorial](https://docs.openlighting.org/ola/doc/latest/dmx_cpp_client_tutorial.html) has various examples on how one can use the client. ### Python Module The Python module can be built by running configure with --enable-python-libs. There are examples on how to use the Python API in python/examples. ### Java Library There is an experimental Java library which can be built by running configure with --enable-java-libs. ## Credits The AUTHORS files contains a list of code contributors. A [full list of supporters](https://www.openlighting.org/openlightingproject/about/supporters/) is published on the website. ola-0.10.9/config.h.in0000664000175000017500000004415214376533145011343 00000000000000/* config.h.in. Generated from configure.ac by autoheader. */ /* Define to 1 if the `closedir' function returns void instead of `int'. */ #undef CLOSEDIR_VOID /* the name of */ #undef HASH_MAP_CLASS /* the location of or */ #undef HASH_MAP_H /* the namespace of hash_map/hash_set */ #undef HASH_NAMESPACE /* the name of */ #undef HASH_SET_CLASS /* the location of or */ #undef HASH_SET_H /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_INET_H /* Define to 1 if you have the header file. */ #undef HAVE_ARPA_NAMESER_H /* Define to 1 if you have the header file. */ #undef HAVE_ASM_TERMBITS_H /* Define to 1 if you have the header file. */ #undef HAVE_ASM_TERMIOS_H /* Define to 1 if you have the header file. */ #undef HAVE_ASSERT_H /* Defined to use Avahi */ #undef HAVE_AVAHI /* Define to 1 if you have the header file. */ #undef HAVE_BITS_SOCKADDR_H /* Define to 1 if you have the `bzero' function. */ #undef HAVE_BZERO /* Define to 1 if you have the `clock_gettime' function. */ #undef HAVE_CLOCK_GETTIME /* Define to 1 if you have the header file. */ #undef HAVE_CURSES_H /* Define to 1 if you have the declaration of `MSG_NOSIGNAL', and to 0 if you don't. */ #undef HAVE_DECL_MSG_NOSIGNAL /* Define to 1 if you have the declaration of `NET_RT_DUMP', and to 0 if you don't. */ #undef HAVE_DECL_NET_RT_DUMP /* Define to 1 if you have the declaration of `PF_ROUTE', and to 0 if you don't. */ #undef HAVE_DECL_PF_ROUTE /* Define to 1 if you have the declaration of `res_ninit', and to 0 if you don't. */ #undef HAVE_DECL_RES_NINIT /* Define to 1 if you have the declaration of `RLIMIT_RTPRIO', and to 0 if you don't. */ #undef HAVE_DECL_RLIMIT_RTPRIO /* Define to 1 if you have the declaration of `RLIMIT_RTTIME', and to 0 if you don't. */ #undef HAVE_DECL_RLIMIT_RTTIME /* Define to 1 if you have the declaration of `SO_NOSIGPIPE', and to 0 if you don't. */ #undef HAVE_DECL_SO_NOSIGPIPE /* Define to 1 if you have the declaration of `SO_REUSEADDR', and to 0 if you don't. */ #undef HAVE_DECL_SO_REUSEADDR /* Define to 1 if you have the declaration of `SO_REUSEPORT', and to 0 if you don't. */ #undef HAVE_DECL_SO_REUSEPORT /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_DIRENT_H /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* define if dmx4linux is installed */ #undef HAVE_DMX4LINUX /* Defined to use Bonjour DNS_SD */ #undef HAVE_DNSSD /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_ENDIAN_H /* Defined if epoll exists */ #undef HAVE_EPOLL /* Define to 1 if you have the header file. */ #undef HAVE_ERRNO_H /* Define to 1 if you have the header file. */ #undef HAVE_EXECINFO_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the header file. */ #undef HAVE_FLOAT_H /* Define to 1 if you have the `fork' function. */ #undef HAVE_FORK /* Define to 1 if you have the `getgrgid_r' function. */ #undef HAVE_GETGRGID_R /* Define to 1 if you have the `getgrnam_r' function. */ #undef HAVE_GETGRNAM_R /* Define to 1 if you have the `getifaddrs' function. */ #undef HAVE_GETIFADDRS /* Define to 1 if you have the `getloadavg' function. */ #undef HAVE_GETLOADAVG /* Define to 1 if you have the `getpwnam_r' function. */ #undef HAVE_GETPWNAM_R /* Define to 1 if you have the `getpwuid_r' function. */ #undef HAVE_GETPWUID_R /* Define to 1 if you have the `gettimeofday' function. */ #undef HAVE_GETTIMEOFDAY /* Define to 1 if you have the header file. */ #undef HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H /* Define to 1 if you have the header file. */ #undef HAVE_GOOGLE_PROTOBUF_STUBS_LOGGING_H /* Define to 1 if you have the header file. */ #undef HAVE_GOOGLE_PROTOBUF_STUBS_STL_UTIL_H /* define if the compiler has hash_map */ #undef HAVE_HASH_MAP /* define if the compiler has hash_set */ #undef HAVE_HASH_SET /* Define to 1 if you have the `if_nametoindex' function. */ #undef HAVE_IF_NAMETOINDEX /* Define to 1 if you have the `inet_aton' function. */ #undef HAVE_INET_ATON /* Define to 1 if you have the `inet_ntoa' function. */ #undef HAVE_INET_NTOA /* Define to 1 if you have the `inet_ntop' function. */ #undef HAVE_INET_NTOP /* Define to 1 if you have the `inet_pton' function. */ #undef HAVE_INET_PTON /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `kqueue' function. */ #undef HAVE_KQUEUE /* define if libftdi0 or libftdi1 is installed */ #undef HAVE_LIBFTDI /* define if libftdi0 is installed */ #undef HAVE_LIBFTDI0 /* define if libftdi1 is installed */ #undef HAVE_LIBFTDI1 /* define if liblo is installed */ #undef HAVE_LIBLO /* define if libmicrohttpd is installed */ #undef HAVE_LIBMICROHTTPD /* define if libusb is installed */ #undef HAVE_LIBUSB /* define if libusb is installed and has libusb_error_name */ #undef HAVE_LIBUSB_ERROR_NAME /* define if libusb is installed and the libusb hotplug API is available */ #undef HAVE_LIBUSB_HOTPLUG_API /* define if libusb is installed and libusb_set_option is available */ #undef HAVE_LIBUSB_SET_OPTION /* Define to 1 if you have the `uuid' library (-luuid). */ #undef HAVE_LIBUUID /* Define to 1 if you have the header file. */ #undef HAVE_LIMITS_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_IF_PACKET_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_NETLINK_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_RTNETLINK_H /* Define to 1 if your system has a GNU libc compatible `malloc' function, and to 0 otherwise. */ #undef HAVE_MALLOC /* Define to 1 if you have the header file. */ #undef HAVE_MALLOC_H /* Define to 1 if you have the header file. */ #undef HAVE_MATH_H /* Define to 1 if you have the `memmove' function. */ #undef HAVE_MEMMOVE /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `MHD_create_response_from_buffer' function. */ #undef HAVE_MHD_CREATE_RESPONSE_FROM_BUFFER /* Define to 1 if you have the `mkdir' function. */ #undef HAVE_MKDIR /* Define to 1 if you have the header file. */ #undef HAVE_NCURSES_CURSES_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IF_ETHER_H /* Define to 1 if you have the header file. */ #undef HAVE_NETINET_IN_H /* Define to 1 if you have the header file. */ #undef HAVE_NET_ETHERNET_H /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_ARP_H /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_ETHER_H /* Define to 1 if you have the header file. */ #undef HAVE_NET_IF_H /* Define to 1 if you have the header file. */ #undef HAVE_NET_ROUTE_H /* Define to 1 if you have the header file. */ #undef HAVE_OSSP_UUID_H /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_NP_H /* 1-arg pthread_setname_np */ #undef HAVE_PTHREAD_SETNAME_NP_1 /* 2-arg pthread_setname_np */ #undef HAVE_PTHREAD_SETNAME_NP_2 /* 3-arg pthread_setname_np */ #undef HAVE_PTHREAD_SETNAME_NP_3 /* 2-arg pthread_set_name_np */ #undef HAVE_PTHREAD_SET_NAME_NP_2 /* 2-arg void pthread_set_name_np */ #undef HAVE_PTHREAD_SET_NAME_NP_2_VOID /* Define to 1 if you have the header file. */ #undef HAVE_RANDOM /* Define to 1 if your system has a GNU libc compatible `realloc' function, and to 0 otherwise. */ #undef HAVE_REALLOC /* Define to 1 if you have the header file. */ #undef HAVE_RESOLV_H /* Define to 1 if you have the header file. */ #undef HAVE_SALEAEDEVICEAPI_H /* Define to 1 if you have the `secure_getenv' function. */ #undef HAVE_SECURE_GETENV /* Define to 1 if you have the `select' function. */ #undef HAVE_SELECT /* define if we have sockaddr_dl */ #undef HAVE_SOCKADDR_DL_STRUCT /* Define if socket address structures have length fields */ #undef HAVE_SOCKADDR_SA_LEN /* Define to 1 if you have the `socket' function. */ #undef HAVE_SOCKET /* Define to 1 if `stat' has the bug that it succeeds when given the zero-length file name argument. */ #undef HAVE_STAT_EMPTY_STRING_BUG /* Define to 1 if stdbool.h conforms to C99. */ #undef HAVE_STDBOOL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strdup' function. */ #undef HAVE_STRDUP /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the `strrchr' function. */ #undef HAVE_STRRCHR /* define if we have suseconds_t */ #undef HAVE_SUSECONDS_T /* Define to 1 if you have the header file. */ #undef HAVE_SYSEXITS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYSLOG_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_DIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_FILE_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCTL_H /* Define to 1 if you have the header file, and it defines `DIR'. */ #undef HAVE_SYS_NDIR_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SELECT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKET_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SYSCTL_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIMEB_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TIME_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_UIO_H /* define if we have termios2 */ #undef HAVE_TERMIOS2 /* Define to 1 if you have the header file. */ #undef HAVE_TERMIOS_H /* define if we have time_t */ #undef HAVE_TIME_T /* define if native UART support exists */ #undef HAVE_UART /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* define if the hash_map class is unordered_map */ #undef HAVE_UNORDERED_MAP /* Define to 1 if you have the header file. */ #undef HAVE_UUID_UUID_H /* Define to 1 if you have the `vfork' function. */ #undef HAVE_VFORK /* Define to 1 if you have the header file. */ #undef HAVE_VFORK_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_WINERROR_H /* Define to 1 if you have the header file. */ #undef HAVE_WINSOCK2_H /* Define to 1 if `fork' works. */ #undef HAVE_WORKING_FORK /* Define to 1 if `vfork' works. */ #undef HAVE_WORKING_VFORK /* Define to 1 if the system has the type `_Bool'. */ #undef HAVE__BOOL /* Define to 1 if the system supports IPv6 */ #undef IPV6 /* Define to 1 if `lstat' dereferences a symlink specified with a trailing slash. */ #undef LSTAT_FOLLOWS_SLASHED_SYMLINK /* Define to the sub-directory where libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Defined if olad is allowed to run as root */ #undef OLAD_SKIP_ROOT_CHECK /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* Define to the type of arg 1 for `select'. */ #undef SELECT_TYPE_ARG1 /* Define to the type of args 2, 3 and 4 for `select'. */ #undef SELECT_TYPE_ARG234 /* Define to the type of arg 5 for `select'. */ #undef SELECT_TYPE_ARG5 /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* define if artnet is to be used */ #undef USE_ARTNET /* define if dmx4linux is to be used */ #undef USE_DMX4LINUX /* define if dummy is to be used */ #undef USE_DUMMY /* define if e131 is to be used */ #undef USE_E131 /* define if espnet is to be used */ #undef USE_ESPNET /* define if ftdidmx is to be used */ #undef USE_FTDI /* define if gpio is to be used */ #undef USE_GPIO /* define if karate is to be used */ #undef USE_KARATE /* define if kinet is to be used */ #undef USE_KINET /* define if usbdmx is to be used */ #undef USE_LIBUSB /* define if milinst is to be used */ #undef USE_MILINST /* define if opendmx is to be used */ #undef USE_OPENDMX /* define if openpixelcontrol is to be used */ #undef USE_OPENPIXELCONTROL /* define if osc is to be used */ #undef USE_OSC /* Defined if we should use the ossp uuid lib */ #undef USE_OSSP_UUID /* define if pathport is to be used */ #undef USE_PATHPORT /* define if renard is to be used */ #undef USE_RENARD /* define if sandnet is to be used */ #undef USE_SANDNET /* define if shownet is to be used */ #undef USE_SHOWNET /* define if spi is to be used */ #undef USE_SPI /* define if stageprofi is to be used */ #undef USE_STAGEPROFI /* define if uartdmx is to be used */ #undef USE_UART /* define if usbpro is to be used */ #undef USE_USBPRO /* Define to the path of the UUCP lock directory */ #undef UUCP_LOCK_DIR /* Version number of package */ #undef VERSION /* Define to 1 if `lex' declares `yytext' as a `char *' by default, not a `char[]'. */ #undef YYTEXT_POINTER /* Define for Solaris 2.5.1 so the uint32_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT32_T /* Define for Solaris 2.5.1 so the uint64_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT64_T /* Define for Solaris 2.5.1 so the uint8_t typedef from , , or is not used. If the typedef were allowed, the #define below would cause a syntax error. */ #undef _UINT8_T /* Define to `int' if doesn't define. */ #undef gid_t /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to the type of a signed integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef int16_t /* Define to the type of a signed integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef int32_t /* Define to the type of a signed integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef int64_t /* Define to the type of a signed integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef int8_t /* Define to rpl_malloc if the replacement function should be used. */ #undef malloc /* Define to `int' if does not define. */ #undef pid_t /* Define to rpl_realloc if the replacement function should be used. */ #undef realloc /* Define to the equivalent of the C99 'restrict' keyword, or to nothing if this is not supported. Do not define if restrict is supported directly. */ #undef restrict /* Work around a bug in Sun C++: it does not support _Restrict or __restrict__, even though the corresponding Sun C compiler ends up with "#define restrict _Restrict" or "#define restrict __restrict__" in the previous line. Perhaps some future version of Sun C++ will work with restrict; if so, hopefully it defines __RESTRICT like Sun C does. */ #if defined __SUNPRO_CC && !defined __RESTRICT # define _Restrict # define __restrict__ #endif /* Define to `unsigned int' if does not define. */ #undef size_t /* Define to `int' if does not define. */ #undef ssize_t /* Define to `int' if doesn't define. */ #undef uid_t /* Define to the type of an unsigned integer type of width exactly 16 bits if such a type exists and the standard includes do not define it. */ #undef uint16_t /* Define to the type of an unsigned integer type of width exactly 32 bits if such a type exists and the standard includes do not define it. */ #undef uint32_t /* Define to the type of an unsigned integer type of width exactly 64 bits if such a type exists and the standard includes do not define it. */ #undef uint64_t /* Define to the type of an unsigned integer type of width exactly 8 bits if such a type exists and the standard includes do not define it. */ #undef uint8_t /* Define as `fork' if `vfork' does not work. */ #undef vfork ola-0.10.9/CONTRIBUTING0000664000175000017500000000163214376533110011136 00000000000000Contributing to Open Lighting Architecture (OLA) =============================================================================== There are lots of ways you can help with OLA, such as running a Buildbot or writing documentation or user guides. If you’d like to contribute code (such as a new plugin, extending an existing feature or adding a brand new one), our preferred method is by forking us on GitHub, committing your code to there, then opening a pull request. We can then review and comment on your code if necessary and merge it in. It will also get checked automatically by Travis Continuous Integration (you will see a message within the pull request showing the status of the Travis tests); hence why we prefer pull requests to other methods such as patch submissions. When writing code, please read the README.developer file which covers coding style, the code review process and various other guidelines. ola-0.10.9/python/0000775000175000017500000000000014376533270010712 500000000000000ola-0.10.9/python/examples/0000775000175000017500000000000014376533270012530 500000000000000ola-0.10.9/python/examples/ola_candidate_ports.py0000775000175000017500000000434714376533110017024 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_candidate_ports.py # Copyright (C) 2015 Simon Marchi """List candidate ports for patching.""" from __future__ import print_function import argparse import sys from ola.ClientWrapper import ClientWrapper __author__ = 'simon.marchi@polymtl.ca (Simon Marchi)' wrapper = None def ParseArgs(): desc = 'Show the candidate ports to patch to a universe.' argparser = argparse.ArgumentParser(description=desc) argparser.add_argument('--universe', '-u', type=int, help='Universe for which to get the candidates.') return argparser.parse_args() def GetCandidatePortsCallback(status, devices): if status.Succeeded(): for device in devices: print('Device {d.alias}: {d.name}'.format(d=device)) print('Candidate input ports:') for port in device.input_ports: s = ' port {p.id}, {p.description}, supports RDM: ' \ '{p.supports_rdm}' print(s.format(p=port)) print('Candidate output ports:') for port in device.output_ports: s = ' port {p.id}, {p.description}, supports RDM: ' \ '{p.supports_rdm}' print(s.format(p=port)) else: print('Error: %s' % status.message, file=sys.stderr) global wrapper if wrapper: wrapper.Stop() def main(): args = ParseArgs() universe = args.universe global wrapper wrapper = ClientWrapper() client = wrapper.Client() client.GetCandidatePorts(GetCandidatePortsCallback, universe) wrapper.Run() if __name__ == '__main__': main() ola-0.10.9/python/examples/ola_patch_unpatch.py0000775000175000017500000000475714376533110016507 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_patch_unpatch.py # Copyright (C) 2015 Simon Marchi """Patch and unpatch ports.""" from __future__ import print_function import argparse import sys from ola.ClientWrapper import ClientWrapper from ola.OlaClient import OlaClient __author__ = 'simon.marchi@polymtl.ca (Simon Marchi)' wrapper = None def ParseArgs(): description = 'Patch or unpatch an OLA port.' argparser = argparse.ArgumentParser(description=description) argparser.add_argument('--device', '-d', metavar='DEV', type=int, required=True) argparser.add_argument('--port', '-p', metavar='PORT', type=int, required=True) argparser.add_argument('--universe', '-u', metavar='UNI', type=int, required=True) argparser.add_argument('--mode', '-m', choices=['input', 'output'], required=True) argparser.add_argument('--action', '-a', choices=['patch', 'unpatch'], required=True) return argparser.parse_args() def PatchPortCallback(status): if status.Succeeded(): print('Success!') else: print('Error: %s' % status.message, file=sys.stderr) wrapper.Stop() def main(): args = ParseArgs() device = args.device port = args.port is_output = args.mode == 'output' action = OlaClient.PATCH if args.action == 'patch' else OlaClient.UNPATCH universe = args.universe global wrapper wrapper = ClientWrapper() client = wrapper.Client() client.PatchPort(device, port, is_output, action, universe, PatchPortCallback) wrapper.Run() if __name__ == '__main__': main() ola-0.10.9/python/examples/ola_rdm_get.py0000775000175000017500000003442514376533110015302 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_rdm_get.py # Copyright (C) 2010 Simon Newton '''Get a PID from a UID.''' from __future__ import print_function import cmd import getopt import os.path import readline import sys import textwrap from ola.ClientWrapper import ClientWrapper from ola.OlaClient import OlaClient, RDMNack from ola.RDMAPI import RDMAPI from ola.UID import UID from ola import PidStore __author__ = 'nomis52@gmail.com (Simon Newton)' def Usage(): print(textwrap.dedent("""\ Usage: ola_rdm_get.py --universe --uid Get the value of a pid for a device. Use 'ola_rdm_get --list-pids' to get a list of pids. -d, --sub-device target a particular sub device (default is 0) -h, --help display this help message and exit. -i, --interactive interactive mode -l, --list-pids display a list of pids -p, --pid-location the directory to read PID definitions from --uid the UID to send to -u, --universe Universe number.""")) wrapper = None class ResponsePrinter(object): def __init__(self): self.pid_store = PidStore.GetStore() # we can provide custom printers for PIDs below self._handlers = { 'SUPPORTED_PARAMETERS': self.SupportedParameters, 'PROXIED_DEVICES': self.ProxiedDevices, } def PrintResponse(self, uid, pid_value, response_data): pid = self.pid_store.GetPid(pid_value, uid.manufacturer_id) if pid is None: print('PID: 0x%04hx' % pid_value) self.Default(uid, response_data) else: print('PID: %s' % pid) if pid.name in self._handlers: self._handlers[pid.name](uid, response_data) else: self.Default(uid, response_data) def SupportedParameters(self, uid, response_data): params = sorted([p['param_id'] for p in response_data['params']]) for pid_value in params: pid = self.pid_store.GetPid(pid_value, uid.manufacturer_id) if pid: print(pid) else: print('0x%hx' % pid_value) def ProxiedDevices(self, uid, response_data): uids = [] for uid_data in response_data['uids']: uids.append(uid_data['uid']) for uid in sorted(uids): print(uid) def Default(self, uid, response_data): if isinstance(response_data, dict): for key, value in response_data.items(): print('%s: %r' % (key, value)) else: print(response_data) class InteractiveModeController(cmd.Cmd): """Interactive mode!""" def __init__(self, universe, uid, sub_device, pid_location): """Create a new InteractiveModeController. Args: universe: uid: sub_device: pid_location: """ cmd.Cmd.__init__(self) self._universe = universe self._uid = uid self._sub_device = sub_device self.pid_store = PidStore.GetStore(pid_location) self.wrapper = ClientWrapper() self.client = self.wrapper.Client() self.rdm_api = RDMAPI(self.client, self.pid_store) self._uids = [] self._response_printer = ResponsePrinter() # tuple of (sub_device, command_class, pid) self._outstanding_request = None self.prompt = '> ' def emptyline(self): pass def do_exit(self, s): """Exit the interpreter.""" return True def do_EOF(self, s): print('') return self.do_exit('') def do_uid(self, line): """Sets the active UID.""" args = line.split() if len(args) != 1: print('*** Requires a single UID argument') return uid = UID.FromString(args[0]) if uid is None: print('*** Invalid UID') return if uid not in self._uids: print('*** UID not found') return self._uid = uid print('Fetching queued messages...') self._FetchQueuedMessages() self.wrapper.Run() def complete_uid(self, text, line, start_index, end_index): tokens = line.split() if len(tokens) > 1 and text == '': return [] uids = [str(uid) for uid in self._uids if str(uid).startswith(text)] return uids def do_subdevice(self, line): """Sets the sub device.""" args = line.split() if len(args) != 1: print('*** Requires a single int argument') return try: sub_device = int(args[0]) except ValueError: print('*** Requires a single int argument') return if sub_device < 0 or sub_device > PidStore.ALL_SUB_DEVICES: print('*** Argument must be between 0 and 0x%hx' % PidStore.ALL_SUB_DEVICES) return self._sub_device = sub_device def do_print(self, line): """Prints the current universe, UID and sub device.""" print(textwrap.dedent("""\ Universe: %d UID: %s Sub Device: %d""" % ( self._universe, self._uid, self._sub_device))) def do_uids(self, line): """List the UIDs for this universe.""" self.client.FetchUIDList(self._universe, self._DisplayUids) self.wrapper.Run() def _DisplayUids(self, state, uids): self._uids = [] if state.Succeeded(): self._UpdateUids(uids) for uid in uids: print(str(uid)) self.wrapper.Stop() def do_full_discovery(self, line): """Run full RDM discovery for this universe.""" self.client.RunRDMDiscovery(self._universe, True, self._DiscoveryDone) self.wrapper.Run() def do_incremental_discovery(self, line): """Run incremental RDM discovery for this universe.""" self.client.RunRDMDiscovery(self._universe, False, self._DiscoveryDone) self.wrapper.Run() def _DiscoveryDone(self, state, uids): if state.Succeeded(): self._UpdateUids(uids) self.wrapper.Stop() def _UpdateUids(self, uids): self._uids = [] for uid in uids: self._uids.append(uid) def do_list(self, line): """List the pids available.""" names = [] for pid in self.pid_store.Pids(): names.append('%s (0x%04hx)' % (pid.name.lower(), pid.value)) if self._uid: for pid in self.pid_store.ManufacturerPids(self._uid.manufacturer_id): names.append('%s (0x%04hx)' % (pid.name.lower(), pid.value)) names.sort() print('\n'.join(names)) def do_queued(self, line): """Fetch all the queued messages.""" self._FetchQueuedMessages() self.wrapper.Run() def do_get(self, line): """Send a GET command.""" self.GetOrSet(PidStore.RDM_GET, line) def complete_get(self, text, line, start_index, end_index): return self.CompleteGetOrSet(PidStore.RDM_GET, text, line) def do_set(self, line): """Send a SET command.""" self.GetOrSet(PidStore.RDM_SET, line) def complete_set(self, text, line, start_index, end_index): return self.CompleteGetOrSet(PidStore.RDM_SET, text, line) def CompleteGetOrSet(self, request_type, text, line): if len(line.split(' ')) > 2: return [] pids = [pid for pid in self.pid_store.Pids() if pid.name.lower().startswith(text)] if self._uid: for pid in self.pid_store.ManufacturerPids(self._uid.manufacturer_id): if pid.name.lower().startswith(text): pids.append(pid) # now check if this type of request is supported pid_names = sorted([pid.name.lower() for pid in pids if pid.RequestSupported(request_type)]) return pid_names def GetOrSet(self, request_type, line): if self._uid is None: print('*** No UID selected, use the uid command') return args = line.split() command = 'get' if request_type == PidStore.RDM_SET: command = 'set' if len(args) < 1: print('%s [args]' % command) return pid = None try: pid = self.pid_store.GetPid(int(args[0], 0), self._uid.manufacturer_id) except ValueError: pid = self.pid_store.GetName(args[0].upper(), self._uid.manufacturer_id) if pid is None: print('*** Unknown pid %s' % args[0]) return if not pid.RequestSupported(request_type): print('*** PID does not support command') return if request_type == PidStore.RDM_SET: method = self.rdm_api.Set else: method = self.rdm_api.Get try: if method(self._universe, self._uid, self._sub_device, pid, self._RDMRequestComplete, args[1:]): self._outstanding_request = (self._sub_device, request_type, pid) self.wrapper.Run() except PidStore.ArgsValidationError as e: args, help_string = pid.GetRequestDescription(request_type) print('Usage: %s %s %s' % (command, pid.name.lower(), args)) print(help_string) print('') print('*** %s' % e) return def _FetchQueuedMessages(self): """Fetch messages until the queue is empty.""" pid = self.pid_store.GetName('QUEUED_MESSAGE', self._uid.manufacturer_id) self.rdm_api.Get(self._universe, self._uid, PidStore.ROOT_DEVICE, pid, self._QueuedMessageComplete, ['error']) def _RDMRequestComplete(self, response, unpacked_data, unpack_exception): if not self._CheckForAckOrNack(response): return # at this stage the response is either a ack or nack self._outstanding_request = None self.wrapper.Stop() if response.response_type == OlaClient.RDM_NACK_REASON: print('Got nack with reason: %s' % response.nack_reason) elif unpack_exception: print(unpack_exception) else: self._response_printer.PrintResponse(self._uid, response.pid, unpacked_data) if response.queued_messages: print('%d queued messages remain' % response.queued_messages) def _QueuedMessageComplete(self, response, unpacked_data, unpack_exception): if not self._CheckForAckOrNack(response): return if response.response_type == OlaClient.RDM_NACK_REASON: if (self._outstanding_request and response.sub_device == self._outstanding_request[0] and response.command_class == self._outstanding_request[1] and response.pid == self._outstanding_request[2].value): # we found what we were looking for self._outstanding_request = None self.wrapper.StopIfNoEvents() elif (response.nack_reason == RDMNack.NR_UNKNOWN_PID and response.pid == self.pid_store.GetName('QUEUED_MESSAGE').value): print('Device doesn\'t support queued messages') self.wrapper.StopIfNoEvents() else: print('Got nack for 0x%04hx with reason: %s' % ( response.pid, response.nack_reason)) elif unpack_exception: print('Invalid Param data: %s' % unpack_exception) else: status_messages_pid = self.pid_store.GetName('STATUS_MESSAGES') if (response.pid == status_messages_pid.value and unpacked_data.get('messages', []) == []): self.wrapper.StopIfNoEvents() return self._response_printer.PrintResponse(self._uid, response.pid, unpacked_data) if response.queued_messages: self._FetchQueuedMessages() else: self.wrapper.StopIfNoEvents() def _CheckForAckOrNack(self, response): """Check for all the different error conditions. Returns: True if this response was an ACK or NACK, False for all other cases. """ if not response.status.Succeeded(): print(response.status.message) self.wrapper.Stop() return False if response.response_code != OlaClient.RDM_COMPLETED_OK: print(response.ResponseCodeAsString()) self.wrapper.Stop() return False if response.response_type == OlaClient.RDM_ACK_TIMER: # schedule the fetch self.wrapper.AddEvent(response.ack_timer, self._FetchQueuedMessages) return False return True def main(): readline.set_completer_delims(' \t') try: opts, args = getopt.getopt(sys.argv[1:], 'd:hilp:u:', ['sub-device=', 'help', 'interactive', 'list-pids', 'pid-location=', 'uid=', 'universe=']) except getopt.GetoptError as err: print(str(err)) Usage() sys.exit(2) universe = None uid = None sub_device = 0 list_pids = False pid_location = None interactive_mode = False for o, a in opts: if o in ('-d', '--sub-device'): sub_device = int(a) elif o in ('-h', '--help'): Usage() sys.exit() elif o in ('-i', '--interactive'): interactive_mode = True elif o in ('-l', '--list-pids'): list_pids = True elif o in ('--uid',): uid = UID.FromString(a) elif o in ('-p', '--pid-location',): pid_location = a elif o in ('-u', '--universe'): universe = int(a) if universe is None and not list_pids: Usage() sys.exit() if not uid and not list_pids and not interactive_mode: Usage() sys.exit() # try to load the PID store so we fail early if we're missing PIDs try: PidStore.GetStore(pid_location) except PidStore.MissingPLASAPIDs as e: print(e) sys.exit() controller = InteractiveModeController(universe, uid, sub_device, pid_location) if interactive_mode: sys.stdout.write('Available Uids:\n') controller.onecmd('uids') controller.cmdloop() sys.exit() if list_pids: controller.onecmd('list') sys.exit() if len(args) == 0: Usage() sys.exit() request_type = 'get' if os.path.basename(sys.argv[0]) == 'ola_rdm_set.py': request_type = 'set' controller.onecmd('%s %s' % (request_type, ' '.join(args))) if __name__ == '__main__': main() ola-0.10.9/python/examples/rdm_compare.py0000775000175000017500000001214014376533110015304 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # rdm_compare.py # Copyright (C) 2012 Simon Newton import getopt import os import pickle import sys import tempfile import textwrap import webbrowser from ola.UID import UID '''Compare the RDM configurations saves with rdm_snapshot.py''' __author__ = 'nomis52@gmail.com (Simon Newton)' class Error(Exception): """Base exception class.""" class LoadException(Error): """Raised when we can't write to the output file.""" def Usage(): print(textwrap.dedent("""\ Usage: rdm_compare.py Compare two RDM configurations saved with rdm_snapshot. Flags: -h, --help Display this help message and exit.""")) def ReadFile(filename): try: f = open(filename, 'rb') except IOError as e: raise LoadException(e) raw_data = pickle.load(f) f.close() data = {} for uid, settings in raw_data.items(): data[UID.FromString(uid)] = settings return data def TransformKey(key): tokens = key.split('_') output = [] for t in tokens: if t == 'dmx': output.append('DMX') else: output.append(t.capitalize()) return ' '.join(output) def Diff(configuration1, configuration2): """Return the added and removed devices.""" added = set() changed = [] removed = set() for uid, config1 in configuration1.items(): config2 = configuration2.get(uid) if config2 is None: removed.add(uid) continue fields = ['label', 'dmx_start_address', 'personality'] for field in fields: value1 = config1.get(field) value2 = config2.get(field) if value1 != value2: changed.append((uid, TransformKey(field), value1, value2)) for uid in configuration2: if uid not in configuration1: added.add(uid) return added, changed, removed def AddList(output, uids, title): if not uids: return output.append('

%s

    ' % title) for uid in uids: output.append('
  • %s
  • ' % uid) output.append('
') def DiffInBrowser(configuration1, configuration2): """Diff the configurations and output a HTML page.""" added, changed, removed = Diff(configuration1, configuration2) output = [] output.append(textwrap.dedent("""\ RDM Comparator

RDM Comparator

""")) AddList(output, added, 'Devices Added') AddList(output, removed, 'Devices Removed') if changed: output.append('

Device Changes

') output.append(' ') output.append(' ' '') for row in changed: output.append(' ') output.append('' % row) output.append(' ') output.append('
UIDFieldOldNew
%s%s%s%s
') output.append(textwrap.dedent("""\ """)) fd, filename = tempfile.mkstemp('.html') f = os.fdopen(fd, 'w') f.write('\n'.join(output)) f.close() # open in new tab if possible webbrowser.open('file://%s' % filename, new=2) def DiffToStdout(configuration1, configuration2): """Diff the configurations and write to STDOUT.""" added, changed, removed = Diff(configuration1, configuration2) for uid in added: print('Device %s was added' % uid) for uid in removed: print('Device %s was removed' % uid) for uid, human_field, value1, value2 in changed: print('%s: %s changed from %s to %s' % (uid, human_field, value1, value2)) def main(): try: opts, args = getopt.getopt( sys.argv[1:], 'hb', ['help', 'browser']) except getopt.GetoptError as err: print(str(err)) Usage() sys.exit(2) use_browser = False if len(args) != 2: Usage() sys.exit() for o, a in opts: if o in ('-h', '--help'): Usage() sys.exit() elif o in ('-b', '--browser'): use_browser = True configuration1 = ReadFile(args[0]) configuration2 = ReadFile(args[1]) if use_browser: DiffInBrowser(configuration1, configuration2) else: DiffToStdout(configuration1, configuration2) if __name__ == '__main__': main() ola-0.10.9/python/examples/ola_devices.py0000775000175000017500000000341314376533110015274 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_devices.py # Copyright (C) 2005 Simon Newton """Lists the devices / ports.""" from __future__ import print_function import sys from ola.ClientWrapper import ClientWrapper __author__ = 'nomis52@gmail.com (Simon Newton)' wrapper = None def RDMString(port): if port.supports_rdm: return ', RDM supported' return '' def Devices(status, devices): if status.Succeeded(): for device in sorted(devices): print('Device %d: %s' % (device.alias, device.name)) print('Input ports:') for port in device.input_ports: print(' port %d, %s%s' % (port.id, port.description, RDMString(port))) print('Output ports:') for port in device.output_ports: print(' port %d, %s%s' % (port.id, port.description, RDMString(port))) else: print('Error: %s' % status.message, file=sys.stderr) global wrapper if wrapper: wrapper.Stop() def main(): global wrapper wrapper = ClientWrapper() client = wrapper.Client() client.FetchDevices(Devices) wrapper.Run() if __name__ == '__main__': main() ola-0.10.9/python/examples/ola_send_dmx.py0000775000175000017500000000306314376533110015454 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_send_dmx.py # Copyright (C) 2005 Simon Newton """Send some DMX data.""" from __future__ import print_function import array import sys from ola.ClientWrapper import ClientWrapper __author__ = 'nomis52@gmail.com (Simon Newton)' wrapper = None def DmxSent(status): if status.Succeeded(): print('Success!') else: print('Error: %s' % status.message, file=sys.stderr) global wrapper if wrapper: wrapper.Stop() def main(): universe = 1 data = array.array('B') # append first dmx-value data.append(10) # append second dmx-value data.append(50) # append third dmx-value data.append(255) global wrapper wrapper = ClientWrapper() client = wrapper.Client() # send 1 dmx frame with values for channels 1-3 client.SendDmx(universe, data, DmxSent) wrapper.Run() if __name__ == '__main__': main() ola-0.10.9/python/examples/ola_artnet_params.py0000775000175000017500000000351114376533110016511 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_artnet_params.py # Copyright (C) 2005 Simon Newton """Fetch some ArtNet parameters.""" from __future__ import print_function import sys from ola.ClientWrapper import ClientWrapper from ola import ArtNetConfigMessages_pb2 __author__ = 'nomis52@gmail.com (Simon Newton)' def ArtNetConfigureReply(status, response): if status.Succeeded(): reply = ArtNetConfigMessages_pb2.Reply() reply.ParseFromString(response) print('Short Name: %s' % reply.options.short_name) print('Long Name: %s' % reply.options.long_name) print('Subnet: %d' % reply.options.subnet) else: print('Error: %s' % status.message, file=sys.stderr) global wrapper if wrapper: wrapper.Stop() def main(): # Set this appropriately device_alias = 1 global wrapper wrapper = ClientWrapper() client = wrapper.Client() artnet_request = ArtNetConfigMessages_pb2.Request() artnet_request.type = artnet_request.ARTNET_OPTIONS_REQUEST client.ConfigureDevice(device_alias, artnet_request.SerializeToString(), ArtNetConfigureReply) wrapper.Run() if __name__ == '__main__': main() ola-0.10.9/python/examples/ola_recv_dmx.py0000775000175000017500000000332214376533110015460 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_recv_dmx.py # Copyright (C) 2005 Simon Newton """Receive DMX data.""" import getopt import sys import textwrap from ola.ClientWrapper import ClientWrapper __author__ = 'nomis52@gmail.com (Simon Newton)' def NewData(data): print(data) def Usage(): print(textwrap.dedent(""" Usage: ola_recv_dmx.py --universe Display the DXM512 data for the universe. -h, --help Display this help message and exit. -u, --universe Universe number.""")) def main(): try: opts, args = getopt.getopt(sys.argv[1:], "hu:", ["help", "universe="]) except getopt.GetoptError as err: print(str(err)) Usage() sys.exit(2) universe = 1 for o, a in opts: if o in ("-h", "--help"): Usage() sys.exit() elif o in ("-u", "--universe"): universe = int(a) wrapper = ClientWrapper() client = wrapper.Client() client.RegisterUniverse(universe, client.REGISTER, NewData) wrapper.Run() if __name__ == '__main__': main() ola-0.10.9/python/examples/ola_rdm_discover.py0000775000175000017500000000521014376533110016327 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_rdm_discover.py # Copyright (C) 2010 Simon Newton '''Show the UIDs for a universe.''' from __future__ import print_function import getopt import sys import textwrap from ola.ClientWrapper import ClientWrapper __author__ = 'nomis52@gmail.com (Simon Newton)' def Usage(): print(textwrap.dedent("""\ Usage: ola_rdm_discover.py --universe [--full] Fetch the UID list for a universe. -h, --help Display this help message and exit. -f, --full Full RDM Discovery for this universe. -i, --incremental Incremental RDM Discovery for this universe. -u, --universe Universe number.""")) def main(): try: opts, args = getopt.getopt(sys.argv[1:], 'fjiu:', ['help', 'full', 'incremental', 'universe=']) except getopt.GetoptError as err: print(str(err)) Usage() sys.exit(2) universe = None full_discovery = False incremental_discovery = False for o, a in opts: if o in ('-h', '--help'): Usage() sys.exit() elif o in ('-f', '--full'): full_discovery = True elif o in ('-i', '--incremental'): incremental_discovery = True elif o in ('-u', '--universe'): universe = int(a) if universe is None: Usage() sys.exit() if incremental_discovery and full_discovery: print('Only one of --incremental or --full can be specified') sys.exit() wrapper = ClientWrapper() client = wrapper.Client() def show_uids(state, uids): if state.Succeeded(): for uid in uids: print(str(uid)) else: print('Error: %s' % state.message, file=sys.stderr) wrapper.Stop() if full_discovery: client.RunRDMDiscovery(universe, True, show_uids) elif incremental_discovery: client.RunRDMDiscovery(universe, False, show_uids) else: client.FetchUIDList(universe, show_uids) wrapper.Run() if __name__ == '__main__': main() ola-0.10.9/python/examples/ola_fetch_dmx.py0000775000175000017500000000371614376533110015621 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_fetch_dmx.py # Copyright (C) 2020 Peter Newman """Gets a current frame of DMX for a universe.""" from __future__ import print_function import getopt import sys import textwrap from ola.ClientWrapper import ClientWrapper __author__ = 'nomis52@gmail.com (Simon Newton)' wrapper = None def DMXData(status, universe, data): if status.Succeeded(): print(data) else: print('Error: %s' % status.message, file=sys.stderr) global wrapper if wrapper: wrapper.Stop() def Usage(): print(textwrap.dedent(""" Usage: ola_fetch_dmx.py --universe Fetch the current DXM512 data for the universe and exit. -h, --help Display this help message and exit. -u, --universe Universe number.""")) def main(): try: opts, args = getopt.getopt(sys.argv[1:], "hu:", ["help", "universe="]) except getopt.GetoptError as err: print(str(err)) Usage() sys.exit(2) universe = 1 for o, a in opts: if o in ("-h", "--help"): Usage() sys.exit() elif o in ("-u", "--universe"): universe = int(a) global wrapper wrapper = ClientWrapper() client = wrapper.Client() client.FetchDmx(universe, DMXData) wrapper.Run() if __name__ == '__main__': main() ola-0.10.9/python/examples/Makefile.mk0000664000175000017500000000126114376533110014507 00000000000000# example python scripts dist_noinst_SCRIPTS += \ python/examples/ola_artnet_params.py \ python/examples/ola_candidate_ports.py \ python/examples/ola_devices.py \ python/examples/ola_fetch_dmx.py \ python/examples/ola_patch_unpatch.py \ python/examples/ola_plugin_info.py \ python/examples/ola_rdm_discover.py \ python/examples/ola_rdm_get.py \ python/examples/ola_recv_dmx.py \ python/examples/ola_send_dmx.py \ python/examples/ola_simple_fade.py \ python/examples/ola_universe_info.py \ python/examples/rdm_compare.py \ python/examples/rdm_snapshot.py CLEANFILES += \ python/examples/*.pyc \ python/examples/__pycache__/* ola-0.10.9/python/examples/rdm_snapshot.py0000775000175000017500000004057614376533110015533 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # rdm_snapshot.py # Copyright (C) 2012 Simon Newton import getopt import logging import pickle import pprint import sys import textwrap from ola.ClientWrapper import ClientWrapper from ola.OlaClient import OlaClient, RDMNack from ola.RDMAPI import RDMAPI from ola.UID import UID from ola import PidStore '''Quick script to collect the settings from a rig.''' __author__ = 'nomis52@gmail.com (Simon Newton)' class Error(Exception): """Base exception class.""" class DiscoveryException(Error): """Raised when discovery fails.""" class SaveException(Error): """Raised when we can't write to the output file.""" class LoadException(Error): """Raised when we can't write to the output file.""" class ConfigReader(object): """A controller that fetches data for responders.""" (EMPTYING_QUEUE, DMX_START_ADDRESS, DEVICE_LABEL, PERSONALITY) = range(4) def __init__(self, wrapper, pid_store): self.wrapper = wrapper self.pid_store = pid_store self.client = self.wrapper.Client() self.rdm_api = RDMAPI(self.client, self.pid_store) def Run(self, universe, skip_queued_messages): """Run the collector. Args: universe: The universe to collect skip_queued_messages: """ self.universe = universe self.skip_queued_messages = skip_queued_messages self._ResetData() self.client.RunRDMDiscovery(self.universe, True, self._HandleUIDList) self.wrapper.Run() return self.data def _ResetData(self): """Reset the internal data structures.""" self.uids = [] self.uid = None # the current uid we're fetching from self.outstanding_pid = None self.work_state = None # uid: {'start_address': '', 'personality': '', 'label': ''} self.data = {} def _GetPid(self, pid): self.rdm_api.Get(self.universe, self.uid, PidStore.ROOT_DEVICE, pid, self._RDMRequestComplete) logging.debug('Sent %s request' % pid) self.outstanding_pid = pid def _HandleUIDList(self, state, uids): """Called when the UID list arrives.""" if not state.Succeeded(): raise DiscoveryException(state.message) found_uids = set() for uid in uids: found_uids.add(uid) logging.debug(uid) self.uids = list(found_uids) self._FetchNextUID() def _HandleResponse(self, unpacked_data): logging.debug(unpacked_data) if self.work_state == self.DMX_START_ADDRESS: self._HandleStartAddress(unpacked_data) elif self.work_state == self.DEVICE_LABEL: self._HandleDeviceLabel(unpacked_data) elif self.work_state == self.PERSONALITY: self._HandlePersonality(unpacked_data) def _HandleStartAddress(self, data): """Called when we get a DMX_START_ADDRESS response.""" this_device = self.data.setdefault(str(self.uid), {}) this_device['dmx_start_address'] = data['dmx_address'] self._NextState() def _HandleDeviceLabel(self, data): """Called when we get a DEVICE_LABEL response.""" this_device = self.data.setdefault(str(self.uid), {}) this_device['label'] = data['label'] self._NextState() def _HandlePersonality(self, data): """Called when we get a DMX_PERSONALITY response.""" this_device = self.data.setdefault(str(self.uid), {}) this_device['personality'] = data['current_personality'] self._NextState() def _NextState(self): """Move to the next state of information fetching.""" if self.work_state == self.EMPTYING_QUEUE: # fetch start address pid = self.pid_store.GetName('DMX_START_ADDRESS') self._GetPid(pid) self.work_state = self.DMX_START_ADDRESS elif self.work_state == self.DMX_START_ADDRESS: # fetch device label pid = self.pid_store.GetName('DEVICE_LABEL') self._GetPid(pid) self.work_state = self.DEVICE_LABEL elif self.work_state == self.DEVICE_LABEL: # fetch personality pid = self.pid_store.GetName('DMX_PERSONALITY') self._GetPid(pid) self.work_state = self.PERSONALITY else: # this one is done, onto the next UID self._FetchNextUID() def _FetchNextUID(self): """Start fetching the info for the next UID.""" if not self.uids: self.wrapper.Stop() return self.uid = self.uids.pop() self.personalities = [] self.sensors = [] logging.debug('Fetching data for %s' % self.uid) self.work_state = self.EMPTYING_QUEUE if self.skip_queued_messages: # proceed to the fetch now self._NextState() else: self._FetchQueuedMessages() def _FetchNextPersonality(self): """Fetch the info for the next personality, or proceed to the next state if there are none left. """ if self.personalities: personality_index = self.personalities.pop(0) pid = self.pid_store.GetName('DMX_PERSONALITY_DESCRIPTION') self.rdm_api.Get(self.universe, self.uid, PidStore.ROOT_DEVICE, pid, self._RDMRequestComplete, [personality_index]) logging.debug('Sent DMX_PERSONALITY_DESCRIPTION request') self.outstanding_pid = pid else: self._NextState() def _FetchNextSensor(self): """Fetch the info for the next sensor, or proceed to the next state if there are none left. """ if self.sensors: sensor_index = self.sensors.pop(0) pid = self.pid_store.GetName('SENSOR_DEFINITION') self.rdm_api.Get(self.universe, self.uid, PidStore.ROOT_DEVICE, pid, self._RDMRequestComplete, [sensor_index]) logging.debug('Sent SENSOR_DEFINITION request') self.outstanding_pid = pid else: self._NextState() def _FetchQueuedMessages(self): """Fetch messages until the queue is empty.""" pid = self.pid_store.GetName('QUEUED_MESSAGE') self.rdm_api.Get(self.universe, self.uid, PidStore.ROOT_DEVICE, pid, self._QueuedMessageComplete, ['advisory']) logging.debug('Sent GET QUEUED_MESSAGE') def _QueuedMessageFound(self): if self.work_state == self.EMPTYING_QUEUE: self._FetchQueuedMessages() def _RDMRequestComplete(self, response, unpacked_data, unpack_exception): if not self._CheckForAckOrNack(response): return # at this stage the response is either a ack or nack if response.response_type == OlaClient.RDM_NACK_REASON: print('Got nack with reason for PID %d: %s' % (response.pid, response.nack_reason)) self._NextState() elif unpack_exception: print(unpack_exception) self.wrapper.Stop() else: self._HandleResponse(unpacked_data) def _QueuedMessageComplete(self, response, unpacked_data, unpack_exception): """Called when a queued message is returned.""" if not self._CheckForAckOrNack(response): return if response.response_type == OlaClient.RDM_NACK_REASON: if (self.outstanding_pid and response.command_class == OlaClient.RDM_GET_RESPONSE and response.pid == self.outstanding_pid.value): # we found what we were looking for print("found, but nacked") self.outstanding_pid = None self._NextState() elif (response.nack_reason == RDMNack.NR_UNKNOWN_PID and response.pid == self.pid_store.GetName('QUEUED_MESSAGE').value): logging.debug('Device doesn\'t support queued messages') self._NextState() else: print('Got nack for 0x%04hx with reason: %s' % ( response.pid, response.nack_reason)) elif unpack_exception: print('Invalid Param data: %s' % unpack_exception) else: status_messages_pid = self.pid_store.GetName('STATUS_MESSAGES') queued_message_pid = self.pid_store.GetName('QUEUED_MESSAGE') if (response.pid == status_messages_pid.value and unpacked_data.get('messages', []) == []): logging.debug('Got back empty list of STATUS_MESSAGES') self._NextState() return elif response.pid == queued_message_pid.value: logging.debug('Got back QUEUED_MESSAGE, this is a bad responder') self._NextState() return logging.debug('Got pid 0x%hx' % response.pid) if self.outstanding_pid and response.pid == self.outstanding_pid.value: self._HandleResponse(unpacked_data) else: self._FetchQueuedMessages() def _CheckForAckOrNack(self, response): """Check for all the different error conditions. Returns: True if this response was an ACK or NACK, False for all other cases. """ if not response.status.Succeeded(): print(response.status.message) self.wrapper.Stop() return False if response.response_code != OlaClient.RDM_COMPLETED_OK: print(response.ResponseCodeAsString()) self.wrapper.Stop() return False if response.response_type == OlaClient.RDM_ACK_TIMER: # schedule the fetch logging.debug('Got ack timer for %d ms' % response.ack_timer) self.wrapper.AddEvent(response.ack_timer, self._FetchQueuedMessages) return False return True class ConfigWriter(object): """A controller that applies configuration to a universe.""" (DMX_START_ADDRESS, DEVICE_LABEL, PERSONALITY, COMPLETE) = range(4) def __init__(self, wrapper, pid_store): self.wrapper = wrapper self.pid_store = pid_store self.client = self.wrapper.Client() self.rdm_api = RDMAPI(self.client, self.pid_store) def Run(self, universe, configuration): """Run the collector. Args: universe: The universe to collect configuration: The config to apply """ self.universe = universe self.configuration = configuration self.uids = list(configuration.keys()) self.client.RunRDMDiscovery(self.universe, True, self._HandleUIDList) self.wrapper.Run() def _HandleUIDList(self, state, uids): """Called when the UID list arrives.""" if not state.Succeeded(): raise DiscoveryException(state.message) found_uids = set() for uid in uids: found_uids.add(uid) logging.debug(uid) for uid in self.configuration.keys(): if uid not in found_uids: print('Device %s has been removed' % uid) self._SetNextUID() def _SetNextUID(self): """Start setting the info for the next UID.""" if not self.uids: self.wrapper.Stop() return self.uid = self.uids.pop() print('Doing %s' % self.uid) self.work_state = self.DMX_START_ADDRESS self._NextState() def _NextState(self): """Move to the next state of information fetching.""" if self.work_state == self.DMX_START_ADDRESS: address = self.configuration[self.uid].get('dmx_start_address') self.work_state = self.DEVICE_LABEL if address is not None: pid = self.pid_store.GetName('DMX_START_ADDRESS') self._SetPid(pid, [address]) return if self.work_state == self.DEVICE_LABEL: label = self.configuration[self.uid].get('label') self.work_state = self.PERSONALITY if label is not None: pid = self.pid_store.GetName('DEVICE_LABEL') self._SetPid(pid, [label]) return if self.work_state == self.PERSONALITY: personality = self.configuration[self.uid].get('personality') self.work_state = self.COMPLETE if personality is not None: pid = self.pid_store.GetName('DMX_PERSONALITY') self._SetPid(pid, [personality]) return # this one is done, onto the next UID self._SetNextUID() def _SetPid(self, pid, values): self.rdm_api.Set(self.universe, self.uid, PidStore.ROOT_DEVICE, pid, self._RDMRequestComplete, values) logging.debug('Sent %s request' % pid) self.outstanding_pid = pid def _RDMRequestComplete(self, response, unpacked_data, unpack_exception): if not response.status.Succeeded(): print(response.status.message) self.wrapper.Stop() return if response.response_code != OlaClient.RDM_COMPLETED_OK: print(response.ResponseCodeAsString()) self.wrapper.Stop() return if response.response_type == OlaClient.RDM_ACK_TIMER: # schedule the fetch logging.debug('Got ack timer for %d ms' % response.ack_timer) self.wrapper.AddEvent(response.ack_timer, self._FetchQueuedMessages) return # at this stage the response is either a ack or nack if response.response_type == OlaClient.RDM_NACK_REASON: print('Got nack with reason: %s' % response.nack_reason) self._NextState() def Usage(): print("Usage: rdm_snapshot.py --universe [--input ] " "[--output ]\n") print(textwrap.dedent("""\ Save and restore RDM settings for a universe. This includes the start address, personality and device label. Fetch and save a configuration: rdm_snapshot.py -u 1 --output /tmp/save Restore configuration: rdm_snapshot.py -u 1 --input /tmp/save -d, --debug Print extra debug info. -h, --help Display this help message and exit. -i, --input File to read configuration from. -p, --pid-location The directory to read PID definitions from. -o, --output File to save configuration to. --skip-queued-messages Don't attempt to fetch queued messages for the device. -u, --universe Universe number.""")) def WriteToFile(filename, output): try: log_file = open(filename, 'w') except IOError as e: raise SaveException( 'Failed to write to %s: %s' % (filename, e.message)) pickle.dump(output, log_file) logging.info('Wrote log file %s' % (log_file.name)) log_file.close() def ReadFile(filename): try: f = open(filename, 'rb') except IOError as e: raise LoadException(e) raw_data = pickle.load(f) f.close() data = {} for uid, settings in raw_data.items(): data[UID.FromString(uid)] = settings return data def main(): try: opts, args = getopt.getopt( sys.argv[1:], 'dhi:o:p:u:', ['debug', 'help', 'input=', 'skip-queued-messages', 'output=', 'pid-location=', 'universe=']) except getopt.GetoptError as err: print(str(err)) Usage() sys.exit(2) universe = None output_file = None input_file = None pid_location = None level = logging.INFO skip_queued_messages = False for o, a in opts: if o in ('-d', '--debug'): level = logging.DEBUG elif o in ('-h', '--help'): Usage() sys.exit() elif o in ('-i', '--input'): input_file = a elif o in ('--skip-queued-messages'): skip_queued_messages = True elif o in ('-o', '--output'): output_file = a elif o in ('-p', '--pid-location',): pid_location = a elif o in ('-u', '--universe'): universe = int(a) if universe is None: Usage() sys.exit() if input_file and output_file: print('Only one of --input and --output can be provided.') sys.exit() logging.basicConfig( level=level, format='%(message)s') client_wrapper = ClientWrapper() pid_store = PidStore.GetStore(pid_location) if input_file: configuration = ReadFile(input_file) if configuration: writer = ConfigWriter(client_wrapper, pid_store) writer.Run(universe, configuration) else: controller = ConfigReader(client_wrapper, pid_store) data = controller.Run(universe, skip_queued_messages) if output_file: WriteToFile(output_file, data) else: pprint.pprint(data) if __name__ == '__main__': main() ola-0.10.9/python/examples/ola_simple_fade.py0000775000175000017500000000513314376533110016123 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_simple_fade.py # Copyright (C) 2014 Sean Sill from array import array from ola.ClientWrapper import ClientWrapper from ola.DMXConstants import (DMX_MAX_SLOT_VALUE, DMX_MIN_SLOT_VALUE, DMX_UNIVERSE_SIZE) __author__ = 'Sean Sill' """ This script fades DMX_DATA_SIZE channels from 0 to 255. It serves as an example of how to use AddEvent to schedule dmx data updates from python To view data, use the web interface or patch an output device to the same universe """ UPDATE_INTERVAL = 25 # In ms, this comes about to ~40 frames a second SHUTDOWN_INTERVAL = 10000 # in ms, This is 10 seconds DMX_DATA_SIZE = 100 UNIVERSE = 1 class SimpleFadeController(object): def __init__(self, universe, update_interval, client_wrapper, dmx_data_size=DMX_UNIVERSE_SIZE): dmx_data_size = min(dmx_data_size, DMX_UNIVERSE_SIZE) self._universe = universe self._update_interval = update_interval self._data = array('B', [DMX_MIN_SLOT_VALUE] * dmx_data_size) self._wrapper = client_wrapper self._client = client_wrapper.Client() self._wrapper.AddEvent(self._update_interval, self.UpdateDmx) def UpdateDmx(self): """ This function gets called periodically based on UPDATE_INTERVAL """ for i in range(len(self._data)): self._data[i] = (self._data[i] + 1) % DMX_MAX_SLOT_VALUE # Send the DMX data self._client.SendDmx(self._universe, self._data) # For more information on Add Event, reference the OlaClient # Add our event again so it becomes periodic self._wrapper.AddEvent(self._update_interval, self.UpdateDmx) if __name__ == '__main__': wrapper = ClientWrapper() controller = SimpleFadeController(UNIVERSE, UPDATE_INTERVAL, wrapper, DMX_DATA_SIZE) # Call it initially wrapper.AddEvent(SHUTDOWN_INTERVAL, wrapper.Stop) # Start the wrapper wrapper.Run() ola-0.10.9/python/examples/ola_plugin_info.py0000775000175000017500000000444514376533110016171 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_plugin_info.py # Copyright (C) 2005 Simon Newton """Lists the loaded plugins.""" from __future__ import print_function import getopt import sys import textwrap from ola.ClientWrapper import ClientWrapper __author__ = 'nomis52@gmail.com (Simon Newton)' wrapper = None def Usage(): print(textwrap.dedent(""" Usage: ola_plugin_info.py [--plugin ] Display a list of plugins, or a description for a particular plugin. -h, --help Display this help message and exit. -p, --plugin Plugin ID number.""")) def Plugins(status, plugins): if status.Succeeded(): for plugin in plugins: print('%d %s' % (plugin.id, plugin.name)) else: print('Error: %s' % status.message, file=sys.stderr) global wrapper if wrapper: wrapper.Stop() def PluginDescription(status, description): if status.Succeeded(): print(description) else: print('Error: %s' % status.message, file=sys.stderr) global wrapper if wrapper: wrapper.Stop() def main(): try: opts, args = getopt.getopt(sys.argv[1:], "hp:", ["help", "plugin="]) except getopt.GetoptError as err: print(str(err)) Usage() sys.exit(2) plugin = None for o, a in opts: if o in ("-h", "--help"): Usage() sys.exit() elif o in ("-p", "--plugin"): plugin = int(a) global wrapper wrapper = ClientWrapper() client = wrapper.Client() if plugin is not None: client.PluginDescription(PluginDescription, plugin) else: client.FetchPlugins(Plugins) wrapper.Run() if __name__ == '__main__': main() ola-0.10.9/python/examples/ola_universe_info.py0000775000175000017500000000350114376533110016523 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_universe_info.py # Copyright (C) 2005 Simon Newton """Lists the active universes.""" from __future__ import print_function import sys from ola.ClientWrapper import ClientWrapper from ola.OlaClient import Universe __author__ = 'nomis52@gmail.com (Simon Newton)' wrapper = None def Universes(status, universes): if status.Succeeded(): for uni in universes: print('Universe %d' % uni.id) print(' - Name: %s' % uni.name) print(' - Merge mode: %s' % ( ('LTP' if uni.merge_mode == Universe.LTP else 'HTP'))) if len(uni.input_ports) > 0: print(' - Input ports:') for p in uni.input_ports: print(' - %s' % p) if len(uni.output_ports) > 0: print(' - Output ports:') for p in uni.output_ports: print(' - %s' % p) else: print('Error: %s' % status.message, file=sys.stderr) global wrapper if wrapper: wrapper.Stop() def main(): global wrapper wrapper = ClientWrapper() client = wrapper.Client() client.FetchUniverses(Universes) wrapper.Run() if __name__ == '__main__': main() ola-0.10.9/python/ola/0000775000175000017500000000000014376533270011465 500000000000000ola-0.10.9/python/ola/DUBDecoderTest.py0000775000175000017500000000377414376533110014526 00000000000000#!/usr/bin/env python # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # DUBDecoderTest.py # Copyright (C) Simon Newton import unittest from ola.DUBDecoder import DecodeResponse """Test cases for the DUBDecoder class.""" __author__ = 'nomis52@gmail.com (Simon Newton)' class UIDTest(unittest.TestCase): TEST_DATA = [ 0xfe, 0xfe, 0xfe, 0xfe, 0xaa, 0xaa, 0x55, 0xab, 0xf5, 0xaa, 0x55, 0xaa, 0x57, 0xaa, 0x55, 0xaa, 0x75, 0xae, 0x57, 0xbf, 0xfd ] TEST_BAD_DATA = [ 0xfe, 0xfe, 0xfe, 0xfe, 0xaa, 0xaa, 0x55, 0xab, 0xf5, 0xaa, 0x55, 0xaa, 0x57, 0xaa, 0x55, 0xaa, 0x75, 0xae, 0x57, 0xbf, 0xff # invalid checksum ] def testInvalid(self): # we stick to methods in 2.6 for now self.assertEqual(None, DecodeResponse(bytearray())) self.assertEqual(None, DecodeResponse([0])) self.assertEqual(None, DecodeResponse([0, 0, 0])) self.assertEqual(None, DecodeResponse(self.TEST_DATA[0:-1])) self.assertEqual(None, DecodeResponse(self.TEST_DATA[4:])) self.assertEqual(None, DecodeResponse(self.TEST_BAD_DATA)) def testValidResponse(self): uid = DecodeResponse(self.TEST_DATA) self.assertNotEqual(None, uid) self.assertEqual(0x00a1, uid.manufacturer_id) self.assertEqual(0x00020020, uid.device_id) if __name__ == '__main__': unittest.main() ola-0.10.9/python/ola/RDMConstants.py0000664000175000017500000002727514376533110014304 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # RDMConstants.py # Copyright (C) 2010 Simon Newton """Constants defined in E1.20 (RDM).""" __author__ = 'nomis52@gmail.com (Simon Newton)' RDM_ZERO_FOOTPRINT_DMX_ADDRESS = 0xFFFF RDM_MANUFACTURER_PID_MIN = 0x8000 RDM_MANUFACTURER_PID_MAX = 0xFFDF RDM_MANUFACTURER_SD_MIN = 0x8000 RDM_MANUFACTURER_SD_MAX = 0xFFDF RDM_MAX_STRING_LENGTH = 32 RDM_INTERFACE_INDEX_MIN = 1 RDM_INTERFACE_INDEX_MAX = 0xFFFFFF00 RDM_MIN_HOSTNAME_LENGTH = 1 RDM_MAX_HOSTNAME_LENGTH = 63 RDM_MAX_DOMAIN_NAME_LENGTH = 231 RDM_DNS_NAME_SERVER_MAX_INDEX = 2 def _ReverseDict(input): output = {} for key, value in input.items(): output[value] = key return output SENSOR_TYPES = { 'SENSOR_TEMPERATURE': 0x00, 'SENSOR_VOLTAGE': 0x01, 'SENSOR_CURRENT': 0x02, 'SENSOR_FREQUENCY': 0x03, 'SENSOR_RESISTANCE': 0x04, 'SENSOR_POWER': 0x05, 'SENSOR_MASS': 0x06, 'SENSOR_LENGTH': 0x07, 'SENSOR_AREA': 0x08, 'SENSOR_VOLUME': 0x09, 'SENSOR_DENSITY': 0x0A, 'SENSOR_VELOCITY': 0x0B, 'SENSOR_ACCELERATION': 0x0C, 'SENSOR_FORCE': 0x0D, 'SENSOR_ENERGY': 0x0E, 'SENSOR_PRESSURE': 0x0F, 'SENSOR_TIME': 0x10, 'SENSOR_ANGLE': 0x11, 'SENSOR_POSITION_X': 0x12, 'SENSOR_POSITION_Y': 0x13, 'SENSOR_POSITION_Z': 0x14, 'SENSOR_ANGULAR_VELOCITY': 0x15, 'SENSOR_LUMINOUS_INTENSITY': 0x16, 'SENSOR_LUMINOUS_FLUX': 0x17, 'SENSOR_ILLUMINANCE': 0x18, 'SENSOR_CHROMINANCE_RED': 0x19, 'SENSOR_CHROMINANCE_GREEN': 0x1A, 'SENSOR_CHROMINANCE_BLUE': 0x1B, 'SENSOR_CONTACTS': 0x1C, 'SENSOR_MEMORY': 0x1D, 'SENSOR_ITEMS': 0x1E, 'SENSOR_HUMIDITY': 0x1F, 'SENSOR_COUNTER_16BIT': 0x20, 'SENSOR_OTHER': 0x7F, } SENSOR_TYPE_TO_NAME = _ReverseDict(SENSOR_TYPES) UNITS = { 'UNITS_NONE': 0x00, 'UNITS_CENTIGRADE': 0x01, 'UNITS_VOLTS_DC': 0x02, 'UNITS_VOLTS_AC_PEAK': 0x03, 'UNITS_VOLTS_AC_RMS': 0x04, 'UNITS_AMPERE_DC': 0x05, 'UNITS_AMPERE_AC_PEAK': 0x06, 'UNITS_AMPERE_AC_RMS': 0x07, 'UNITS_HERTZ': 0x08, 'UNITS_OHM': 0x09, 'UNITS_WATT': 0x0A, 'UNITS_KILOGRAM': 0x0B, 'UNITS_METERS': 0x0C, 'UNITS_METERS_SQUARED': 0x0D, 'UNITS_METERS_CUBED': 0x0E, 'UNITS_KILOGRAMMES_PER_METER_CUBED': 0x0F, 'UNITS_METERS_PER_SECOND': 0x10, 'UNITS_METERS_PER_SECOND_SQUARED': 0x11, 'UNITS_NEWTON': 0x12, 'UNITS_JOULE': 0x13, 'UNITS_PASCAL': 0x14, 'UNITS_SECOND': 0x15, 'UNITS_DEGREE': 0x16, 'UNITS_STERADIAN': 0x17, 'UNITS_CANDELA': 0x18, 'UNITS_LUMEN': 0x19, 'UNITS_LUX': 0x1A, 'UNITS_IRE': 0x1B, 'UNITS_BYTE': 0x1C, } UNIT_TO_NAME = _ReverseDict(UNITS) PREFIXES = { 'PREFIX_NONE': 0x00, 'PREFIX_DECI': 0x01, 'PREFIX_CENTI': 0x02, 'PREFIX_MILLI': 0x03, 'PREFIX_MICRO': 0x04, 'PREFIX_NANO': 0x05, 'PREFIX_PICO': 0x06, 'PREFIX_FEMTO': 0x07, 'PREFIX_ATTO': 0x08, 'PREFIX_ZEPTO': 0x09, 'PREFIX_YOCTO': 0x0A, 'PREFIX_DECA': 0x11, 'PREFIX_HECTO': 0x12, 'PREFIX_KILO': 0x13, 'PREFIX_MEGA': 0x14, 'PREFIX_GIGA': 0x15, 'PREFIX_TERA': 0x16, 'PREFIX_PETA': 0x17, 'PREFIX_EXA': 0x18, 'PREFIX_ZETTA': 0x19, 'PREFIX_YOTTA': 0x1A, } PREFIX_TO_NAME = _ReverseDict(PREFIXES) PRODUCT_CATEGORIES = { 'PRODUCT_CATEGORY_NOT_DECLARED': 0x0000, 'PRODUCT_CATEGORY_FIXTURE': 0x0100, 'PRODUCT_CATEGORY_FIXTURE_FIXED': 0x0101, 'PRODUCT_CATEGORY_FIXTURE_MOVING_YOKE': 0x0102, 'PRODUCT_CATEGORY_FIXTURE_MOVING_MIRROR': 0x0103, 'PRODUCT_CATEGORY_FIXTURE_OTHER': 0x01FF, 'PRODUCT_CATEGORY_FIXTURE_ACCESSORY': 0x0200, 'PRODUCT_CATEGORY_FIXTURE_ACCESSORY_COLOR': 0x0201, 'PRODUCT_CATEGORY_FIXTURE_ACCESSORY_YOKE': 0x0202, 'PRODUCT_CATEGORY_FIXTURE_ACCESSORY_MIRROR': 0x0203, 'PRODUCT_CATEGORY_FIXTURE_ACCESSORY_EFFECT': 0x0204, 'PRODUCT_CATEGORY_FIXTURE_ACCESSORY_BEAM': 0x0205, 'PRODUCT_CATEGORY_FIXTURE_ACCESSORY_OTHER': 0x02FF, 'PRODUCT_CATEGORY_PROJECTOR': 0x0300, 'PRODUCT_CATEGORY_PROJECTOR_FIXED': 0x0301, 'PRODUCT_CATEGORY_PROJECTOR_MOVING_YOKE': 0x0302, 'PRODUCT_CATEGORY_PROJECTOR_MOVING_MIRROR': 0x0303, 'PRODUCT_CATEGORY_PROJECTOR_OTHER': 0x03FF, 'PRODUCT_CATEGORY_ATMOSPHERIC': 0x0400, 'PRODUCT_CATEGORY_ATMOSPHERIC_EFFECT': 0x0401, 'PRODUCT_CATEGORY_ATMOSPHERIC_PYRO': 0x0402, 'PRODUCT_CATEGORY_ATMOSPHERIC_OTHER': 0x04FF, 'PRODUCT_CATEGORY_DIMMER': 0x0500, 'PRODUCT_CATEGORY_DIMMER_AC_INCANDESCENT': 0x0501, 'PRODUCT_CATEGORY_DIMMER_AC_FLUORESCENT': 0x0502, 'PRODUCT_CATEGORY_DIMMER_AC_COLDCATHODE': 0x0503, 'PRODUCT_CATEGORY_DIMMER_AC_NONDIM': 0x0504, 'PRODUCT_CATEGORY_DIMMER_AC_ELV': 0x0505, 'PRODUCT_CATEGORY_DIMMER_AC_OTHER': 0x0506, 'PRODUCT_CATEGORY_DIMMER_DC_LEVEL': 0x0507, 'PRODUCT_CATEGORY_DIMMER_DC_PWM': 0x0508, 'PRODUCT_CATEGORY_DIMMER_CS_LED': 0x0509, 'PRODUCT_CATEGORY_DIMMER_OTHER': 0x05FF, 'PRODUCT_CATEGORY_POWER': 0x0600, 'PRODUCT_CATEGORY_POWER_CONTROL': 0x0601, 'PRODUCT_CATEGORY_POWER_SOURCE': 0x0602, 'PRODUCT_CATEGORY_POWER_OTHER': 0x06FF, 'PRODUCT_CATEGORY_SCENIC': 0x0700, 'PRODUCT_CATEGORY_SCENIC_DRIVE': 0x0701, 'PRODUCT_CATEGORY_SCENIC_OTHER': 0x07FF, 'PRODUCT_CATEGORY_DATA': 0x0800, 'PRODUCT_CATEGORY_DATA_DISTRIBUTION': 0x0801, 'PRODUCT_CATEGORY_DATA_CONVERSION': 0x0802, 'PRODUCT_CATEGORY_DATA_OTHER': 0x08FF, 'PRODUCT_CATEGORY_AV': 0x0900, 'PRODUCT_CATEGORY_AV_AUDIO': 0x0901, 'PRODUCT_CATEGORY_AV_VIDEO': 0x0902, 'PRODUCT_CATEGORY_AV_OTHER': 0x09FF, 'PRODUCT_CATEGORY_MONITOR': 0x0A00, 'PRODUCT_CATEGORY_MONITOR_ACLINEPOWER': 0x0A01, 'PRODUCT_CATEGORY_MONITOR_DCPOWER': 0x0A02, 'PRODUCT_CATEGORY_MONITOR_ENVIRONMENTAL': 0x0A03, 'PRODUCT_CATEGORY_MONITOR_OTHER': 0x0AFF, 'PRODUCT_CATEGORY_CONTROL': 0x7000, 'PRODUCT_CATEGORY_CONTROL_CONTROLLER': 0x7001, 'PRODUCT_CATEGORY_CONTROL_BACKUPDEVICE': 0x7002, 'PRODUCT_CATEGORY_CONTROL_OTHER': 0x70FF, 'PRODUCT_CATEGORY_TEST': 0x7100, 'PRODUCT_CATEGORY_TEST_EQUIPMENT': 0x7101, 'PRODUCT_CATEGORY_TEST_EQUIPMENT_OTHER': 0x71FF, 'PRODUCT_CATEGORY_OTHER': 0x7FFF, } PRODUCT_CATEGORY_TO_NAME = _ReverseDict(PRODUCT_CATEGORIES) PRODUCT_DETAIL_IDS = { 'PRODUCT_DETAIL_NOT_DECLARED': 0x0000, 'PRODUCT_DETAIL_ARC': 0x0001, 'PRODUCT_DETAIL_METAL_HALIDE': 0x0002, 'PRODUCT_DETAIL_INCANDESCENT': 0x0003, 'PRODUCT_DETAIL_LED': 0x0004, 'PRODUCT_DETAIL_FLUORESCENT': 0x0005, 'PRODUCT_DETAIL_COLDCATHODE': 0x0006, 'PRODUCT_DETAIL_ELECTROLUMINESCENT': 0x0007, 'PRODUCT_DETAIL_LASER': 0x0008, 'PRODUCT_DETAIL_FLASHTUBE': 0x0009, 'PRODUCT_DETAIL_COLORSCROLLER': 0x0100, 'PRODUCT_DETAIL_COLORWHEEL': 0x0101, 'PRODUCT_DETAIL_COLORCHANGE': 0x0102, 'PRODUCT_DETAIL_IRIS_DOUSER': 0x0103, 'PRODUCT_DETAIL_DIMMING_SHUTTER': 0x0104, 'PRODUCT_DETAIL_PROFILE_SHUTTER': 0x0105, 'PRODUCT_DETAIL_BARNDOOR_SHUTTER': 0x0106, 'PRODUCT_DETAIL_EFFECTS_DISC': 0x0107, 'PRODUCT_DETAIL_GOBO_ROTATOR': 0x0108, 'PRODUCT_DETAIL_VIDEO': 0x0200, 'PRODUCT_DETAIL_SLIDE': 0x0201, 'PRODUCT_DETAIL_FILM': 0x0202, 'PRODUCT_DETAIL_OILWHEEL': 0x0203, 'PRODUCT_DETAIL_LCDGATE': 0x0204, 'PRODUCT_DETAIL_FOGGER_GLYCOL': 0x0300, 'PRODUCT_DETAIL_FOGGER_MINERALOIL': 0x0301, 'PRODUCT_DETAIL_FOGGER_WATER': 0x0302, 'PRODUCT_DETAIL_CO2': 0x0303, 'PRODUCT_DETAIL_LN2': 0x0304, 'PRODUCT_DETAIL_BUBBLE': 0x0305, 'PRODUCT_DETAIL_FLAME_PROPANE': 0x0306, 'PRODUCT_DETAIL_FLAME_OTHER': 0x0307, 'PRODUCT_DETAIL_OLEFACTORY_STIMULATOR': 0x0308, 'PRODUCT_DETAIL_SNOW': 0x0309, 'PRODUCT_DETAIL_WATER_JET': 0x030A, 'PRODUCT_DETAIL_WIND': 0x030B, 'PRODUCT_DETAIL_CONFETTI': 0x030C, 'PRODUCT_DETAIL_HAZARD': 0x030D, 'PRODUCT_DETAIL_PHASE_CONTROL': 0x0400, 'PRODUCT_DETAIL_REVERSE_PHASE_CONTROL': 0x0401, 'PRODUCT_DETAIL_SINE': 0x0402, 'PRODUCT_DETAIL_PWM': 0x0403, 'PRODUCT_DETAIL_DC': 0x0404, 'PRODUCT_DETAIL_HFBALLAST': 0x0405, 'PRODUCT_DETAIL_HFHV_NEONBALLAST': 0x0406, 'PRODUCT_DETAIL_HFHV_EL': 0x0407, 'PRODUCT_DETAIL_MHR_BALLAST': 0x0408, 'PRODUCT_DETAIL_BITANGLE_MODULATION': 0x0409, 'PRODUCT_DETAIL_FREQUENCY_MODULATION': 0x040A, 'PRODUCT_DETAIL_HIGHFREQUENCY_12V': 0x040B, 'PRODUCT_DETAIL_RELAY_MECHANICAL': 0x040C, 'PRODUCT_DETAIL_RELAY_ELECTRONIC': 0x040D, 'PRODUCT_DETAIL_SWITCH_ELECTRONIC': 0x040E, 'PRODUCT_DETAIL_CONTACTOR': 0x040F, 'PRODUCT_DETAIL_MIRRORBALL_ROTATOR': 0x0500, 'PRODUCT_DETAIL_OTHER_ROTATOR': 0x0501, 'PRODUCT_DETAIL_KABUKI_DROP': 0x0502, 'PRODUCT_DETAIL_CURTAIN': 0x0503, 'PRODUCT_DETAIL_LINESET': 0x0504, 'PRODUCT_DETAIL_MOTOR_CONTROL': 0x0505, 'PRODUCT_DETAIL_DAMPER_CONTROL': 0x0506, 'PRODUCT_DETAIL_SPLITTER': 0x0600, 'PRODUCT_DETAIL_ETHERNET_NODE': 0x0601, 'PRODUCT_DETAIL_MERGE': 0x0602, 'PRODUCT_DETAIL_DATAPATCH': 0x0603, 'PRODUCT_DETAIL_WIRELESS_LINK': 0x0604, 'PRODUCT_DETAIL_PROTOCOL_CONVERTER': 0x0701, 'PRODUCT_DETAIL_ANALOG_DEMULTIPLEX': 0x0702, 'PRODUCT_DETAIL_ANALOG_MULTIPLEX': 0x0703, 'PRODUCT_DETAIL_SWITCH_PANEL': 0x0704, 'PRODUCT_DETAIL_ROUTER': 0x0800, 'PRODUCT_DETAIL_FADER': 0x0801, 'PRODUCT_DETAIL_MIXER': 0x0802, 'PRODUCT_DETAIL_CHANGEOVER_MANUAL': 0x0900, 'PRODUCT_DETAIL_CHANGEOVER_AUTO': 0x0901, 'PRODUCT_DETAIL_TEST': 0x0902, 'PRODUCT_DETAIL_GFI_RCD': 0x0A00, 'PRODUCT_DETAIL_BATTERY': 0x0A01, 'PRODUCT_DETAIL_CONTROLLABLE_BREAKER': 0x0A02, 'PRODUCT_DETAIL_OTHER': 0x7FFF, } PRODUCT_DETAIL_IDS_TO_NAME = _ReverseDict(PRODUCT_DETAIL_IDS) SLOT_TYPES = { 'ST_PRIMARY': 0x00, 'ST_SEC_FINE': 0x01, 'ST_SEC_TIMING': 0x02, 'ST_SEC_SPEED': 0x03, 'ST_SEC_CONTROL': 0x04, 'ST_SEC_INDEX': 0x05, 'ST_SEC_ROTATION': 0x06, 'ST_SEC_INDEX_ROTATE': 0x07, 'ST_SEC_UNDEFINED': 0xFF, } SLOT_TYPE_TO_NAME = _ReverseDict(SLOT_TYPES) SLOT_DEFINITIONS = { 'SD_INTENSITY': 0x0001, 'SD_INTENSITY_MASTER': 0x0002, 'SD_PAN': 0x0101, 'SD_TILT': 0x0102, 'SD_COLOR_WHEEL': 0x0201, 'SD_COLOR_SUB_CYAN': 0x0202, 'SD_COLOR_SUB_YELLOW': 0x0203, 'SD_COLOR_SUB_MAGENTA': 0x0204, 'SD_COLOR_ADD_RED': 0x0205, 'SD_COLOR_ADD_GREEN': 0x0206, 'SD_COLOR_ADD_BLUE': 0x0207, 'SD_COLOR_CORRECTION': 0x0208, 'SD_COLOR_SCROLL': 0x0209, 'SD_COLOR_SEMAPHORE': 0x0210, 'SD_COLOR_ADD_AMBER': 0x0211, 'SD_COLOR_ADD_WHITE': 0x0212, 'SD_COLOR_ADD_WARM_WHITE': 0x0213, 'SD_COLOR_ADD_COOL_WHITE': 0x0214, 'SD_COLOR_SUB_UV': 0x0215, 'SD_COLOR_HUE': 0x0216, 'SD_COLOR_SATURATION': 0x0217, 'SD_STATIC_GOBO_WHEEL': 0x0301, 'SD_ROTO_GOBO_WHEEL': 0x0302, 'SD_PRISM_WHEEL': 0x0303, 'SD_EFFECTS_WHEEL': 0x0304, 'SD_BEAM_SIZE_IRIS': 0x0401, 'SD_EDGE': 0x0402, 'SD_FROST': 0x0403, 'SD_STROBE': 0x0404, 'SD_ZOOM': 0x0405, 'SD_FRAMING_SHUTTER': 0x0406, 'SD_SHUTTER_ROTATE': 0x0407, 'SD_DOUSER': 0x0408, 'SD_BARN_DOOR': 0x0409, 'SD_LAMP_CONTROL': 0x0501, 'SD_FIXTURE_CONTROL': 0x0502, 'SD_FIXTURE_SPEED': 0x0503, 'SD_MACRO': 0x0504, 'SD_POWER_CONTROL': 0x0505, 'SD_FAN_CONTROL': 0x0506, 'SD_HEATER_CONTROL': 0x0507, 'SD_FOUNTAIN_CONTROL': 0x0508, 'SD_UNDEFINED': 0xFFFF, } SLOT_DEFINITION_TO_NAME = _ReverseDict(SLOT_DEFINITIONS) PRESET_PROGRAMMED = { 'PRESET_NOT_PROGRAMMED': 0x00, 'PRESET_PROGRAMMED': 0x01, 'PRESET_PROGRAMMED_READ_ONLY': 0x02, } PRESET_PROGRAMMER_TO_NAME = _ReverseDict(PRESET_PROGRAMMED) MERGE_MODE = { 'MERGEMODE_DEFAULT': 0x00, 'MERGEMODE_HTP': 0x01, 'MERGEMODE_LTP': 0x02, 'MERGEMODE_DMX_ONLY': 0x03, 'MERGEMODE_OTHER': 0xFF, } MERGE_MODE_TO_NAME = _ReverseDict(MERGE_MODE) INTERFACE_HARDWARE_TYPE_ETHERNET = 0x0001 ola-0.10.9/python/ola/DUBDecoder.py0000664000175000017500000000346014376533110013653 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # DUBDecoder.py # Copyright (C) 2012 Simon Newton import itertools from ola.UID import UID """Decodes a DUB response.""" __author__ = 'nomis52@gmail.com (Simon Newton)' def DecodeResponse(data): """Decode a DUB response. Args: data: an iterable of data like a bytearray Returns: The UID that responded, or None if the response wasn't valid. """ # min length is 18 bytes if len(data) < 18: return None # must start with 0xfe if data[0] != 0xfe: return None data = list(itertools.dropwhile(lambda x: x == 0xfe, data)) if len(data) < 17 or data[0] != 0xaa: return None data = data[1:] checksum = 0 for b in data[0:12]: checksum += b packet_checksum = ( (data[12] & data[13]) << 8 | (data[14] & data[15]) ) if checksum != packet_checksum: return None manufacturer_id = ( (data[0] & data[1]) << 8 | (data[2] & data[3]) ) device_id = ( (data[4] & data[5]) << 24 | (data[6] & data[7]) << 16 | (data[8] & data[9]) << 8 | (data[10] & data[11]) ) return UID(manufacturer_id, device_id) ola-0.10.9/python/ola/RDMAPI.py0000664000175000017500000002302114376533110012722 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # RDMAPI.py # Copyright (C) 2010 Simon Newton from __future__ import print_function import sys from ola.OlaClient import OlaClient from ola import PidStore """The Python RDM API.""" __author__ = 'nomis52@gmail.com (Simon Newton)' class RDMAPI(object): """The RDM API. The RDM API provides parameter data serialization & parsing using a PidStore. """ # This maps ola.proto enums to PidStore enums COMMAND_CLASS_DICT = { OlaClient.RDM_DISCOVERY_RESPONSE: PidStore.RDM_DISCOVERY, OlaClient.RDM_GET_RESPONSE: PidStore.RDM_GET, OlaClient.RDM_SET_RESPONSE: PidStore.RDM_SET, } def __init__(self, client, pid_store, strict_checks=True): """Create a new RDM API. Args: client: A OlaClient object. pid_store: A PidStore instance strict_checks: Enable strict checking """ self._client = client self._pid_store = pid_store self._strict_checks = strict_checks def Discovery(self, universe, uid, sub_device, pid, callback, args, include_frames=False): """Send an RDM Discovery message with the raw data supplied. Args: universe: The universe to send the request on. uid: The UID to address the request to. sub_device: The Sub Device to send the request to. pid: A PID object that describes the format of the request. callback: The callback to run when the request completes. args: The args to pack into the param data section. include_frames: True if the response should include the raw frame data. Return: True if sent ok, False otherwise. """ return self._SendRequest(universe, uid, sub_device, pid, callback, args, PidStore.RDM_DISCOVERY, include_frames) def RawDiscovery(self, universe, uid, sub_device, pid, callback, data, include_frames=False): """Send an RDM Discovery message with the raw data supplied. Args: universe: The universe to send the request on. uid: The UID to address the request to. sub_device: The Sub Device to send the request to. pid: A PID object that describes the format of the request. callback: The callback to run when the request completes. data: The param data include_frames: True if the response should include the raw frame data. Return: True if sent ok, False otherwise. """ return self._SendRawRequest(universe, uid, sub_device, pid, callback, data, PidStore.RDM_DISCOVERY, include_frames) def Get(self, universe, uid, sub_device, pid, callback, args=[], include_frames=False): """Send a RDM Get message, packing the arguments into a message. Args: universe: The universe to send the request on. uid: The UID to address the request to. sub_device: The Sub Device to send the request to. pid: A PID object that describes the format of the request. callback: The callback to run when the request completes. args: The args to pack into the param data section. include_frames: True if the response should include the raw frame data. Return: True if sent ok, False otherwise. """ if self._strict_checks and uid.IsBroadcast(): print("Can't send GET to broadcast address %s" % uid, file=sys.stderr) return False return self._SendRequest(universe, uid, sub_device, pid, callback, args, PidStore.RDM_GET, include_frames) def RawGet(self, universe, uid, sub_device, pid, callback, data, include_frames=False): """Send a RDM Get message with the raw data supplied. Args: universe: The universe to send the request on. uid: The UID to address the request to. sub_device: The Sub Device to send the request to. pid: A PID object that describes the format of the request. callback: The callback to run when the request completes. data: The param data include_frames: True if the response should include the raw frame data. Return: True if sent ok, False otherwise. """ if self._strict_checks and uid.IsBroadcast(): print("Can't send GET to broadcast address %s" % uid, file=sys.stderr) return False return self._SendRawRequest(universe, uid, sub_device, pid, callback, data, PidStore.RDM_GET, include_frames) def Set(self, universe, uid, sub_device, pid, callback, args=[], include_frames=False): """Send a RDM Set message. Args: universe: The universe to send the request on. uid: The UID to address the request to. sub_device: The Sub Device to send the request to. pid: A PID object that describes the format of the request. callback: The callback to run when the request completes. args: The args to pack into the param data section. include_frames: True if the response should include the raw frame data. Return: True if sent ok, False otherwise. """ return self._SendRequest(universe, uid, sub_device, pid, callback, args, PidStore.RDM_SET, include_frames) def RawSet(self, universe, uid, sub_device, pid, callback, args=[], include_frames=False): """Send a RDM Set message with the raw data supplied. Args: universe: The universe to send the request on. uid: The UID to address the request to. sub_device: The Sub Device to send the request to. pid: A PID object that describes the format of the request. callback: The callback to run when the request completes. data: The param data include_frames: True if the response should include the raw frame data. Return: True if sent ok, False otherwise. """ return self._SendRawRequest(universe, uid, sub_device, pid, callback, args, PidStore.RDM_SET, include_frames) def _SendRequest(self, universe, uid, sub_device, pid, callback, args, request_type, include_frames): """Send a RDM Request. Args: universe: The universe to send the request on. uid: The UID to address the request to. sub_device: The Sub Device to send the request to. pid: A PID object that describes the format of the request. callback: The callback to run when the request completes. args: The args to pack into the param data section. request_type: PidStore.RDM_GET or PidStore.RDM_SET or PidStore.RDM_DISCOVERY include_frames: True if the response should include the raw frame data. Return: True if sent ok, False otherwise. """ data = pid.Pack(args, request_type) if data is None: print('Could not pack data', file=sys.stderr) return False return self._SendRawRequest(universe, uid, sub_device, pid, callback, data, request_type, include_frames) def _SendRawRequest(self, universe, uid, sub_device, pid, callback, data, request_type, include_frames): """Send a RDM Request. Args: universe: The universe to send the request on. uid: The UID to address the request to. sub_device: The Sub Device to send the request to. pid: A PID object that describes the format of the request. callback: The callback to run when the request completes. data: The param data. request_type: PidStore.RDM_GET or PidStore.RDM_SET include_frames: True if the response should include the raw frame data. Return: True if sent ok, False otherwise. """ if self._strict_checks: request_params = { 'uid': uid, 'sub_device': sub_device, } if not pid.ValidateAddressing(request_params, request_type): return False if request_type == PidStore.RDM_SET: method = self._client.RDMSet elif request_type == PidStore.RDM_DISCOVERY: method = self._client.SendRawRDMDiscovery else: method = self._client.RDMGet return method( universe, uid, sub_device, pid.value, lambda response: self._GenericHandler(callback, uid, response), data, include_frames) def _GenericHandler(self, callback, uid, response): """ Args: callback: the function to run uid: The uid the request was for response: A RDMResponse object """ obj = None unpack_exception = None if response.WasAcked(): request_type = self.COMMAND_CLASS_DICT[response.command_class] pid_descriptor = self._pid_store.GetPid(response.pid, uid.manufacturer_id) if pid_descriptor: try: obj = pid_descriptor.Unpack(response.data, request_type) except PidStore.UnpackException as e: obj = None unpack_exception = e else: obj = response.data callback(response, obj, unpack_exception) ola-0.10.9/python/ola/DMXConstants.py0000664000175000017500000000165214376533110014301 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # DMXConstants.py # Copyright (C) 2014 Sean Sill """Constants for E1.11 DMX512A (DMX). """ __author__ = 'sms3h2@gmail.com (Sean Sill)' DMX_UNIVERSE_SIZE = 512 DMX_MIN_SLOT_VALUE = 0 DMX_MAX_SLOT_VALUE = 255 ola-0.10.9/python/ola/OlaClient.py0000664000175000017500000013245214376533110013631 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # OlaClient.py # Copyright (C) 2005 Simon Newton import array import socket import struct import sys from ola.rpc.SimpleRpcController import SimpleRpcController from ola.rpc.StreamRpcChannel import StreamRpcChannel from ola.UID import UID from ola import Ola_pb2 """The client used to communicate with the Ola Server.""" __author__ = 'nomis52@gmail.com (Simon Newton)' """The port that the OLA server listens on.""" OLA_PORT = 9010 class Error(Exception): """The base error class.""" class OLADNotRunningException(Error): """Thrown if we try to connect and olad isn't running.""" class Plugin(object): """Represents a plugin. Attributes: id: the id of this plugin name: the name of this plugin active: whether this plugin is active enabled: whether this plugin is enabled """ def __init__(self, plugin_id, name, active, enabled): self._id = plugin_id self._name = name self._active = active self._enabled = enabled @property def id(self): return self._id @property def name(self): return self._name @property def active(self): return self._active @property def enabled(self): return self._enabled @staticmethod def FromProtobuf(plugin_pb): return Plugin(plugin_pb.plugin_id, plugin_pb.name, plugin_pb.active, plugin_pb.enabled) def __repr__(self): s = 'Plugin(id={id}, name="{name}", active={active}, enabled={enabled})' return s.format(id=self.id, name=self.name, active=self.active, enabled=self.enabled) def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.id == other.id def __lt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self.id < other.id # These 4 can be replaced with functools:total_ordering when 2.6 is dropped def __le__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self < other or self == other def __gt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self <= other def __ge__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self < other def __ne__(self, other): return not self == other def __hash__(self): return hash(self._id) # Populate the Plugin class attributes from the protobuf for value in Ola_pb2._PLUGINIDS.values: setattr(Plugin, value.name, value.number) class Device(object): """Represents a device. Attributes: id: the unique id of this device alias: the integer alias for this device name: the name of this device plugin_id: the plugin that this device belongs to input_ports: a list of Input Port objects output_ports: a list of Output Port objects """ def __init__(self, device_id, alias, name, plugin_id, input_ports, output_ports): self._id = device_id self._alias = alias self._name = name self._plugin_id = plugin_id self._input_ports = sorted(input_ports) self._output_ports = sorted(output_ports) @property def id(self): return self._id @property def alias(self): return self._alias @property def name(self): return self._name @property def plugin_id(self): return self._plugin_id @property def input_ports(self): return self._input_ports @property def output_ports(self): return self._output_ports @staticmethod def FromProtobuf(device_pb): input_ports = [Port.FromProtobuf(x) for x in device_pb.input_port] output_ports = [Port.FromProtobuf(x) for x in device_pb.output_port] return Device(device_pb.device_id, device_pb.device_alias, device_pb.device_name, device_pb.plugin_id, input_ports, output_ports) def __repr__(self): s = 'Device(id="{id}", alias={alias}, name="{name}", ' \ 'plugin_id={plugin_id}, {nr_inputs} inputs, {nr_outputs} outputs)' return s.format(id=self.id, alias=self.alias, name=self.name, plugin_id=self.plugin_id, nr_inputs=len(self.input_ports), nr_outputs=len(self.output_ports)) def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.alias == other.alias def __lt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self.alias < other.alias # These 4 can be replaced with functools:total_ordering when 2.6 is dropped def __le__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self < other or self == other def __gt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self <= other def __ge__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self < other def __ne__(self, other): return not self == other class Port(object): """Represents a port. Attributes: id: the unique id of this port universe: the universe that this port belongs to active: True if this port is active description: the description of the port supports_rdm: if the port supports RDM """ def __init__(self, port_id, universe, active, description, supports_rdm): self._id = port_id self._universe = universe self._active = active self._description = description self._supports_rdm = supports_rdm @property def id(self): return self._id @property def universe(self): return self._universe @property def active(self): return self._active @property def description(self): return self._description @property def supports_rdm(self): return self._supports_rdm @staticmethod def FromProtobuf(port_pb): universe = port_pb.universe if port_pb.HasField('universe') else None return Port(port_pb.port_id, universe, port_pb.active, port_pb.description, port_pb.supports_rdm) def __repr__(self): s = 'Port(id={id}, universe={universe}, active={active}, ' \ 'description="{desc}", supports_rdm={supports_rdm})' return s.format(id=self.id, universe=self.universe, active=self.active, desc=self.description, supports_rdm=self.supports_rdm) def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.id == other.id def __lt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self.id < other.id # These 4 can be replaced with functools:total_ordering when 2.6 is dropped def __le__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self < other or self == other def __gt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self <= other def __ge__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self < other def __ne__(self, other): return not self == other def __hash__(self): return hash(self._id) class Universe(object): """Represents a universe. Attributes: id: the integer universe id name: the name of this universe merge_mode: the merge mode this universe is using """ LTP = Ola_pb2.LTP HTP = Ola_pb2.HTP def __init__(self, universe_id, name, merge_mode, input_ports, output_ports): self._id = universe_id self._name = name self._merge_mode = merge_mode self._input_ports = sorted(input_ports) self._output_ports = sorted(output_ports) @property def id(self): return self._id @property def name(self): return self._name @property def merge_mode(self): return self._merge_mode @property def input_ports(self): return self._input_ports @property def output_ports(self): return self._output_ports @staticmethod def FromProtobuf(universe_pb): input_ports = [Port.FromProtobuf(x) for x in universe_pb.input_ports] output_ports = [Port.FromProtobuf(x) for x in universe_pb.output_ports] return Universe(universe_pb.universe, universe_pb.name, universe_pb.merge_mode, input_ports, output_ports) def __repr__(self): merge_mode = 'LTP' if self.merge_mode == Universe.LTP else 'HTP' s = 'Universe(id={id}, name="{name}", merge_mode={merge_mode})' return s.format(id=self.id, name=self.name, merge_mode=merge_mode) def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.id == other.id def __lt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self.id < other.id # These 4 can be replaced with functools:total_ordering when 2.6 is dropped def __le__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self < other or self == other def __gt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self <= other def __ge__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self < other def __ne__(self, other): return not self == other class RequestStatus(object): """Represents the status of an request. Attributes: state: the state of the operation message: an error message if it failed """ SUCCESS, FAILED, CANCELLED = range(3) def __init__(self, controller): if controller.Failed(): self._state = self.FAILED self._message = controller.ErrorText() elif controller.IsCanceled(): self._state = self.CANCELLED self._message = controller.ErrorText() else: self._state = self.SUCCESS self._message = None def Succeeded(self): """Returns true if this request succeeded.""" return self._state == self.SUCCESS @property def state(self): return self._state @property def message(self): return self._message class RDMNack(object): """Nack response to a request. Individual NACK response reasons can be access as attrs, e.g. RMDNack.NR_FORMAT_ERROR """ NACK_SYMBOLS_TO_VALUES = { 'NR_UNKNOWN_PID': (0, 'Unknown PID'), 'NR_FORMAT_ERROR': (1, 'Format Error'), 'NR_HARDWARE_FAULT': (2, 'Hardware fault'), 'NR_PROXY_REJECT': (3, 'Proxy reject'), 'NR_WRITE_PROTECT': (4, 'Write protect'), 'NR_UNSUPPORTED_COMMAND_CLASS': (5, 'Unsupported command class'), 'NR_DATA_OUT_OF_RANGE': (6, 'Data out of range'), 'NR_BUFFER_FULL': (7, 'Buffer full'), 'NR_PACKET_SIZE_UNSUPPORTED': (8, 'Packet size unsupported'), 'NR_SUB_DEVICE_OUT_OF_RANGE': (9, 'Sub device out of range'), 'NR_PROXY_BUFFER_FULL': (10, 'Proxy buffer full'), 'NR_ACTION_NOT_SUPPORTED': (11, 'Action not supported'), 'NR_ENDPOINT_NUMBER_INVALID': (12, 'Endpoint number invalid'), 'NR_INVALID_ENDPOINT_MODE': (13, 'Invalid endpoint mode'), 'NR_UNKNOWN_UID': (14, 'Unknown UID'), 'NR_UNKNOWN_SCOPE': (15, 'Unknown scope'), 'NR_INVALID_STATIC_CONFIG_TYPE': (16, 'Invalid static config type'), 'NR_INVALID_IPV4_ADDRESS': (17, 'Invalid IPv4 address'), 'NR_INVALID_IPV6_ADDRESS': (18, 'Invalid IPv6 address'), 'NR_INVALID_PORT': (19, 'Invalid port'), } # this is populated below _CODE_TO_OBJECT = {} def __init__(self, nack_value, description): self._value = nack_value self._description = description @property def value(self): return self._value @property def description(self): return self._description def __repr__(self): s = 'RDMNack(value={value}, desc="{desc}")' return s.format(value=self.value, desc=self.description) def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.value == other.value def __lt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self.value < other.value # These 4 can be replaced with functools:total_ordering when 2.6 is dropped def __le__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self < other or self == other def __gt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self <= other def __ge__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self < other def __ne__(self, other): return not self == other def __hash__(self): return hash(self._value) @classmethod def LookupCode(cls, code): obj = cls._CODE_TO_OBJECT.get(code, None) if not obj: obj = RDMNack(code, 'Unknown') return obj for symbol, (value, description) in RDMNack.NACK_SYMBOLS_TO_VALUES.items(): nack = RDMNack(value, description) setattr(RDMNack, symbol, nack) RDMNack._CODE_TO_OBJECT[value] = nack class RDMFrame(object): """The raw data in an RDM frame. The timing attributes may be 0 if the plugin does not provide timing information. All timing data is in nano-seconds. Attributes: data: The raw byte data. response_delay: The time between the request and the response. break_time: The break duration. mark_time: The mark duration. data_time: The data time. """ def __init__(self, frame): self._data = frame.raw_response self._response_delay = frame.timing.response_delay self._break_time = frame.timing.break_time self._mark_time = frame.timing.mark_time self._data_time = frame.timing.data_time @property def data(self): return self._data @property def response_delay(self): return self._response_delay @property def break_time(self): return self._break_time @property def mark_time(self): return self._mark_time @property def data_time(self): return self._data_time class RDMResponse(object): """Represents a RDM Response. Failures can occur at many layers, the recommended way for dealing with responses is: Check .status.Succeeded(), if not true this indicates a rpc or server error. Check .response_code, if not RDM_COMPLETED_OK, it indicates a problem with the RDM transport layer or malformed response. If .response_code is RDM_COMPLETED_OK, .sub_device, .command_class, .pid, .queued_messages hold the properties of the response. Then check .response_type: if .response_type is ACK: .data holds the param data of the response. If .response_type is ACK_TIMER: .ack_timer: holds the number of ms before the response should be available. If .response_type is NACK_REASON: .nack_reason holds the reason for nack'ing Attributes: status: The RequestStatus object for this request / response response_code: The response code for the RDM request response_type: The response type (ACK, ACK_TIMER, NACK_REASON) for the request. sub_device: The sub device that sent the response command_class: pid: data: queued_messages: The number of queued messages the remain. nack_reason: If the response type was NACK_REASON, this is the reason for the NACK. ack_timer: If the response type was ACK_TIMER, this is the number of ms to wait before checking for queued messages. transaction_number: frames: A list of RDM frames that made up this response. """ RESPONSE_CODES_TO_STRING = { Ola_pb2.RDM_COMPLETED_OK: 'Ok', Ola_pb2.RDM_WAS_BROADCAST: 'Request was broadcast', Ola_pb2.RDM_FAILED_TO_SEND: 'Failed to send request', Ola_pb2.RDM_TIMEOUT: 'Response Timeout', Ola_pb2.RDM_INVALID_RESPONSE: 'Invalid Response', Ola_pb2.RDM_UNKNOWN_UID: 'Unknown UID', Ola_pb2.RDM_CHECKSUM_INCORRECT: 'Incorrect Checksum', Ola_pb2.RDM_TRANSACTION_MISMATCH: 'Transaction number mismatch', Ola_pb2.RDM_SUB_DEVICE_MISMATCH: 'Sub device mismatch', Ola_pb2.RDM_SRC_UID_MISMATCH: 'Source UID in response doesn\'t match', Ola_pb2.RDM_DEST_UID_MISMATCH: ( 'Destination UID in response doesn\'t match'), Ola_pb2.RDM_WRONG_SUB_START_CODE: 'Incorrect sub start code', Ola_pb2.RDM_PACKET_TOO_SHORT: ( 'RDM response was smaller than the minimum size'), Ola_pb2.RDM_PACKET_LENGTH_MISMATCH: ( 'The length field of packet didn\'t match length received'), Ola_pb2.RDM_PARAM_LENGTH_MISMATCH: ( 'The parameter length exceeds the remaining packet size'), Ola_pb2.RDM_INVALID_COMMAND_CLASS: ( 'The command class was not one of GET_RESPONSE or SET_RESPONSE'), Ola_pb2.RDM_COMMAND_CLASS_MISMATCH: ( 'The command class didn\'t match the request'), Ola_pb2.RDM_INVALID_RESPONSE_TYPE: ( 'The response type was not ACK, ACK_OVERFLOW, ACK_TIMER or NACK'), Ola_pb2.RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED: ( 'The DISCOVERY Command Class is not supported by this controller'), Ola_pb2.RDM_DUB_RESPONSE: ( 'Discovery Unique Branch response') } def __init__(self, controller, response): """ Create a new RDMResponse object. Args: controller: The RpcController response: A RDMResponse proto message. """ self._frames = [] self.status = RequestStatus(controller) if self.status.Succeeded() and response is not None: self._response_code = response.response_code self._response_type = response.response_type self._queued_messages = response.message_count self._transaction_number = response.transaction_number self.sub_device = response.sub_device self.command_class = response.command_class self.pid = response.param_id self.data = response.data for frame in response.raw_frame: self._frames.append(RDMFrame(frame)) # we populate these below if required self._nack_reason = None self._ack_timer = None if (self.status.Succeeded() and self._response_code == Ola_pb2.RDM_COMPLETED_OK): # check for ack timer or nack if self._response_type == Ola_pb2.RDM_NACK_REASON: nack_value = self._get_short_from_data(response.data) if nack_value is None: self._response_code = Ola_pb2.RDM_INVALID_RESPONSE else: self._nack_reason = RDMNack.LookupCode(nack_value) elif self._response_type == Ola_pb2.RDM_ACK_TIMER: self._ack_timer = self._get_short_from_data(response.data) if self._ack_timer is None: self._response_code = Ola_pb2.RDM_INVALID_RESPONSE @property def response_code(self): return self._response_code def ResponseCodeAsString(self): return self.RESPONSE_CODES_TO_STRING.get(self._response_code, 'Unknown') @property def response_type(self): return self._response_type @property def queued_messages(self): return self._queued_messages @property def nack_reason(self): return self._nack_reason @property def transaction_number(self): return self._transaction_number @property def frames(self): return self._frames @property def raw_response(self): """The list of byte strings in the response packets.""" data = [] for frame in self._frames: data.append(frame.data) return data def WasAcked(self): """Returns true if this RDM request returned a ACK response.""" return (self.status.Succeeded() and self.response_code == OlaClient.RDM_COMPLETED_OK and self.response_type == OlaClient.RDM_ACK) @property def ack_timer(self): return 100 * self._ack_timer def __repr__(self): if self.response_code != Ola_pb2.RDM_COMPLETED_OK: s = 'RDMResponse(error="{error}")' return s.format(error=self.ResponseCodeAsString()) if self.response_type == OlaClient.RDM_ACK: s = 'RDMResponse(type=ACK, command_class={cmd})' return s.format(cmd=self._command_class()) elif self.response_type == OlaClient.RDM_ACK_TIMER: s = 'RDMResponse(type=ACK_TIMER, ack_timer={timer} ms, ' \ 'command_class={cmd})' return s.format(timer=self.ack_timer, cmd=self._command_class()) elif self.response_type == OlaClient.RDM_NACK_REASON: s = 'RDMResponse(type=NACK, reason="{reason}")' return s.format(reason=self.nack_reason.description) else: s = 'RDMResponse(type="Unknown")' return s def _get_short_from_data(self, data): """Try to unpack the binary data into a short. Args: data: the binary data Returns: value: None if the unpacking failed """ try: return struct.unpack('!h', data)[0] except struct.error: return None def _command_class(self): if self.command_class == OlaClient.RDM_GET_RESPONSE: return 'GET' elif self.command_class == OlaClient.RDM_SET_RESPONSE: return 'SET' elif self.command_class == OlaClient.RDM_DISCOVERY_RESPONSE: return 'DISCOVERY' else: return "UNKNOWN_CC" class OlaClient(Ola_pb2.OlaClientService): """The client used to communicate with olad.""" def __init__(self, our_socket=None, close_callback=None): """Create a new client. Args: socket: the socket to use for communications, if not provided one is created. close_callback: A callable to run if the socket is closed """ self._close_callback = close_callback self._socket = our_socket if self._socket is None: self._socket = socket.socket() try: self._socket.connect(('localhost', OLA_PORT)) except socket.error: raise OLADNotRunningException('Failed to connect to olad') self._channel = StreamRpcChannel(self._socket, self, self._SocketClosed) self._stub = Ola_pb2.OlaServerService_Stub(self._channel) self._universe_callbacks = {} def __del__(self): self._SocketClosed() def GetSocket(self): """Returns the socket used to communicate with the server.""" return self._socket def SocketReady(self): """Called when the socket has new data.""" self._channel.SocketReady() def _SocketClosed(self): """Called by the RPCChannel if the socket is closed.""" try: self._socket.shutdown(socket.SHUT_RDWR) except socket.error: pass self._socket.close() self._socket = None if self._close_callback: self._close_callback() def FetchPlugins(self, callback): """Fetch the list of plugins. Args: callback: the function to call once complete, takes two arguments, a RequestStatus object and a list of Plugin objects Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.PluginListRequest() try: self._stub.GetPlugins( controller, request, lambda x, y: self._GetPluginsComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def PluginDescription(self, callback, plugin_id): """Fetch the description of a plugin. Args: callback: the function to call once complete, takes two arguments, a RequestStatus object and the plugin description text. plugin_id: the id of the plugin Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.PluginDescriptionRequest() request.plugin_id = plugin_id try: self._stub.GetPluginDescription( controller, request, lambda x, y: self._PluginDescriptionComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def FetchDevices(self, callback, plugin_filter=Plugin.OLA_PLUGIN_ALL): """Fetch a list of devices from the server. Args: callback: The function to call once complete, takes two arguments, a RequestStatus object and a list of Device objects. filter: a plugin id to filter by Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.DeviceInfoRequest() request.plugin_id = plugin_filter try: self._stub.GetDeviceInfo( controller, request, lambda x, y: self._DeviceInfoComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def FetchUniverses(self, callback): """Fetch a list of universes from the server Args: callback: The function to call once complete, takes two arguments, a RequestStatus object and a list of Universe objects. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.OptionalUniverseRequest() try: self._stub.GetUniverseInfo( controller, request, lambda x, y: self._UniverseInfoComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def FetchDmx(self, universe, callback): """Fetch DMX data from the server Args: universe: the universe to fetch the data for callback: The function to call once complete, takes three arguments, a RequestStatus object, a universe number and a list of dmx data. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.UniverseRequest() request.universe = universe try: self._stub.GetDmx(controller, request, lambda x, y: self._GetDmxComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def SendDmx(self, universe, data, callback=None): """Send DMX data to the server Args: universe: the universe to send the data for data: An array object with the DMX data callback: The function to call once complete, takes one argument, a RequestStatus object. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.DmxData() request.universe = universe if sys.version_info >= (3, 2): request.data = data.tobytes() else: request.data = data.tostring() try: self._stub.UpdateDmxData( controller, request, lambda x, y: self._AckMessageComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def SetUniverseName(self, universe, name, callback=None): """Set the name of a universe. Args: universe: the universe to set the name of name: the new name for the universe callback: The function to call once complete, takes one argument, a RequestStatus object. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.UniverseNameRequest() request.universe = universe request.name = name try: self._stub.SetUniverseName( controller, request, lambda x, y: self._AckMessageComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def SetUniverseMergeMode(self, universe, merge_mode, callback=None): """Set the merge mode of a universe. Args: universe: the universe to set the merge mode of merge_mode: either Universe.HTP or Universe.LTP callback: The function to call once complete, takes one argument, a RequestStatus object. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.MergeModeRequest() request.universe = universe request.merge_mode = merge_mode try: self._stub.SetMergeMode( controller, request, lambda x, y: self._AckMessageComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def RegisterUniverse(self, universe, action, data_callback=None, callback=None): """Register to receive dmx updates for a universe. Args: universe: the universe to register to action: OlaClient.REGISTER or OlaClient.UNREGISTER data_callback: the function to be called when there is new data, passed a single argument of type array. callback: The function to call once complete, takes one argument, a RequestStatus object. Returns: True if the request was sent, False otherwise. """ if data_callback is None and action == self.REGISTER: raise TypeError("data_callback is None and action is REGISTER") if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.RegisterDmxRequest() request.universe = universe request.action = action try: self._stub.RegisterForDmx( controller, request, lambda x, y: self._AckMessageComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() if action == self.REGISTER: self._universe_callbacks[universe] = data_callback elif universe in self._universe_callbacks: del self._universe_callbacks[universe] return True def PatchPort(self, device_alias, port, is_output, action, universe, callback=None): """Patch a port to a universe. Args: device_alias: the alias of the device of which to patch a port port: the id of the port is_output: select the input or output port action: OlaClient.PATCH or OlaClient.UNPATCH universe: the universe to set the name of callback: The function to call once complete, takes one argument, a RequestStatus object. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.PatchPortRequest() request.device_alias = device_alias request.port_id = port request.action = action request.is_output = is_output request.universe = universe try: self._stub.PatchPort( controller, request, lambda x, y: self._AckMessageComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def ConfigureDevice(self, device_alias, request_data, callback): """Send a device config request. Args: device_alias: the alias of the device to configure request_data: the request to send to the device callback: The function to call once complete, takes two arguments, a RequestStatus object and a response. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.DeviceConfigRequest() request.device_alias = device_alias request.data = request_data try: self._stub.ConfigureDevice( controller, request, lambda x, y: self._ConfigureDeviceComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def SendTimeCode(self, time_code_type, hours, minutes, seconds, frames, callback=None): """Send Time Code Data. Args: time_code_type: One of OlaClient.TIMECODE_FILM, OlaClient.TIMECODE_EBU, OlaClient.TIMECODE_DF or OlaClient.TIMECODE_SMPTE hours: the hours minutes: the minutes seconds: the seconds frames: the frame count callback: The function to call once complete, takes one argument, a RequestStatus object. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.TimeCode() request.type = time_code_type request.hours = hours request.minutes = minutes request.seconds = seconds request.frames = frames try: self._stub.SendTimeCode( controller, request, lambda x, y: self._AckMessageComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def UpdateDmxData(self, controller, request, callback): """Called when we receive new DMX data. Args: controller: An RpcController object request: A DmxData message callback: The callback to run once complete Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False if request.universe in self._universe_callbacks: data = array.array('B', request.data) self._universe_callbacks[request.universe](data) response = Ola_pb2.Ack() callback(response) return True def FetchUIDList(self, universe, callback): """Used to get a list of UIDs for a particular universe. Args: universe: The universe to get the UID list for. callback: The function to call once complete, takes two arguments, a RequestStatus object and a iterable of UIDs. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.UniverseRequest() request.universe = universe try: self._stub.GetUIDs(controller, request, lambda x, y: self._FetchUIDsComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def RunRDMDiscovery(self, universe, full, callback): """Triggers RDM discovery for a universe. Args: universe: The universe to run discovery for. full: true to use full discovery, false for incremental (if supported) callback: The function to call once complete, takes one argument, a RequestStatus object. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.DiscoveryRequest() request.universe = universe request.full = full try: self._stub.ForceDiscovery( controller, request, lambda x, y: self._FetchUIDsComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def RDMGet(self, universe, uid, sub_device, param_id, callback, data=b'', include_frames=False): """Send an RDM get command. Args: universe: The universe to get the UID list for. uid: A UID object sub_device: The sub device index param_id: the param ID callback: The function to call once complete, takes a RDMResponse object data: the data to send include_frames: True if the response should include the raw frame data. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False return self._RDMMessage(universe, uid, sub_device, param_id, callback, data, include_frames) def RDMSet(self, universe, uid, sub_device, param_id, callback, data=b'', include_frames=False): """Send an RDM set command. Args: universe: The universe to get the UID list for. uid: A UID object sub_device: The sub device index param_id: the param ID callback: The function to call once complete, takes a RDMResponse object data: the data to send include_frames: True if the response should include the raw frame data. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False return self._RDMMessage(universe, uid, sub_device, param_id, callback, data, include_frames, set=True) def SendRawRDMDiscovery(self, universe, uid, sub_device, param_id, callback, data=b'', include_frames=False): """Send an RDM Discovery command. Unless you're writing RDM tests you shouldn't need to use this. Args: universe: The universe to get the UID list for. uid: A UID object sub_device: The sub device index param_id: the param ID callback: The function to call once complete, takes a RDMResponse object data: the data to send include_frames: True if the response should include the raw frame data. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.RDMDiscoveryRequest() request.universe = universe request.uid.esta_id = uid.manufacturer_id request.uid.device_id = uid.device_id request.sub_device = sub_device request.param_id = param_id request.data = data request.include_raw_response = True request.include_raw_response = include_frames try: self._stub.RDMDiscoveryCommand( controller, request, lambda x, y: self._RDMCommandComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def GetCandidatePorts(self, callback, universe=None): """Send a GetCandidatePorts request. The result is similar to FetchDevices (GetDeviceInfo), except that returned devices will only contain ports available for patching to the given universe. If universe is None, then the devices will list their ports available for patching to a potential new universe. Args: callback: The function to call once complete, takes a RequestStatus object and a list of Device objects. universe: The universe to get the candidate ports for. If unspecified, return the candidate ports for a new universe. Returns: True if the request was sent, False otherwise. """ if self._socket is None: return False controller = SimpleRpcController() request = Ola_pb2.OptionalUniverseRequest() if universe is not None: request.universe = universe try: # GetCandidatePorts works very much like GetDeviceInfo, so we can re-use # its complete method. self._stub.GetCandidatePorts( controller, request, lambda x, y: self._DeviceInfoComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def _RDMMessage(self, universe, uid, sub_device, param_id, callback, data, include_frames, set=False): controller = SimpleRpcController() request = Ola_pb2.RDMRequest() request.universe = universe request.uid.esta_id = uid.manufacturer_id request.uid.device_id = uid.device_id request.sub_device = sub_device request.param_id = param_id request.data = data request.is_set = set request.include_raw_response = include_frames try: self._stub.RDMCommand( controller, request, lambda x, y: self._RDMCommandComplete(callback, x, y)) except socket.error: raise OLADNotRunningException() return True def _GetPluginsComplete(self, callback, controller, response): """Called when the list of plugins is returned. Args: callback: the callback to run controller: an RpcController response: a PluginInfoReply message. """ if not callback: return status = RequestStatus(controller) plugins = None if status.Succeeded(): plugins = sorted([Plugin.FromProtobuf(p) for p in response.plugin]) callback(status, plugins) def _PluginDescriptionComplete(self, callback, controller, response): """Called when the plugin description is returned. Args: callback: the callback to run controller: an RpcController response: a PluginInfoReply message. """ if not callback: return status = RequestStatus(controller) description = None if status.Succeeded(): description = response.description callback(status, description) def _DeviceInfoComplete(self, callback, controller, response): """Called when the Device info request returns. Args: callback: the callback to run controller: an RpcController response: a DeviceInfoReply message. """ if not callback: return status = RequestStatus(controller) devices = None if status.Succeeded(): devices = [] for device in response.device: input_ports = [] output_ports = [] for port in device.input_port: input_ports.append(Port.FromProtobuf(port)) for port in device.output_port: output_ports.append(Port.FromProtobuf(port)) devices.append(Device(device.device_id, device.device_alias, device.device_name, device.plugin_id, input_ports, output_ports)) callback(status, devices) def _UniverseInfoComplete(self, callback, controller, response): """Called when the Universe info request returns. Args: callback: the callback to run controller: an RpcController response: a UniverseInfoReply message. """ if not callback: return status = RequestStatus(controller) universes = None if status.Succeeded(): universes = [Universe.FromProtobuf(u) for u in response.universe] callback(status, universes) def _GetDmxComplete(self, callback, controller, response): """Called when the Universe info request returns. Args: callback: the callback to run controller: an RpcController response: a UniverseInfoReply message. """ if not callback: return status = RequestStatus(controller) data = None universe = None if status.Succeeded(): data = array.array('B', response.data) universe = response.universe callback(status, universe, data) def _AckMessageComplete(self, callback, controller, response): """Called when an rpc that returns an Ack completes. Args: callback: the callback to run controller: an RpcController response: an Ack message. """ if not callback: return status = RequestStatus(controller) callback(status) def _ConfigureDeviceComplete(self, callback, controller, response): """Called when a ConfigureDevice request completes. Args: callback: the callback to run controller: an RpcController response: an DeviceConfigReply message. """ if not callback: return status = RequestStatus(controller) data = None if status.Succeeded(): data = response.data callback(status, data) def _FetchUIDsComplete(self, callback, controller, response): """Called when a FetchUIDList request completes. Args: callback: the callback to run controller: an RpcController response: an UIDListReply message. """ if not callback: return status = RequestStatus(controller) uids = None if status.Succeeded(): uids = [] for uid in response.uid: uids.append(UID(uid.esta_id, uid.device_id)) uids.sort() callback(status, uids) def _RDMCommandComplete(self, callback, controller, response): """Called when a RDM request completes. Args: callback: the callback to run controller: an RpcController response: an RDMResponse message. """ if not callback: return callback(RDMResponse(controller, response)) # Populate the patch & register actions for value in Ola_pb2._PATCHACTION.values: setattr(OlaClient, value.name, value.number) for value in Ola_pb2._REGISTERACTION.values: setattr(OlaClient, value.name, value.number) # populate time code enums for value in Ola_pb2._TIMECODETYPE.values: setattr(OlaClient, value.name, value.number) # populate the RDM response codes & types for value in Ola_pb2._RDMRESPONSECODE.values: setattr(OlaClient, value.name, value.number) for value in Ola_pb2._RDMRESPONSETYPE.values: setattr(OlaClient, value.name, value.number) for value in Ola_pb2._RDMCOMMANDCLASS.values: setattr(OlaClient, value.name, value.number) ola-0.10.9/python/ola/TestUtils.py0000664000175000017500000000304314376533110013710 00000000000000#!/usr/bin/env python # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # TestUtils.py # Copyright (C) 2020 Bruce Lowekamp import itertools import struct import sys """Common utils for ola python tests""" __author__ = 'bruce@lowekamp.net (Bruce Lowekamp)' def allNotEqual(testCase, t): for pair in itertools.combinations(t, 2): testCase.assertNotEqual(pair[0], pair[1]) def allHashNotEqual(testCase, t): h = map(hash, t) for pair in itertools.combinations(h, 2): testCase.assertNotEqual(pair[0], pair[1]) def handleRPCByteOrder(expected): # The RPC header (version and size) is encoded in native format, so flip that # part of the expected data where necessary (as our expected is from a # little endian source) if sys.byteorder == 'big': expected = (struct.pack('=L', struct.unpack_from(' None) uid2 = UID(0x707a, 0x12345679) self.assertTrue(uid2 > uid) uid3 = UID(0x7079, 0x12345678) self.assertTrue(uid > uid3) uids = [uid, uid2, uid3] self.assertEqual([uid3, uid, uid2], sorted(uids)) vendorcast_uid = UID.VendorcastAddress(0x707a) self.assertTrue(vendorcast_uid.IsBroadcast()) broadcast_uid = UID.AllDevices() self.assertTrue(broadcast_uid.IsBroadcast()) def testFromString(self): self.assertEqual(None, UID.FromString('')) self.assertEqual(None, UID.FromString('abc')) self.assertEqual(None, UID.FromString(':')) self.assertEqual(None, UID.FromString('0:1:2')) self.assertEqual(None, UID.FromString('12345:1234')) uid = UID.FromString('00a0:12345678') self.assertTrue(uid) self.assertEqual(0x00a0, uid.manufacturer_id) self.assertEqual(0x12345678, uid.device_id) self.assertEqual('00a0:12345678', str(uid)) def testSorting(self): u1 = UID(0x4845, 0xfffffffe) u2 = UID(0x4845, 0x0000022e) u3 = UID(0x4844, 0x0000022e) u4 = UID(0x4846, 0x0000022e) uids = sorted([u1, u2, None, u3, u4]) self.assertEqual([None, u3, u2, u1, u4], uids) def testNextAndPrevious(self): u1 = UID(0x4845, 0xfffffffe) u2 = UID.NextUID(u1) self.assertEqual('4845:ffffffff', str(u2)) u3 = UID.NextUID(u2) self.assertEqual('4846:00000000', str(u3)) u4 = UID.PreviousUID(u3) self.assertEqual(u2, u4) u5 = UID.PreviousUID(u4) self.assertEqual(u1, u5) first_uid = UID(0, 0) self.assertRaises(UIDOutOfRangeException, UID.PreviousUID, first_uid) all_uids = UID.AllDevices() self.assertRaises(UIDOutOfRangeException, UID.NextUID, all_uids) def testCmp(self): u2 = UID(0x4845, 0x0000022e) u3 = UID(0x4844, 0x0000022e) u3a = UID(0x4844, 0x0000022e) u4 = UID(0x4844, 0x00000230) self.assertEqual(u3, u3a) self.assertEqual(hash(u3), hash(u3a)) self.assertTrue(u3 <= u3a) self.assertTrue(u3 >= u3a) self.assertTrue(u3 < u2) self.assertTrue(u2 > u3) self.assertTrue(u3 <= u2) self.assertTrue(u2 >= u3) self.assertTrue(u3 != u2) self.assertFalse(u3 > u2) self.assertFalse(u2 < u3) self.assertFalse(u3 >= u2) self.assertFalse(u2 <= u3) self.assertFalse(u3 == u2) self.assertNotEqual(u3, u4) self.assertNotEqual(hash(u3), hash(u4)) self.assertFalse(u3 == u4) self.assertTrue(u3 < u4) self.assertFalse(u4 < u3) self.assertEqual(u2.__lt__("hello"), NotImplemented) self.assertNotEqual(u2, "hello") # None case self.assertFalse(u3 < None) self.assertTrue(u3 > None) self.assertFalse(u3 <= None) self.assertTrue(u3 >= None) self.assertTrue(u3 is not None) self.assertFalse(u3 is None) allNotEqual(self, [u2, u3, u4]) allHashNotEqual(self, [u2, u3, u4]) if __name__ == '__main__': unittest.main() ola-0.10.9/python/ola/PidStoreTest.py0000775000175000017500000003250414376533110014350 00000000000000#!/usr/bin/env python # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # PidStoreTest.py # Copyright (C) 2020 Bruce Lowekamp import binascii import os import unittest import ola.PidStore as PidStore from ola.TestUtils import allHashNotEqual, allNotEqual """Test cases for the PidStore class. Relies on the PID data from RDM tests in the directory passed as TESTDATADIR envvar. Otherwise PID data directory defaults to ../common/rdm/testdata. """ __author__ = 'bruce@lowekamp.net (Bruce Lowekamp)' global path OPEN_LIGHTING_ESTA_CODE = 0x7a70 class PidStoreTest(unittest.TestCase): def testBasic(self): store = PidStore.PidStore() store.Load([os.path.join(path, "test_pids.proto")]) pid = store.GetPid(17) self.assertEqual(pid.name, "PROXIED_DEVICE_COUNT") self.assertEqual(pid.value, 17) self.assertEqual(len(store.Pids()), 70) pid = store.GetName("DEVICE_INFO") self.assertEqual(pid.value, 96) self.assertIsNotNone(pid.GetRequest(PidStore.RDM_GET)) self.assertIsNotNone(pid.GetResponse(PidStore.RDM_GET)) self.assertIsNone(pid.GetRequest(PidStore.RDM_SET)) self.assertIsNone(pid.GetResponse(PidStore.RDM_SET)) expected = ( " " " " " " " ", " protocol_major: <[0, 255]>\n protocol_minor: <[0, 255]>\n " "device_model: <[0, 65535]>\n product_category: <[0, 65535]>\n " "software_version: <[0, 4294967295]>\n dmx_footprint: <[0, 65535]>\n " "current_personality: <[0, 255]>\n personality_count: <[0, 255]>\n " "dmx_start_address: <[0, 65535]>\n sub_device_count: <[0, 65535]>\n " "sensor_count: <[0, 255]>") self.assertEqual(pid.GetResponse(PidStore.RDM_GET).GetDescription(), expected) pid = store.GetName("CAPTURE_PRESET") expected = (" ", " scene: <[1, 65534]>\n" " fade_up_time: <[0.0, 6553.5]>, increment 0.1\n" " fade_down_time: <[0.0, 6553.5]>, increment 0.1\n" " wait_time: <[0.0, 6553.5]>, increment 0.1") self.assertEqual(pid.GetRequest(PidStore.RDM_SET).GetDescription(), expected) self.assertEqual(1, pid._GroupCmp(pid._requests, pid._responses)) def testDirectoryAndSingleton(self): store = PidStore.GetStore(os.path.join(path, "pids")) self.assertIs(store, PidStore.GetStore(os.path.join(path, "pids"))) self.assertEqual(len(store.Pids()), 6) self.assertEqual(len(store.ManufacturerPids(OPEN_LIGHTING_ESTA_CODE)), 1) # in pids1 self.assertIsNotNone(store.GetPid(16)) self.assertIsNotNone(store.GetPid(17)) self.assertIsNotNone(store.GetName("DEVICE_INFO")) self.assertIsNotNone(store.GetName("PROXIED_DEVICES", OPEN_LIGHTING_ESTA_CODE)) self.assertEqual(store.NameToValue("DEVICE_INFO"), 96) # in pids2 self.assertIsNotNone(store.GetPid(80)) self.assertIsNotNone(store.GetName("COMMS_STATUS")) self.assertEqual(store.GetName("PROXIED_DEVICES"), store.GetPid(16, OPEN_LIGHTING_ESTA_CODE)) self.assertIsNotNone(store.GetPid(32768, 161)) # check override file self.assertIsNone(store.GetName("SERIAL_NUMBER", OPEN_LIGHTING_ESTA_CODE)) self.assertIsNone(store.GetName("DEVICE_MODE", OPEN_LIGHTING_ESTA_CODE)) pid = store.GetName("FOO_BAR", OPEN_LIGHTING_ESTA_CODE) self.assertEqual(pid.value, 32768) self.assertEqual(pid, store.GetPid(32768, OPEN_LIGHTING_ESTA_CODE)) self.assertEqual(pid.name, "FOO_BAR") self.assertIsNotNone(pid.GetRequest(PidStore.RDM_GET)) self.assertIsNotNone(pid.GetResponse(PidStore.RDM_GET)) self.assertIsNone(pid.GetRequest(PidStore.RDM_SET)) self.assertIsNone(pid.GetResponse(PidStore.RDM_SET)) self.assertEqual(store.NameToValue("FOO_BAR", OPEN_LIGHTING_ESTA_CODE), 32768) self.assertIsNone(store.NameToValue("FOO_BAR", OPEN_LIGHTING_ESTA_CODE + 1)) self.assertEqual(pid.GetResponse(PidStore.RDM_GET).GetDescription(), ("", " baz: <[0, 4294967295]>")) def testLoadMissing(self): store = PidStore.PidStore() with self.assertRaises(IOError): store.Load([os.path.join(path, "missing_file_pids.proto")]) def testLoadDuplicateManufacturer(self): store = PidStore.PidStore() with self.assertRaises(PidStore.InvalidPidFormat): store.Load([os.path.join(path, "duplicate_manufacturer.proto")]) def testLoadDuplicateValue(self): store = PidStore.PidStore() with self.assertRaises(PidStore.InvalidPidFormat): store.Load([os.path.join(path, "duplicate_pid_value.proto")]) def testLoadDuplicateName(self): store = PidStore.PidStore() with self.assertRaises(PidStore.InvalidPidFormat): store.Load([os.path.join(path, "duplicate_pid_name.proto")]) def testLoadInvalidEstaPid(self): store = PidStore.PidStore() with self.assertRaises(PidStore.InvalidPidFormat): store.Load([os.path.join(path, "invalid_esta_pid.proto")]) def testInconsistentData(self): store = PidStore.PidStore() with self.assertRaises(PidStore.PidStructureException): store.Load([os.path.join(path, "inconsistent_pid.proto")]) def testSort(self): store = PidStore.PidStore() store.Load([os.path.join(path, "test_pids.proto")]) self.assertEqual(len(store.Pids()), 70) pids = [p.value for p in sorted(store.Pids())] self.assertEqual(pids, [16, 17, 21, 32, 48, 49, 50, 51, 80, 81, 96, 112, 128, 129, 130, 144, 160, 176, 192, 193, 194, 224, 225, 240, 288, 289, 290, 512, 513, 514, 1024, 1025, 1026, 1027, 1028, 1029, 1280, 1281, 1536, 1537, 1538, 1539, 4096, 4097, 4112, 4128, 4129, 4144, 4145, 32688, 32689, 32690, 32691, 32692, 32752, 32753, 32754, 32755, 32756, 32757, 32758, 32759, 32760, 32761, 32762, 32763, 32764, 32765, 32766, 32767]) allNotEqual(self, store.Pids()) allHashNotEqual(self, store.Pids()) def testCmp(self): p1 = PidStore.Pid("base", 42) p1a = PidStore.Pid("notbase", 42) g1getreq = PidStore.Group("grg", [PidStore.UInt16("ui16"), PidStore.Int32("i32")]) g1setreq = PidStore.Group("srg", [PidStore.MACAtom("mac"), PidStore.Int8("i32")]) p1b = PidStore.Pid("base", 42, None, None, g1getreq, g1setreq) p2 = PidStore.Pid("base", 43, None, None, g1getreq, g1setreq) p3 = PidStore.Pid("notbase", 43) self.assertEqual(p1, p1a) self.assertEqual(p1, p1b) self.assertEqual(p1a, p1b) self.assertEqual(p2, p3) self.assertNotEqual(p1, p2) self.assertNotEqual(p1a, p2) self.assertNotEqual(p1b, p2) self.assertNotEqual(p1a, p3) self.assertEqual(hash(p1), hash(p1a)) self.assertEqual(hash(p1), hash(p1b)) self.assertEqual(hash(p1a), hash(p1b)) self.assertEqual(hash(p2), hash(p3)) self.assertNotEqual(hash(p1), hash(p2)) self.assertNotEqual(hash(p1a), hash(p2)) self.assertNotEqual(hash(p1b), hash(p2)) self.assertNotEqual(hash(p1a), hash(p3)) def testPackUnpack(self): store = PidStore.PidStore() store.Load([os.path.join(path, "test_pids.proto")]) pid = store.GetName("DMX_PERSONALITY_DESCRIPTION") # Pid.Pack only packs requests and Pid.Unpack only unpacks responses # so test in two halves args = ["42"] blob = pid.Pack(args, PidStore.RDM_GET) self.assertEqual(blob, binascii.unhexlify("2a")) decoded = pid._requests.get(PidStore.RDM_GET).Unpack(blob)[0] self.assertEqual(decoded['personality'], 42) args = ["42", "7", "UnpackTest"] blob = pid._responses.get(PidStore.RDM_GET).Pack(args)[0] self.assertEqual(blob, binascii.unhexlify("2a0007556e7061636b54657374")) decoded = pid.Unpack(blob, PidStore.RDM_GET) self.assertEqual(decoded['personality'], 42) self.assertEqual(decoded['slots_required'], 7) self.assertEqual(decoded['name'], "UnpackTest") # Test null handling, trailing null should be truncated on the way back in args = ["42", "7", "Foo\0"] blob = pid._responses.get(PidStore.RDM_GET).Pack(args)[0] # Not truncated here self.assertEqual(blob, binascii.unhexlify("2a0007466f6f00")) decoded = pid.Unpack(blob, PidStore.RDM_GET) self.assertEqual(decoded['personality'], 42) self.assertEqual(decoded['slots_required'], 7) self.assertEqual(decoded['name'], "Foo") # Confirm we raise an error if we try and unpack a non-ASCII, non-UTF-8 # containing packet (0xc0) with self.assertRaises(PidStore.UnpackException): blob = binascii.unhexlify("2a0007556e7061636bc054657374") decoded = pid.Unpack(blob, PidStore.RDM_GET) def testPackRanges(self): store = PidStore.PidStore() store.Load([os.path.join(path, "test_pids.proto")]) pid = store.GetName("REAL_TIME_CLOCK") # first check encoding of valid RTC data args = ["2020", "6", "20", "21", "22", "23"] blob = pid.Pack(args, PidStore.RDM_SET) self.assertEqual(blob, binascii.unhexlify("07e40614151617")) decoded = pid._requests.get(PidStore.RDM_SET).Unpack(blob)[0] self.assertEqual(decoded, {'year': 2020, 'month': 6, 'day': 20, 'hour': 21, 'minute': 22, 'second': 23}) # next check that ranges are being enforced properly # invalid year (2002 < 2003) with self.assertRaises(PidStore.ArgsValidationError): args = ["2002", "6", "20", "20", "20", "20"] blob = pid.Pack(args, PidStore.RDM_SET) # invalid month < 1 with self.assertRaises(PidStore.ArgsValidationError): args = ["2020", "0", "20", "20", "20", "20"] blob = pid.Pack(args, PidStore.RDM_SET) # invalid month > 12 with self.assertRaises(PidStore.ArgsValidationError): args = ["2020", "13", "20", "20", "20", "20"] blob = pid.Pack(args, PidStore.RDM_SET) # invalid month > 255 with self.assertRaises(PidStore.ArgsValidationError): args = ["2020", "256", "20", "20", "20", "20"] blob = pid.Pack(args, PidStore.RDM_SET) # invalid negative month with self.assertRaises(PidStore.ArgsValidationError): args = ["2020", "-1", "20", "20", "20", "20"] blob = pid.Pack(args, PidStore.RDM_SET) # tests for string with min=max=2 pid = store.GetName("LANGUAGE_CAPABILITIES") args = ["en"] blob = pid._responses.get(PidStore.RDM_GET).Pack(args)[0] self.assertEqual(blob, binascii.unhexlify("656e")) decoded = pid.Unpack(blob, PidStore.RDM_GET) self.assertEqual(decoded, {'languages': [{'language': 'en'}]}) with self.assertRaises(PidStore.ArgsValidationError): args = ["e"] blob = pid._responses.get(PidStore.RDM_GET).Pack(args)[0] with self.assertRaises(PidStore.ArgsValidationError): args = ["enx"] blob = pid._responses.get(PidStore.RDM_GET).Pack(args)[0] # test packing some non-printable characters args = ["\x0d\x7f"] blob = pid._responses.get(PidStore.RDM_GET).Pack(args)[0] self.assertEqual(blob, binascii.unhexlify("0d7f")) decoded = pid.Unpack(blob, PidStore.RDM_GET) self.assertEqual(decoded, {'languages': [{'language': '\x0d\x7f'}]}) # test packing some non-ascii characters, as the # LATIN CAPITAL LETTER A WITH GRAVE, unicode U+00C0 gets encoded as two # bytes (\xc3\x80) the total length is three bytes and it doesn't fit! with self.assertRaises(PidStore.ArgsValidationError): args = [u"\x0d\xc0"] blob = pid._responses.get(PidStore.RDM_GET).Pack(args)[0] # It works on it's own as it's short enough... args = [u"\u00c0"] blob = pid._responses.get(PidStore.RDM_GET).Pack(args)[0] self.assertEqual(blob, binascii.unhexlify("c380")) decoded = pid.Unpack(blob, PidStore.RDM_GET) # This is the unicode code point for it self.assertEqual(decoded, {'languages': [{'language': u'\u00c0'}]}) # valid empty string pid = store.GetName("STATUS_ID_DESCRIPTION") args = [""] blob = pid._responses.get(PidStore.RDM_GET).Pack(args)[0] self.assertEqual(len(blob), 0) decoded = pid.Unpack(blob, PidStore.RDM_GET) self.assertEqual(decoded['label'], "") # string too long with self.assertRaises(PidStore.ArgsValidationError): args = ["123456789012345678901234567890123"] blob = pid._responses.get(PidStore.RDM_GET).Pack(args)[0] if __name__ == '__main__': path = (os.environ.get('TESTDATADIR', "../common/rdm/testdata")) unittest.main() ola-0.10.9/python/ola/ClientWrapperTest.py0000664000175000017500000002434414376533110015376 00000000000000#!/usr/bin/env python # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # ClientWrapperTest.py # Copyright (C) 2019 Bruce Lowekamp import array import binascii import datetime import socket # import timeout_decorator import unittest from ola.ClientWrapper import ClientWrapper, _Event from ola.TestUtils import handleRPCByteOrder """Test cases for the Event and Event loop of ClientWrapper class.""" __author__ = 'bruce@lowekamp.net (Bruce Lowekamp)' # functions used for event comparison tests def a_func(): pass def b_func(): pass def c_func(): pass class ClientWrapperTest(unittest.TestCase): def testEventCmp(self): a = _Event(0.5, a_func) # b/b2/b3/c have same timing to test comparisons of # callback (b==b2 and b!=b3) b = _Event(1, b_func) b2 = _Event(1, b_func) b2._run_at = b._run_at b3 = _Event(1, a_func) b3._run_at = b._run_at c = _Event(1, c_func) c._run_at = b._run_at self.assertEqual(b, b2) self.assertNotEqual(b, b3) self.assertTrue(a != b) self.assertFalse(b != b2) self.assertTrue(b == b2) self.assertTrue(a < b) self.assertTrue(a <= b) self.assertTrue(b > a) self.assertTrue(b >= a) self.assertFalse(a == b2) self.assertFalse(b < a) self.assertFalse(b <= a) self.assertFalse(a > b) self.assertFalse(a >= b) self.assertTrue(b3 < c) self.assertFalse(c < b3) s = sorted([c, a, b, b3]) self.assertEqual(s, [a, b3, b, c]) s = "teststring" self.assertNotEqual(a, s) self.assertEqual(a.__lt__(s), NotImplemented) self.assertEqual(a.__ne__(s), True) self.assertEqual(a.__eq__(s), False) def testEventHash(self): a = _Event(0.5, None) b = _Event(1, None) b2 = _Event(1, None) b2._run_at = b._run_at b3 = _Event(1, 2) b3._run_at = b._run_at c = _Event(1, 4) c._run_at = b._run_at self.assertEqual(hash(a), hash(a)) self.assertNotEqual(hash(a), hash(b)) self.assertEqual(hash(b), hash(b2)) self.assertNotEqual(hash(b), hash(b3)) self.assertNotEqual(hash(b), hash(c)) # @timeout_decorator.timeout(2) def testBasic(self): sockets = socket.socketpair() wrapper = ClientWrapper(sockets[0]) class results: a_called = False b_called = False def a(): results.a_called = True def b(): results.b_called = True wrapper.Stop() wrapper.AddEvent(0, a) wrapper.AddEvent(0, b) self.assertFalse(results.a_called) wrapper.Run() self.assertTrue(results.a_called) self.assertTrue(results.b_called) sockets[0].close() sockets[1].close() # @timeout_decorator.timeout(2) def testEventLoop(self): sockets = socket.socketpair() wrapper = ClientWrapper(sockets[0]) class results: a_called = None b_called = None c_called = None d_called = None def a(): self.assertIsNone(results.a_called) self.assertIsNone(results.b_called) self.assertIsNone(results.c_called) self.assertIsNone(results.d_called) results.a_called = datetime.datetime.now() def b(): self.assertIsNotNone(results.a_called) self.assertIsNone(results.b_called) self.assertIsNone(results.c_called) self.assertIsNone(results.d_called) results.b_called = datetime.datetime.now() def c(): self.assertIsNotNone(results.a_called) self.assertIsNotNone(results.b_called) self.assertIsNone(results.c_called) self.assertIsNone(results.d_called) results.c_called = datetime.datetime.now() def d(): self.assertIsNotNone(results.a_called) self.assertIsNotNone(results.b_called) self.assertIsNotNone(results.c_called) self.assertIsNone(results.d_called) results.d_called = datetime.datetime.now() wrapper.AddEvent(0, wrapper.Stop) self.start = datetime.datetime.now() wrapper.AddEvent(0, a) wrapper.AddEvent(15, d) wrapper.AddEvent(datetime.timedelta(milliseconds=5), b) wrapper.AddEvent(10, c) # Nothing has been called yet self.assertIsNone(results.a_called) self.assertIsNone(results.b_called) self.assertIsNone(results.c_called) self.assertIsNone(results.d_called) self.start = datetime.datetime.now() wrapper.Run() # Everything has been called self.assertIsNotNone(results.a_called) self.assertIsNotNone(results.b_called) self.assertIsNotNone(results.c_called) self.assertIsNotNone(results.d_called) # Check when the callbacks were called. Allow 500 microseconds of drift. # Called immediately a_diff = results.a_called - self.start self.assertAlmostEqual(a_diff, datetime.timedelta(milliseconds=0), delta=datetime.timedelta(microseconds=750)) # Called in 5 milliseconds b_diff = results.b_called - self.start self.assertAlmostEqual(b_diff, datetime.timedelta(milliseconds=5), delta=datetime.timedelta(microseconds=750)) # Called in 10 milliseconds c_diff = results.c_called - self.start self.assertAlmostEqual(c_diff, datetime.timedelta(milliseconds=10), delta=datetime.timedelta(microseconds=750)) # Called in 15 milliseconds d_diff = results.d_called - self.start self.assertAlmostEqual(d_diff, datetime.timedelta(milliseconds=15), delta=datetime.timedelta(microseconds=750)) sockets[0].close() sockets[1].close() # @timeout_decorator.timeout(2) def testSend(self): """tests that data goes out on the wire with SendDMX""" sockets = socket.socketpair() wrapper = ClientWrapper(sockets[0]) class results: gotdata = False def DataCallback(self): data = sockets[1].recv(4096) expected = handleRPCByteOrder(binascii.unhexlify( "7d000010080110001a0d557064617465446d784461746122680801126400000" "000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000" "000000000000000000000000000000000000000000000000000000000000000" "000000")) self.assertEqual(data, expected, msg="Regression check failed. If protocol change " "was intended set expected to: " + str(binascii.hexlify(data))) results.gotdata = True wrapper.AddEvent(0, wrapper.Stop) wrapper._ss.AddReadDescriptor(sockets[1], lambda: DataCallback(self)) self.assertTrue(wrapper.Client().SendDmx(1, array.array('B', [0] * 100), None)) wrapper.Run() sockets[0].close() sockets[1].close() self.assertTrue(results.gotdata) # @timeout_decorator.timeout(2) def testFetchDmx(self): """uses client to send a FetchDMX with mocked olad. Regression test that confirms sent message is correct and sends fixed response message.""" sockets = socket.socketpair() wrapper = ClientWrapper(sockets[0]) client = wrapper.Client() class results: got_request = False got_response = False def DataCallback(self): # request and response for # ola_fetch_dmx.py -u 0 # enable logging in rpc/StreamRpcChannel.py data = sockets[1].recv(4096) expected = handleRPCByteOrder(binascii.unhexlify( "10000010080110001a06476574446d7822020800")) self.assertEqual(data, expected, msg="Regression check failed. If protocol change " "was intended set expected to: " + str(binascii.hexlify(data))) results.got_request = True response = handleRPCByteOrder(binascii.unhexlify( "0c020010080210002285040800128004" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000000000000000000000000000000000" "00000000000000000000000000000000")) sent_bytes = sockets[1].send(response) self.assertEqual(sent_bytes, len(response)) def ResponseCallback(self, status, universe, data): results.got_response = True self.assertTrue(status.Succeeded()) self.assertEqual(universe, 0) self.assertEqual(len(data), 512) self.assertEqual(data, array.array('B', [0] * 512)) wrapper.AddEvent(0, wrapper.Stop) wrapper._ss.AddReadDescriptor(sockets[1], lambda: DataCallback(self)) client.FetchDmx(0, lambda x, y, z: ResponseCallback(self, x, y, z)) wrapper.Run() sockets[0].close() sockets[1].close() self.assertTrue(results.got_request) self.assertTrue(results.got_response) if __name__ == '__main__': unittest.main() ola-0.10.9/python/ola/PidStore.py0000664000175000017500000011651714376533110013514 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # PidStore.py # Copyright (C) 2010 Simon Newton # Holds all the information about RDM PIDs from __future__ import print_function import binascii import math import os import socket import struct import sys from google.protobuf import text_format from ola.MACAddress import MACAddress from ola.UID import UID from ola import Pids_pb2, PidStoreLocation, RDMConstants """The PID Store.""" __author__ = 'nomis52@gmail.com (Simon Newton)' # magic filenames OVERRIDE_FILE_NAME = "overrides.proto" MANUFACTURER_NAMES_FILE_NAME = "manufacturer_names.proto" # Various sub device enums ROOT_DEVICE = 0 MAX_VALID_SUB_DEVICE = 0x0200 ALL_SUB_DEVICES = 0xffff # The different types of commands classes RDM_GET, RDM_SET, RDM_DISCOVERY = range(3) class Error(Exception): """Base error class.""" class InvalidPidFormat(Error): """Indicates the PID data file was invalid.""" class PidStructureException(Error): """Raised if the PID structure isn't valid.""" class ArgsValidationError(Error): """Raised if the arguments don't match the expected frame format.""" class UnpackException(Error): """Raised if we can't unpack the data correctly.""" class MissingPLASAPIDs(Error): """Raises if the files did not contain the ESTA (PLASA) PIDs.""" class Pid(object): """A class that describes everything about a PID.""" def __init__(self, name, value, discovery_request=None, discovery_response=None, get_request=None, get_response=None, set_request=None, set_response=None, discovery_validators=[], get_validators=[], set_validators=[]): """Create a new PID. Args: name: the human readable name value: the 2 byte PID value discovery_request: A Group object, or None if DISCOVERY isn't supported discovery_response: A Group object, or None if DISCOVERY isn't supported get_request: A Group object, or None if GET isn't supported get_response: set_request: A Group object, or None if SET isn't supported set_response: discovery_validators: get_validators: set_validators: """ self._name = name self._value = value self._requests = { RDM_GET: get_request, RDM_SET: set_request, RDM_DISCOVERY: discovery_request, } self._responses = { RDM_GET: get_response, RDM_SET: set_response, RDM_DISCOVERY: discovery_response, } self._validators = { RDM_GET: get_validators, RDM_SET: set_validators, RDM_DISCOVERY: discovery_validators, } @property def name(self): return self._name @property def value(self): return self._value def RequestSupported(self, command_class): """Check if this PID allows a command class.""" return self._requests.get(command_class) is not None def GetRequest(self, command_class): return self._requests.get(command_class) def GetRequestField(self, command_class, field_name): fields = self.GetRequest(command_class).GetAtoms() fields = [f for f in fields if f.name == field_name] return fields[0] if fields else None def ResponseSupported(self, command_class): """Check if this PID responds to a command class.""" return self._requests.get(command_class) is not None def GetResponse(self, command_class): return self._responses.get(command_class) def GetResponseField(self, command_class, field_name): fields = self.GetResponse(command_class).GetAtoms() fields = [f for f in fields if f.name == field_name] return fields[0] if fields else None def ValidateAddressing(self, args, command_class): """Run the validators.""" validators = self._validators.get(command_class) if validators is None: return False args['pid'] = self for validator in validators: if not validator(args): return False return True def _GroupCmp(self, a, b): def setToDescription(x): def descOrNone(y): d = y.GetDescription() if y is not None else "None" return '::'.join(d) if isinstance(d, tuple) else d return ':'.join([descOrNone(x[f]) for f in [RDM_GET, RDM_SET, RDM_DISCOVERY]]) ax = setToDescription(a) bx = setToDescription(b) return (ax > bx) - (ax < bx) # canonical for cmp(a,b) def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.value == other.value def __lt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self._value < other._value # These 4 can be replaced with functools:total_ordering when 2.6 is dropped def __le__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self < other or self == other def __gt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self <= other def __ge__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self < other def __ne__(self, other): return not self == other def __str__(self): return '%s (0x%04hx)' % (self.name, self.value) def __hash__(self): return hash(self._value) def Pack(self, args, command_class): """Pack args Args: args: A list of arguments of the right types. command_class: RDM_GET or RDM_SET or RDM_DISCOVERY Returns: Binary data which can be used as the Param Data. """ group = self._requests.get(command_class) blob, args_used = group.Pack(args) return blob def Unpack(self, data, command_class): """Unpack a message. Args: data: The raw data command_class: RDM_GET or RDM_SET or RDM_DISCOVERY """ group = self._responses.get(command_class) if group is None: raise UnpackException('Response contained data (hex): %s' % binascii.b2a_hex(data)) output = group.Unpack(data)[0] return output def GetRequestDescription(self, command_class): """Get a help string that describes the format of the request. Args: command_class: RDM_GET or RDM_SET or RDM_DISCOVERY Returns: A tuple of two strings, the first is a list of the names and the second is the descriptions, one per line. """ group = self._requests.get(command_class) return group.GetDescription() # The following classes are used to describe RDM messages class Atom(object): """The basic field in an RDM message.""" def __init__(self, name): self._name = name @property def name(self): return self._name def CheckForSingleArg(self, args): if len(args) < 1: raise ArgsValidationError('Missing argument for %s' % self.name) def __str__(self): return '%s, %s' % (self.__class__, self._name) def __repr__(self): return '%s, %s' % (self.__class__, self._name) def GetDescription(self, indent=0): return str(self) class FixedSizeAtom(Atom): def __init__(self, name, format_char): super(FixedSizeAtom, self).__init__(name) self._char = format_char @property def size(self): return struct.calcsize(self._FormatString()) def FixedSize(self): """Returns true if the size of this atom doesn't vary.""" return True def Unpack(self, data): format_string = self._FormatString() try: values = struct.unpack(format_string, data) except struct.error as e: raise UnpackException(e) return values[0] def Pack(self, args): format_string = self._FormatString() try: data = struct.pack(format_string, args[0]) except struct.error as e: raise ArgsValidationError("Can't pack data: %s" % e) return data, 1 def _FormatString(self): return '!%s' % self._char class Bool(FixedSizeAtom): BOOL_MAP = { 'true': 1, 'false': 0, } def __init__(self, name): # once we have 2.6 use ? here super(Bool, self).__init__(name, 'B') def Pack(self, args): self.CheckForSingleArg(args) arg = args[0] if isinstance(arg, str): arg = args[0].lower() if arg not in self.BOOL_MAP: raise ArgsValidationError('Argument should be true or false') arg = self.BOOL_MAP[arg] return super(Bool, self).Pack([arg]) def Unpack(self, value): return bool(super(Bool, self).Unpack(value)) def GetDescription(self, indent=0): indent = ' ' * indent return '%s%s: ' % (indent, self.name) class Range(object): """A range of allowed int values.""" def __init__(self, min, max): self.min = min self.max = max def Matches(self, value): return value >= self.min and value <= self.max def __str__(self): if self.min == self.max: return '%d' % self.min else: return '[%d, %d]' % (self.min, self.max) class IntAtom(FixedSizeAtom): def __init__(self, name, char, max_value, **kwargs): super(IntAtom, self).__init__(name, char) # About Labels & Ranges: # If neither labels nor ranges are specified, the valid values is the range # of the data type. # If labels are specified, and ranges aren't, the valid values are the # labels # If ranges are specified, the valid values are those which fall into the # range (inclusive). # If both are specified, the enum values must fall into the specified # ranges. # ranges limit the allowed values for a field self._ranges = kwargs.get('ranges', [])[:] self._multiplier = kwargs.get('multiplier', 0) # labels provide a user friendly way of referring to data values self._labels = {} for value, label in kwargs.get('labels', []): self._labels[label.lower()] = value if not kwargs.get('ranges', []): # Add the labels to the list of allowed values self._ranges.append(Range(value, value)) if not self._ranges: self._ranges.append(Range(0, max_value)) def Pack(self, args): self.CheckForSingleArg(args) arg = args[0] if isinstance(arg, str): arg = arg.lower() value = self._labels.get(arg) # not a labeled value if value is None: value = self._AccountForMultiplierPack(args[0]) for range in self._ranges: if range.Matches(value): break else: raise ArgsValidationError('Param %d out of range, must be one of %s' % (value, self._GetAllowedRanges())) return super(IntAtom, self).Pack([value]) def Unpack(self, data): return self._AccountForMultiplierUnpack(super(IntAtom, self).Unpack(data)) def GetDescription(self, indent=0): indent = ' ' * indent increment = '' if self._multiplier: increment = ', increment %s' % (10 ** self._multiplier) return ('%s%s: <%s>%s' % (indent, self.name, self._GetAllowedRanges(), increment)) def DisplayValue(self, value): """Converts a raw value, e.g. UInt16 (as opposed to an array of bytes) into the value it would be displayed as, e.g. float to 1 D.P. This takes into account any multipliers set for the field. """ return self._AccountForMultiplierUnpack(value) def RawValue(self, value): """Converts a display value, e.g. float to 1 D.P. into a raw value UInt16 (as opposed to an array of bytes) it would be transmitted as. This takes into account any multipliers set for the field. """ return self._AccountForMultiplierPack(value) def _GetAllowedRanges(self): values = list(self._labels.keys()) for range in self._ranges: if range.min == range.max: values.append(str(self._AccountForMultiplierUnpack(range.min))) else: values.append('[%s, %s]' % (self._AccountForMultiplierUnpack(range.min), self._AccountForMultiplierUnpack(range.max))) return ('%s' % ', '.join(values)) def _AccountForMultiplierUnpack(self, value): new_value = value * (10 ** self._multiplier) if self._multiplier < 0: new_value = round(new_value, abs(self._multiplier)) return new_value def _AccountForMultiplierPack(self, value): if self._multiplier >= 0: try: new_value = int(value) except ValueError as e: raise ArgsValidationError(e) multiplier = 10 ** self._multiplier if new_value % multiplier: raise ArgsValidationError( 'Conversion will lose data: %d -> %d' % (new_value, (new_value / multiplier * multiplier))) new_value = int(new_value / multiplier) else: try: new_value = float(value) except ValueError as e: raise ArgsValidationError(e) scaled_value = new_value * 10 ** abs(self._multiplier) fraction, int_value = math.modf(scaled_value) if fraction: raise ArgsValidationError( 'Conversion will lose data: %s -> %s' % (new_value, int_value * (10.0 ** self._multiplier))) new_value = int(int_value) return new_value class Int8(IntAtom): """A single signed byte field.""" def __init__(self, name, **kwargs): super(Int8, self).__init__(name, 'b', 0xff, **kwargs) class UInt8(IntAtom): """A single unsigned byte field.""" def __init__(self, name, **kwargs): super(UInt8, self).__init__(name, 'B', 0xff, **kwargs) class Int16(IntAtom): """A two-byte signed field.""" def __init__(self, name, **kwargs): super(Int16, self).__init__(name, 'h', 0xffff, **kwargs) class UInt16(IntAtom): """A two-byte unsigned field.""" def __init__(self, name, **kwargs): super(UInt16, self).__init__(name, 'H', 0xffff, **kwargs) class Int32(IntAtom): """A four-byte signed field.""" def __init__(self, name, **kwargs): super(Int32, self).__init__(name, 'i', 0xffffffff, **kwargs) class UInt32(IntAtom): """A four-byte unsigned field.""" def __init__(self, name, **kwargs): super(UInt32, self).__init__(name, 'I', 0xffffffff, **kwargs) class IPV4(IntAtom): """A four-byte IPV4 address.""" def __init__(self, name, **kwargs): super(IPV4, self).__init__(name, 'I', 0xffffffff, **kwargs) def Unpack(self, data): try: return socket.inet_ntoa(data) except socket.error as e: raise ArgsValidationError("Can't unpack data: %s" % e) def Pack(self, args): # TODO(Peter): This currently allows some rather quirky values as per # inet_aton, we may want to restrict that in future try: value = struct.unpack("!I", socket.inet_aton(args[0])) except socket.error as e: raise ArgsValidationError("Can't pack data: %s" % e) return super(IntAtom, self).Pack(value) class MACAtom(FixedSizeAtom): """A MAC address.""" def __init__(self, name, **kwargs): super(MACAtom, self).__init__(name, 'BBBBBB') def Unpack(self, data): format_string = self._FormatString() try: values = struct.unpack(format_string, data) except struct.error as e: raise UnpackException(e) return MACAddress(bytearray([values[0], values[1], values[2], values[3], values[4], values[5]])) def Pack(self, args): mac = None if isinstance(args[0], MACAddress): mac = args[0] else: mac = MACAddress.FromString(args[0]) if mac is None: raise ArgsValidationError("Invalid MAC Address: %s" % args) format_string = self._FormatString() try: data = struct.pack(format_string, mac.mac_address[0], mac.mac_address[1], mac.mac_address[2], mac.mac_address[3], mac.mac_address[4], mac.mac_address[5]) except struct.error as e: raise ArgsValidationError("Can't pack data: %s" % e) return data, 1 class UIDAtom(FixedSizeAtom): """A UID.""" def __init__(self, name, **kwargs): super(UIDAtom, self).__init__(name, 'HI') def Unpack(self, data): format_string = self._FormatString() try: values = struct.unpack(format_string, data) except struct.error as e: raise UnpackException(e) return UID(values[0], values[1]) def Pack(self, args): uid = None if isinstance(args[0], UID): uid = args[0] else: uid = UID.FromString(args[0]) if uid is None: raise ArgsValidationError("Invalid UID: %s" % args) format_string = self._FormatString() try: data = struct.pack(format_string, uid.manufacturer_id, uid.device_id) except struct.error as e: raise ArgsValidationError("Can't pack data: %s" % e) return data, 1 class String(Atom): """A string field.""" def __init__(self, name, **kwargs): super(String, self).__init__(name) self._min = kwargs.get('min_size', 0) self._max = kwargs.get('max_size', 32) @property def min(self): return self._min @property def max(self): return self._max @property def size(self): # only valid if FixedSize() == True return self.min def FixedSize(self): return self.min == self.max def Pack(self, args): self.CheckForSingleArg(args) arg = args[0] arg_size = len(arg) # Handle the fact a UTF-8 character could be multi-byte if sys.version_info >= (3, 2): arg_size = max(arg_size, len(bytes(arg, 'utf-8'))) else: arg_size = max(arg_size, len(arg.encode('utf-8'))) if self.max is not None and arg_size > self.max: raise ArgsValidationError('%s can be at most %d,' % (self.name, self.max)) if self.min is not None and arg_size < self.min: raise ArgsValidationError('%s must be more than %d,' % (self.name, self.min)) try: if sys.version_info >= (3, 2): data = struct.unpack('%ds' % arg_size, bytes(arg, 'utf-8')) else: data = struct.unpack('%ds' % arg_size, arg.encode('utf-8')) except struct.error as e: raise ArgsValidationError("Can't pack data: %s" % e) return data[0], 1 def Unpack(self, data): data_size = len(data) if self.min and data_size < self.min: raise UnpackException('%s too short, required %d, got %d' % (self.name, self.min, data_size)) if self.max and data_size > self.max: raise UnpackException('%s too long, required %d, got %d' % (self.name, self.max, data_size)) try: value = struct.unpack('%ds' % data_size, data) except struct.error as e: raise UnpackException(e) try: value = value[0].rstrip(b'\x00').decode('utf-8') except UnicodeDecodeError as e: raise UnpackException(e) return value def GetDescription(self, indent=0): indent = ' ' * indent return ('%s%s: ' % ( indent, self.name, self.min, self.max)) def __str__(self): return 'String(%s, min=%s, max=%s)' % (self.name, self.min, self.max) class Group(Atom): """A repeated group of atoms.""" def __init__(self, name, atoms, **kwargs): """Create a group of atoms. Args: name: The name of the group atoms: The list of atoms the group contains Raises: PidStructureException: if the structure of this group is invalid. """ super(Group, self).__init__(name) self._atoms = atoms self._min = kwargs.get('min_size') self._max = kwargs.get('max_size') # None for variable sized groups self._group_size = self._VerifyStructure() def HasAtoms(self): return (len(self._atoms) > 0) def GetAtoms(self): return self._atoms @property def min(self): return self._min @property def max(self): return self._max def _VerifyStructure(self): """Verify that we can pack & unpack this group. We need to make sure we have enough known information to pack & unpack a group. We don't support repeated groups of variable length data, nor nested, repeated groups. For now we support the following cases: - Fixed size group. This is easy to unpack - Groups of variable size. We enforce two conditions for these, i) the variable sized field MUST be the last one ii) Only a single occurrence is allowed. This means you can't do things like: [(string, int)] # variable sized types must be last [(int, string)] # assuming string is variable sized [(int, [(bool,)]] # no way to tell where the group barriers are Returns: The number of bytes this group uses, or None if it's variable sized """ variable_sized_atoms = [] group_size = 0 for atom in self._atoms: if atom.FixedSize(): group_size += atom.size else: variable_sized_atoms.append(atom) if len(variable_sized_atoms) > 1: raise PidStructureException( 'More than one variable size field in %s: %s' % (self.name, variable_sized_atoms)) if not variable_sized_atoms: # The group is of a fixed size, this means we don't care how many times # it's repeated. return group_size # for now we only support the case where the variable sized field is the # last one if variable_sized_atoms[0] != self._atoms[-1]: raise PidStructureException( 'The variable sized field %s must be the last one' % variable_sized_atoms[0].name) # It's impossible to unpack groups of variable length data without more # information. if self.min != 1 and self.max != 1: raise PidStructureException( "Repeated groups can't contain variable length data") return None def FixedSize(self): """This is true if we know the exact size of the group and min == max. Obviously this is unlikely. """ can_determine_size = True for atom in self._atoms: if not atom.FixedSize(): can_determine_size = False break return (can_determine_size and self._min is not None and self._min == self._max) @property def size(self): # only valid if FixedSize() == True return self.min def Pack(self, args): """Pack the args into binary data. Args: args: A list of string. Returns: binary data """ if self._group_size is None: # variable length data, work out the fixed length portion first data = [] arg_offset = 0 for atom in self._atoms[0:-1]: chunk, args_consumed = atom.Pack(args[arg_offset:]) data.append(chunk) arg_offset += args_consumed # what remains is for the variable length section chunk, args_used = self._atoms[-1].Pack(args[arg_offset:]) arg_offset += args_used data.append(chunk) if arg_offset < len(args): raise ArgsValidationError('Too many arguments, expected %d, got %d' % (arg_offset, len(args))) return b''.join(data), arg_offset elif self._group_size == 0: return b'', 0 else: # this could be groups of fields, but we don't support that yet data = [] arg_offset = 0 for atom in self._atoms: chunk, args_consumed = atom.Pack(args[arg_offset:]) data.append(chunk) arg_offset += args_consumed if arg_offset < len(args): raise ArgsValidationError('Too many arguments, expected %d, got %d' % (arg_offset, len(args))) return b''.join(data), arg_offset def Unpack(self, data): """Unpack binary data. Args: data: The binary data Returns: A list of dicts. """ # we've already performed checks in _VerifyStructure so we can rely on # self._group_size data_size = len(data) if self._group_size is None: total_size = 0 for atom in self._atoms[0:-1]: total_size += atom.size if data_size < total_size: raise UnpackException( 'Response too small, required %d, only got %d' % ( total_size, data_size)) output, used = self._UnpackFixedLength(self._atoms[0:-1], data) # what remains is for the variable length section variable_sized_atom = self._atoms[-1] data = data[used:] output[variable_sized_atom.name] = variable_sized_atom.Unpack(data) return [output] elif self._group_size == 0: if data_size > 0: raise UnpackException('Expected 0 bytes but got %d' % data_size) return [{}] else: # groups of fixed length data if data_size % self._group_size: raise UnpackException( 'Data size issue for %s, data size %d, group size %d' % (self.name, data_size, self._group_size)) group_count = data_size / self._group_size if self.max is not None and group_count > self.max: raise UnpackException( 'Too many repeated group_count for %s, limit is %d, found %d' % (self.name, self.max, group_count)) if self.min is not None and group_count < self.min: raise UnpackException( 'Too few repeated group_count for %s, limit is %d, found %d' % (self.name, self.min, group_count)) offset = 0 groups = [] while offset + self._group_size <= data_size: group = self._UnpackFixedLength( self._atoms, data[offset:offset + self._group_size])[0] groups.append(group) offset += self._group_size return groups def GetDescription(self, indent=0): names = [] output = [] for atom in self._atoms: names.append('<%s>' % atom.name) output.append(atom.GetDescription(indent=2)) return ' '.join(names), '\n'.join(output) def _UnpackFixedLength(self, atoms, data): """Unpack a list of atoms of a known, fixed size. Args: atoms: A list of atoms, must all have FixedSize() == True. data: The binary data. Returns: A tuple in the form (output_dict, data_consumed) """ output = {} offset = 0 for atom in atoms: size = atom.size output[atom.name] = atom.Unpack(data[offset:offset + size]) offset += size return output, offset def __str__(self): return ('Group: atoms: %s, [%s, %s]' % (str(self._atoms), self.min, self.max)) # These are validators which can be applied before a request is sent def RootDeviceValidator(args): """Ensure the sub device is the root device.""" if args.get('sub_device') != ROOT_DEVICE: print("Can't send GET %s to non root sub devices" % args['pid'].name, file=sys.stderr) return False return True def SubDeviceValidator(args): """Ensure the sub device is in the range 0 - 512 or 0xffff.""" sub_device = args.get('sub_device') if (sub_device is None or (sub_device > MAX_VALID_SUB_DEVICE and sub_device != ALL_SUB_DEVICES)): print("%s isn't a valid sub device" % sub_device, file=sys.stderr) return False return True def NonBroadcastSubDeviceValidator(args): """Ensure the sub device is in the range 0 - 512.""" sub_device = args.get('sub_device') if (sub_device is None or sub_device > MAX_VALID_SUB_DEVICE): print("Sub device %s needs to be between 0 and 512" % sub_device, file=sys.stderr) return False return True def SpecificSubDeviceValidator(args): """Ensure the sub device is in the range 1 - 512.""" sub_device = args.get('sub_device') if (sub_device is None or sub_device == ROOT_DEVICE or sub_device > MAX_VALID_SUB_DEVICE): print("Sub device %s needs to be between 1 and 512" % sub_device, file=sys.stderr) return False return True class PidStore(object): """The class which holds information about all the PIDs.""" def __init__(self): self._pid_store = Pids_pb2.PidStore() self._pids = {} self._name_to_pid = {} self._manufacturer_pids = {} self._manufacturer_names_to_pids = {} self._manufacturer_id_to_name = {} def Load(self, pid_files, validate=True): """Load a PidStore from a list of files. Args: pid_files: A list of PID files on disk to load. If a file "overrides.proto" is in the list it will be loaded last and its PIDs override any previously loaded. validate: When True, enable strict checking. """ self._pid_store.Clear() raw_list = pid_files pid_files = [] override_file = None for f in raw_list: if os.path.basename(f) == OVERRIDE_FILE_NAME: override_file = f continue if os.path.basename(f) == MANUFACTURER_NAMES_FILE_NAME: continue pid_files.append(f) for pid_file in pid_files: self.LoadFile(pid_file, validate) if override_file is not None: self.LoadFile(override_file, validate, True) def LoadFile(self, pid_file_name, validate, override=False): """Load a pid file.""" pid_file = open(pid_file_name, 'r') lines = pid_file.readlines() pid_file.close() try: text_format.Merge('\n'.join(lines), self._pid_store) except text_format.ParseError as e: raise InvalidPidFormat(str(e)) for pid_pb in self._pid_store.pid: if override: # if processing overrides delete any conflicting entry old = self._pids.pop(pid_pb.value, None) if old is not None: del self._name_to_pid[old.name] if validate: if ((pid_pb.value >= RDMConstants.RDM_MANUFACTURER_PID_MIN) and (pid_pb.value <= RDMConstants.RDM_MANUFACTURER_PID_MAX)): raise InvalidPidFormat('%0x04hx between %0x04hx and %0x04hx in %s' % (pid_pb.value, RDMConstants.RDM_MANUFACTURER_PID_MIN, RDMConstants.RDM_MANUFACTURER_PID_MAX, pid_file_name)) if pid_pb.value in self._pids: raise InvalidPidFormat('0x%04hx listed more than once in %s' % (pid_pb.value, pid_file_name)) if pid_pb.name in self._name_to_pid: raise InvalidPidFormat('%s listed more than once in %s' % (pid_pb.name, pid_file_name)) pid = self._PidProtoToObject(pid_pb) self._pids[pid.value] = pid self._name_to_pid[pid.name] = pid for manufacturer in self._pid_store.manufacturer: pid_dict = self._manufacturer_pids.setdefault( manufacturer.manufacturer_id, {}) name_dict = self._manufacturer_names_to_pids.setdefault( manufacturer.manufacturer_id, {}) self._manufacturer_id_to_name[manufacturer.manufacturer_id] = ( manufacturer.manufacturer_name) for pid_pb in manufacturer.pid: if override: # if processing overrides delete any conflicting entry old = pid_dict.pop(pid_pb.value, None) if old is not None: del name_dict[old.name] if validate: if ((pid_pb.value < RDMConstants.RDM_MANUFACTURER_PID_MIN) or (pid_pb.value > RDMConstants.RDM_MANUFACTURER_PID_MAX)): raise InvalidPidFormat( 'Manufacturer pid 0x%04hx not between %0x04hx and %0x04hx' % (pid_pb.value, RDMConstants.RDM_MANUFACTURER_PID_MIN, RDMConstants.RDM_MANUFACTURER_PID_MAX)) if pid_pb.value in pid_dict: raise InvalidPidFormat( '0x%04hx listed more than once for 0x%04hx in %s' % ( pid_pb.value, manufacturer.manufacturer_id, pid_file_name)) if pid_pb.name in name_dict: raise InvalidPidFormat( '%s listed more than once for %s in %s' % ( pid_pb.name, manufacturer, pid_file_name)) pid = self._PidProtoToObject(pid_pb) pid_dict[pid.value] = pid name_dict[pid.name] = pid # we no longer need the protobuf representation self._pid_store.Clear() def Pids(self): """Returns a list of all PIDs. Manufacturer PIDs aren't included. Returns: A list of Pid objects. """ return list(self._pids.values()) def ManufacturerPids(self, esta_id): """Return a list of all Manufacturer PIDs for a given esta_id. Args: esta_id: The 2-byte esta / manufacturer ID. Returns: A list of Pid objects. """ return list(self._manufacturer_pids.get(esta_id, {}).values()) def GetPid(self, pid_value, esta_id=None): """Look up a PIDs by the 2-byte PID value. Args: pid_value: The 2-byte PID value, e.g. 0x8000 esta_id: The 2-byte esta / manufacturer ID. Returns: A Pid object, or None if no PID was found. """ pid = self._pids.get(pid_value, None) if not pid: pid = self._manufacturer_pids.get(esta_id, {}).get( pid_value, None) return pid def GetName(self, pid_name, esta_id=None): """Look up a PIDs by name. Args: pid_name: The name of the PID, e.g. 'DEVICE_INFO' esta_id: The 2-byte esta / manufacturer ID. Returns: A Pid object, or None if no PID was found. """ pid = self._name_to_pid.get(pid_name) if not pid: pid = self._manufacturer_names_to_pids.get(esta_id, {}).get( pid_name, None) return pid def NameToValue(self, pid_name, esta_id=None): """A helper method to convert a PID name to a PID value Args: pid_name: The name of the PID, e.g. 'DEVICE_INFO' esta_id: The 2-byte esta / manufacturer ID. Returns: The value for this PID, or None if it wasn't found. """ pid = self.GetName(pid_name, esta_id) if pid: return pid.value return pid def ManufacturerIdToName(self, esta_id): """A helper method to convert a manufacturer ID to a name Args: esta_id: The 2-byte esta / manufacturer ID. Returns: The name of the manufacturer, or None if it wasn't found. """ return self._manufacturer_id_to_name.get(esta_id, None) def _PidProtoToObject(self, pid_pb): """Convert the protobuf representation of a PID to a PID object. Args: pid_pb: The protobuf version of the pid Returns: A PIDStore.PID object. """ def BuildList(field_name): if not pid_pb.HasField(field_name): return None try: group = self._FrameFormatToGroup(getattr(pid_pb, field_name)) except PidStructureException as e: raise PidStructureException( "The structure for the %s in %s isn't valid: %s" % (field_name, pid_pb.name, e)) return group discovery_request = BuildList('discovery_request') discovery_response = BuildList('discovery_response') get_request = BuildList('get_request') get_response = BuildList('get_response') set_request = BuildList('set_request') set_response = BuildList('set_response') discovery_validators = [] if pid_pb.HasField('discovery_sub_device_range'): discovery_validators.append(self._SubDeviceRangeToValidator( pid_pb.discovery_sub_device_range)) get_validators = [] if pid_pb.HasField('get_sub_device_range'): get_validators.append(self._SubDeviceRangeToValidator( pid_pb.get_sub_device_range)) set_validators = [] if pid_pb.HasField('set_sub_device_range'): set_validators.append(self._SubDeviceRangeToValidator( pid_pb.set_sub_device_range)) return Pid(pid_pb.name, pid_pb.value, discovery_request, discovery_response, get_request, get_response, set_request, set_response, discovery_validators, get_validators, set_validators) def _FrameFormatToGroup(self, frame_format): """Convert a frame format to a group.""" atoms = [] for field in frame_format.field: atoms.append(self._FieldToAtom(field)) return Group('', atoms, min_size=1, max_size=1) def _FieldToAtom(self, field): """Convert a PID proto field message into an atom.""" field_name = str(field.name) args = {'labels': [], 'ranges': [], } if field.HasField('max_size'): args['max_size'] = field.max_size if field.HasField('min_size'): args['min_size'] = field.min_size if field.HasField('multiplier'): args['multiplier'] = field.multiplier for label in field.label: args['labels'].append((label.value, label.label)) for allowed_value in field.range: args['ranges'].append(Range(allowed_value.min, allowed_value.max)) if field.type == Pids_pb2.BOOL: return Bool(field_name) elif field.type == Pids_pb2.INT8: return Int8(field_name, **args) elif field.type == Pids_pb2.UINT8: return UInt8(field_name, **args) elif field.type == Pids_pb2.INT16: return Int16(field_name, **args) elif field.type == Pids_pb2.UINT16: return UInt16(field_name, **args) elif field.type == Pids_pb2.INT32: return Int32(field_name, **args) elif field.type == Pids_pb2.UINT32: return UInt32(field_name, **args) elif field.type == Pids_pb2.IPV4: return IPV4(field_name, **args) elif field.type == Pids_pb2.MAC: return MACAtom(field_name, **args) elif field.type == Pids_pb2.UID: return UIDAtom(field_name, **args) elif field.type == Pids_pb2.GROUP: if not field.field: raise InvalidPidFormat('Missing child fields for %s' % field_name) atoms = [] for child_field in field.field: atoms.append(self._FieldToAtom(child_field)) return Group(field_name, atoms, **args) elif field.type == Pids_pb2.STRING: return String(field_name, **args) def _SubDeviceRangeToValidator(self, range): """Convert a sub device range to a validator.""" if range == Pids_pb2.ROOT_DEVICE: return RootDeviceValidator elif range == Pids_pb2.ROOT_OR_ALL_SUBDEVICE: return SubDeviceValidator elif range == Pids_pb2.ROOT_OR_SUBDEVICE: return NonBroadcastSubDeviceValidator elif range == Pids_pb2.ONLY_SUBDEVICES: return SpecificSubDeviceValidator _pid_store = None def GetStore(location=None, only_files=()): """Get the instance of the PIDStore. Args: location: The location to load the store from. If not specified it uses the location defined in PidStoreLocation.py only_files: Load a subset of the files in the location. Returns: An instance of PidStore. """ global _pid_store if not _pid_store: _pid_store = PidStore() if not location: location = PidStoreLocation.location pid_files = [] for file_name in os.listdir(location): if not file_name.endswith('.proto'): continue if only_files and file_name not in only_files: continue pid_files.append(os.path.join(location, file_name)) _pid_store.Load(pid_files) REQUIRED_PIDS = [ 'DEVICE_INFO', 'QUEUED_MESSAGE', 'SUPPORTED_PARAMETERS' ] for pid in REQUIRED_PIDS: if not _pid_store.GetName(pid): raise MissingPLASAPIDs( 'Could not find %s in PID datastore, check the directory contains ' 'the PLASA PIDs.' % pid) return _pid_store ola-0.10.9/python/ola/MACAddress.py0000664000175000017500000000632114376533110013660 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # MACAddress.py # Copyright (C) 2013 Peter Newman """The MACAddress class.""" __author__ = 'nomis52@gmail.com (Simon Newton)' MAC_ADDRESS_LENGTH = 6 class Error(Exception): """Base Error Class.""" class MACAddress(object): """Represents a MAC Address.""" def __init__(self, mac_address): """Create a new MAC Address object. Args: mac_address: The byte array representation of the MAC Address, e.g. bytearray([0x01, 0x23, 0x45, 0x67, 0x89, 0xab]). """ self._mac_address = mac_address @property def mac_address(self): return self._mac_address def __str__(self): return ':'.join(format(x, '02x') for x in self._mac_address) def __hash__(self): return hash(str(self)) def __repr__(self): return self.__str__() def __eq__(self, other): if not isinstance(other, self.__class__): return False return self.mac_address == other.mac_address def __lt__(self, other): if other is None: return False if not isinstance(other, self.__class__): return NotImplemented return self.mac_address < other.mac_address # These 4 can be replaced with functools:total_ordering when 2.6 is dropped def __le__(self, other): if other is None: return False if not isinstance(other, self.__class__): return NotImplemented return self < other or self == other def __gt__(self, other): if other is None: return True if not isinstance(other, self.__class__): return NotImplemented return not self <= other def __ge__(self, other): if other is None: return True if not isinstance(other, self.__class__): return NotImplemented return not self < other def __ne__(self, other): return not self == other @staticmethod def FromString(mac_address_str): """Create a new MAC Address from a string. Args: mac_address_str: The string representation of the MAC Address, e.g. 01:23:45:67:89:ab or 98.76.54.fe.dc.ba. """ parts = mac_address_str.split(':') if len(parts) != MAC_ADDRESS_LENGTH: parts = mac_address_str.split('.') if len(parts) != MAC_ADDRESS_LENGTH: return None try: address = bytearray([int(parts[0], 16), int(parts[1], 16), int(parts[2], 16), int(parts[3], 16), int(parts[4], 16), int(parts[5], 16)]) except ValueError: return None return MACAddress(address) ola-0.10.9/python/ola/rpc/0000775000175000017500000000000014376533270012251 500000000000000ola-0.10.9/python/ola/rpc/StreamRpcChannel.py0000664000175000017500000002671714376533110015742 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # StreamRpcChannel.py # Copyright (C) 2005 Simon Newton import binascii import logging import struct from google.protobuf import service from ola.rpc import Rpc_pb2 from ola.rpc.SimpleRpcController import SimpleRpcController """A RpcChannel that works over a TCP socket.""" __author__ = 'nomis52@gmail.com (Simon Newton)' class OutstandingRequest(object): """These represent requests on the server side that haven't completed yet.""" def __init__(self, request_id, controller): self.controller = controller self.id = request_id class OutstandingResponse(object): """These represent requests on the client side that haven't completed yet.""" def __init__(self, response_id, controller, callback, reply_class): self.callback = callback self.controller = controller self.id = response_id self.reply = None self.reply_class = reply_class class StreamRpcChannel(service.RpcChannel): """Implements a RpcChannel over a TCP socket.""" PROTOCOL_VERSION = 1 VERSION_MASK = 0xf0000000 SIZE_MASK = 0x0fffffff RECEIVE_BUFFER_SIZE = 8192 def __init__(self, socket, service_impl, close_callback=None): """Create a new StreamRpcChannel. Args: socket: the socket to communicate on service: the service to route incoming requests to """ self._service = service_impl self._socket = socket self._sequence = 0 self._outstanding_requests = {} self._outstanding_responses = {} self._buffer = [] # The received data self._expected_size = None # The size of the message we're receiving self._skip_message = False # Skip the current message self._close_callback = close_callback self._log_msgs = False # set to enable wire message logging if self._log_msgs: logging.basicConfig(level=logging.DEBUG) def SocketReady(self): """Read data from the socket and handle when we get a full message. Returns: True if the socket remains connected, False if it was closed. """ data = self._socket.recv(self.RECEIVE_BUFFER_SIZE) if data == '': logging.info('OLAD Server Socket closed') if self._close_callback is not None: self._close_callback() return False self._buffer.append(data) self._ProcessIncomingData() return True def CallMethod(self, method, controller, request, response_pb, done): """Call a method. Don't use this directly, use the Stub object. Args: method: The MethodDescriptor to call controller: An RpcController object request: The request message response: The response class done: A closure to call once complete. """ message = Rpc_pb2.RpcMessage() message.type = Rpc_pb2.REQUEST message.id = self._sequence message.name = method.name message.buffer = request.SerializeToString() self._SendMessage(message) self._sequence += 1 if message.id in self._outstanding_responses: # fail any outstanding response with the same id, not the best approach # but it'll do for now. logging.warning('Response %d already pending, failing now', message.id) response = self._outstanding_responses[message.id] response.controller.SetFailed('Duplicate request found') self._InvokeCallback(response) response = OutstandingResponse(message.id, controller, done, response_pb) self._outstanding_responses[message.id] = response def RequestComplete(self, request, response): """This is called on the server side when a request has completed. Args: request: the OutstandingRequest object that has completed. response: the response to send to the client """ message = Rpc_pb2.RpcMessage() if request.controller.Failed(): self._SendRequestFailed(request) return message.type = Rpc_pb2.RESPONSE message.id = request.id message.buffer = response.SerializeToString() self._SendMessage(message) del self._outstanding_requests[request.id] def _EncodeHeader(self, size): """Encode a version and size into a header. Args: size: the size of the rpc message Returns: The header field """ header = (self.PROTOCOL_VERSION << 28) & self.VERSION_MASK header |= size & self.SIZE_MASK return struct.pack('=L', header) def _DecodeHeader(self, header): """Decode a header into the version and size. Args: header: the received header Return: A tuple in the form (version, size) """ return ((header & self.VERSION_MASK) >> 28, header & self.SIZE_MASK) def _SendMessage(self, message): """Send an RpcMessage. Args: message: An RpcMessage object. Returns: True if the send succeeded, False otherwise. """ data = message.SerializeToString() # combine into one buffer to send so we avoid sending two packets data = self._EncodeHeader(len(data)) + data # this log is useful for building mock regression tests if self._log_msgs: logging.debug("send->" + str(binascii.hexlify(data))) sent_bytes = self._socket.send(data) if sent_bytes != len(data): logging.warning('Failed to send full datagram') return False return True def _SendRequestFailed(self, request): """Send a response indicating this request failed. Args: request: An OutstandingRequest object. """ message = Rpc_pb2.RpcMessage() message.type = Rpc_pb2.RESPONSE_FAILED message.id = request.id message.buffer = request.controller.ErrorText() self._SendMessage(message) del self._outstanding_requests[request.id] def _SendNotImplemented(self, message_id): """Send a not-implemented response. Args: message_id: The message number. """ message = Rpc_pb2.RpcMessage message.type = Rpc_pb2.RESPONSE_NOT_IMPLEMENTED message.id = message_id self._SendMessage(message) def _GrabData(self, size): """Fetch the next N bytes of data from the buffer. Args: size: the amount of data to fetch. Returns: The next size bytes of data, or None if there isn't enough. """ data_size = sum([len(s) for s in self._buffer]) if data_size < size: return None data = [] size_left = size while size_left > 0: chunk = self._buffer.pop(0) if len(chunk) > size_left: # we only want part of it data.append(chunk[0:size_left]) self._buffer.insert(0, chunk[size_left:]) size_left = 0 else: data.append(chunk) size_left -= len(chunk) return b''.join(data) def _ProcessIncomingData(self): """Process the received data.""" while True: if not self._expected_size: # this is a new msg raw_header = self._GrabData(4) if not raw_header: # not enough data yet return if self._log_msgs: logging.debug("recvhdr<-" + str(binascii.hexlify(raw_header))) header = struct.unpack('=L', raw_header)[0] version, size = self._DecodeHeader(header) if version != self.PROTOCOL_VERSION: logging.warning('Protocol mismatch: %d != %d', version, self.PROTOCOL_VERSION) self._skip_message = True self._expected_size = size data = self._GrabData(self._expected_size) if not data: # not enough data yet return if self._log_msgs: logging.debug("recvmsg<-" + str(binascii.hexlify(data))) if not self._skip_message: self._HandleNewMessage(data) self._expected_size = 0 self._skip_message = 0 def _HandleNewMessage(self, data): """Handle a new Message. Args: data: A chunk of data representing a RpcMessage """ message = Rpc_pb2.RpcMessage() message.ParseFromString(data) if message.type in self.MESSAGE_HANDLERS: self.MESSAGE_HANDLERS[message.type](self, message) else: logging.warning('Not sure of message type %d', message.type()) def _HandleRequest(self, message): """Handle a Request message. Args: message: The RpcMessage object. """ if not self._service: logging.warning('No service registered') return descriptor = self._service.GetDescriptor() method = descriptor.FindMethodByName(message.name) if not method: logging.warning('Failed to get method descriptor for %s', message.name) self._SendNotImplemented(message.id) return request_pb = self._service.GetRequestClass(method)() request_pb.ParseFromString(message.buffer) controller = SimpleRpcController() request = OutstandingRequest(message.id, controller) if message.id in self._outstanding_requests: logging.warning('Duplicate request for %d', message.id) self._SendRequestFailed(message.id) self._outstanding_requests[message.id] = request self._service.CallMethod(method, request.controller, request_pb, lambda x: self.RequestComplete(request, x)) def _HandleResponse(self, message): """Handle a Response message. Args: message: The RpcMessage object. """ response = self._outstanding_responses.get(message.id, None) if response: response.reply = response.reply_class() response.reply.ParseFromString(message.buffer) self._InvokeCallback(response) def _HandleCanceledResponse(self, message): """Handle a Not Implemented message. Args: message: The RpcMessage object. """ logging.warning('Received a canceled response') response = self._outstanding_responses.get(message.id, None) if response: response.controller.SetFailed(message.buffer) self._InvokeCallback(response) def _HandleFailedReponse(self, message): """Handle a Failed Response message. Args: message: The RpcMessage object. """ response = self._outstanding_responses.get(message.id, None) if response: response.controller.SetFailed(message.buffer) self._InvokeCallback(response) def _HandleNotImplemented(self, message): """Handle a Not Implemented message. Args: message: The RpcMessage object. """ logging.warning('Received a non-implemented response') response = self._outstanding_responses.get(message.id, None) if response: response.controller.SetFailed('Not Implemented') self._InvokeCallback(response) def _InvokeCallback(self, response): """Run the callback and delete the outstanding response. Args: response: the resoponse to run. """ response.callback(response.controller, response.reply) del self._outstanding_responses[response.id] MESSAGE_HANDLERS = { Rpc_pb2.REQUEST: _HandleRequest, Rpc_pb2.RESPONSE: _HandleResponse, Rpc_pb2.RESPONSE_CANCEL: _HandleCanceledResponse, Rpc_pb2.RESPONSE_FAILED: _HandleFailedReponse, Rpc_pb2.RESPONSE_NOT_IMPLEMENTED: _HandleNotImplemented, } ola-0.10.9/python/ola/rpc/SimpleRpcController.py0000664000175000017500000000310614376533110016476 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # SimpleRpcController.py # Copyright (C) 2005 Simon Newton from google.protobuf import service """An implementation of the RpcController interface.""" __author__ = 'nomis52@gmail.com (Simon Newton)' class SimpleRpcController(service.RpcController): """See google.protobuf.service.RpcController for documentation.""" def __init__(self): self.Reset() def Reset(self): self._failed = False self._cancelled = False self._error = None self._callback = None def Failed(self): return self._failed def ErrorText(self): return self._error def StartCancel(self): self._cancelled = True if self._callback: self._callback() def SetFailed(self, reason): self._failed = True self._error = reason def IsCanceled(self): return self._cancelled def NotifyOnCancel(self, callback): self._callback = callback ola-0.10.9/python/ola/rpc/SimpleRpcControllerTest.py0000775000175000017500000000444414376533110017347 00000000000000#!/usr/bin/env python # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # SimpleRpcControllerTest.py # Copyright (C) 2005 Simon Newton import unittest from SimpleRpcController import SimpleRpcController """Test cases for the SimpleRpcController.""" __author__ = 'nomis52@gmail.com (Simon Newton)' class SimpleRpcControllerTest(unittest.TestCase): def setUp(self): self.callback_run = False def Callback(self): self.callback_run = True def testSimpleRpcController(self): controller = SimpleRpcController() self.assertFalse(controller.Failed()) self.assertFalse(controller.IsCanceled()) self.assertEqual(None, controller.ErrorText()) self.assertFalse(self.callback_run) # cancel controller.NotifyOnCancel(self.Callback) controller.StartCancel() self.assertFalse(controller.Failed()) self.assertFalse(not controller.IsCanceled()) self.assertEqual(None, controller.ErrorText()) self.assertFalse(not self.callback_run) self.callback_run = False controller.Reset() self.assertFalse(controller.Failed()) self.assertFalse(controller.IsCanceled()) self.assertEqual(None, controller.ErrorText()) # fail failure_string = 'foo' controller.SetFailed(failure_string) self.assertFalse(not controller.Failed()) self.assertFalse(controller.IsCanceled()) self.assertEqual(failure_string, controller.ErrorText()) controller.Reset() self.assertFalse(controller.Failed()) self.assertFalse(controller.IsCanceled()) self.assertEqual(None, controller.ErrorText()) self.assertFalse(self.callback_run) if __name__ == '__main__': unittest.main() ola-0.10.9/python/ola/rpc/__init__.py0000664000175000017500000000000014376533110014261 00000000000000ola-0.10.9/python/ola/rpc/Makefile.mk0000664000175000017500000000243314376533110014232 00000000000000# ola python client # Python modules. ################################################## if BUILD_PYTHON_LIBS rpcpythondir = $(pkgpythondir)/rpc nodist_rpcpython_PYTHON = python/ola/rpc/Rpc_pb2.py rpcpython_PYTHON = python/ola/rpc/SimpleRpcController.py \ python/ola/rpc/StreamRpcChannel.py \ python/ola/rpc/__init__.py built_sources += python/ola/rpc/Rpc_pb2.py endif python/ola/rpc/Rpc_pb2.py: common/rpc/Rpc.proto mkdir -p $(top_builddir)/python/ola/rpc $(PROTOC) --python_out $(top_builddir)/python/ola/rpc -I ${top_srcdir}/common/rpc/ ${top_srcdir}/common/rpc/Rpc.proto # TESTS ################################################## if BUILD_PYTHON_LIBS test_scripts += python/ola/rpc/SimpleRpcControllerTest.sh endif dist_check_SCRIPTS += python/ola/rpc/SimpleRpcControllerTest.py python/ola/rpc/SimpleRpcControllerTest.sh: python/ola/rpc/Makefile.mk mkdir -p $(top_builddir)/python/ola/rpc echo "PYTHONPATH=${top_builddir}/python $(PYTHON) ${srcdir}/python/ola/rpc/SimpleRpcControllerTest.py; exit \$$?" > $(top_builddir)/python/ola/rpc/SimpleRpcControllerTest.sh chmod +x $(top_builddir)/python/ola/rpc/SimpleRpcControllerTest.sh CLEANFILES += \ python/ola/rpc/*.pyc \ python/ola/rpc/SimpleRpcControllerTest.sh \ python/ola/rpc/__pycache__/* ola-0.10.9/python/ola/RDMTest.py0000664000175000017500000002057414376533110013242 00000000000000#!/usr/bin/env python # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # RDMTest.py # Copyright (C) 2019 Bruce Lowekamp import binascii import os import socket # import timeout_decorator import unittest from ola.ClientWrapper import ClientWrapper from ola.OlaClient import RDMNack from ola.RDMAPI import RDMAPI from ola.TestUtils import handleRPCByteOrder from ola.UID import UID from ola import PidStore """Test cases for RDM device commands.""" __author__ = 'bruce@lowekamp.net (Bruce Lowekamp)' global pid_store_path class RDMTest(unittest.TestCase): # @timeout_decorator.timeout(2) def testGetWithResponse(self): """uses client to send an RDM get with mocked olad. Regression test that confirms sent message is correct and sends fixed response message.""" sockets = socket.socketpair() wrapper = ClientWrapper(sockets[0]) pid_store = PidStore.GetStore(pid_store_path) client = wrapper.Client() rdm_api = RDMAPI(client, pid_store) class results: got_request = False got_response = False def DataCallback(self): # request and response for # ola_rdm_get.py -u 1 --uid 7a70:ffffff00 device_info # against olad dummy plugin # enable logging in rpc/StreamRpcChannel.py data = sockets[1].recv(4096) expected = handleRPCByteOrder(binascii.unhexlify( "29000010080110001a0a52444d436f6d6d616e6422170801120908f0f4011500" "ffffff180020602a0030003800")) self.assertEqual(data, expected, msg="Regression check failed. If protocol change " "was intended set expected to: " + str(binascii.hexlify(data))) results.got_request = True response = handleRPCByteOrder(binascii.unhexlify( "3f0000100802100022390800100018002213010000017fff0000000300050204" "00010000032860300038004a0908f0f4011500ffffff520908f0f40115ac1100" "02580a")) sent_bytes = sockets[1].send(response) self.assertEqual(sent_bytes, len(response)) def ResponseCallback(self, response, data, unpack_exception): results.got_response = True self.assertEqual(response.response_type, client.RDM_ACK) self.assertEqual(response.pid, 0x60) self.assertEqual(data["dmx_footprint"], 5) self.assertEqual(data["software_version"], 3) self.assertEqual(data["personality_count"], 4) self.assertEqual(data["device_model"], 1) self.assertEqual(data["current_personality"], 2) self.assertEqual(data["protocol_major"], 1) self.assertEqual(data["protocol_minor"], 0) self.assertEqual(data["product_category"], 32767) self.assertEqual(data["dmx_start_address"], 1) self.assertEqual(data["sub_device_count"], 0) self.assertEqual(data["sensor_count"], 3) wrapper.AddEvent(0, wrapper.Stop) wrapper._ss.AddReadDescriptor(sockets[1], lambda: DataCallback(self)) uid = UID.FromString("7a70:ffffff00") pid = pid_store.GetName("DEVICE_INFO") rdm_api.Get(1, uid, 0, pid, lambda x, y, z: ResponseCallback(self, x, y, z)) wrapper.Run() sockets[0].close() sockets[1].close() self.assertTrue(results.got_request) self.assertTrue(results.got_response) # @timeout_decorator.timeout(2) def testGetParamsWithResponse(self): """uses client to send an RDM get with mocked olad. Regression test that confirms sent message is correct and sends fixed response message.""" sockets = socket.socketpair() wrapper = ClientWrapper(sockets[0]) pid_store = PidStore.GetStore(pid_store_path) client = wrapper.Client() rdm_api = RDMAPI(client, pid_store) class results: got_request = False got_response = False def DataCallback(self): # request and response for # ola_rdm_get.py -u 1 --uid 7a70:ffffff00 DMX_PERSONALITY_DESCRIPTION 2 # against olad dummy plugin # enable logging in rpc/StreamRpcChannel.py data = sockets[1].recv(4096) expected = handleRPCByteOrder(binascii.unhexlify( "2b000010080110001a0a52444d436f6d6d616e6422190801120908f0f4011500" "ffffff180020e1012a010230003800")) self.assertEqual(data, expected, msg="Regression check failed. If protocol change " "was intended set expected to: " + str(binascii.hexlify(data))) results.got_request = True response = handleRPCByteOrder(binascii.unhexlify( "3d0000100802100022370800100018002210020005506572736f6e616c697479" "203228e101300038004a0908f0f4011500ffffff520908f0f40115ac107de058" "29")) sent_bytes = sockets[1].send(response) self.assertEqual(sent_bytes, len(response)) def ResponseCallback(self, response, data, unpack_exception): results.got_response = True self.assertEqual(response.response_type, client.RDM_ACK) self.assertEqual(response.pid, 0xe1) self.assertEqual(data['personality'], 2) self.assertEqual(data['slots_required'], 5) self.assertEqual(data['name'], "Personality 2") wrapper.AddEvent(0, wrapper.Stop) wrapper._ss.AddReadDescriptor(sockets[1], lambda: DataCallback(self)) uid = UID.FromString("7a70:ffffff00") pid = pid_store.GetName("DMX_PERSONALITY_DESCRIPTION") rdm_api.Get(1, uid, 0, pid, lambda x, y, z: ResponseCallback(self, x, y, z), args=["2"]) wrapper.Run() sockets[0].close() sockets[1].close() self.assertTrue(results.got_request) self.assertTrue(results.got_response) # @timeout_decorator.timeout(2) def testSetParamsWithNack(self): """uses client to send an RDM set with mocked olad. Regression test that confirms sent message is correct and sends fixed response message.""" sockets = socket.socketpair() wrapper = ClientWrapper(sockets[0]) pid_store = PidStore.GetStore(pid_store_path) client = wrapper.Client() rdm_api = RDMAPI(client, pid_store) class results: got_request = False got_response = False def DataCallback(self): # request and response for # ola_rdm_set.py -u 1 --uid 7a70:ffffff00 DMX_PERSONALITY 10 # against olad dummy plugin # enable logging in rpc/StreamRpcChannel.py data = sockets[1].recv(4096) expected = handleRPCByteOrder(binascii.unhexlify( "2b000010080110001a0a52444d436f6d6d616e6422190801120908f0f401150" "0ffffff180020e0012a010a30013800")) self.assertEqual(data, expected, msg="Regression check failed. If protocol change " "was intended set expected to: " + str(binascii.hexlify(data))) results.got_request = True response = handleRPCByteOrder(binascii.unhexlify( "2f0000100802100022290800100218002202000628e001300138004a0908f0f" "4011500ffffff520908f0f40115ac107de05831")) sent_bytes = sockets[1].send(response) self.assertEqual(sent_bytes, len(response)) def ResponseCallback(self, response, data, unpack_exception): results.got_response = True self.assertEqual(response.response_type, client.RDM_NACK_REASON) self.assertEqual(response.pid, 0xe0) self.assertEqual(response.nack_reason, RDMNack.NR_DATA_OUT_OF_RANGE) wrapper.AddEvent(0, wrapper.Stop) wrapper._ss.AddReadDescriptor(sockets[1], lambda: DataCallback(self)) uid = UID.FromString("7a70:ffffff00") pid = pid_store.GetName("DMX_PERSONALITY") rdm_api.Set(1, uid, 0, pid, lambda x, y, z: ResponseCallback(self, x, y, z), args=["10"]) wrapper.Run() sockets[0].close() sockets[1].close() self.assertTrue(results.got_request) self.assertTrue(results.got_response) if __name__ == '__main__': pid_store_path = (os.environ.get('PIDSTOREDIR', "../data/rdm")) unittest.main() ola-0.10.9/python/ola/__init__.py0000664000175000017500000000000014376533110013475 00000000000000ola-0.10.9/python/ola/OlaClientTest.py0000664000175000017500000000707314376533110014471 00000000000000#!/usr/bin/env python # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # OlaClientTest.py # Copyright (C) 2019 Bruce Lowekamp import unittest from ola.OlaClient import Device, Plugin, Port, RDMNack, Universe from ola.TestUtils import allHashNotEqual, allNotEqual """Test cases for data structures of OlaClient. SendDMX is tested with ClientWrapper.""" __author__ = 'bruce@lowekamp.net (Bruce Lowekamp)' class OlaClientTest(unittest.TestCase): def testPlugin(self): # hash and eq only on id (1) a = Plugin(1, "a", False, False) aeq = Plugin(1, "az", True, True) b = Plugin(2, "b", False, False) c = Plugin(3, "b", False, False) self.assertEqual(a, aeq) self.assertEqual(hash(a), hash(aeq)) allNotEqual(self, [a, b, c]) allHashNotEqual(self, [a, b, c]) s = sorted([c, a, b]) self.assertEqual([a, b, c], s) self.assertEqual(a.__lt__("hello"), NotImplemented) self.assertNotEqual(a, "hello") def testDevice(self): # only eq on alias (2) a = Device(1, 2, "a", 4, [1, 2], [3, 4]) aeq = Device(0, 2, "za", 54, [0, 1, 2, 3], [2, 3, 4]) b = Device(2, 3, "b", 4, [1, 2], [3, 4]) c = Device(2, 4, "b", 4, [1, 2], [3, 4]) self.assertEqual(a, aeq) allNotEqual(self, [a, b, c]) s = sorted([b, a, c]) self.assertEqual([a, b, c], s) self.assertEqual(a.__lt__("hello"), NotImplemented) self.assertNotEqual(a, "hello") def testPort(self): # hash and eq only on id (1) a = Port(1, 1, False, "a", False) aeq = Port(1, 2, True, "xa", True) b = Port(2, 2, False, "b", False) c = Port(3, 3, False, "b", False) self.assertEqual(a, aeq) self.assertEqual(hash(a), hash(aeq)) allNotEqual(self, [a, b, c]) allHashNotEqual(self, [a, b, c]) s = sorted([c, a, b]) self.assertEqual([a, b, c], s) self.assertEqual(a.__lt__("hello"), NotImplemented) self.assertNotEqual(a, "hello") def testUniverse(self): # universe doesn't have hash and implements eq and < only on id a = Universe(1, 2, Universe.LTP, [1, 2], [3, 4]) aeq = Universe(1, 3, Universe.HTP, [1, 2, 3], [3, 4, 5]) b = Universe(2, 2, Universe.LTP, [1, 2], [3, 4]) c = Universe(3, 2, Universe.HTP, [1, 2], [3, 4]) self.assertEqual(a, aeq) allNotEqual(self, [a, b, c]) s = sorted([c, b, a]) self.assertEqual([a, b, c], s) self.assertEqual(a.__lt__("hello"), NotImplemented) self.assertNotEqual(a, "hello") def testRDMNack(self): # hash and eq only on value (1) a = RDMNack(1, "a") aeq = RDMNack(1, "also a") b = RDMNack(2, "b") c = RDMNack(3, "c") self.assertEqual(a, aeq) self.assertEqual(hash(a), hash(aeq)) allNotEqual(self, [a, b, c]) allHashNotEqual(self, [a, b, c]) s = sorted([c, a, b]) self.assertEqual([a, b, c], s) self.assertEqual(a.__lt__("hello"), NotImplemented) self.assertNotEqual(a, "hello") if __name__ == '__main__': unittest.main() ola-0.10.9/python/ola/StringUtilsTest.py0000775000175000017500000000440614376533110015106 00000000000000#!/usr/bin/env python # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # StringUtilsTest.py # Copyright (C) 2022 Peter Newman import unittest from ola.StringUtils import StringEscape """Test cases for StringUtils utilities.""" __author__ = 'nomis52@gmail.com (Simon Newton)' class StringUtilsTest(unittest.TestCase): def testStringEscape(self): # Test we escape properly self.assertEqual('foo', StringEscape("foo")) self.assertEqual('bar', StringEscape("bar")) self.assertEqual('bar[]', StringEscape("bar[]")) self.assertEqual('foo-bar', StringEscape(u'foo-bar')) self.assertEqual('foo\\x00bar', StringEscape("foo\x00bar")) # TODO(Peter): How does this interact with the E1.20 Unicode flag? self.assertEqual('caf\\xe9', StringEscape(u'caf\xe9')) self.assertEqual('foo\\u2014bar', StringEscape(u'foo\u2014bar')) # Test that we display nicely in a string self.assertEqual('foo', ("%s" % StringEscape("foo"))) self.assertEqual('bar[]', ("%s" % StringEscape("bar[]"))) self.assertEqual('foo-bar', ("%s" % StringEscape(u'foo-bar'))) self.assertEqual('foo\\x00bar', ("%s" % StringEscape("foo\x00bar"))) # TODO(Peter): How does this interact with the E1.20 Unicode flag? self.assertEqual('caf\\xe9', ("%s" % StringEscape(u'caf\xe9'))) self.assertEqual('foo\\u2014bar', ("%s" % StringEscape(u'foo\u2014bar'))) # Confirm we throw an exception if we pass in a number or something else # that's not a string with self.assertRaises(TypeError): result = StringEscape(42) self.assertNone(result) if __name__ == '__main__': unittest.main() ola-0.10.9/python/ola/Makefile.mk0000664000175000017500000000777414376533110013463 00000000000000# OLA Python client include python/ola/rpc/Makefile.mk # Python modules. ################################################## artnet_path = ${top_srcdir}/plugins/artnet/messages artnet_proto = $(artnet_path)/ArtNetConfigMessages.proto ola_path = ${top_srcdir}/common/protocol ola_proto = $(ola_path)/Ola.proto pids_path = ${top_srcdir}/common/rdm pids_proto = $(pids_path)/Pids.proto usbpro_path = ${top_srcdir}/plugins/usbpro/messages usbpro_proto = $(usbpro_path)/UsbProConfigMessages.proto if BUILD_PYTHON_LIBS output_files = \ python/ola/ArtNetConfigMessages_pb2.py \ python/ola/Ola_pb2.py \ python/ola/UsbProConfigMessages_pb2.py \ python/ola/Pids_pb2.py \ python/ola/PidStoreLocation.py \ python/ola/Version.py built_sources += $(output_files) nodist_pkgpython_PYTHON = $(output_files) pkgpython_PYTHON = \ python/ola/ClientWrapper.py \ python/ola/DMXConstants.py \ python/ola/DUBDecoder.py \ python/ola/MACAddress.py \ python/ola/OlaClient.py \ python/ola/RDMAPI.py \ python/ola/RDMConstants.py \ python/ola/PidStore.py \ python/ola/UID.py \ python/ola/__init__.py endif python/ola/ArtNetConfigMessages_pb2.py: $(artnet_proto) $(PROTOC) --python_out $(top_builddir)/python/ola/ -I $(artnet_path) $(artnet_proto) python/ola/Ola_pb2.py: $(ola_proto) $(PROTOC) --python_out $(top_builddir)/python/ola/ -I $(ola_path) $(ola_proto) python/ola/Pids_pb2.py: $(pids_proto) $(PROTOC) --python_out $(top_builddir)/python/ola/ -I $(pids_path) $(pids_proto) python/ola/UsbProConfigMessages_pb2.py: $(usbpro_proto) $(PROTOC) --python_out $(top_builddir)/python/ola/ -I $(usbpro_path) $(usbpro_proto) python/ola/PidStoreLocation.py: python/ola/Makefile.mk configure.ac echo "location = '${piddatadir}'" > $(top_builddir)/python/ola/PidStoreLocation.py python/ola/Version.py: python/ola/Makefile.mk configure.ac config/ola_version.m4 echo "version = '${VERSION}'" > $(top_builddir)/python/ola/Version.py # TESTS ################################################## python/ola/ClientWrapperTest.sh: python/ola/Makefile.mk mkdir -p $(top_builddir)/python/ola echo "PYTHONPATH=${top_builddir}/python $(PYTHON) ${srcdir}/python/ola/ClientWrapperTest.py; exit \$$?" > $(top_builddir)/python/ola/ClientWrapperTest.sh chmod +x $(top_builddir)/python/ola/ClientWrapperTest.sh python/ola/OlaClientTest.sh: python/ola/Makefile.mk mkdir -p $(top_builddir)/python/ola echo "PYTHONPATH=${top_builddir}/python $(PYTHON) ${srcdir}/python/ola/OlaClientTest.py; exit \$$?" > $(top_builddir)/python/ola/OlaClientTest.sh chmod +x $(top_builddir)/python/ola/OlaClientTest.sh python/ola/PidStoreTest.sh: python/ola/Makefile.mk mkdir -p $(top_builddir)/python/ola echo "PYTHONPATH=${top_builddir}/python TESTDATADIR=$(srcdir)/common/rdm/testdata $(PYTHON) ${srcdir}/python/ola/PidStoreTest.py; exit \$$?" > $(top_builddir)/python/ola/PidStoreTest.sh chmod +x $(top_builddir)/python/ola/PidStoreTest.sh python/ola/RDMTest.sh: python/ola/Makefile.mk mkdir -p $(top_builddir)/python/ola echo "PYTHONPATH=${top_builddir}/python PIDSTOREDIR=$(srcdir)/data/rdm $(PYTHON) ${srcdir}/python/ola/RDMTest.py; exit \$$?" > $(top_builddir)/python/ola/RDMTest.sh chmod +x $(top_builddir)/python/ola/RDMTest.sh dist_check_SCRIPTS += \ python/ola/DUBDecoderTest.py \ python/ola/ClientWrapperTest.py \ python/ola/MACAddressTest.py \ python/ola/OlaClientTest.py \ python/ola/PidStoreTest.py \ python/ola/RDMTest.py \ python/ola/StringUtilsTest.py \ python/ola/TestUtils.py \ python/ola/UIDTest.py if BUILD_PYTHON_LIBS test_scripts += \ python/ola/DUBDecoderTest.py \ python/ola/ClientWrapperTest.sh \ python/ola/MACAddressTest.py \ python/ola/OlaClientTest.sh \ python/ola/PidStoreTest.sh \ python/ola/RDMTest.sh \ python/ola/StringUtilsTest.py \ python/ola/UIDTest.py endif CLEANFILES += \ python/ola/*.pyc \ python/ola/ClientWrapperTest.sh \ python/ola/OlaClientTest.sh \ python/ola/PidStoreTest.sh \ python/ola/RDMTest.sh \ python/ola/__pycache__/* ola-0.10.9/python/ola/UID.py0000664000175000017500000000753114376533110012377 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # UID.py # Copyright (C) 2010 Simon Newton """The UID class.""" __author__ = 'nomis52@gmail.com (Simon Newton)' class Error(Exception): """Base Error Class.""" class UIDOutOfRangeException(Error): """Returned when a UID would be out of range.""" class UID(object): """Represents a UID.""" def __init__(self, manufacturer_id, device_id): self._manufacturer_id = manufacturer_id self._device_id = device_id @property def manufacturer_id(self): return self._manufacturer_id @property def device_id(self): return self._device_id def IsBroadcast(self): return self._device_id == 0xffffffff def __str__(self): return '%04x:%08x' % (self._manufacturer_id, self._device_id) def __hash__(self): return hash((self._manufacturer_id, self._device_id)) def __repr__(self): return self.__str__() def __eq__(self, other): if not isinstance(other, self.__class__): return False return (self.manufacturer_id == other.manufacturer_id and self.device_id == other.device_id) def __lt__(self, other): if other is None: return False if not isinstance(other, self.__class__): return NotImplemented if self.manufacturer_id != other.manufacturer_id: return self.manufacturer_id < other.manufacturer_id else: return self.device_id < other.device_id # These 4 can be replaced with functools:total_ordering when 2.6 is dropped def __le__(self, other): if other is None: return False if not isinstance(other, self.__class__): return NotImplemented return self < other or self == other def __gt__(self, other): if other is None: return True if not isinstance(other, self.__class__): return NotImplemented return not self <= other def __ge__(self, other): if other is None: return True if not isinstance(other, self.__class__): return NotImplemented return not self < other def __ne__(self, other): return not self == other @staticmethod def AllDevices(): return UID(0xffff, 0xffffffff) @staticmethod def VendorcastAddress(manufacturer_id): return UID(manufacturer_id, 0xffffffff) @staticmethod def FromString(uid_str): """Create a new UID from a string. Args: uid_str: The string representation of the UID, e.g. 00f0:12345678. """ parts = uid_str.split(':') if len(parts) != 2: return None try: manufacturer_id = int(parts[0], 16) device_id = int(parts[1], 16) except ValueError: return None if manufacturer_id > 0xffff or device_id > 0xffffffff: return None return UID(manufacturer_id, device_id) @staticmethod def NextUID(uid): if uid == UID.AllDevices(): raise UIDOutOfRangeException(uid) if uid.IsBroadcast(): return UID(uid.manufacturer_id + 1, 0) else: return UID(uid.manufacturer_id, uid.device_id + 1) @staticmethod def PreviousUID(uid): if uid == UID(0, 0): raise UIDOutOfRangeException(uid) if uid.device_id == 0: return UID(uid.manufacturer_id - 1, 0xffffffff) else: return UID(uid.manufacturer_id, uid.device_id - 1) ola-0.10.9/python/ola/ClientWrapper.py0000664000175000017500000002222114376533110014526 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # ClientWrapper.py # Copyright (C) 2005 Simon Newton import array import datetime import fcntl import heapq import logging import os import select import termios import threading import traceback from ola.OlaClient import OlaClient """A simple client wrapper for the OlaClient.""" __author__ = 'nomis52@gmail.com (Simon Newton)' class _Event(object): """An _Event represents a timer scheduled to expire in the future. Args: delay: datetime.timedelta or number of ms before this event fires callback: the callable to run """ def __init__(self, delay, callback): self._run_at = (datetime.datetime.now() + (delay if isinstance(delay, datetime.timedelta) else datetime.timedelta(milliseconds=delay))) self._callback = callback def __eq__(self, other): if not isinstance(other, self.__class__): return False return self._run_at == other._run_at and self._callback == other._callback def __lt__(self, other): if not isinstance(other, self.__class__): return NotImplemented if self._run_at != other._run_at: return self._run_at < other._run_at return self._callback.__name__ < other._callback.__name__ # These 4 can be replaced with functools:total_ordering when 2.6 is dropped def __le__(self, other): if not isinstance(other, self.__class__): return NotImplemented return self < other or self == other def __gt__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self <= other def __ge__(self, other): if not isinstance(other, self.__class__): return NotImplemented return not self < other def __ne__(self, other): return not self == other def __hash__(self): return hash((self._run_at, self._callback)) def TimeLeft(self, now): """Get the time remaining before this event triggers. Returns: The number of seconds (as a float) before this event fires. """ time_delta = self._run_at - now seconds = time_delta.seconds + time_delta.days * 24 * 3600 seconds += time_delta.microseconds / 10.0 ** 6 return seconds def HasExpired(self, now): """Return true if this event has expired.""" return self._run_at < now def Run(self): """Run the callback.""" self._callback() class SelectServer(object): """Similar to include/ola/io/SelectServer.h Manages I/O and Events. This class isn't thread safe, apart from Execute and Stop. """ def __init__(self): self._quit = False self._ss_thread_id = self._GetThreadID() # heap of _Event objects, ordered by time-to-expiry self._events = [] heapq.heapify(self._events) # sockets to track self._read_descriptors = {} self._write_descriptors = {} self._error_descriptors = {} # functions to run in the SelectServer self._functions = [] self._function_list_lock = threading.Lock() # the pipe used to wake up select() from other threads self._local_socket = os.pipe() def __del__(self): os.close(self._local_socket[0]) os.close(self._local_socket[1]) def Execute(self, f): """Execute a function from within the SelectServer. Can be called from any thread. Args: f: The callable to run """ self._function_list_lock.acquire() self._functions.append(f) # can write anything here, this wakes up the select() call os.write(self._local_socket[1], b'a') self._function_list_lock.release() def Terminate(self): """Terminate this SelectServer. Can be called from any thread.""" if self._ss_thread_id == self._GetThreadID(): self._Stop() else: self.Execute(self._Stop) def Reset(self): self._quit = False def StopIfNoEvents(self): if len(self._events) == 0: self._quit = True def AddReadDescriptor(self, fd, callback): """Add a descriptor to the read FD Set. Args: fd: the descriptor to add callback: the callback to run when this descriptor is ready. """ self._read_descriptors[fd] = callback def RemoveReadDescriptor(self, fd): """Remove a socket from the read FD Set. Args: fd: the descriptor to remove """ if fd in self._read_descriptors: del self._read_descriptors[fd] def AddWriteDescriptor(self, fd, callback): """Add a socket to the write FD Set. Args: fd: the descriptor to add callback: the callback to run when this descriptor is ready. """ self._write_descriptors[fd] = callback def RemoveWriteDescriptor(self, fd): """Remove a socket from the write FD Set. Args: fd: the descriptor to remove """ if fd in self._write_descriptors: del self._write_descriptors[fd] def AddErrorDescriptor(self, fd, callback): """Add a descriptor to the error FD Set. Args: fd: the descriptor to add callback: the callback to run when this descriptor is ready. """ self._error_descriptors[fd] = callback def Run(self): """Run the SelectServer. This doesn't return until Terminate() is called. Returns: False if the calling thread isn't the one that created the select server. """ if self._ss_thread_id != self._GetThreadID(): logging.critical( 'SelectServer called in a thread other than the owner. ' 'Owner %d, caller %d' % (self._ss_thread_id, self._GetThreadID())) traceback.print_stack() # Add the internal descriptor, see comments below self.AddReadDescriptor(self._local_socket[0], self._DrainAndExecute) self._quit = False while not self._quit: # default to 1s sleep sleep_time = 1 now = datetime.datetime.now() self._CheckTimeouts(now) if self._quit: sleep_time = 0 if len(self._events): sleep_time = min(sleep_time, self._events[0].TimeLeft(now)) i, o, e = select.select(self._read_descriptors.keys(), self._write_descriptors.keys(), self._error_descriptors.keys(), sleep_time) now = datetime.datetime.now() self._CheckTimeouts(now) self._CheckDescriptors(i, self._read_descriptors) self._CheckDescriptors(o, self._write_descriptors) self._CheckDescriptors(e, self._error_descriptors) # remove the internal socket from the read set to avoid a circular # reference which in turn breaks garbage collection (and leaks the socket # descriptors). self.RemoveReadDescriptor(self._local_socket[0]) def AddEvent(self, delay, callback): """Schedule an event to run in the future. Args: delay: timedelta or number of ms before this event fires callback: The function to run. """ event = _Event(delay, callback) heapq.heappush(self._events, event) def _CheckTimeouts(self, now): """Execute any expired timeouts.""" while len(self._events): event = self._events[0] if event.HasExpired(now): event.Run() else: break heapq.heappop(self._events) def _CheckDescriptors(self, ready_set, all_descriptors): runnables = [] for fd, runnable in all_descriptors.items(): if fd in ready_set: runnables.append(runnable) for runnable in runnables: runnable() def _GetThreadID(self): return threading.current_thread().ident def _Stop(self): self._quit = True def _DrainAndExecute(self): "Run all the queued functions.""" # drain socket buf_ = array.array('i', [0]) if fcntl.ioctl(self._local_socket[0], termios.FIONREAD, buf_, 1) == -1: return os.read(self._local_socket[0], buf_[0]) self._function_list_lock.acquire() functions = list(self._functions) self._functions = [] self._function_list_lock.release() for f in functions: f() class ClientWrapper(object): def __init__(self, socket=None): self._ss = SelectServer() self._client = OlaClient(socket) self._ss.AddReadDescriptor(self._client.GetSocket(), self._client.SocketReady) def Stop(self): self._ss.Terminate() def StopIfNoEvents(self): self._ss.StopIfNoEvents() def Reset(self): self._ss.Reset() def Client(self): return self._client def Run(self): self._ss.Run() def AddEvent(self, time_in_ms, callback): """Schedule an event to run in the future. Args: time_in_ms: An interval in milliseconds when this should run. callback: The function to run. """ self._ss.AddEvent(time_in_ms, callback) ola-0.10.9/python/ola/StringUtils.py0000664000175000017500000000324214376533110014240 00000000000000# This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # StringUtils.py # Copyright (C) 2022 Peter Newman """Common utils for OLA Python string handling""" import sys if sys.version_info >= (3, 0): try: unicode except NameError: unicode = str __author__ = 'nomis52@gmail.com (Simon Newton)' def StringEscape(s): """Escape unprintable characters in a string.""" # TODO(Peter): How does this interact with the E1.20 Unicode flag? # We don't use sys.version_info.major to support Python 2.6. if sys.version_info[0] == 2 and type(s) == str: return s.encode('string-escape') elif sys.version_info[0] == 2 and type(s) == unicode: return s.encode('unicode-escape') elif type(s) == str: # All strings in Python 3 are unicode # This encode/decode pair gets us an escaped string return s.encode('unicode-escape').decode(encoding="ascii", errors="backslashreplace") else: raise TypeError('Only strings are supported not %s' % type(s)) ola-0.10.9/python/ola/MACAddressTest.py0000775000175000017500000001004114376533110014515 00000000000000#!/usr/bin/env python # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # MACAddressTest.py # Copyright (C) 2013 Peter Newman import sys import unittest from ola.MACAddress import MACAddress from ola.TestUtils import allHashNotEqual, allNotEqual """Test cases for the MACAddress class.""" __author__ = 'nomis52@gmail.com (Simon Newton)' class MACAddressTest(unittest.TestCase): def testBasic(self): mac = MACAddress(bytearray([0x01, 0x23, 0x45, 0x67, 0x89, 0xab])) self.assertEqual(b'\x01\x23\x45\x67\x89\xab', bytes(mac.mac_address)) self.assertEqual('01:23:45:67:89:ab', str(mac)) # Python 3 does not allow sorting of incompatible types. # We don't use sys.version_info.major to support Python 2.6. if sys.version_info[0] == 2: self.assertTrue(mac > None) mac2 = MACAddress(bytearray([0x01, 0x23, 0x45, 0x67, 0x89, 0xcd])) self.assertTrue(mac2 > mac) mac3 = MACAddress(bytearray([0x01, 0x23, 0x45, 0x67, 0x88, 0xab])) self.assertTrue(mac > mac3) macs = [mac, mac2, mac3] self.assertEqual([mac3, mac, mac2], sorted(macs)) def testFromString(self): self.assertEqual(None, MACAddress.FromString('')) self.assertEqual(None, MACAddress.FromString('abc')) self.assertEqual(None, MACAddress.FromString(':')) self.assertEqual(None, MACAddress.FromString('0:1:2')) self.assertEqual(None, MACAddress.FromString('12345:1234')) mac = MACAddress.FromString('01:23:45:67:89:ab') self.assertTrue(mac) self.assertEqual(b'\x01\x23\x45\x67\x89\xab', bytes(mac.mac_address)) self.assertEqual('01:23:45:67:89:ab', str(mac)) mac2 = MACAddress.FromString('98.76.54.fe.dc.ba') self.assertTrue(mac2) self.assertEqual(b'\x98\x76\x54\xfe\xdc\xba', bytes(mac2.mac_address)) self.assertEqual('98:76:54:fe:dc:ba', str(mac2)) def testSorting(self): m1 = MACAddress(bytearray([0x48, 0x45, 0xff, 0xff, 0xff, 0xfe])) m2 = MACAddress(bytearray([0x48, 0x45, 0x00, 0x00, 0x02, 0x2e])) m3 = MACAddress(bytearray([0x48, 0x44, 0x00, 0x00, 0x02, 0x2e])) m4 = MACAddress(bytearray([0x48, 0x46, 0x00, 0x00, 0x02, 0x2e])) macs = sorted([m1, m2, None, m3, m4]) self.assertEqual([None, m3, m2, m1, m4], macs) allNotEqual(self, macs) allHashNotEqual(self, macs) def testEquals(self): m1 = MACAddress(bytearray([0x48, 0x45, 0xff, 0xff, 0xff, 0xfe])) m2 = MACAddress(bytearray([0x48, 0x45, 0xff, 0xff, 0xff, 0xfe])) self.assertEqual(m1, m2) def testCmp(self): m2 = MACAddress(bytearray([0x48, 0x45, 0x00, 0x00, 0x02, 0x2e])) m3 = MACAddress(bytearray([0x48, 0x44, 0x00, 0x00, 0x02, 0x2e])) m3a = MACAddress(bytearray([0x48, 0x44, 0x00, 0x00, 0x02, 0x2e])) self.assertEqual(m3, m3a) self.assertTrue(m3 <= m3a) self.assertTrue(m3 >= m3a) self.assertTrue(m3 < m2) self.assertTrue(m2 > m3) self.assertTrue(m3 <= m2) self.assertTrue(m2 >= m3) self.assertTrue(m3 != m2) self.assertFalse(m3 > m2) self.assertFalse(m2 < m3) self.assertFalse(m3 >= m2) self.assertFalse(m2 <= m3) self.assertFalse(m3 == m2) self.assertEqual(m2.__lt__("hello"), NotImplemented) self.assertNotEqual(m2, "hello") # None case self.assertFalse(m3 < None) self.assertTrue(m3 > None) self.assertFalse(m3 <= None) self.assertTrue(m3 >= None) self.assertTrue(m3 is not None) self.assertFalse(m3 is None) if __name__ == '__main__': unittest.main() ola-0.10.9/python/Makefile.mk0000664000175000017500000000070114376533110012667 00000000000000include python/examples/Makefile.mk include python/ola/Makefile.mk python/PyCompileTest.sh: python/Makefile.mk mkdir -p $(top_builddir)/python echo "$(PYTHON) -m compileall $(PYTHON_BUILD_DIRS); exit \$$?" > $(top_builddir)/python/PyCompileTest.sh chmod +x $(top_builddir)/python/PyCompileTest.sh PYTHON_BUILD_DIRS += python if BUILD_PYTHON_LIBS test_scripts += \ python/PyCompileTest.sh endif CLEANFILES += \ python/PyCompileTest.sh ola-0.10.9/TODO0000664000175000017500000000101114376533110007763 00000000000000 See https://github.com/OpenLightingProject/ola/issues?direction=desc&state=open --URGENT-- resend DMX on idle (artnet every 4s) --REQUIRED-- * allow for finer grained channel control (set_block, set_channel) * regression tests for plugins --WISH LIST-- * consider using filters: o split dmx to different universes OUT = SPLIT(1,0,255) o invert channels OUT = INV(1) o different merge modes OUT = HTP(1,2) o change offset / map OUT = OFFSET(1, +50) o scaler (OUT = SCALE(1, %40) ) o clip (OUT = CLIP(1,%80) ) ola-0.10.9/javascript/0000775000175000017500000000000014376533271011540 500000000000000ola-0.10.9/javascript/README0000664000175000017500000000156514376533110012337 00000000000000This javascript uses the Google Closure library - http://closure-library.googlecode.com/ To build it you'll need a copy of closure checked out in the javascript directory. You can do this by running : svn checkout http://closure-library.googlecode.com/svn/trunk/ You'll also need the javascript compiler from http://code.google.com/closure/compiler/ Then to compile the javascript, run: trunk/closure/bin/build/closurebuilder.py --root=trunk/ --root=ola --namespace="ola.Setup" --output_mode=compiled --compiler_jar=compiler.jar --compiler_flags="--compilation_level=ADVANCED_OPTIMIZATIONS" > ../olad/www/ola.js To build the mobile version run: trunk/closure/bin/build/closurebuilder.py --root=trunk/ --root=ola --namespace="ola.mobile" --output_mode=compiled --compiler_jar=compiler.jar --compiler_flags="--compilation_level=ADVANCED_OPTIMIZATIONS" > ../olad/www/mobile.js ola-0.10.9/javascript/new-src/0000775000175000017500000000000014376533271013116 500000000000000ola-0.10.9/javascript/new-src/src/0000775000175000017500000000000014376533271013705 500000000000000ola-0.10.9/javascript/new-src/src/constants.js0000664000175000017500000000173214376533110016172 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.constant('OLA', { 'MIN_CHANNEL_NUMBER': 1, 'MAX_CHANNEL_NUMBER': 512, 'MIN_CHANNEL_VALUE': 0, 'MAX_CHANNEL_VALUE': 255 });ola-0.10.9/javascript/new-src/src/app.js0000664000175000017500000000521714376533110014740 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true */ /* global angular */ var ola = angular.module('olaApp', ['ngRoute']); // AngularJS 1.6 now uses an '!' as the default hashPrefix, breaking // our routes. Following lines revert the default to the previous empty // string. // See https://docs.angularjs.org/guide/migration#commit-aa077e8 ola.config(['$locationProvider', function($locationProvider) { 'use strict'; $locationProvider.hashPrefix(''); }]); ola.config(['$routeProvider', function($routeProvider) { 'use strict'; $routeProvider.when('/', { templateUrl: '/new/views/overview.html', controller: 'overviewCtrl' }).when('/universes/', { templateUrl: '/new/views/universes.html', controller: 'overviewCtrl' }).when('/universe/add', { templateUrl: '/new/views/universe-add.html', controller: 'addUniverseCtrl' }).when('/universe/:id', { templateUrl: '/new/views/universe-overview.html', controller: 'universeCtrl' }).when('/universe/:id/keypad', { templateUrl: '/new/views/universe-keypad.html', controller: 'keypadUniverseCtrl' }).when('/universe/:id/faders', { templateUrl: '/new/views/universe-faders.html', controller: 'faderUniverseCtrl' }).when('/universe/:id/rdm', { templateUrl: '/new/views/universe-rdm.html', controller: 'rdmUniverseCtrl' }).when('/universe/:id/patch', { templateUrl: '/new/views/universe-patch.html', controller: 'patchUniverseCtrl' }).when('/universe/:id/settings', { templateUrl: '/new/views/universe-settings.html', controller: 'settingUniverseCtrl' }).when('/plugins', { templateUrl: '/new/views/plugins.html', controller: 'pluginsCtrl' }).when('/plugin/:id', { templateUrl: '/new/views/plugin-info.html', controller: 'pluginInfoCtrl' }).otherwise({ redirectTo: '/' }); } ]); ola-0.10.9/javascript/new-src/src/factories/0000775000175000017500000000000014376533271015664 500000000000000ola-0.10.9/javascript/new-src/src/factories/ola.js0000664000175000017500000002500414376533110016706 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ // TODO(Dave_o): split this up further ola.factory('$ola', ['$http', '$window', 'OLA', function($http, $window, OLA) { 'use strict'; // TODO(Dave_o): once olad supports json post data postEncode // can go away and the header in post requests too. var postEncode = function(data) { var PostData = []; for (var key in data) { if (data.hasOwnProperty(key)) { if (key === 'd' || key === 'remove_ports' || key === 'modify_ports' || key === 'add_ports') { // this is here so some posts don't get broken // because of removed comma's in arrays PostData.push(key + '=' + data[key]); } else { PostData.push(key + '=' + encodeURIComponent(data[key])); } } } return PostData.join('&'); }; var channelValueCheck = function(i) { i = parseInt(i, 10); if (i < OLA.MIN_CHANNEL_VALUE) { i = OLA.MIN_CHANNEL_VALUE; } else if (i > OLA.MAX_CHANNEL_VALUE) { i = OLA.MAX_CHANNEL_VALUE; } return i; }; var dmxConvert = function(dmx) { var strip = true; var integers = []; for (var i = OLA.MAX_CHANNEL_NUMBER; i >= OLA.MIN_CHANNEL_NUMBER; i--) { var value = channelValueCheck(dmx[i - 1]); if (value > OLA.MIN_CHANNEL_VALUE || !strip || i === OLA.MIN_CHANNEL_NUMBER) { integers[i - 1] = value; strip = false; } } return integers.join(','); }; return { get: { ItemList: function() { return $http.get('/json/universe_plugin_list') .then(function(response) { return response.data; }); }, ServerInfo: function() { return $http.get('/json/server_stats') .then(function(response) { return response.data; }); }, Ports: function() { return $http.get('/json/get_ports') .then(function(response) { return response.data; }); }, PortsId: function(id) { return $http({ method: 'GET', url: '/json/get_ports', params: { 'id': id } }) .then(function(response) { return response.data; }); }, InfoPlugin: function(id) { return $http({ method: 'GET', url: '/json/plugin_info', params: { 'id': id } }) .then(function(response) { return response.data; }); }, Dmx: function(id) { return $http({ method: 'GET', url: '/get_dmx', params: { 'u': id } }) .then(function(response) { return response.data; }); }, UniverseInfo: function(id) { return $http({ method: 'GET', url: '/json/universe_info', params: { 'id': id } }) .then(function(response) { return response.data; }); } }, post: { ModifyUniverse: function(data) { return $http({ method: 'POST', url: '/modify_universe', data: postEncode(data), headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }).then(function(response) { return response.data; }); }, AddUniverse: function(data) { return $http({ method: 'POST', url: '/new_universe', data: postEncode(data), headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }).then(function(response) { return response.data; }); }, Dmx: function(universe, dmx) { var data = { u: universe, d: dmxConvert(dmx) }; return $http({ method: 'POST', url: '/set_dmx', data: postEncode(data), headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }).then(function(response) { return response.data; }); }, PluginState: function(pluginId, state) { var data = { state: state, plugin_id: pluginId }; return $http({ method: 'POST', url: '/set_plugin_state', data: postEncode(data), headers: { 'Content-Type': 'application/x-www-form-urlencoded' } }).then(function(response) { return response.data; }); } }, action: { Shutdown: function() { return $http.get('/quit') .then(function(response) { return response.data; }); }, Reload: function() { return $http.get('/reload') .then(function(response) { return response.data; }); }, ReloadPids: function() { return $http.get('/reload_pids') .then(function(response) { return response.data; }); } }, rdm: { // /json/rdm/section_info?id=[universe]&uid=[uid]§ion=[section] GetSectionInfo: function(universe, uid, section) { return $http({ method: 'GET', url: '/json/rdm/section_info', params: { 'id': universe, 'uid': uid, 'section': section } }) .then(function(response) { return response.data; }); }, // /json/rdm/set_section_info?id=[universe]&uid=[uid]§ion=[section] SetSection: function(universe, uid, section, hint, option) { return $http({ method: 'GET', url: '/json/rdm/set_section_info', params: { 'id': universe, 'uid': uid, 'section': section, 'hint': hint, 'int': option } }) .then(function(response) { return response.data; }); }, // /json/rdm/supported_pids?id=[universe]&uid=[uid] GetSupportedPids: function(universe, uid) { return $http({ method: 'GET', url: '/json/rdm/supported_pids', params: { 'id': universe, 'uid': uid } }) .then(function(response) { return response.data; }); }, // /json/rdm/supported_sections?id=[universe]&uid=[uid] GetSupportedSections: function(universe, uid) { return $http({ method: 'GET', url: '/json/rdm/supported_sections', params: { 'id': universe, 'uid': uid } }) .then(function(response) { return response.data; }); }, // /json/rdm/uid_identify_device?id=[universe]&uid=[uid] UidIdentifyDevice: function(universe, uid) { return $http({ method: 'GET', url: '/json/rdm/uid_identify_device', params: { 'id': universe, 'uid': uid } }) .then(function(response) { return response.data; }); }, // /json/rdm/uid_info?id=[universe]&uid=[uid] UidInfo: function(universe, uid) { return $http({ method: 'GET', url: '/json/rdm/uid_info', params: { 'id': universe, 'uid': uid } }) .then(function(response) { return response.data; }); }, // /json/rdm/uid_personalities?id=[universe]&uid=[uid] UidPersonalities: function(universe, uid) { return $http({ method: 'GET', url: '/json/rdm/uid_personalities', params: { 'id': universe, 'uid': uid } }) .then(function(response) { return response.data; }); }, // /json/rdm/uids?id=[universe] Uids: function(universe) { return $http({ method: 'GET', url: '/json/rdm/uids', params: { 'id': universe } }) .then(function(response) { return response.data; }); }, // /rdm/run_discovery?id=[universe]&incremental=true RunDiscovery: function(universe, incremental) { return $http({ method: 'GET', url: '/rdm/run_discovery', params: { 'id': universe, 'incremental': incremental } }) .then(function(response) { return response.data; }); } }, error: { modal: function(body, title) { if (typeof body !== 'undefined') { $('#errorModalBody').text(body); } else { $('#errorModalBody').text('There has been an error'); } if (typeof title !== 'undefined') { $('#errorModalLabel').text(title); } else { $('#errorModalLabel').text('Error'); } $('#errorModal').modal('show'); } } }; } ]);ola-0.10.9/javascript/new-src/src/filters/0000775000175000017500000000000014376533271015355 500000000000000ola-0.10.9/javascript/new-src/src/filters/start_form.js0000664000175000017500000000176314376533110020012 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.filter('startFrom', function() { 'use strict'; return function(input, start) { start = parseInt(start, 10); return input.slice(start); }; });ola-0.10.9/javascript/new-src/src/controllers/0000775000175000017500000000000014376533271016253 500000000000000ola-0.10.9/javascript/new-src/src/controllers/keypad_universe.js0000664000175000017500000001003414376533110021714 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.controller('keypadUniverseCtrl', ['$scope', '$ola', '$routeParams', 'OLA', function($scope, $ola, $routeParams, OLA) { 'use strict'; $scope.Universe = $routeParams.id; var regexkeypad; /*jscs:disable maximumLineLength */ /*jshint ignore:start */ // The following regex doesn't fit in the 80 character limit so to avoid // errors from the linters they are disabled on this part regexkeypad = /^(?:([0-9]{1,3})(?:\s(THRU)\s(?:([0-9]{1,3}))?)?(?:\s(@)\s(?:([0-9]{1,3}|FULL))?)?)/; /*jscs:enable maximumLineLength */ /* jshint ignore:end */ var check = { channelValue: function(value) { return OLA.MIN_CHANNEL_VALUE <= value && value <= OLA.MAX_CHANNEL_VALUE; }, channelNumber: function(value) { return OLA.MIN_CHANNEL_NUMBER <= value && value <= OLA.MAX_CHANNEL_NUMBER; }, regexGroups: function(result) { if (result[1] !== undefined) { var check1 = this.channelNumber(parseInt(result[1], 10)); if (!check1) { return false; } } if (result[3] !== undefined) { var check2 = this.channelNumber(parseInt(result[3], 10)); if (!check2) { return false; } } if (result[5] !== undefined && result[5] !== 'FULL') { var check3 = this.channelValue(parseInt(result[5], 10)); if (!check3) { return false; } } return true; } }; $scope.field = ''; $scope.input = function(input) { var tmpField; if (input === 'backspace') { tmpField = $scope.field.substr(0, $scope.field.length - 1); } else { tmpField = $scope.field + input; } var fields = regexkeypad.exec(tmpField); if (fields === null) { $scope.field = ''; } else if (check.regexGroups(fields)) { $scope.field = fields[0]; } }; $scope.submit = function() { var dmx = []; var input = $scope.field; var result = regexkeypad.exec(input); if (result !== null && check.regexGroups(result)) { var begin = parseInt(result[1], 10); var end = result[3] ? parseInt(result[3], 10) : parseInt(result[1], 10); var value = (result[5] === 'FULL') ? OLA.MAX_CHANNEL_VALUE : parseInt(result[5], 10); if (begin <= end && check.channelValue(value)) { $ola.get.Dmx($scope.Universe).then(function(data) { for (var i = 0; i < OLA.MAX_CHANNEL_NUMBER; i++) { if (i < data.dmx.length) { dmx[i] = data.dmx[i]; } else { dmx[i] = OLA.MIN_CHANNEL_VALUE; } } for (var j = begin; j <= end; j++) { dmx[j - 1] = value; } $ola.post.Dmx($scope.Universe, dmx); $scope.field = ''; }); return true; } else { return false; } } else { return false; } }; } ]);ola-0.10.9/javascript/new-src/src/controllers/header.js0000664000175000017500000000251214376533110017751 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true */ /* global ola */ ola.controller('headerControl', ['$scope', '$ola', '$routeParams', '$window', function($scope, $ola, $routeParams, $window) { 'use strict'; $scope.header = { tab: '', id: $routeParams.id, name: '' }; $ola.get.UniverseInfo($routeParams.id) .then(function(data) { $scope.header.name = data.name; }); var hash = $window.location.hash; $scope.header.tab = hash.replace(/#\/universe\/[0-9]+\/?/, ''); } ]);ola-0.10.9/javascript/new-src/src/controllers/universe.js0000664000175000017500000000320514376533110020361 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.controller('universeCtrl', ['$scope', '$ola', '$routeParams', '$interval', 'OLA', function($scope, $ola, $routeParams, $interval, OLA) { 'use strict'; $scope.dmx = []; $scope.Universe = $routeParams.id; var interval = $interval(function() { $ola.get.Dmx($scope.Universe).then(function(data) { for (var i = 0; i < OLA.MAX_CHANNEL_NUMBER; i++) { $scope.dmx[i] = (typeof data.dmx[i] === 'number') ? data.dmx[i] : OLA.MIN_CHANNEL_VALUE; } }); }, 100); $scope.$on('$destroy', function() { $interval.cancel(interval); }); $scope.getColor = function(i) { if (i > 140) { return 'black'; } else { return 'white'; } }; } ]);ola-0.10.9/javascript/new-src/src/controllers/menu.js0000664000175000017500000000263314376533110017471 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.controller('menuCtrl', ['$scope', '$ola', '$interval', '$location', function($scope, $ola, $interval, $location) { 'use strict'; $scope.Items = {}; $scope.Info = {}; $scope.goTo = function(url) { $location.path(url); }; var getData = function() { $ola.get.ItemList().then(function(data) { $scope.Items = data; }); $ola.get.ServerInfo().then(function(data) { $scope.Info = data; document.title = data.instance_name + ' - ' + data.ip; }); }; getData(); $interval(getData, 10000); }]);ola-0.10.9/javascript/new-src/src/controllers/patch_universe.js0000664000175000017500000000206514376533110021543 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.controller('patchUniverseCtrl', ['$scope', '$ola', '$routeParams', function($scope, $ola, $routeParams) { 'use strict'; $scope.Universe = $routeParams.id; //TODO(Dave_o): implement me! } ]);ola-0.10.9/javascript/new-src/src/controllers/setting_universe.js0000664000175000017500000000633314376533110022123 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.controller('settingUniverseCtrl', ['$scope', '$ola', '$routeParams', function($scope, $ola, $routeParams) { 'use strict'; $scope.loadData = function() { $scope.Data = { old: {}, model: {}, Remove: [], Add: [] }; $scope.Data.old.id = $scope.Data.model.id = $routeParams.id; $ola.get.PortsId($routeParams.id).then(function(data) { $scope.DeactivePorts = data; }); $ola.get.UniverseInfo($routeParams.id).then(function(data) { $scope.Data.old.name = $scope.Data.model.name = data.name; $scope.Data.old.merge_mode = data.merge_mode; $scope.Data.model.merge_mode = data.merge_mode; $scope.ActivePorts = data.output_ports.concat(data.input_ports); $scope.Data.old.ActivePorts = data.output_ports.concat(data.input_ports); for (var i = 0; i < $scope.ActivePorts.length; ++i) { $scope.Data.Remove[i] = ''; } }); }; $scope.loadData(); $scope.Save = function() { var a = {}; a.id = $scope.Data.model.id; a.name = $scope.Data.model.name; a.merge_mode = $scope.Data.model.merge_mode; a.add_ports = $.grep($scope.Data.Add, Boolean).join(','); a.remove_ports = $.grep($scope.Data.Remove, Boolean).join(','); var modified = []; $scope.ActivePorts.forEach(function(element, index) { if ($scope.Data.Remove.indexOf($scope.ActivePorts[index].id) === -1) { var port = $scope.ActivePorts[index]; var port_old = $scope.Data.old.ActivePorts[index]; if (port.priority.current_mode === 'static') { if (0 < port.priority.value < 100) { a[port.id + '_priority_value'] = port.priority.value; if (modified.indexOf(port.id) === -1) { modified.push(port.id); } } } if (port_old.priority.current_mode !== port.priority.current_mode) { a[port.id + '_priority_mode'] = port.priority.current_mode; if (modified.indexOf(port.id) === -1) { modified.push(port.id); } } } }); a.modify_ports = $.grep(modified, Boolean).join(','); $ola.post.ModifyUniverse(a); $scope.loadData(); }; } ]);ola-0.10.9/javascript/new-src/src/controllers/add_universe.js0000664000175000017500000000542614376533110021200 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.controller('addUniverseCtrl', ['$scope', '$ola', '$window', '$location', function($scope, $ola, $window, $location) { 'use strict'; $scope.Ports = {}; $scope.addPorts = []; $scope.Universes = []; $scope.Class = ''; $scope.Data = { id: 0, name: '', add_ports: '' }; $ola.get.ItemList().then(function(data) { for (var u in data.universes) { if (data.universes.hasOwnProperty(u)) { if ($scope.Data.id === parseInt(data.universes[u].id, 10)) { $scope.Data.id++; } $scope.Universes.push(parseInt(data.universes[u].id, 10)); } } }); $scope.Submit = function() { if (typeof $scope.Data.id === 'number' && $scope.Data.add_ports !== '' && $scope.Universes.indexOf($scope.Data.id) === -1) { if ($scope.Data.name === undefined || $scope.Data.name === '') { $scope.Data.name = 'Universe ' + $scope.Data.id; } $ola.post.AddUniverse($scope.Data); $location.path('/universe/' + $scope.Data.id); } else if ($scope.Universes.indexOf($scope.Data.id) !== -1) { $ola.error.modal('Universe ID already exists.'); } else if ($scope.Data.add_ports === undefined || $scope.Data.add_ports === '') { $ola.error.modal('There are no ports selected for the universe. ' + 'This is required.'); } }; $ola.get.Ports().then(function(data) { $scope.Ports = data; }); $scope.getDirection = function(direction) { if (direction) { return 'Output'; } else { return 'Input'; } }; $scope.updateId = function() { if ($scope.Universes.indexOf($scope.Data.id) !== -1) { $scope.Class = 'has-error'; } else { $scope.Class = ''; } }; $scope.TogglePort = function() { $scope.Data.add_ports = $window.$.grep($scope.addPorts, Boolean).join(','); }; } ]);ola-0.10.9/javascript/new-src/src/controllers/plugin_info.js0000664000175000017500000000323214376533110021032 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.controller('pluginInfoCtrl', ['$scope', '$routeParams', '$ola', function($scope, $routeParams, $ola) { 'use strict'; $ola.get.InfoPlugin($routeParams.id).then(function(data) { $scope.active = data.active; $scope.enabled = data.enabled; $scope.name = data.name; //TODO(Dave_o): clean this up and use proper angular var description = document.getElementById('description'); description.textContent = data.description; description.innerHTML = description.innerHTML.replace(/\\n/g, '
'); }); $scope.stateColor = function(val) { if (val) { return { 'background-color': 'green' }; } else { return { 'background-color': 'red' }; } }; } ]);ola-0.10.9/javascript/new-src/src/controllers/rdm_universe.js0000664000175000017500000000221314376533110021221 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.controller('rdmUniverseCtrl', ['$scope', '$ola', '$routeParams', function($scope, $ola, $routeParams) { 'use strict'; //get: // /json/rdm/set_section_info?id={{id}}&uid={{uid}}§ion={{section}}&hint={{hint}}&address={{address}} $scope.Universe = $routeParams.id; } ]);ola-0.10.9/javascript/new-src/src/controllers/overview.js0000664000175000017500000000260414376533110020371 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.controller('overviewCtrl', ['$scope', '$ola', '$location', function($scope, $ola, $location) { 'use strict'; $scope.Info = {}; $scope.Universes = {}; $ola.get.ItemList().then(function(data) { $scope.Universes = data.universes; }); $ola.get.ServerInfo().then(function(data) { $scope.Info = data; }); $scope.Shutdown = function() { $ola.action.Shutdown().then(); }; $scope.goUniverse = function(id) { $location.path('/universe/' + id); }; } ]);ola-0.10.9/javascript/new-src/src/controllers/fader_universe.js0000664000175000017500000000663414376533110021533 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.controller('faderUniverseCtrl', ['$scope', '$ola', '$routeParams', '$window', '$interval', 'OLA', function($scope, $ola, $routeParams, $window, $interval, OLA) { 'use strict'; $scope.get = []; $scope.list = []; $scope.last = 0; $scope.offset = 0; $scope.send = false; $scope.OLA = OLA; $scope.Universe = $routeParams.id; for (var i = 0; i < OLA.MAX_CHANNEL_NUMBER; i++) { $scope.list[i] = i; $scope.get[i] = OLA.MIN_CHANNEL_VALUE; } $scope.light = function(j) { for (var i = 0; i < OLA.MAX_CHANNEL_NUMBER; i++) { $scope.get[i] = j; } $scope.change(); }; var dmxGet = $interval(function() { $ola.get.Dmx($scope.Universe).then(function(data) { for (var i = 0; i < OLA.MAX_CHANNEL_NUMBER; i++) { if (i < data.dmx.length) { $scope.get[i] = data.dmx[i]; } else { $scope.get[i] = OLA.MIN_CHANNEL_VALUE; } } $scope.send = true; }); }, 1000); $scope.getColor = function(i) { if (i > 140) { return 'black'; } else { return 'white'; } }; $scope.ceil = function(i) { return $window.Math.ceil(i); }; $scope.change = function() { $ola.post.Dmx($scope.Universe, $scope.get); }; $scope.page = function(d) { if (d === 1) { var offsetLimit = $window.Math.ceil(OLA.MAX_CHANNEL_NUMBER / $scope.limit); if (($scope.offset + 1) !== offsetLimit) { $scope.offset++; } } else if (d === OLA.MIN_CHANNEL_VALUE) { if ($scope.offset !== OLA.MIN_CHANNEL_VALUE) { $scope.offset--; } } }; $scope.getWidth = function() { var width = $window.Math.floor(($window.innerWidth * 0.99) / $scope.limit); var amount = width - (52 / $scope.limit); return amount + 'px'; }; $scope.getLimit = function() { var width = ($window.innerWidth * 0.99) / 66; return $window.Math.floor(width); }; $scope.limit = $scope.getLimit(); $scope.width = { 'width': $scope.getWidth() }; $window.$($window).resize(function() { $scope.$apply(function() { $scope.limit = $scope.getLimit(); $scope.width = { width: $scope.getWidth() }; }); }); $scope.$on('$destroy', function() { $interval.cancel(dmxGet); }); } ]);ola-0.10.9/javascript/new-src/src/controllers/plugins.js0000664000175000017500000000340714376533110020206 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new OLA web UI. * Copyright (C) 2015 Dave Olsthoorn */ /*jshint browser: true, jquery: true*/ /* global ola */ ola.controller('pluginsCtrl', ['$scope', '$ola', '$location', function($scope, $ola, $location) { 'use strict'; $scope.Items = {}; $scope.active = []; $scope.enabled = []; $scope.getInfo = function() { $ola.get.ItemList() .then(function(data) { $scope.Items = data; }); }; $scope.getInfo(); $scope.Reload = function() { $ola.action.Reload(); $scope.getInfo(); }; $scope.go = function(id) { $location.path('/plugin/' + id); }; $scope.changeStatus = function(id, current) { $ola.post.PluginState(id, current); $scope.getInfo(); }; $scope.getStyle = function(style) { if (style) { return { 'background-color': 'green' }; } else { return { 'background-color': 'red' }; } }; } ]); ola-0.10.9/javascript/new-src/Gruntfile.js0000664000175000017500000001032714376533110015326 00000000000000/*jshint node: true*/ module.exports = function(grunt) { 'use strict'; grunt.initConfig({ pkg: grunt.file.readJSON('package.json'), bower: { dev: { options: { targetDir: '../../olad/www/new/libs', install: true, copy: true, cleanup: true, layout: 'byComponent' } } }, uglify: { build: { files: [{ dest: '../../olad/www/new/js/app.min.js', src: [ 'src/app.js', 'src/controllers/menu.js', 'src/controllers/patch_universe.js', 'src/controllers/rdm_universe.js', 'src/controllers/universe.js', 'src/controllers/fader_universe.js', 'src/controllers/keypad_universe.js', 'src/controllers/plugins.js', 'src/controllers/add_universe.js', 'src/controllers/plugin_info.js', 'src/controllers/setting_universe.js', 'src/controllers/header.js', 'src/controllers/overview.js', 'src/constants.js', 'src/factories/ola.js', 'src/filters/start_form.js' ] }], options: { mangle: true, sourceMap: true, sourceMapName: '../../olad/www/new/js/app.min.js.map' } } }, jshint: { dev: [ 'src/app.js', 'Gruntfile.js', 'src/controllers/menu.js', 'src/controllers/patch_universe.js', 'src/controllers/rdm_universe.js', 'src/controllers/universe.js', 'src/controllers/fader_universe.js', 'src/controllers/keypad_universe.js', 'src/controllers/plugins.js', 'src/controllers/add_universe.js', 'src/controllers/plugin_info.js', 'src/controllers/setting_universe.js', 'src/controllers/header.js', 'src/controllers/overview.js', 'src/constants.js', 'src/factories/ola.js', 'src/filters/start_form.js' ], options: { jshintrc: true } }, jscs: { src: [ 'src/app.js', 'Gruntfile.js', 'src/controllers/menu.js', 'src/controllers/patch_universe.js', 'src/controllers/rdm_universe.js', 'src/controllers/universe.js', 'src/controllers/fader_universe.js', 'src/controllers/keypad_universe.js', 'src/controllers/plugins.js', 'src/controllers/add_universe.js', 'src/controllers/plugin_info.js', 'src/controllers/setting_universe.js', 'src/controllers/header.js', 'src/controllers/overview.js', 'src/constants.js', 'src/factories/ola.js', 'src/filters/start_form.js' ], options: { config: true, verbose: true } }, watch: { build: { files: [ 'Gruntfile.js', 'src/controllers/menu.js', 'src/controllers/patch_universe.js', 'src/controllers/rdm_universe.js', 'src/controllers/universe.js', 'src/controllers/fader_universe.js', 'src/controllers/keypad_universe.js', 'src/controllers/plugins.js', 'src/controllers/add_universe.js', 'src/controllers/plugin_info.js', 'src/controllers/setting_universe.js', 'src/controllers/header.js', 'src/controllers/overview.js', 'src/constants.js', 'src/factories/ola.js', 'src/app.js', 'src/filters/start_form.js', 'css/style.css' ], tasks: ['test', 'uglify:build', 'cssmin:build'], options: { atBegin: true } } }, cssmin: { build: { files: [{ src: 'css/style.css', dest: '../../olad/www/new/css/style.min.css' }] } } }); grunt.loadNpmTasks('grunt-contrib-jshint'); grunt.loadNpmTasks('grunt-contrib-uglify'); grunt.loadNpmTasks('grunt-contrib-watch'); grunt.loadNpmTasks('grunt-contrib-cssmin'); grunt.loadNpmTasks('grunt-bower-task'); grunt.loadNpmTasks('grunt-jscs'); grunt.registerTask('dev', ['watch:build']); grunt.registerTask('test', ['jshint:dev', 'jscs']); grunt.registerTask('build', ['test', 'uglify:build', 'cssmin:build']); }; ola-0.10.9/javascript/new-src/package.json0000664000175000017500000000064414376533110015320 00000000000000{ "name": "OLA", "license": "GPL-2.0+", "repository": "OpenLightingProject/ola", "devDependencies": { "grunt": "~0.4.5", "grunt-bower-task": "^0.4.0", "grunt-contrib-cssmin": "^0.11.0", "grunt-contrib-jshint": "^1.1.0", "grunt-contrib-uglify": "^0.7.0", "grunt-contrib-watch": "^0.6.1", "grunt-jscs": "^1.8.0", "olp-javascript-style": "OpenLightingProject/javascript-style" } } ola-0.10.9/javascript/new-src/.jscsrc0000664000175000017500000000007214376533110014315 00000000000000{ "plugins": ["olp-javascript-style"], "preset": "OLP" }ola-0.10.9/javascript/new-src/bower.json0000664000175000017500000000112114376533110015032 00000000000000{ "name": "OLA", "authors": [ "Dave Olsthoorn " ], "description": "The new OLA web-ui", "license": "GPL", "private": true, "dependencies": { "angular": "~1.8.3", "bootstrap": "~3.3.1", "angular-route": "~1.8.3" }, "exportsOverride": { "angular": { "js": ["*.min.js"] }, "jquery": { "js": "dist/*.min.js" }, "bootstrap": { "js": "dist/js/bootstrap.min.js", "css": "dist/css/bootstrap.min.css", "fonts": "dist/fonts/" }, "angular-route": { "js": ["*.min.js"] } } } ola-0.10.9/javascript/new-src/README.md0000664000175000017500000001070414376533110014307 00000000000000# web-interface the web interface for ola is built using - [angularjs](http://angularjs.com) - [bootstrap](http://getbootstrap.com) - [jquery](http://jquery.com) which are all under the MIT license and thus can be included. ## Compile web-interface [grunt](http://gruntjs.com/) is used for the compilation process but first [node](http://nodejs.org/) must be installed for grunt and its plug-ins to be able to work and be downloaded so when node is installed first open a terminal and navigate to this directory then run ```bash npm install ``` and optionally ```bash sudo npm install --global grunt-cli ``` to give you a nicer way to run the grunt task runner from the command-line ```bash grunt build ``` to generate the minified versions of app.js and style.css ## Karma and Coveralls.io in the future there is the ability to do coverage tests with grunt plug-ins such as [grunt-karma-coveralls](https://github.com/mattjmorrison/grunt-karma-coveralls) which is a plugin for [karma](http://karma-runner.github.io/) ## Angular JS License The MIT License Copyright (c) 2010-2012 Google, Inc. http://angularjs.org Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## Bootstrap License The MIT License (MIT) Copyright (c) 2011-2015 Twitter, Inc Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ## jQuery license Copyright jQuery Foundation and other contributors, https://jquery.org/ This software consists of voluntary contributions made by many individuals. For exact contribution history, see the revision history available at https://github.com/jquery/jquery Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ola-0.10.9/javascript/new-src/css/0000775000175000017500000000000014376533271013706 500000000000000ola-0.10.9/javascript/new-src/css/style.css0000664000175000017500000001321514376533110015472 00000000000000.keypad { width: 300px; text-align: center; right: 0; left: 0; margin-left: auto; margin-right: auto; margin-top: 5px; } .backspace.btn { width: 50px; margin: 2px; } .keypad-keys { margin-right: 7%; margin-left: 7%; margin-bottom: 7%; width: 86%; } .keypad-field.static-fake { display: inline-block; vertical-align: middle; padding-top: 5%; width: 190px; height: 50px; margin: 2px; } .keypad-keys .btn { width: 100%; } .btn-keypad { color: #333; background-color: #fff; border-color: #ccc; height: 50px; } .fader-fader { writing-mode: vertical-rl; -webkit-appearance: slider-vertical; } .fader-group { display: inline-block; text-align: center; border: solid #67a7e3 1px; border-radius: 4px; margin: 1px; } .faders { text-align: center; padding: 1px; } button.col-xs-3, button.col-xs-3:active, button.col-xs-3:focus { color: #ffffff; background-color: #67a7e3; border-color: transparent; } .col-xs-2.ng-binding { text-align: center; color: #ffffff; background-color: #67a7e3; height: 26px; line-height: 2; font-weight: bold; } .on, .off { color: #ffffff; background-color: #67a7e3; border-color: transparent; } .right-col { border-bottom-right-radius: 4px; border-top-right-radius: 4px; } .left-col { border-bottom-left-radius: 4px; border-top-left-radius: 4px; } .navigate { padding-left: 0; padding-right: 0; padding-bottom: 15px; height: 41px; } .navigate > .col-xs-3, .navigate > .col-xs-2 { height: 100%; outline: none!important; } .value-div { display: inline-block; } .value-span { display: inline-block; font-size: 11px; border-bottom: 1px solid #67a7e3; border-right: 1px solid #67a7e3; width: 20px; text-align: center; margin: 1px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; border-top-right-radius: 4px } .row { padding: 5px; text-align: center; } .index, .value { text-align: center; width: 100%; height: 50%; } .channel { width: 30px; font-size: 10px; text-align: center; display: inline-block; border: 1px solid #337ab7; border-radius: 4px; } .status { padding: 5px; text-align: center; border: solid black 1px; } .status-light { width: 20px; } .status-light, .status { display: inline-block; border-radius: 20px; } th.top-table, tr.special-mouse > td { text-align: center; padding: 8px; } .plugin-table { text-align: center; width: 100%; margin-bottom: 10px; } .round-corners { border: solid black 1px; border-radius: 10px; } .top-table { border-bottom: solid black 1px; } tr.striped-table:nth-of-type(even) { background-color: #F8F8F8; border-top: solid lightgrey 1px; border-bottom: solid lightgrey 1px; } .special-mouse { cursor: pointer; } .navbar-info { margin-top: 8px; margin-bottom: 8px; font-size: 12px; text-align: center; } .navbar-desktop { float: right!important; } @media (min-width: 768px) { .navbar-mobile { display: none; } .number { width: 50px !important; } } @media (max-width: 768px) { .navbar-desktop { display: none; } .save-settings { width: 100%; } } div.checkbox-tr { text-align: center; vertical-align: middle; } table.info > tbody > tr > td { border-bottom: solid grey 1px; padding-left: 5px; padding-right: 5px; } table.table > tbody > tr > td.left-table { text-align: left; } .settings-table { text-align: left; } .settings-table > table { width: 100%; } input.priority { width: 70px; } select.priority { width: 90px; display: inline; } .caption-overview { width: 49%; display: inline-block; } .button-caption { text-align: right; } .btn-grey { background-color: #d3d3d3; color: #333; border-color: #BABABA; } td.align { text-align: left; } .plugin-icon { color: #898989; } div#header-universe { padding-bottom: 10px; } div#header-universe > h4 { display: inline; padding-right: 10px; } div#header-universe > div { color: lightgray; display: inline; } .static-fake { height: 34px; padding: 6px 12px; background-color: #eee; border: 1px solid #ccc; border-radius: 4px; box-shadow: inset 0 1px 1px rgba(0, 0, 0, .075); -webkit-transition: border-color ease-in-out .15s, -webkit-box-shadow ease-in-out .15s; } .table-condensed>tbody>tr>td, .table-condensed>tbody>tr>th, .table-condensed>tfoot>tr>td, .table-condensed>tfoot>tr>th, .table-condensed>thead>tr>td, .table-condensed>thead>tr>th { padding: 3px; } .number { cursor: text!important; } .settings, .input-group, .save-settings { margin-top: 5px; } /* Begin custom checkboxes for plugins page */ /* Hide checkbox */ input.form-control[type="checkbox"] { display: none; } /* Mock checkbox in label */ input.form-control[type="checkbox"] + label span.glyphicon:before { width: 20px; height: 20px; border-radius: 4px; border: solid #ccc 1px; content: "\e014"; /* Use cross as standard glyph */ color: #d9534f; background-color: #fff; cursor: pointer; } /* Use check glyph if checked */ input.form-control[type="checkbox"]:checked + label span.glyphicon:before { content: "\e013"; color: #5cb85c; } /* grey out checkbox if disabled */ input.form-control[type="checkbox"][disabled] + label span.glyphicon:before { color: darkgrey; } /* End custom checkboxes */ label.fake-check { margin-top: 5px; margin-bottom: 0; } .nav-tabs { overflow-x: auto; overflow-y: hidden; display: -webkit-box; display: -moz-box; } .nav-tabs>li { float:none; } .nav-tabs::-webkit-scrollbar { -webkit-appearance: none; } .nav-tabs::-webkit-scrollbar:vertical { width: 12px; } .nav-tabs::-webkit-scrollbar:horizontal { height: 12px; } .nav-tabs::-webkit-scrollbar-thumb { background-color: rgba(0, 0, 0, .5); border-radius: 10px; border: 2px solid #ffffff; } .nav-tabs::-webkit-scrollbar-track { border-radius: 10px; background-color: #ffffff; }ola-0.10.9/javascript/new-src/.jshintrc0000664000175000017500000000054714376533110014661 00000000000000{ "nonew": true, "curly": true, "latedef": true, "unused": true, "noarg": true, "indent": 2, "trailing": true, "forin": true, "noempty": true, "quotmark": "single", "eqeqeq": true, "strict": true, "undef": true, "bitwise": true, "newcap": true, "immed": true, "es3": true, "maxlen": 80, "nonbsp": true, "freeze": true }ola-0.10.9/javascript/ola/0000775000175000017500000000000014376533272012314 500000000000000ola-0.10.9/javascript/ola/home_frame.js0000664000175000017500000002076314376533110014673 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The home frame. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.net.HttpStatus'); goog.require('goog.ui.Component'); goog.require('goog.ui.CustomButton'); goog.require('ola.BaseFrame'); goog.require('ola.Dialog'); goog.require('ola.LoggerWindow'); goog.require('ola.UniverseItem'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.require('ola.common.ServerStats'); goog.require('ola.common.SortedList'); goog.provide('ola.HomeFrame'); /** * A container that uses the tbody element * @constructor * @param {goog.dom.DomHelper=} opt_domHelper An optional DOM helper. */ ola.TableContainer = function(opt_domHelper) { goog.ui.Component.call(this, opt_domHelper); }; goog.inherits(ola.TableContainer, goog.ui.Component); /** * Create the dom for the TableContainer * @param {Element} container Not used. */ ola.TableContainer.prototype.createDom = function(container) { this.decorateInternal(this.dom_.createElement('tbody')); }; /** * Decorate an existing element * @param {Element} element the element to decorate. */ ola.TableContainer.prototype.decorateInternal = function(element) { ola.TableContainer.superClass_.decorateInternal.call(this, element); }; /** * Check if we can decorate an element. * @param {Element} element the dom element to check. * @return {boolean} True if the element is a TBODY. */ ola.TableContainer.prototype.canDecorate = function(element) { return element.tagName == 'TBODY'; }; /** * A line in the active universe list. * @param {ola.UniverseItem} universe_item the item to use for this row. * @constructor * @param {goog.dom.DomHelper=} opt_domHelper An optional DOM helper. */ ola.UniverseRow = function(universe_item, opt_domHelper) { goog.ui.Component.call(this, opt_domHelper); this._item = universe_item; }; goog.inherits(ola.UniverseRow, goog.ui.Component); /** * Return the underlying UniverseItem * @return {ola.UniverseItem} The underlying item object. */ ola.UniverseRow.prototype.item = function() { return this._item; }; /** * This component can't be used to decorate * @return {boolean} always false. */ ola.UniverseRow.prototype.canDecorate = function() { return false; }; /** * Create the dom for this component */ ola.UniverseRow.prototype.createDom = function() { var tr = this.dom_.createDom( 'tr', {}, goog.dom.createDom('td', {}, this._item.id().toString()), goog.dom.createDom('td', {}, this._item.name()), goog.dom.createDom('td', {}, this._item.inputPortCount().toString()), goog.dom.createDom('td', {}, this._item.outputPortCount().toString()), goog.dom.createDom('td', {}, this._item.rdmDeviceCount().toString())); this.setElementInternal(tr); }; /** * Update this item with from new data * @param {ola.UniverseItem} universe_item the new item to update from. */ ola.UniverseRow.prototype.update = function(universe_item) { var element = this.getElement(); var td = goog.dom.getFirstElementChild(element); td = goog.dom.getNextElementSibling(td); td.innerHTML = universe_item.name(); td = goog.dom.getNextElementSibling(td); td.innerHTML = universe_item.inputPortCount().toString(); td = goog.dom.getNextElementSibling(td); td.innerHTML = universe_item.outputPortCount().toString(); td = goog.dom.getNextElementSibling(td); td.innerHTML = universe_item.rdmDeviceCount().toString(); }; /** * The base class for a factory which produces UniverseRows * @constructor */ ola.UniverseRowFactory = function() {}; /** * @param {Object} data the data for the new row. * @return {ola.UniverseRow} an instance of a UniverseRow. */ ola.UniverseRowFactory.prototype.newComponent = function(data) { return new ola.UniverseRow(data); }; /** * A class representing the home frame * @param {string} element_id the id of the div to use for the home frame. * @constructor */ ola.HomeFrame = function(element_id) { var ola_server = ola.common.Server.getInstance(); ola.BaseFrame.call(this, element_id); var reload_button = goog.dom.$('reload_button'); goog.ui.decorate(reload_button); goog.events.listen(reload_button, goog.events.EventType.CLICK, this.reloadButtonClicked, false, this); var stop_button = goog.dom.$('stop_button'); goog.ui.decorate(stop_button); goog.events.listen(stop_button, goog.events.EventType.CLICK, this.stopButtonClicked, false, this); var new_universe_button = goog.dom.$('new_universe_button'); goog.ui.decorate(new_universe_button); goog.events.listen(ola_server, ola.common.Server.EventType.UNIVERSE_LIST_EVENT, this.universeListChanged_, false, this); this.server_stats = new ola.common.ServerStats(); var table_container = new ola.TableContainer(); table_container.decorate(goog.dom.$('active_universe_list')); this.universe_list = new ola.common.SortedList(table_container, new ola.UniverseRowFactory()); }; goog.inherits(ola.HomeFrame, ola.BaseFrame); /** * Update the universe set * @param {Object} e the event object. * @private */ ola.HomeFrame.prototype.universeListChanged_ = function(e) { var items = new Array(); for (var i = 0; i < e.universes.length; ++i) { items.push(new ola.UniverseItem(e.universes[i])); } this.universe_list.updateFromData(items); }; /** * Called when the stop button is clicked * @param {Object} e the event object. */ ola.HomeFrame.prototype.stopButtonClicked = function(e) { var dialog = ola.Dialog.getInstance(); goog.events.listen(dialog, goog.ui.Dialog.EventType.SELECT, this.stopServerConfirmed, false, this); dialog.setTitle('Please confirm'); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.YES_NO); dialog.setContent( 'Are you sure? OLA may not be configured to restart automatically'); dialog.setVisible(true); }; /** * Called when the stop dialog exits. * @param {Object} e the event object. */ ola.HomeFrame.prototype.stopServerConfirmed = function(e) { var dialog = ola.Dialog.getInstance(); goog.events.unlisten(dialog, goog.ui.Dialog.EventType.SELECT, this.stopServerConfirmed, false, this); if (e.key == goog.ui.Dialog.DefaultButtonKeys.YES) { dialog.setAsBusy(); dialog.setVisible(true); var frame = this; ola.common.Server.getInstance().stopServer( function(e) { frame.stopServerComplete(e); }); } }; /** * Update the home frame with new server data * @param {Object} e the event object. */ ola.HomeFrame.prototype.stopServerComplete = function(e) { var dialog = ola.Dialog.getInstance(); if (e.target.getStatus() == goog.net.HttpStatus.OK) { dialog.setVisible(false); } else { dialog.setTitle('Failed to stop the server'); dialog.setContent(e.target.getLastUri() + ' : ' + e.target.getLastError()); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); } }; /** * Called when the reload button is clicked * @param {Object} e the event object. */ ola.HomeFrame.prototype.reloadButtonClicked = function(e) { var dialog = ola.Dialog.getInstance(); dialog.setAsBusy(); dialog.setVisible(true); var frame = this; ola.common.Server.getInstance().reloadPlugins( function(e) { frame.pluginReloadComplete(e); }); }; /** * Update the home frame with new server data * @param {Object} e the event object. */ ola.HomeFrame.prototype.pluginReloadComplete = function(e) { var dialog = ola.Dialog.getInstance(); if (e.target.getStatus() == goog.net.HttpStatus.OK) { dialog.setVisible(false); } else { dialog.setTitle('Failed to Reload plugins'); dialog.setContent(e.target.getLastUri() + ' : ' + e.target.getLastError()); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); } }; ola-0.10.9/javascript/ola/logger.js0000664000175000017500000000547414376533110014052 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The class that handles the logging. * Copyright (C) 2010 Simon Newton */ goog.require('goog.debug.DivConsole'); goog.require('goog.debug.LogManager'); goog.require('goog.debug.Logger'); goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.math'); goog.require('goog.positioning.Corner'); goog.require('goog.ui.Control'); goog.require('goog.ui.Popup'); goog.provide('ola.LoggerWindow'); /** The logger instance */ ola.logger = goog.debug.Logger.getLogger('ola'); /** * Setup the logger window * @constructor */ ola.LoggerWindow = function() { goog.debug.LogManager.getRoot().setLevel(goog.debug.Logger.Level.ALL); // setup the log console var log_console = new goog.debug.DivConsole(goog.dom.$('log')); log_console.setCapturing(true); // setup the control which shows the console this.log_control = goog.dom.$('log_control'); var control = new goog.ui.Control(); control.decorate(this.log_control); goog.events.listen(this.log_control, goog.events.EventType.CLICK, this.Show, false, this); // setup the popup that the console is contained in var popupElt = document.getElementById('log_popup'); this.popup = new goog.ui.Popup(popupElt); this.popup.setHideOnEscape(true); this.popup.setAutoHide(true); }; /** * Display the logger window */ ola.LoggerWindow.prototype.Show = function() { this.popup.setVisible(false); this.popup.setPinnedCorner(goog.positioning.Corner.TOP_RIGHT); var margin = new goog.math.Box(2, 2, 2, 2); this.popup.setMargin(margin); this.popup.setPosition(new goog.positioning.AnchoredViewportPosition( this.log_control, goog.positioning.Corner.BOTTOM_RIGHT)); this.popup.setVisible(true); }; /** * Set the size of the logger window * @param {number} size the size of the main window. */ ola.LoggerWindow.prototype.SetSize = function(size) { goog.style.setBorderBoxSize( goog.dom.$('log_popup'), new goog.math.Size(0.75 * size.width, 0.5 * size.height)); this.popup.setPosition(new goog.positioning.AnchoredViewportPosition( this.log_control, goog.positioning.Corner.BOTTOM_RIGHT)); }; ola-0.10.9/javascript/ola/universe_item.js0000664000175000017500000000412314376533110015437 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Object that represent a universe. * Copyright (C) 2010 Simon Newton */ goog.require('ola.common.DataItem'); goog.provide('ola.UniverseItem'); /** * An object which represents a universe in the list * @param {Object} data the data to use to construct this item. * @constructor */ ola.UniverseItem = function(data) { this._id = data['id']; this._name = data['name']; this._input_ports = data['input_ports']; this._output_ports = data['output_ports']; this._rdm_devices = data['rdm_devices']; }; goog.inherits(ola.UniverseItem, ola.common.DataItem); /** * Get the id of this universe. * @return {number} the universe id. */ ola.UniverseItem.prototype.id = function() { return this._id; }; /** * Return the universe name * @return {string} the name. */ ola.UniverseItem.prototype.name = function() { return this._name; }; /** * Return the number of input ports * @return {number} the number of input ports. */ ola.UniverseItem.prototype.inputPortCount = function() { return this._input_ports; }; /** * Return the number of output ports * @return {number} the number of output ports. */ ola.UniverseItem.prototype.outputPortCount = function() { return this._output_ports; }; /** * Return the number of RDm devices. * @return {number} the number of RDM devices. */ ola.UniverseItem.prototype.rdmDeviceCount = function() { return this._rdm_devices; }; ola-0.10.9/javascript/ola/mobile.js0000664000175000017500000000442114376533110014031 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The mobile OLA UI. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.ui.TabPane'); goog.require('ola.common.ServerStats'); goog.require('ola.mobile.ControllerTab'); goog.require('ola.mobile.MonitorTab'); goog.require('ola.mobile.PluginTab'); goog.require('ola.mobile.UniverseTab'); goog.provide('ola.mobile'); /** * Setup the OLA ola_ui widgets * @constructor */ ola.MobileUI = function() { this.tabs = new Array(); this.tabs.push(new ola.common.ServerStats()); this.tabs.push(new ola.mobile.UniverseTab()); this.tabs.push(new ola.mobile.MonitorTab()); this.tabs.push(new ola.mobile.ControllerTab()); this.tabs.push(new ola.mobile.PluginTab()); // setup the tab pane this.tabPane = new goog.ui.TabPane(goog.dom.$('tab_pane')); for (var i = 0; i < this.tabs.length; ++i) { this.tabPane.addPage(new goog.ui.TabPane.TabPage( goog.dom.$('tab_page_' + i), this.tabs[i].title())); } goog.events.listen(this.tabPane, goog.ui.TabPane.Events.CHANGE, this.updateSelectedTab, false, this); }; /** * Update the tab that was selected */ ola.MobileUI.prototype.updateSelectedTab = function() { var selected_tab = this.tabPane.getSelectedIndex(); for (var i = 0; i < this.tabs.length; ++i) { if (i != selected_tab) { this.tabs[i].blur(); } } this.tabs[selected_tab].update(); }; /** * The main setup function. */ ola.mobile.Setup = function() { var ola_ui = new ola.MobileUI(); }; goog.exportSymbol('ola.mobile.Setup', ola.mobile.Setup); ola-0.10.9/javascript/ola/mobile/0000775000175000017500000000000014376533272013563 500000000000000ola-0.10.9/javascript/ola/mobile/monitor_tab.js0000664000175000017500000000753314376533110016355 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The DMX monitor tab * Copyright (C) 2012 Simon Newton */ goog.require('goog.events'); goog.require('goog.ui.Button'); goog.require('goog.ui.Container'); goog.require('ola.BaseFrame'); goog.require('ola.UniverseControl'); goog.require('ola.UniverseItem'); goog.require('ola.common.DmxMonitor'); goog.require('ola.common.SectionRenderer'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.require('ola.common.SortedList'); goog.provide('ola.mobile.MonitorTab'); /** * The class representing the monitor frame * @constructor */ ola.mobile.MonitorTab = function() { this.monitor_frame = new ola.BaseFrame('monitor_frame'); this.universe_frame = new ola.BaseFrame('monitor_universe_frame'); this.hideAllFrames_(); this.resetState_(); this.ola_server = ola.common.Server.getInstance(); goog.events.listen(this.ola_server, ola.common.Server.EventType.UNIVERSE_LIST_EVENT, this.updateUniverseList_, false, this); this.monitor = new ola.common.DmxMonitor( goog.dom.$('monitor_frame')); }; /** * The title of this tab */ ola.mobile.MonitorTab.prototype.title = function() { return 'DMX Monitor'; }; /** * Called when the user navigates away from this tab */ ola.mobile.MonitorTab.prototype.blur = function() { this.monitor.setState(false, undefined); }; /** * Reset certain variables to their default state * @private */ ola.mobile.MonitorTab.prototype.resetState_ = function() { this.universe_list = undefined; }; /** * Hide all frames * @private */ ola.mobile.MonitorTab.prototype.hideAllFrames_ = function() { this.monitor_frame.Hide(); this.universe_frame.Hide(); }; /** * Called when the controller tab is clicked */ ola.mobile.MonitorTab.prototype.update = function() { this.hideAllFrames_(); this.resetState_(); this.universe_frame.setAsBusy(); this.universe_frame.Show(); this.ola_server.FetchUniversePluginList(); }; /** * Called when a list of universes is received * @param {Object} e the event object. * @private */ ola.mobile.MonitorTab.prototype.updateUniverseList_ = function(e) { if (this.universe_list == undefined) { this.universe_frame.Clear(); var universe_container = new goog.ui.Container(); universe_container.render(this.universe_frame.element); var tab = this; this.universe_list = new ola.common.SortedList( universe_container, new ola.UniverseControlFactory( function(item) { tab.universeSelected_(item.id(), item.name()); })); } var items = new Array(); for (var i = 0; i < e.universes.length; ++i) { var item = new ola.UniverseItem(e.universes[i]); items.push(item); } this.universe_list.updateFromData(items); }; /** * Called when a universe is selected * @param {number} universe_id the id of the universe selected. * @param {string} universe_name the name of the universe selected. * @private */ ola.mobile.MonitorTab.prototype.universeSelected_ = function( universe_id, universe_name) { this.hideAllFrames_(); this.monitor.setState(true, universe_id); this.monitor_frame.Show(); }; ola-0.10.9/javascript/ola/mobile/universe_tab.js0000664000175000017500000002733214376533110016525 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The universe tab. * Copyright (C) 2010 Simon Newton */ goog.require('goog.events'); goog.require('goog.net.HttpStatus'); goog.require('goog.ui.Button'); goog.require('goog.ui.Container'); goog.require('ola.BaseFrame'); goog.require('ola.UniverseControl'); goog.require('ola.UniverseItem'); goog.require('ola.common.RdmSectionControl'); goog.require('ola.common.RdmSectionControlFactory'); goog.require('ola.common.RdmSectionItem'); goog.require('ola.common.SectionRenderer'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.require('ola.common.SortedList'); goog.require('ola.common.UidControlFactory'); goog.require('ola.common.UidItem'); goog.provide('ola.mobile.UniverseTab'); /** * The class representing the Universe frame * @constructor */ ola.mobile.UniverseTab = function() { this.universe_frame = new ola.BaseFrame('universe_frame'); this.uid_frame = new ola.BaseFrame('uid_frame'); this.rdm_frame = new ola.BaseFrame('rdm_frame'); this.rdm_section_frame = new ola.BaseFrame('rdm_section_frame'); this.hideAllFrames_(); this.universe_list = undefined; this.active_universe = undefined; this.uid_list = undefined; this.active_uid = undefined; this.rdm_list = undefined; this.active_section = undefined; this.items = undefined; this.ola_server = ola.common.Server.getInstance(); goog.events.listen(this.ola_server, ola.common.Server.EventType.UNIVERSE_LIST_EVENT, this.updateUniverseList_, false, this); }; /** The title of this tab */ ola.mobile.UniverseTab.prototype.title = function() { return 'RDM'; }; /** * Called when the tab loses focus */ ola.mobile.UniverseTab.prototype.blur = function() {}; /** * Hide all frames * @private */ ola.mobile.UniverseTab.prototype.hideAllFrames_ = function() { this.universe_frame.Hide(); this.uid_frame.Hide(); this.rdm_frame.Hide(); this.rdm_section_frame.Hide(); }; /** * Called when the universe tab is clicked */ ola.mobile.UniverseTab.prototype.update = function() { this.hideAllFrames_(); this.universe_frame.setAsBusy(); this.universe_list = undefined; this.active_universe = undefined; this.active_uid = undefined; this.active_section = undefined; this.universe_frame.Show(); this.ola_server.FetchUniversePluginList(); }; /** * Called when a new list of universes is received. * @param {Object} e the event object. * @private */ ola.mobile.UniverseTab.prototype.updateUniverseList_ = function(e) { if (this.universe_list == undefined) { this.universe_frame.Clear(); var universe_container = new goog.ui.Container(); universe_container.render(this.universe_frame.element); var tab = this; this.universe_list = new ola.common.SortedList( universe_container, new ola.UniverseControlFactory( function(item) { tab.universeSelected_(item.id()); })); } var items = new Array(); for (var i = 0; i < e.universes.length; ++i) { var item = new ola.UniverseItem(e.universes[i]); items.push(item); } this.universe_list.updateFromData(items); }; /** * Called when a universe is selected * @param {number} universe_id the id of the universe selected. * @private */ ola.mobile.UniverseTab.prototype.universeSelected_ = function(universe_id) { this.hideAllFrames_(); this.uid_frame.setAsBusy(); this.uid_list = undefined; this.rdm_list = undefined; this.active_universe = universe_id; this.uid_frame.Show(); var tab = this; this.ola_server.fetchUids( universe_id, function(e) { tab.updateUidList_(e); }); // setup a timer here }; /** * Called when a new list of uids is received. * @param {Object} e the event object. * @private */ ola.mobile.UniverseTab.prototype.updateUidList_ = function(e) { if (e.target.getStatus() != goog.net.HttpStatus.OK) { return; } if (this.uid_list == undefined) { this.uid_frame.Clear(); var uid_container = new goog.ui.Container(); uid_container.render(this.uid_frame.element); var tab = this; this.uid_list = new ola.common.SortedList( uid_container, new ola.common.UidControlFactory( function(item) { tab.uidSelected_(item.id()); })); var button = new goog.ui.Button('Back'); button.render(this.uid_frame.element); goog.events.listen(button, goog.ui.Component.EventType.ACTION, function() { this.update() }, false, this); } var obj = e.target.getResponseJson(); var uids = obj['uids']; var items = new Array(); for (var i = 0; i < uids.length; ++i) { items.push(new ola.common.UidItem(uids[i])); } this.uid_list.updateFromData(items); }; /** * Called when a uid is selected * @param {Object} uid the UID selected. * @private */ ola.mobile.UniverseTab.prototype.uidSelected_ = function(uid) { this.hideAllFrames_(); this.rdm_frame.setAsBusy(); this.rdm_list = undefined; this.active_uid = uid; this.rdm_frame.Show(); var tab = this; this.ola_server.rdmGetSupportedSections( this.active_universe, uid, function(e) { tab.updateSupportedSections_(e); }); }; /** * Called when a list of supported sections is received. * @param {Object} e the event object. * @private */ ola.mobile.UniverseTab.prototype.updateSupportedSections_ = function(e) { if (this.rdm_list == undefined) { this.rdm_frame.Clear(); var rdm_container = new goog.ui.Container(); rdm_container.render(this.rdm_frame.element); var tab = this; this.rdm_list = new ola.common.SortedList( rdm_container, new ola.common.RdmSectionControlFactory( function(item) { tab.sectionSelected_(item); })); var button = new goog.ui.Button('Back'); button.render(this.rdm_frame.element); goog.events.listen( button, goog.ui.Component.EventType.ACTION, function() { this.universeSelected_(this.active_universe) }, false, this); } var sections = e.target.getResponseJson(); var section_count = sections.length; var items = new Array(); for (var i = 0; i < section_count; ++i) { items.push(new ola.common.RdmSectionItem(sections[i])); } this.rdm_list.updateFromData(items); }; /** * Called when a section is selected * @param {Object} section the Section object. * @private */ ola.mobile.UniverseTab.prototype.sectionSelected_ = function(section) { this.hideAllFrames_(); this.rdm_section_frame.setAsBusy(); this.rdm_section_frame.Show(); this.active_section = section; this.loadSection_(); }; /** * Called when we need to load a section * @private */ ola.mobile.UniverseTab.prototype.loadSection_ = function() { var tab = this; this.ola_server.rdmGetSectionInfo( this.active_universe, this.active_uid, this.active_section.id(), this.active_section.hint(), function(e) { tab.updateSection_(e); }); }; /** * Called when a section is ready to be drawn * @param {Object} e the event object. * @private */ ola.mobile.UniverseTab.prototype.updateSection_ = function(e) { var section_response = e.target.getResponseJson(); this.rdm_section_frame.Clear(); var div = this.rdm_section_frame.element; div.innerHTML = ''; if (section_response['error']) { div.innerHTML = section_response['error']; return; } var items = section_response['items']; var count = items.length; var form = goog.dom.createElement('form'); form.id = this.active_section.id(); var tab = this; form.onsubmit = function() { tab.saveSection_(); return false}; var table = goog.dom.createElement('table'); table.className = 'ola-table'; var editable = false; for (var i = 0; i < count; ++i) { ola.common.SectionRenderer.RenderItem(table, items[i]); // if any field has an id and doesn't have it's own button we display the // save button. editable |= (items[i]['id'] && !items[i]['button']); } goog.dom.appendChild(form, table); goog.dom.appendChild(div, form); var button = new goog.ui.Button('Back'); button.render(div); goog.events.listen(button, goog.ui.Component.EventType.ACTION, function() { this.uidSelected_(this.active_uid) }, false, this); if (section_response['refresh']) { var button = new goog.ui.Button('Refresh'); button.render(div); goog.events.listen(button, goog.ui.Component.EventType.ACTION, function() { this.loadSection_() }, false, this); } if (editable) { var text = section_response['save_button'] || 'Save'; var button = new goog.ui.Button(text); button.render(div); goog.events.listen(button, goog.ui.Component.EventType.ACTION, function() { this.saveSection_() }, false, this); } this.items = section_response['items']; }; /** * Called when we need to save a section * @private */ ola.mobile.UniverseTab.prototype.saveSection_ = function() { var items = this.items; var count = items.length; var form = goog.dom.$(this.active_section.id()); var data = ''; for (var i = 0; i < count; ++i) { var id = items[i]['id']; if (id) { if (items[i]['type'] == 'uint') { // integer var value = form.elements[id].value; var int_val = parseInt(value); if (isNaN(int_val)) { this._showErrorDialog('Invalid Value', items[i]['description'] + ' must be an integer'); return; } var min = items[i]['min']; if (min != undefined && int_val < min) { this._showErrorDialog('Invalid Value', items[i]['description'] + ' must be > ' + (min - 1)); return; } var max = items[i]['max']; if (max != undefined && int_val > max) { this._showErrorDialog('Invalid Value', items[i]['description'] + ' must be < ' + (max + 1)); return; } data += id + '=' + value + '&'; } else if (items[i]['type'] == 'string') { var value = form.elements[id].value; data += id + '=' + value + '&'; } else if (items[i]['type'] == 'bool') { var checked = items[i]['object'].isChecked(); data += id + '=' + (checked ? '1' : '0') + '&'; } else if (items[i]['type'] == 'select') { var offset = items[i]['object'].getSelectedIndex(); var value = items[i]['value'][offset]['value']; data += id + '=' + value + '&'; } } } var tab = this; this.ola_server.rdmSetSectionInfo( this.active_universe, this.active_uid, this.active_section.id(), this.active_section.hint(), data, function(e) { tab.saveSectionComplete_(e); }); }; /** * Called when the save section completes. * @param {Object} e the event object. * @private */ ola.mobile.UniverseTab.prototype.saveSectionComplete_ = function(e) { var response = e.target.getResponseJson(); if (response['error']) { alert(response['error']); } else { // reload data this.loadSection_(); } }; ola-0.10.9/javascript/ola/mobile/plugin_tab.js0000664000175000017500000000763514376533110016167 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The plugin tab for the mobile UI. * Copyright (C) 2010 Simon Newton */ goog.require('goog.events'); goog.require('goog.ui.Container'); goog.require('ola.BaseFrame'); goog.require('ola.common.PluginControlFactory'); goog.require('ola.common.PluginItem'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.require('ola.common.SortedList'); goog.provide('ola.mobile.PluginTab'); /** * The class representing the Plugin frame * @constructor */ ola.mobile.PluginTab = function() { this.plugin_frame = new ola.BaseFrame('plugin_frame'); this.plugin_info_frame = new ola.BaseFrame('plugin_info_frame'); this.hideAllFrames_(); this.plugin_list = undefined; this.ola_server = ola.common.Server.getInstance(); goog.events.listen(this.ola_server, ola.common.Server.EventType.PLUGIN_LIST_EVENT, this.updatePluginList_, false, this); goog.events.listen(this.ola_server, ola.common.Server.EventType.PLUGIN_EVENT, this.updatePluginInfo_, false, this); }; /** * The title of this tab */ ola.mobile.PluginTab.prototype.title = function() { return 'Plugins'; }; /** * Called when the tab loses focus */ ola.mobile.PluginTab.prototype.blur = function() {}; /** * Hide all frames * @private */ ola.mobile.PluginTab.prototype.hideAllFrames_ = function() { this.plugin_frame.Hide(); this.plugin_info_frame.Hide(); }; /** * Called when the plugin tab is clicked */ ola.mobile.PluginTab.prototype.update = function() { this.hideAllFrames_(); this.plugin_frame.setAsBusy(); this.plugin_list = undefined; this.plugin_frame.Show(); this.ola_server.FetchUniversePluginList(); }; /** * Called when a new list of plugins is received. * @param {Object} e the event object. * @private */ ola.mobile.PluginTab.prototype.updatePluginList_ = function(e) { if (this.plugin_list == undefined) { this.plugin_frame.Clear(); var plugin_container = new goog.ui.Container(); plugin_container.render(this.plugin_frame.element); var tab = this; this.plugin_list = new ola.common.SortedList( plugin_container, new ola.common.PluginControlFactory( function(item) { tab.pluginSelected_(item.id()); })); } var items = new Array(); for (var i = 0; i < e.plugins.length; ++i) { var item = new ola.common.PluginItem(e.plugins[i]); items.push(item); } this.plugin_list.updateFromData(items); }; /** * Called when a plugin is selected. * @param {number} plugin_id the id of the plugin selected. * @private */ ola.mobile.PluginTab.prototype.pluginSelected_ = function(plugin_id) { this.hideAllFrames_(); this.plugin_info_frame.setAsBusy(); this.plugin_info_frame.Show(); this.ola_server.FetchPluginInfo(plugin_id); }; /** * Called when new plugin info is available * @param {Object} e the event object. * @private */ ola.mobile.PluginTab.prototype.updatePluginInfo_ = function(e) { this.plugin_info_frame.Clear(); var description = goog.string.htmlEscape(e.plugin['description']); description = description.replace(/\\n/g, '
'); this.plugin_info_frame.element.innerHTML = description; }; ola-0.10.9/javascript/ola/mobile/controller_tab.js0000664000175000017500000000775014376533110017052 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The controller tab. * Copyright (C) 2011 Chris Stranex */ goog.require('goog.events'); goog.require('goog.ui.Button'); goog.require('goog.ui.Container'); goog.require('ola.BaseFrame'); goog.require('ola.UniverseControl'); goog.require('ola.UniverseItem'); goog.require('ola.common.KeypadController'); goog.require('ola.common.SectionRenderer'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.require('ola.common.SortedList'); goog.provide('ola.mobile.ControllerTab'); /** * The class representing the Controller frame * @constructor */ ola.mobile.ControllerTab = function() { this.controller_frame = new ola.BaseFrame('controller_frame'); this.universe_frame = new ola.BaseFrame('controller_universe_frame'); this.hideAllFrames_(); this.resetState_(); this.ola_server = ola.common.Server.getInstance(); goog.events.listen(this.ola_server, ola.common.Server.EventType.UNIVERSE_LIST_EVENT, this.updateUniverseList_, false, this); }; /** * The title of this tab */ ola.mobile.ControllerTab.prototype.title = function() { return 'DMX Keypad'; }; /** * Called when the user navigates away from this tab */ ola.mobile.ControllerTab.prototype.blur = function() {}; /** * Reset certain variables to their default state * @private */ ola.mobile.ControllerTab.prototype.resetState_ = function() { this.universe_list = undefined; this.active_universe = undefined; }; /** * Hide all frames * @private */ ola.mobile.ControllerTab.prototype.hideAllFrames_ = function() { this.controller_frame.Hide(); this.universe_frame.Hide(); }; /** * Called when the controller tab is clicked */ ola.mobile.ControllerTab.prototype.update = function() { this.hideAllFrames_(); this.resetState_(); this.universe_frame.setAsBusy(); this.universe_frame.Show(); this.ola_server.FetchUniversePluginList(); }; /** * Called when a list of universes is received * @param {Object} e the event object. * @private */ ola.mobile.ControllerTab.prototype.updateUniverseList_ = function(e) { if (this.universe_list == undefined) { this.universe_frame.Clear(); var universe_container = new goog.ui.Container(); universe_container.render(this.universe_frame.element); var tab = this; this.universe_list = new ola.common.SortedList( universe_container, new ola.UniverseControlFactory( function(item) { tab.universeSelected_(item.id(), item.name()); })); } var items = new Array(); for (var i = 0; i < e.universes.length; ++i) { var item = new ola.UniverseItem(e.universes[i]); items.push(item); } this.universe_list.updateFromData(items); }; /** * Called when a universe is selected * @param {number} universe_id the id of the universe selected. * @param {string} universe_name the name of the universe selected. * @private */ ola.mobile.ControllerTab.prototype.universeSelected_ = function( universe_id, universe_name) { this.hideAllFrames_(); this.active_universe = universe_id; this.keypad = new ola.common.KeypadController( universe_name, universe_id); this.controller_frame.Clear(); this.controller_frame.element.appendChild(this.keypad.table); this.controller_frame.Show(); }; ola-0.10.9/javascript/ola/full/0000775000175000017500000000000014376533272013256 500000000000000ola-0.10.9/javascript/ola/full/rdm_attributes_panel.js0000664000175000017500000003123414376533110017735 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The RDM attributes panel. * Copyright (C) 2010 Simon Newton */ goog.require('goog.Timer'); goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.ui.AnimatedZippy'); goog.require('goog.ui.Checkbox'); goog.require('goog.ui.Component'); goog.require('goog.ui.Component.EventType'); goog.require('goog.ui.Control'); goog.require('goog.ui.Option'); goog.require('goog.ui.Select'); goog.require('ola.Dialog'); goog.require('ola.common.SectionRenderer'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.provide('ola.RDMAttributesPanel'); /** * The class representing the panel. * @param {string} element_id the id of the element to use for this frame. * @constructor */ ola.RDMAttributesPanel = function(element_id, toolbar) { this.element = goog.dom.$(element_id); this.current_universe = undefined; this.current_uid = undefined; this.divs = new Array(); this.zippies = new Array(); // This holds the list of sections, and is updated as a section is loaded this.section_data = undefined; this.expander_button = toolbar.getChild('showAllSectionsButton'); this.expander_button.setTooltip('Show All Attributes'); this.expander_button.setEnabled(false); goog.events.listen(this.expander_button, goog.ui.Component.EventType.ACTION, function() { this.expandAllSections_(); }, false, this); this.collapse_button = toolbar.getChild('hideAllSectionsButton'); this.collapse_button.setTooltip('Hide All Attributes'); this.collapse_button.setEnabled(false); goog.events.listen(this.collapse_button, goog.ui.Component.EventType.ACTION, function() { this.hideAllSections_(); }, false, this); var refresh_menu = toolbar.getChild('refreshButton'); refresh_menu.setTooltip('Configure how often attributes are refreshed'); goog.events.listen(refresh_menu, goog.ui.Component.EventType.ACTION, this.refreshChanged_, false, this); this.refresh_timer = new goog.Timer(30000); goog.events.listen( this.refresh_timer, goog.Timer.TICK, this.refreshEvent_, false, this); }; /** * The mapping of strings to timeout intervals. */ ola.RDMAttributesPanel.RefreshInterval = { '30s': 30000, '1m': 60000, '5m': 300000 }; /** * Change the current universe. * @param {number} universe_id the current universe. */ ola.RDMAttributesPanel.prototype.updateUniverse = function(universe_id) { this.current_universe = universe_id; this.current_uid = undefined; }; /** * Show the attributes for a particular UID. * @param {ola.UidItem} item the uid to show. */ ola.RDMAttributesPanel.prototype.showUID = function(item) { this.setLoading_(this.element); var server = ola.common.Server.getInstance(); var panel = this; server.rdmGetSupportedSections( this.current_universe, item.asString(), function(e) { panel.supportedSections_(e); }); this.current_uid = item.asString(); this.expander_button.setEnabled(true); this.collapse_button.setEnabled(true); }; /** * Clear the panel. */ ola.RDMAttributesPanel.prototype.clear = function() { this.current_uid = undefined; this.expander_button.setEnabled(false); this.collapse_button.setEnabled(false); this.setEmpty_(); }; /** * Expand all the sections. * @private */ ola.RDMAttributesPanel.prototype.expandAllSections_ = function() { for (var i = 0; i < this.zippies.length; ++i) { if (!this.zippies[i].isExpanded()) { this.zippies[i].setExpanded(true); this.expandSection_(i); } } }; /** * Hide all the sections. * @private */ ola.RDMAttributesPanel.prototype.hideAllSections_ = function() { for (var i = 0; i < this.zippies.length; ++i) { if (this.zippies[i].isExpanded()) { this.zippies[i].setExpanded(false); } } }; /** * Set the refresh rate * @param {Object} e the event object. * @private */ ola.RDMAttributesPanel.prototype.refreshChanged_ = function(e) { var value = e.target.getCaption(); if (value == 'Never') { this.refresh_timer.stop(); } else { var timeout = ola.RDMAttributesPanel.RefreshInterval[value]; if (timeout != undefined) { this.refresh_timer.setInterval(timeout); } else { ola.logger.info('Invalid timeout ' + value); } this.refresh_timer.start(); } }; /** * Called when the refresh timer fires * @private */ ola.RDMAttributesPanel.prototype.refreshEvent_ = function(e) { for (var i = 0; i < this.zippies.length; ++i) { if (this.zippies[i].isExpanded()) { this.loadSection_(i); } } }; /** * Display the 'empty' page. * @private */ ola.RDMAttributesPanel.prototype.setEmpty_ = function() { this.element.innerHTML = ''; }; /** * Display the loading image * @private */ ola.RDMAttributesPanel.prototype.setLoading_ = function(element) { element.innerHTML = ( '
' + '
Loading...
'); }; /** * Called when the supported sections request completes. * @param {Object} e the event object. * @private */ ola.RDMAttributesPanel.prototype.supportedSections_ = function(e) { this.element.innerHTML = ''; this.divs = new Array(); this.zippies = new Array(); var sections = e.target.getResponseJson(); var section_count = sections.length; for (var i = 0; i < section_count; ++i) { var section = obj[i]; var fieldset = goog.dom.createElement('fieldset'); var legend = goog.dom.createElement('legend'); var image = goog.dom.createElement('img'); image.src = '/blank.gif'; image.width = '12'; image.height = '12'; goog.dom.appendChild(legend, image); var title = goog.dom.createTextNode(' ' + sections[i]['name']); goog.dom.appendChild(legend, title); var div = goog.dom.createElement('div'); div.align = 'center'; this.setLoading_(div); goog.dom.appendChild(fieldset, legend); goog.dom.appendChild(fieldset, div); goog.dom.appendChild(this.element, fieldset); var z = new goog.ui.AnimatedZippy(legend, div); this.divs.push(div); this.zippies.push(z); goog.events.listen(legend, goog.events.EventType.CLICK, (function(x) { return function(e) { if (e.expanded) return; this.expandSection_(x); } })(i), false, this); sections['data'] = undefined; sections['loaded'] = false; } this.section_data = sections; }; /** * Called when one of the zippies is expanded * @private */ ola.RDMAttributesPanel.prototype.expandSection_ = function(index) { if (this.section_data[index]['loaded']) return; this.loadSection_(index); }; /** * Load the contents for a zippy section * @private */ ola.RDMAttributesPanel.prototype.loadSection_ = function(index) { var server = ola.common.Server.getInstance(); var panel = this; server.rdmGetSectionInfo( this.current_universe, this.current_uid, this.section_data[index]['id'], this.section_data[index]['hint'], function(e) { panel.populateSection_(e, index); }); this.section_data[index]['loaded'] = true; }; /** * Populate a zippy * @param {Object} e the event object. * @param {int} index the index of the zippy to populate. * @private */ ola.RDMAttributesPanel.prototype.populateSection_ = function(e, index) { var section_response = e.target.getResponseJson(); var div = this.divs[index]; div.innerHTML = ''; if (section_response['error']) { var error_title = 'Error: ' + this.section_data[index]['name']; this.showErrorDialog_(error_title, section_response['error']); this.section_data[index]['loaded'] = false; var zippy = this.zippies[index]; if (zippy.isExpanded()) { zippy.setExpanded(false); } return; } var panel = this; // used in the onsubmit handler below var items = section_response['items']; var count = items.length; var form = goog.dom.createElement('form'); form.id = this.section_data[index]['id']; form.onsubmit = function() { panel.saveSection_(index); return false}; var table = goog.dom.createElement('table'); table.className = 'ola-table'; var editable = false; for (var i = 0; i < count; ++i) { ola.common.SectionRenderer.RenderItem(table, items[i]); // if any field has an id and doesn't have it's own button we display the // save button. editable |= (items[i]['id'] && !items[i]['button']); } goog.dom.appendChild(form, table); goog.dom.appendChild(div, form); if (section_response['refresh']) { var button = new goog.ui.CustomButton('Refresh'); button.render(div); goog.events.listen(button, goog.ui.Component.EventType.ACTION, function() { this.loadSection_(index) }, false, this); } if (editable) { var text = section_response['save_button'] || 'Save'; var button = new goog.ui.CustomButton(text); button.render(div); goog.events.listen(button, goog.ui.Component.EventType.ACTION, function() { this.saveSection_(index) }, false, this); } this.section_data[index]['data'] = section_response; }; /** * Save the contents of a section. * @private */ ola.RDMAttributesPanel.prototype.saveSection_ = function(index) { var items = this.section_data[index]['data']['items']; var count = items.length; var form = goog.dom.$(this.section_data[index]['id']); var data = ''; for (var i = 0; i < count; ++i) { var id = items[i]['id']; if (id) { if (items[i]['type'] == 'uint') { // integer var value = form.elements[id].value; var int_val = parseInt(value); if (isNaN(int_val)) { this.showErrorDialog_('Invalid Value', items[i]['description'] + ' must be an integer'); return; } var min = items[i]['min']; if (min != undefined && int_val < min) { this.showErrorDialog_('Invalid Value', items[i]['description'] + ' must be > ' + (min - 1)); return; } var max = items[i]['max']; if (max != undefined && int_val > max) { this.showErrorDialog_('Invalid Value', items[i]['description'] + ' must be < ' + (max + 1)); return; } data += id + '=' + value + '&'; } else if (items[i]['type'] == 'string') { var value = form.elements[id].value; data += id + '=' + value + '&'; } else if (items[i]['type'] == 'bool') { var checked = items[i]['object'].isChecked(); data += id + '=' + (checked ? '1' : '0') + '&'; } else if (items[i]['type'] == 'select') { var offset = items[i]['object'].getSelectedIndex(); var value = items[i]['value'][offset]['value']; data += id + '=' + value + '&'; } } } var server = ola.common.Server.getInstance(); var panel = this; server.rdmSetSectionInfo( this.current_universe, this.current_uid, this.section_data[index]['id'], this.section_data[index]['hint'], data, function(e) { panel.saveSectionComplete_(e, index); }); }; /** * Called when the save is complete * @param {Object} e the event object. * @private */ ola.RDMAttributesPanel.prototype.saveSectionComplete_ = function(e, index) { var response = e.target.getResponseJson(); if (response['error']) { var error_title = 'Set ' + this.section_data[index]['name'] + ' Failed'; this.showErrorDialog_(error_title, response['error']); } else { // reload data this.loadSection_(index); } }; /** * Show the dialog with an error message * @private */ ola.RDMAttributesPanel.prototype.showErrorDialog_ = function(title, error) { var dialog = ola.Dialog.getInstance(); dialog.setTitle(title); dialog.setContent(error); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setVisible(true); }; ola-0.10.9/javascript/ola/full/dmx_console_tab.js0000664000175000017500000000575514376533110016677 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The DMX console tab. * Copyright (C) 2010 Simon Newton */ goog.require('goog.Timer'); goog.require('goog.events'); goog.require('ola.DmxConsole'); goog.require('ola.common.BaseUniverseTab'); goog.require('ola.common.Server'); goog.provide('ola.DmxConsoleTab'); /** * The DMX console tab. * @constructor */ ola.DmxConsoleTab = function(element) { ola.common.BaseUniverseTab.call(this, element); // setup the console this.dmx_console = new ola.DmxConsole(); this.tick_timer = new goog.Timer(1000); this.mute_events = true; goog.events.listen( this.tick_timer, goog.Timer.TICK, this.consoleChanged_, false, this); goog.events.listen( this.dmx_console, ola.DmxConsole.CHANGE_EVENT, this.consoleChanged_, false, this); }; goog.inherits(ola.DmxConsoleTab, ola.common.BaseUniverseTab); /** * Set the universe. */ ola.DmxConsoleTab.prototype.setUniverse = function(universe_id) { ola.DmxConsoleTab.superClass_.setUniverse.call(this, universe_id); this.dmx_console.resetConsole(); }; /** * Called when the tab changes visibility. */ ola.DmxConsoleTab.prototype.setActive = function(state) { ola.DmxConsoleTab.superClass_.setActive.call(this, state); if (this.isActive()) { this.mute_events = true; this.dmx_console.setupIfRequired(); this.dmx_console.update(); this.loadValues(); } else { this.tick_timer.stop(); } }; /** * Fetches the new DMX values. */ ola.DmxConsoleTab.prototype.loadValues = function(e) { var t = this; ola.common.Server.getInstance().getChannelValues( this.getUniverse(), function(data) { t.newValues(data['dmx']); }); }; /** * Update the console with the new values */ ola.DmxConsoleTab.prototype.newValues = function(data) { this.dmx_console.setData(data); this.mute_events = false; if (this.isActive()) this.tick_timer.start(); }; /** * Called when the console values change * @private */ ola.DmxConsoleTab.prototype.consoleChanged_ = function(e) { if (this.mute_events) { return; } this.mute_events = true; var data = this.dmx_console.getData(); var t = this; ola.common.Server.getInstance().setChannelValues( this.getUniverse(), data, function(e) { t.mute_events = false; }); }; ola-0.10.9/javascript/ola/full/rdm_tab.js0000664000175000017500000001462714376533110015145 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The RDM Tab. * Copyright (C) 2010 Simon Newton */ goog.require('goog.Timer'); goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.math'); goog.require('goog.net.HttpStatus'); goog.require('goog.ui.Component'); goog.require('goog.ui.Container'); goog.require('goog.ui.SplitPane'); goog.require('goog.ui.SplitPane.Orientation'); goog.require('goog.ui.Toolbar'); goog.require('goog.ui.ToolbarButton'); goog.require('goog.ui.ToolbarMenuButton'); goog.require('goog.ui.ToolbarSeparator'); goog.require('ola.Dialog'); goog.require('ola.RDMAttributesPanel'); goog.require('ola.common.BaseUniverseTab'); goog.require('ola.common.Server'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.require('ola.common.SortedList'); goog.require('ola.common.UidControl'); goog.require('ola.common.UidControlFactory'); goog.provide('ola.RDMTab'); /** * The RDM Tab. * @constructor */ ola.RDMTab = function(element) { ola.common.BaseUniverseTab.call(this, element); var toolbar = new goog.ui.Toolbar(); toolbar.decorate(goog.dom.$('rdm_toolbar')); var discovery_button = toolbar.getChild('discoveryButton'); discovery_button.setTooltip('Run full RDM discovery for this universe'); goog.events.listen(discovery_button, goog.ui.Component.EventType.ACTION, function() { this.discoveryButtonClicked_(true); }, false, this); var incremental_discovery_button = toolbar.getChild( 'incrementalDiscoveryButton'); incremental_discovery_button.setTooltip( 'Run incremental RDM discovery for this universe'); goog.events.listen(incremental_discovery_button, goog.ui.Component.EventType.ACTION, function() { this.discoveryButtonClicked_(false); }, false, this); this.splitpane = new goog.ui.SplitPane( new goog.ui.Component(), new goog.ui.Component(), goog.ui.SplitPane.Orientation.HORIZONTAL); this.splitpane.setInitialSize(250); this.splitpane.setHandleSize(2); this.splitpane.decorate(goog.dom.$('rdm_split_pane')); var rdm_panel = new ola.RDMAttributesPanel('rdm_attributes', toolbar); this.rdm_panel = rdm_panel; var frame = this; var uid_container = new goog.ui.Container(); uid_container.decorate(goog.dom.$('uid_container')); this.uid_list = new ola.common.SortedList( uid_container, new ola.common.UidControlFactory( function(item) { rdm_panel.showUID(item); })); // setup the uid timer this.uid_timer = new goog.Timer(ola.RDMTab.UID_REFRESH_INTERVAL); goog.events.listen( this.uid_timer, goog.Timer.TICK, this.updateUidList_, false, this); }; goog.inherits(ola.RDMTab, ola.common.BaseUniverseTab); /** * How often to refresh the list of UIDs. * @type {number} */ ola.RDMTab.UID_REFRESH_INTERVAL = 5000; /** * Set the universe for the patcher */ ola.RDMTab.prototype.setUniverse = function(universe_id) { ola.RDMTab.superClass_.setUniverse.call(this, universe_id); this.rdm_panel.updateUniverse(universe_id); this.rdm_panel.clear(); }; /** * Called when the view port size changes */ ola.RDMTab.prototype.sizeChanged = function(frame_size) { // don't call the base method. this.splitpane.setSize( new goog.math.Size(frame_size.width - 7, frame_size.height - 67)); }; /** * Controls if we should do all the work involved in rendering the patcher. * This isn't needed if the patcher isn't visible. */ ola.RDMTab.prototype.setActive = function(state) { ola.RDMTab.superClass_.setActive.call(this, state); this.updateUidList_(); if (this.isActive()) { this.updateUidList_(); } else { this.uid_timer.stop(); } }; /** * Fetch the uid list * @private */ ola.RDMTab.prototype.updateUidList_ = function() { var tab = this; var server = ola.common.Server.getInstance(); server.fetchUids( this.getUniverse(), function(e) { tab.newUIDs_(e); }); this.uid_timer.start(); }; /** * Update the UID list * @param {Object} e the event object. * @private */ ola.RDMTab.prototype.newUIDs_ = function(e) { if (e.target.getStatus() != goog.net.HttpStatus.OK) { ola.logger.info('Request failed: ' + e.target.getLastUri() + ' : ' + e.target.getLastError()); return; } this.updateUIDList_(e); }; /** * Called when the discovery button is clicked. * @private */ ola.RDMTab.prototype.discoveryButtonClicked_ = function(full) { var server = ola.common.Server.getInstance(); var tab = this; server.runRDMDiscovery( this.getUniverse(), full, function(e) { tab.discoveryComplete_(e); }); var dialog = ola.Dialog.getInstance(); dialog.setAsBusy(); dialog.setTitle('RDM Discovery Running...'); dialog.setVisible(true); }; /** * Called when the discovery request returns. * @param {Object} e the event object. * @private */ ola.RDMTab.prototype.discoveryComplete_ = function(e) { var dialog = ola.Dialog.getInstance(); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); if (e.target.getStatus() == goog.net.HttpStatus.OK) { dialog.setVisible(false); this.updateUIDList_(e); } else { dialog.setTitle('Failed to Start Discovery Process'); dialog.setContent(e.target.getLastUri() + ' : ' + e.target.getLastError()); dialog.setVisible(true); } }; /** * Update the UID list from a http response * @param {Object} e the event object. * @private */ ola.RDMTab.prototype.updateUIDList_ = function(e) { var obj = e.target.getResponseJson(); var uids = obj['uids']; var items = new Array(); for (var i = 0; i < uids.length; ++i) { items.push(new ola.common.UidItem(uids[i])); } this.uid_list.updateFromData(items); }; ola-0.10.9/javascript/ola/full/universe_settings_tab.js0000664000175000017500000002052114376533110020131 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The RDM patcher tab. * Copyright (C) 2010 Simon Newton */ goog.require('goog.events'); goog.require('goog.net.HttpStatus'); goog.require('goog.ui.AnimatedZippy'); goog.require('ola.AvailablePort'); goog.require('ola.AvailablePortTable'); goog.require('ola.Dialog'); goog.require('ola.Port'); goog.require('ola.PortTable'); goog.require('ola.common.BaseUniverseTab'); goog.require('ola.common.Server'); goog.provide('ola.UniverseSettingsTab'); /** * The class that manages the RDMPatcher. * @constructor */ ola.UniverseSettingsTab = function(element, on_remove) { ola.common.BaseUniverseTab.call(this, element); this.on_remove = on_remove; this.server = ola.common.Server.getInstance(); var save_button = goog.dom.$('universe_save_button'); goog.ui.decorate(save_button); goog.events.listen(save_button, goog.events.EventType.CLICK, function() { this.saveButtonClicked_(false); }, false, this); this.merge_mode = goog.ui.decorate(goog.dom.$('universe_merge_mode')); this.input_table = new ola.PortTable(); this.input_table.decorate(goog.dom.$('input_ports')); this.output_table = new ola.PortTable(); this.output_table.decorate(goog.dom.$('output_ports')); var z1 = new goog.ui.AnimatedZippy('additional_ports_expander', 'additional_ports'); this.available_ports = new ola.AvailablePortTable(); this.available_ports.decorate(goog.dom.$('universe_available_ports')); // setup notifications when the universe list changes goog.events.listen(this.server, ola.common.Server.EventType.UNIVERSE_EVENT, this.updateFromData_, false, this); }; goog.inherits(ola.UniverseSettingsTab, ola.common.BaseUniverseTab); /** * Set the universe for the patcher */ ola.UniverseSettingsTab.prototype.setUniverse = function(universe_id) { ola.UniverseSettingsTab.superClass_.setUniverse.call(this, universe_id); }; /** * Called when the view port size changes */ ola.UniverseSettingsTab.prototype.sizeChanged = function(frame_size) { ola.UniverseSettingsTab.superClass_.sizeChanged.call(this, frame_size); }; /** * Controls if we should do all the work involved in rendering the patcher. * This isn't needed if the patcher isn't visible. */ ola.UniverseSettingsTab.prototype.setActive = function(state) { ola.UniverseSettingsTab.superClass_.setActive.call(this, state); if (this.isActive()) this.updateView_(); }; /** * Fetch the latest data from the server to update the view * @private */ ola.UniverseSettingsTab.prototype.updateView_ = function() { this.server.FetchUniverseInfo(this.getUniverse()); this.available_ports.update(this.getUniverse()); }; /** * Update the tab from a Universe object * @param {Object} e the event object. * @private */ ola.UniverseSettingsTab.prototype.updateFromData_ = function(e) { if (this.getUniverse() != e.universe['id']) { ola.logger.info('Mismatched universe, expected ' + this.getUniverse() + ', got ' + e.universe['id']); return; } goog.dom.$('universe_id').innerHTML = e.universe['id']; goog.dom.$('universe_name').value = e.universe['name']; if (e.universe['merge_mode'] == 'HTP') { this.merge_mode.setSelectedIndex(0); } else { this.merge_mode.setSelectedIndex(1); } this.input_table.update(e.universe['input_ports']); this.output_table.update(e.universe['output_ports']); }; /** * Create a priority setting object from a port component * @param {Object} port_component the port component to generate the setting * from. * @param {Array.} setting_list the list to add the setting to. * @private */ ola.UniverseSettingsTab.prototype.generatePrioritySettingFromComponent_ = function(port_component, setting_list) { var priority = port_component.priority(); if (priority != undefined) { var priority_setting = new Object(); priority_setting.id = port_component.portId(); priority_setting.priority = priority; var priority_mode = port_component.priorityMode(); if (priority_mode != undefined) { priority_setting.mode = priority_mode; } setting_list.push(priority_setting); } }; /** * Called when the save button is clicked * @param {boolean} remove_confirmed true if the user confirmed the removal of * this universe. * @private */ ola.UniverseSettingsTab.prototype.saveButtonClicked_ = function( remove_confirmed) { var dialog = ola.Dialog.getInstance(); var port_priorities = new Array(); var remove_ports = new Array(); var one_port_selected = false; var count = this.input_table.getChildCount(); for (var i = 0; i < count; ++i) { var port = this.input_table.getChildAt(i); if (port.isSelected()) { one_port_selected = true; this.generatePrioritySettingFromComponent_(port, port_priorities); } else { remove_ports.push(port.portId()); } } var count = this.output_table.getChildCount(); for (var i = 0; i < count; ++i) { var port = this.output_table.getChildAt(i); if (port.isSelected()) { one_port_selected = true; this.generatePrioritySettingFromComponent_(port, port_priorities); } else { remove_ports.push(port.portId()); } } // figure out the new ports to add var new_ports = this.available_ports.getSelectedRows(); // if we're deleting the universe ask for confirmation if ((!one_port_selected) && new_ports.length == 0) { if (remove_confirmed) { this.was_removed = true; } else { goog.events.listen( dialog, goog.ui.Dialog.EventType.SELECT, this.removeConfirmed_, false, this); dialog.setTitle('Confirm Universe Removal'); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.YES_NO); dialog.setContent( 'Removing all ports will cause this universe to be deleted. Is ' + 'this ok?'); dialog.setVisible(true); return; } } else { this.was_removed = false; } var name = goog.dom.$('universe_name').value; if (name == '') { dialog.setTitle('Empty Universe Name'); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setContent('The universe name cannot be empty'); dialog.setVisible(true); return; } var tab = this; this.server.modifyUniverse( this.getUniverse(), name, this.merge_mode.getValue(), port_priorities, remove_ports, new_ports, function(e) { tab.saveCompleted_(e); }); var dialog = ola.Dialog.getInstance(); dialog.setAsBusy(); dialog.setVisible(true); }; /** * Called when the universe removal is confirmed * @param {Object} e the event object. * @private */ ola.UniverseSettingsTab.prototype.removeConfirmed_ = function(e) { var dialog = ola.Dialog.getInstance(); goog.events.unlisten( dialog, goog.ui.Dialog.EventType.SELECT, this.removeConfirmed_, false, this); if (e.key == goog.ui.Dialog.DefaultButtonKeys.YES) { dialog.setVisible(false); this.saveButtonClicked_(true); } }; /** * Called when the changes are saved * @param {Object} e the event object. * @private */ ola.UniverseSettingsTab.prototype.saveCompleted_ = function(e) { var dialog = ola.Dialog.getInstance(); if (e.target.getStatus() == goog.net.HttpStatus.OK) { dialog.setVisible(false); if (this.was_removed && this.on_remove) { this.on_remove(); } this.updateView_(); } else { dialog.setTitle('Failed to Save Settings'); dialog.setContent(e.target.getLastUri() + ' : ' + e.target.getLastError()); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setVisible(true); } }; ola-0.10.9/javascript/ola/full/rdm_patcher.js0000664000175000017500000007377714376533110016040 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The RDM patcher. * Copyright (C) 2010 Simon Newton */ goog.require('goog.array'); goog.require('goog.dom'); goog.require('goog.dom.classes'); goog.require('goog.events'); goog.require('goog.math.Rect'); goog.require('goog.ui.Checkbox'); goog.require('goog.ui.MenuItem'); goog.require('goog.ui.Select'); goog.require('ola.CustomDragScrollSupport'); goog.require('ola.CustomDragger'); goog.require('ola.Dialog'); goog.require('ola.common.DmxConstants'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.require('ola.common.UidItem'); goog.provide('ola.RDMPatcher'); goog.provide('ola.RDMPatcherDevice'); /** * This represents a desired address change for a device * @constructor */ ola.RDMPatcherAddressChange = function(device, new_start_address) { this.device = device; this.new_start_address = new_start_address; }; /** * The model of an RDM device. * @param {string} uid the uid of the device. * @param {number} start_address the start address, from 1 - 512. * @param {number} footprint the number of dmx channels consumed. * @constructor */ ola.RDMPatcherDevice = function(uid, label, start_address, footprint, current_personality, personality_count) { this.uid = uid; this.label = label; // convert to 0 offset this.start = start_address - 1; this.footprint = footprint; this.current_personality = current_personality; this.personality_count = personality_count; this.setStart(start_address); this._divs = new Array(); }; /** * Set the start address of this device * @param {number} start_address the start address, from 1 - 512. */ ola.RDMPatcherDevice.prototype.setStart = function(start_address) { this.start = start_address - 1; this.updateEnd_(); }; /** * Set the footprint of this device * @param {number} footprint the footprint, from 1 - 512. */ ola.RDMPatcherDevice.prototype.setFootprint = function(footprint) { this.footprint = footprint; this.updateEnd_(); }; /** * Update the end address. * @private */ ola.RDMPatcherDevice.prototype.updateEnd_ = function() { this.end = Math.min(this.start + this.footprint - 1, ola.common.DmxConstants.MAX_CHANNEL_NUMBER); }; /** * Associated a div with this Device */ ola.RDMPatcherDevice.prototype.resetDivs = function() { for (var i = 0; i < this._divs.length; ++i) { goog.events.removeAll(this._divs[i]); } this._divs = new Array(); }; /** * Associated a div with this Device */ ola.RDMPatcherDevice.prototype.addDiv = function(div) { this._divs.push(div); }; /** * Get the list of divs associated with this device */ ola.RDMPatcherDevice.prototype.getDivs = function() { return this._divs; }; /** * Check if a device overflows the 512 channel count. */ ola.RDMPatcherDevice.prototype.overflows = function(div) { return ((this.start + this.footprint) > ola.common.DmxConstants.MAX_CHANNEL_NUMBER); }; /** * A comparison function used to sort an array of devices based on start * address. */ ola.RDMPatcherDevice.sortByAddress = function(a, b) { return a.start - b.start; }; /** * A comparison function used to sort an array of devices based on footprint. */ ola.RDMPatcherDevice.sortByFootprint = function(a, b) { return a.footprint - b.footprint; }; /** * The class representing the patcher. * @param {string} element_id the id of the element to use for this patcher. * @constructor */ ola.RDMPatcher = function(element_id, status_id) { this.element = goog.dom.$(element_id); this.status_line = goog.dom.$(status_id); this.universe_id = undefined; // this of RDMPatcherDevice objects this.devices = new Array(); // the top level divs that form each row this.rows = new Array(); // the background tds used to set the row height correctly this.background_tds = new Array(); // the tables that the device divs live in this.device_tables = new Array(); // store a reference to the draggers so we can clean the up properly this.draggers = new Array(); this.dialog = undefined; this.active_device = undefined; this.start_address_input = undefined; this.scroller = new ola.CustomDragScrollSupport(this.element); // the per-personality footprints for the active device this.personalities = undefined; // the queue of pending address changes for the auto patcher this.address_changes = new Array(); this.patching_failures = false; }; /* Constants */ /** The number of channels per row @type {number} */ ola.RDMPatcher.CHANNELS_PER_ROW = 8; /** The height of each row @type {number} */ ola.RDMPatcher.HEIGHT_PER_DEVICE = 14; /** The number of rows @type {number} */ ola.RDMPatcher.NUMBER_OF_ROWS = (ola.common.DmxConstants.MAX_CHANNEL_NUMBER / ola.RDMPatcher.CHANNELS_PER_ROW); /** * Called when the size of the patcher changes */ ola.RDMPatcher.prototype.sizeChanged = function(new_height) { this.element.style.height = new_height + 'px'; this.scroller.updateBoundaries(); }; /** * Set the list of devices. * @param {Array.} devices the list of RDMPatcherDevice * devices to set. */ ola.RDMPatcher.prototype.setDevices = function(devices) { this.devices = devices; }; /** * Set the universe this patcher is operating on * @param {number} universe_id the universe to use. */ ola.RDMPatcher.prototype.setUniverse = function(universe_id) { this.universe_id = universe_id; }; /** * Hide the patcher */ ola.RDMPatcher.prototype.hide = function() { // hide all the rows for (var i = 0; i < this.rows.length; ++i) { this.rows[i].style.display = 'none'; } }; /** * Render the patcher view. */ ola.RDMPatcher.prototype.update = function() { if (this.rows.length == 0) { this.setup_(); } for (var i = 0; i < this.rows.length; ++i) { this.rows[i].style.display = 'block'; } this.render_(); }; /** * A simple version of Auto patch. */ ola.RDMPatcher.prototype.autoPatch = function() { this.address_changes = new Array(); var channels_required = 0; // first work out how many channels we need; for (var i = 0; i < this.devices.length; ++i) { channels_required += this.devices[i].footprint; } // sort by ascending footprint this.devices.sort(ola.RDMPatcherDevice.sortByFootprint); if (channels_required > ola.common.DmxConstants.MAX_CHANNEL_NUMBER) { // we're going to have to overlap. to minimize overlapping we assign // largest footprint first var devices = this.devices.slice(0); while (devices.length) { var devices_next_round = new Array(); var channel = 0; var device; ola.logger.info('new round'); while (devices.length && channel < ola.common.DmxConstants.MAX_CHANNEL_NUMBER) { var device = devices.pop(); var remaining = ola.common.DmxConstants.MAX_CHANNEL_NUMBER - channel; ola.logger.info(device.label + ' : ' + device.footprint); if (device.footprint > remaining) { // deal with this device next round devices_next_round.unshift(device); ola.logger.info('deferring ' + device.label); } else { this.address_changes.push(new ola.RDMPatcherAddressChange( device, channel + 1)); ola.logger.info('set ' + device.label + ' to ' + channel); channel += device.footprint; } } devices = devices.concat(devices_next_round); } } else { // this is the easy case. Just assign starting with the smallest footprint. var channel = 0; for (var i = 0; i < this.devices.length; ++i) { this.address_changes.push(new ola.RDMPatcherAddressChange( this.devices[i], channel + 1)); channel += this.devices[i].footprint; } } if (this.address_changes.length) { var dialog = ola.Dialog.getInstance(); dialog.setAsBusy(); dialog.setVisible(true); // start the update sequence this.patching_failures = false; this.updateNextDevice_(); } }; /** * Setup the patcher * @private */ ola.RDMPatcher.prototype.setup_ = function() { for (var i = 0; i < ola.RDMPatcher.NUMBER_OF_ROWS; ++i) { var row_div = goog.dom.createElement('div'); row_div.className = 'patch_row'; this.rows.push(row_div); var spacer_table = goog.dom.createElement('table'); spacer_table.className = 'patcher_table'; var spacer_tr = goog.dom.createElement('tr'); spacer_tr.id = 'str_' + i; for (var j = 0; j < ola.RDMPatcher.CHANNELS_PER_ROW; ++j) { var td = goog.dom.createElement('td'); goog.dom.appendChild(spacer_tr, td); this.background_tds.push(td); } goog.dom.appendChild(spacer_table, spacer_tr); goog.dom.appendChild(row_div, spacer_table); var content_table = goog.dom.createElement('table'); content_table.className = 'content_table'; var title_tr = goog.dom.createElement('tr'); for (var j = 0; j < ola.RDMPatcher.CHANNELS_PER_ROW; ++j) { var td = goog.dom.createElement('td'); td.className = 'patcher_title'; td.innerHTML = 1 + i * ola.RDMPatcher.CHANNELS_PER_ROW + j; goog.dom.appendChild(title_tr, td); } goog.dom.appendChild(content_table, title_tr); this.device_tables.push(content_table); goog.dom.appendChild(row_div, content_table); goog.dom.appendChild(this.element, row_div); } }; /** * Render the patcher. * @private */ ola.RDMPatcher.prototype.render_ = function() { this.devices.sort(ola.RDMPatcherDevice.sortByAddress); // Each channel is assigned N slots, where N is the max number of devices // that occupy any one channel. We start out with a single slot, and add more // if we detect overlapping devices. var slots = new Array(); slots.push(goog.array.repeat( false, ola.common.DmxConstants.MAX_CHANNEL_NUMBER)); for (var i = 0; i < this.draggers.length; ++i) { goog.events.removeAll(this.draggers[i]); } this.draggers = new Array(); // for each device, figure out which slot it's going to live in for (var i = 0; i < this.devices.length; ++i) { var device = this.devices[i]; var found_free_slot = false; var slot; for (slot = 0; slot < slots.length; ++slot) { var channel; for (channel = device.start; channel <= device.end; ++channel) { if (slots[slot][channel]) break; } if (channel > device.end) { found_free_slot = true; break; } } if (!found_free_slot) { slots.push(goog.array.repeat( false, ola.common.DmxConstants.MAX_CHANNEL_NUMBER)); } // mark all appropriate channels in this slot as occupied. for (channel = device.start; channel <= device.end; ++channel) { slots[slot][channel] = device; } device.resetDivs(); } // calculate the first/last free slot & max unused channels var first_free_channel = ola.common.DmxConstants.MAX_CHANNEL_NUMBER; var last_free_channel = -1; var max_unused_channels = 0; var last_channel_used = true; var running_channel_count = 0; for (var channel = 0; channel < ola.common.DmxConstants.MAX_CHANNEL_NUMBER; ++channel) { var used = false; for (var slot = 0; slot < slots.length; ++slot) { if (slots[slot][channel]) { used = true; break; } } if (!used) { running_channel_count++; if (channel < first_free_channel) { first_free_channel = channel; } if (channel > last_free_channel) { last_free_channel = channel; } } if (used && !last_channel_used && running_channel_count > max_unused_channels) { max_unused_channels = running_channel_count; running_channel_count = 0; } last_channel_used = used; } if (running_channel_count > max_unused_channels) { max_unused_channels = running_channel_count; } // update the status line var status_line; if (first_free_channel == ola.common.DmxConstants.MAX_CHANNEL_NUMBER) { status_line = 'No slots free'; } else { first_free_channel++; last_free_channel++; status_line = ('Free slots: first: ' + first_free_channel + ', last: ' + last_free_channel + ', max contiguous: ' + max_unused_channels); } this.status_line.innerHTML = status_line; // now update the cell heights according to how many slots we need this.updateCellHeights_(slots.length); // now loop over all the rows in the patcher table, and render them for (var row = 0; row < this.device_tables.length; ++row) { var table = this.device_tables[row]; var offset = row * ola.RDMPatcher.CHANNELS_PER_ROW; var tr = goog.dom.getFirstElementChild(table); tr = goog.dom.getNextElementSibling(tr); var slot = 0; // updating in place leads to less chances of memory leaks in crappy // browsers while (slot < slots.length) { if (tr == undefined) { tr = goog.dom.createElement('tr'); goog.dom.appendChild(table, tr); } else { var td = goog.dom.getFirstElementChild(tr); while (td != undefined) { goog.dom.removeChildren(td); td = goog.dom.getNextElementSibling(td); } } this.renderSlot_(tr, slots[slot], offset); tr = goog.dom.getNextElementSibling(tr); slot++; } while (tr != undefined) { var td = goog.dom.getFirstElementChild(tr); while (td != undefined) { goog.dom.removeChildren(td); td.colSpan = 1; td = goog.dom.getNextElementSibling(td); } tr = goog.dom.getNextElementSibling(tr); } } }; /** * Render a slot in the patcher table. * @param {element} tr the row to use. May contain tds already. * @private */ ola.RDMPatcher.prototype.renderSlot_ = function(tr, slot_data, start_channel) { var channel = start_channel; var end_channel = start_channel + ola.RDMPatcher.CHANNELS_PER_ROW; var td = goog.dom.getFirstElementChild(tr); while (channel < end_channel) { if (td == undefined) { td = goog.dom.createElement('td'); goog.dom.appendChild(tr, td); } td.colSpan = 1; td.className = ''; if (slot_data[channel]) { var device = slot_data[channel]; td.className = 'patcher_occupied_cell'; // work out the number of channels this spans var remaining_length = device.end - channel + 1; var colspan = Math.min(remaining_length, end_channel - channel); td.colSpan = colspan; channel += colspan; // create a new div var div = goog.dom.createElement('div'); div.innerHTML = device.label; if (device.overflows()) { div.className = 'patcher_overflow_device'; div.title = 'Device overflows the ' + ola.common.DmxConstants.MAX_CHANNEL_NUMBER + ' slot limit'; } else { div.className = 'patcher_device'; } device.addDiv(div); goog.dom.appendChild(td, div); goog.events.listen( div, goog.events.EventType.CLICK, function(d) { return function(e) { this.configureDevice_(d, e); }; }(device), false, this); // setup the dragger var dragger = new ola.CustomDragger(div); dragger.setScrollTarget(this.element); dragger.setHysteresis(8); goog.events.listen( dragger, goog.fx.Dragger.EventType.START, function(d1, d2, d3) { return function(e) { this.startDrag_(d1, d2, e); }; }(div, device), false, this); goog.events.listen( dragger, goog.fx.Dragger.EventType.END, function(d1, d2) { return function(e) { this.endDrag_(d1, d2, e); }; }(div, device), false, this); dragger.setScrollTarget(this.element); this.draggers.push(dragger); } else { channel++; } td = goog.dom.getNextElementSibling(td); } while (td != undefined) { var next = goog.dom.getNextElementSibling(td); goog.dom.removeNode(td); td = next; } }; /** * Called when we start dragging a device * @private */ ola.RDMPatcher.prototype.startDrag_ = function(div, device, e) { // remove any other divs associated with this device var device_divs = device.getDivs(); for (var i = 0; i < device_divs.length; ++i) { if (div != device_divs[i]) { goog.dom.removeNode(device_divs[i]); } } var row_table = goog.dom.getFirstElementChild(this.element); while (!goog.dom.classes.has(row_table, 'patch_row')) { row_table = goog.dom.getNextElementSibling(row_table); } var row_table_size = goog.style.getBorderBoxSize(row_table); // figure out the cell size, remember to account for the borders this.cell_width = row_table_size.width / ola.RDMPatcher.CHANNELS_PER_ROW - 1; // reparent the div and set the styles correctly goog.dom.appendChild(this.element, div); div.className = 'draggable_device'; goog.style.setOpacity(div, 0.50); div.style.width = this.cell_width + 'px'; // set the position of the div to center under the mouse cursor var div_size = goog.style.getBorderBoxSize(div); var patcher_offset = goog.style.getClientPosition(this.element); div.style.top = (this.element.scrollTop + e.clientY - patcher_offset.y - div_size.height / 2) + 'px'; div.style.left = (e.clientX - patcher_offset.x - div_size.width / 2) + 'px'; // set the limits of the drag actions var patcher_height = ola.RDMPatcher.NUMBER_OF_ROWS * this.cell_height; e.dragger.setLimits(new goog.math.Rect( 0, 0, row_table_size.width - div_size.width - 1, patcher_height - div_size.height - 1)); this.scroller.setEnabled(true); return true; }; /** * Called when the dragging finishes * @private */ ola.RDMPatcher.prototype.endDrag_ = function(div, device, e) { goog.style.setOpacity(div, 1); this.scroller.setEnabled(false); var box = goog.style.getBorderBoxSize(div); var deltaX = Math.max(0, e.dragger.deltaX); var deltaY = Math.max(0, e.dragger.deltaY); var center_x = Math.min( deltaX + (box.width / 2), this.cell_width * ola.RDMPatcher.CHANNELS_PER_ROW - 1); var center_y = Math.min( deltaY + (box.height / 2), this.cell_height * ola.RDMPatcher.NUMBER_OF_ROWS - 1); var new_start_address = (Math.floor(center_x / this.cell_width) + ola.RDMPatcher.CHANNELS_PER_ROW * Math.floor(center_y / this.cell_height)); goog.dom.removeNode(div); this.setStartAddress_(device, new_start_address + 1); }; /** * Update the heights of the cells, given the current layout of devices * @private */ ola.RDMPatcher.prototype.updateCellHeights_ = function(overlapping_devices) { // +1 for the title row, and always render at least one row so it looks nice var rows = 1 + Math.max(1, overlapping_devices); var height = rows * ola.RDMPatcher.HEIGHT_PER_DEVICE; for (var i = 0; i < this.rows.length; ++i) { this.rows[i].style.height = height + 'px'; } for (var i = 0; i < this.background_tds.length; ++i) { this.background_tds[i].style.height = (height - 1) + 'px'; } this.cell_height = height; }; /** * Called when the user clicks on a device to configure it. * @param {Object} e the event object. * @private */ ola.RDMPatcher.prototype.configureDevice_ = function(device, e) { if (!e.target.parentNode) { // this was a drag action and the div has been removed, don't show the // dialog. return; } if (this.dialog == undefined) { this.dialog = new goog.ui.Dialog(null, true); this.dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK_CANCEL); goog.events.listen(this.dialog, goog.ui.Dialog.EventType.SELECT, this.saveDevice_, false, this); var table = goog.dom.createElement('table'); // start address var tr = goog.dom.createElement('tr'); var td = goog.dom.createElement('td'); td.innerHTML = 'Start Address'; goog.dom.appendChild(tr, td); td = goog.dom.createElement('td'); this.start_address_input = goog.dom.createElement('input'); goog.dom.appendChild(td, this.start_address_input); goog.dom.appendChild(tr, td); goog.dom.appendChild(table, tr); // personality var tr = goog.dom.createElement('tr'); var td = goog.dom.createElement('td'); td.innerHTML = 'Personality'; goog.dom.appendChild(tr, td); td = goog.dom.createElement('td'); td.noWrap = true; goog.dom.appendChild(tr, td); this.personality_select = new goog.ui.Select(); this.personality_select.render(td); this.personality_spinner = goog.dom.createElement('img'); this.personality_spinner.src = '/loader-mini.gif'; this.personality_spinner.style.display = 'none'; this.personality_spinner.style.verticalAlign = 'middle'; goog.dom.appendChild(td, this.personality_spinner); this.personality_row = tr; goog.dom.appendChild(table, tr); goog.events.listen( this.personality_select, goog.ui.Component.EventType.ACTION, this.setPersonality_, false, this); // now do the identify checkbox tr = goog.dom.createElement('tr'); td = goog.dom.createElement('td'); td.innerHTML = 'Identify'; goog.dom.appendChild(tr, td); td = goog.dom.createElement('td'); td.noWrap = true; var check = new goog.ui.Checkbox(); check.render(td); goog.events.listen( check, goog.ui.Component.EventType.CHANGE, this.toggleIdentify_, false, this); this.identify_box = check; this.identify_spinner = goog.dom.createElement('img'); this.identify_spinner.src = '/loader-mini.gif'; this.identify_spinner.style.display = 'none'; this.identify_spinner.style.verticalAlign = 'middle'; goog.dom.appendChild(td, this.identify_spinner); goog.dom.appendChild(tr, td); goog.dom.appendChild(table, tr); var content = this.dialog.getContentElement(); goog.dom.appendChild(content, table); } this.active_device = device; // fetch the identify mode var server = ola.common.Server.getInstance(); var patcher = this; server.rdmGetUIDIdentifyMode( this.universe_id, device.uid, function(e) { patcher.getIdentifyComplete_(e); }); this.personality_row.style.display = 'none'; var dialog = ola.Dialog.getInstance(); dialog.setAsBusy(); dialog.setVisible(true); }; /** * Called when the get identify mode completes. * @param {Object} e the event object. * @private */ ola.RDMPatcher.prototype.getIdentifyComplete_ = function(e) { var response = ola.common.Server.getInstance().checkForErrorLog(e); if (response != undefined) { var mode = (response['identify_mode'] ? goog.ui.Checkbox.State.CHECKED : goog.ui.Checkbox.State.UNCHECKED); this.identify_box.setChecked(mode); } if (this.active_device.personality_count == undefined || this.active_device.personality_count < 2) { this.displayConfigureDevice_(); } else { var server = ola.common.Server.getInstance(); var patcher = this; server.rdmGetUIDPersonalities( this.universe_id, this.active_device.uid, function(e) { patcher.getPersonalitiesComplete_(e); }); } }; /** * Called when the fetch personalities completes. * @param {Object} e the event object. * @private */ ola.RDMPatcher.prototype.getPersonalitiesComplete_ = function(e) { var response = ola.common.Server.getInstance().checkForErrorLog(e); if (response != undefined) { // remove all items from select for (var i = (this.personality_select.getItemCount() - 1); i >= 0; --i) { this.personality_select.removeItemAt(i); } this.personalities = new Array(); personalities = response['personalities']; for (var i = 0; i < personalities.length; ++i) { if (personalities[i]['footprint'] > 0) { var label = (personalities[i]['name'] + ' (' + personalities[i]['footprint'] + ')'); var item = new goog.ui.MenuItem(label); this.personality_select.addItem(item); if (response['selected'] == i + 1) { this.personality_select.setSelectedItem(item); } this.personalities.push(personalities[i]); } } this.personality_row.style.display = 'table-row'; } this.displayConfigureDevice_(); }; /** * Display the configure device dialog * @private */ ola.RDMPatcher.prototype.displayConfigureDevice_ = function(e) { ola.Dialog.getInstance().setVisible(false); this.start_address_input.value = this.active_device.start + 1; this.dialog.setTitle(this.active_device.label); this.dialog.setVisible(true); this.start_address_input.focus(); }; /** * Save the start address for a device * @param {Object} e the event object. * @private */ ola.RDMPatcher.prototype.saveDevice_ = function(e) { if (e.key == goog.ui.Dialog.DefaultButtonKeys.CANCEL || this.start_address_input == undefined || this.active_device == undefined) { return; } var value = parseInt(this.start_address_input.value); if (isNaN(value) || value < ola.common.DmxConstants.MIN_CHANNEL_NUMBER || value > ola.common.DmxConstants.MAX_CHANNEL_NUMBER) { alert('Must be between ' + ola.common.DmxConstants.MIN_CHANNEL_NUMBER + ' and ' + ola.common.DmxConstants.MAX_CHANNEL_NUMBER); return; } this.setStartAddress_(this.active_device, value); }; /** * Called to set the start address of a device * @private */ ola.RDMPatcher.prototype.setStartAddress_ = function(device, start_address) { var server = ola.common.Server.getInstance(); var patcher = this; server.rdmSetSectionInfo( this.universe_id, device.uid, 'dmx_address', '', 'address=' + start_address, function(e) { patcher.setStartAddressComplete_(device, start_address, e); }); var dialog = ola.Dialog.getInstance(); dialog.setAsBusy(); dialog.setVisible(true); }; /** * Called when the start address set command completes * @private */ ola.RDMPatcher.prototype.setStartAddressComplete_ = function(device, start_address, e) { var response = ola.common.Server.getInstance().checkForErrorDialog(e); if (response != undefined) { var dialog = ola.Dialog.getInstance(); dialog.setVisible(false); device.setStart(start_address); } this.render_(); }; /** * Set the personality. * @param {Object} e the event object. * @private */ ola.RDMPatcher.prototype.setPersonality_ = function(e) { var server = ola.common.Server.getInstance(); this.personality_spinner.style.display = 'inline'; var selected = this.personalities[e.target.getSelectedIndex()]; var patcher = this; var new_footprint = selected['footprint']; server.rdmSetSectionInfo( this.universe_id, this.active_device.uid, 'personality', '', 'int=' + selected['index'], function(e) { patcher.personalityComplete_(e, new_footprint); }); }; /** * Called when the set personality request completes. * @param {Object} e the event object. * @private */ ola.RDMPatcher.prototype.personalityComplete_ = function(e, new_footprint) { this.personality_spinner.style.display = 'none'; var response = ola.common.Server.getInstance().checkForErrorDialog(e); if (response == undefined) { this.dialog.setVisible(false); } else { this.active_device.setFootprint(new_footprint); this.render_(); } }; /** * Toggle the identify mode * @param {Object} e the event object. * @private */ ola.RDMPatcher.prototype.toggleIdentify_ = function(e) { var server = ola.common.Server.getInstance(); this.identify_spinner.style.display = 'inline'; var patcher = this; server.rdmSetSectionInfo( this.universe_id, this.active_device.uid, 'identify_device', '', 'bool=' + (e.target.isChecked() ? '1' : '0'), function(e) { patcher.identifyComplete_(e); }); }; /** * Called when the identify request completes. * @param {Object} e the event object. * @private */ ola.RDMPatcher.prototype.identifyComplete_ = function(e) { this.identify_spinner.style.display = 'none'; var response = ola.common.Server.getInstance().checkForErrorDialog(e); if (response == undefined) { this.dialog.setVisible(false); } }; /** * Update the start address for the next device in the queue. * @param {Object} e the event object. * @private */ ola.RDMPatcher.prototype.updateNextDevice_ = function(e) { var server = ola.common.Server.getInstance(); var address_change = this.address_changes[0]; var patcher = this; server.rdmSetSectionInfo( this.universe_id, address_change.device.uid, 'dmx_address', '', 'address=' + address_change.new_start_address, function(e) { patcher.updateStartAddressComplete_(e); }); }; /** * Called when a device's start address is updated. * @param {Object} e the event object. * @private */ ola.RDMPatcher.prototype.updateStartAddressComplete_ = function(e) { var response = ola.common.Server.getInstance().checkForErrorLog(e); var address_change = this.address_changes.shift(); if (response == undefined) { // mark as error this.patching_failures = true; } else { address_change.device.setStart(address_change.new_start_address); } if (this.address_changes.length) { this.updateNextDevice_(); } else { var dialog = ola.Dialog.getInstance(); if (this.patching_failures) { dialog.setTitle('Failed to Set Start Address'); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setContent( 'Some devices failed to change their DMX start address, ' + ' click refresh to fetch the current state.'); dialog.setVisible(true); } else { dialog.setVisible(false); } this.render_(); } }; ola-0.10.9/javascript/ola/full/custom_dragger.js0000664000175000017500000000452314376533110016534 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The custom OLA dragger. * This overrides the initializeDrag_to update deltaX & deltaY after START has * been fired. This is needed because we re-parent the target when we start * dragging. * Copyright (C) 2010 Simon Newton */ goog.require('goog.fx.Dragger'); goog.provide('ola.CustomDragger'); ola.CustomDragger = function(target, opt_handle, opt_limits) { goog.fx.Dragger.call(this, target, opt_handle, opt_limits); }; goog.inherits(ola.CustomDragger, goog.fx.Dragger); /** * Event handler that is used to start the drag * @param {goog.events.BrowserEvent|goog.events.Event} e Event object. * @private */ ola.CustomDragger.prototype.initializeDrag_ = function(e) { var rv = this.dispatchEvent(new goog.fx.DragEvent( goog.fx.Dragger.EventType.START, this, e.clientX, e.clientY, /** @type {goog.events.BrowserEvent} */(e))); if (rv !== false) { this.deltaX = this.target.offsetLeft; this.deltaY = this.target.offsetTop; this.dragging_ = true; } ola.logger.info('delta from parent: ' + this.deltaX + ', ' + this.deltaY); }; ola.CustomDragger.prototype.calculatePosition_ = function(dx, dy) { // Update the position for any change in body scrolling var pageScroll = new goog.math.Coordinate(this.scrollTarget_.scrollLeft, this.scrollTarget_.scrollTop); dx += pageScroll.x - this.pageScroll.x; dy += pageScroll.y - this.pageScroll.y; this.pageScroll = pageScroll; this.deltaX += dx; this.deltaY += dy; var x = this.limitX(this.deltaX); var y = this.limitY(this.deltaY); return new goog.math.Coordinate(x, y); }; ola-0.10.9/javascript/ola/full/custom_dragscrollsupport.js0000664000175000017500000000375014376533110020713 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The custom OLA DragScrollSupport. * This adds an enable(bool) method so we can turn the scrolling behaviour on * and off. * Copyright (C) 2010 Simon Newton */ goog.require('goog.fx.DragScrollSupport'); goog.provide('ola.CustomDragScrollSupport'); ola.CustomDragScrollSupport = function(containerNode, opt_verticalMargin) { goog.fx.DragScrollSupport.call(this, containerNode, opt_verticalMargin, true); }; goog.inherits(ola.CustomDragScrollSupport, goog.fx.DragScrollSupport); ola.CustomDragScrollSupport.prototype.setEnabled = function(state) { if (state) { this.eventHandler_.listen(goog.dom.getOwnerDocument(this.containerNode_), goog.events.EventType.MOUSEMOVE, this.onMouseMove); } else { this.eventHandler_.unlisten(goog.dom.getOwnerDocument(this.containerNode_), goog.events.EventType.MOUSEMOVE, this.onMouseMove); } }; ola.CustomDragScrollSupport.prototype.updateBoundaries = function() { this.containerBounds_ = goog.style.getBounds(this.containerNode_); this.scrollBounds_ = this.verticalMargin_ ? this.constrainBounds_(this.containerBounds_.clone()) : this.containerBounds_; }; ola-0.10.9/javascript/ola/full/base_universe_tab.js0000664000175000017500000000376014376533110017211 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The base class for the tabs used in the universe pane. * Copyright (C) 2010 Simon Newton */ goog.require('goog.math'); goog.require('goog.style'); goog.provide('ola.common.BaseUniverseTab'); /** * The base tab for the universe view. * @param {element} element the element to use for the tab. * @constructor */ ola.common.BaseUniverseTab = function(element) { this.element = goog.dom.$(element); this.active = false; this.universe_id = undefined; }; /** * Called when the universe changes. */ ola.common.BaseUniverseTab.prototype.setUniverse = function(universe_id) { this.universe_id = universe_id; }; /** * Get the current universe; */ ola.common.BaseUniverseTab.prototype.getUniverse = function() { return this.universe_id; }; /** * Called when the view port size changes */ ola.common.BaseUniverseTab.prototype.sizeChanged = function(frame_size) { goog.style.setBorderBoxSize( this.element, new goog.math.Size(frame_size.width - 7, frame_size.height - 34)); }; /** * Called when the tab becomes visible. */ ola.common.BaseUniverseTab.prototype.setActive = function(state) { this.active = state; }; /** * Returns true if this tab is active (visible); */ ola.common.BaseUniverseTab.prototype.isActive = function() { return this.active; }; ola-0.10.9/javascript/ola/full/available_port_table.js0000664000175000017500000001304314376533110017657 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The table that holds a list of available ports. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.ui.Checkbox'); goog.require('goog.ui.Component'); goog.require('ola.LoggerWindow'); goog.require('ola.common.Server'); goog.provide('ola.AvailablePort'); goog.provide('ola.AvailablePortTable'); /** * A row in the available ports list. * @param {Object} data the data to build this row from. * @constructor */ ola.AvailablePort = function(data, opt_domHelper) { goog.ui.Component.call(this, opt_domHelper); this.data = data; }; goog.inherits(ola.AvailablePort, goog.ui.Component); /** * This component can't be used to decorate * @return {bool} false. */ ola.AvailablePort.prototype.canDecorate = function() { return false; }; /** * Create the dom for this component */ ola.AvailablePort.prototype.createDom = function() { var tr = this.dom_.createDom('tr', {}); tr.style.cursor = 'pointer'; var td = goog.dom.createDom('td', {}, ''); this.dom_.appendChild(tr, td); this.checkbox = new goog.ui.Checkbox(); this.checkbox.render(td); this.dom_.appendChild(tr, goog.dom.createDom('td', {}, this.data['device'])); this.dom_.appendChild(tr, goog.dom.createDom('td', {}, this.data['is_output'] ? 'Output' : 'Input')); this.dom_.appendChild(tr, goog.dom.createDom('td', {}, this.data['description'])); this.setElementInternal(tr); }; /** * Attach the listener. */ ola.AvailablePort.prototype.enterDocument = function() { ola.AvailablePort.superClass_.enterDocument.call(this); goog.events.listen(this.getElement(), goog.events.EventType.CLICK, function() { this.checkbox.toggle(); }, false, this); }; /** * Clean up this object. */ ola.AvailablePort.prototype.exitDocument = function() { ola.AvailablePort.superClass_.exitDocument.call(this); this.checkbox.exitDocument(); goog.events.removeAll(this.getElement()); }; /** * Dispose of this object. */ ola.AvailablePort.prototype.dispose = function() { if (!this.getDisposed()) { ola.AvailablePort.superClass_.dispose.call(this); this.checkbox.dispose(); } }; /** * Get the port id for this item * @return {string} the id of this port. */ ola.AvailablePort.prototype.portId = function() { return this.data['id']; }; /** * Check is this row was selected * @return {boolean} true if selected, false otherwise. */ ola.AvailablePort.prototype.isSelected = function() { return this.checkbox.isChecked(); }; /** * An available port table component. * @constructor */ ola.AvailablePortTable = function(opt_domHelper) { goog.ui.Component.call(this, opt_domHelper); }; goog.inherits(ola.AvailablePortTable, goog.ui.Component); /** * Create the dom for the AvailablePortTable * @param {Element} container the dom element to decorate. */ ola.AvailablePortTable.prototype.createDom = function(container) { this.decorateInternal(this.dom_.createElement('tbody')); }; /** * Decorate an existing element */ ola.AvailablePortTable.prototype.decorateInternal = function(element) { ola.AvailablePortTable.superClass_.decorateInternal.call(this, element); }; /** * Check if we can decorate an element. * @param {Element} element the dom element to check. * @return {boolean} true if this element can be decorated, false otherwise. */ ola.AvailablePortTable.prototype.canDecorate = function(element) { return element.tagName == 'TBODY'; }; /** * Returns the list of selected ports * @return {Array.} */ ola.AvailablePortTable.prototype.getSelectedRows = function() { var selected_ports = new Array(); var count = this.getChildCount(); for (var i = 0; i < count; ++i) { var port = this.getChildAt(i); if (port.isSelected()) { selected_ports.push(port.portId()); } } return selected_ports; }; /** * Clear all rows from this table */ ola.AvailablePortTable.prototype.removeAllRows = function() { while (this.getChildCount()) { var row = this.removeChildAt(0, true); row.dispose(); } }; /** * Update the list of available ports * @param {number} universe_id the id of the universe to fetch the available * ports for. */ ola.AvailablePortTable.prototype.update = function(universe_id) { var table = this; ola.common.Server.getInstance().fetchAvailablePorts( universe_id, function(e) { table.updateCompleted_(e); }); }; /** * Called when the list of available ports is returned * @private */ ola.AvailablePortTable.prototype.updateCompleted_ = function(e) { if (!ola.common.Server.getInstance().checkStatusDialog(e)) { return; } this.removeAllRows(); var ports = e.target.getResponseJson(); var port_length = ports.length; for (var i = 0; i < port_length; ++i) { var component = new ola.AvailablePort(ports[i]); this.addChild(component, true); } }; ola-0.10.9/javascript/ola/full/rdm_patcher_tab.js0000664000175000017500000001651114376533110016645 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The RDM patcher tab. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.ui.Toolbar'); goog.require('goog.ui.ToolbarButton'); goog.require('goog.ui.ToolbarMenuButton'); goog.require('goog.ui.ToolbarSeparator'); goog.require('ola.Dialog'); goog.require('ola.RDMPatcher'); goog.require('ola.RDMPatcherDevice'); goog.require('ola.common.BaseUniverseTab'); goog.require('ola.common.Server'); goog.require('ola.common.UidItem'); goog.provide('ola.RDMPatcherTab'); /** * The tab for the RDM patcher. * @constructor * @param {Element} element the DOM element to use. */ ola.RDMPatcherTab = function(element) { ola.common.BaseUniverseTab.call(this, element); var toolbar = new goog.ui.Toolbar(); toolbar.decorate(goog.dom.$('patcher_toolbar')); var autopatch_button = toolbar.getChild('autoPatchButton'); autopatch_button.setTooltip('Automatically Patch Devices'); goog.events.listen(autopatch_button, goog.ui.Component.EventType.ACTION, function() { this.autoPatchButtonClicked_(); }, false, this); var refresh_button = toolbar.getChild('patcherRefreshButton'); refresh_button.setTooltip('Refresh Devices'); goog.events.listen(refresh_button, goog.ui.Component.EventType.ACTION, function() { this.update_(); }, false, this); this.patcher = new ola.RDMPatcher('patcher_div', 'patcher_status'); // These are devices that we know exist, but we don't have the start address // or footprint for. this.pending_devices = new Array(); // These are devices that we have all the info for. this.devices = new Array(); this.loading_div = goog.dom.createElement('div'); this.loading_div.style.width = '100%'; this.loading_div.style.textAlign = 'center'; this.loading_div.innerHTML = '
Loading...'; this.loading_div.style.marginTop = '10px'; goog.dom.appendChild(goog.dom.$('patcher_div'), this.loading_div); }; goog.inherits(ola.RDMPatcherTab, ola.common.BaseUniverseTab); /** * Set the universe for the patcher */ ola.RDMPatcherTab.prototype.setUniverse = function(universe_id) { ola.RDMPatcherTab.superClass_.setUniverse.call(this, universe_id); this.patcher.setUniverse(universe_id); this.pending_devices = new Array(); this.patcher.setDevices(new Array()); }; /** * Called when the view port size changes */ ola.RDMPatcherTab.prototype.sizeChanged = function(frame_size) { ola.RDMPatcherTab.superClass_.sizeChanged.call(this, frame_size); // tab bar: 34, toolbar: 27, status line 16, extra: 5 this.patcher.sizeChanged(frame_size.height - 34 - 27 - 16 - 5); }; /** * Controls if we should do all the work involved in rendering the patcher. * This isn't needed if the patcher isn't visible. */ ola.RDMPatcherTab.prototype.setActive = function(state) { ola.RDMPatcherTab.superClass_.setActive.call(this, state); if (!this.isActive()) return; this.update_(); }; /** * Called when the UID list changes. * @param {Object} e the event object. * @private */ ola.RDMPatcherTab.prototype.updateUidList_ = function(e) { var response = ola.common.Server.getInstance().checkForErrorLog(e); if (response == undefined) { return; } // It would be really nice to re-used the old values so we didn't have to // re-fetch everything but until we have some notification mechanism we can't // risk caching stale data. this.pending_devices = new Array(); this.devices = new Array(); var uids = e.target.getResponseJson()['uids']; for (var i = 0; i < uids.length; ++i) { this.pending_devices.push(new ola.common.UidItem(uids[i])); } if (this.isActive()) { this.fetchNextDeviceOrRender_(); } }; /** * Fetch the information for the next device in the list, or render the patcher * if we've run out of devices. * @private */ ola.RDMPatcherTab.prototype.fetchNextDeviceOrRender_ = function() { // fetch the new device in the list if (!this.pending_devices.length) { this.patcher.setDevices(this.devices); this.loading_div.style.display = 'none'; this.patcher.update(); return; } var server = ola.common.Server.getInstance(); var device = this.pending_devices.shift(); ola.logger.info('Fetching device ' + device.asString()); var tab = this; server.rdmGetUIDInfo( this.getUniverse(), device.asString(), function(e) { tab.deviceInfoComplete_(device, e); }); }; /** * Called when we get new information for a device * @param {Object} e the event object. * @private */ ola.RDMPatcherTab.prototype.deviceInfoComplete_ = function(device, e) { if (!this.isActive()) { return; } var response = ola.common.Server.getInstance().checkForErrorLog(e); if (response == undefined) { this.fetchNextDeviceOrRender_(); return; } var label = device.deviceName(); if (label) { label += ' [' + device.asString() + ']'; } else { label = device.asString(); } if (response['footprint'] > 0) { this.devices.push( new ola.RDMPatcherDevice( device.asString(), label, response['address'], response['footprint'], response['personality'], response['personality_count']) ); } this.fetchNextDeviceOrRender_(); }; /** * Fetch the devices and render * @private */ ola.RDMPatcherTab.prototype.update_ = function() { // we've just become visible this.patcher.hide(); this.loading_div.style.display = 'block'; var server = ola.common.Server.getInstance(); var tab = this; server.fetchUids( this.universe_id, function(e) { tab.updateUidList_(e); }); }; /** * Called when the user clicks on the auto patch button * @private */ ola.RDMPatcherTab.prototype.autoPatchButtonClicked_ = function() { var dialog = ola.Dialog.getInstance(); dialog.setTitle('Confirm Auto Patch'); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.YES_NO); dialog.setContent('This will change the start addresses of all devices.' + ' Are you sure you want to continue?'); goog.events.listen( dialog, goog.ui.Dialog.EventType.SELECT, this.autoPatchConfirmed_, false, this); dialog.setVisible(true); }; /** * Called when the auto patch is confirmed * @param {Object} e the event object. * @private */ ola.RDMPatcherTab.prototype.autoPatchConfirmed_ = function(e) { var dialog = ola.Dialog.getInstance(); goog.events.unlisten(dialog, goog.ui.Dialog.EventType.SELECT, this.autoPatchButtonClicked_, false, this); if (e.key == goog.ui.Dialog.DefaultButtonKeys.YES) { this.patcher.autoPatch(); return false; } }; ola-0.10.9/javascript/ola/full/universe_frame.js0000664000175000017500000001276414376533110016547 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The universe frame. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.ui.TabPane'); goog.require('ola.BaseFrame'); goog.require('ola.Dialog'); goog.require('ola.DmxConsoleTab'); goog.require('ola.DmxMonitorTab'); goog.require('ola.RDMPatcherTab'); goog.require('ola.RDMTab'); goog.require('ola.UniverseSettingsTab'); goog.require('ola.common.Server'); goog.provide('ola.UniverseFrame'); /** * The class representing the Universe frame * @param {string} element_id the id of the element to use for this frame. * @param {Object} ola_ui the OlaUI object. * @constructor */ ola.UniverseFrame = function(element_id, ola_ui) { ola.BaseFrame.call(this, element_id); this.ola_ui = ola_ui; this.current_universe = undefined; // setup the tab pane this.tabPane = new goog.ui.TabPane(goog.dom.$(element_id + '_tab_pane')); this.tabPane.addPage(new goog.ui.TabPane.TabPage( goog.dom.$('tab_page_1'), 'Settings')); this.tabPane.addPage(new goog.ui.TabPane.TabPage( goog.dom.$('tab_page_2'), 'RDM')); this.tabPane.addPage(new goog.ui.TabPane.TabPage( goog.dom.$('tab_page_3'), 'RDM Patcher')); this.tabPane.addPage(new goog.ui.TabPane.TabPage( goog.dom.$('tab_page_4'), 'DMX Monitor')); this.tabPane.addPage(new goog.ui.TabPane.TabPage( goog.dom.$('tab_page_5'), 'DMX Console')); this.tabs = new Array(); this.tabs.push( new ola.UniverseSettingsTab( 'tab_page_1', function() { ola_ui.ShowHome(); }) ); // We need to make the RDM pane visible here otherwise the splitter // doesn't render correctly. this.tabPane.setSelectedIndex(1); this.tabs.push(new ola.RDMTab('tab_page_2')); this.tabPane.setSelectedIndex(0); this.tabs.push(new ola.RDMPatcherTab('tab_page_3')); this.tabs.push(new ola.DmxMonitorTab('tab_page_4')); this.tabs.push(new ola.DmxConsoleTab('tab_page_5')); goog.events.listen(this.tabPane, goog.ui.TabPane.Events.CHANGE, this.updateSelectedTab_, false, this); var server = ola.common.Server.getInstance(); goog.events.listen(server, ola.common.Server.EventType.UNIVERSE_LIST_EVENT, this.newUniverseList_, false, this); }; goog.inherits(ola.UniverseFrame, ola.BaseFrame); /** * Set the size of the split pane to match the parent element * @param {Object} e the event object. */ ola.UniverseFrame.prototype.setSplitPaneSize = function(e) { var big_frame = goog.dom.$('ola-splitpane-content'); var big_size = goog.style.getBorderBoxSize(big_frame); var selected_tab = this.tabPane.getSelectedIndex(); this.tabs[selected_tab].sizeChanged(big_size); }; /** * Show this frame. We extend the base method so we can populate the correct * tab. * @param {number} universe_id the universe id to show. * @param {boolean} opt_select_main_tab set to true to display the main tab. */ ola.UniverseFrame.prototype.Show = function(universe_id, opt_select_main_tab) { if (this.current_universe != universe_id) { for (var i = 0; i < this.tabs.length; ++i) { this.tabs[i].setUniverse(universe_id); } this.current_universe = universe_id; } ola.UniverseFrame.superClass_.Show.call(this); if (opt_select_main_tab) { this.tabPane.setSelectedIndex(0); } this.updateSelectedTab_(); }; /** * Hide this frame. We extend the base method so we can notify the active tab. */ ola.UniverseFrame.prototype.Hide = function() { for (var i = 0; i < this.tabs.length; ++i) { if (this.tabs[i].isActive()) { this.tabs[i].setActive(false); } } ola.UniverseFrame.superClass_.Hide.call(this); }; /** * Update the tab that was selected * @param {Object} e the event object. * @private */ ola.UniverseFrame.prototype.updateSelectedTab_ = function(e) { if (!this.IsVisible()) { return; } for (var i = 0; i < this.tabs.length; ++i) { if (this.tabs[i].isActive()) { this.tabs[i].setActive(false); } } this.setSplitPaneSize(); var selected_tab = this.tabPane.getSelectedIndex(); this.tabs[selected_tab].setActive(true); }; /** * Called when new universes are available. We use this to detect if this * universe has been deleted. * @param {Object} e the event object. * @private */ ola.UniverseFrame.prototype.newUniverseList_ = function(e) { var found = false; for (var i = 0; i < e.universes.length; ++i) { if (e.universes[i]['id'] == this.current_universe) { found = true; break; } } if (this.IsVisible() && !found) { var dialog = ola.Dialog.getInstance(); dialog.setTitle('Universe ' + this.current_universe + ' Removed'); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setContent('This universe has been removed by another user.'); dialog.setVisible(true); this.ola_ui.ShowHome(); } }; ola-0.10.9/javascript/ola/full/dmx_console.js0000664000175000017500000002464014376533110016043 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The dmx console. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.ui.Component'); goog.require('goog.ui.Container'); goog.require('goog.ui.Control'); goog.require('goog.ui.Slider'); goog.require('goog.ui.Toolbar'); goog.require('goog.ui.ToolbarButton'); goog.require('goog.ui.ToolbarSeparator'); goog.require('ola.common.DmxConstants'); goog.provide('ola.DmxConsole'); /** * The class representing the console. * @constructor */ ola.DmxConsole = function() { this.setup = false; this.sliders = new Array(); this.slider_values = new Array(); this.data = new Array(ola.common.DmxConstants.MAX_CHANNEL_NUMBER); this.value_cells = new Array(); this.slider_offset = 0; }; goog.inherits(ola.DmxConsole, goog.events.EventTarget); /** The number of sliders to render @type {number} */ ola.DmxConsole.NUMBER_OF_SLIDERS = 16; /** The name of the change event @type {string} */ ola.DmxConsole.CHANGE_EVENT = 'console-change-event'; /** * We use events here so we can throttle the rate. * @constructor */ ola.DmxConsoleChangeEvent = function() { goog.events.Event.call(this, ola.DmxConsole.CHANGE_EVENT); }; goog.inherits(ola.DmxConsoleChangeEvent, goog.events.Event); /** * Return the console data as an array * @return {Array.} a list of channel data from the console. */ ola.DmxConsole.prototype.getData = function() { return this.data; }; /** * Set the data for this console */ ola.DmxConsole.prototype.setData = function(data) { var data_length = Math.min(ola.common.DmxConstants.MAX_CHANNEL_NUMBER, data.length); for (var i = 0; i < data_length; ++i) { this.data[i] = data[i]; } for (var i = data_length; i < ola.common.DmxConstants.MAX_CHANNEL_NUMBER; ++i) { this.data[i] = 0; } this.updateSliderOffsets_(); var data_length = this.data.length; for (var i = 0; i < data_length; ++i) { this.setCellValue_(i, this.data[i]); } }; /** * Reset the console. This resets the underlying data but doesn't update the * screen. */ ola.DmxConsole.prototype.resetConsole = function() { var data_length = this.data.length; for (var i = 0; i < data_length; ++i) { this.data[i] = 0; } this.slider_offset = 0; }; /** * Setup the console if it hasn't already been setup */ ola.DmxConsole.prototype.setupIfRequired = function() { if (this.setup) { return; } // setup the toolbar var toolbar = new goog.ui.Toolbar(); this.previous_page_button = new goog.ui.ToolbarButton( goog.dom.createDom('div', 'ola-icon ola-icon-prev')); this.previous_page_button.setTooltip('Previous Page'); this.next_page_button = new goog.ui.ToolbarButton( goog.dom.createDom('div', 'ola-icon ola-icon-next')); this.next_page_button.setTooltip('Next Page'); this.previous_page_button.setEnabled(false); var blackout_button = new goog.ui.ToolbarButton( goog.dom.createDom('div', 'ola-icon ola-icon-dbo')); blackout_button.setTooltip('Set all channels to 0'); var full_button = new goog.ui.ToolbarButton( goog.dom.createDom('div', 'ola-icon ola-icon-full')); full_button.setTooltip('Set all channels to full'); toolbar.addChild(this.previous_page_button, true); toolbar.addChild(this.next_page_button, true); toolbar.addChild(new goog.ui.ToolbarSeparator(), true); toolbar.addChild(blackout_button, true); toolbar.addChild(full_button, true); toolbar.render(goog.dom.getElement('console_toolbar')); goog.events.listen(this.previous_page_button, goog.ui.Component.EventType.ACTION, this.previousPageClicked_, false, this); goog.events.listen(this.next_page_button, goog.ui.Component.EventType.ACTION, this.nextPageClicked_, false, this); goog.events.listen(blackout_button, goog.ui.Component.EventType.ACTION, this.blackoutButtonClicked_, false, this); goog.events.listen(full_button, goog.ui.Component.EventType.ACTION, this.fullButtonClicked_, false, this); // setup the value display var value_table = goog.dom.$('channel_values'); for (var i = 0; i < ola.common.DmxConstants.MAX_CHANNEL_NUMBER; ++i) { var div = goog.dom.createElement('div'); div.innerHTML = 0; div.title = 'Channel ' + (i + 1); goog.dom.appendChild(value_table, div); this.value_cells.push(div); } // setup the sliders var channel_row = goog.dom.$('console_channel_row'); var value_row = goog.dom.$('console_value_row'); var slider_row = goog.dom.$('console_slider_row'); for (var i = 0; i < ola.DmxConsole.NUMBER_OF_SLIDERS; ++i) { var channel_td = goog.dom.createElement('td'); channel_td.innerHTML = i + 1; goog.dom.appendChild(channel_row, channel_td); var value_td = goog.dom.createElement('td'); value_td.innerHTML = '0'; goog.dom.appendChild(value_row, value_td); this.slider_values.push(value_td); var slider_td = goog.dom.createElement('td'); goog.dom.appendChild(slider_row, slider_td); var slider = new goog.ui.Slider; slider.setOrientation(goog.ui.Slider.Orientation.VERTICAL); slider.setMinimum(0); slider.setMaximum(ola.common.DmxConstants.MAX_CHANNEL_VALUE); slider.render(slider_td); goog.events.listen( slider, goog.ui.Component.EventType.CHANGE, (function(offset) { return function() { this.sliderChanged_(offset) }; } )(i), false, this); this.sliders.push(slider); } this.setup = true; // zero data this.setAllChannels_(ola.common.DmxConstants.MIN_CHANNEL_VALUE); }; /** * Update the console to reflect the data. This is called when it becomes * visible. */ ola.DmxConsole.prototype.update = function() { // set the state of the prev / next buttons if (this.slider_offset == 0) { this.previous_page_button.setEnabled(false); } else { this.previous_page_button.setEnabled(true); } if (this.slider_offset == ola.common.DmxConstants.MAX_CHANNEL_NUMBER - ola.DmxConsole.NUMBER_OF_SLIDERS) { this.next_page_button.setEnabled(false); } else { this.next_page_button.setEnabled(true); } }; /** * Called when the next page button is clicked * @private */ ola.DmxConsole.prototype.nextPageClicked_ = function() { this.slider_offset += ola.DmxConsole.NUMBER_OF_SLIDERS; this.previous_page_button.setEnabled(true); var page_limit = (ola.common.DmxConstants.MAX_CHANNEL_NUMBER - ola.DmxConsole.NUMBER_OF_SLIDERS); if (this.slider_offset >= page_limit) { this.slider_offset = page_limit; this.next_page_button.setEnabled(false); } this.updateSliderOffsets_(); }; /** * Called when the previous page button is clicked * @private */ ola.DmxConsole.prototype.previousPageClicked_ = function() { this.slider_offset -= ola.DmxConsole.NUMBER_OF_SLIDERS; this.next_page_button.setEnabled(true); if (this.slider_offset <= 0) { this.slider_offset = 0; this.previous_page_button.setEnabled(false); } this.updateSliderOffsets_(); }; /** * Update the slider offsets. * @private */ ola.DmxConsole.prototype.updateSliderOffsets_ = function() { var channel_row = goog.dom.$('console_channel_row'); var td = goog.dom.getFirstElementChild(channel_row); var i = this.slider_offset; while (i < this.data.length && td != undefined) { td.innerHTML = i + 1; i++; td = goog.dom.getNextElementSibling(td); } // set the values of the sliders for (var i = 0; i < this.sliders.length; ++i) { this.sliders[i].setValue(this.data[this.slider_offset + i]); } }; /** * Called when the blackout button is clicked. * @private */ ola.DmxConsole.prototype.blackoutButtonClicked_ = function() { this.setAllChannels_(ola.common.DmxConstants.MIN_CHANNEL_VALUE); }; /** * Called when the full on button is clicked. * @private */ ola.DmxConsole.prototype.fullButtonClicked_ = function() { this.setAllChannels_(ola.common.DmxConstants.MAX_CHANNEL_VALUE); }; /** * Set all channels to a value. * @param {number} value the value to set all channels to. * @private */ ola.DmxConsole.prototype.setAllChannels_ = function(value) { var data_length = this.data.length; for (var i = 0; i < data_length; ++i) { this.data[i] = value; this.setCellValue_(i, value); } for (var i = 0; i < this.sliders.length; ++i) { this.sliders[i].setValue(value); } this.dispatchEvent(new ola.DmxConsoleChangeEvent()); }; /** * Called when the value of a slider changes. * @param {number} offset the offset of the slider that changed. * @private */ ola.DmxConsole.prototype.sliderChanged_ = function(offset) { var value = this.sliders[offset].getValue(); this.slider_values[offset].innerHTML = value; var channel = this.slider_offset + offset; this.setCellValue_(channel, value); if (this.data[channel] != value) { this.data[channel] = value; this.dispatchEvent(new ola.DmxConsoleChangeEvent()); } }; /** * Set the value of a channel cell * @param {number} offset the channel offset. * @param {number} value the value to set the channel to. * @private */ ola.DmxConsole.prototype.setCellValue_ = function(offset, value) { var element = this.value_cells[offset]; if (element == undefined) { return; } element.innerHTML = value; var remaining = ola.common.DmxConstants.MAX_CHANNEL_VALUE - value; element.style.background = 'rgb(' + remaining + ',' + remaining + ',' + remaining + ')'; if (value > ola.common.DmxConstants.BACKGROUND_CHANGE_CHANNEL_LEVEL) { element.style.color = '#ffffff'; } else { element.style.color = '#000000'; } }; ola-0.10.9/javascript/ola/full/dmx_monitor_tab.js0000664000175000017500000000451614376533110016716 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The DMX monitor tab. * Copyright (C) 2012 Simon Newton */ goog.require('goog.events'); goog.require('goog.ui.Toolbar'); goog.require('ola.common.BaseUniverseTab'); goog.require('ola.common.DmxMonitor'); goog.provide('ola.DmxMonitorTab'); /** * The DMX monitor tab. * @constructor */ ola.DmxMonitorTab = function(element) { ola.common.BaseUniverseTab.call(this, element); this.dmx_monitor = new ola.common.DmxMonitor( goog.dom.$('monitor_values')); this.setup = false; }; goog.inherits(ola.DmxMonitorTab, ola.common.BaseUniverseTab); /** * Called when the tab changes visibility. */ ola.DmxMonitorTab.prototype.setActive = function(state) { ola.DmxMonitorTab.superClass_.setActive.call(this, state); if (this.isActive() && !this.setup) { // setup the toolbar var toolbar = new goog.ui.Toolbar(); toolbar.decorate(goog.dom.$('monitor_toolbar')); var view_button = toolbar.getChild('monitor_view_button'); view_button.setTooltip('Change the DMX Monitor layout'); goog.events.listen(view_button, goog.ui.Component.EventType.ACTION, this.viewChanged_, false, this); this.setup = true; } this.dmx_monitor.setState(state, this.getUniverse()); }; /** * Called when the view changes * @param {Object} e the event object. * @private */ ola.DmxMonitorTab.prototype.viewChanged_ = function(e) { var value = e.target.getCaption(); if (value == 'Full') { goog.dom.$('monitor_values').className = 'monitor_full'; } else { goog.dom.$('monitor_values').className = 'monitor_compact'; } }; ola-0.10.9/javascript/ola/full/plugin_frame.js0000664000175000017500000001026014376533110016172 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The plugin frame. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.string'); goog.require('ola.BaseFrame'); goog.require('ola.common.PluginItem'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.provide('ola.PluginFrame'); /** * The class representing the Plugin frame * @param {string} element_id the ID of the element to use. * @constructor */ ola.PluginFrame = function(element_id, show_plugin_fn) { ola.BaseFrame.call(this, element_id); this._show_plugin_fn = show_plugin_fn; goog.events.listen( ola.common.Server.getInstance(), ola.common.Server.EventType.PLUGIN_EVENT, this.UpdateFromData_, false, this); this.controls = new Array(); }; goog.inherits(ola.PluginFrame, ola.BaseFrame); /** * Update this plugin frame from a Plugin object * @param {ola.PluginChangeEvent} e the plugin event. * @private */ ola.PluginFrame.prototype.UpdateFromData_ = function(e) { goog.dom.$('plugin_name').innerHTML = e.plugin['name']; goog.dom.$('plugin_preference_source').innerHTML = e.plugin['preferences_source']; var enabled_span = goog.dom.$('plugin_enabled'); if (e.plugin['enabled']) { enabled_span.innerHTML = 'Yes'; enabled_span.className = 'plugin_enabled'; } else { enabled_span.innerHTML = 'No'; enabled_span.className = 'plugin_disabled'; } var active_span = goog.dom.$('plugin_active'); if (e.plugin['active']) { active_span.innerHTML = 'Yes'; active_span.className = 'plugin_enabled'; } else { active_span.innerHTML = 'No'; active_span.className = 'plugin_disabled'; } var possible_conflicts = e.plugin['enabled'] && !e.plugin['active']; var conflict_row = goog.dom.$('plugin_conflict_row'); var conflict_list = e.plugin['conflicts_with']; if (conflict_list.length) { conflict_row.style.display = 'table-row'; // remove old controls for (var i = 0; i < this.controls.length; ++i) { this.controls[i].dispose(); } this.controls = new Array(); var conflicts = goog.dom.$('plugin_conflict_list'); conflicts.innerHTML = ''; // add new controls for (var i = 0; i < conflict_list.length; ++i) { var plugin = conflict_list[i]; var control = new goog.ui.Control( goog.dom.createDom('span', null, plugin['name'])); control.render(conflicts); this.AttachListener_(control, plugin['id']); this.controls.push(control); if (possible_conflicts && plugin['active']) { var icon = goog.dom.createDom('img', {'src': '/warning.png'}); goog.dom.appendChild(conflicts, icon); } goog.dom.appendChild(conflicts, goog.dom.createDom('br')); } } else { conflict_row.style.display = 'none'; } var description = goog.string.htmlEscape(e.plugin['description']); description = description.replace(/\\n/g, '
'); goog.dom.$('plugin_description').innerHTML = description; }; /** * Called when a plugin name is clicked. * @param {ola.int} id the plugin id. * @private */ ola.PluginFrame.prototype.PluginControlClicked_ = function(id) { this._show_plugin_fn(id); }; /** * Attach a listener to a control. * @private */ ola.PluginFrame.prototype.AttachListener_ = function(control, plugin_id) { goog.events.listen(control, goog.ui.Component.EventType.ACTION, function(e) { this.PluginControlClicked_(plugin_id); }, false, this); }; ola-0.10.9/javascript/ola/base_frame.js0000664000175000017500000000345314376533110014652 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The base class that all other frames inherit from. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.provide('ola.BaseFrame'); /** * The base frame class * @param {string} element_id the id of the div to use for the home frame. * @constructor */ ola.BaseFrame = function(element_id) { this.element = goog.dom.$(element_id); }; /** * Check if this frame is visible. * @return {boolean} true if visible, false otherwise. */ ola.BaseFrame.prototype.IsVisible = function() { return this.element.style.display == 'block'; }; /** * Show this frame */ ola.BaseFrame.prototype.Show = function() { this.element.style.display = 'block'; }; /** * Hide this frame */ ola.BaseFrame.prototype.Hide = function() { this.element.style.display = 'none'; }; /** * Make this frame show the spinner */ ola.BaseFrame.prototype.setAsBusy = function() { this.element.innerHTML = ( '
'); }; /** * Make this frame show the spinner */ ola.BaseFrame.prototype.Clear = function() { this.element.innerHTML = ''; }; ola-0.10.9/javascript/ola/common/0000775000175000017500000000000014376533271013603 500000000000000ola-0.10.9/javascript/ola/common/uid_list.js0000664000175000017500000001206014376533110015664 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * An order preserving, list of UIDs * Copyright (C) 2010 Simon Newton */ goog.require('ola.common.DataItem'); goog.provide('ola.common.UidControl'); goog.provide('ola.common.UidControlFactory'); goog.provide('ola.common.UidItem'); /** * An object which represents a UID in a list. * @param {Object} data the data to use to construct this item. * @constructor */ ola.common.UidItem = function(data) { this._device_id = data['device_id']; this._manufacturer_id = data['manufacturer_id']; this._device = data['device']; this._manufacturer = data['manufacturer']; }; goog.inherits(ola.common.UidItem, ola.common.DataItem); /** * Get the device name * @return {string} the name of the device. */ ola.common.UidItem.prototype.deviceName = function() { return this._device; }; /** * Get the id of this universe. * @return {number} the uid id. */ ola.common.UidItem.prototype.id = function() { return this.asString(); }; /** * Convert a number to the hex representation * @param {number} n the number to convert. * @param {number} padding the length to pad to. * @return {string} the hex representation of the number. * @private */ ola.common.UidItem.prototype.toHex_ = function(n, padding) { if (n < 0) { n = 0xffffffff + n + 1; } var s = n.toString(16); while (s.length < padding) { s = '0' + s; } return s; }; /** * Return the string representation of the uid. * @return {string} the uid. */ ola.common.UidItem.prototype.asString = function() { return (this.toHex_(this._manufacturer_id, 4) + ':' + this.toHex_(this._device_id, 8)); }; /** * Return the uid as a string * @return {number} the uid as a string. */ ola.common.UidItem.prototype.toString = function() { var uid = ''; if (this._manufacturer) { uid += this._manufacturer; } if (this._manufacturer && this._device) { uid += ', '; } if (this._device) { uid += this._device; } if (this._manufacturer || this._device) { uid += ' ['; } uid += this.asString(); if (this._manufacturer || this._device) { uid += ']'; } return uid; }; /** * Compare one uid to another. * @param {ola.common.DataItem} other the other item to compare to. * @return {number} -1 if less than, 1 if greater than, 0 if equal. */ ola.common.UidItem.prototype.compare = function(other) { if (this._manufacturer_id > other._manufacturer_id) { return 1; } else if (this._manufacturer_id < other._manufacturer_id) { return -1; } return this._device_id - other._device_id; }; /** * An UID navigation control element. * @constructor * @param {Object} item the item to add. * @param {function()} callback the function to run when the item is clicked. * @param {goog.ui.ControlRenderer=} opt_renderer Renderer used to render or * decorate the component; defaults to {@link goog.ui.ControlRenderer}. * @param {goog.dom.DomHelper=} opt_domHelper An optional DOM helper. */ ola.common.UidControl = function(item, callback, opt_renderer, opt_domHelper) { ola.common.GenericControl.call(this, item, callback, opt_renderer, opt_domHelper); this.setContent(item.toString()); }; goog.inherits(ola.common.UidControl, ola.common.GenericControl); /** * Setup the event handler for this object. */ ola.common.UidControl.prototype.enterDocument = function() { ola.common.UidControl.superClass_.enterDocument.call(this); this.getElement().title = this.item().toString(); }; /** * Update this item with from new data. * @param {Object} item the item to update this control object with. */ ola.common.UidControl.prototype.update = function(item) { // We don't expect the uid to change here. this.setContent(item.toString()); }; /** * The base class for a factory which produces control items * @param {function()} callback the function to call when an item is clicked. * The * first arg is the item id. * @constructor */ ola.common.UidControlFactory = function(callback) { this.callback = callback; }; /** * Create a new UidControl object from some data * @param {Object} data the data to use for the control. * @return {ola.common.UidControl} The new UidControl object. */ ola.common.UidControlFactory.prototype.newComponent = function(data) { return new ola.common.UidControl(data, this.callback); }; ola-0.10.9/javascript/ola/common/sorted_list.js0000664000175000017500000001236614376533110016414 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * A sorted list implementation that can be updated from a data model * Copyright (C) 2010 Simon Newton */ goog.require('goog.events'); goog.require('goog.ui.Control'); goog.provide('ola.common.DataItem'); goog.provide('ola.common.GenericControl'); goog.provide('ola.common.SortedList'); /** * The base data object that represents an item in a sorted list * @constructor */ ola.common.DataItem = function() {}; /** * Get the id of this node. * @return {number|string} the id of this element. */ ola.common.DataItem.prototype.id = goog.nullFunction; /** * Compare one item to another. * @param {ola.common.DataItem} other the other item to compare to. * @return {number} -1 if less than, 1 if greater than, 0 if equal. */ ola.common.DataItem.prototype.compare = function(other) { if (this.id() > other.id()) { return 1; } else if (this.id() < other.id()) { return -1; } return 0; }; /** * An Generic navigation control element. * @constructor * @param {Object} item the item to add. * @param {function()} callback the function to run when the item is clicked. * @param {goog.ui.ControlRenderer=} opt_renderer Renderer used to render or * decorate the component; defaults to {@link goog.ui.ControlRenderer}. * @param {goog.dom.DomHelper=} opt_domHelper An optional DOM helper. */ ola.common.GenericControl = function(item, callback, opt_renderer, opt_domHelper) { goog.ui.Control.call(this, '', opt_renderer, opt_domHelper); this._item = item; this.callback = callback; }; goog.inherits(ola.common.GenericControl, goog.ui.Control); /** * Return the underlying GenericItem * @return {ola.GenericItem} The item for this control. */ ola.common.GenericControl.prototype.item = function() { return this._item; }; /** * This component can't be used to decorate * @return {boolean} Always false. */ ola.common.GenericControl.prototype.canDecorate = function() { return false; }; /** * Setup the event handler for this object. */ ola.common.GenericControl.prototype.enterDocument = function() { ola.common.GenericControl.superClass_.enterDocument.call(this); goog.events.listen(this.getElement(), goog.events.EventType.CLICK, function() { this.callback(this._item); }, false, this); }; /** * Update this item with from new data * @param {ola.GenericItem} item the new item to update from. */ ola.common.GenericControl.prototype.update = function(item) { this.setContent(item.name()); }; /** * Represents a list on controls that are updated from a data model * @param {string} container_id the id of the container to use as the control * list. * @param {ola.common.SortedListComponentFactory} component_factory a * SortedListComponentFactory class to produce the SortedListComponents. * @constructor */ ola.common.SortedList = function(container_id, component_factory) { this.container = container_id; this.component_factory = component_factory; }; /** * Update this list from a new list of data items. * @param {Array.} item_list the new set of data items. */ ola.common.SortedList.prototype.updateFromData = function(item_list) { var component_index = 0; var item_index = 0; var item_count = item_list.length; item_list.sort(function(a, b) { return a.compare(b); }); while (component_index != this.container.getChildCount() && item_index != item_count) { var item = item_list[item_index]; var current_component = this.container.getChildAt(component_index); var component_item = current_component.item(); var comparison = item.compare(component_item); if (comparison == -1) { var component = this.component_factory.newComponent(item); this.container.addChildAt(component, component_index, true); item_index++; component_index++; } else if (comparison == 0) { current_component.update(item_list[item_index]); component_index++; item_index++; } else { var n = this.container.removeChild(current_component, true); delete f; } } // remove any remaining nodes while (component_index < this.container.getChildCount()) { var n = this.container.removeChildAt(component_index, true); delete n; } // add any remaining items for (; item_index < item_count; item_index++) { var component = this.component_factory.newComponent(item_list[item_index]); this.container.addChild(component, true); } }; ola-0.10.9/javascript/ola/common/plugin_list.js0000664000175000017500000000657114376533110016413 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Object that represent a plugin item. * Copyright (C) 2010 Simon Newton */ goog.require('ola.common.DataItem'); goog.provide('ola.common.PluginControl'); goog.provide('ola.common.PluginControlFactory'); goog.provide('ola.common.PluginItem'); /** * An object which represents a plugin in the list * @param {Object} data the data to use to construct this item. * @constructor */ ola.common.PluginItem = function(data) { this._id = data['id']; this._name = data['name']; }; goog.inherits(ola.common.PluginItem, ola.common.DataItem); /** * Get the id of this universe. * @return {number} the universe id. */ ola.common.PluginItem.prototype.id = function() { return this._id; }; /** * Return the universe name * @return {string} the name. */ ola.common.PluginItem.prototype.name = function() { return this._name; }; /** * Compare one item to another. * @param {ola.common.DataItem} other the other item to compare to. * @return {number} -1 if less than, 1 if greater than, 0 if equal. */ ola.common.PluginItem.prototype.compare = function(other) { if (this.name() > other.name()) { return 1; } else if (this.name() < other.name()) { return -1; } return 0; }; /** * An Plugin navigation control element. * @constructor * @param {Object} item the item to add. * @param {function()} callback the function to run when the item is clicked. * @param {goog.ui.ControlRenderer=} opt_renderer Renderer used to render or * decorate the component; defaults to {@link goog.ui.ControlRenderer}. * @param {goog.dom.DomHelper=} opt_domHelper An optional DOM helper. */ ola.PluginControl = function(item, callback, opt_renderer, opt_domHelper) { ola.common.GenericControl.call(this, item, callback, opt_renderer, opt_domHelper); this.setContent(item.name()); }; goog.inherits(ola.PluginControl, ola.common.GenericControl); /** * Setup the event handler for this object. */ ola.PluginControl.prototype.enterDocument = function() { ola.PluginControl.superClass_.enterDocument.call(this); this.getElement().title = this._item.name() + ' Plugin'; }; /** * A factory which produces PluginControls * @param {function()} callback the function called when the control is clicked. * @constructor */ ola.common.PluginControlFactory = function(callback) { this.callback = callback; }; /** * @param {Object} data The new data for the row. * @return {ola.PluginControl} an instance of a PluginRow. */ ola.common.PluginControlFactory.prototype.newComponent = function(data) { return new ola.PluginControl(data, this.callback); }; ola-0.10.9/javascript/ola/common/dmx_monitor.js0000664000175000017500000001035414376533110016413 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The DMX monitor. * This calls a method when new DMX data arrives. * Copyright (C) 2012 Simon Newton */ goog.require('goog.Timer'); goog.require('goog.events'); goog.require('ola.common.DmxConstants'); goog.require('ola.common.Server'); goog.provide('ola.common.DmxMonitor'); /** * The DMX monitor tab. * @constructor */ ola.common.DmxMonitor = function(container) { this.container = container; this.value_cells = new Array(); this.setup = false; this.enabled = false; this.universe_id = undefined; }; /** The time between data fetches @type {number} */ ola.common.DmxMonitor.PAUSE_TIME_IN_MS = 1000; /** * Enable / Disable the monitor. * @param {boolean} enabled true to enable, false to disable. * @param {number} universe_id the universe to use. */ ola.common.DmxMonitor.prototype.setState = function(enabled, universe_id) { this.enabled = enabled; this.universe_id = universe_id; if (this.enabled) { if (!this.setup) { this.setupCells(); } this.fetchValues(); } }; /** * Setup the boxes if required. */ ola.common.DmxMonitor.prototype.setupCells = function() { for (var i = 0; i < ola.common.DmxConstants.MAX_CHANNEL_NUMBER; ++i) { var cell = goog.dom.createElement('div'); cell.title = 'Channel ' + (i + 1); var channel = goog.dom.createElement('div'); channel.innerHTML = i + 1; var span = goog.dom.createElement('span'); span.innerHTML = ' '; goog.dom.appendChild(cell, channel); goog.dom.appendChild(cell, span); goog.dom.appendChild(this.container, cell); this.value_cells.push(span); } this.setup = true; }; /** * Fetches the new DMX values. */ ola.common.DmxMonitor.prototype.fetchValues = function(e) { if (!this.enabled) return; var t = this; ola.common.Server.getInstance().getChannelValues( this.universe_id, function(data) { t.updateData(data['dmx']); }); }; /** * Called when new data arrives. */ ola.common.DmxMonitor.prototype.updateData = function(data) { var data_length = Math.min(ola.common.DmxConstants.MAX_CHANNEL_NUMBER, data.length); for (var i = 0; i < data_length; ++i) { this.setCellValue_(i, data[i]); } for (var i = data_length; i < ola.common.DmxConstants.MAX_CHANNEL_NUMBER; ++i) { this.clearCellValue_(i); } if (this.enabled) { var t = this; goog.Timer.callOnce( function(data) { t.fetchValues(); }, ola.common.DmxMonitor.PAUSE_TIME_IN_MS ); } }; /** * Set the value of a channel cell * @param {number} offset the channel offset. * @param {number} value the value to set the channel to. * @private */ ola.common.DmxMonitor.prototype.setCellValue_ = function(offset, value) { var element = this.value_cells[offset]; if (element == undefined) { return; } element.innerHTML = value; var remaining = ola.common.DmxConstants.MAX_CHANNEL_VALUE - value; element.style.background = 'rgb(' + remaining + ',' + remaining + ',' + remaining + ')'; if (value > ola.common.DmxConstants.BACKGROUND_CHANGE_CHANNEL_LEVEL) { element.style.color = '#ffffff'; } else { element.style.color = '#000000'; } }; /** * Erase a cell value to indicate we didn't get data. * @param {number} offset the channel offset. * @private */ ola.common.DmxMonitor.prototype.clearCellValue_ = function(offset) { var element = this.value_cells[offset]; if (element == undefined) { return; } element.innerHTML = ' '; element.style.background = '#ffffff'; }; ola-0.10.9/javascript/ola/common/server_stats.js0000664000175000017500000000513314376533110016577 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The class the manages the server stats table. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.events'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.provide('ola.common.ServerStats'); /** * A class that updates the server stats. * @param {string} element_id the id of the div to use for the home frame. * @constructor */ ola.common.ServerStats = function(element_id) { var ola_server = ola.common.Server.getInstance(); goog.events.listen(ola_server, ola.common.Server.EventType.SERVER_INFO_EVENT, this.updateServerInfo_, false, this); // update the server info now ola_server.UpdateServerInfo(); }; /** * The title of this tab */ ola.common.ServerStats.prototype.title = function() { return 'Home'; }; /** * Called when the tab loses focus */ ola.common.ServerStats.prototype.blur = function() {}; /** * Update the tab */ ola.common.ServerStats.prototype.update = function() { ola.common.Server.getInstance().UpdateServerInfo(); }; /** * Update the home frame with new server data * @param {Object} e the event object. * @private */ ola.common.ServerStats.prototype.updateServerInfo_ = function(e) { goog.dom.$('server_hostname').innerHTML = e.server_info['hostname']; goog.dom.$('server_ip').innerHTML = e.server_info['ip']; goog.dom.$('server_broadcast').innerHTML = e.server_info['broadcast']; goog.dom.$('server_mac').innerHTML = e.server_info['hw_address']; goog.dom.$('server_instance_name').innerHTML = e.server_info['instance_name']; goog.dom.$('server_version').innerHTML = e.server_info['version']; goog.dom.$('server_uptime').innerHTML = e.server_info['up_since']; if (!e.server_info['quit_enabled']) { var stop_button = goog.dom.$('stop_button'); if (stop_button) { stop_button.style.display = 'none'; } } }; ola-0.10.9/javascript/ola/common/rdm_section_list.js0000664000175000017500000001011414376533110017407 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * An item in the RDM section list * Copyright (C) 2010 Simon Newton */ goog.require('ola.common.DataItem'); goog.provide('ola.common.RdmSectionControl'); goog.provide('ola.common.RdmSectionControlFactory'); goog.provide('ola.common.RdmSectionItem'); /** * An object which represents a section in a list. * @param {Object} data the data to use to construct this item. * @constructor */ ola.common.RdmSectionItem = function(data) { this._id = data['id']; this._name = data['name']; this._hint = data['hint']; }; goog.inherits(ola.common.RdmSectionItem, ola.common.DataItem); /** * Get the id of this section. * @return {number} the uid id. */ ola.common.RdmSectionItem.prototype.id = function() { return this._id; }; /** * Get the hint for this section * @return {string} the section hint. */ ola.common.RdmSectionItem.prototype.hint = function() { return this._hint; }; /** * Return the uid as a string * @return {number} the uid as a string. */ ola.common.RdmSectionItem.prototype.toString = function() { return this._name; }; /** * Compare one uid to another. * @param {ola.common.DataItem} other the other item to compare to. * @return {number} -1 if less than, 1 if greater than, 0 if equal. */ ola.common.RdmSectionItem.prototype.compare = function(other) { if (this._name < other._name) { return -1; } else if (this._name > other._name) { return 1; } else { return 0; } }; /** * An section navigation control element. * @constructor * @param {Object} item the item to add. * @param {function()} callback the function to run when the item is clicked. * @param {goog.ui.ControlRenderer=} opt_renderer Renderer used to render or * decorate the component; defaults to {@link goog.ui.ControlRenderer}. * @param {goog.dom.DomHelper=} opt_domHelper An optional DOM helper. */ ola.common.RdmSectionControl = function(item, callback, opt_renderer, opt_domHelper) { ola.common.GenericControl.call(this, item, callback, opt_renderer, opt_domHelper); this.setContent(item.toString()); }; goog.inherits(ola.common.RdmSectionControl, ola.common.GenericControl); /** * Setup the event handler for this object. */ ola.common.RdmSectionControl.prototype.enterDocument = function() { ola.UniverseControl.superClass_.enterDocument.call(this); this.getElement().title = this.item().toString(); }; /** * Update this item with from new data. * @param {Object} item the item to add. */ ola.common.RdmSectionControl.prototype.update = function(item) { this.setContent(item.toString()); }; /** * The base class for a factory which produces control items * @param {function()} callback the function to call when an item is clicked. * The * first arg is the item id. * @constructor */ ola.common.RdmSectionControlFactory = function(callback) { this.callback = callback; }; /** * Create a new RdmSectionControl object from some data * @param {Object} data the data to use for the control. * @return {ola.common.RdmSectionControl} A new RdmSectionControl. */ ola.common.RdmSectionControlFactory.prototype.newComponent = function(data) { return new ola.common.RdmSectionControl(data, this.callback); }; ola-0.10.9/javascript/ola/common/server.js0000664000175000017500000005612114376533110015364 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * A class that handles interactions with the ola server. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.net.HttpStatus'); goog.require('goog.net.XhrIoPool'); goog.provide('ola.common.Server'); goog.provide('ola.common.Server.EventType'); /** * A pending request. * @constructor * @param {string} url the URL to fetch. * @param {function()} callback the function to run when the request completes. * @param {string=} opt_method 'GET' or 'POST'. * @param {string=} opt_content The post form data. */ ola.common.Request = function(url, callback, opt_method, opt_content) { this.url = url; this.callback = callback; this.opt_method = opt_method; this.opt_content = opt_content; }; /** * Create a new Server object, this is used to communicate with the OLA server * and fires events when the state changes. * @constructor */ ola.common.Server = function() { goog.events.EventTarget.call(this); this.pool = new goog.net.XhrIoPool({}, 1); this.universes = {}; this.request_queue = new Array(); }; goog.inherits(ola.common.Server, goog.events.EventTarget); // This is a singleton, call ola.common.Server.getInstance() to access it. goog.addSingletonGetter(ola.common.Server); /** * Events for the Server object. * @type {Object} */ ola.common.Server.EventType = { PLUGIN_EVENT: 'plugin_change', PLUGIN_LIST_EVENT: 'plugin_list_change', SERVER_INFO_EVENT: 'server_info_change', UNIVERSE_EVENT: 'universe_change', UNIVERSE_LIST_EVENT: 'universe_list_change' }; /** * The url for the server stats * @type {string} */ ola.common.Server.SERVER_INFO_URL = 'json/server_stats'; /** * The url for the plugin info * @type {string} */ ola.common.Server.PLUGIN_INFO_URL = 'json/plugin_info'; /** * The url for the universe info. * @type {string} */ ola.common.Server.UNIVERSE_INFO_URL = 'json/universe_info'; /** * The url to fetch the list of universes. * @type {string} */ ola.common.Server.PLUGIN_UNIVERSE_LIST_URL = 'json/universe_plugin_list'; /** * The url to reload the server * @type {string} */ ola.common.Server.RELOAD_PLUGINS_URL = 'reload'; /** * The url to stop the server. * @type {string} */ ola.common.Server.STOP_SERVER_URL = 'quit'; /** * The url for the universe info. * @type {string} */ ola.common.Server.AVAILABLE_PORTS_URL = 'json/get_ports'; /** * The url to fetch the list of UIDs. * @type {string} */ ola.common.Server.UIDS_URL = 'json/rdm/uids'; /** * The url to trigger discovery. * @type {string} */ ola.common.Server.RDM_DISCOVERY_URL = 'rdm/run_discovery'; /** * The url to fetch the RDM sections. * @type {string} */ ola.common.Server.RDM_SECTIONS_URL = 'json/rdm/supported_sections'; /** * The url to fetch the contents of a section. * @type {string} */ ola.common.Server.RDM_GET_SECTION_INFO_URL = 'json/rdm/section_info'; /** * The url to set the RDM settings. * @type {string} */ ola.common.Server.RDM_SET_SECTION_INFO_URL = 'json/rdm/set_section_info'; /** * The url to toggle RDM identify mode. * @type {string} */ ola.common.Server.RDM_UID_IDENTIFY = 'json/rdm/uid_identify'; /** * The url to fetch information about a RDM UID (responder). * @type {string} */ ola.common.Server.RDM_UID_INFO = 'json/rdm/uid_info'; /** * The url to change the personality of a responder * @type {string} */ ola.common.Server.RDM_UID_PERSONALITY = 'json/rdm/uid_personalities'; /** * The url to create a new universe. * @type {string} */ ola.common.Server.NEW_UNIVERSE_URL = 'new_universe'; /** * The url to change the settings of a universe. * @type {string} */ ola.common.Server.MODIFY_UNIVERSE_URL = 'modify_universe'; /** * The url to set the DMX values. * @type {string} */ ola.common.Server.SET_DMX_URL = 'set_dmx'; /** * The url to return the current DMX values * @type {string} */ ola.common.Server.GET_DMX_URL = 'get_dmx'; /** * The request queue size. * This should be more than the max # of RDM sections we ever expect * @type {number} */ ola.common.Server.REQUEST_QUEUE_LIMIT = 30; /** * This event is fired when the server info changes * @constructor * @param {Object} server_info the server info. */ ola.common.ServerInfoChangeEvent = function(server_info) { goog.events.Event.call(this, ola.common.Server.EventType.SERVER_INFO_EVENT); this.server_info = server_info; }; goog.inherits(ola.common.ServerInfoChangeEvent, goog.events.Event); /** * This event is fired when the plugin list changes * @constructor * @param {Array.} new_list the list of Plugin objects. */ ola.PluginListChangeEvent = function(new_list) { goog.events.Event.call(this, ola.common.Server.EventType.PLUGIN_LIST_EVENT); this.plugins = new_list; }; goog.inherits(ola.PluginListChangeEvent, goog.events.Event); /** * This event is fired when the universe list changes * @constructor * @param {Array.} new_list the list of Universe objects. */ ola.UniverseListChangeEvent = function(new_list) { goog.events.Event.call(this, ola.common.Server.EventType.UNIVERSE_LIST_EVENT); this.universes = new_list; }; goog.inherits(ola.PluginListChangeEvent, goog.events.Event); /** * This event is fired when the plugin info is available * @constructor * @param {Object} plugin the new Plugin object. */ ola.PluginChangeEvent = function(plugin) { goog.events.Event.call(this, ola.common.Server.EventType.PLUGIN_EVENT); this.plugin = plugin; }; goog.inherits(ola.PluginChangeEvent, goog.events.Event); /** * This event is fired when the universe info is available * @constructor * @param {Object} universe the Universe object. */ ola.UniverseChangeEvent = function(universe) { goog.events.Event.call(this, ola.common.Server.EventType.UNIVERSE_EVENT); this.universe = universe; }; goog.inherits(ola.UniverseChangeEvent, goog.events.Event); /** * Check if this universe is active * @param {number} universe_id the ID of the universe to check. * @return {boolean} true if the universe exists, false otherwise. */ ola.common.Server.prototype.CheckIfUniverseExists = function(universe_id) { return this.universes[universe_id] != undefined; }; /** * Update the server info data */ ola.common.Server.prototype.UpdateServerInfo = function() { var on_complete = function(e) { var obj = e.target.getResponseJson(); this.dispatchEvent(new ola.common.ServerInfoChangeEvent(obj)); }; this.initiateRequest_(ola.common.Server.SERVER_INFO_URL, on_complete); }; /** * Reload the plugins * @param {function(Object)} callback the function to call when the request * completes. */ ola.common.Server.prototype.reloadPlugins = function(callback) { this.initiateRequest_(ola.common.Server.RELOAD_PLUGINS_URL, callback); }; /** * Stop the server * @param {function(Object)} callback the function to call when the request * completes. */ ola.common.Server.prototype.stopServer = function(callback) { this.initiateRequest_(ola.common.Server.STOP_SERVER_URL, callback); }; /** * Fetch the list of plugins & universes active on the server */ ola.common.Server.prototype.FetchUniversePluginList = function() { var on_complete = function(e) { if (e.target.getStatus() != goog.net.HttpStatus.OK) { ola.logger.info('Request failed: ' + e.target.getLastUri() + ' : ' + e.target.getLastError()); return; } var obj = e.target.getResponseJson(); // update the internal list of universes here this.universes = {}; for (var i = 0; i < obj['universes'].length; ++i) { this.universes[obj['universes'][i]['id']] = true; } this.dispatchEvent(new ola.PluginListChangeEvent(obj['plugins'])); this.dispatchEvent(new ola.UniverseListChangeEvent(obj['universes'])); }; this.initiateRequest_(ola.common.Server.PLUGIN_UNIVERSE_LIST_URL, on_complete); }; /** * Fetch the info for a plugin * @param {number} plugin_id the id of the plugin to fetch. */ ola.common.Server.prototype.FetchPluginInfo = function(plugin_id) { var on_complete = function(e) { var obj = e.target.getResponseJson(); this.dispatchEvent(new ola.PluginChangeEvent(obj)); }; var url = ola.common.Server.PLUGIN_INFO_URL + '?id=' + plugin_id; this.initiateRequest_(url, on_complete); }; /** * Fetch the info for a universe * @param {number} universe_id the id of the universe to fetch. */ ola.common.Server.prototype.FetchUniverseInfo = function(universe_id) { var on_complete = function(e) { var obj = e.target.getResponseJson(); this.dispatchEvent(new ola.UniverseChangeEvent(obj)); }; var url = ola.common.Server.UNIVERSE_INFO_URL + '?id=' + universe_id; this.initiateRequest_(url, on_complete); }; /** * Fetch the available ports. * @param {number=} opt_universe an optional universe id. * @param {function()} callback the callback to invoke when complete. */ ola.common.Server.prototype.fetchAvailablePorts = function(opt_universe, callback) { var url = ola.common.Server.AVAILABLE_PORTS_URL; if (opt_universe != undefined) { url += '?id=' + opt_universe; } this.initiateRequest_(url, callback); }; /** * Create a new universe * @param {number} universe_id the ID of the universe. * @param {string} name the new universe name. * @param {Array.} port_ids a list of ports to patch to this universe. * @param {function(Object)} callback the function to call when the request * completes. */ ola.common.Server.prototype.createUniverse = function(universe_id, name, port_ids, callback) { var post_data = 'id=' + universe_id + ( name ? '&name=' + encodeURI(name) : '') + '&add_ports=' + port_ids.join(','); this.initiateRequest_(ola.common.Server.NEW_UNIVERSE_URL, callback, 'POST', post_data); }; /** * Trigger RDM discovery for this universe. This returns when discovery * completes. * @param {number} universe_id the ID of the universe to run discovery for. * @param {boolean} full true if we should do full discovery, false for * incremental. * @param {function(Object)} callback the function to call when the discovery * request is ack'ed. */ ola.common.Server.prototype.runRDMDiscovery = function(universe_id, full, callback) { var url = ola.common.Server.RDM_DISCOVERY_URL + '?id=' + universe_id; if (!full) { url += '&incremental=true'; } this.initiateRequest_(url, callback); }; /** * Get the list of supported sections for a UID. * @param {number} universe_id the ID of the universe. * @param {string} uid the string representation of a UID. * @param {function(Object)} callback the function to call when the discovery * request is ack'ed. */ ola.common.Server.prototype.rdmGetSupportedSections = function(universe_id, uid, callback) { var url = (ola.common.Server.RDM_SECTIONS_URL + '?id=' + universe_id + '&uid=' + uid); this.initiateRequest_(url, callback); }; /** * Get the details for a particular rdm section * @param {number} universe_id the ID of the universe. * @param {string} uid the string representation of a UID. * @param {string} section_name the section to get. * @param {string} hint an arbitrary string passed back to the server. * @param {function(Object)} callback the function to call when the discovery * request is ack'ed. */ ola.common.Server.prototype.rdmGetSectionInfo = function(universe_id, uid, section_name, hint, callback) { var url = (ola.common.Server.RDM_GET_SECTION_INFO_URL + '?id=' + universe_id + '&uid=' + uid + '§ion=' + section_name + '&hint=' + hint); this.initiateRequest_(url, callback); }; /** * Get the details for a particular rdm section * @param {number} universe_id the ID of the universe. * @param {string} uid the string representation of a UID. * @param {string} section_name the section to get. * @param {string} hint a cookie to pass back to the server. * @param {data} data passed back to the server. * @param {function(Object)} callback the function to call when the discovery * request is ack'ed. */ ola.common.Server.prototype.rdmSetSectionInfo = function(universe_id, uid, section_name, hint, data, callback) { var url = (ola.common.Server.RDM_SET_SECTION_INFO_URL + '?id=' + universe_id + '&uid=' + uid + '§ion=' + section_name + '&hint=' + hint + '&' + data); this.initiateRequest_(url, callback); }; /** * Fetch the uids for a universe * @param {number} universe_id the ID of the universe. * @param {function(Object)} callback the function to call when the request * completes. */ ola.common.Server.prototype.fetchUids = function(universe_id, callback) { var url = ola.common.Server.UIDS_URL + '?id=' + universe_id; this.initiateRequest_(url, callback); }; /** * Fetch the dmx start address, footprint & personality for a uid. * @param {number} universe_id the ID of the universe. * @param {string} uid the string representation of a UID. * @param {function(Object)} callback the function to call when the request * completes. */ ola.common.Server.prototype.rdmGetUIDInfo = function(universe_id, uid, callback) { var url = (ola.common.Server.RDM_UID_INFO + '?id=' + universe_id + '&uid=' + uid); this.initiateRequest_(url, callback); }; /** * Check if a device is in identify mode. * @param {number} universe_id the ID of the universe. * @param {string} uid the string representation of a UID. * @param {function(Object)} callback the function to call when the request * completes. */ ola.common.Server.prototype.rdmGetUIDIdentifyMode = function(universe_id, uid, callback) { var url = (ola.common.Server.RDM_UID_IDENTIFY + '?id=' + universe_id + '&uid=' + uid); this.initiateRequest_(url, callback); }; /** * Fetch the personalities for a device * @param {number} universe_id the ID of the universe. * @param {string} uid the string representation of a UID. * @param {function(Object)} callback the function to call when the request * completes. */ ola.common.Server.prototype.rdmGetUIDPersonalities = function(universe_id, uid, callback) { var url = (ola.common.Server.RDM_UID_PERSONALITY + '?id=' + universe_id + '&uid=' + uid); this.initiateRequest_(url, callback); }; /** * Update the settings for a universe. * @param {number} universe_id the id of the universe to modify. * @param {string} universe_name the new name. * @param {string} merge_mode HTP or LTP. * @param {Array.<{{id: string, mode: string, priority: number}}>} * port_priorities an array of new port priorities. * @param {Array.} ports_to_remove list of port ids to remove. * @param {Array.} ports_to_add list of port ids to add. * @param {function()} callback the callback to invoke when complete. */ ola.common.Server.prototype.modifyUniverse = function(universe_id, universe_name, merge_mode, port_priorities, ports_to_remove, ports_to_add, callback) { var post_data = ('id=' + universe_id + '&name=' + universe_name + '&merge_mode=' + merge_mode + '&add_ports=' + ports_to_add.join(',') + '&remove_ports=' + ports_to_remove.join(',')); modified_port_ids = new Array(); for (var i = 0; i < port_priorities.length; ++i) { var priority_setting = port_priorities[i]; post_data += ('&' + priority_setting.id + '_priority_value=' + priority_setting.priority); if (priority_setting.mode != undefined) { post_data += ('&' + priority_setting.id + '_priority_mode=' + priority_setting.mode); } modified_port_ids.push(priority_setting.id); } post_data += ('&modify_ports=' + modified_port_ids.join(',')); var url = ola.common.Server.MODIFY_UNIVERSE_URL; this.initiateRequest_(url, callback, 'POST', post_data); }; /** * Get the dmx values for a universe * @param {number} universe_id the id of the universe to get values for. * @param {function(e)} callback the callback to invoke when complete. */ ola.common.Server.prototype.getChannelValues = function(universe_id, callback) { var url = ola.common.Server.GET_DMX_URL + '?u=' + universe_id; this.initiateRequest_( url, function(e) { callback(e.target.getResponseJson()); }); }; /** * Update the dmx values for a universe * @param {number} universe_id the id of the universe to modify. * @param {Array.} data the channel values. * @param {function(e)} callback the callback to invoke when complete. */ ola.common.Server.prototype.setChannelValues = function(universe_id, data, callback) { var post_data = 'u=' + universe_id + '&d=' + data.join(','); var url = ola.common.Server.SET_DMX_URL; this.initiateRequest_( url, function(e) { callback(e.target); }, 'POST', post_data); }; /** * Check if a request completed properly and if not, show a dialog. * This checks just the HTTP code. * @param {Object} e the event object. * @return {boolean} true if ok, false otherwise. */ ola.common.Server.prototype.checkStatusDialog = function(e) { if (e.target.getStatus() != goog.net.HttpStatus.OK) { this.showErrorDialog_(e.target.getLastUri() + ' : ' + e.target.getLastError()); return false; } return true; }; /** * Check if a request completed properly and if not, show a dialog. * This checks both the HTTP code, and the existence of the 'error' property in * the response. * @param {Object} e the event object. * @return {object} The JSON output, or undefined if an error occurred. */ ola.common.Server.prototype.checkForErrorDialog = function(e) { if (e.target.getStatus() == goog.net.HttpStatus.OK) { var response = e.target.getResponseJson(); if (response['error']) { this.showErrorDialog_(response['error']); return undefined; } return response; } else { this.showErrorDialog_(e.target.getLastUri() + ' : ' + e.target.getLastError()); return undefined; } }; /** * Check if a request completed properly and if not log the error * This checks both the HTTP code, and the existence of the 'error' property in * the response. * @param {Object} e the event object. * @return {object} The JSON output, or undefined if an error occurred. */ ola.common.Server.prototype.checkForErrorLog = function(e) { if (e.target.getStatus() == goog.net.HttpStatus.OK) { var response = e.target.getResponseJson(); if (response['error']) { ola.logger.info(response['error']); return undefined; } return response; } else { ola.logger.info(e.target.getLastUri() + ' : ' + e.target.getLastError()); return undefined; } }; /** * Show the error dialog * @param {string} message the error message. * @private */ ola.common.Server.prototype.showErrorDialog_ = function(message) { var dialog = ola.Dialog.getInstance(); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setTitle('Request Failed'); dialog.setContent(message); dialog.setVisible(true); }; /** * Initiate a JSON request * @param {string} url the url to fetch. * @param {function()} callback the callback to invoke when the request * completes. * @param {string=} opt_method 'GET' or 'POST'. * @param {string=} opt_content The post form data. * @private */ ola.common.Server.prototype.initiateRequest_ = function(url, callback, opt_method, opt_content) { if (this.request_queue.length >= ola.common.Server.REQUEST_QUEUE_LIMIT) { var dialog = ola.Dialog.getInstance(); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setTitle('Failed to Communicate with Server'); dialog.setContent( 'The request pool was empty, the server is probably down.'); dialog.setVisible(true); return; } var request = new ola.common.Request(url, callback, opt_method, opt_content); this.request_queue.push(request); var t = this; this.pool.getObject( function(xhr) { if (!t.request_queue.length) return; var r = t.request_queue.shift(); if (r.callback) goog.events.listen(xhr, goog.net.EventType.COMPLETE, r.callback, false, t); goog.events.listen(xhr, goog.net.EventType.READY, t.cleanupRequest_, false, t); xhr.send(r.url, r.opt_method, r.opt_content); }, 1); }; /** * Clean up from a request, this removes the listener and returns the channel * to the pool. * @param {Object} e the event object. * @private */ ola.common.Server.prototype.cleanupRequest_ = function(e) { var xhr = e.target; goog.events.removeAll(xhr); this.pool.releaseObject(xhr); }; ola-0.10.9/javascript/ola/common/dmx_constants.js0000664000175000017500000000255614376533110016745 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMX constants. * Copyright (C) 2013 Peter Newman */ goog.provide('ola.common.DmxConstants'); /** The first channel number @type {number} */ ola.common.DmxConstants.MIN_CHANNEL_NUMBER = 1; /** The number of channels and max channel number @type {number} */ ola.common.DmxConstants.MAX_CHANNEL_NUMBER = 512; /** The minimum value of a channel @type {number} */ ola.common.DmxConstants.MIN_CHANNEL_VALUE = 0; /** The maximum value of a channel @type {number} */ ola.common.DmxConstants.MAX_CHANNEL_VALUE = 255; /** The channel level at which to change the background colour @type {number} */ ola.common.DmxConstants.BACKGROUND_CHANGE_CHANNEL_LEVEL = 90; ola-0.10.9/javascript/ola/common/keypad_parser.js0000664000175000017500000001342014376533110016702 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The keypad parser. * Copyright (C) 2011 Chris Stranex * * The parser takes commands (see below) and executes them. * * Syntax: * command ::= channel-part "@" value * * channel-part ::= channel | channel_range * * channel ::= *digit * Channels range between 1 and 512. * * channel_range ::= "ALL" | "*" | channel "THRU" channel | channel > channel * * value ::= *digit | "FULL" | "+" * Values range between 0 and 255. */ goog.require('ola.common.DmxConstants'); goog.provide('ola.common.KeypadCommand'); goog.provide('ola.common.KeypadParser'); /** * Create a new KeypadCommand * @param {number} start the starting slot. * @param {number} end the end slot, or undefined if this is a single slot * command. * @param {number} value the slot value. * @constructor */ ola.common.KeypadCommand = function(start, end, value) { this.start = start; this.end = end == undefined ? start : end; this.value = value; }; /** * Check if this command is valid * @return {bool} true if the command if valid, false otherwise. */ ola.common.KeypadCommand.prototype.isValid = function() { return ( (this.start >= ola.common.DmxConstants.MIN_CHANNEL_NUMBER && this.start <= ola.common.DmxConstants.MAX_CHANNEL_NUMBER) && (this.value >= ola.common.DmxConstants.MIN_CHANNEL_VALUE && this.value <= ola.common.DmxConstants.MAX_CHANNEL_VALUE) && (this.end == undefined || (this.end >= ola.common.DmxConstants.MIN_CHANNEL_NUMBER && this.end <= ola.common.DmxConstants.MAX_CHANNEL_NUMBER && this.end >= this.start)) ); }; /** * The KeypadParser class * @constructor */ ola.common.KeypadParser = function() { this.full_command_regex = new RegExp( /(?:([0-9]{1,3})(?:\s+THRU\s+([0-9]{0,3}))?)\s+@\s+([0-9]{0,3})$/); // similar to above, but allows for partially completed commands this.partial_command_regex = new RegExp( /(?:([0-9]{1,3})(?:\s+THRU\s+([0-9]{0,3}))?)(?:\s+@\s+([0-9]{0,3}))?$/); }; /** * Parse a full command * @param {string} str the input string. * @return {bool} true if the command is valid, false otherwise. */ ola.common.KeypadParser.prototype.parsePartialCommand = function(str) { if (str.length == 0) { return false; } var result = this.partial_command_regex.exec(this.aliases_(str)); if (result == null) { return false; } var start_token = result[1]; if (start_token != undefined) { var start = this.intOrUndefined_(result[1]); if (start == undefined || start == 0 || start > ola.common.DmxConstants.MAX_CHANNEL_NUMBER) { return false; } } var end_token = result[2]; if (end_token != undefined && end_token != '') { var end = this.intOrUndefined_(result[2]); if (end == undefined || end == 0 || end > ola.common.DmxConstants.MAX_CHANNEL_NUMBER) { return false; } } var value_token = result[3]; if (value_token != undefined && value_token != '') { var value = this.intOrUndefined_(result[3]); if (value == undefined || value > ola.common.DmxConstants.MAX_CHANNEL_VALUE) { return false; } } return true; }; /** * Parse a full command * @param {string} str the input string. * @return {KeypadCommand|undefined} Returns a KeypadCommand or undefined on * error. If returned, the KeypadCommand is guaranteed to be valid. */ ola.common.KeypadParser.prototype.parseFullCommand = function(str) { // It's empty so we can return true really if (str.length == 0) { return undefined; } var result = this.full_command_regex.exec(this.aliases_(str)); if (result == null) { return undefined; } var start = this.intOrUndefined_(result[1]); var end = this.intOrUndefined_(result[2]); var value = this.intOrUndefined_(result[3]); if (start == undefined || value == undefined) { return undefined; } if (result[2] != undefined) { // was a range if (end == undefined) return false; } var command = new ola.common.KeypadCommand(start, end, value); return command.isValid() ? command : undefined; }; /** * Convert a string to an int, or return undefined * @param {string} token the string to convert. * @return {number|undefined} The integer, or undefined. * @private */ ola.common.KeypadParser.prototype.intOrUndefined_ = function(token) { if (token == null || token == undefined) return undefined; var i = parseInt(token); return isNaN(i) ? undefined : i; }; /** * Converts aliases. * @param {string} str the input string. * @return {string} the output string. * @private */ ola.common.KeypadParser.prototype.aliases_ = function(str) { str = str.replace('>', 'THRU'); str = str.replace('*', ola.common.DmxConstants.MIN_CHANNEL_NUMBER + ' THRU ' + ola.common.DmxConstants.MAX_CHANNEL_NUMBER); str = str.replace('ALL', ola.common.DmxConstants.MIN_CHANNEL_NUMBER + ' THRU ' + ola.common.DmxConstants.MAX_CHANNEL_NUMBER); str = str.replace('@ +', '@ ' + ola.common.DmxConstants.MAX_CHANNEL_VALUE); str = str.replace('@ FULL', '@ ' + ola.common.DmxConstants.MAX_CHANNEL_VALUE); return str; }; ola-0.10.9/javascript/ola/common/keypad_controller.js0000664000175000017500000001604114376533110017573 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The keypad controller. * Copyright (C) 2011 Chris Stranex */ goog.require('goog.events'); goog.require('goog.events.KeyCodes'); goog.require('goog.events.KeyHandler'); goog.require('goog.ui.Button'); goog.require('goog.ui.Container'); goog.require('ola.common.KeypadParser'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.provide('ola.common.KeypadController'); /** * The Keypad Controller class. * @param {string} name Universe Name. * @param {number} universe_id Universe Id. * @constructor */ ola.common.KeypadController = function(name, universe_id) { this.universe_id = universe_id; this.parser = new ola.common.KeypadParser(); this.table = goog.dom.createElement('table'); this.caption_(name); this.display_(); this.keypad_(); }; /** * Button * @param {string} value the caption for the button. * @return {Element} the new Button element. * @private */ ola.common.KeypadController.prototype.button_ = function(value) { var button = new goog.ui.Button(goog.ui.FlatButtonRenderer); button.setContent(value); goog.events.listen(button, goog.ui.Component.EventType.ACTION, function() { this.buttonAction_(value); }, false, this); return button; }; /** * Input event. Triggered when text is entered into text box. * @param {string} key the key that was pressed. * @private */ ola.common.KeypadController.prototype.textEntry_ = function(key) { var text = this.command_input.value; var autocomplete = null; switch (key) { case goog.events.KeyCodes.SPACE: break; case goog.events.KeyCodes.ENTER: this.buttonAction_('ENTER'); return; default: return; } var key = text.substr(text.length - 1, 1); switch (key) { case 'F': autocomplete = 'ULL'; break; // If it's the T or > keys, autocomplete 'THRU' case 'T': autocomplete = 'HRU'; break; case 'A': autocomplete = 'LL @'; break; default: autocomplete = null; } if (autocomplete != null) { this.command_input.value = text + autocomplete; } }; /** * Button event. Triggered when a button is pushed. * @param {string} name the button that was pressed. * @private */ ola.common.KeypadController.prototype.buttonAction_ = function(name) { if (name == '<') { // Go Backward. Must scan for whitespace var end = this.command_input.value.length - 1; if (isNaN(parseInt(this.command_input.value.substr(end, 1)))) { var c = this.command_input.value.substr(end - 1, 1); var length = 0; switch (c) { case 'L': // FULL length = 3; break; case '@': length = 2; break; case 'U': // THRU length = 5; break; default: length = 0; } end -= length; } this.command_input.value = this.command_input.value.substr(0, end); this.buttonAction_(''); } else if (name == 'ENTER') { // Execute var command = this.parser.parseFullCommand(this.command_input.value); if (command != undefined) { this.execute(command); this.command_input.value = ''; } } else { var command = this.command_input.value + name; if (this.parser.parsePartialCommand(command) == true) { // Add it to the command textbox this.command_input.value = command; } } }; /** * Caption of the Table * @param {string} title the title for the table. * @private */ ola.common.KeypadController.prototype.caption_ = function(title) { var caption = goog.dom.createElement('caption'); caption.innerHTML = title; this.table.appendChild(caption); }; /** * First tr row * @private */ ola.common.KeypadController.prototype.display_ = function() { var tr = goog.dom.createElement('tr'); var td = goog.dom.createElement('td'); td.colSpan = '4'; this.command_input = goog.dom.createElement('input'); this.command_input.type = 'text'; td.appendChild(this.command_input); var key_handler = new goog.events.KeyHandler(this.command_input); goog.events.listen(key_handler, 'key', function(e) { this.textEntry_(e.keyCode); }, true, this); var button = this.button_('<'); button.addClassName('backspace-button'); button.render(td); tr.appendChild(td); this.table.appendChild(tr); }; /** * The main keypad button matrix * @private */ ola.common.KeypadController.prototype.keypad_ = function() { var values = ['7', '8', '9', ' THRU ', '4', '5', '6', ' @ ', '1', '2', '3', 'FULL', '0', 'ENTER']; for (i = 0; i < 3; ++i) { var tr = goog.dom.createElement('tr'); for (x = 0; x < 4; ++x) { var td = goog.dom.createElement('td'); var button = this.button_(values[(i * 4) + x]); button.render(td); tr.appendChild(td); } this.table.appendChild(tr); } var tr = goog.dom.createElement('tr'); var zerotd = goog.dom.createElement('td'); var button = this.button_(values[12]); button.render(zerotd); this.table.appendChild(zerotd); var entertd = goog.dom.createElement('td'); button = this.button_(values[13]); button.render(entertd); entertd.colSpan = '3'; this.table.appendChild(entertd); }; /** * Execute a KeypadCommand. * This asks ola for current dmx values before * running execute_() where the real work happens. * @param {KeypadCommand} command the command to execute. */ ola.common.KeypadController.prototype.execute = function(command) { var tab = this; ola.common.Server.getInstance().getChannelValues( this.universe_id, function(e) { tab.execute_(e, command); }); }; /** * Executes the KeypadCommand. This method * is called once DMX values are retrieved by the server. * @param {Object} e the event object. * @param {KeypadCommand} command the command to execute. * @private */ ola.common.KeypadController.prototype.execute_ = function(e, command) { var dmx_values = e['dmx']; if (command.start == command.end) { dmx_values[command.start - 1] = command.value; } else { for (i = command.start; i <= command.end; ++i) { dmx_values[i - 1] = command.value; } } // Send the values to OLA ola.common.Server.getInstance().setChannelValues( this.universe_id, dmx_values, function() {}); }; ola-0.10.9/javascript/ola/common/section_render.js0000664000175000017500000000567114376533110017065 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Render an item * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.ui.Checkbox'); goog.require('goog.ui.Control'); goog.require('goog.ui.Option'); goog.require('goog.ui.Select'); goog.provide('ola.common.SectionRenderer'); /** * Generate the html for an item * @param {Element} table the table object to add the row to. * @param {Object} item_info the data for the item. */ ola.common.SectionRenderer.RenderItem = function(table, item_info) { var type = item_info['type']; var value = item_info['value']; var id = item_info['id']; if (type == 'hidden') { // we don't need a new row here var input = goog.dom.createElement('input'); input.id = id; input.type = 'hidden'; input.value = value; goog.dom.appendChild(table, input); return; } // everything else needs a row var row = goog.dom.createElement('tr'); goog.dom.appendChild(table, row); var name_td = goog.dom.createElement('td'); name_td.innerHTML = item_info['description']; goog.dom.appendChild(row, name_td); var td = goog.dom.createElement('td'); goog.dom.appendChild(row, td); if (id) { // id implies this field is editable if (type == 'string' || type == 'uint' || type == 'hidden') { var input = goog.dom.createElement('input'); input.value = value; input.name = id; if (type == 'hidden') { input.type = 'hidden'; } goog.dom.appendChild(td, input); if (item_info['button']) { // this item gets it's own button var button = new goog.ui.CustomButton(item_info['button']); button.render(td); } } else if (type == 'bool') { var check = new goog.ui.Checkbox(); check.setChecked(value == 1); check.render(td); item_info['object'] = check; } else { // select box var select = new goog.ui.Select(); var count = value.length; for (var i = 0; i < count; ++i) { select.addItem(new goog.ui.Option(value[i]['label'])); } if (item_info['selected_offset'] != undefined) { select.setSelectedIndex(item_info['selected_offset']); } select.render(td); item_info['object'] = select; } } else { td.innerHTML = value; } }; ola-0.10.9/javascript/ola/universe_control.js0000664000175000017500000000460014376533110016161 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The universe controls * Copyright (C) 2010 Simon Newton */ goog.require('ola.common.GenericControl'); goog.provide('ola.UniverseControl'); /** * An Universe navigation control element. * @constructor * @param {Object} item the item to add. * @param {function()} callback the function to run when the item is clicked. * @param {goog.ui.ControlRenderer=} opt_renderer Renderer used to render or * decorate the component; defaults to {@link goog.ui.ControlRenderer}. * @param {goog.dom.DomHelper=} opt_domHelper An optional DOM helper. */ ola.UniverseControl = function(item, callback, opt_renderer, opt_domHelper) { ola.common.GenericControl.call(this, item, callback, opt_renderer, opt_domHelper); this.setContent(item.name()); }; goog.inherits(ola.UniverseControl, ola.common.GenericControl); /** * Setup the event handler for this object. */ ola.UniverseControl.prototype.enterDocument = function() { ola.UniverseControl.superClass_.enterDocument.call(this); this.getElement().title = 'Universe ' + this._item.id(); }; /** * A factory which produces UniverseControls * @param {function()} callback the function called when the control is clicked. * @constructor */ ola.UniverseControlFactory = function(callback) { this.callback = callback; }; /** * Create a new UniverseControl * @param {Object} item The item for the control. * @return {ola.UniverseControl} an instance of a UniverseRow. */ ola.UniverseControlFactory.prototype.newComponent = function(item) { return new ola.UniverseControl(item, this.callback); }; ola-0.10.9/javascript/ola/ola.js0000664000175000017500000001771614376533110013350 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The main OLA UI. * Copyright (C) 2010 Simon Newton */ goog.require('goog.Timer'); goog.require('goog.dom'); goog.require('goog.dom.ViewportSizeMonitor'); goog.require('goog.events'); goog.require('goog.math'); goog.require('goog.ui.AnimatedZippy'); goog.require('goog.ui.Component'); goog.require('goog.ui.Container'); goog.require('goog.ui.Control'); goog.require('goog.ui.SplitPane'); goog.require('goog.ui.SplitPane.Orientation'); goog.require('ola.HomeFrame'); goog.require('ola.LoggerWindow'); goog.require('ola.NewUniverseFrame'); goog.require('ola.PluginFrame'); goog.require('ola.UniverseControl'); goog.require('ola.UniverseFrame'); goog.require('ola.UniverseItem'); goog.require('ola.common.GenericControl'); goog.require('ola.common.PluginControlFactory'); goog.require('ola.common.PluginItem'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.require('ola.common.SortedList'); goog.provide('ola.OlaUi'); goog.provide('ola.Setup'); /** * How often to update the universe / plugin list * @type {number} */ ola.LIST_UPDATE_INTERVAL_MS = 5000; /** * The id of the home frame * @type {string} */ ola.HOME_FRAME_ID = 'home_frame'; /** * The id of the universe frame * @type {string} */ ola.UNIVERSE_FRAME_ID = 'universe_frame'; /** * The id of the plugin frame * @type {string} */ ola.PLUGIN_FRAME_ID = 'plugin_frame'; /** * The id of the split pane * @type {string} */ ola.SPLIT_PANE_ID = 'split_pane'; /** * The id of the new universe frame * @type {string} */ ola.NEW_UNIVERSE_FRAME_ID = 'new_universe_frame'; /** * Setup the OLA ola_ui widgets * @constructor */ ola.OlaUI = function() { this.logger_window = new ola.LoggerWindow(); this.ola_server = ola.common.Server.getInstance(); this.home_frame = new ola.HomeFrame(ola.HOME_FRAME_ID); this.universe_frame = new ola.UniverseFrame(ola.UNIVERSE_FRAME_ID, this); var t = this; this.plugin_frame = new ola.PluginFrame( ola.PLUGIN_FRAME_ID, function(item) { t.ShowPlugin_(item); }); this.new_universe_frame = new ola.NewUniverseFrame(ola.NEW_UNIVERSE_FRAME_ID, this); goog.events.listen(goog.dom.$('new_universe_button'), goog.events.EventType.CLICK, this.ShowNewUniverse_, false, this); // setup the main split pane var lhs = new goog.ui.Component(); var rhs = new goog.ui.Component(); this.splitpane1 = new goog.ui.SplitPane(lhs, rhs, goog.ui.SplitPane.Orientation.HORIZONTAL); this.splitpane1.setInitialSize(130); this.splitpane1.setHandleSize(2); this.splitpane1.decorate(goog.dom.$(ola.SPLIT_PANE_ID)); // redraw on resize events this.vsm = new goog.dom.ViewportSizeMonitor(); this.UpdateUI_(); goog.events.listen(this.vsm, goog.events.EventType.RESIZE, this.UpdateUI_, false, this); this.SetupNavigation_(); this.ShowHome(); // show the main frame now goog.dom.$(ola.SPLIT_PANE_ID).style.visibility = 'visible'; }; /** * Setup the navigation section of the UI * @private */ ola.OlaUI.prototype.SetupNavigation_ = function() { var home_control = goog.dom.$('home_control'); goog.ui.decorate(home_control); goog.events.listen(home_control, goog.events.EventType.CLICK, this.ShowHome, false, this); var z1 = new goog.ui.AnimatedZippy('plugin_list_control', 'plugin_container'); var z2 = new goog.ui.AnimatedZippy('universe_list_control', 'universe_container'); // setup the plugin & universe lists var plugin_container = new goog.ui.Container(); plugin_container.decorate(goog.dom.$('plugin_container')); var ui = this; this.plugin_list = new ola.common.SortedList( plugin_container, new ola.common.PluginControlFactory( function(item) { ui.ShowPlugin_(item.id()); })); goog.events.listen(this.ola_server, ola.common.Server.EventType.PLUGIN_LIST_EVENT, this.updatePluginList_, false, this); var universe_container = new goog.ui.Container(); universe_container.decorate(goog.dom.$('universe_container')); this.universe_list = new ola.common.SortedList( universe_container, new ola.UniverseControlFactory( function(item) { ui.ShowUniverse(item.id(), true); })); goog.events.listen(this.ola_server, ola.common.Server.EventType.UNIVERSE_LIST_EVENT, this.updateUniverseList_, false, this); this.timer = new goog.Timer(ola.LIST_UPDATE_INTERVAL_MS); goog.events.listen(this.timer, goog.Timer.TICK, function() { this.FetchUniversePluginList(); }, false, this.ola_server); this.ola_server.FetchUniversePluginList(); this.timer.start(); }; /** * Update universe list. * @param {Object} e the event object. * @private */ ola.OlaUI.prototype.updateUniverseList_ = function(e) { var items = new Array(); ola.logger.info('Got ' + e.universes.length + ' universes'); for (var i = 0; i < e.universes.length; ++i) { items.push(new ola.UniverseItem(e.universes[i])); } this.universe_list.updateFromData(items); }; /** * Update the plugin list * @param {Object} e the event object. * @private */ ola.OlaUI.prototype.updatePluginList_ = function(e) { var items = new Array(); for (var i = 0; i < e.plugins.length; ++i) { var item = new ola.common.PluginItem(e.plugins[i]); items.push(item); } this.plugin_list.updateFromData(items); }; /** * Display the home frame */ ola.OlaUI.prototype.ShowHome = function() { this.HideAllFrames_(); this.home_frame.Show(); }; /** * Display the universe frame * @param {number} universe_id the ID of the universe to load in the frame. * @param {boolean} opt_select_main_tab set to true to display the main tab. */ ola.OlaUI.prototype.ShowUniverse = function(universe_id, opt_select_main_tab) { this.HideAllFrames_(); this.universe_frame.Show(universe_id, opt_select_main_tab); }; /** * Display the new universe frame * @private */ ola.OlaUI.prototype.ShowNewUniverse_ = function() { this.HideAllFrames_(); this.new_universe_frame.Show(); }; /** * Display the plugin frame * @param {number} plugin_id the ID of the plugin to show in the frame. * @private */ ola.OlaUI.prototype.ShowPlugin_ = function(plugin_id) { this.ola_server.FetchPluginInfo(plugin_id); this.HideAllFrames_(); this.plugin_frame.Show(); }; /** * Hide all the frames. * @private */ ola.OlaUI.prototype.HideAllFrames_ = function() { this.home_frame.Hide(); this.universe_frame.Hide(); this.plugin_frame.Hide(); this.new_universe_frame.Hide(); }; /** * Update the UI size. This is called when the window size changes * @param {Object} e the event object. * @private */ ola.OlaUI.prototype.UpdateUI_ = function(e) { var size = this.vsm.getSize(); this.splitpane1.setSize(new goog.math.Size(size.width, size.height - 85)); this.logger_window.SetSize(size); this.universe_frame.setSplitPaneSize(); }; /** * The main setup function. */ ola.Setup = function() { var ola_ui = new ola.OlaUI(); }; goog.exportSymbol('ola.Setup', ola.Setup); ola-0.10.9/javascript/ola/dialog.js0000664000175000017500000000256214376533110014025 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The OLA dialog box * Copyright (C) 2010 Simon Newton */ goog.require('goog.ui.Dialog'); goog.provide('ola.Dialog'); /** * The OLA Dialog class * @constructor */ ola.Dialog = function() { goog.ui.Dialog.call(this, null, true); }; goog.inherits(ola.Dialog, goog.ui.Dialog); // This is a singleton, call ola.Dialog.getInstance() to access it. goog.addSingletonGetter(ola.Dialog); /** * Make this dialog show the spinner */ ola.Dialog.prototype.setAsBusy = function() { this.setTitle('Waiting for server response....'); this.setButtonSet(null); this.setContent('
' + '
'); }; ola-0.10.9/javascript/ola/port_table.js0000664000175000017500000002057514376533110014725 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The table that holds a list of available ports. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.ui.Checkbox'); goog.require('goog.ui.Component'); goog.require('goog.ui.MenuItem'); goog.require('goog.ui.Select'); goog.require('ola.LoggerWindow'); goog.require('ola.common.Server'); goog.provide('ola.Port'); goog.provide('ola.PortTable'); /** * A row in the available ports list. * @param {Object} data the data to build this row from. * @constructor * @param {goog.dom.DomHelper=} opt_domHelper An optional DOM helper. */ ola.Port = function(data, opt_domHelper) { goog.ui.Component.call(this, opt_domHelper); this.data = data; }; goog.inherits(ola.Port, goog.ui.Component); /** * This component can't be used to decorate * @return {bool} false. */ ola.Port.prototype.canDecorate = function() { return false; }; /** * Create the dom for this component */ ola.Port.prototype.createDom = function() { var tr = this.dom_.createDom('tr', {}); tr.style.cursor = 'pointer'; var td = goog.dom.createDom('td', {}, ''); this.checkbox = new goog.ui.Checkbox(); this.checkbox.setChecked(true); this.checkbox.render(td); this.dom_.appendChild(tr, td); this.dom_.appendChild( tr, goog.dom.createDom('td', {}, this.data['device'])); this.dom_.appendChild(tr, goog.dom.createDom('td', {}, this.data['description'])); var priority = this.data['priority']; if (priority['priority_capability'] == undefined) { // this port doesn't support priorities at all this.dom_.appendChild( tr, goog.dom.createDom('td', {}, 'Not supported')); } else { // Now we know it supports priorities, lets create the common UI elements // for them this.priority_input = goog.dom.createElement('input'); this.priority_input.value = priority['value']; this.priority_input.maxLength = 3; this.priority_input.size = 3; if (priority['priority_capability'] == 'full') { // this port supports both modes this.priority_select = new goog.ui.Select(); this.priority_select.addItem(new goog.ui.MenuItem('Inherit')); this.priority_select.addItem(new goog.ui.MenuItem('Static')); this.priority_select.setSelectedIndex( priority['current_mode'] == 'inherit' ? 0 : 1); this.prioritySelectChanged_(); var td = goog.dom.createElement('td'); this.priority_select.render(td); this.dom_.appendChild(td, this.priority_input); this.dom_.appendChild(tr, td); } else if (priority['priority_capability'] == 'static') { // this port only supports Static priorities this.dom_.appendChild(tr, this.priority_input); } } this.setElementInternal(tr); }; /** * Setup the event handlers */ ola.Port.prototype.enterDocument = function() { ola.Port.superClass_.enterDocument.call(this); if (this.priority_select != undefined) { goog.events.listen( this.priority_select, goog.ui.Component.EventType.ACTION, this.prioritySelectChanged_, false, this); // don't toggle the check box if we're changing priorities goog.events.listen( this.priority_select.getElement(), goog.events.EventType.CLICK, function(e) { e.stopPropagation(); }); } if (this.priority_input != undefined) { // don't toggle the check box if we're changing priorities goog.events.listen( this.priority_input, goog.events.EventType.CLICK, function(e) { e.stopPropagation(); }); } goog.events.listen(this.getElement(), goog.events.EventType.CLICK, function() { this.checkbox.toggle(); }, false, this); }; /** * Clean up this object. */ ola.Port.prototype.exitDocument = function() { ola.AvailablePort.superClass_.exitDocument.call(this); this.checkbox.exitDocument(); if (this.priority_input) { goog.events.removeAll(this.priority_input); } if (this.priority_select) { goog.events.removeAll(this.priority_select.getElement()); goog.events.removeAll(this.priority_select); this.priority_select.exitDocument(); } goog.events.removeAll(this.getElement()); }; /** * Dispose of this object. */ ola.Port.prototype.dispose = function() { if (!this.getDisposed()) { ola.Port.superClass_.dispose.call(this); this.checkbox.dispose(); this.checkbox = undefined; if (this.priority_select) { this.priority_select.dispose(); this.priority_select = undefined; } this.priority_input = undefined; } }; /** * Get the port id for this item * @return {string} the id of this port. */ ola.Port.prototype.portId = function() { return this.data['id']; }; /** * Check is this row was selected * @return {boolean} true if selected, false otherwise. */ ola.Port.prototype.isSelected = function() { return this.checkbox.isChecked(); }; /** * Get the priority value for this port * @return {number|undefined} the priority value or undefined if this port * doesn't support priorities. */ ola.Port.prototype.priority = function() { var priority_capability = this.data['priority']['priority_capability']; if (priority_capability != undefined) { return this.priority_input.value; } else { return undefined; } }; /** * Get the priority mode for this port * @return {string|undefined} the priority mode (inherit|static) or undefined * if this port doesn't support priority modes. */ ola.Port.prototype.priorityMode = function() { var priority_capability = this.data['priority']['priority_capability']; if (priority_capability == 'full') { if (this.priority_select.getValue() == 'Inherit') { return 'inherit'; } else { return 'static'; } } else if (priority_capability == 'static') { return 'static'; } else { return undefined; } }; /** * Called when the port priority changes * @param {Object} e the event object. * @private */ ola.Port.prototype.prioritySelectChanged_ = function(e) { var item = this.priority_select.getSelectedItem(); if (item.getCaption() == 'Static') { // static mode this.priority_input.style.visibility = 'visible'; } else { // inherit mode this.priority_input.style.visibility = 'hidden'; } }; /** * An available port table component. * @constructor * @param {goog.dom.DomHelper=} opt_domHelper An optional DOM helper. */ ola.PortTable = function(opt_domHelper) { goog.ui.Component.call(this, opt_domHelper); }; goog.inherits(ola.PortTable, goog.ui.Component); /** * Create the dom for the PortTable. */ ola.PortTable.prototype.createDom = function() { this.decorateInternal(this.dom_.createElement('tbody')); }; /** * Decorate an existing element * @param {Element} element the dom element to decorate. */ ola.PortTable.prototype.decorateInternal = function(element) { ola.PortTable.superClass_.decorateInternal.call(this, element); }; /** * Check if we can decorate an element. * @param {Element} element the dom element to check. * @return {boolean} true if this element can be decorated, false otherwise. */ ola.PortTable.prototype.canDecorate = function(element) { return element.tagName == 'TBODY'; }; /** * Clear all rows from this table */ ola.PortTable.prototype.removeAllRows = function() { while (this.getChildCount()) { var row = this.removeChildAt(0, true); row.dispose(); } }; /** * Update the list of available ports * @param {Array.} ports the new list of ports. */ ola.PortTable.prototype.update = function(ports) { this.removeAllRows(); var port_length = ports.length; for (var i = 0; i < port_length; ++i) { var component = new ola.Port(ports[i]); this.addChild(component, true); } }; ola-0.10.9/javascript/ola/new_universe_frame.js0000664000175000017500000001167014376533110016451 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * The new universe frame. * Copyright (C) 2010 Simon Newton */ goog.require('goog.dom'); goog.require('goog.events'); goog.require('goog.net.HttpStatus'); goog.require('ola.AvailablePort'); goog.require('ola.AvailablePortTable'); goog.require('ola.BaseFrame'); goog.require('ola.LoggerWindow'); goog.require('ola.common.Server'); goog.require('ola.common.Server.EventType'); goog.provide('ola.NewUniverseFrame'); /** * The class representing the Universe frame * @param {string} element_id the id of the element to use for this frame. * @constructor * @param {Object} ola_ui The OlaUI object. */ ola.NewUniverseFrame = function(element_id, ola_ui) { ola.BaseFrame.call(this, element_id); this.ola_ui = ola_ui; var cancel_button = goog.dom.$('cancel_new_universe_button'); goog.ui.decorate(cancel_button); goog.events.listen(cancel_button, goog.events.EventType.CLICK, ola_ui.ShowHome, false, ola_ui); var confirm_button = goog.dom.$('confirm_new_universe_button'); goog.ui.decorate(confirm_button); goog.events.listen(confirm_button, goog.events.EventType.CLICK, this.addUniverseButtonClicked, false, this); this.available_ports = new ola.AvailablePortTable(); this.available_ports.decorate(goog.dom.$('available_ports')); }; goog.inherits(ola.NewUniverseFrame, ola.BaseFrame); /** * Show this frame. We extend the base method so we can populate the ports. */ ola.NewUniverseFrame.prototype.Show = function() { // clear out the fields goog.dom.$('new_universe_id').value = ''; goog.dom.$('new_universe_name').value = ''; this.available_ports.update(); ola.UniverseFrame.superClass_.Show.call(this); }; /** * Called when the add universe button is clicked * @param {Object} e The event object. */ ola.NewUniverseFrame.prototype.addUniverseButtonClicked = function(e) { var dialog = ola.Dialog.getInstance(); var universe_id_input = goog.dom.$('new_universe_id'); var universe_id = parseInt(universe_id_input.value); if (isNaN(universe_id) || universe_id < 0 || universe_id > 4294967295) { dialog.setTitle('Invalid Universe Number'); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setContent('The universe number must be between 0 and 4294967295'); dialog.setVisible(true); return; } var ola_server = ola.common.Server.getInstance(); // check if we already know about this universe if (ola_server.CheckIfUniverseExists(universe_id)) { dialog.setTitle('Universe already exists'); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setContent('Universe ' + universe_id + ' already exists'); dialog.setVisible(true); return; } // universe names are optional var universe_name = goog.dom.$('new_universe_name').value; var selected_ports = this.available_ports.getSelectedRows(); if (selected_ports.length == 0) { dialog.setTitle('No ports selected'); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setContent('At least one port must be bound to the universe'); dialog.setVisible(true); return; } var frame = this; ola_server.createUniverse( universe_id, universe_name, selected_ports, function(e) { frame.newUniverseComplete(e); }); dialog.setAsBusy(); dialog.setVisible(true); }; /** * Called when the new universe action completes. * @param {Object} e The event object. */ ola.NewUniverseFrame.prototype.newUniverseComplete = function(e) { var dialog = ola.Dialog.getInstance(); if (e.target.getStatus() != goog.net.HttpStatus.OK) { dialog.setTitle('New Universe Failed'); dialog.setContent(e.target.getLastUri() + ' : ' + e.target.getLastError()); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setVisible(true); return; } var obj = e.target.getResponseJson(); if (obj['ok']) { dialog.setVisible(false); this.ola_ui.ShowUniverse(obj['universe'], true); // update the universe list now ola.common.Server.getInstance().FetchUniversePluginList(); } else { dialog.setTitle('New Universe Failed'); dialog.setButtonSet(goog.ui.Dialog.ButtonSet.OK); dialog.setContent(obj['message']); dialog.setVisible(true); } }; ola-0.10.9/javascript/Makefile.mk0000664000175000017500000000533114376533110013520 00000000000000EXTRA_DIST += \ javascript/README \ javascript/new-src/.jscsrc \ javascript/new-src/.jshintrc \ javascript/new-src/Gruntfile.js \ javascript/new-src/README.md \ javascript/new-src/bower.json \ javascript/new-src/package.json \ javascript/new-src/css/style.css \ javascript/new-src/src/controllers/menu.js \ javascript/new-src/src/controllers/patch_universe.js \ javascript/new-src/src/controllers/rdm_universe.js \ javascript/new-src/src/controllers/universe.js \ javascript/new-src/src/controllers/fader_universe.js \ javascript/new-src/src/controllers/keypad_universe.js \ javascript/new-src/src/controllers/plugins.js \ javascript/new-src/src/controllers/add_universe.js \ javascript/new-src/src/controllers/plugin_info.js \ javascript/new-src/src/controllers/setting_universe.js \ javascript/new-src/src/controllers/header.js \ javascript/new-src/src/controllers/overview.js \ javascript/new-src/src/constants.js \ javascript/new-src/src/factories/ola.js \ javascript/new-src/src/app.js \ javascript/new-src/src/filters/start_form.js \ javascript/ola/base_frame.js \ javascript/ola/common/dmx_constants.js \ javascript/ola/common/dmx_monitor.js \ javascript/ola/common/keypad_controller.js \ javascript/ola/common/keypad_parser.js \ javascript/ola/common/plugin_list.js \ javascript/ola/common/rdm_section_list.js \ javascript/ola/common/section_render.js \ javascript/ola/common/server.js \ javascript/ola/common/server_stats.js \ javascript/ola/common/sorted_list.js \ javascript/ola/common/uid_list.js \ javascript/ola/dialog.js \ javascript/ola/full/available_port_table.js \ javascript/ola/full/base_universe_tab.js \ javascript/ola/full/custom_dragger.js \ javascript/ola/full/custom_dragscrollsupport.js \ javascript/ola/full/dmx_console.js \ javascript/ola/full/dmx_console_tab.js \ javascript/ola/full/dmx_monitor_tab.js \ javascript/ola/full/plugin_frame.js \ javascript/ola/full/rdm_attributes_panel.js \ javascript/ola/full/rdm_patcher.js \ javascript/ola/full/rdm_patcher_tab.js \ javascript/ola/full/rdm_tab.js \ javascript/ola/full/universe_frame.js \ javascript/ola/full/universe_settings_tab.js \ javascript/ola/home_frame.js \ javascript/ola/logger.js \ javascript/ola/mobile.js \ javascript/ola/mobile/controller_tab.js \ javascript/ola/mobile/monitor_tab.js \ javascript/ola/mobile/plugin_tab.js \ javascript/ola/mobile/universe_tab.js \ javascript/ola/new_universe_frame.js \ javascript/ola/ola.js \ javascript/ola/port_table.js \ javascript/ola/universe_control.js \ javascript/ola/universe_item.js ola-0.10.9/examples/0000775000175000017500000000000014376533271011210 500000000000000ola-0.10.9/examples/ShowSaver.h0000664000175000017500000000264714376533110013223 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ShowSaver.h * Writes show data to a file. * Copyright (C) 2011 Simon Newton */ #include #include #include #include #ifndef EXAMPLES_SHOWSAVER_H_ #define EXAMPLES_SHOWSAVER_H_ /** * Write show data to a file. */ class ShowSaver { public: explicit ShowSaver(const std::string &filename); ~ShowSaver(); bool Open(); void Close(); bool NewFrame(const ola::TimeStamp &arrival_time, unsigned int universe, const ola::DmxBuffer &data); private: const std::string m_filename; std::ofstream m_show_file; ola::TimeStamp m_last_frame; static const char OLA_SHOW_HEADER[]; }; #endif // EXAMPLES_SHOWSAVER_H_ ola-0.10.9/examples/ShowSaver.cpp0000664000175000017500000000457014376533110013553 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ShowSaver.cpp * Writes show data to a file. * Copyright (C) 2011 Simon Newton * * The data file is in the form: * universe-number channel1,channel2,channel3 * delay-in-ms * universe-number channel1,channel2,channel3 */ #include #include #include #include #include #include #include #include "examples/ShowSaver.h" using std::string; using ola::DmxBuffer; using std::endl; const char ShowSaver::OLA_SHOW_HEADER[] = "OLA Show"; ShowSaver::ShowSaver(const string &filename) : m_filename(filename) { } ShowSaver::~ShowSaver() { Close(); } /** * Open the show file for writing. * @returns true if we could open the file, false otherwise. */ bool ShowSaver::Open() { m_show_file.open(m_filename.data()); if (!m_show_file.is_open()) { OLA_FATAL << "Can't open " << m_filename << ": " << strerror(errno); return false; } m_show_file << OLA_SHOW_HEADER << endl; return true; } /** * Close the show file */ void ShowSaver::Close() { if (m_show_file.is_open()) { m_show_file.close(); } } /** * Write a new frame */ bool ShowSaver::NewFrame(const ola::TimeStamp &arrival_time, unsigned int universe, const ola::DmxBuffer &data) { // TODO(simon): add much better error handling here if (m_last_frame.IsSet()) { // this is not the first frame so write the delay in ms const ola::TimeInterval delta = arrival_time - m_last_frame; m_show_file << delta.InMilliSeconds() << endl; } m_last_frame = arrival_time; m_show_file << universe << " " << data.ToString() << endl; return true; } ola-0.10.9/examples/ola-throughput.cpp0000664000175000017500000000340714376533110014612 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-throughput.cpp * Send a bunch of frames quickly to load test the server. * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include using std::cout; using std::endl; using std::string; using ola::StreamingClient; DEFINE_s_uint32(universe, u, 1, "The universe to send data on"); DEFINE_s_uint32(sleep, s, 40000, "Time between DMX updates in micro-seconds"); /* * Main */ int main(int argc, char *argv[]) { ola::AppInit(&argc, argv, "[options]", "Send DMX512 data to OLA."); StreamingClient ola_client; if (!ola_client.Setup()) { OLA_FATAL << "Setup failed"; exit(1); } ola::DmxBuffer buffer; buffer.Blackout(); while (1) { usleep(FLAGS_sleep); if (!ola_client.SendDmx(FLAGS_universe, buffer)) { cout << "Send DMX failed" << endl; exit(1); } } return 0; } ola-0.10.9/examples/ShowLoader.h0000664000175000017500000000276314376533110013350 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ShowLoader.h * A simple show playback system. * Copyright (C) 2011 Simon Newton */ #include #include #include #ifndef EXAMPLES_SHOWLOADER_H_ #define EXAMPLES_SHOWLOADER_H_ /** * Loads a show file and reads the DMX data. */ class ShowLoader { public: explicit ShowLoader(const std::string &filename); ~ShowLoader(); typedef enum { OK, INVALID_LINE, END_OF_FILE, } State; bool Load(); void Reset(); State NextTimeout(unsigned int *timeout); State NextFrame(unsigned int *universe, ola::DmxBuffer *data); private: const std::string m_filename; std::ifstream m_show_file; unsigned int m_line; static const char OLA_SHOW_HEADER[]; void ReadLine(std::string *line); }; #endif // EXAMPLES_SHOWLOADER_H_ ola-0.10.9/examples/ola-streaming-client.cpp0000664000175000017500000000532414376533110015646 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-streaming-client.cpp * The streaming client example program. * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include #include #include #include using std::cout; using std::endl; using std::string; using ola::client::StreamingClient; DEFINE_s_string(dmx, d, "", "Comma separated DMX values to send, e.g. " "0,255,128 sets first channel to 0, second " "channel to 255 and third channel to 128."); DEFINE_s_uint32(universe, u, 1, "The universe to send data for"); DEFINE_uint8(priority, ola::dmx::SOURCE_PRIORITY_DEFAULT, "The source priority to send data at"); bool terminate = false; bool SendDataFromString(StreamingClient *client, unsigned int universe, const string &data) { StreamingClient::SendArgs args; args.priority = FLAGS_priority; ola::DmxBuffer buffer; bool status = buffer.SetFromString(data); if (!status || buffer.Size() == 0) { return false; } if (!client->SendDMX(universe, buffer, args)) { cout << "Send DMX failed" << endl; terminate = true; return false; } return true; } int main(int argc, char *argv[]) { ola::AppInit(&argc, argv, "--dmx --universe ", "Send DMX512 data to OLA. If DMX512 data isn't provided, it " "will read from STDIN."); StreamingClient ola_client; if (!ola_client.Setup()) { OLA_FATAL << "Setup failed"; exit(1); } if (FLAGS_dmx.str().empty()) { string input; while (!terminate && std::cin >> input) { ola::StringTrim(&input); SendDataFromString(&ola_client, FLAGS_universe, input); } } else { SendDataFromString(&ola_client, FLAGS_universe, FLAGS_dmx.str()); } ola_client.Stop(); return 0; } ola-0.10.9/examples/ShowPlayer.h0000664000175000017500000000415214376533110013370 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ShowPlayer.h * A simple show playback system. * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include "examples/ShowLoader.h" #ifndef EXAMPLES_SHOWPLAYER_H_ #define EXAMPLES_SHOWPLAYER_H_ /** * @brief A class which plays back recorded show files. */ class ShowPlayer { public: /** * @brief Create a new ShowPlayer * @param filename the show file to play */ explicit ShowPlayer(const std::string &filename); ~ShowPlayer(); /** * @brief Initialize the show player. * @return EXIT_OK if successful. */ int Init(); /** * @brief Playback the show * @param iterations the number of iterations of the show to play. * @param duration the duration in seconds after which playback is stopped. * @param delay the hold time at the end of a show before playback starts * from the beginning again. */ int Playback(unsigned int iterations, unsigned int duration, unsigned int delay); private: ola::client::OlaClientWrapper m_client; ShowLoader m_loader; bool m_infinite_loop; unsigned int m_iteration_remaining; unsigned int m_loop_delay; void SendNextFrame(); ShowLoader::State RegisterNextTimeout(); bool ReadNextFrame(unsigned int *universe, ola::DmxBuffer *data); void HandleEndOfFile(); }; #endif // EXAMPLES_SHOWPLAYER_H_ ola-0.10.9/examples/ShowPlayer.cpp0000664000175000017500000000762314376533110013731 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ShowPlayer.cpp * A simple show playback system. * Copyright (C) 2011 Simon Newton * * The data file is in the form: * universe-number channel1,channel2,channel3 * delay-in-ms * universe-number channel1,channel2,channel3 */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "examples/ShowPlayer.h" using std::vector; using std::string; using ola::DmxBuffer; ShowPlayer::ShowPlayer(const string &filename) : m_loader(filename), m_infinite_loop(false), m_iteration_remaining(0), m_loop_delay(0) { } ShowPlayer::~ShowPlayer() {} int ShowPlayer::Init() { if (!m_client.Setup()) { OLA_FATAL << "Client Setup failed"; return ola::EXIT_UNAVAILABLE; } if (!m_loader.Load()) { return ola::EXIT_NOINPUT; } return ola::EXIT_OK; } int ShowPlayer::Playback(unsigned int iterations, unsigned int duration, unsigned int delay) { m_infinite_loop = iterations == 0 || duration != 0; m_iteration_remaining = iterations; m_loop_delay = delay; SendNextFrame(); ola::io::SelectServer *ss = m_client.GetSelectServer(); if (duration != 0) { ss->RegisterSingleTimeout( duration * 1000, ola::NewSingleCallback(ss, &ola::io::SelectServer::Terminate)); } ss->Run(); return ola::EXIT_OK; } void ShowPlayer::SendNextFrame() { DmxBuffer buffer; unsigned int universe; ShowLoader::State state = m_loader.NextFrame(&universe, &buffer); switch (state) { case ShowLoader::END_OF_FILE: HandleEndOfFile(); return; case ShowLoader::INVALID_LINE: m_client.GetSelectServer()->Terminate(); return; default: {} } state = RegisterNextTimeout(); OLA_INFO << "Universe: " << universe << ": " << buffer.ToString(); ola::client::SendDMXArgs args; m_client.GetClient()->SendDMX(universe, buffer, args); switch (state) { case ShowLoader::END_OF_FILE: HandleEndOfFile(); return; case ShowLoader::INVALID_LINE: m_client.GetSelectServer()->Terminate(); return; default: {} } } /** * Get the next time offset */ ShowLoader::State ShowPlayer::RegisterNextTimeout() { unsigned int timeout; ShowLoader::State state = m_loader.NextTimeout(&timeout); if (state != ShowLoader::OK) { return state; } OLA_INFO << "Registering timeout for " << timeout << "ms"; m_client.GetSelectServer()->RegisterSingleTimeout( timeout, ola::NewSingleCallback(this, &ShowPlayer::SendNextFrame)); return state; } /** * Handle the case where we reach the end of file */ void ShowPlayer::HandleEndOfFile() { m_iteration_remaining--; if (m_infinite_loop || m_iteration_remaining > 0) { m_loader.Reset(); m_client.GetSelectServer()->RegisterSingleTimeout( m_loop_delay, ola::NewSingleCallback(this, &ShowPlayer::SendNextFrame)); return; } else { // stop the show m_client.GetSelectServer()->Terminate(); } } ola-0.10.9/examples/OlaConfigurator.cpp0000664000175000017500000000601514376533110014724 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * OlaConfigurator.cpp * Makes configuring devices easy * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include #include "examples/OlaConfigurator.h" using ola::NewSingleCallback; using ola::OlaCallbackClient; using ola::OlaDevice; using ola::io::SelectServer; using std::cerr; using std::cout; using std::endl; using std::string; using std::vector; DEFINE_s_int32(device, d, -1, "Id of the device to control."); /* * Clean up */ OlaConfigurator::~OlaConfigurator() { delete m_client_wrapper; } /* * Setup the configurator * @return true on success, false on failure */ bool OlaConfigurator::Setup() { m_client_wrapper = new ola::OlaCallbackClientWrapper(); if (!m_client_wrapper->Setup()) { delete m_client_wrapper; m_client_wrapper = NULL; return false; } m_client = m_client_wrapper->GetClient(); m_ss = m_client_wrapper->GetSelectServer(); // fire off a DeviceInfo request m_client->FetchDeviceInfo( m_plugin_id, NewSingleCallback(this, &OlaConfigurator::HandleDevices)); return true; } /* * Send a ConfigureDevice() request * @param message the request to send */ bool OlaConfigurator::SendMessage(const google::protobuf::Message &message) { string request_string; message.SerializeToString(&request_string); return m_client->ConfigureDevice( m_alias, request_string, NewSingleCallback(this, &OlaConfigurator::HandleConfigResponse)); } /* * Handle the DeviceInfo response. We do this to ensure that the plugin this * device corresponds to is the one we expect. * * @param devices a vector of OlaDevice objects * @param error an error string */ void OlaConfigurator::HandleDevices(const vector &devices, const string &error) { if (!error.empty()) { cerr << "Error: " << error << endl; m_ss->Terminate(); return; } vector ::const_iterator iter; for (iter = devices.begin(); iter != devices.end(); ++iter) { if (iter->Alias() == m_alias && iter->PluginId() == m_plugin_id) { SendConfigRequest(); return; } } cout << "Device " << m_alias << " is of the wrong type or missing." << endl; m_ss->Terminate(); } ola-0.10.9/examples/ola-rdm.cpp0000664000175000017500000004462714376533110013174 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-rdm.cpp * The command line tool for controlling RDM devices * Copyright (C) 2010 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using ola::network::NetworkToHost; using ola::rdm::PidStoreHelper; using ola::rdm::UID; using std::auto_ptr; using std::cerr; using std::cout; using std::endl; using std::string; using std::vector; typedef struct { bool set_mode; bool help; // show the help string pid_location; // alt pid store bool list_pids; // show the pid list int universe; // universe id UID *uid; // uid uint16_t sub_device; // the sub device string pid; // pid to get/set vector args; // extra args string cmd; // argv[0] bool display_frames; // print raw frames. } options; /* * Parse our cmd line options */ void ParseOptions(int argc, char *argv[], options *opts) { const int FRAME_OPTION_VALUE = 256; opts->cmd = argv[0]; string cmd_name = ola::file::FilenameFromPathOrPath(opts->cmd); // To skip the lt prefix during development ola::StripPrefix(&cmd_name, "lt-"); #ifdef _WIN32 // Strip the extension size_t extension = cmd_name.find("."); if (extension != string::npos) { cmd_name = cmd_name.substr(0, extension); } #endif // _WIN32 opts->set_mode = false; opts->pid_location = ""; opts->list_pids = false; opts->help = false; opts->universe = 1; opts->uid = NULL; opts->sub_device = 0; opts->display_frames = false; if (cmd_name == "ola_rdm_set") { opts->set_mode = true; } int uid_set = 0; static struct option long_options[] = { {"sub-device", required_argument, 0, 'd'}, {"help", no_argument, 0, 'h'}, {"pid-location", required_argument, 0, 'p'}, {"list-pids", no_argument, 0, 'l'}, {"universe", required_argument, 0, 'u'}, {"frames", no_argument, 0, FRAME_OPTION_VALUE}, {"uid", required_argument, &uid_set, 1}, {0, 0, 0, 0} }; int option_index = 0; while (1) { int c = getopt_long(argc, argv, "d:hlp:u:", long_options, &option_index); if (c == -1) break; switch (c) { case 0: if (uid_set) opts->uid = UID::FromString(optarg); break; case 'd': opts->sub_device = atoi(optarg); break; case 'h': opts->help = true; break; case 'l': opts->list_pids = true; break; case 'p': opts->pid_location = optarg; break; case 'u': opts->universe = atoi(optarg); break; case FRAME_OPTION_VALUE: opts->display_frames = true; break; default: break; } } int index = optind; for (; index < argc; index++) opts->args.push_back(argv[index]); } /* * Display the help for get_pid */ void DisplayGetPidHelp(const options &opts) { cout << "Usage: " << opts.cmd << " --universe --uid \n" "\n" "Get the value of a PID for a device.\n" "Use '" << opts.cmd << " --list-pids' to get a list of PIDs.\n" "\n" " --frames display the raw RDM frames if available.\n" " --uid the UID of the device to control.\n" " -d, --sub-device target a particular sub device (default is 0)\n" " -h, --help display this help message and exit.\n" " -l, --list-pids display a list of PIDs\n" " -p, --pid-location the directory to read PID definitions from\n" " -u, --universe universe number.\n" << endl; } /* * Display the help for set_pid */ void DisplaySetPidHelp(const options &opts) { cout << "Usage: " << opts.cmd << " --universe --uid \n" "\n" "Set the value of a PID for a device.\n" "Use '" << opts.cmd << " --list-pids' to get a list of PIDs.\n" "\n" " --frames display the raw RDM frames if available.\n" " --uid the UID of the device to control.\n" " -d, --sub-device target a particular sub device (default is 0)\n" " -h, --help display this help message and exit.\n" " -l, --list-pids display a list of PIDs\n" " -p, --pid-location the directory to read PID definitions from\n" " -u, --universe universe number.\n" << endl; } /* * Display the help message */ void DisplayHelpAndExit(const options &opts) { if (opts.set_mode) { DisplaySetPidHelp(opts); } else { DisplayGetPidHelp(opts); } exit(ola::EXIT_USAGE); } /* * Dump the list of known pids */ void DisplayPIDsAndExit(uint16_t manufacturer_id, const PidStoreHelper &pid_helper) { vector pid_names; pid_helper.SupportedPids(manufacturer_id, &pid_names); sort(pid_names.begin(), pid_names.end()); vector::const_iterator iter = pid_names.begin(); for (; iter != pid_names.end(); ++iter) { cout << *iter << endl; } exit(ola::EXIT_OK); } class RDMController { public: RDMController(string pid_location, bool show_frames); bool InitPidHelper(); bool Setup(); const PidStoreHelper& PidHelper() const { return m_pid_helper; } int PerformRequestAndWait(unsigned int universe, const UID &uid, uint16_t sub_device, const string &pid_name, bool is_set, const vector &inputs); void HandleResponse(const ola::client::Result &result, const ola::client::RDMMetadata &metadata, const ola::rdm::RDMResponse *response); void ShowFrames(const ola::client::RDMMetadata &metadata); private: struct PendingRequest { public: PendingRequest() : universe(0), uid(NULL), sub_device(0), pid_value(0) { } unsigned int universe; const UID *uid; uint16_t sub_device; uint16_t pid_value; }; const bool m_show_frames; ola::client::OlaClientWrapper m_ola_client; PidStoreHelper m_pid_helper; PendingRequest m_pending_request; void FetchQueuedMessage(); void PrintRemainingMessages(uint8_t message_count); void HandleAckResponse(uint16_t manufacturer_id, bool is_set, uint16_t pid, const uint8_t *data, unsigned int length); }; RDMController::RDMController(string pid_location, bool show_frames) : m_show_frames(show_frames), m_pid_helper(pid_location) { } bool RDMController::InitPidHelper() { return m_pid_helper.Init(); } bool RDMController::Setup() { return m_ola_client.Setup(); } /** * Handle the RDM response */ void RDMController::HandleResponse(const ola::client::Result &result, const ola::client::RDMMetadata &metadata, const ola::rdm::RDMResponse *response) { if (!result.Success()) { cerr << "Error: " << result.Error() << endl; ShowFrames(metadata); m_ola_client.GetSelectServer()->Terminate(); return; } if (metadata.response_code == ola::rdm::RDM_WAS_BROADCAST) { m_ola_client.GetSelectServer()->Terminate(); // Broadcast, there shouldn't be any frames return; } else if (metadata.response_code != ola::rdm::RDM_COMPLETED_OK) { cerr << "Error: " << ola::rdm::StatusCodeToString(metadata.response_code) << endl; ShowFrames(metadata); m_ola_client.GetSelectServer()->Terminate(); return; } if (!response) { cerr << "Error: Missing RDM Response but response_code was " "RDM_COMPLETED_OK, this is a bug, please report it!" << endl; ShowFrames(metadata); return; } if (response->ResponseType() == ola::rdm::RDM_ACK_TIMER) { uint16_t backoff_time; if (response->ParamDataSize() != sizeof(backoff_time)) { cerr << "Invalid ACK_TIMER param size of " << response->ParamDataSize(); } else { memcpy(reinterpret_cast(&backoff_time), response->ParamData(), sizeof(backoff_time)); unsigned int timeout = 100 * NetworkToHost(backoff_time); m_ola_client.GetSelectServer()->RegisterSingleTimeout( timeout, ola::NewSingleCallback(this, &RDMController::FetchQueuedMessage)); } } else if (response->ResponseType() == ola::rdm::RDM_ACK) { if (response->ParamId() == m_pending_request.pid_value || m_pending_request.pid_value == ola::rdm::PID_QUEUED_MESSAGE) { HandleAckResponse( m_pending_request.uid->ManufacturerId(), response->CommandClass() == ola::rdm::RDMCommand::SET_COMMAND_RESPONSE, response->ParamId(), response->ParamData(), response->ParamDataSize()); } else { // we got something other than an empty status message, this means there // there are probably more messages to fetch if (response->ParamId() != ola::rdm::PID_STATUS_MESSAGES || response->ParamDataSize() != 0) { FetchQueuedMessage(); return; } // this is just an empty status message, the device probably doesn't // support queued messages. cout << "Empty STATUS_MESSAGES returned." << endl; } } else if (response->ResponseType() == ola::rdm::RDM_NACK_REASON) { uint16_t nack_reason; if (response->ParamDataSize() != sizeof(nack_reason)) { cerr << "Invalid NACK reason size of " << response->ParamDataSize(); } else { memcpy(reinterpret_cast(&nack_reason), response->ParamData(), sizeof(nack_reason)); nack_reason = NetworkToHost(nack_reason); cout << "Request NACKed: " << ola::rdm::NackReasonToString(nack_reason) << endl; } } else { cout << "Unknown RDM response type " << ola::strings::ToHex(response->ResponseType()) << endl; } PrintRemainingMessages(response->MessageCount()); ShowFrames(metadata); m_ola_client.GetSelectServer()->Terminate(); } /** * Show frames if asked for */ void RDMController::ShowFrames(const ola::client::RDMMetadata &metadata) { if (m_show_frames && !metadata.frames.empty()) { cout << "------- Frame Information --------" << endl; ola::rdm::RDMFrames::const_iterator iter = metadata.frames.begin(); for (; iter != metadata.frames.end(); ++iter) { std::ios::fmtflags f(cout.flags()); cout << std::fixed << std::setprecision(1); if (iter->timing.response_time) { cout << "Response Time: " << iter->timing.response_time / 1000.0 << "uS" << endl; } if (iter->timing.break_time) { cout << "Break Time: " << iter->timing.break_time / 1000.0 << "uS" << endl; } if (iter->timing.mark_time) { cout << "Mark Time: " << iter->timing.mark_time / 1000.0 << "uS" << endl; } if (iter->timing.data_time) { cout << "Data Time: " << iter->timing.data_time / 1000.0 << "uS" << endl; } cout.flags(f); ola::strings::FormatData(&cout, iter->data.data(), iter->data.size()); } } } /** * Build a RDM Request from the options provided and send it to the daemon. */ int RDMController::PerformRequestAndWait(unsigned int universe, const UID &uid, uint16_t sub_device, const string &pid_name, bool is_set, const vector &inputs) { // get the pid descriptor const ola::rdm::PidDescriptor *pid_descriptor = m_pid_helper.GetDescriptor( pid_name, uid.ManufacturerId()); uint16_t pid_value; if (!pid_descriptor && (ola::PrefixedHexStringToInt(pid_name, &pid_value) || ola::StringToInt(pid_name, &pid_value))) { pid_descriptor = m_pid_helper.GetDescriptor( pid_value, uid.ManufacturerId()); } if (!pid_descriptor) { cout << "Unknown PID: " << pid_name << endl; cout << "Use --list-pids to list the available PIDs." << endl; return ola::EXIT_USAGE; } const ola::messaging::Descriptor *descriptor = NULL; if (is_set) descriptor = pid_descriptor->SetRequest(); else descriptor = pid_descriptor->GetRequest(); if (!descriptor) { cout << (is_set ? "SET" : "GET") << " command not supported for " << pid_name << endl; exit(ola::EXIT_USAGE); } // attempt to build the message auto_ptr message(m_pid_helper.BuildMessage( descriptor, inputs)); if (!message.get()) { cout << m_pid_helper.SchemaAsString(descriptor); return ola::EXIT_USAGE; } m_pending_request.universe = universe; m_pending_request.uid = &uid; m_pending_request.sub_device = sub_device; m_pending_request.pid_value = pid_descriptor->Value(); unsigned int param_data_length; const uint8_t *param_data = m_pid_helper.SerializeMessage( message.get(), ¶m_data_length); ola::client::SendRDMArgs args( ola::NewSingleCallback(this, &RDMController::HandleResponse)); if (m_show_frames) { args.include_raw_frames = true; } if (is_set) { m_ola_client.GetClient()->RDMSet( m_pending_request.universe, *m_pending_request.uid, m_pending_request.sub_device, pid_descriptor->Value(), param_data, param_data_length, args); } else { m_ola_client.GetClient()->RDMGet( m_pending_request.universe, *m_pending_request.uid, m_pending_request.sub_device, pid_descriptor->Value(), param_data, param_data_length, args); } m_ola_client.GetSelectServer()->Run(); return ola::EXIT_OK; } /** * Called after the ack timer expires. This resends the request. */ void RDMController::FetchQueuedMessage() { uint8_t status_type = 4; ola::client::SendRDMArgs args( ola::NewSingleCallback(this, &RDMController::HandleResponse)); m_ola_client.GetClient()->RDMGet( m_pending_request.universe, *m_pending_request.uid, m_pending_request.sub_device, ola::rdm::PID_QUEUED_MESSAGE, &status_type, sizeof(status_type), args); } /** * Print the number of messages remaining if it is non-0. */ void RDMController::PrintRemainingMessages(uint8_t message_count) { if (!message_count) return; cout << "-----------------------------------------------------" << endl; cout << "Messages remaining: " << static_cast(message_count) << endl; } /** * Handle an ACK response */ void RDMController::HandleAckResponse(uint16_t manufacturer_id, bool is_set, uint16_t pid, const uint8_t *data, unsigned int length) { const ola::rdm::PidDescriptor *pid_descriptor = m_pid_helper.GetDescriptor( pid, m_pending_request.uid->ManufacturerId()); if (!pid_descriptor) { OLA_WARN << "Unknown PID: " << pid << "."; return; } const ola::messaging::Descriptor *descriptor = NULL; if (is_set) descriptor = pid_descriptor->SetResponse(); else descriptor = pid_descriptor->GetResponse(); if (!descriptor) { OLA_WARN << "Unknown response message: " << (is_set ? "SET" : "GET") << " " << pid_descriptor->Name(); return; } auto_ptr message( m_pid_helper.DeserializeMessage(descriptor, data, length)); if (!message.get()) { OLA_WARN << "Unable to inflate RDM response"; return; } cout << m_pid_helper.PrettyPrintMessage(manufacturer_id, is_set, pid, message.get()); } /* * Main */ int main(int argc, char *argv[]) { ola::InitLogging(ola::OLA_LOG_WARN, ola::OLA_LOG_STDERR); if (!ola::NetworkInit()) { OLA_WARN << "Network initialization failed." << endl; exit(ola::EXIT_UNAVAILABLE); } options opts; ParseOptions(argc, argv, &opts); RDMController controller(opts.pid_location, opts.display_frames); if (opts.help) DisplayHelpAndExit(opts); // Make sure we can load our PIDs if (!controller.InitPidHelper()) exit(ola::EXIT_OSFILE); if (!opts.uid) { if (opts.list_pids) { DisplayPIDsAndExit(0, controller.PidHelper()); } else { OLA_FATAL << "Invalid or missing UID, try xxxx:yyyyyyyy"; DisplayHelpAndExit(opts); } } UID dest_uid(*opts.uid); delete opts.uid; if (opts.list_pids) DisplayPIDsAndExit(dest_uid.ManufacturerId(), controller.PidHelper()); if (opts.args.empty()) DisplayHelpAndExit(opts); if (!controller.Setup()) { OLA_FATAL << "Setup failed"; exit(ola::EXIT_UNAVAILABLE); } // split out rdm message params from the pid name vector inputs(opts.args.size() - 1); vector::iterator args_iter = opts.args.begin(); copy(++args_iter, opts.args.end(), inputs.begin()); return controller.PerformRequestAndWait(opts.universe, dest_uid, opts.sub_device, opts.args[0], opts.set_mode, inputs); } ola-0.10.9/examples/ola-e131.cpp0000664000175000017500000001302514376533110013047 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-e131.cpp * Configure an E1.31 device * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include #include #include "examples/OlaConfigurator.h" using std::cerr; using std::cout; using std::endl; using std::string; DECLARE_int32(device); DEFINE_s_uint32(port_id, p, 0, "Id of the port to control"); DEFINE_s_default_bool(input, i, false, "Set an input port, otherwise set an output port."); DEFINE_bool(preview_mode, false, "Set the preview mode bit on|off"); DEFINE_default_bool(discovery, false, "Get the discovery state"); /* * A class that configures E131 devices */ class E131Configurator: public OlaConfigurator { public: E131Configurator() : OlaConfigurator(FLAGS_device, ola::OLA_PLUGIN_E131) {} void HandleConfigResponse(const string &reply, const string &error); void SendConfigRequest(); private: void DisplayOptions(const ola::plugin::e131::PortInfoReply &reply); void DisplaySourceList(const ola::plugin::e131::SourceListReply &reply); }; /* * Handle the device config reply */ void E131Configurator::HandleConfigResponse(const string &reply, const string &error) { Terminate(); if (!error.empty()) { cerr << error << endl; return; } ola::plugin::e131::Reply reply_pb; if (!reply_pb.ParseFromString(reply)) { cout << "Protobuf parsing failed" << endl; return; } switch (reply_pb.type()) { case ola::plugin::e131::Reply::E131_PORT_INFO: if (reply_pb.has_port_info()) { DisplayOptions(reply_pb.port_info()); } else { cout << "Missing port_info field in reply" << endl; } break; case ola::plugin::e131::Reply::E131_SOURCES_LIST: if (reply_pb.has_source_list()) { DisplaySourceList(reply_pb.source_list()); } else { cout << "Missing source_list field in reply" << endl; } break; default: cout << "Invalid response type" << endl; } } /* * Send a get parameters request * @param device_id the device to send the request to * @param client the OLAClient */ void E131Configurator::SendConfigRequest() { ola::plugin::e131::Request request; if (FLAGS_preview_mode.present()) { if (FLAGS_port_id.present()) { request.set_type(ola::plugin::e131::Request::E131_PREVIEW_MODE); ola::plugin::e131::PreviewModeRequest *preview_request = request.mutable_preview_mode(); preview_request->set_port_id(FLAGS_port_id); preview_request->set_preview_mode(FLAGS_preview_mode); preview_request->set_input_port(FLAGS_input); } else { cout << "Please specify a port number" << endl; request.set_type(ola::plugin::e131::Request::E131_PORT_INFO); } } else if (FLAGS_discovery) { request.set_type(ola::plugin::e131::Request::E131_SOURCES_LIST); ola::plugin::e131::SourceListRequest *source_list_request = request.mutable_source_list(); (void) source_list_request; // no options for now. } else { request.set_type(ola::plugin::e131::Request::E131_PORT_INFO); } SendMessage(request); } /* * Display the widget parameters */ void E131Configurator::DisplayOptions( const ola::plugin::e131::PortInfoReply &reply) { for (int i = 0; i < reply.input_port_size(); i++) { cout << "Input Port " << reply.input_port(i).port_id() << ", ignore preview mode " << (reply.input_port(i).preview_mode() ? "on" : "off") << endl; } for (int i = 0; i < reply.output_port_size(); i++) { cout << "Output Port " << reply.output_port(i).port_id() << ", preview mode " << (reply.output_port(i).preview_mode() ? "on" : "off") << endl; } } void E131Configurator::DisplaySourceList( const ola::plugin::e131::SourceListReply &reply) { if (reply.unsupported()) { cout << "Discovery mode isn't enabled" << endl; return; } for (int i = 0; i < reply.source_size(); i++) { const ola::plugin::e131::SourceEntry &entry = reply.source(i); cout << entry.cid() << " (" << entry.ip_address() << ")"; if (entry.has_source_name()) { cout << ", " << entry.source_name(); } cout << endl; for (int j = 0; j < entry.universe_size(); j++) { cout << " " << entry.universe(j) << endl; } } } /* * The main function */ int main(int argc, char*argv[]) { ola::AppInit( &argc, argv, "-d -p [--input] --preview-mode ", "Configure E1.31 devices managed by OLA."); if (FLAGS_device < 0) ola::DisplayUsageAndExit(); E131Configurator configurator; if (!configurator.Setup()) { cerr << "Error: " << strerror(errno) << endl; exit(1); } configurator.Run(); return 0; } ola-0.10.9/examples/testdata/0000775000175000017500000000000014376533271013021 500000000000000ola-0.10.9/examples/testdata/partial_frames0000664000175000017500000000024014376533110015641 00000000000000OLA Show 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 463 1 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, 553 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ola-0.10.9/examples/testdata/single_uni0000664000175000017500000006041714376533110015020 00000000000000OLA Show 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 463 1 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 553 1 208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1004 1 208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 143 1 208,0,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 76 1 208,0,175,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 789 1 208,0,228,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 353 1 208,0,228,0,0,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 639 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 999 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1050 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 968 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 983 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1004 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1019 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 982 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1018 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 988 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1025 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 994 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1021 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 993 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 992 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1006 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ola-0.10.9/examples/testdata/trailing_timeout0000664000175000017500000000403414376533110016234 00000000000000OLA Show 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 463 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1006 ola-0.10.9/examples/testdata/dos_line_endings0000664000175000017500000000603714376533110016165 00000000000000OLA Show 1 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 463 1 2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 553 1 208,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ola-0.10.9/examples/testdata/multiple_unis0000664000175000017500000004426114376533110015554 00000000000000OLA Show 1 208,0,228,0,0,238,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 0 3 10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 360 1 160,0,154,0,0,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 248 3 20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 174 3 30,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 185 3 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 318 3 40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 737 3 40,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 205 3 40,20,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 342 3 40,40,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 145 3 40,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 591 3 40,50,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 3326 1 180,0,154,0,0,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 189 1 190,0,154,0,0,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 564 1 190,0,154,0,0,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1018 1 190,0,154,0,0,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 993 1 190,0,154,0,0,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 1015 1 190,0,154,0,0,171,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 ola-0.10.9/examples/ShowRecorder.cpp0000664000175000017500000000574214376533110014242 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ShowRecorder.cpp * Create recordings for the simple show playback system. * Copyright (C) 2011 Simon Newton * * The data file is in the form: * universe-number channel1,channel2,channel3 * delay-in-ms * universe-number channel1,channel2,channel3 */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "examples/ShowRecorder.h" using ola::DmxBuffer; using ola::client::Result; using std::string; using std::vector; ShowRecorder::ShowRecorder(const string &filename, const vector &universes) : m_saver(filename), m_universes(universes), m_frame_count(0) { } ShowRecorder::~ShowRecorder() { } /** * Init the ShowRecorder */ int ShowRecorder::Init() { if (!m_client.Setup()) { OLA_FATAL << "Client Setup failed"; return ola::EXIT_UNAVAILABLE; } if (!m_saver.Open()) { return ola::EXIT_CANTCREAT; } m_client.GetClient()->SetDMXCallback( ola::NewCallback(this, &ShowRecorder::NewFrame)); vector::const_iterator iter = m_universes.begin(); for (; iter != m_universes.end(); ++iter) { m_client.GetClient()->RegisterUniverse( *iter, ola::client::REGISTER, ola::NewSingleCallback(this, &ShowRecorder::RegisterComplete)); } return ola::EXIT_OK; } /** * Record the show. */ int ShowRecorder::Record() { m_client.GetSelectServer()->Run(); return ola::EXIT_OK; } /** * Stop recording */ void ShowRecorder::Stop() { m_client.GetSelectServer()->Terminate(); } /** * Record the new frame */ void ShowRecorder::NewFrame(const ola::client::DMXMetadata &meta, const ola::DmxBuffer &data) { ola::TimeStamp now; m_clock.CurrentMonotonicTime(&now); m_saver.NewFrame(now, meta.universe, data); m_frame_count++; } void ShowRecorder::RegisterComplete(const Result &result) { if (!result.Success()) { OLA_WARN << "Register failed: " << result.Error(); } else { OLA_INFO << "Register completed"; } } ola-0.10.9/examples/ola-recorder.cpp0000664000175000017500000001300214376533110014176 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-recorder.cpp * A simple tool to record & playback shows. * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include "examples/ShowPlayer.h" #include "examples/ShowLoader.h" #include "examples/ShowRecorder.h" // On MinGW, SignalThread.h pulls in pthread.h which pulls in Windows.h, which // needs to be after WinSock2.h, hence this order #include // NOLINT(build/include_order) using std::auto_ptr; using std::cout; using std::endl; using std::map; using std::vector; using std::string; DEFINE_s_string(playback, p, "", "The show file to playback."); DEFINE_s_string(record, r, "", "The show file to record data to."); DEFINE_string(verify, "", "The show file to verify."); DEFINE_s_string(universes, u, "", "A comma separated list of universes to record"); DEFINE_s_uint32(delay, d, 0, "The delay in ms between successive iterations."); DEFINE_uint32(duration, 0, "The length of time (seconds) to run for."); // 0 means infinite looping DEFINE_s_uint32(iterations, i, 1, "The number of times to repeat the show, 0 means unlimited."); void TerminateRecorder(ShowRecorder *recorder) { recorder->Stop(); } /** * Record a show */ int RecordShow() { if (FLAGS_universes.str().empty()) { OLA_FATAL << "No universes specified, use -u"; exit(ola::EXIT_USAGE); } vector universe_strs; vector universes; ola::StringSplit(FLAGS_universes.str(), &universe_strs, ","); vector::const_iterator iter = universe_strs.begin(); for (; iter != universe_strs.end(); ++iter) { unsigned int universe; if (!ola::StringToInt(*iter, &universe)) { OLA_FATAL << *iter << " isn't a valid universe number"; exit(ola::EXIT_USAGE); } universes.push_back(universe); } ShowRecorder show_recorder(FLAGS_record.str(), universes); int status = show_recorder.Init(); if (status) return status; { ola::thread::SignalThread signal_thread; cout << "Recording, hit Control-C to end" << endl; signal_thread.InstallSignalHandler( SIGINT, ola::NewCallback(TerminateRecorder, &show_recorder)); signal_thread.InstallSignalHandler( SIGTERM, ola::NewCallback(TerminateRecorder, &show_recorder)); if (!signal_thread.Start()) { show_recorder.Stop(); } show_recorder.Record(); } cout << "Saved " << show_recorder.FrameCount() << " frames" << endl; return ola::EXIT_OK; } /** * Verify a show file is valid */ int VerifyShow(const string &filename) { ShowLoader loader(filename); if (!loader.Load()) return ola::EXIT_NOINPUT; map frames_by_universe; uint64_t total_time = 0; unsigned int universe; ola::DmxBuffer buffer; unsigned int timeout; ShowLoader::State state; while (true) { state = loader.NextFrame(&universe, &buffer); if (state != ShowLoader::OK) break; frames_by_universe[universe]++; state = loader.NextTimeout(&timeout); if (state != ShowLoader::OK) break; total_time += timeout; } map::const_iterator iter; unsigned int total = 0; cout << "------------ Summary ----------" << endl; for (iter = frames_by_universe.begin(); iter != frames_by_universe.end(); ++iter) { cout << "Universe " << iter->first << ": " << iter->second << " frames" << endl; total += iter->second; } cout << "Total frames: " << total << endl; cout << "Playback time: " << total_time / 1000 << "." << total_time % 10 << " seconds" << endl; if ((state == ShowLoader::OK) || (state == ShowLoader::END_OF_FILE)) { return ola::EXIT_OK; } else { OLA_FATAL << "Error loading show, got state " << state; return ola::EXIT_DATAERR; } } /* * Main */ int main(int argc, char *argv[]) { ola::AppInit(&argc, argv, "[--record --universes ] [--playback " "] [--verify ]", "Record a series of universes, or playback a previously " "recorded show."); if (!FLAGS_playback.str().empty()) { ShowPlayer player(FLAGS_playback.str()); int status = player.Init(); if (!status) status = player.Playback(FLAGS_iterations, FLAGS_duration, FLAGS_delay); return status; } else if (!FLAGS_record.str().empty()) { return RecordShow(); } else if (!FLAGS_verify.str().empty()) { return VerifyShow(FLAGS_verify.str()); } else { OLA_FATAL << "One of --record or --playback or --verify must be provided"; ola::DisplayUsage(); } return ola::EXIT_OK; } ola-0.10.9/examples/ola-dmxconsole.cpp0000664000175000017500000004770614376533110014566 00000000000000/* * Copyright (C) 2001 Dirk Jagdmann * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Modified by Simon Newton (nomis52gmail.com) to use ola * * The (void) before attrset is due to a bug in curses. See * http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg682294.html */ #ifdef HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef HAVE_CURSES_H #include #elif defined(HAVE_NCURSES_CURSES_H) #include #endif // HAVE_CURSES_H #include #include #include #include #include #include #include #include #include #ifdef HAVE_FTIME #include #endif // HAVE_FTIME #include #include #include #include #include #include #include #include #include #include #include #include using ola::client::OlaClient; using ola::client::OlaClientWrapper; using ola::io::SelectServer; using std::string; static const unsigned int DEFAULT_UNIVERSE = 0; static const unsigned char CHANNEL_NUDGE_VALUE = 0x10; static const unsigned char CHANNEL_DISPLAY_WIDTH = 4; static const unsigned char ROWS_PER_CHANNEL_ROW = 2; /* color names used */ enum { CHANNEL = 1, ZERO, NORM, FULL, HEADLINE, HEADEMPH, HEADERROR, MAXCOLOR }; /* display modes */ enum { DISP_MODE_DMX = 0, DISP_MODE_HEX, DISP_MODE_DEC, DISP_MODE_MAX, }; typedef struct { unsigned int universe; bool help; // help } options; unsigned int MAXFKEY = 12; unsigned int universe = 0; typedef unsigned char dmx_t; static dmx_t *dmx; static dmx_t *dmxsave; static dmx_t *dmxundo; static int display_mode = DISP_MODE_DMX; static int current_channel = 0; // channel cursor is positioned on static int first_channel = 0; // channel in upper left corner static int channels_per_line = 80 / CHANNEL_DISPLAY_WIDTH; // Default chans/screen is 80x24, less a row for the header, // and one at the bottom to get an even number of rows static int channels_per_screen = (80 / CHANNEL_DISPLAY_WIDTH) * ((24 - 2) / ROWS_PER_CHANNEL_ROW); static int undo_possible = 0; static int current_cue = 0; // select with F keys static float fadetime = 1.0f; static int fading = 0; // percentage counter of fade process static int palette_number = 0; static int palette[MAXCOLOR]; static bool screen_to_small = false; static int channels_offset = 1; OlaClient *client; SelectServer *ss; void DMXsleep(int usec) { struct timeval tv; tv.tv_sec = usec / 1000000; tv.tv_usec = usec % 1000000; if (select(1, NULL, NULL, NULL, &tv) < 0) perror("could not select"); } // returns the time in milliseconds uint64_t timeGetTime() { #ifdef HAVE_GETTIMEOFDAY struct timeval tv; gettimeofday(&tv, NULL); return (static_cast(tv.tv_sec) * 1000UL + static_cast(tv.tv_usec / 1000)); #else # ifdef HAVE_FTIME struct timeb t; ftime(&t); return (static_cast(t.time) * 1000UL + static_cast(t.millitm); # else # endif // HAVE_FTIME #endif // HAVE_GETTIMEOFDAY } /* set all DMX channels */ void setall() { ola::DmxBuffer buffer(dmx, ola::DMX_UNIVERSE_SIZE); client->SendDMX(universe, buffer, ola::client::SendDMXArgs()); } /* set current DMX channel */ void set() { setall(); } /* display the channels numbers */ void mask() { int i = 0; int x, y; int z = first_channel; erase(); /* clear headline */ (void) attrset(palette[HEADLINE]); move(0, 0); // NOLINT(build/include_what_you_use) This is ncurses.h's move for (x = 0; x < COLS; x++) addch(' '); /* write channel numbers */ (void) attrset(palette[CHANNEL]); for (y = 1; y < LINES && z < ola::DMX_UNIVERSE_SIZE && i < channels_per_screen; y += ROWS_PER_CHANNEL_ROW) { move(y, 0); // NOLINT(build/include_what_you_use) This is ncurses.h's move for (x = 0; x < channels_per_line && z < ola::DMX_UNIVERSE_SIZE && i < channels_per_screen; x++, i++, z++) { switch (display_mode) { case DISP_MODE_DMX: case DISP_MODE_DEC: default: printw("%03d ", z + channels_offset); break; case DISP_MODE_HEX: printw("%03X ", z + channels_offset); break; } } } } /* update the screen */ void values() { int i = 0; int x, y; int z = first_channel; int universe_length = 0; int width_total = 0; if (universe > 0) { universe_length = floor(log10(universe)) + 1; } else { universe_length = 1; } /* headline */ width_total += 25; if (COLS >= width_total) { time_t t = time(NULL); struct tm tt; localtime_r(&t, &tt); char s[32]; asctime_r(&tt, s); s[strlen(s) - 1] = 0; /* strip newline at end of string */ attrset(palette[HEADLINE]); mvprintw(0, 1, "%s", s); } width_total += (5 + universe_length); if (COLS >= width_total) { /* Max universe 4294967295 - see MAX_UNIVERSE in include/ola/Constants.h */ attrset(palette[HEADLINE]); printw(" uni:"); attrset(palette[HEADEMPH]); printw("%u", universe); } width_total += (5 + 2); if (COLS >= width_total) { attrset(palette[HEADLINE]); printw(" cue:"); attrset(palette[HEADEMPH]); printw("%02i", current_cue + 1); } width_total += (10 + 3); if (COLS >= width_total) { attrset(palette[HEADLINE]); printw(" fadetime:"); attrset(palette[HEADEMPH]); printw("%1.1f", fadetime); } width_total += (8 + 3); if (COLS >= width_total) { if (fading) { attrset(palette[HEADLINE]); printw(" fading:"); attrset(palette[HEADEMPH]); printw("%02i%%", (fading < 100) ? fading: 99); } else { attrset(palette[HEADLINE]); printw(" "); } } /* Use 10 as error string length, rather than error_str.length(), as a safety feature to ensure it's shown */ width_total += (6 + 10); if (COLS >= width_total && screen_to_small) { attrset(palette[HEADERROR]); printw("ERROR: screen too small, we need at least 3 lines"); } /* values */ for (y = ROWS_PER_CHANNEL_ROW; y < LINES && z < ola::DMX_UNIVERSE_SIZE && i < channels_per_screen; y += ROWS_PER_CHANNEL_ROW) { move(y, 0); // NOLINT(build/include_what_you_use) This is ncurses.h's move for (x = 0; x < channels_per_line && z < ola::DMX_UNIVERSE_SIZE && i < channels_per_screen; x++, z++, i++) { const int d = dmx[z]; switch (d) { case ola::DMX_MIN_SLOT_VALUE: attrset(palette[ZERO]); break; case ola::DMX_MAX_SLOT_VALUE: attrset(palette[FULL]); break; default: attrset(palette[NORM]); } if (z == current_channel) attron(A_REVERSE); switch (display_mode) { case DISP_MODE_HEX: if (d == 0) addstr(" "); else printw(" %02x ", d); break; case DISP_MODE_DEC: if (d == 0) addstr(" "); else if (d < 100) printw(" %02d ", d); else printw("%03d ", d); break; case DISP_MODE_DMX: default: switch (d) { case ola::DMX_MIN_SLOT_VALUE: addstr(" "); break; case ola::DMX_MAX_SLOT_VALUE: addstr(" FL "); break; default: printw(" %02d ", (d * 100) / ola::DMX_MAX_SLOT_VALUE); } } } } } /* save current cue into cuebuffer */ void savecue() { memcpy(&dmxsave[current_cue * ola::DMX_UNIVERSE_SIZE], dmx, ola::DMX_UNIVERSE_SIZE); } /* get new cue from cuebuffer */ void loadcue() { memcpy(dmx, &dmxsave[current_cue * ola::DMX_UNIVERSE_SIZE], ola::DMX_UNIVERSE_SIZE); } /* fade cue "new_cue" into current cue */ void crossfade(unsigned int new_cue) { dmx_t *dmxold; dmx_t *dmxnew; int i; int max = ola::DMX_UNIVERSE_SIZE; /* check parameter */ if (new_cue > MAXFKEY) return; undo_possible = 0; /* don't crossfade for small fadetimes */ if (fadetime < 0.1f) { savecue(); current_cue = new_cue; loadcue(); setall(); return; } savecue(); dmxold = &dmxsave[current_cue * ola::DMX_UNIVERSE_SIZE]; dmxnew = &dmxsave[new_cue * ola::DMX_UNIVERSE_SIZE]; /* try to find the last channel value > 0, so we don't have to crossfade large blocks of 0s */ for (i = ola::DMX_UNIVERSE_SIZE - 1; i >= 0; max = i, i--) if (dmxold[i] || dmxnew[i]) break; { const uint64_t tstart = timeGetTime(); const uint64_t tend = tstart + static_cast(fadetime * 1000.0); uint64_t t = tstart; while (t <= tend) { /* calculate new cue */ t = timeGetTime(); { const float p = static_cast(t - tstart) / 1000.0f / fadetime; const float q = 1.0f - p; for (i = 0; i < max; i++) if (dmxold[i] || dmxnew[i]) /* avoid calculating with only 0 */ dmx[i] = static_cast(static_cast(dmxold[i]) * q + static_cast(dmxnew[i]) * p); setall(); /* update screen */ fading = static_cast(p * 100.0f); values(); refresh(); DMXsleep(100000); // get current time, because the last time is too old (due to the sleep) t = timeGetTime(); } } fading = 0; /* set the new cue */ current_cue = new_cue; loadcue(); setall(); } } void undo() { if (undo_possible) { memcpy(dmx, dmxundo, ola::DMX_UNIVERSE_SIZE); undo_possible = 0; } } void undoprep() { memcpy(dmxundo, dmx, ola::DMX_UNIVERSE_SIZE); undo_possible = 1; } /* change palette to "p". If p is invalid new palette is number "0". */ void changepalette(int p) { /* COLOR_BLACK COLOR_RED COLOR_GREEN COLOR_YELLOW COLOR_BLUE COLOR_MAGENTA COLOR_CYAN COLOR_WHITE A_NORMAL A_ATTRIBUTES A_CHARTEXT A_COLOR A_STANDOUT A_UNDERLINE A_REVERSE A_BLINK A_DIM A_BOLD A_ALTCHARSET A_INVIS */ switch (p) { default: palette_number = 0; // fall through, use 0 as default palette OLA_FALLTHROUGH case 0: init_pair(CHANNEL, COLOR_BLACK, COLOR_CYAN); init_pair(ZERO, COLOR_BLACK, COLOR_WHITE); init_pair(NORM, COLOR_BLUE, COLOR_WHITE); init_pair(FULL, COLOR_RED, COLOR_WHITE); init_pair(HEADLINE, COLOR_WHITE, COLOR_BLUE); init_pair(HEADEMPH, COLOR_YELLOW, COLOR_BLUE); init_pair(HEADERROR, COLOR_RED, COLOR_BLUE); break; case 2: init_pair(CHANNEL, COLOR_BLACK, COLOR_WHITE); init_pair(ZERO, COLOR_BLUE, COLOR_BLACK); init_pair(NORM, COLOR_GREEN, COLOR_BLACK); init_pair(FULL, COLOR_RED, COLOR_BLACK); init_pair(HEADLINE, COLOR_WHITE, COLOR_BLACK); init_pair(HEADEMPH, COLOR_CYAN, COLOR_BLACK); init_pair(HEADERROR, COLOR_RED, COLOR_BLACK); break; case 1: palette[CHANNEL] = A_REVERSE; palette[ZERO] = A_NORMAL; palette[NORM] = A_NORMAL; palette[FULL] = A_BOLD; palette[HEADLINE] = A_NORMAL; palette[HEADEMPH] = A_NORMAL; palette[HEADERROR] = A_BOLD; break; } if (p == 0 || p == 2) { palette[CHANNEL] = COLOR_PAIR(CHANNEL); palette[ZERO] = COLOR_PAIR(ZERO); palette[NORM] = COLOR_PAIR(NORM); palette[FULL] = COLOR_PAIR(FULL); palette[HEADLINE] = COLOR_PAIR(HEADLINE); palette[HEADEMPH] = COLOR_PAIR(HEADEMPH); palette[HEADERROR] = COLOR_PAIR(HEADERROR); } mask(); } void CHECK(void *p) { if (p == NULL) { fprintf(stderr, "could not alloc\n"); exit(1); } } /* calculate channels_per_line and channels_per_screen from LINES and COLS */ void calcscreengeometry() { int c = LINES; if (c < 3) { screen_to_small = true; exit(1); } c--; // One line for headline if (c % ROWS_PER_CHANNEL_ROW == 1) c--; // Need an even number of lines for data channels_per_line = COLS / CHANNEL_DISPLAY_WIDTH; channels_per_screen = channels_per_line * (c / ROWS_PER_CHANNEL_ROW); } /* signal handler for SIGWINCH */ void terminalresize(int sig) { struct winsize size; if (ioctl(0, TIOCGWINSZ, &size) < 0) return; resizeterm(size.ws_row, size.ws_col); calcscreengeometry(); mask(); (void) sig; } WINDOW *w = NULL; /* cleanup handler for program exit. */ void cleanup() { if (w) { resetty(); endwin(); } if (screen_to_small) puts("screen too small, we need at least 3 lines"); } void stdin_ready() { int n; int c = wgetch(w); switch (c) { case KEY_PPAGE: undoprep(); if (dmx[current_channel] < ola::DMX_MAX_SLOT_VALUE - CHANNEL_NUDGE_VALUE) dmx[current_channel] += CHANNEL_NUDGE_VALUE; else dmx[current_channel] = ola::DMX_MAX_SLOT_VALUE; set(); break; case '+': if (dmx[current_channel] < ola::DMX_MAX_SLOT_VALUE) { undoprep(); dmx[current_channel]++; } set(); break; case KEY_NPAGE: undoprep(); if (dmx[current_channel] == ola::DMX_MAX_SLOT_VALUE) { // Smooth out the fade down dmx[current_channel] = (ola::DMX_MAX_SLOT_VALUE + 1) - CHANNEL_NUDGE_VALUE; } else if (dmx[current_channel] > CHANNEL_NUDGE_VALUE) { dmx[current_channel] -= CHANNEL_NUDGE_VALUE; } else { dmx[current_channel] = ola::DMX_MIN_SLOT_VALUE; } set(); break; case '-': if (dmx[current_channel] > ola::DMX_MIN_SLOT_VALUE) { undoprep(); dmx[current_channel]--; } set(); break; case ' ': undoprep(); if (dmx[current_channel] < ((ola::DMX_MAX_SLOT_VALUE + 1) / 2)) dmx[current_channel] = ola::DMX_MAX_SLOT_VALUE; else dmx[current_channel] = ola::DMX_MIN_SLOT_VALUE; set(); break; case '0' ... '9': fadetime = c -'0'; break; case KEY_HOME: current_channel = 0; first_channel = 0; mask(); break; case KEY_END: current_channel = ola::DMX_UNIVERSE_SIZE - 1; if (channels_per_screen >= ola::DMX_UNIVERSE_SIZE) { first_channel = 0; } else { first_channel = current_channel - (channels_per_screen - 1); } mask(); break; case KEY_RIGHT: if (current_channel < ola::DMX_UNIVERSE_SIZE - 1) { current_channel++; if (current_channel >= first_channel + channels_per_screen) { first_channel += channels_per_line; mask(); } } break; case KEY_LEFT: if (current_channel > 0) { current_channel--; if (current_channel < first_channel) { first_channel -= channels_per_line; if (first_channel < 0) first_channel = 0; mask(); } } break; case KEY_DOWN: current_channel += channels_per_line; if (current_channel >= ola::DMX_UNIVERSE_SIZE) current_channel = ola::DMX_UNIVERSE_SIZE - 1; if (current_channel >= first_channel + channels_per_screen) { first_channel += channels_per_line; mask(); } break; case KEY_UP: current_channel -= channels_per_line; if (current_channel < 0) current_channel = 0; if (current_channel < first_channel) { first_channel -= channels_per_line; if (first_channel < 0) first_channel = 0; mask(); } break; case KEY_IC: undoprep(); for (n = ola::DMX_UNIVERSE_SIZE - 1; n > current_channel && n > 0; n--) dmx[n] = dmx[n - 1]; setall(); break; case KEY_DC: undoprep(); for (n = current_channel; n < ola::DMX_UNIVERSE_SIZE - 1; n++) dmx[n] = dmx[n + 1]; setall(); break; case 'B': case 'b': undoprep(); memset(dmx, ola::DMX_MIN_SLOT_VALUE, ola::DMX_UNIVERSE_SIZE); setall(); break; case 'F': case 'f': undoprep(); memset(dmx, ola::DMX_MAX_SLOT_VALUE, ola::DMX_UNIVERSE_SIZE); setall(); break; case 'M': case 'm': if (++display_mode >= DISP_MODE_MAX) display_mode = 0; mask(); break; case 'N': case 'n': if (++channels_offset > 1) channels_offset = 0; mask(); break; case 'P': case 'p': changepalette(++palette_number); break; case 'U': case 'u': undo(); break; case 'Q': case 'q': ss->Terminate(); break; default: if (c >= static_cast(KEY_F(1)) && c <= static_cast(KEY_F(MAXFKEY))) crossfade(c - KEY_F(1)); break; } values(); refresh(); } /* * parse our cmd line options */ void ParseOptions(int argc, char *argv[], options *opts) { static struct option long_options[] = { {"help", no_argument, 0, 'h'}, {"universe", required_argument, 0, 'u'}, {0, 0, 0, 0} }; opts->universe = DEFAULT_UNIVERSE; opts->help = false; int c; int option_index = 0; while (1) { c = getopt_long(argc, argv, "hu:", long_options, &option_index); if (c == -1) break; switch (c) { case 0: break; case 'h': opts->help = true; break; case 'u': opts->universe = strtoul(optarg, NULL, 0); break; case '?': break; default: break; } } } /* * Display the help message */ void DisplayHelpAndExit(char arg[]) { std::cout << "Usage: " << arg << " [--universe ]\n" "\n" "Send data to a DMX512 universe.\n" "\n" " -h, --help Display this help message and exit.\n" " -u, --universe Id of universe to control (defaults to " << DEFAULT_UNIVERSE << ").\n" << std::endl; exit(ola::EXIT_OK); } int main(int argc, char *argv[]) { signal(SIGWINCH, terminalresize); atexit(cleanup); if (!ola::NetworkInit()) { std::cerr << "Network initialization failed." << std::endl; exit(ola::EXIT_UNAVAILABLE); } // 10 bytes security, for file IO routines, will be optimized and checked // later dmx = reinterpret_cast(calloc(ola::DMX_UNIVERSE_SIZE + 10, sizeof(dmx_t))); CHECK(dmx); dmxsave = reinterpret_cast( calloc(ola::DMX_UNIVERSE_SIZE * MAXFKEY, sizeof(dmx_t))); CHECK(dmxsave); dmxundo = reinterpret_cast( calloc(ola::DMX_UNIVERSE_SIZE, sizeof(dmx_t))); CHECK(dmxundo); options opts; ParseOptions(argc, argv, &opts); if (opts.help) { DisplayHelpAndExit(argv[0]); } universe = opts.universe; /* set up ola connection */ OlaClientWrapper ola_client; ola::io::UnmanagedFileDescriptor stdin_descriptor(0); stdin_descriptor.SetOnData(ola::NewCallback(&stdin_ready)); if (!ola_client.Setup()) { printf("error: %s", strerror(errno)); exit(1); } client = ola_client.GetClient(); ss = ola_client.GetSelectServer(); ss->AddReadDescriptor(&stdin_descriptor); /* init curses */ w = initscr(); if (!w) { printf("unable to open main-screen\n"); return 1; } savetty(); start_color(); noecho(); raw(); keypad(w, TRUE); calcscreengeometry(); changepalette(palette_number); values(); refresh(); ss->Run(); return 0; } ola-0.10.9/examples/ola-dmxmonitor.cpp0000664000175000017500000004237114376533110014604 00000000000000/* * Copyright (C) 2001 Dirk Jagdmann * * This program is free software; you can redistribute it and/or * modify it under the terms of the GNU General Public License * as published by the Free Software Foundation; either version 2 * of the License, or (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Modified by Simon Newton (nomis52gmail.com) to use ola * * The (void) before attrset is due to a bug in curses. See * http://www.mail-archive.com/debian-bugs-dist@lists.debian.org/msg682294.html */ #ifdef HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef HAVE_CURSES_H #include #elif defined(HAVE_NCURSES_CURSES_H) #include #endif // HAVE_CURSES_H #include #include #include #include #include #include #include #include #include #include #include #include #ifdef HAVE_FTIME #include #endif // HAVE_FTIME #include #include #include #include #include #include #include #include #include #include #include #include using ola::Clock; using ola::DmxBuffer; using ola::client::OlaClient; using ola::client::OlaClientWrapper; using ola::client::Result; using ola::TimeInterval; using ola::TimeStamp; using ola::io::SelectServer; using std::string; static const unsigned int DEFAULT_UNIVERSE = 0; static const unsigned char CHANNEL_DISPLAY_WIDTH = 4; static const unsigned char ROWS_PER_CHANNEL_ROW = 2; /* color names used */ enum { CHANNEL = 1, ZERO, NORM, FULL, HEADLINE, HEADEMPH, HEADERROR, MAXCOLOR }; /* display modes */ enum { DISP_MODE_DMX = 0, DISP_MODE_HEX, DISP_MODE_DEC, DISP_MODE_MAX, }; typedef struct { unsigned int universe; bool help; // help } options; class DmxMonitor *dmx_monitor; static unsigned int display_mode = DISP_MODE_DMX; static int current_channel = 0; /* channel cursor is positioned on */ static int first_channel = 0; /* channel in upper left corner */ static unsigned int channels_per_line = 80 / CHANNEL_DISPLAY_WIDTH; // Default chans/screen is 80x24, less a row for the header, // and one at the bottom to get an even number of rows static unsigned int channels_per_screen = (80 / CHANNEL_DISPLAY_WIDTH) * ((24 - 2) / ROWS_PER_CHANNEL_ROW); static int palette[MAXCOLOR]; /* * The observer class which responds to events */ class DmxMonitor { public: explicit DmxMonitor(unsigned int universe) : m_universe(universe), m_counter(0), m_palette_number(0), m_stdin_descriptor(STDIN_FILENO), m_window(NULL), m_data_loss_window(NULL), m_channels_offset(true) { } ~DmxMonitor() { if (m_window) { resetty(); endwin(); } } bool Init(); void Run() { m_client.GetSelectServer()->Run(); } void NewDmx(const ola::client::DMXMetadata &meta, const DmxBuffer &buffer); void RegisterComplete(const Result &result); void StdinReady(); bool CheckDataLoss(); void DrawDataLossWindow(); void TerminalResized(); private: unsigned int m_universe; unsigned int m_counter; int m_palette_number; ola::io::UnmanagedFileDescriptor m_stdin_descriptor; TimeStamp m_last_data; WINDOW *m_window; WINDOW *m_data_loss_window; bool m_channels_offset; // start from channel 1 rather than 0; OlaClientWrapper m_client; DmxBuffer m_buffer; void DrawScreen(bool include_values = true); void Mask(); void Values(); void ChangePalette(int p); void CalcScreenGeometry(); }; /* * Setup the monitoring console */ bool DmxMonitor::Init() { /* set up ola connection */ if (!m_client.Setup()) { printf("error: %s", strerror(errno)); return false; } OlaClient *client = m_client.GetClient(); client->SetDMXCallback(ola::NewCallback(this, &DmxMonitor::NewDmx)); client->RegisterUniverse( m_universe, ola::client::REGISTER, ola::NewSingleCallback(this, &DmxMonitor::RegisterComplete)); /* init curses */ m_window = initscr(); if (!m_window) { printf("unable to open main-screen\n"); return false; } savetty(); start_color(); noecho(); raw(); keypad(m_window, TRUE); m_client.GetSelectServer()->AddReadDescriptor(&m_stdin_descriptor); m_stdin_descriptor.SetOnData( ola::NewCallback(this, &DmxMonitor::StdinReady)); m_client.GetSelectServer()->RegisterRepeatingTimeout( 500, ola::NewCallback(this, &DmxMonitor::CheckDataLoss)); CalcScreenGeometry(); ChangePalette(m_palette_number); m_buffer.Blackout(); DrawScreen(); return true; } /* * Called when there is new DMX data */ void DmxMonitor::NewDmx(OLA_UNUSED const ola::client::DMXMetadata &meta, const DmxBuffer &buffer) { m_buffer.Set(buffer); if (m_data_loss_window) { // delete the window wborder(m_data_loss_window, ' ', ' ', ' ', ' ', ' ', ' ', ' ', ' '); wrefresh(m_data_loss_window); delwin(m_data_loss_window); m_data_loss_window = NULL; Mask(); } move(0, COLS - 1); // NOLINT(build/include_what_you_use) This is ncurses.h's switch (m_counter % 4) { case 0: printw("/"); break; case 1: printw("-"); break; case 2: printw("\\"); break; default: printw("|"); break; } m_counter++; Clock clock; clock.CurrentMonotonicTime(&m_last_data); Values(); refresh(); } void DmxMonitor::RegisterComplete(const Result &result) { if (!result.Success()) { std::cerr << "Register command failed with " << result.Error() << std::endl; m_client.GetSelectServer()->Terminate(); } } /* * Called when there is input from the keyboard */ void DmxMonitor::StdinReady() { int c = wgetch(m_window); switch (c) { case KEY_HOME: current_channel = 0; first_channel = 0; DrawScreen(); break; case KEY_END: current_channel = ola::DMX_UNIVERSE_SIZE - 1; if (channels_per_screen >= ola::DMX_UNIVERSE_SIZE) { first_channel = 0; } else { first_channel = current_channel - (channels_per_screen - 1); } DrawScreen(); break; case 'l': case 'L': case KEY_RIGHT: if (current_channel < ola::DMX_UNIVERSE_SIZE - 1) { current_channel++; if (current_channel >= static_cast(first_channel + channels_per_screen)) { first_channel += channels_per_line; } DrawScreen(); } break; case 'h': case 'H': case KEY_LEFT: if (current_channel > 0) { current_channel--; if (current_channel < first_channel) { first_channel -= channels_per_line; if (first_channel < 0) first_channel = 0; } DrawScreen(); } break; case 'j': case 'J': case KEY_DOWN: current_channel += channels_per_line; if (current_channel >= ola::DMX_UNIVERSE_SIZE) current_channel = ola::DMX_UNIVERSE_SIZE - 1; if (current_channel >= static_cast(first_channel + channels_per_screen)) { first_channel += channels_per_line; } DrawScreen(); break; case 'k': case 'K': case KEY_UP: current_channel -= channels_per_line; if (current_channel < 0) current_channel = 0; if (current_channel < first_channel) { first_channel -= channels_per_line; if (first_channel < 0) first_channel = 0; } DrawScreen(); break; case 'M': case 'm': if (++display_mode >= DISP_MODE_MAX) display_mode = 0; DrawScreen(); break; case 'N': case 'n': m_channels_offset = !m_channels_offset; DrawScreen(false); break; case 'P': case 'p': ChangePalette(++m_palette_number); DrawScreen(); break; case 'Q': case 'q': m_client.GetSelectServer()->Terminate(); break; default: break; } } /* * Check for data loss. * TODO(simon): move to the ola server */ bool DmxMonitor::CheckDataLoss() { if (m_last_data.IsSet()) { TimeStamp now; Clock clock; clock.CurrentMonotonicTime(&now); TimeInterval diff = now - m_last_data; if (diff > TimeInterval(2, 5000000)) { // loss of data DrawDataLossWindow(); } } return true; } void DmxMonitor::DrawDataLossWindow() { if (!m_data_loss_window) { m_data_loss_window = newwin(3, 14, (LINES - 3) / 2, (COLS - 14) / 2); } mvwprintw(m_data_loss_window, 1, 2, "Data Loss!"); wborder(m_data_loss_window, '|', '|', '-', '-', '+', '+', '+', '+'); wrefresh(m_data_loss_window); } /* * Called when the terminal is resized */ void DmxMonitor::TerminalResized() { struct winsize size; if (ioctl(0, TIOCGWINSZ, &size) < 0) return; resizeterm(size.ws_row, size.ws_col); CalcScreenGeometry(); DrawScreen(); } void DmxMonitor::DrawScreen(bool include_values) { if (include_values) erase(); Mask(); if (include_values) Values(); refresh(); if (m_data_loss_window) DrawDataLossWindow(); } /* display the channels numbers */ void DmxMonitor::Mask() { unsigned int i = 0, x, y; unsigned int channel = first_channel; /* clear headline */ (void) attrset(palette[HEADLINE]); move(0, 0); // NOLINT(build/include_what_you_use) This is ncurses.h's move for (x = 0; static_cast(x) < COLS; x++) addch(' '); if (COLS > 15) { mvprintw(0 , 0, "Universe: "); printw("%u", m_universe); } /* write channel numbers */ (void) attrset(palette[CHANNEL]); for (y = 1; static_cast(y) < LINES && static_cast(channel) < ola::DMX_UNIVERSE_SIZE && i < channels_per_screen; y += ROWS_PER_CHANNEL_ROW) { move(y, 0); // NOLINT(build/include_what_you_use) This is ncurses.h's move for (x = 0; static_cast(x) < static_cast(channels_per_line) && static_cast(channel) < ola::DMX_UNIVERSE_SIZE && static_cast(i < channels_per_screen); x++, i++, channel++) { switch (display_mode) { case DISP_MODE_HEX: printw("%03X ", channel + (m_channels_offset ? 1 : 0)); break; case DISP_MODE_DMX: case DISP_MODE_DEC: default: printw("%03d ", channel + (m_channels_offset ? 1 : 0)); break; } } } } /* * Update the screen with new values */ void DmxMonitor::Values() { int i = 0, x, y, z = first_channel; /* values */ for (y = ROWS_PER_CHANNEL_ROW; y < LINES && z < ola::DMX_UNIVERSE_SIZE && i < static_cast(channels_per_screen); y += ROWS_PER_CHANNEL_ROW) { move(y, 0); // NOLINT(build/include_what_you_use) This is ncurses.h's move for (x = 0; x < static_cast(channels_per_line) && z < ola::DMX_UNIVERSE_SIZE && i < static_cast(channels_per_screen); x++, z++, i++) { const int d = m_buffer.Get(z); switch (d) { case ola::DMX_MIN_SLOT_VALUE: (void) attrset(palette[ZERO]); break; case ola::DMX_MAX_SLOT_VALUE: (void) attrset(palette[FULL]); break; default: (void) attrset(palette[NORM]); } if (static_cast(z) == current_channel) attron(A_REVERSE); switch (display_mode) { case DISP_MODE_HEX: if (d == 0) { if (static_cast(m_buffer.Size()) <= z) { addstr("--- "); } else { addstr(" "); } } else { printw(" %02x ", d); } break; case DISP_MODE_DEC: if (d == 0) { if (static_cast(m_buffer.Size()) <= z) { addstr("--- "); } else { addstr(" "); } } else if (d < 100) { printw(" %02d ", d); } else { printw("%03d ", d); } break; case DISP_MODE_DMX: default: switch (d) { case ola::DMX_MIN_SLOT_VALUE: if (static_cast(m_buffer.Size()) <= z) { addstr("--- "); } else { addstr(" "); } break; case ola::DMX_MAX_SLOT_VALUE: addstr(" FL "); break; default: printw(" %02d ", (d * 100) / ola::DMX_MAX_SLOT_VALUE); } } } } } /* change palette to "p". If p is invalid new palette is number "0". */ void DmxMonitor::ChangePalette(int p) { /* COLOR_BLACK COLOR_RED COLOR_GREEN COLOR_YELLOW COLOR_BLUE COLOR_MAGENTA COLOR_CYAN COLOR_WHITE A_NORMAL A_ATTRIBUTES A_CHARTEXT A_COLOR A_STANDOUT A_UNDERLINE A_REVERSE A_BLINK A_DIM A_BOLD A_ALTCHARSET A_INVIS */ switch (p) { default: m_palette_number = 0; // fall through, use 0 as default palette OLA_FALLTHROUGH case 0: init_pair(CHANNEL, COLOR_BLACK, COLOR_CYAN); init_pair(ZERO, COLOR_BLACK, COLOR_WHITE); init_pair(NORM, COLOR_BLUE, COLOR_WHITE); init_pair(FULL, COLOR_RED, COLOR_WHITE); init_pair(HEADLINE, COLOR_WHITE, COLOR_BLUE); init_pair(HEADEMPH, COLOR_YELLOW, COLOR_BLUE); init_pair(HEADERROR, COLOR_RED, COLOR_BLUE); goto color; case 2: init_pair(CHANNEL, COLOR_BLACK, COLOR_WHITE); init_pair(ZERO, COLOR_BLUE, COLOR_BLACK); init_pair(NORM, COLOR_GREEN, COLOR_BLACK); init_pair(FULL, COLOR_RED, COLOR_BLACK); init_pair(HEADLINE, COLOR_WHITE, COLOR_BLACK); init_pair(HEADEMPH, COLOR_CYAN, COLOR_BLACK); init_pair(HEADERROR, COLOR_RED, COLOR_BLACK); goto color; color: palette[CHANNEL] = COLOR_PAIR(CHANNEL); palette[ZERO] = COLOR_PAIR(ZERO); palette[NORM] = COLOR_PAIR(NORM); palette[FULL] = COLOR_PAIR(FULL); palette[HEADLINE] = COLOR_PAIR(HEADLINE); palette[HEADEMPH] = COLOR_PAIR(HEADEMPH); palette[HEADERROR] = COLOR_PAIR(HEADERROR); break; case 1: palette[CHANNEL] = A_REVERSE; palette[ZERO] = A_NORMAL; palette[NORM] = A_NORMAL; palette[FULL] = A_BOLD; palette[HEADLINE] = A_NORMAL; palette[HEADEMPH] = A_NORMAL; palette[HEADERROR] = A_BOLD; break; } } /* calculate channels_per_line and channels_per_screen from LINES and COLS */ void DmxMonitor::CalcScreenGeometry() { int c = LINES; if (c < 3) { std::cerr << "Terminal must be more than 3 lines" << std::endl; exit(1); } c--; // one line for headline if (c % ROWS_PER_CHANNEL_ROW == 1) c--; // Need an even number of lines for data channels_per_line = COLS / CHANNEL_DISPLAY_WIDTH; channels_per_screen = channels_per_line * (c / ROWS_PER_CHANNEL_ROW); } /* signal handler for SIGWINCH */ void terminalresize(int sig) { dmx_monitor->TerminalResized(); (void) sig; } /* cleanup handler for program exit. */ void cleanup() { if (dmx_monitor) delete dmx_monitor; } /* * parse our cmd line options */ void ParseOptions(int argc, char *argv[], options *opts) { static struct option long_options[] = { {"help", no_argument, 0, 'h'}, {"universe", required_argument, 0, 'u'}, {0, 0, 0, 0} }; opts->universe = DEFAULT_UNIVERSE; opts->help = false; int c; int option_index = 0; while (1) { c = getopt_long(argc, argv, "hu:", long_options, &option_index); if (c == -1) break; switch (c) { case 0: break; case 'h': opts->help = true; break; case 'u': opts->universe = strtoul(optarg, NULL, 0); break; case '?': break; default: break; } } } /* * Display the help message */ void DisplayHelpAndExit(char arg[]) { std::cout << "Usage: " << arg << " [--universe ]\n" "\n" "Monitor the values on a DMX512 universe.\n" "\n" " -h, --help Display this help message and exit.\n" " -u, --universe Id of universe to monitor (defaults to " << DEFAULT_UNIVERSE << ").\n" << std::endl; exit(ola::EXIT_OK); } int main(int argc, char *argv[]) { signal(SIGWINCH, terminalresize); atexit(cleanup); if (!ola::NetworkInit()) { std::cerr << "Network initialization failed." << std::endl; exit(ola::EXIT_UNAVAILABLE); } options opts; ParseOptions(argc, argv, &opts); if (opts.help) { DisplayHelpAndExit(argv[0]); } dmx_monitor = new DmxMonitor(opts.universe); if (!dmx_monitor->Init()) return 1; dmx_monitor->Run(); delete dmx_monitor; dmx_monitor = NULL; return 0; } ola-0.10.9/examples/ola-rdm-discover.cpp0000664000175000017500000000751014376533110014776 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-rdm-discover.cpp * Print the list of UIDs and force RDM discovery * Copyright (C) 2010 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include using std::cout; using std::cerr; using std::endl; using std::setw; using std::string; using std::vector; using ola::OlaCallbackClient; using ola::OlaCallbackClientWrapper; using ola::io::SelectServer; using ola::rdm::UID; using ola::rdm::UIDSet; DEFINE_s_uint32(universe, u, 1, "The universe to do RDM discovery on"); DEFINE_s_default_bool(full, f, false, "Force full RDM Discovery for this universe"); DEFINE_s_default_bool(incremental, i, false, "Force incremental RDM Discovery for this universe"); DEFINE_default_bool(include_broadcast, false, "Include broadcast UID for this universe"); DEFINE_default_bool(include_vendorcast, false, "Include vendorcast UID for this universe"); SelectServer *ss; /* * This is called when we receive uids for a universe * @param universes a vector of OlaUniverses */ void UIDList(const ola::rdm::UIDSet &uids, const string &error) { UIDSet vendorcast; if (error.empty()) { UIDSet::Iterator iter = uids.Begin(); for (; iter != uids.End(); ++iter) { cout << *iter << endl; vendorcast.AddUID(UID::VendorcastAddress(*iter)); } if (FLAGS_include_vendorcast) { iter = vendorcast.Begin(); for (; iter != vendorcast.End(); ++iter) { cout << *iter << endl; } } if (FLAGS_include_broadcast) { cout << UID::AllDevices().ToString() << endl; } } else { cerr << error << endl; } ss->Terminate(); } /* * Send a fetch uid list request * @param client the ola client */ bool FetchUIDs(OlaCallbackClient *client) { if (FLAGS_full) { return client->RunDiscovery( FLAGS_universe, true, ola::NewSingleCallback(&UIDList)); } else if (FLAGS_incremental) { return client->RunDiscovery( FLAGS_universe, false, ola::NewSingleCallback(&UIDList)); } else { return client->FetchUIDList( FLAGS_universe, ola::NewSingleCallback(&UIDList)); } } /* * Main */ int main(int argc, char *argv[]) { ola::AppInit( &argc, argv, "--universe [--full|--incremental]", "Fetch the UID list for a universe."); OlaCallbackClientWrapper ola_client; if (!FLAGS_universe.present()) { ola::DisplayUsageAndExit(); } if (FLAGS_full && FLAGS_incremental) { cerr << "Only one of -i and -f can be specified" << endl; exit(ola::EXIT_USAGE); } if (!ola_client.Setup()) { OLA_FATAL << "Setup failed"; exit(ola::EXIT_UNAVAILABLE); } OlaCallbackClient *client = ola_client.GetClient(); ss = ola_client.GetSelectServer(); if (FetchUIDs(client)) { ss->Run(); } return ola::EXIT_OK; } ola-0.10.9/examples/ola-artnet.cpp0000664000175000017500000001235014376533110013673 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-artnet.cpp * Configure an ArtNet device * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include #include #include #include "examples/OlaConfigurator.h" using std::cerr; using std::cout; using std::endl; using std::string; DECLARE_int32(device); DEFINE_s_string(name, n, "", "Set the name of the ArtNet device."); DEFINE_string(long_name, "", "Set the long name of the ArtNet device."); DEFINE_int32(net, -1, "Set the net parameter of the ArtNet device."); DEFINE_s_int32(subnet, s, -1, "Set the subnet parameter of the ArtNet device."); DEFINE_s_uint32(universe, u, 0, "List the IPs of ArtNet devices for this universe."); /* * A class that configures Artnet devices */ class ArtnetConfigurator: public OlaConfigurator { public: ArtnetConfigurator() : OlaConfigurator(FLAGS_device, ola::OLA_PLUGIN_ARTNET) {} void HandleConfigResponse(const string &reply, const string &error); void SendConfigRequest(); private: void SendOptionRequest(); void SendNodeListRequest(); void DisplayOptions(const ola::plugin::artnet::OptionsReply &reply); void DisplayNodeList(const ola::plugin::artnet::NodeListReply &reply); }; /* * Handle the device config reply */ void ArtnetConfigurator::HandleConfigResponse(const string &reply, const string &error) { Terminate(); if (!error.empty()) { cerr << error << endl; return; } ola::plugin::artnet::Reply reply_pb; if (!reply_pb.ParseFromString(reply)) { cout << "Protobuf parsing failed" << endl; return; } if (reply_pb.type() == ola::plugin::artnet::Reply::ARTNET_OPTIONS_REPLY && reply_pb.has_options()) { DisplayOptions(reply_pb.options()); return; } else if (reply_pb.type() == ola::plugin::artnet::Reply::ARTNET_NODE_LIST_REPLY && reply_pb.has_node_list()) { DisplayNodeList(reply_pb.node_list()); } else { cout << "Invalid response type or missing options field" << endl; } } /* * Send a request */ void ArtnetConfigurator::SendConfigRequest() { if (FLAGS_universe.present()) { SendNodeListRequest(); } else { SendOptionRequest(); } } /** * Send an options request, which may involve setting options */ void ArtnetConfigurator::SendOptionRequest() { ola::plugin::artnet::Request request; request.set_type(ola::plugin::artnet::Request::ARTNET_OPTIONS_REQUEST); ola::plugin::artnet::OptionsRequest *options = request.mutable_options(); if (FLAGS_name.present()) options->set_short_name(FLAGS_name.str()); if (FLAGS_long_name.present()) options->set_long_name(FLAGS_long_name.str()); if (FLAGS_subnet.present()) options->set_subnet(FLAGS_subnet); if (FLAGS_net.present()) options->set_net(FLAGS_net); SendMessage(request); } /** * Send a request for the node list */ void ArtnetConfigurator::SendNodeListRequest() { ola::plugin::artnet::Request request; request.set_type(ola::plugin::artnet::Request::ARTNET_NODE_LIST_REQUEST); ola::plugin::artnet::NodeListRequest *node_list_request = request.mutable_node_list(); node_list_request->set_universe(FLAGS_universe); SendMessage(request); } /** * Display the widget parameters */ void ArtnetConfigurator::DisplayOptions( const ola::plugin::artnet::OptionsReply &reply) { cout << "Name: " << reply.short_name() << endl; cout << "Long Name: " << reply.long_name() << endl; cout << "Subnet: " << reply.subnet() << endl; cout << "Net: " << reply.net() << endl; } /** * Display the list of discovered nodes */ void ArtnetConfigurator::DisplayNodeList( const ola::plugin::artnet::NodeListReply &reply) { unsigned int nodes = reply.node_size(); for (unsigned int i = 0; i < nodes; i++) { const ola::plugin::artnet::OutputNode &node = reply.node(i); ola::network::IPV4Address address(node.ip_address()); cout << address << endl; } } /* * The main function */ int main(int argc, char*argv[]) { ola::AppInit(&argc, argv, "-d -n -l -s ", "Configure ArtNet devices managed by OLA."); if (FLAGS_device < 0) ola::DisplayUsageAndExit(); ArtnetConfigurator configurator; if (!configurator.Setup()) { cerr << "Error: " << strerror(errno) << endl; exit(1); } configurator.Run(); return 0; } ola-0.10.9/examples/ShowRecorder.h0000664000175000017500000000334214376533110013701 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ShowRecorder.h * Create recordings for the simple show playback system. * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include #include #include "examples/ShowSaver.h" #ifndef EXAMPLES_SHOWRECORDER_H_ #define EXAMPLES_SHOWRECORDER_H_ /** * The show player class */ class ShowRecorder { public: ShowRecorder(const std::string &filename, const std::vector &universes); ~ShowRecorder(); int Init(); int Record(); void Stop(); uint64_t FrameCount() const { return m_frame_count; } private: ola::client::OlaClientWrapper m_client; ShowSaver m_saver; std::vector m_universes; ola::Clock m_clock; uint64_t m_frame_count; void NewFrame(const ola::client::DMXMetadata &meta, const ola::DmxBuffer &data); void RegisterComplete(const ola::client::Result &result); }; #endif // EXAMPLES_SHOWRECORDER_H_ ola-0.10.9/examples/ola-latency.cpp0000664000175000017500000001024414376533110014035 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-latency.cpp * Call FetchDmx and track the latency for each call. * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include using ola::DmxBuffer; using ola::NewSingleCallback; using ola::OlaCallbackClientWrapper; using ola::TimeStamp; using ola::TimeInterval; using std::cout; using std::endl; using std::string; DEFINE_s_uint32(universe, u, 1, "The universe to receive data for"); DEFINE_default_bool(send_dmx, false, "Use SendDmx messages, default is GetDmx"); DEFINE_s_uint32(count, c, 0, "Exit after this many RPCs, default: infinite (0)"); class Tracker { public: Tracker() : m_count(0), m_sum(0) { m_buffer.Blackout(); } bool Setup(); void Start(); void GotDmx(const DmxBuffer &data, const string &error); void SendComplete(const string &error); private: uint32_t m_count; uint64_t m_sum; TimeInterval m_max; ola::DmxBuffer m_buffer; OlaCallbackClientWrapper m_wrapper; ola::Clock m_clock; ola::thread::SignalThread m_signal_thread; TimeStamp m_send_time; void SendRequest(); void LogTime(); void StartSignalThread(); }; bool Tracker::Setup() { return m_wrapper.Setup(); } void Tracker::Start() { ola::io::SelectServer *ss = m_wrapper.GetSelectServer(); m_signal_thread.InstallSignalHandler( SIGINT, ola::NewCallback(ss, &ola::io::SelectServer::Terminate)); m_signal_thread.InstallSignalHandler( SIGTERM, ola::NewCallback(ss, &ola::io::SelectServer::Terminate)); SendRequest(); ss->Execute(ola::NewSingleCallback(this, &Tracker::StartSignalThread)); ss->Run(); // Print this via cout to ensure we actually get some output by default // It also means you can just see the stats and not each individual request // if you want. cout << "--------------" << endl; cout << "Sent " << m_count << " RPCs" << endl; cout << "Max was " << m_max.MicroSeconds() << " microseconds" << endl; cout << "Mean " << m_sum / m_count << " microseconds" << endl; } void Tracker::GotDmx(const DmxBuffer &, const string &) { LogTime(); } void Tracker::SendComplete(const string &) { LogTime(); } void Tracker::SendRequest() { m_clock.CurrentMonotonicTime(&m_send_time); if (FLAGS_send_dmx) { m_wrapper.GetClient()->SendDmx( FLAGS_universe, m_buffer, NewSingleCallback(this, &Tracker::SendComplete)); } else { m_wrapper.GetClient()->FetchDmx( FLAGS_universe, NewSingleCallback(this, &Tracker::GotDmx)); } } void Tracker::LogTime() { TimeStamp now; m_clock.CurrentMonotonicTime(&now); TimeInterval delta = now - m_send_time; if (delta > m_max) { m_max = delta; } m_sum += delta.MicroSeconds(); OLA_INFO << "RPC took " << delta; if (FLAGS_count == ++m_count) { m_wrapper.GetSelectServer()->Terminate(); } else { SendRequest(); } } void Tracker::StartSignalThread() { if (!m_signal_thread.Start()) { m_wrapper.GetSelectServer()->Terminate(); } } int main(int argc, char *argv[]) { ola::AppInit(&argc, argv, "[options]", "Measure the latency of RPCs to olad."); Tracker tracker; if (!tracker.Setup()) { OLA_FATAL << "Setup failed"; exit(1); } tracker.Start(); return 0; } ola-0.10.9/examples/ShowLoader.cpp0000664000175000017500000000657614376533110013711 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ShowLoader.cpp * A class that reads OLA show files * Copyright (C) 2011 Simon Newton * * The data file is in the form: * universe-number channel1,channel2,channel3 * delay-in-ms * universe-number channel1,channel2,channel3 */ #include #include #include #include #include #include #include #include #include #include #include #include "examples/ShowLoader.h" using std::vector; using std::string; using ola::DmxBuffer; const char ShowLoader::OLA_SHOW_HEADER[] = "OLA Show"; ShowLoader::ShowLoader(const string &filename) : m_filename(filename), m_line(0) { } ShowLoader::~ShowLoader() { if (m_show_file.is_open()) { m_show_file.close(); } } /** * Load the show file. * @returns true if we could open the file, false otherwise. */ bool ShowLoader::Load() { m_show_file.open(m_filename.data()); if (!m_show_file.is_open()) { OLA_FATAL << "Can't open " << m_filename << ": " << strerror(errno); return false; } string line; ReadLine(&line); if (line != OLA_SHOW_HEADER) { OLA_WARN << "Invalid show file, expecting " << OLA_SHOW_HEADER << " got " << line; return false; } return true; } /** * Reset to the start of the show */ void ShowLoader::Reset() { m_show_file.clear(); m_show_file.seekg(0, std::ios::beg); // skip over the first line string line; ReadLine(&line); } /** * Get the next time offset * @param timeout a pointer to the timeout in ms */ ShowLoader::State ShowLoader::NextTimeout(unsigned int *timeout) { string line; ReadLine(&line); if (line.empty()) { return END_OF_FILE; } if (!ola::StringToInt(line, timeout, true)) { OLA_WARN << "Line " << m_line << ": Invalid timeout: " << line; return INVALID_LINE; } return OK; } /** * Read the next DMX frame. * @param universe the universe to send on * @param data the DMX data */ ShowLoader::State ShowLoader::NextFrame(unsigned int *universe, DmxBuffer *data) { string line; ReadLine(&line); if (line.empty()) { return END_OF_FILE; } vector inputs; ola::StringSplit(line, &inputs); if (inputs.size() != 2) { OLA_WARN << "Line " << m_line << " invalid: " << line; return INVALID_LINE; } if (!ola::StringToInt(inputs[0], universe, true)) { OLA_WARN << "Line " << m_line << " invalid: " << line; return INVALID_LINE; } return (data->SetFromString(inputs[1]) ? OK : INVALID_LINE); } void ShowLoader::ReadLine(string *line) { getline(m_show_file, *line); ola::StripSuffix(line, "\r"); m_line++; } ola-0.10.9/examples/Makefile.mk0000664000175000017500000001362314376533110013173 00000000000000# Note: gcc 4.6.1 is pretty strict about library ordering. Libraries need to be # specified in the order they are used. i.e. a library should depend on things # to the right, not the left. # See http://www.network-theory.co.uk/docs/gccintro/gccintro_18.html if BUILD_EXAMPLES # The following should match what pkg-config --libs libola returns EXAMPLE_COMMON_LIBS = common/libolacommon.la \ ola/libola.la # LIBRARIES ################################################## noinst_LTLIBRARIES += examples/libolaconfig.la examples_libolaconfig_la_SOURCES = \ examples/OlaConfigurator.h \ examples/OlaConfigurator.cpp examples_libolaconfig_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) # PROGRAMS ################################################## bin_PROGRAMS += \ examples/ola_dev_info \ examples/ola_rdm_discover \ examples/ola_rdm_get \ examples/ola_recorder \ examples/ola_streaming_client \ examples/ola_timecode \ examples/ola_uni_stats if USE_E131 bin_PROGRAMS += examples/ola_e131 examples_ola_e131_SOURCES = examples/ola-e131.cpp examples_ola_e131_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) examples_ola_e131_LDADD = examples/libolaconfig.la \ $(EXAMPLE_COMMON_LIBS) \ plugins/e131/messages/libolae131conf.la \ $(libprotobuf_LIBS) endif if USE_USBPRO bin_PROGRAMS += examples/ola_usbpro examples_ola_usbpro_SOURCES = examples/ola-usbpro.cpp examples_ola_usbpro_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) examples_ola_usbpro_LDADD = examples/libolaconfig.la \ $(EXAMPLE_COMMON_LIBS) \ plugins/usbpro/messages/libolausbproconf.la \ $(libprotobuf_LIBS) endif if USE_ARTNET bin_PROGRAMS += examples/ola_artnet examples_ola_artnet_SOURCES = examples/ola-artnet.cpp examples_ola_artnet_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) examples_ola_artnet_LDADD = examples/libolaconfig.la \ $(EXAMPLE_COMMON_LIBS) \ plugins/artnet/messages/libolaartnetconf.la \ $(libprotobuf_LIBS) endif examples_ola_dev_info_SOURCES = examples/ola-client.cpp examples_ola_dev_info_LDADD = $(EXAMPLE_COMMON_LIBS) examples_ola_streaming_client_SOURCES = examples/ola-streaming-client.cpp examples_ola_streaming_client_LDADD = $(EXAMPLE_COMMON_LIBS) examples_ola_rdm_get_SOURCES = examples/ola-rdm.cpp examples_ola_rdm_get_LDADD = $(EXAMPLE_COMMON_LIBS) examples_ola_rdm_discover_SOURCES = examples/ola-rdm-discover.cpp examples_ola_rdm_discover_LDADD = $(EXAMPLE_COMMON_LIBS) examples_ola_recorder_SOURCES = \ examples/ola-recorder.cpp \ examples/ShowLoader.h \ examples/ShowLoader.cpp \ examples/ShowPlayer.h \ examples/ShowPlayer.cpp \ examples/ShowRecorder.h \ examples/ShowRecorder.cpp \ examples/ShowSaver.h \ examples/ShowSaver.cpp examples_ola_recorder_LDADD = $(EXAMPLE_COMMON_LIBS) examples_ola_timecode_SOURCES = examples/ola-timecode.cpp examples_ola_timecode_LDADD = $(EXAMPLE_COMMON_LIBS) examples_ola_uni_stats_SOURCES = examples/ola-uni-stats.cpp examples_ola_uni_stats_LDADD = $(EXAMPLE_COMMON_LIBS) if HAVE_NCURSES bin_PROGRAMS += examples/ola_dmxconsole examples/ola_dmxmonitor examples_ola_dmxconsole_SOURCES = examples/ola-dmxconsole.cpp examples_ola_dmxmonitor_SOURCES = examples/ola-dmxmonitor.cpp if HAVE_NCURSES_PKGCONFIG examples_ola_dmxconsole_LDADD = $(EXAMPLE_COMMON_LIBS) $(libncurses_LIBS) examples_ola_dmxmonitor_LDADD = $(EXAMPLE_COMMON_LIBS) $(libncurses_LIBS) else # Fallback when pkg-config didn't know about ncurses examples_ola_dmxconsole_LDADD = $(EXAMPLE_COMMON_LIBS) -lncurses examples_ola_dmxmonitor_LDADD = $(EXAMPLE_COMMON_LIBS) -lncurses endif endif noinst_PROGRAMS += examples/ola_throughput examples/ola_latency examples_ola_throughput_SOURCES = examples/ola-throughput.cpp examples_ola_throughput_LDADD = $(EXAMPLE_COMMON_LIBS) examples_ola_latency_SOURCES = examples/ola-latency.cpp examples_ola_latency_LDADD = $(EXAMPLE_COMMON_LIBS) if USING_WIN32 # rename this program, otherwise UAC will block it OLA_PATCH_NAME = ola_ptch else OLA_PATCH_NAME = ola_patch endif # Many of the example programs are just symlinks to ola_dev_info install-exec-hook-examples: $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/$(OLA_PATCH_NAME) $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_plugin_info $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_set_dmx $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_set_priority $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_uni_info $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_uni_merge $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_uni_name $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_plugin_state $(LN_S) -f $(bindir)/ola_rdm_get $(DESTDIR)$(bindir)/ola_rdm_set INSTALL_EXEC_HOOKS += install-exec-hook-examples # TESTS_DATA ################################################## EXTRA_DIST += \ examples/testdata/dos_line_endings \ examples/testdata/multiple_unis \ examples/testdata/partial_frames \ examples/testdata/single_uni \ examples/testdata/trailing_timeout # TESTS ################################################## test_scripts += examples/RecorderVerifyTest.sh examples/RecorderVerifyTest.sh: examples/Makefile.mk echo "for FILE in ${srcdir}/examples/testdata/dos_line_endings ${srcdir}/examples/testdata/multiple_unis ${srcdir}/examples/testdata/partial_frames ${srcdir}/examples/testdata/single_uni ${srcdir}/examples/testdata/trailing_timeout; do echo \"Checking \$$FILE\"; ${top_builddir}/examples/ola_recorder${EXEEXT} --verify \$$FILE; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: \$$FILE caused ola_recorder to exit with status \$$STATUS\"; exit \$$STATUS; fi; done; exit 0" > examples/RecorderVerifyTest.sh chmod +x examples/RecorderVerifyTest.sh CLEANFILES += examples/RecorderVerifyTest.sh endif ola-0.10.9/examples/ola-timecode.cpp0000664000175000017500000000753414376533110014177 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-timecode.cpp * Send timecode data with OLA * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include using ola::client::OlaClientWrapper; using ola::StringToInt; using ola::io::SelectServer; using ola::timecode::TimeCode; using std::cerr; using std::endl; using std::string; using std::vector; DEFINE_s_string(format, f, "SMPTE", "One of FILM, EBU, DF, SMPTE (default)."); /** * Called on when we return from sending timecode data. */ void TimeCodeDone(ola::io::SelectServer *ss, const ola::client::Result &result) { if (!result.Success()) { OLA_WARN << result.Error(); } ss->Terminate(); } /* * Main */ int main(int argc, char *argv[]) { ola::AppInit( &argc, argv, "[options] ", "Send TimeCode data to OLA. time_code is in the form: \n" "Hours:Minutes:Seconds:Frames"); ola::client::OlaClientWrapper ola_client; if (argc != 2) ola::DisplayUsageAndExit(); ola::timecode::TimeCodeType time_code_type = ola::timecode::TIMECODE_SMPTE; if (!FLAGS_format.str().empty()) { string type = FLAGS_format; ola::ToLower(&type); if (type == "film") { time_code_type = ola::timecode::TIMECODE_FILM; } else if (type == "ebu") { time_code_type = ola::timecode::TIMECODE_EBU; } else if (type == "df") { time_code_type = ola::timecode::TIMECODE_DF; } else if (type == "smpte") { time_code_type = ola::timecode::TIMECODE_SMPTE; } else { cerr << "Invalid TimeCode format " << type << endl; exit(ola::EXIT_USAGE); } } vector tokens; ola::StringSplit(argv[1], &tokens, ":"); if (tokens.size() != 4) { cerr << "Invalid TimeCode value " << argv[1] << endl; exit(ola::EXIT_USAGE); } uint8_t hours, minutes, seconds, frames; if (!StringToInt(tokens[0], &hours, true)) { cerr << "Invalid TimeCode hours " << tokens[0] << endl; exit(ola::EXIT_USAGE); } if (!StringToInt(tokens[1], &minutes, true)) { cerr << "Invalid TimeCode minutes " << tokens[1] << endl; exit(ola::EXIT_USAGE); } if (!StringToInt(tokens[2], &seconds, true)) { cerr << "Invalid TimeCode seconds " << tokens[2] << endl; exit(ola::EXIT_USAGE); } if (!StringToInt(tokens[3], &frames, true)) { cerr << "Invalid TimeCode frames " << tokens[3] << endl; exit(ola::EXIT_USAGE); } TimeCode timecode(time_code_type, hours, minutes, seconds, frames); if (!timecode.IsValid()) { OLA_FATAL << "Invalid TimeCode value"; exit(ola::EXIT_USAGE); } if (!ola_client.Setup()) { OLA_FATAL << "Setup failed"; exit(ola::EXIT_UNAVAILABLE); } ola_client.GetClient()->SendTimeCode( timecode, ola::NewSingleCallback(&TimeCodeDone, ola_client.GetSelectServer())); ola_client.GetSelectServer()->Run(); return ola::EXIT_OK; } ola-0.10.9/examples/ola-usbpro.cpp0000664000175000017500000001527614376533110013722 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-usbpro.cpp * Configure Enttec USB Pro Devices managed by OLA * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include #include #include "examples/OlaConfigurator.h" using std::cerr; using std::cout; using std::endl; using std::string; DECLARE_int32(device); DEFINE_s_default_bool(assignments, a, false, "Get the port assignments."); DEFINE_s_int32(brk, b, -1, "Set the break time (9 - 127)."); DEFINE_s_default_bool(get_params, g, false, "Get the current parameters."); DEFINE_s_int32(mab, m, -1, "Set the make after-break-time (1 - 127)."); DEFINE_s_int32(port, p, -1, "The port to configure."); DEFINE_s_int32(rate, r, -1, "Set the transmission rate (1 - 40)."); DEFINE_s_default_bool(serial, s, false, "Get the serial number."); /* * A class which configures UsbPro devices. */ class UsbProConfigurator: public OlaConfigurator { public: UsbProConfigurator() : OlaConfigurator(FLAGS_device, ola::OLA_PLUGIN_USBPRO) {} void HandleConfigResponse(const string &reply, const string &error); void SendConfigRequest(); bool SendParametersRequest(); bool SendSerialRequest(); bool SendPortAssignmentRequest(); private: void DisplayParameters(const ola::plugin::usbpro::ParameterReply &reply); void DisplaySerial(const ola::plugin::usbpro::SerialNumberReply &reply); void DisplayPortAssignment( const ola::plugin::usbpro::PortAssignmentReply &reply); }; /* * Handle the device config reply */ void UsbProConfigurator::HandleConfigResponse(const string &reply, const string &error) { Terminate(); if (!error.empty()) { cerr << error << endl; return; } ola::plugin::usbpro::Reply reply_pb; if (!reply_pb.ParseFromString(reply)) { cout << "Protobuf parsing failed" << endl; return; } if (reply_pb.type() == ola::plugin::usbpro::Reply::USBPRO_PARAMETER_REPLY && reply_pb.has_parameters()) { DisplayParameters(reply_pb.parameters()); return; } else if (reply_pb.type() == ola::plugin::usbpro::Reply::USBPRO_SERIAL_REPLY && reply_pb.has_serial_number()) { DisplaySerial(reply_pb.serial_number()); return; } else if (reply_pb.type() == ola::plugin::usbpro::Reply::USBPRO_PORT_ASSIGNMENT_REPLY && reply_pb.has_port_assignment()) { DisplayPortAssignment(reply_pb.port_assignment()); return; } cout << "Invalid response type or missing options field" << endl; } /* * Send the appropriate ConfigRequest */ void UsbProConfigurator::SendConfigRequest() { if (FLAGS_serial) { SendSerialRequest(); } else if (FLAGS_assignments) { SendPortAssignmentRequest(); } else { // Also FLAGS_get_params SendParametersRequest(); } } /* * Send a get parameters request */ bool UsbProConfigurator::SendParametersRequest() { ola::plugin::usbpro::Request request; request.set_type(ola::plugin::usbpro::Request::USBPRO_PARAMETER_REQUEST); ola::plugin::usbpro::ParameterRequest *parameter_request = request.mutable_parameters(); parameter_request->set_port_id(FLAGS_port); if (FLAGS_brk.present()) { parameter_request->set_break_time(FLAGS_brk); } if (FLAGS_mab.present()) { parameter_request->set_mab_time(FLAGS_mab); } if (FLAGS_rate.present()) { parameter_request->set_rate(FLAGS_rate); } return SendMessage(request); } /* * Send a get serial request */ bool UsbProConfigurator::SendSerialRequest() { ola::plugin::usbpro::Request request; request.set_type(ola::plugin::usbpro::Request::USBPRO_SERIAL_REQUEST); return SendMessage(request); } /* * Send a get port assignment request */ bool UsbProConfigurator::SendPortAssignmentRequest() { ola::plugin::usbpro::Request request; request.set_type( ola::plugin::usbpro::Request::USBPRO_PORT_ASSIGNMENT_REQUEST); return SendMessage(request); } /* * Display the widget parameters */ void UsbProConfigurator::DisplayParameters( const ola::plugin::usbpro::ParameterReply &reply) { cout << "Device: " << m_alias << endl; cout << "Firmware: " << reply.firmware_high() << "." << reply.firmware() << endl; cout << "Break Time: " << reply.break_time() * 10.67 << "us" << endl; cout << "MAB Time: " << reply.mab_time() * 10.67 << "us" << endl; cout << "Packet Rate: " << reply.rate() << " packets/sec" << endl; } /* * Display the serial number */ void UsbProConfigurator::DisplaySerial( const ola::plugin::usbpro::SerialNumberReply &reply) { string serial_number = reply.serial(); cout << "Device: " << m_alias << endl; cout << "Serial: " << reply.serial() << endl; } /* * Display the port assignments */ void UsbProConfigurator::DisplayPortAssignment( const ola::plugin::usbpro::PortAssignmentReply &reply) { cout << "Device: " << m_alias << endl; cout << "Port 1: " << reply.port_assignment1() << endl; cout << "Port 2: " << reply.port_assignment2() << endl; } /* * The main function */ int main(int argc, char *argv[]) { ola::AppInit( &argc, argv, "-d [--serial | -p --g | -p -b -m -r " "]", "Configure Enttec USB Pro Devices managed by OLA."); if (FLAGS_device < 0) { ola::DisplayUsageAndExit(); } // check for valid parameters if (FLAGS_brk.present() && (FLAGS_brk < 9 || FLAGS_brk > 127)) { ola::DisplayUsageAndExit(); } if (FLAGS_mab.present() && (FLAGS_mab < 1 || FLAGS_mab > 127)) { ola::DisplayUsageAndExit(); } if (FLAGS_rate.present() && (FLAGS_rate < 1 || FLAGS_rate > 40)) { ola::DisplayUsageAndExit(); } if ((FLAGS_get_params || (!FLAGS_assignments && !FLAGS_serial)) && (FLAGS_port < 0)) { ola::DisplayUsageAndExit(); } UsbProConfigurator configurator; if (!configurator.Setup()) { cerr << "Error: " << strerror(errno) << endl; exit(1); } configurator.Run(); return 0; } ola-0.10.9/examples/ola-uni-stats.cpp0000664000175000017500000001636614376533110014340 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-uni-stats.cpp * Display some simple universe stats. * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using ola::DmxBuffer; using ola::OlaCallbackClientWrapper; using ola::StringToInt; using ola::TimeInterval; using ola::TimeStamp; using ola::io::SelectServer; using std::cerr; using std::cout; using std::endl; using std::setw; using std::string; using std::vector; class UniverseTracker { public: UniverseTracker(OlaCallbackClientWrapper *wrapper, const vector &universes); ~UniverseTracker() {} bool Run(); void Stop() { m_wrapper->GetSelectServer()->Terminate(); } void PrintStats(); void ResetStats(); protected: void Input(int c); private: struct UniverseStats { public: uint16_t shortest_frame; uint16_t longest_frame; uint64_t frame_count; uint64_t frame_changes; DmxBuffer frame_data; UniverseStats() { Reset(); } void Reset() { shortest_frame = ola::DMX_UNIVERSE_SIZE + 1, longest_frame = 0; frame_count = 0; frame_changes = 0; } }; typedef std::map UniverseStatsMap; UniverseStatsMap m_stats; ola::TimeStamp m_start_time; OlaCallbackClientWrapper *m_wrapper; ola::io::StdinHandler m_stdin_handler; ola::Clock m_clock; void UniverseData(unsigned int universe, const DmxBuffer &dmx, const string &error); void RegisterComplete(const string &error); }; UniverseTracker::UniverseTracker(OlaCallbackClientWrapper *wrapper, const vector &universes) : m_wrapper(wrapper), m_stdin_handler(wrapper->GetSelectServer(), ola::NewCallback(this, &UniverseTracker::Input)) { // set callback m_wrapper->GetClient()->SetDmxCallback( ola::NewCallback(this, &UniverseTracker::UniverseData)); vector::const_iterator iter = universes.begin(); for (; iter != universes.end(); ++iter) { struct UniverseStats stats; m_stats[*iter] = stats; // register here m_wrapper->GetClient()->RegisterUniverse( *iter, ola::REGISTER, ola::NewSingleCallback(this, &UniverseTracker::RegisterComplete)); } } bool UniverseTracker::Run() { m_clock.CurrentMonotonicTime(&m_start_time); m_wrapper->GetSelectServer()->Run(); return true; } void UniverseTracker::PrintStats() { UniverseStatsMap::iterator iter = m_stats.begin(); TimeStamp now; m_clock.CurrentMonotonicTime(&now); TimeInterval interval = now - m_start_time; OLA_INFO << "Time delta was " << interval; for (; iter != m_stats.end(); ++iter) { const UniverseStats stats = iter->second; float fps = 0.0; if (interval.Seconds() > 0) fps = static_cast(stats.frame_count) / interval.Seconds(); cout << "Universe " << iter->first << endl; cout << " Frames Received: " << stats.frame_count << ", Frames/sec: " << fps << endl; cout << " Frame changes: " << stats.frame_changes << endl; cout << " Smallest Frame: "; if (stats.shortest_frame == ola::DMX_UNIVERSE_SIZE + 1) cout << "N/A"; else cout << stats.shortest_frame; cout << ", Largest Frame: "; if (stats.longest_frame == 0) cout << "N/A"; else cout << stats.longest_frame; cout << endl; cout << "------------------------------" << endl; } } void UniverseTracker::ResetStats() { m_clock.CurrentMonotonicTime(&m_start_time); UniverseStatsMap::iterator iter = m_stats.begin(); for (; iter != m_stats.end(); ++iter) { iter->second.Reset(); } cout << "Reset counters" << endl; } void UniverseTracker::Input(int c) { switch (c) { case 'q': m_wrapper->GetSelectServer()->Terminate(); break; case 'p': PrintStats(); break; case 'r': ResetStats(); break; default: break; } } void UniverseTracker::UniverseData(unsigned int universe, const DmxBuffer &dmx, const string &error) { if (!error.empty()) { OLA_WARN << error; return; } UniverseStatsMap::iterator iter = m_stats.find(universe); if (iter == m_stats.end()) { OLA_WARN << "Received data for unknown universe " << universe; return; } if (dmx.Size() < iter->second.shortest_frame) iter->second.shortest_frame = dmx.Size(); if (dmx.Size() > iter->second.longest_frame) iter->second.longest_frame = dmx.Size(); iter->second.frame_count++; DmxBuffer &last_dmx = iter->second.frame_data; if (last_dmx.Size() == 0) { // this is the first frame last_dmx.Set(dmx); } else { if (last_dmx.Size() != dmx.Size() || last_dmx != dmx) { // the frame changed iter->second.frame_changes++; last_dmx.Set(dmx); } } } void UniverseTracker::RegisterComplete(const string &error) { if (!error.empty()) OLA_WARN << "Register command failed with " << errno; } SelectServer *ss = NULL; static void InteruptSignal(OLA_UNUSED int signo) { int old_errno = errno; if (ss) { ss->Terminate(); } errno = old_errno; } /* * Main */ int main(int argc, char *argv[]) { ola::AppInit( &argc, argv, "[options] ...", "Watch one or more universes and produce stats on DMX frame rates."); vector universes; for (int i = 1; i < argc; i++) { unsigned int universe; if (!StringToInt(argv[i], &universe, true)) { cerr << "Invalid Universe " << argv[i] << endl; exit(ola::EXIT_USAGE); } universes.push_back(universe); } if (universes.size() <= 0) { ola::DisplayUsageAndExit(); } ola::OlaCallbackClientWrapper ola_client; if (!ola_client.Setup()) { OLA_FATAL << "Setup failed"; exit(ola::EXIT_UNAVAILABLE); } ss = ola_client.GetSelectServer(); UniverseTracker tracker(&ola_client, universes); ola::InstallSignal(SIGINT, InteruptSignal); cout << "Actions:" << endl; cout << " p - Print stats" << endl; cout << " q - Quit" << endl; cout << " r - Reset stats" << endl; bool r = tracker.Run(); if (r) tracker.PrintStats(); return r; } ola-0.10.9/examples/OlaConfigurator.h0000664000175000017500000000564314376533110014377 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * OlaConfigurator.h * Makes configuring devices easy * Copyright (C) 2005 Simon Newton * * The Configurator makes it easy to use the device specific ConfigureDevice() * rpc. For each device type you want to manage, subclass the Configurator and * implement the SendConfigRequest() and HandleConfigResponse() methods. * Upon calling Setup() the Configurator will send a DeviceInfo * request to check that the device type matches the plugin_id given in the * constructor. On successful match, it will call SendConfigRequest() which * the subclass uses to send the desired request. * * Once the response is returned, HandleConfigResponse() is called in the * subclass. */ #include #include #include #include #include #include #include #ifndef EXAMPLES_OLACONFIGURATOR_H_ #define EXAMPLES_OLACONFIGURATOR_H_ class OlaConfigurator; /** * Inherit from this and implement HandleResponse() */ class OlaConfigurator { public: /** * @param device_id the device id to configure * @param plugin_id the expected plugin id for this device */ OlaConfigurator(unsigned int device_id, ola::ola_plugin_id plugin_id) : m_alias(device_id), m_plugin_id(plugin_id), m_client_wrapper(NULL), m_client(NULL), m_ss(NULL) {} virtual ~OlaConfigurator(); /** * Setup the configurator */ bool Setup(); void Run() { m_ss->Run(); } void Terminate() { m_ss->Terminate(); } void HandleDevices(const std::vector &devices, const std::string &error); bool SendMessage(const google::protobuf::Message &message); // Subclasses implement this virtual void HandleConfigResponse(const std::string &reply, const std::string &error) = 0; virtual void SendConfigRequest() = 0; protected: unsigned int m_alias; ola::ola_plugin_id m_plugin_id; private: ola::OlaCallbackClientWrapper *m_client_wrapper; ola::OlaCallbackClient *m_client; ola::io::SelectServer *m_ss; }; #endif // EXAMPLES_OLACONFIGURATOR_H_ ola-0.10.9/examples/ola-client.cpp0000664000175000017500000006257414376533110013671 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-client.cpp * The multi purpose ola client. * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using ola::NewSingleCallback; using ola::client::OlaClient; using ola::client::OlaClientWrapper; using ola::client::OlaDevice; using ola::client::OlaInputPort; using ola::client::OlaOutputPort; using ola::client::OlaPlugin; using ola::client::OlaUniverse; using ola::client::Result; using ola::io::SelectServer; using std::cerr; using std::cout; using std::endl; using std::setw; using std::string; using std::vector; static const int INVALID_VALUE = -1; /* * The mode is determined by the name in which we were called */ typedef enum { DEVICE_INFO, DEVICE_PATCH, PLUGIN_INFO, PLUGIN_STATE, UNIVERSE_INFO, UNIVERSE_NAME, UNI_MERGE, SET_DMX, SET_PORT_PRIORITY, } mode; typedef struct { mode m; // mode int uni; // universe id unsigned int plugin_id; // plugin id bool help; // show the help int device_id; // device id int port_id; // port id ola::client::PortDirection port_direction; // input or output ola::client::PatchAction patch_action; // patch or unpatch OlaUniverse::merge_mode merge_mode; // the merge mode string cmd; // argv[0] string uni_name; // universe name string dmx; // DMX string ola::port_priority_mode priority_mode; // port priority mode uint8_t priority_value; // port priority value bool list_plugin_ids; bool list_universe_ids; string state; // plugin enable/disable state } options; /** * A Helper function to display a list of ports */ template void ListPorts(const vector &ports, bool input) { typename vector::const_iterator port_iter; for (port_iter = ports.begin(); port_iter != ports.end(); ++port_iter) { cout << " port " << port_iter->Id() << ", "; if (input) { cout << "IN"; } else { cout << "OUT"; } if (!port_iter->Description().empty()) { cout << " " << port_iter->Description(); } switch (port_iter->PriorityCapability()) { case ola::CAPABILITY_STATIC: cout << ", priority " << static_cast(port_iter->Priority()); break; case ola::CAPABILITY_FULL: cout << ", priority "; if (port_iter->PriorityMode() == ola::PRIORITY_MODE_INHERIT) { cout << "inherited"; } else { cout << "override " << static_cast(port_iter->Priority()); } break; default: break; } if (port_iter->IsActive()) { cout << ", patched to universe " << port_iter->Universe(); } if (port_iter->SupportsRDM()) { cout << ", RDM supported"; } cout << endl; } } /* * This is called when we receive universe results from the client * @param list_ids_only show ids only * @param universes a vector of OlaUniverses */ void DisplayUniverses(SelectServer *ss, bool list_ids_only, const Result &result, const vector &universes) { vector::const_iterator iter; if (!result.Success()) { cerr << result.Error() << endl; ss->Terminate(); return; } if (list_ids_only) { for (iter = universes.begin(); iter != universes.end(); ++iter) { cout << iter->Id() << endl; } } else { cout << setw(5) << "Id" << "\t" << setw(30) << "Name" << "\t\tMerge Mode" << endl; cout << "----------------------------------------------------------" << endl; for (iter = universes.begin(); iter != universes.end(); ++iter) { cout << setw(5) << iter->Id() << "\t" << setw(30) << iter->Name() << "\t\t" << (iter->MergeMode() == OlaUniverse::MERGE_HTP ? "HTP" : "LTP") << endl; } cout << "----------------------------------------------------------" << endl; } ss->Terminate(); } /* * @param list_ids_only show ids only * @params plugins a vector of OlaPlugins */ void DisplayPlugins(SelectServer *ss, bool list_ids_only, const Result &result, const vector &plugins) { vector::const_iterator iter; if (!result.Success()) { cerr << result.Error() << endl; ss->Terminate(); return; } if (list_ids_only) { for (iter = plugins.begin(); iter != plugins.end(); ++iter) { cout << iter->Id() << endl; } } else { cout << setw(5) << "Id" << "\tPlugin Name" << endl; cout << "--------------------------------------" << endl; for (iter = plugins.begin(); iter != plugins.end(); ++iter) { cout << setw(5) << iter->Id() << "\t" << iter->Name() << endl; } cout << "--------------------------------------" << endl; } ss->Terminate(); } /* * Print a plugin description */ void DisplayPluginDescription(SelectServer *ss, const Result &result, const string &description) { if (!result.Success()) { cerr << result.Error() << endl; } else { cout << description << endl; } ss->Terminate(); return; } /* * Print a plugin state */ void DisplayPluginState(SelectServer *ss, const Result &result, const ola::client::PluginState &state) { if (!result.Success()) { cerr << result.Error() << endl; } else { cout << state.name << endl; cout << "Enabled: " << (state.enabled ? "True" : "False") << endl; cout << "Active: " << (state.active ? "True" : "False") << endl; vector::const_iterator iter = state.conflicting_plugins.begin(); cout << "Conflicts with:" << endl; for (; iter != state.conflicting_plugins.end(); ++iter) { cout << " " << iter->Name() << "(" << iter->Id() << ")" << endl; } } ss->Terminate(); return; } /* * @param devices a vector of OlaDevices */ void DisplayDevices(SelectServer *ss, const Result &result, const vector &devices) { vector::const_iterator iter; if (!result.Success()) { cerr << result.Error() << endl; ss->Terminate(); return; } for (iter = devices.begin(); iter != devices.end(); ++iter) { cout << "Device " << iter->Alias() << ": " << iter->Name() << endl; vector input_ports = iter->InputPorts(); ListPorts(input_ports, true); vector output_ports = iter->OutputPorts(); ListPorts(output_ports, false); } ss->Terminate(); } /* * Called when a generic set command completes */ void HandleAck(SelectServer *ss, const Result &result) { if (!result.Success()) { cerr << result.Error() << endl; } ss->Terminate(); } /* * Init options */ void InitOptions(options *opts) { opts->m = DEVICE_INFO; opts->uni = INVALID_VALUE; opts->plugin_id = ola::OLA_PLUGIN_ALL; opts->help = false; opts->list_plugin_ids = false; opts->list_universe_ids = false; opts->patch_action = ola::client::PATCH; opts->port_id = INVALID_VALUE; opts->port_direction = ola::client::OUTPUT_PORT; opts->device_id = INVALID_VALUE; opts->merge_mode = OlaUniverse::MERGE_HTP; opts->priority_mode = ola::PRIORITY_MODE_INHERIT; opts->priority_value = 0; } /* * Decide what mode we're running in */ void SetMode(options *opts) { string cmd_name = ola::file::FilenameFromPathOrPath(opts->cmd); // To skip the lt prefix during development ola::StripPrefix(&cmd_name, "lt-"); #ifdef _WIN32 // Strip the extension size_t extension = cmd_name.find("."); if (extension != string::npos) { cmd_name = cmd_name.substr(0, extension); } #endif // _WIN32 if (cmd_name == "ola_plugin_info") { opts->m = PLUGIN_INFO; } else if (cmd_name == "ola_plugin_state") { opts->m = PLUGIN_STATE; } else if (cmd_name == "ola_patch") { opts->m = DEVICE_PATCH; } else if (cmd_name == "ola_ptch") { // Working around Windows UAC opts->m = DEVICE_PATCH; } else if (cmd_name == "ola_uni_info") { opts->m = UNIVERSE_INFO; } else if (cmd_name == "ola_uni_name") { opts->m = UNIVERSE_NAME; } else if (cmd_name == "ola_uni_merge") { opts->m = UNI_MERGE; } else if (cmd_name == "ola_set_dmx") { opts->m = SET_DMX; } else if (cmd_name == "ola_set_priority") { opts->m = SET_PORT_PRIORITY; } } /* * parse our cmd line options */ void ParseOptions(int argc, char *argv[], options *opts) { enum { LIST_PLUGIN_IDS_OPTION = 256, LIST_UNIVERSE_IDS_OPTION, }; static struct option long_options[] = { {"dmx", required_argument, 0, 'd'}, {"help", no_argument, 0, 'h'}, {"ltp", no_argument, 0, 'l'}, {"name", required_argument, 0, 'n'}, {"plugin-id", required_argument, 0, 'p'}, {"state", required_argument, 0, 's'}, {"list-plugin-ids", no_argument, 0, LIST_PLUGIN_IDS_OPTION}, {"list-universe-ids", no_argument, 0, LIST_UNIVERSE_IDS_OPTION}, {"universe", required_argument, 0, 'u'}, {0, 0, 0, 0} }; int c; int option_index = 0; while (1) { c = getopt_long(argc, argv, "ld:n:u:p:s:hv", long_options, &option_index); if (c == -1) break; switch (c) { case 0: break; case 'd': opts->dmx = optarg; break; case 'h': opts->help = true; break; case 'l': opts->merge_mode = OlaUniverse::MERGE_LTP; break; case 'n': opts->uni_name = optarg; break; case 'p': opts->plugin_id = atoi(optarg); break; case 's': opts->state = optarg; break; case 'u': opts->uni = atoi(optarg); break; case LIST_PLUGIN_IDS_OPTION: opts->list_plugin_ids = true; break; case LIST_UNIVERSE_IDS_OPTION: opts->list_universe_ids = true; break; case '?': break; default: break; } } } /* * parse our cmd line options for the patch command */ int ParsePatchOptions(int argc, char *argv[], options *opts) { static struct option long_options[] = { {"device", required_argument, 0, 'd'}, {"help", no_argument, 0, 'h'}, {"input", no_argument, 0, 'i'}, {"patch", no_argument, 0, 'a'}, {"port", required_argument, 0, 'p'}, {"universe", required_argument, 0, 'u'}, {"unpatch", no_argument, 0, 'r'}, {0, 0, 0, 0} }; int c; int option_index = 0; while (1) { c = getopt_long(argc, argv, "ard:p:u:hi", long_options, &option_index); if (c == -1) { break; } switch (c) { case 0: break; case 'a': opts->patch_action = ola::client::PATCH; break; case 'd': opts->device_id = atoi(optarg); break; case 'p': opts->port_id = atoi(optarg); break; case 'r': opts->patch_action = ola::client::UNPATCH; break; case 'u': opts->uni = atoi(optarg); break; case 'h': opts->help = true; break; case 'i': opts->port_direction = ola::client::INPUT_PORT; break; case '?': break; default: break; } } return 0; } /* * parse our cmd line options for the set priority command */ int ParseSetPriorityOptions(int argc, char *argv[], options *opts) { static struct option long_options[] = { {"device", required_argument, 0, 'd'}, {"help", no_argument, 0, 'h'}, {"input", no_argument, 0, 'i'}, {"port", required_argument, 0, 'p'}, {"override", required_argument, 0, 'o'}, {0, 0, 0, 0} }; int c; int option_index = 0; while (1) { c = getopt_long(argc, argv, "d:p:o:hi", long_options, &option_index); if (c == -1) { break; } switch (c) { case 0: break; case 'd': opts->device_id = atoi(optarg); break; case 'h': opts->help = true; break; case 'i': opts->port_direction = ola::client::INPUT_PORT; break; case 'o': opts->priority_mode = ola::PRIORITY_MODE_STATIC; opts->priority_value = atoi(optarg); break; case 'p': opts->port_id = atoi(optarg); break; case '?': break; default: break; } } return 0; } /* * help message for device info */ void DisplayDeviceInfoHelp(const options &opts) { cout << "Usage: " << opts.cmd << " [--plugin-id ]\n" "\n" "Show information on the devices loaded by olad.\n" "\n" " -h, --help Display this help message and exit.\n" " -p, --plugin-id Show only devices owned by this " "plugin.\n" << endl; } /* * Display the Patch help */ void DisplayPatchHelp(const options &opts) { cout << "Usage: " << opts.cmd << " [--patch | --unpatch] --device --port " "[--universe ]\n" "\n" "Control ola port <-> universe mappings.\n" "\n" " -a, --patch Patch this port (default).\n" " -d, --device Id of device to patch.\n" " -h, --help Display this help message and exit.\n" " -p, --port Id of the port to patch.\n" " -r, --unpatch Unpatch this port.\n" " -i, --input Patch the input port (default is " "output).\n" " -u, --universe Id of the universe to patch to (default " "0).\n" << endl; } /* * help message for plugin info */ void DisplayPluginInfoHelp(const options &opts) { cout << "Usage: " << opts.cmd << " [--plugin-id ]\n" "\n" "Get info on the plugins loaded by olad. Called without arguments" " this will\n" "display the plugins loaded by olad. When used with --plugin-id this" " will\n" "display the specified plugin's description.\n" "\n" " -h, --help Display this help message and exit.\n" " -p, --plugin-id Id of the plugin to fetch the " "description of\n" " --list-plugin-ids List plugin Ids only.\n" << endl; } /* * help message for plugin state */ void DisplayPluginStateHelp(const options &opts) { cout << "Usage: " << opts.cmd << " --plugin-id [--state ]\n" "\n" "Displays the enabled/disabled state for a plugin and the list of " "plugins\n" "this plugin will conflict with.\n" "\n" " -h, --help Display this help message and exit.\n" " -p, --plugin-id Id of the plugin to fetch the state " "of\n" " -s, --state State to set a plugin to\n" << endl; } /* * help message for uni info */ void DisplayUniverseInfoHelp(const options &opts) { cout << "Usage: " << opts.cmd << "\n" "Shows info on the active universes in use.\n" "\n" " -h, --help Display this help message and exit.\n" " --list-universe-ids List universe Ids only.\n" << endl; } /* * Help message for set uni name */ void DisplayUniverseNameHelp(const options &opts) { cout << "Usage: " << opts.cmd << " --name --universe \n" "\n" "Set a name for the specified universe\n" "\n" " -h, --help Display this help message and exit.\n" " -n, --name Name for the universe.\n" " -u, --universe Id of the universe to name.\n" << endl; } /* * Help message for set uni merge mode */ void DisplayUniverseMergeHelp(const options &opts) { cout << "Usage: " << opts.cmd << " --universe [--ltp]\n" "\n" "Change the merge mode for the specified universe. Without --ltp " "it will\n" "revert to HTP mode.\n" "\n" " -h, --help Display this help message and exit.\n" " -l, --ltp Change to LTP mode.\n" " -u, --universe Id of the universe to change.\n" << endl; } /* * Help message for set dmx */ void DisplaySetDmxHelp(const options &opts) { cout << "Usage: " << opts.cmd << " --universe --dmx \n" "\n" "Sets the DMX values for a universe.\n" "\n" " -h, --help Display this help message and exit.\n" " -u, --universe Universe number, e.g. 0.\n" " -d, --dmx Comma separated DMX values, e.g. " "0,255,128 sets first channel to 0, second channel to 255" " and third channel to 128.\n" << endl; } /* * Display the Patch help */ void DisplaySetPriorityHelp(const options &opts) { cout << "Usage: " << opts.cmd << " --device --port [--override ]\n" "\n" "Set a port's priority, without the --override flag this will set " "the port\n" " to inherit mode.\n" "\n" " -d, --device Id of device to set priority for.\n" " -h, --help Display this help message and exit.\n" " -i, --input Set an input port\n" " -o, --override Set the port priority to a static " "value.\n" " -p, --port Id of the port to set priority for.\n" << endl; } /* * Display the help message */ void DisplayHelpAndExit(const options &opts) { switch (opts.m) { case DEVICE_INFO: DisplayDeviceInfoHelp(opts); break; case DEVICE_PATCH: DisplayPatchHelp(opts); break; case PLUGIN_INFO: DisplayPluginInfoHelp(opts); break; case PLUGIN_STATE: DisplayPluginStateHelp(opts); break; case UNIVERSE_INFO: DisplayUniverseInfoHelp(opts); break; case UNIVERSE_NAME: DisplayUniverseNameHelp(opts); break; case UNI_MERGE: DisplayUniverseMergeHelp(opts); break; case SET_DMX: DisplaySetDmxHelp(opts); break; case SET_PORT_PRIORITY: DisplaySetPriorityHelp(opts); } exit(0); } /* * Send a fetch device info request * @param client the ola client * @param opts the const options */ int FetchDeviceInfo(OlaClientWrapper *wrapper, const options &opts) { SelectServer *ss = wrapper->GetSelectServer(); OlaClient *client = wrapper->GetClient(); client->FetchDeviceInfo((ola::ola_plugin_id) opts.plugin_id, NewSingleCallback(&DisplayDevices, ss)); return 0; } void Patch(OlaClientWrapper *wrapper, const options &opts) { SelectServer *ss = wrapper->GetSelectServer(); OlaClient *client = wrapper->GetClient(); if (opts.device_id == INVALID_VALUE || opts.port_id == INVALID_VALUE) { DisplayPatchHelp(opts); exit(1); } if (opts.patch_action == ola::client::PATCH && opts.uni == INVALID_VALUE) { DisplayPatchHelp(opts); exit(1); } client->Patch(opts.device_id, opts.port_id, opts.port_direction, opts.patch_action, opts.uni, NewSingleCallback(&HandleAck, ss)); } /* * Fetch information on plugins. */ int FetchPluginInfo(OlaClientWrapper *wrapper, const options &opts) { SelectServer *ss = wrapper->GetSelectServer(); OlaClient *client = wrapper->GetClient(); if (opts.plugin_id > 0) { client->FetchPluginDescription( (ola::ola_plugin_id) opts.plugin_id, NewSingleCallback(&DisplayPluginDescription, ss)); } else { client->FetchPluginList( NewSingleCallback(&DisplayPlugins, ss, opts.list_plugin_ids)); } return 0; } /* * Fetch the state of a plugin. */ int FetchPluginState(OlaClientWrapper *wrapper, const options &opts) { SelectServer *ss = wrapper->GetSelectServer(); OlaClient *client = wrapper->GetClient(); if (opts.plugin_id == 0) { DisplayPluginStateHelp(opts); exit(1); } if (!opts.state.empty()) { bool state; if (ola::StringToBoolTolerant(opts.state, &state)) { cout << "Setting state to " << (state ? "enabled" : "disabled") << endl; client->SetPluginState( (ola::ola_plugin_id) opts.plugin_id, state, NewSingleCallback(&HandleAck, ss)); } else { cerr << "Invalid state: " << opts.state << endl; DisplayPluginStateHelp(opts); exit(1); } } else { client->FetchPluginState((ola::ola_plugin_id) opts.plugin_id, NewSingleCallback(&DisplayPluginState, ss)); } return 0; } /* * send a set name request * @param client the ola client * @param opts the const options */ int SetUniverseName(OlaClientWrapper *wrapper, const options &opts) { SelectServer *ss = wrapper->GetSelectServer(); OlaClient *client = wrapper->GetClient(); if (opts.uni == INVALID_VALUE) { DisplayUniverseNameHelp(opts); exit(1); } client->SetUniverseName(opts.uni, opts.uni_name, NewSingleCallback(&HandleAck, ss)); return 0; } /* * send a set name request * @param client the ola client * @param opts the const options */ int SetUniverseMergeMode(OlaClientWrapper *wrapper, const options &opts) { SelectServer *ss = wrapper->GetSelectServer(); OlaClient *client = wrapper->GetClient(); if (opts.uni == INVALID_VALUE) { DisplayUniverseMergeHelp(opts); exit(1); } client->SetUniverseMergeMode( opts.uni, opts.merge_mode, NewSingleCallback(&HandleAck, ss)); return 0; } /* * Send a DMX message * @param client the ola client * @param opts the options */ int SendDmx(OlaClientWrapper *wrapper, const options &opts) { SelectServer *ss = wrapper->GetSelectServer(); OlaClient *client = wrapper->GetClient(); ola::DmxBuffer buffer; bool status = buffer.SetFromString(opts.dmx); if (opts.uni < 0 || !status || buffer.Size() == 0) { DisplaySetDmxHelp(opts); exit(1); } ola::client::SendDMXArgs args(NewSingleCallback(&HandleAck, ss)); client->SendDMX(opts.uni, buffer, args); return 0; } /* * Set the priority of a port */ void SetPortPriority(OlaClientWrapper *wrapper, const options &opts) { SelectServer *ss = wrapper->GetSelectServer(); OlaClient *client = wrapper->GetClient(); if (opts.device_id == INVALID_VALUE || opts.port_id == INVALID_VALUE) { DisplaySetPriorityHelp(opts); exit(1); } if (opts.priority_mode == ola::PRIORITY_MODE_INHERIT) { client->SetPortPriorityInherit( opts.device_id, opts.port_id, opts.port_direction, NewSingleCallback(&HandleAck, ss)); } else if (opts.priority_mode == ola::PRIORITY_MODE_STATIC) { client->SetPortPriorityOverride( opts.device_id, opts.port_id, opts.port_direction, opts.priority_value, NewSingleCallback(&HandleAck, ss)); } else { DisplaySetPriorityHelp(opts); } } /* * Main */ int main(int argc, char *argv[]) { ola::InitLogging(ola::OLA_LOG_WARN, ola::OLA_LOG_STDERR); if (!ola::NetworkInit()) { OLA_WARN << "Network initialization failed." << endl; exit(ola::EXIT_UNAVAILABLE); } OlaClientWrapper ola_client; options opts; InitOptions(&opts); opts.cmd = argv[0]; // decide how we should behave SetMode(&opts); if (opts.m == DEVICE_PATCH) { ParsePatchOptions(argc, argv, &opts); } else if (opts.m == SET_PORT_PRIORITY) { ParseSetPriorityOptions(argc, argv, &opts); } else { ParseOptions(argc, argv, &opts); } if (opts.help) { DisplayHelpAndExit(opts); } if (!ola_client.Setup()) { OLA_FATAL << "Setup failed"; exit(1); } switch (opts.m) { case DEVICE_INFO: FetchDeviceInfo(&ola_client, opts); break; case DEVICE_PATCH: Patch(&ola_client, opts); break; case PLUGIN_INFO: FetchPluginInfo(&ola_client, opts); break; case PLUGIN_STATE: FetchPluginState(&ola_client, opts); break; case UNIVERSE_INFO: ola_client.GetClient()->FetchUniverseList( NewSingleCallback(&DisplayUniverses, ola_client.GetSelectServer(), opts.list_universe_ids)); break; case UNIVERSE_NAME: SetUniverseName(&ola_client, opts); break; case UNI_MERGE: SetUniverseMergeMode(&ola_client, opts); break; case SET_DMX: SendDmx(&ola_client, opts); break; case SET_PORT_PRIORITY: SetPortPriority(&ola_client, opts); } ola_client.GetSelectServer()->Run(); return 0; } ola-0.10.9/data/0000775000175000017500000000000014376533270010302 500000000000000ola-0.10.9/data/Makefile.mk0000664000175000017500000000007014376533110012256 00000000000000include data/rdm/Makefile.mk PYTHON_BUILD_DIRS += data ola-0.10.9/data/rdm/0000775000175000017500000000000014376533271011065 500000000000000ola-0.10.9/data/rdm/PidDataTest.cpp0000664000175000017500000000354414376533110013655 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PidDataTest.cpp * Ensure we can load the pid data. * Copyright (C) 2013 Simon Newton */ #include #include #include "ola/Logging.h" #include "ola/rdm/PidStore.h" #include "ola/testing/TestUtils.h" using ola::rdm::PidStore; using ola::rdm::RootPidStore; class PidDataTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(PidDataTest); CPPUNIT_TEST(testDataLoad); CPPUNIT_TEST_SUITE_END(); public: void setUp(); void testDataLoad(); }; CPPUNIT_TEST_SUITE_REGISTRATION(PidDataTest); void PidDataTest::setUp() { ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); } /* * Check we can load the data. */ void PidDataTest::testDataLoad() { std::auto_ptr store( RootPidStore::LoadFromDirectory(DATADIR)); OLA_ASSERT_NOT_NULL(store.get()); const PidStore *esta_store = store->EstaStore(); OLA_ASSERT_NOT_NULL(esta_store); OLA_ASSERT_NE(0, esta_store->PidCount()); const PidStore *manufacturer_store = store->ManufacturerStore(0x00a1); OLA_ASSERT_NOT_NULL(manufacturer_store); OLA_ASSERT_NE(0, manufacturer_store->PidCount()); } ola-0.10.9/data/rdm/manufacturer_pids.proto0000664000175000017500000050516314376533110015607 00000000000000manufacturer { manufacturer_id: 161 manufacturer_name: "Creative Lighting And Sound Systems Pty Ltd." pid { name: "DEVICE_MODE" value: 32768 get_request { } get_response { field { type: UINT8 name: "mode" label { value: 0 label: "DMX512" } label { value: 1 label: "DALI" } label { value: 2 label: "DSI" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "DMX512" } label { value: 1 label: "DALI" } label { value: 2 label: "DSI" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } manufacturer { manufacturer_id: 776 manufacturer_name: "ImageCue LLC" pid { name: "SERIAL_NUMBER" value: 32976 get_request { } get_response { field { type: UINT32 name: "serial_number" } } get_sub_device_range: ROOT_OR_SUBDEVICE } } manufacturer { manufacturer_id: 8377 manufacturer_name: "ARRI -- Arnold & Richter Cine Technik GmbH & Co. Betriebs KG" pid { name: "FAN_MODE" value: 32769 get_request { } get_response { field { type: UINT8 name: "fan_mode" label { value: 0 label: "FAN_OFF" } label { value: 1 label: "FAN_LOW" } label { value: 2 label: "FAN_HIGH" } label { value: 3 label: "FAN_AUTO_LOW" } label { value: 4 label: "FAN_AUTO_HIGH" } label { value: 5 label: "FAN_VARI" } label { value: 6 label: "FAN_PASS" } label { value: 7 label: "FAN_HI45" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "fan_mode" label { value: 0 label: "FAN_OFF" } label { value: 1 label: "FAN_LOW" } label { value: 2 label: "FAN_HIGH" } label { value: 3 label: "FAN_AUTO_LOW" } label { value: 4 label: "FAN_AUTO_HIGH" } label { value: 5 label: "FAN_VARI" } label { value: 6 label: "FAN_PASS" } label { value: 7 label: "FAN_HI45" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "STATUS_LEDS" value: 32770 get_request { } get_response { field { type: BOOL name: "disable_status_leds" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "disable_status_leds" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CCT_ADJUST" value: 32771 get_request { } get_response { field { type: INT32 name: "CCT_value" multiplier: -2 } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: INT32 name: "CCT_value" multiplier: -2 range { min: 280000 max: 1000000 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "GN_ADJUST" value: 32772 get_request { } get_response { field { type: INT32 name: "GN_value" multiplier: -2 } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: INT32 name: "GN_value" multiplier: -2 range { min: -100 max: 100 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DMX_SIGNAL_LOSS_MODE" value: 32773 get_request { } get_response { field { type: UINT8 name: "mode" label { value: 0 label: "HOLD" } label { value: 1 label: "HOLD_FOR_2_MINUTES" } label { value: 2 label: "BLACK_OUT" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "HOLD" } label { value: 1 label: "HOLD_FOR_2_MINUTES" } label { value: 2 label: "BLACK_OUT" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } manufacturer { manufacturer_id: 11720 manufacturer_name: "Stellascapes" pid { name: "MODEL_ID" value: 32770 get_request { } get_response { field { type: UINT16 name: "model_id" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "model_id" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "MODEL_ID_LIST" value: 32771 get_request { } get_response { field { type: GROUP name: "models" field { type: UINT16 name: "model_id" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "PIXEL_TYPE" value: 32773 get_request { } get_response { field { type: UINT16 name: "pixel_type" label { value: 1 label: "LPD8806" } label { value: 2 label: "WS2801" } label { value: 3 label: "P9813" } label { value: 4 label: "APA102" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "pixel_type" label { value: 1 label: "LPD8806" } label { value: 2 label: "WS2801" } label { value: 3 label: "P9813" } label { value: 4 label: "APA102" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PIXEL_COUNT" value: 32774 get_request { } get_response { field { type: UINT16 name: "pixel_count" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "pixel_count" range { min: 1 max: 65535 } } } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 13364 manufacturer_name: "Global Design Solutions, Ltd." pid { name: "LED_DRIVE_CURRENT" value: 32800 get_request { field { type: UINT8 name: "channel" range { min: 1 max: 4 } } } get_response { field { type: UINT8 name: "channel" range { min: 1 max: 4 } } field { type: UINT8 name: "value" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "channel" label { value: 255 label: "All" } range { min: 1 max: 4 } range { min: 255 max: 255 } } field { type: UINT8 name: "value" } } set_response { field { type: UINT8 name: "channel" label { value: 0 label: "All" } range { min: 0 max: 4 } } field { type: UINT8 name: "value" } } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SERIAL_NUMBER" value: 65503 get_request { } get_response { field { type: UINT32 name: "serial_number" } } get_sub_device_range: ROOT_OR_SUBDEVICE } } manufacturer { manufacturer_id: 16761 manufacturer_name: "AYRTON" pid { name: "DIMMER_MODE" value: 32769 get_request { } get_response { field { type: BOOL name: "dimmer_mode" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "dimmer_mode" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LIGHT_MODE" value: 32770 get_request { } get_response { field { type: BOOL name: "light_mode" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "light_mode" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CONSTANT_COLOR_MODES" value: 32771 get_request { } get_response { field { type: BOOL name: "constant_color_modes" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "constant_color_modes" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } manufacturer { manufacturer_id: 17232 manufacturer_name: "CLAY PAKY S.p.A" pid { name: "CP_DISPLAYON" value: 34048 get_request { } get_response { field { type: BOOL name: "display_on" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "display_on" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_FIXTID" value: 34304 get_request { } get_response { field { type: UINT8 name: "fixture_id" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "fixture_id" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_EVAN_RGBCMY" value: 34305 get_request { } get_response { field { type: BOOL name: "cmy_on" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "cmy_on" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_FIXWHEELSC" value: 34306 get_request { } get_response { field { type: BOOL name: "fix_wheel_shortcut" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "fix_wheel_shortcut" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_LAMPONDMX" value: 34307 get_request { } get_response { field { type: BOOL name: "lamp_on_dmx" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "lamp_on_dmx" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_ENCPT" value: 34308 get_request { } get_response { field { type: BOOL name: "enable_PanTilt_encoder" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "enable_PanTilt_encoder" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_PTSPEEDMODE" value: 34309 get_request { } get_response { field { type: UINT8 name: "PanTilt_Speed" label { value: 0 label: "Standard" } label { value: 1 label: "Fast" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "PanTilt_Speed" label { value: 0 label: "Standard" } label { value: 1 label: "Fast" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_DIMMERCURVE" value: 34310 get_request { } get_response { field { type: UINT8 name: "dimmer_curve" label { value: 0 label: "Curve 1 Conventional" } label { value: 1 label: "Curve 2 Linear" } label { value: 2 label: "Curve 3" } label { value: 3 label: "Curve 4" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "dimmer_curve" label { value: 0 label: "Curve 1 Conventional" } label { value: 1 label: "Curve 2 Linear" } label { value: 2 label: "Curve 3" } label { value: 3 label: "Curve 4" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_SILENTMODE" value: 34311 get_request { } get_response { field { type: UINT8 name: "silent_mode" label { value: 0 label: "Standard" } label { value: 1 label: "Quiet" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "silent_mode" label { value: 0 label: "Standard" } label { value: 1 label: "Quiet" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_SHUTTERONERR" value: 34312 get_request { } get_response { field { type: UINT8 name: "shutter_on_error" label { value: 0 label: "On" } label { value: 1 label: "Off" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "shutter_on_error" label { value: 0 label: "On" } label { value: 1 label: "Off" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_DIMMONSHUTTER" value: 34313 get_request { } get_response { field { type: UINT8 name: "close_dimmer_if_shutter_closed" label { value: 0 label: "On" } label { value: 1 label: "Off" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "close_dimmer_if_shutter_closed" label { value: 0 label: "On" } label { value: 1 label: "Off" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_POWERFANSMODE" value: 34314 get_request { } get_response { field { type: UINT8 name: "fan_power_mode" label { value: 0 label: "Full Fan Speed" } label { value: 1 label: "Low Fan Speed (reduced output)" } label { value: 2 label: "Auto Fan Speed" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "fan_power_mode" label { value: 0 label: "Full Fan Speed" } label { value: 1 label: "Low Fan Speed (reduced output)" } label { value: 2 label: "Auto Fan Speed" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_ARTNET_MODE" value: 34315 get_request { } get_response { field { type: UINT8 name: "control_protocol_artnet" label { value: 0 label: "Disabled" } label { value: 1 label: "Art-Net on IP 2.x.x.x" } label { value: 2 label: "Art-Net on IP 10.x.x.x" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "control_protocol_artnet" label { value: 0 label: "Disabled" } label { value: 1 label: "Art-Net on IP 2.x.x.x" } label { value: 2 label: "Art-Net on IP 10.x.x.x" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_NETREPEATDMX" value: 34316 get_request { } get_response { field { type: UINT8 name: "artnet_repeat_to_dmx" label { value: 0 label: "Disabled" } label { value: 1 label: "Enabled on primary" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "artnet_repeat_to_dmx" label { value: 0 label: "Disabled" } label { value: 1 label: "Enabled on primary" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_UNIVERSE" value: 34317 get_request { } get_response { field { type: UINT8 name: "artnet_universe" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "artnet_universe" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_AFAUTOSCALEOFF" value: 34318 get_request { } get_response { field { type: UINT8 name: "auto_focus_mode" label { value: 0 label: "Limited Zoom Range" } label { value: 1 label: "Complete Zoom Range" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "auto_focus_mode" label { value: 0 label: "Limited Zoom Range" } label { value: 1 label: "Complete Zoom Range" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_MCOLORADJUST" value: 34319 get_request { } get_response { field { type: UINT8 name: "macro_color_adjust" label { value: 0 label: "On" } label { value: 1 label: "Off" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "macro_color_adjust" label { value: 0 label: "On" } label { value: 1 label: "Off" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_MEFFRANDID" value: 34320 get_request { } get_response { field { type: UINT8 name: "scene_phase_displacement" label { value: 0 label: "Auto by DMX address" } range { min: 0 max: 255 } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "scene_phase_displacement" label { value: 0 label: "Auto by DMX address" } range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_MEFFDISTRIB" value: 34321 get_request { } get_response { field { type: UINT8 name: "number_of_projectors_in_macro" range { min: 2 max: 255 } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "number_of_projectors_in_macro" range { min: 2 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_EVANCURVEMODE" value: 34322 get_request { } get_response { field { type: UINT8 name: "color_mixing_curve" label { value: 0 label: "Curve 1" } label { value: 1 label: "Curve 2" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "color_mixing_curve" label { value: 0 label: "Curve 1" } label { value: 1 label: "Curve 2" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_PT_HOMING_SPEC" value: 34323 get_request { } get_response { field { type: UINT8 name: "pantilt_homing_sequence" label { value: 0 label: "Not Sequenced" } label { value: 1 label: "Sequenced" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "pantilt_homing_sequence" label { value: 0 label: "Not Sequenced" } label { value: 1 label: "Sequenced" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_PAN_HOME_ANGLE" value: 34324 get_request { } get_response { field { type: UINT8 name: "pan_homing_angle" label { value: 0 label: "0 Deg" } label { value: 1 label: "90 Deg" } label { value: 2 label: "180 Deg" } label { value: 3 label: "270 Deg" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "pan_homing_angle" label { value: 0 label: "0 Deg" } label { value: 1 label: "90 Deg" } label { value: 2 label: "180 Deg" } label { value: 3 label: "270 Deg" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_TILT_HOME_ANGLE" value: 34325 get_request { } get_response { field { type: UINT8 name: "tilt_homing_angle" label { value: 0 label: "0 Percent" } label { value: 1 label: "12.5 Percent" } label { value: 2 label: "25 Percent" } label { value: 3 label: "50 Percent" } label { value: 4 label: "75 Percent" } label { value: 5 label: "87.5 Percent" } label { value: 6 label: "100 Percent" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "tilt_homing_angle" label { value: 0 label: "0 Percent" } label { value: 1 label: "12.5 Percent" } label { value: 2 label: "25 Percent" } label { value: 3 label: "50 Percent" } label { value: 4 label: "75 Percent" } label { value: 5 label: "87.5 Percent" } label { value: 6 label: "100 Percent" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_CWHEEL_LINEAR" value: 34326 get_request { } get_response { field { type: UINT8 name: "color_wheel_linear" label { value: 0 label: "On" } label { value: 1 label: "Off" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "color_wheel_linear" label { value: 0 label: "On" } label { value: 1 label: "Off" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_ANTI_BLIND" value: 34327 get_request { } get_response { field { type: BOOL name: "anti_blind" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "color_wheel_linear" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_PIXELS_UNIVERSE" value: 34328 get_request { } get_response { field { type: UINT8 name: "pixel_engine_artnet_universe" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "pixel_engine_artnet_universe" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_RPTONDMX_UNIVERSE" value: 34332 get_request { } get_response { field { type: UINT8 name: "repeat_on_dmx_artnet_universe" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "repeat_on_dmx_artnet_universe" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CP_CHNLMODE_PIXELS" value: 34335 get_request { } get_response { field { type: UINT8 name: "channel_mode_pixels" label { value: 0 label: "Disabled" } label { value: 1 label: "RGB" } label { value: 2 label: "RGBW" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "channel_mode_pixels" label { value: 0 label: "Disabled" } label { value: 1 label: "RGB" } label { value: 2 label: "RGBW" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } manufacturer { manufacturer_id: 17236 manufacturer_name: "City Theatrical, Inc." pid { name: "SHOW_ID" value: 32768 get_request { } get_response { field { type: UINT8 name: "show_id" range { min: 1 max: 64 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "show_id" range { min: 1 max: 64 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "OUTPUT_POWER" value: 32769 get_request { } get_response { field { type: UINT8 name: "output_power" label { value: 0 label: "5mW" } label { value: 1 label: "10mW" } label { value: 2 label: "50mW" } label { value: 3 label: "100mW" } label { value: 4 label: "125mW (NA Only)" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "output_power" label { value: 0 label: "5mW" } label { value: 1 label: "10mW" } label { value: 2 label: "50mW" } label { value: 3 label: "100mW" } label { value: 4 label: "125mW (NA Only)" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "HOP_PATTERN" value: 32770 get_request { } get_response { field { type: UINT8 name: "hop_pattern" range { min: 1 max: 16 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "hop_pattern" range { min: 1 max: 16 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "BANDWIDTH" value: 32771 get_request { } get_response { field { type: UINT8 name: "bandwidth" label { value: 1 label: "Full" } label { value: 2 label: "WiFi 1-6" } label { value: 3 label: "WiFi 4-9" } label { value: 4 label: "WiFi 7-11" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "bandwidth" label { value: 1 label: "Full" } label { value: 2 label: "WiFi 1-6" } label { value: 3 label: "WiFi 4-9" } label { value: 4 label: "WiFi 7-11" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "NUM_OF_CHANNELS" value: 32772 get_request { } get_response { field { type: UINT8 name: "number_of_channels" label { value: 1 label: "30" } label { value: 2 label: "62" } label { value: 3 label: "94" } label { value: 4 label: "126" } label { value: 5 label: "158" } label { value: 6 label: "190" } label { value: 7 label: "222" } label { value: 8 label: "254" } label { value: 9 label: "286" } label { value: 10 label: "318" } label { value: 11 label: "350" } label { value: 12 label: "382" } label { value: 13 label: "414" } label { value: 14 label: "446" } label { value: 15 label: "478" } label { value: 16 label: "512" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "number_of_channels" label { value: 1 label: "30" } label { value: 2 label: "62" } label { value: 3 label: "94" } label { value: 4 label: "126" } label { value: 5 label: "158" } label { value: 6 label: "190" } label { value: 7 label: "222" } label { value: 8 label: "254" } label { value: 9 label: "286" } label { value: 10 label: "318" } label { value: 11 label: "350" } label { value: 12 label: "382" } label { value: 13 label: "414" } label { value: 14 label: "446" } label { value: 15 label: "478" } label { value: 16 label: "512" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LEVEL_TEST" value: 32773 get_request { } get_response { field { type: UINT8 name: "test_level" range { min: 0 max: 100 } } } get_sub_device_range: ONLY_SUBDEVICES set_request { field { type: UINT8 name: "test_level" range { min: 0 max: 100 } } } set_response { } set_sub_device_range: ONLY_SUBDEVICES } pid { name: "CURVE" value: 32774 get_request { } get_response { field { type: UINT8 name: "curve" label { value: 1 label: "ISL" } label { value: 2 label: "Linear" } label { value: 3 label: "Non-Dim" } label { value: 4 label: "LED" } } } get_sub_device_range: ONLY_SUBDEVICES set_request { field { type: UINT8 name: "curve" label { value: 1 label: "ISL" } label { value: 2 label: "Linear" } label { value: 3 label: "Non-Dim" } label { value: 4 label: "LED" } } } set_response { } set_sub_device_range: ONLY_SUBDEVICES } pid { name: "BUMP_ENABLED" value: 32775 get_request { } get_response { field { type: BOOL name: "bump_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "bump_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DATA_LOSS_TIMEOUT" value: 32776 get_request { } get_response { field { type: UINT8 name: "minutes" range { min: 0 max: 120 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "minutes" range { min: 0 max: 120 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "BACKLIGHT_TIMEOUT" value: 32777 get_request { } get_response { field { type: UINT8 name: "seconds" label { value: 0 label: "Always On" } label { value: 241 label: "Always Off" } range { min: 0 max: 241 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "seconds" label { value: 0 label: "Always On" } label { value: 241 label: "Always Off" } range { min: 0 max: 241 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "RDM_PROXY_ENABLED" value: 32778 get_request { } get_response { field { type: BOOL name: "rdm_proxy_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "rdm_proxy_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "INPUT_FORMAT" value: 32779 get_request { } get_response { field { type: UINT8 name: "input_format" label { value: 0 label: "DMX" } label { value: 1 label: "Art-Net" } label { value: 2 label: "E1.31" } label { value: 3 label: "KiNet" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "input_format" label { value: 0 label: "DMX" } label { value: 1 label: "Art-Net" } label { value: 2 label: "E1.31" } label { value: 3 label: "KiNet" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "IP_ADDRESS" value: 32780 get_request { } get_response { field { type: UINT32 name: "ip_address" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "ip_address" } } set_response { } set_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "IP_SUBNET_MASK" value: 32781 get_request { } get_response { field { type: UINT32 name: "subnet_mask" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "subnet_mask" } } set_response { } set_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "IP_GATEWAY" value: 32782 get_request { } get_response { field { type: UINT32 name: "default_gateway" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "default_gateway" } } set_response { } set_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DHCP_MODE" value: 32783 get_request { } get_response { field { type: BOOL name: "dhcp_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "dhcp_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "MAC_ADDRESS" value: 32784 get_request { } get_response { field { type: GROUP name: "languages" min_size: 6 max_size: 6 field { type: UINT8 name: "octet" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: GROUP name: "languages" min_size: 6 max_size: 6 field { type: UINT8 name: "octet" } } } set_response { } set_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "SET_UID" value: 32788 set_request { field { type: UID name: "uid" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DMX_OUTPUT_STANDARD" value: 32789 get_request { } get_response { field { type: UINT8 name: "output_format" label { value: 1 label: "DMX512/199" } label { value: 2 label: "DMX512-A" } label { value: 3 label: "RDM E1.20-200" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "output_format" label { value: 1 label: "DMX512/199" } label { value: 2 label: "DMX512-A" } label { value: 3 label: "RDM E1.20-200" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "ADD_DISCOVERY" value: 32790 set_request { field { type: UINT8 name: "enabled" label { value: 1 label: "On" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DMX_INTERSLOT_TIME" value: 32791 get_request { } get_response { field { type: UINT8 name: "micro_seconds" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "micro_seconds" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LATENCY" value: 32793 get_request { } get_response { field { type: UINT8 name: "latency_setting" label { value: 0 label: "Normal" } label { value: 1 label: "Low" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "latency_setting" label { value: 0 label: "Normal" } label { value: 1 label: "Low" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "FACTORY_SETTINGS_LOCK" value: 32794 get_request { } get_response { field { type: UINT32 name: "lock_code" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT32 name: "lock_code" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DMX_RDM_INTERLEAVE" value: 32795 get_request { } get_response { field { type: UINT8 name: "interleave_ratio" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "interleave_ratio" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PROXIED_DEVICES_ENHANCED" value: 32796 get_request { } get_response { field { type: GROUP name: "uids" field { type: UID name: "uid" } field { type: UINT16 name: "control_bits" } field { type: UID name: "binding_uid" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "ADAPTIVE_ON_OFF" value: 32797 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 17742 manufacturer_name: "ENTTEC Pty Ltd" pid { name: "PWM_OUTPUT_FREQUENCY" value: 32770 get_request { } get_response { field { type: UINT16 name: "frequency" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "frequency" range { min: 500 max: 2000 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "FAN_ON_PERCENTAGE" value: 32771 get_request { } get_response { field { type: UINT8 name: "percentage" label { value: 0 label: "Auto" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "percentage" label { value: 0 label: "Auto" } range { min: 0 max: 0 } range { min: 50 max: 100 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "AUTO_MODE" value: 34559 get_request { } get_response { field { type: UINT8 name: "program" label { value: 0 label: "Disabled" } label { value: 6 label: "1 colour chase, 4 chans" } label { value: 7 label: "2 colour chase, 4 chans" } label { value: 8 label: "1 colour chase, 3 chans FW>=1.2" } range { min: 0 max: 9 } } field { type: UINT8 name: "speed" label { value: 0 label: "Fastest" } label { value: 9 label: "Slowest" } range { min: 0 max: 9 } } field { type: UINT8 name: "delay" label { value: 0 label: "Shortest" } label { value: 9 label: "Longest" } range { min: 0 max: 9 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "program" label { value: 0 label: "Disabled" } label { value: 6 label: "1 colour chase, 4 chans" } label { value: 7 label: "2 colour chase, 4 chans" } label { value: 8 label: "1 colour chase, 3 chans FW>=1.2" } range { min: 0 max: 9 } } field { type: UINT8 name: "speed" label { value: 0 label: "Fastest" } label { value: 9 label: "Slowest" } range { min: 0 max: 9 } } field { type: UINT8 name: "delay" label { value: 0 label: "Shortest" } label { value: 9 label: "Longest" } range { min: 0 max: 9 } } } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 18501 manufacturer_name: "Howard Eaton Lighting Ltd." pid { name: "PWRUP_TEST" value: 51287 get_request { } get_response { field { type: BOOL name: "enabled" } field { type: UINT8 name: "max_allowed" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "INTERNAL_STATS" value: 51298 get_request { } get_response { field { type: UINT16 name: "dmx_nsc_packet_count" } field { type: UINT16 name: "dmx_asc_packet_count" } field { type: UINT16 name: "rdm_asc_packet_count" } field { type: UINT8 name: "uart_errors" } field { type: UINT8 name: "device_minutes" } field { type: UINT8 name: "brownout_count" } field { type: UINT8 name: "watchdog_resets" } field { type: UINT8 name: "software_resets" } field { type: UINT16 name: "dither_adjust" } field { type: UINT8 name: "record_sensor_counts" } } get_sub_device_range: ROOT_DEVICE set_request { } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 19041 manufacturer_name: "Jands Pty Ltd." pid { name: "NE_FAULT_DETECT_MODE" value: 32896 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DMX_PROTECT_MODE" value: 32898 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DMX_LOSS_MODE" value: 32900 get_request { } get_response { field { type: UINT8 name: "mode" label { value: 0 label: "Hold" } label { value: 1 label: "Fade to scene #1" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "Hold" } label { value: 1 label: "Fade to scene #1" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PREHEAT_LEVEL" value: 32902 get_request { } get_response { field { type: UINT8 name: "level" label { value: 0 label: "Off" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "level" label { value: 0 label: "Off" } range { min: 0 max: 50 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "OUTPUT_CAP_VALUE" value: 32904 get_request { } get_response { field { type: UINT8 name: "cap" label { value: 0 label: "Off" } label { value: 1 label: "95%" } label { value: 2 label: "90%" } label { value: 3 label: "85%" } label { value: 4 label: "80%" } label { value: 5 label: "75%" } label { value: 6 label: "70%" } label { value: 7 label: "65%" } label { value: 8 label: "60%" } label { value: 9 label: "55%" } label { value: 10 label: "50%" } label { value: 11 label: "45%" } label { value: 12 label: "40%" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "cap" label { value: 0 label: "Off" } label { value: 1 label: "95%" } label { value: 2 label: "90%" } label { value: 3 label: "85%" } label { value: 4 label: "80%" } label { value: 5 label: "75%" } label { value: 6 label: "70%" } label { value: 7 label: "65%" } label { value: 8 label: "60%" } label { value: 9 label: "55%" } label { value: 10 label: "50%" } label { value: 11 label: "45%" } label { value: 12 label: "40%" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DMX_TERM_MODE" value: 32906 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 19541 manufacturer_name: "LumenRadio AB" pid { name: "FULL_DISCOVERY" value: 32768 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "OUTPUT_DEFAULT_VALUE" value: 32770 get_request { } get_response { field { type: UINT8 name: "dmx_level" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "dmx_level" } } set_response { field { type: UINT8 name: "dmx_level" } } set_sub_device_range: ROOT_DEVICE } pid { name: "DALI_FADE_TIME" value: 32771 get_request { } get_response { field { type: UINT8 name: "fade_time" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "fade_time" } } set_response { field { type: UINT8 name: "fade_time" } } set_sub_device_range: ROOT_DEVICE } pid { name: "INCREMENTAL_DISCOVERY_INTERVAL" value: 33025 get_request { } get_response { field { type: UINT16 name: "interval" multiplier: -1 } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "interval" multiplier: -1 range { min: 257 max: 65535 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "ACK_TIMER_FACTOR" value: 33026 get_request { } get_response { field { type: UINT16 name: "timer_factor" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "timer_factor" range { min: 257 max: 65535 } } } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 19780 manufacturer_name: "Les Generateurs de brouillard MDG Fog Generators Ltd." pid { name: "MDG_NETWORK_UNIVERSE_NUMBER" value: 32768 get_request { } get_response { field { type: UINT16 name: "universe_number" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "universe_number" range { min: 0 max: 128 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "MDG_NETWORK_UNIVERSE_NAME" value: 32769 get_request { } get_response { field { type: STRING name: "universe_name" max_size: 32 } } get_sub_device_range: ROOT_DEVICE set_request { field { type: STRING name: "universe_name" max_size: 32 } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "MDG_GENERATOR_STATE" value: 32770 get_request { } get_response { field { type: STRING name: "generator_state" max_size: 20 } } get_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 19792 manufacturer_name: "Martin Professional A/S" pid { name: "DMX_LAMP_OFF_ENABLE" value: 32768 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DMX_RESET_ENABLE" value: 32769 get_request { } get_response { field { type: UINT8 name: "reset_mode" label { value: 0 label: "Off" } label { value: 1 label: "On" } label { value: 2 label: "5 second delay" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "reset_mode" label { value: 0 label: "Off" } label { value: 1 label: "On" } label { value: 2 label: "5 second delay" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "MCX_LAMP_OFF_ENABLE" value: 32770 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "FIXTURE_ID" value: 32771 get_request { } get_response { field { type: UINT16 name: "fixture_id" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "fixture_id" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "STAND_ALONE_OPERATION_ENABLE" value: 33024 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SYNCHRONIZED" value: 33025 get_request { } get_response { field { type: UINT8 name: "mode" label { value: 0 label: "Single Fixture" } label { value: 1 label: "Master Fixture" } label { value: 2 label: "Synchronized fixture" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "synchronization_mode" label { value: 0 label: "Single Fixture" } label { value: 1 label: "Master Fixture" } label { value: 2 label: "Synchronized fixture" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "AUTO_PROGRAM_ENABLE" value: 33026 get_request { } get_response { field { type: BOOL name: "auto_program_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "auto_program_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "ENABLE_TIMERS" value: 33027 get_request { } get_response { field { type: UINT8 name: "timer_settings" label { value: 0 label: "No timers enabled" } label { value: 1 label: "Timer 1 enabled" } label { value: 2 label: "Timer 2 enabled" } label { value: 3 label: "Timer 1 & Timer 2 enabled" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "timer_settings" label { value: 0 label: "No timers enabled" } label { value: 1 label: "Timer 1 enabled" } label { value: 2 label: "Timer 2 enabled" } label { value: 3 label: "Timer 1 & Timer 2 enabled" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "TIMER1_START_TIME" value: 33028 get_request { } get_response { field { type: UINT8 name: "hour" range { min: 0 max: 23 } } field { type: UINT8 name: "minute" range { min: 0 max: 59 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "hour" range { min: 0 max: 23 } } field { type: UINT8 name: "minute" range { min: 0 max: 59 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "TIMER1_END_TIME" value: 33029 get_request { } get_response { field { type: UINT8 name: "hour" range { min: 0 max: 23 } } field { type: UINT8 name: "minute" range { min: 0 max: 59 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "hour" range { min: 0 max: 23 } } field { type: UINT8 name: "minute" range { min: 0 max: 59 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "TIMER2_START_TIME" value: 33030 get_request { } get_response { field { type: UINT8 name: "hour" range { min: 0 max: 23 } } field { type: UINT8 name: "minute" range { min: 0 max: 59 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "hour" range { min: 0 max: 23 } } field { type: UINT8 name: "minute" range { min: 0 max: 59 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "TIMER2_END_TIME" value: 33031 get_request { } get_response { field { type: UINT8 name: "hour" range { min: 0 max: 23 } } field { type: UINT8 name: "minute" range { min: 0 max: 59 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "hour" range { min: 0 max: 23 } } field { type: UINT8 name: "minute" range { min: 0 max: 59 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LIGHT_SENSOR_LEVEL_TRIGGER_ENABLE" value: 33032 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "CAPTURE_CURRENT_LIGHT_LEVEL" value: 33033 set_request { } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LIGHT_SENSOR_TRIGGER_LEVEL" value: 33034 get_request { } get_response { field { type: UINT16 name: "trigger_level" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "trigger_level" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "ADD_SCENE" value: 33280 set_request { } set_response { field { type: UINT8 name: "current_scene" } field { type: UINT8 name: "total_scenes" } } set_sub_device_range: ROOT_DEVICE } pid { name: "INSERT_SCENE" value: 33281 set_request { } set_response { field { type: UINT8 name: "current_scene" } field { type: UINT8 name: "total_scenes" } } set_sub_device_range: ROOT_DEVICE } pid { name: "STORE_SCENE" value: 33282 set_request { } set_response { field { type: UINT8 name: "current_scene" } field { type: UINT8 name: "total_scenes" } } set_sub_device_range: ROOT_DEVICE } pid { name: "DELETE_SCENE" value: 33283 set_request { } set_response { field { type: UINT8 name: "current_scene" } field { type: UINT8 name: "total_scenes" } } set_sub_device_range: ROOT_DEVICE } pid { name: "DELETE_ALL_SCENES" value: 33284 set_request { } set_response { field { type: UINT8 name: "current_scene" } field { type: UINT8 name: "total_scenes" } } set_sub_device_range: ROOT_DEVICE } pid { name: "NEXT_SCENE" value: 33285 get_request { } get_response { field { type: UINT8 name: "current_scene" } field { type: UINT8 name: "total_scenes" } } get_sub_device_range: ROOT_DEVICE } pid { name: "PREVIOUS_SCENE" value: 33286 get_request { } get_response { field { type: UINT8 name: "current_scene" } field { type: UINT8 name: "total_scenes" } } get_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_SETTINGS" value: 33287 get_request { } get_response { field { type: GROUP name: "scene_settings" field { type: UINT8 name: "setting" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "RUN_PROGRAM" value: 33288 set_request { } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_NUMBER" value: 33290 get_request { } get_response { field { type: UINT8 name: "current_scene" } field { type: UINT8 name: "total_scenes" } } get_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_WAIT_TIME" value: 33291 get_request { } get_response { field { type: UINT8 name: "hours" range { min: 0 max: 23 } } field { type: UINT8 name: "minutes" range { min: 0 max: 59 } } field { type: UINT8 name: "seconds" range { min: 0 max: 59 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "hours" range { min: 0 max: 23 } } field { type: UINT8 name: "minutes" range { min: 0 max: 59 } } field { type: UINT8 name: "seconds" range { min: 0 max: 59 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_FADE_TIME" value: 33292 get_request { } get_response { field { type: UINT8 name: "hours" range { min: 0 max: 23 } } field { type: UINT8 name: "minutes" range { min: 0 max: 59 } } field { type: UINT8 name: "seconds" range { min: 0 max: 59 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "hours" range { min: 0 max: 23 } } field { type: UINT8 name: "minutes" range { min: 0 max: 59 } } field { type: UINT8 name: "seconds" range { min: 0 max: 59 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_INTENSITY" value: 33293 get_request { } get_response { field { type: UINT8 name: "intensity" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "intensity" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_CYAN" value: 33294 get_request { } get_response { field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_MAGENTA" value: 33295 get_request { } get_response { field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_YELLOW" value: 33296 get_request { } get_response { field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_RED" value: 33297 get_request { } get_response { field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_GREEN" value: 33298 get_request { } get_response { field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_BLUE" value: 33299 get_request { } get_response { field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_AMBER" value: 33300 get_request { } get_response { field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_WHITE" value: 33301 get_request { } get_response { field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_ZOOM" value: 33302 get_request { } get_response { field { type: UINT16 name: "zoom" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "zoom" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_FOCUS" value: 33303 get_request { } get_response { field { type: UINT16 name: "focus" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "focus" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_RANDOM_COLOR" value: 33304 get_request { } get_response { field { type: UINT8 name: "color_wheel" label { value: 0 label: "Random colors off" } label { value: 1 label: "CMY slow" } label { value: 2 label: "CMY medium" } label { value: 3 label: "CMY fast" } label { value: 4 label: "Magenta/Yellow slow" } label { value: 5 label: "Magenta/Yellow medium" } label { value: 6 label: "Cyan/Magenta slow" } label { value: 7 label: "Cyan/Magenta medium" } label { value: 8 label: "Cyan/Magenta fast" } label { value: 9 label: "Cyan/Yellow slow" } label { value: 10 label: "Cyan/Yellow medium" } label { value: 11 label: "Cyan/Yellow fast" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "color_wheel" label { value: 0 label: "Random colors off" } label { value: 1 label: "CMY slow" } label { value: 2 label: "CMY medium" } label { value: 3 label: "CMY fast" } label { value: 4 label: "Magenta/Yellow slow" } label { value: 5 label: "Magenta/Yellow medium" } label { value: 6 label: "Cyan/Magenta slow" } label { value: 7 label: "Cyan/Magenta medium" } label { value: 8 label: "Cyan/Magenta fast" } label { value: 9 label: "Cyan/Yellow slow" } label { value: 10 label: "Cyan/Yellow medium" } label { value: 11 label: "Cyan/Yellow fast" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_COLOR_WHEEL" value: 33305 get_request { } get_response { field { type: UINT8 name: "color_wheel" label { value: 0 label: "White (Open)" } label { value: 1 label: "Color 1" } label { value: 2 label: "Color 2" } label { value: 3 label: "Color 3" } label { value: 4 label: "Color 4" } label { value: 5 label: "Color 5" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "color_wheel" label { value: 0 label: "White (Open)" } label { value: 1 label: "Color 1" } label { value: 2 label: "Color 2" } label { value: 3 label: "Color 3" } label { value: 4 label: "Color 4" } label { value: 5 label: "Color 5" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_GOBO_SELECTION" value: 33306 get_request { } get_response { field { type: UINT8 name: "gobo_wheel" label { value: 0 label: "White (Open)" } label { value: 1 label: "Gobo 1" } label { value: 2 label: "Gobo 2" } label { value: 3 label: "Gobo 3" } label { value: 4 label: "Gobo 1 rotation" } label { value: 5 label: "Gobo 2 rotation" } label { value: 6 label: "Gobo 3 rotation" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "gobo_wheel" label { value: 0 label: "White (Open)" } label { value: 1 label: "Gobo 1" } label { value: 2 label: "Gobo 2" } label { value: 3 label: "Gobo 3" } label { value: 4 label: "Gobo 1 rotation" } label { value: 5 label: "Gobo 2 rotation" } label { value: 6 label: "Gobo 3 rotation" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_GOBO_INDEXING" value: 33307 get_request { } get_response { field { type: UINT8 name: "gobo_index" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "gobo_index" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_ANIMATION_POSITION" value: 33308 get_request { } get_response { field { type: UINT8 name: "animation_position" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "animation_position" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_ANIMATION_INDEXING" value: 33309 get_request { } get_response { field { type: UINT8 name: "animation_indexing" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "animation_indexing" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_GET_DMX" value: 33310 set_request { field { type: UINT8 name: "capture_dmx" label { value: 0 label: "Add to the end of the scene list" } label { value: 1 label: "Insert before the current scene" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SCENE_FROST_ENABLE" value: 33311 get_request { } get_response { field { type: BOOL name: "frost_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "frost_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "AUTO_SHUTTER_BO_ENABLE" value: 33536 get_request { } get_response { field { type: BOOL name: "shutter_blackout_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "shutter_blackout_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "EFFECT_SPEED" value: 33537 get_request { } get_response { field { type: UINT8 name: "effect_speed" label { value: 0 label: "Follow pan/tilt speed" } label { value: 1 label: "Normal Speed" } label { value: 2 label: "Fast Speed" } label { value: 3 label: "Slow Speed" } label { value: 4 label: "Safe Speed" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "effect_speed" label { value: 0 label: "Follow pan/tilt speed" } label { value: 1 label: "Normal Speed" } label { value: 2 label: "Fast Speed" } label { value: 3 label: "Slow Speed" } label { value: 4 label: "Safe Speed" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "EFFECT_SHORTCUTS_ENABLE" value: 33538 get_request { } get_response { field { type: BOOL name: "effect_shortcuts_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "effect_shortcuts_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "EFFECT_FEEDBACK_ENABLE" value: 33539 get_request { } get_response { field { type: BOOL name: "effect_feedback_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "effect_feedback_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LAMP_HOUR_WARNING_ENABLE" value: 33540 get_request { } get_response { field { type: BOOL name: "lamp_warning_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "lamp_warning_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LAMP_HOUR_WARNING_HOURS" value: 33541 get_request { } get_response { field { type: UINT16 name: "lamp_hours" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "lamp_hours" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "AIR_FILTER_HOUR" value: 33542 get_request { } get_response { field { type: UINT16 name: "air_filter_hours" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "air_filter_hours" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "AIR_FILTER_HOUR_WARNING_HOURS" value: 33543 get_request { } get_response { field { type: UINT16 name: "air_filter_hours" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "air_filter_hours" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DISPLAY_ERRORS_ENABLE" value: 33544 get_request { } get_response { field { type: BOOL name: "enable_error_display" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enable_error_display" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LAMP_ERROR_TEST_ENABLE" value: 33545 get_request { } get_response { field { type: BOOL name: "lamp_error_test_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "lamp_error_test_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SAVE_CUSTOM_CONFIGURATION" value: 33546 set_request { field { type: UINT8 name: "configuration_number" range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LOAD_CUSTOM_CONFIGURATION" value: 33547 set_request { field { type: UINT8 name: "configuration_number" range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "BARNDOOR_SOFTWARE_VERSION" value: 33548 get_request { } get_response { field { type: STRING name: "barndoor_software_version" min_size: 6 max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "CMY_BLACKOUT_ENABLE" value: 33549 get_request { } get_response { field { type: BOOL name: "cmy_blackout_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "cmy_blackout_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "TRACKING_MODE" value: 33550 get_request { } get_response { field { type: UINT8 name: "tracking_mode" label { value: 0 label: "Absolute delta value algorithm" } label { value: 1 label: "Real delta value algorithm" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "tracking_mode" label { value: 0 label: "Absolute delta value algorithm" } label { value: 1 label: "Real delta value algorithm" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "TRACKING_CAL" value: 33551 get_request { } get_response { field { type: UINT8 name: "tracking_mode" range { min: 1 max: 10 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "tracking_mode" range { min: 1 max: 10 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DIMMER_CURVE" value: 33552 get_request { } get_response { field { type: UINT8 name: "dimmer_curve" label { value: 0 label: "Optical linear" } label { value: 1 label: "Square law" } label { value: 2 label: "Inverse square law" } label { value: 3 label: "S-curve" } range { min: 0 max: 255 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "dimmer_curve" label { value: 0 label: "Optical linear" } label { value: 1 label: "Square law" } label { value: 2 label: "Inverse square law" } label { value: 3 label: "S-curve" } range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "FOCUS_TRACKING" value: 33553 get_request { } get_response { field { type: UINT8 name: "focus_tracking" label { value: 0 label: "Focus tracking off" } label { value: 1 label: "Focus tracking range is near" } label { value: 2 label: "Focus tracking range is medium" } label { value: 3 label: "Focus tracking range is far" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "focus_tracking" label { value: 0 label: "Focus tracking off" } label { value: 1 label: "Focus tracking range is near" } label { value: 2 label: "Focus tracking range is medium" } label { value: 3 label: "Focus tracking range is far" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DISPLAY_AUTO_OFF" value: 33554 get_request { } get_response { field { type: UINT8 name: "display_auto_off" label { value: 0 label: "Display is always on" } label { value: 1 label: "Display off after 2 minutes" } label { value: 2 label: "Display off after 5 minutes" } label { value: 3 label: "Display off after 10 minutes" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "display_auto_off" label { value: 0 label: "Display is always on" } label { value: 1 label: "Display off after 2 minutes" } label { value: 2 label: "Display off after 5 minutes" } label { value: 3 label: "Display off after 10 minutes" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LAMP_PREHEAT_ENABLE" value: 33555 get_request { } get_response { field { type: BOOL name: "lamp_preheat_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "lamp_preheat_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LAMP_PREHEAT_VALUE" value: 33556 get_request { } get_response { field { type: UINT8 name: "preheat_value" range { min: 0 max: 20 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "preheat_value" range { min: 0 max: 20 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LAMP_POWER_ENABLE" value: 33557 get_request { } get_response { field { type: BOOL name: "economy_mode_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "economy_mode_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LAMP_POWER_VALUE" value: 33558 get_request { } get_response { field { type: UINT8 name: "lamp_power_value" range { min: 70 max: 100 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "lamp_power_value" range { min: 70 max: 100 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "IRIS_BLACKOUT_ENABLE" value: 33559 get_request { } get_response { field { type: BOOL name: "iris_blackout_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "iris_blackout_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "COLOR_WHEEL_BLACKOUT_ENABLE" value: 33560 get_request { } get_response { field { type: BOOL name: "color_wheel_blackout_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "color_wheel_blackout_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "STUDIO_MODE" value: 33561 get_request { } get_response { field { type: UINT8 name: "studio_mode" label { value: 0 label: "Disabled" } label { value: 1 label: "Enabled" } label { value: 2 label: "Silent Mode" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "studio_mode" label { value: 0 label: "Disabled" } label { value: 1 label: "Enabled" } label { value: 2 label: "Silent Mode" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "BLOCK_TEMP_SETTING" value: 33562 get_request { } get_response { field { type: UINT8 name: "block_temperature_setting" label { value: 0 label: "Low" } label { value: 1 label: "Normal" } label { value: 2 label: "High" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "block_temperature_setting" label { value: 0 label: "Low" } label { value: 1 label: "Normal" } label { value: 2 label: "High" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "GOBO3_ANIMATION_START" value: 33567 get_request { } get_response { field { type: UINT8 name: "gobo3_animation_start" label { value: 0 label: "Position Off" } label { value: 1 label: "Position 1" } label { value: 2 label: "Position 2" } label { value: 3 label: "Position 3" } label { value: 4 label: "Position 4" } label { value: 5 label: "Position 5" } label { value: 6 label: "Position 6" } label { value: 7 label: "Position 7" } label { value: 8 label: "Position 8" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "gobo3_animation_start" label { value: 0 label: "Position Off" } label { value: 1 label: "Position 1" } label { value: 2 label: "Position 2" } label { value: 3 label: "Position 3" } label { value: 4 label: "Position 4" } label { value: 5 label: "Position 5" } label { value: 6 label: "Position 6" } label { value: 7 label: "Position 7" } label { value: 8 label: "Position 8" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "GOBO3_ANIMATION_END" value: 33568 get_request { } get_response { field { type: UINT8 name: "gobo3_animation_end" label { value: 0 label: "Position Off" } label { value: 1 label: "Position 1" } label { value: 2 label: "Position 2" } label { value: 3 label: "Position 3" } label { value: 4 label: "Position 4" } label { value: 5 label: "Position 5" } label { value: 6 label: "Position 6" } label { value: 7 label: "Position 7" } label { value: 8 label: "Position 8" } label { value: 9 label: "Position 9" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "gobo3_animation_start" label { value: 0 label: "Position Off" } label { value: 1 label: "Position 1" } label { value: 2 label: "Position 2" } label { value: 3 label: "Position 3" } label { value: 4 label: "Position 4" } label { value: 5 label: "Position 5" } label { value: 6 label: "Position 6" } label { value: 7 label: "Position 7" } label { value: 8 label: "Position 8" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PAN_TILT_SPEED" value: 33792 get_request { } get_response { field { type: UINT8 name: "mode" label { value: 0 label: "Normal" } label { value: 1 label: "Fast" } label { value: 2 label: "Slow" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "Normal" } label { value: 1 label: "Fast" } label { value: 2 label: "Slow" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PAN_TILT_MOVE_ON_RESET_ENABLE" value: 33793 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PAN_TILT_LIMITATION_ENABLE" value: 33794 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PAN_LIMITATION_MINIMUM" value: 33795 get_request { } get_response { field { type: INT16 name: "pan_minimum" range { min: 0 max: 360 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: INT16 name: "pan_minimum" range { min: 0 max: 360 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PAN_LIMITATION_MAXIMUM" value: 33796 get_request { } get_response { field { type: INT16 name: "pan_maximum" range { min: 0 max: 360 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: INT16 name: "pan_maximum" range { min: 0 max: 360 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "TILT_LIMITATION_MINIMUM" value: 33797 get_request { } get_response { field { type: INT16 name: "tilt_minimum" range { min: -134 max: 134 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: INT16 name: "tilt_minimum" range { min: -134 max: 134 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "TILT_LIMITATION_MAXIMUM" value: 33798 get_request { } get_response { field { type: INT16 name: "tilt_maximum" range { min: -134 max: 134 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: INT16 name: "tilt_maximum" range { min: -134 max: 134 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PAN_TILT_LIMITATION_AREA" value: 33799 get_request { } get_response { field { type: UINT8 name: "mode" label { value: 0 label: "Inside limits" } label { value: 1 label: "Outside limits" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "Inside limits" } label { value: 1 label: "Outside limits" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "FOLLOW_SPOT_MODE_ENABLE" value: 34048 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "FOLLOW_SPOT_MODE_LOCK_TOGGLE" value: 34049 get_request { } get_response { field { type: BOOL name: "locked" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "locked" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "FOLLOW_SPOT_MODE_LOCK_PAN" value: 34050 get_request { } get_response { field { type: BOOL name: "locked" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "locked" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "FOLLOW_SPOT_MODE_LOCK_TILT" value: 34051 get_request { } get_response { field { type: BOOL name: "locked" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "locked" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "REGULATE_LAMP_FAN" value: 34304 get_request { } get_response { field { type: BOOL name: "regulate_fan_speed" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "regulate_fan_speed" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "REGULATE_GOBO_FAN" value: 34305 get_request { } get_response { field { type: BOOL name: "regulate_fan_speed" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "regulate_fan_speed" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LAMP_COOLING" value: 34306 get_request { } get_response { field { type: UINT8 name: "cooling_level" label { value: 0 label: "50%" } label { value: 1 label: "80%" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "cooling_level" label { value: 0 label: "50%" } label { value: 1 label: "80%" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "FAN_CLEAN" value: 34307 get_request { } get_response { field { type: UINT8 name: "fan_clean_mode" label { value: 0 label: "Off" } label { value: 1 label: "Auto" } label { value: 2 label: "Forced" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "fan_clean_mode" label { value: 0 label: "Off" } label { value: 1 label: "Auto" } label { value: 2 label: "Forced" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "FAN_MODE" value: 34308 get_request { } get_response { field { type: UINT8 name: "fan_mode" label { value: 0 label: "Normal" } label { value: 1 label: "Silent" } label { value: 2 label: "Full" } label { value: 3 label: "Regulated" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "fan_mode" label { value: 0 label: "Normal" } label { value: 1 label: "Silent" } label { value: 2 label: "Full" } label { value: 3 label: "Regulated" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "SERIAL_NUMBER" value: 34560 get_request { } get_response { field { type: STRING name: "serial" max_size: 32 } } get_sub_device_range: ROOT_DEVICE } pid { name: "EVENT_LOG_USER_EVENT_TRIGGER" value: 34562 set_request { } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 20562 manufacturer_name: "Production Resource Group" pid { name: "FAN_ERROR_STATUS" value: 33280 get_request { } get_response { field { type: UINT8 name: "fan_error_status" label { value: 0 label: "No Error" } label { value: 1 label: "Main Fan Error" } label { value: 2 label: "UPE Fans Error" } label { value: 3 label: "Pinch Fan Error" } label { value: 4 label: "Stack Fan Error" } label { value: 5 label: "Stack Fan Error" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "regulate_fan_speed" label { value: 0 label: "No Error" } label { value: 1 label: "Main Fan Error" } label { value: 2 label: "UPE Fans Error" } label { value: 3 label: "Pinch Fan Error" } label { value: 4 label: "Stack Fan Error" } label { value: 5 label: "Stack Fan Error" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "MAX_LAMP_POWER" value: 33792 get_request { } get_response { field { type: UINT8 name: "max_lamp_power" label { value: 1 label: "900 Watt" } label { value: 2 label: "1200 Watt" } label { value: 3 label: "1400 Watt" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "max_lamp_power" label { value: 1 label: "900 Watt" } label { value: 2 label: "1200 Watt" } label { value: 3 label: "1400 Watt" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LAMP_FADE_ON_COMM_LOSS" value: 33793 get_request { } get_response { field { type: UINT8 name: "fade_on_comm_loss" label { value: 1 label: "Hold" } label { value: 2 label: "30 Sec" } label { value: 3 label: "60 Sec" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "fade_on_comm_loss" label { value: 1 label: "Hold" } label { value: 2 label: "30 Sec" } label { value: 3 label: "60 Sec" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LOCK_PAN" value: 34304 get_request { } get_response { field { type: BOOL name: "pan_lock" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "pan_lock" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "LOCK_TILT" value: 34305 get_request { } get_response { field { type: BOOL name: "tilt_lock" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "tilt_lock" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PAN_TILT_FREE_MOTION" value: 34306 get_request { } get_response { field { type: UINT8 name: "free_motion" label { value: 1 label: "Normal Operation" } label { value: 2 label: "Pan Tilt Free Motion" } label { value: 3 label: "Pan Tilt Locked" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "free_motion" label { value: 1 label: "Normal Operation" } label { value: 2 label: "Pan Tilt Free Motion" } label { value: 3 label: "Pan Tilt Locked" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "FOLLOW_SPOT_CONTROLLER_MODE" value: 34312 get_request { } get_response { field { type: UINT8 name: "followspot_control" label { value: 0 label: "Normal Operation" } label { value: 1 label: "Intensity Control" } label { value: 2 label: "Iris Control" } label { value: 3 label: "Intensity & Iris Control" } label { value: 4 label: "Zoom Control" } label { value: 5 label: "Intensity & Zoom Control" } label { value: 6 label: "Iris & Zoom Control" } label { value: 7 label: "Intensity, Iris & Zoom Control" } label { value: 8 label: "Edge Control" } label { value: 9 label: "Intensity & Edge Control" } label { value: 10 label: "Iris & Edge Control" } label { value: 11 label: "Intensity, Iris & Edge Control" } label { value: 12 label: "Edge & Zoom Control" } label { value: 13 label: "Intensity, Edge & Zoom Control" } label { value: 14 label: "Iris + Edge + Zoom Control" } label { value: 15 label: "Intensity, Iris, Edge & Zoom Control" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "followspot_control" label { value: 0 label: "Normal Operation" } label { value: 1 label: "Intensity Control" } label { value: 2 label: "Iris Control" } label { value: 3 label: "Intensity & Iris Control" } label { value: 4 label: "Zoom Control" } label { value: 5 label: "Intensity & Zoom Control" } label { value: 6 label: "Iris & Zoom Control" } label { value: 7 label: "Intensity, Iris & Zoom Control" } label { value: 8 label: "Edge Control" } label { value: 9 label: "Intensity & Edge Control" } label { value: 10 label: "Iris & Edge Control" } label { value: 11 label: "Intensity, Iris & Edge Control" } label { value: 12 label: "Edge & Zoom Control" } label { value: 13 label: "Intensity, Edge & Zoom Control" } label { value: 14 label: "Iris + Edge + Zoom Control" } label { value: 15 label: "Intensity, Iris, Edge & Zoom Control" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "ZOOM_TYPE" value: 34336 get_request { } get_response { field { type: UINT8 name: "zoom_type" label { value: 0 label: "Fast" } label { value: 1 label: "In Focus" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "followspot_control" label { value: 0 label: "Fast" } label { value: 1 label: "In Focus" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "FOLLOW_SPOT_ZOOM" value: 34337 get_request { } get_response { field { type: UINT8 name: "zoom_table" label { value: 0 label: "30ft Throw" } label { value: 1 label: "50ft Throw" } label { value: 2 label: "75ft Throw" } label { value: 3 label: "100ft Throw" } label { value: 4 label: "300ft Throw" } label { value: 5 label: "15ft Throw" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "zoom_table" label { value: 0 label: "30ft Throw" } label { value: 1 label: "50ft Throw" } label { value: 2 label: "75ft Throw" } label { value: 3 label: "100ft Throw" } label { value: 4 label: "300ft Throw" } label { value: 5 label: "15ft Throw" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "ZERO_GOBO_WHEELS" value: 34368 set_request { field { type: BOOL name: "followspot_control" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "CLEAR_LOG" value: 34400 set_request { field { type: BOOL name: "clear_log" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DISABLE_MECHS" value: 36864 get_request { } get_response { field { type: UINT8 name: "disable_mechanics" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "disable_mechanics" } } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 21075 manufacturer_name: "Robe Show Lighting s.r.o." pid { name: "DMX_INPUT" value: 36880 get_request { } get_response { field { type: UINT8 name: "Input" label { value: 0 label: "Wired" } label { value: 1 label: "Wireless" } label { value: 2 label: "Wireless In, XLR Out" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "Input" label { value: 0 label: "Wired" } label { value: 1 label: "Wireless" } label { value: 2 label: "Wireless In, XLR Out" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "WIRELESS_UNLINK" value: 36896 get_request { } get_response { } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "Unlink" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SCREENSAVER_DELAY" value: 36912 get_request { } get_response { field { type: UINT8 name: "Screensaver Delay" label { value: 0 label: "Off" } label { value: 1 label: "1 Minute" } label { value: 2 label: "2 Minutes" } label { value: 3 label: "3 Minutes" } label { value: 4 label: "4 Minutes" } label { value: 5 label: "5 Minutes" } label { value: 6 label: "6 Minutes" } label { value: 7 label: "7 Minutes" } label { value: 8 label: "8 Minutes" } label { value: 9 label: "9 Minutes" } label { value: 10 label: "10 Minutes" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "Screensaver Delay" label { value: 0 label: "Off" } label { value: 1 label: "1 Minute" } label { value: 2 label: "2 Minutes" } label { value: 3 label: "3 Minutes" } label { value: 4 label: "4 Minutes" } label { value: 5 label: "5 Minutes" } label { value: 6 label: "6 Minutes" } label { value: 7 label: "7 Minutes" } label { value: 8 label: "8 Minutes" } label { value: 9 label: "9 Minutes" } label { value: 10 label: "10 Minutes" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PT_FEEDBACK" value: 40960 get_request { } get_response { field { type: BOOL name: "Pan Tilt Feedback" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "Pan Tilt Feedback" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "OUTPUT_UNIFORMITY" value: 40969 get_request { } get_response { field { type: BOOL name: "Output Uniformity" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "Output Uniformity" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DL_COMPATIBLE_MODE" value: 40973 get_request { } get_response { field { type: BOOL name: "DL Compatible Mode" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "DL Compatible Mode" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "TOUCHSCREEN_LOCK" value: 40975 get_request { } get_response { field { type: UINT8 name: "Touchscreen Lock Delay" label { value: 0 label: "Off" } label { value: 1 label: "1 Minute" } label { value: 2 label: "2 Minutes" } label { value: 3 label: "3 Minutes" } label { value: 4 label: "4 Minutes" } label { value: 5 label: "5 Minutes" } label { value: 6 label: "6 Minutes" } label { value: 7 label: "7 Minutes" } label { value: 8 label: "8 Minutes" } label { value: 9 label: "9 Minutes" } label { value: 10 label: "10 Minutes" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "Touchscreen Lock Delay" label { value: 0 label: "Off" } label { value: 1 label: "1 Minute" } label { value: 2 label: "2 Minutes" } label { value: 3 label: "3 Minutes" } label { value: 4 label: "4 Minutes" } label { value: 5 label: "5 Minutes" } label { value: 6 label: "6 Minutes" } label { value: 7 label: "7 Minutes" } label { value: 8 label: "8 Minutes" } label { value: 9 label: "9 Minutes" } label { value: 10 label: "10 Minutes" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } manufacturer { manufacturer_id: 21324 manufacturer_name: "SOUNDLIGHT" pid { name: "DMX_HOLD_MODE" value: 33009 get_request { } get_response { field { type: UINT8 name: "mode" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "Outputs to 0%" } label { value: 1 label: "Output to 100%" } label { value: 2 label: "Hold" } label { value: 3 label: "Go to predefined scene" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SLOT_LABELS" value: 33057 get_request { field { type: UINT16 name: "slot_number" } } get_response { field { type: UINT16 name: "slot_number" } field { type: STRING name: "name" max_size: 16 } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "slot_number" } field { type: STRING name: "name" max_size: 16 } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "MODIFY_SENSOR_DEFINITION" value: 33280 get_request { field { type: UINT8 name: "sensor_number" } } get_response { field { type: UINT8 name: "sensor_number" } field { type: UINT8 name: "type" } field { type: UINT8 name: "unit" } field { type: UINT8 name: "prefix" } field { type: UINT16 name: "range_min" } field { type: UINT16 name: "range_max" } field { type: UINT16 name: "normal_min" } field { type: UINT16 name: "normal_max" } field { type: UINT8 name: "supports_recording" } field { type: STRING name: "name" max_size: 20 } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "sensor_number" } field { type: UINT8 name: "type" } field { type: UINT8 name: "unit" } field { type: UINT8 name: "prefix" } field { type: UINT16 name: "range_min" } field { type: UINT16 name: "range_max" } field { type: UINT16 name: "normal_min" } field { type: UINT16 name: "normal_max" } field { type: UINT8 name: "supports_recording" } field { type: STRING name: "name" max_size: 20 } } set_response { } set_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "NETWORK_ADDRESS" value: 34817 get_request { } get_response { field { type: UINT32 name: "ip_address" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "ip_address" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "NETWORK_MASK" value: 34818 get_request { } get_response { field { type: UINT32 name: "net_mask" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "net_mask" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "GATEWAY_ADDRESS" value: 34819 get_request { } get_response { field { type: UINT32 name: "gateway_address" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "gateway_address" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DNS_ADDRESS" value: 34820 get_request { } get_response { field { type: UINT32 name: "dns_address" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "dns_address" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DC_OFFSET" value: 56334 get_request { } get_response { field { type: GROUP name: "dc_offsets" field { type: UINT8 name: "offset_value" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: GROUP name: "dc_offsets" field { type: UINT8 name: "offset_value" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DC_FADER_OFFSET" value: 56335 set_request { field { type: GROUP name: "offsets" field { type: UINT8 name: "offset_value" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DC_CALIBRATION" value: 56522 get_request { } get_response { field { type: UINT8 name: "scale_value" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "scale_value" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CURVE_DEFINITION" value: 56525 get_request { } get_response { field { type: UINT8 name: "curve_number" } field { type: UINT8 name: "total_curves" } field { type: UINT8 name: "segment_count" } field { type: UINT8 name: "interpolation_method" label { value: 0 label: "Step" } label { value: 1 label: "Linear" } label { value: 2 label: "Square" } label { value: 3 label: "Cubic" } } field { type: UINT8 name: "start_value" } field { type: GROUP name: "curve_values" field { type: UINT8 name: "value" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "curve_number" } field { type: UINT8 name: "total_curves" } field { type: UINT8 name: "segment_count" } field { type: UINT8 name: "interpolation_method" label { value: 0 label: "Step" } label { value: 1 label: "Linear" } label { value: 2 label: "Square" } label { value: 3 label: "Cubic" } } field { type: UINT8 name: "start_value" } field { type: GROUP name: "curve_values" field { type: UINT8 name: "value" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } manufacturer { manufacturer_id: 21367 manufacturer_name: "SWISSON AG" pid { name: "SWPID_AUTO_UNIVERSE_NUMBER" value: 32898 get_request { } get_response { field { type: UINT16 name: "universe_number" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "universe_number" } } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 22355 manufacturer_name: "Wireless Solution Sweden AB" pid { name: "WDMX_LOGIN" value: 32768 set_request { } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_LOGOUT" value: 32784 set_request { } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_RADIO_POWER_24" value: 32817 get_request { } get_response { field { type: UINT8 name: "Output Power 2.4GHz" label { value: 0 label: "25mW" } label { value: 1 label: "100mW" } label { value: 2 label: "375mW" } label { value: 3 label: "500mW" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "Output Power 2.4GHz" label { value: 0 label: "25mW" } label { value: 1 label: "100mW" } label { value: 2 label: "375mW" } label { value: 3 label: "500mW" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_RADIO_POWER_58" value: 32818 get_request { } get_response { field { type: UINT8 name: "Output Power 5.8GHz" label { value: 0 label: "TBA (Low)" } label { value: 1 label: "TBA" } label { value: 2 label: "TBA" } label { value: 3 label: "TBA (High)" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "Output Power 5.8GHz" label { value: 0 label: "TBA (Low)" } label { value: 1 label: "TBA" } label { value: 2 label: "TBA" } label { value: 3 label: "TBA (High)" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_MASK_24" value: 32819 get_request { } get_response { field { type: UINT8 name: "Mask 0" } field { type: UINT8 name: "Mask 1" } field { type: UINT8 name: "Mask 2" } field { type: UINT8 name: "Mask 3" } field { type: UINT8 name: "Mask 4" } field { type: UINT8 name: "Mask 5" } field { type: UINT8 name: "Mask 6" } field { type: UINT8 name: "Mask 7" } field { type: UINT8 name: "Mask 8" } field { type: UINT8 name: "Mask 9" } field { type: UINT8 name: "Mask 10" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "Mask 0" } field { type: UINT8 name: "Mask 1" } field { type: UINT8 name: "Mask 2" } field { type: UINT8 name: "Mask 3" } field { type: UINT8 name: "Mask 4" } field { type: UINT8 name: "Mask 5" } field { type: UINT8 name: "Mask 6" } field { type: UINT8 name: "Mask 7" } field { type: UINT8 name: "Mask 8" } field { type: UINT8 name: "Mask 9" } field { type: UINT8 name: "Mask 10" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_MASK_58" value: 32820 get_request { } get_response { field { type: UINT8 name: "Mask 0" } field { type: UINT8 name: "Mask 1" } field { type: UINT8 name: "Mask 2" } field { type: UINT8 name: "Mask 3" } field { type: UINT8 name: "Mask 4" } field { type: UINT8 name: "Mask 5" } field { type: UINT8 name: "Mask 6" } field { type: UINT8 name: "Mask 7" } field { type: UINT8 name: "Mask 8" } field { type: UINT8 name: "Mask 9" } field { type: UINT8 name: "Mask 10" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "Mask 0" } field { type: UINT8 name: "Mask 1" } field { type: UINT8 name: "Mask 2" } field { type: UINT8 name: "Mask 3" } field { type: UINT8 name: "Mask 4" } field { type: UINT8 name: "Mask 5" } field { type: UINT8 name: "Mask 6" } field { type: UINT8 name: "Mask 7" } field { type: UINT8 name: "Mask 8" } field { type: UINT8 name: "Mask 9" } field { type: UINT8 name: "Mask 10" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_RADIO_MODE" value: 32821 get_request { } get_response { field { type: UINT8 name: "Radio Mode" label { value: 0 label: "Receiver" } label { value: 1 label: "Transmitter G3" } label { value: 2 label: "Not used" } label { value: 3 label: "Transmitter G4 Compatibility mode" } label { value: 4 label: "Not used" } label { value: 5 label: "Transmitter G4S 2.4Ghz" } label { value: 6 label: "Transmitter G4S 5.8Ghz" } label { value: 7 label: "Transmitter G4S 2.4Ghz Repeater mode" } label { value: 8 label: "Transmitter G4S 5.8Ghz Repeater mode" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "Radio Mode" label { value: 0 label: "Receiver" } label { value: 1 label: "Transmitter G3" } label { value: 2 label: "Not used" } label { value: 3 label: "Transmitter G4 Compatibility mode" } label { value: 4 label: "Not used" } label { value: 5 label: "Transmitter G4S 2.4Ghz" } label { value: 6 label: "Transmitter G4S 5.8Ghz" } label { value: 7 label: "Transmitter G4S 2.4Ghz Repeater mode" } label { value: 8 label: "Transmitter G4S 5.8Ghz Repeater mode" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_RADIO_AHFSS" value: 32822 get_request { } get_response { field { type: BOOL name: "AFHSS_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "AFHSS_enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_AFHSS_MASK_24" value: 32823 get_request { } get_response { field { type: UINT8 name: "Mask 0" } field { type: UINT8 name: "Mask 1" } field { type: UINT8 name: "Mask 2" } field { type: UINT8 name: "Mask 3" } field { type: UINT8 name: "Mask 4" } field { type: UINT8 name: "Mask 5" } field { type: UINT8 name: "Mask 6" } field { type: UINT8 name: "Mask 7" } field { type: UINT8 name: "Mask 8" } field { type: UINT8 name: "Mask 9" } field { type: UINT8 name: "Mask 10" } } get_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_AFHSS_MASK_54" value: 32824 get_request { } get_response { field { type: UINT8 name: "Mask 0" } field { type: UINT8 name: "Mask 1" } field { type: UINT8 name: "Mask 2" } field { type: UINT8 name: "Mask 3" } field { type: UINT8 name: "Mask 4" } field { type: UINT8 name: "Mask 5" } field { type: UINT8 name: "Mask 6" } field { type: UINT8 name: "Mask 7" } field { type: UINT8 name: "Mask 8" } field { type: UINT8 name: "Mask 9" } field { type: UINT8 name: "Mask 10" } } get_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_SIGNAL_STRENGTH" value: 32832 get_request { } get_response { field { type: UINT8 name: "Signal Strength" } } get_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_DMX_TO_RDM_RATIO" value: 33536 get_request { } get_response { field { type: UINT8 name: "DMX to RDM ratio" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "DMX to RDM ratio" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_DOWNSTREAM_RDM" value: 33537 get_request { } get_response { field { type: BOOL name: "Downstream RDM enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "Downstream RDM enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "WDMX_IDENTIFY_PROXIES" value: 33792 set_request { field { type: BOOL name: "Identify Proxies enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 25972 manufacturer_name: "Electronic Theatre Controls, Inc." pid { name: "ETC_LED_CURVE" value: 33025 get_request { } get_response { field { type: UINT8 name: "curve_setting" label { value: 0 label: "Standard" } label { value: 1 label: "Incandescent" } label { value: 2 label: "Linear Response" } label { value: 3 label: "Quick Curve (No Smoothing)" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "curve_setting" label { value: 0 label: "Standard" } label { value: 1 label: "Incandescent" } label { value: 2 label: "Linear Response" } label { value: 3 label: "Quick Curve (No Smoothing)" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_LED_CURVE_DESCRIPTION" value: 33026 get_request { field { type: UINT8 name: "curve" } } get_response { field { type: UINT8 name: "curve_number" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_LED_STROBE" value: 33027 get_request { } get_response { field { type: BOOL name: "strobe_enabled" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "strobe_enabled" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_LED_OUTPUT_MODE" value: 33028 get_request { } get_response { field { type: UINT8 name: "output_mode" label { value: 0 label: "Regulated mode, droop com, LEDs dim at high temps" } label { value: 1 label: "Boost mode, no droop comp, LEDs dim at high temps" } label { value: 2 label: "Protected mode, LEDs are always dim to prevent overtemp." } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "output_mode" label { value: 0 label: "Regulated" } label { value: 1 label: "Boost" } label { value: 2 label: "Protected" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_LED_OUTPUT_MODE_DESCRIPTION" value: 33029 get_request { field { type: UINT8 name: "output_mode" } } get_response { field { type: UINT8 name: "output_mode" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_LED_RED_SHIFT" value: 33030 get_request { } get_response { field { type: BOOL name: "red_shift_enabled" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "red_shift_enabled" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_LED_WHITE_POINT" value: 33031 get_request { } get_response { field { type: UINT8 name: "white_point" label { value: 0 label: "2950K" } label { value: 1 label: "3200K" } label { value: 2 label: "5600K" } label { value: 3 label: "6500K" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "white_point" label { value: 0 label: "2950K" } label { value: 1 label: "3200K" } label { value: 2 label: "5600K" } label { value: 3 label: "6500K" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_LED_WHITE_POINT_DESCRIPTION" value: 33032 get_request { field { type: UINT8 name: "white_point" } } get_response { field { type: UINT8 name: "white_point" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_LED_FREQUENCY" value: 33033 get_request { } get_response { field { type: UINT16 name: "frequency" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "frequency" range { min: 900 max: 1500 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_DMX_LOSS_BEHAVIOR" value: 33034 get_request { } get_response { field { type: UINT8 name: "loss_behavior" label { value: 0 label: "Instant go dark." } label { value: 1 label: "Hold for 2 mins" } label { value: 2 label: "Hold forever" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "loss_behavior" label { value: 0 label: "Instant go dark." } label { value: 1 label: "Hold for 2 mins" } label { value: 2 label: "Hold forever" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_DMX_LOSS_BEHAVIOR_DESCRIPTION" value: 33035 get_request { field { type: UINT8 name: "loss_behavior" } } get_response { field { type: UINT8 name: "loss_behavior" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_LED_PLUS_SEVEN" value: 33036 get_request { } get_response { field { type: BOOL name: "plus_seven_enabled" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "plus_seven_enabled" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_BACKLIGHT_BRIGHTNESS" value: 33037 get_request { } get_response { field { type: UINT8 name: "backlight_brightness" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "backlight_brightness" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_BACKLIGHT_TIMEOUT" value: 33038 get_request { } get_response { field { type: UINT8 name: "backlight_timeout" label { value: 0 label: "Never" } label { value: 1 label: "30 seconds" } label { value: 2 label: "1 minute" } label { value: 3 label: "5 minutes" } label { value: 4 label: "15 minutes" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "backlight_timeout" label { value: 0 label: "Never" } label { value: 1 label: "30 seconds" } label { value: 2 label: "1 minute" } label { value: 3 label: "5 minutes" } label { value: 4 label: "15 minutes" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_STATUS_INDICATORS" value: 33039 get_request { } get_response { field { type: BOOL name: "status_indicators" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "status_indicators" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_RECALIBRATE_FIXTURE" value: 33040 set_request { } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_OVER_TEMP_MODE" value: 33041 get_request { } get_response { field { type: UINT8 name: "over_temperature_mode" label { value: 0 label: "Dark" } label { value: 1 label: "Red" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "over_temperature_mode" label { value: 0 label: "Dark" } label { value: 1 label: "Red" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_SIMPLE_SETUP_MODE" value: 33042 get_request { } get_response { field { type: UINT8 name: "quick_setup_mode" label { value: 0 label: "General Use" } label { value: 1 label: "State Setup" } label { value: 2 label: "Architectural Setup" } label { value: 3 label: "Effects Setup" } label { value: 4 label: "Studio Setup" } label { value: 5 label: "Advanced Setup" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "quick_setup_mode" label { value: 0 label: "General Use" } label { value: 1 label: "State Setup" } label { value: 2 label: "Architectural Setup" } label { value: 3 label: "Effects Setup" } label { value: 4 label: "Studio Setup" } label { value: 5 label: "Advanced Setup" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_LED_STROBE_DESCRIPTION" value: 33043 get_request { field { type: UINT8 name: "strobe_number" } } get_response { field { type: UINT8 name: "strobe_number" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_LED_RED_SHIFT_DESCRIPTION" value: 33044 get_request { field { type: UINT8 name: "red_shift_value" } } get_response { field { type: UINT8 name: "red_shift_value" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_LED_PLUS_SEVEN_DESCRIPTION" value: 33045 get_request { field { type: UINT8 name: "plus_seven_mode" } } get_response { field { type: UINT8 name: "plus_seven_mode" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_BACKLIGHT_TIMEOUT_DESCRIPTION" value: 33046 get_request { field { type: UINT8 name: "backlight_timeout" } } get_response { field { type: UINT8 name: "backlight_timeout" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_SIMPLE_SETUP_MODE_DESCRIPTION" value: 33047 get_request { field { type: UINT8 name: "simple_setup_mode" } } get_response { field { type: UINT8 name: "simple_setup_mode" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_OVER_TEMP_MODE_DESCRIPTION" value: 33048 get_request { field { type: UINT8 name: "over_temperature_mode" } } get_response { field { type: UINT8 name: "over_temperature_mode" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_SEQUENCE_PLAYBACK" value: 33055 get_request { } get_response { field { type: UINT16 name: "sequence" label { value: 0 label: "Off" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "sequence" label { value: 0 label: "Off" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_SEQUENCE_CONFIG" value: 33056 get_request { } get_response { } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_LOW_POWER_TIMEOUT" value: 33057 get_request { } get_response { field { type: UINT8 name: "low_power_timeout" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "low_power_timeout" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_LOW_POWER_TIMEOUT_DESCRIPTION" value: 33058 get_request { field { type: UINT8 name: "low_power_timeout" } } get_response { field { type: UINT8 name: "low_power_timeout" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_LED_FREQUENCY_ENUM" value: 33059 get_request { } get_response { field { type: UINT8 name: "frequency" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "frequency" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_LED_FREQUENCY_ENUM_DESCRIPTION" value: 33060 get_request { field { type: UINT8 name: "frequency" } } get_response { field { type: UINT8 name: "frequency" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_PRESET_CONFIG" value: 33061 get_request { } get_response { } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_HAS_ENUM_TEXT" value: 36865 get_request { } get_response { } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_GET_ENUM_TEXT" value: 36866 get_request { } get_response { } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_POWER_COMMAND" value: 40960 get_request { } get_response { field { type: UINT8 name: "power_command" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "power_command" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_POWER_COMMAND_DESCRIPTION" value: 40961 get_request { field { type: UINT8 name: "power_command" } } get_response { field { type: UINT8 name: "power_command" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "ETC_DALI_SHORT_ADDRESS" value: 40964 get_request { } get_response { field { type: UINT8 name: "dali_short_address" range { min: 0 max: 63 } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "dali_short_address" range { min: 0 max: 63 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_DALI_GROUP_MEMBERSHIP" value: 40965 get_request { } get_response { field { type: UINT16 name: "dali_group_membership" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "dali_group_membership" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_AUTOBIND" value: 40966 get_request { } get_response { field { type: BOOL name: "autobind" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "autobind" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "ETC_DELETE_SUBDEVICE" value: 40967 set_request { field { type: UINT16 name: "subdevice_number" range { min: 1 max: 512 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "ETC_PREPARE_FOR_SOFTWARE_DOWNLOAD" value: 61440 set_request { } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } manufacturer { manufacturer_id: 31344 manufacturer_name: "Open Lighting" pid { name: "SERIAL_NUMBER" value: 32768 set_request { field { type: UINT32 name: "serial_number" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CODE_VERSION" value: 32769 get_request { } get_response { field { type: STRING name: "code_version" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "MODEL_ID" value: 32770 get_request { } get_response { field { type: UINT16 name: "model_id" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "model_id" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "MODEL_ID_LIST" value: 32771 get_request { } get_response { field { type: GROUP name: "models" field { type: UINT16 name: "model_id" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "PIXEL_TYPE" value: 32773 get_request { } get_response { field { type: UINT16 name: "pixel_type" label { value: 1 label: "LPD8806" } label { value: 2 label: "WS2801" } label { value: 3 label: "P9813" } label { value: 4 label: "APA102" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "pixel_type" label { value: 1 label: "LPD8806" } label { value: 2 label: "WS2801" } label { value: 3 label: "P9813" } label { value: 4 label: "APA102" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PIXEL_COUNT" value: 32774 get_request { } get_response { field { type: UINT16 name: "pixel_count" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "pixel_count" range { min: 1 max: 65535 } } } set_response { } set_sub_device_range: ROOT_DEVICE } } version: 1605848134 ola-0.10.9/data/rdm/pids.proto0000664000175000017500000026255114376533110013034 00000000000000pid { name: "DISC_UNIQUE_BRANCH" value: 1 discovery_request { field { type: UID name: "lower_uid" } field { type: UID name: "upper_uid" } } discovery_response { } discovery_sub_device_range: ROOT_DEVICE } pid { name: "DISC_MUTE" value: 2 discovery_request { } discovery_response { field { type: UINT16 name: "control_field" } field { type: GROUP name: "binding_uid" field { type: UID name: "binding_uid" } } } discovery_sub_device_range: ROOT_DEVICE } pid { name: "DISC_UN_MUTE" value: 3 discovery_request { } discovery_response { field { type: UINT16 name: "control_field" } field { type: GROUP name: "binding_uid" field { type: UID name: "binding_uid" } } } discovery_sub_device_range: ROOT_DEVICE } pid { name: "PROXIED_DEVICES" value: 16 get_request { } get_response { field { type: GROUP name: "uids" field { type: UID name: "uid" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "PROXIED_DEVICE_COUNT" value: 17 get_request { } get_response { field { type: UINT16 name: "device_count" } field { type: BOOL name: "list_changed" } } get_sub_device_range: ROOT_DEVICE } pid { name: "COMMS_STATUS" value: 21 get_request { } get_response { field { type: UINT16 name: "short_message" } field { type: UINT16 name: "length_mismatch" } field { type: UINT16 name: "checksum_fail" } } get_sub_device_range: ROOT_DEVICE set_request { } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "QUEUED_MESSAGE" value: 32 get_request { field { type: UINT8 name: "status_type" label { value: 1 label: "Last Message" } label { value: 2 label: "Advisory" } label { value: 3 label: "Warning" } label { value: 4 label: "Error" } } } get_response { } get_sub_device_range: ROOT_DEVICE } pid { name: "STATUS_MESSAGES" value: 48 get_request { field { type: UINT8 name: "status_type" label { value: 0 label: "None" } label { value: 1 label: "Last Message" } label { value: 2 label: "Advisory" } label { value: 3 label: "Warning" } label { value: 4 label: "Error" } } } get_response { field { type: GROUP name: "messages" field { type: UINT16 name: "sub_device" } field { type: UINT8 name: "status_type" } field { type: UINT16 name: "message_id" } field { type: INT16 name: "value1" } field { type: INT16 name: "value2" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "STATUS_ID_DESCRIPTION" value: 49 get_request { field { type: UINT16 name: "status_id" } } get_response { field { type: STRING name: "label" max_size: 32 } } get_sub_device_range: ROOT_DEVICE } pid { name: "CLEAR_STATUS_ID" value: 50 set_request { } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SUB_DEVICE_STATUS_REPORT_THRESHOLD" value: 51 get_request { } get_response { field { type: UINT8 name: "status_type" } } get_sub_device_range: ONLY_SUBDEVICES set_request { field { type: UINT8 name: "status_type" label { value: 0 label: "None" } label { value: 2 label: "Advisory" } label { value: 3 label: "Warning" } label { value: 4 label: "Error" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SUPPORTED_PARAMETERS" value: 80 get_request { } get_response { field { type: GROUP name: "params" field { type: UINT16 name: "param_id" } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "PARAMETER_DESCRIPTION" value: 81 get_request { field { type: UINT16 name: "pid" } } get_response { field { type: UINT16 name: "pid" } field { type: UINT8 name: "pdl_size" } field { type: UINT8 name: "data_type" label { value: 0 label: "Not defined" } label { value: 1 label: "Bit field" } label { value: 2 label: "ASCII" } label { value: 3 label: "uint8" } label { value: 4 label: "int8" } label { value: 5 label: "uint16" } label { value: 6 label: "int16" } label { value: 7 label: "uint32" } label { value: 8 label: "int32" } range { min: 0 max: 8 } range { min: 128 max: 223 } } field { type: UINT8 name: "command_class" label { value: 1 label: "Get" } label { value: 2 label: "Set" } label { value: 3 label: "Get and Set" } } field { type: UINT8 name: "type" } field { type: UINT8 name: "unit" label { value: 0 label: "None" } label { value: 1 label: "Centigrade" } label { value: 2 label: "Volts (DC)" } label { value: 3 label: "Volts (AC Peak)" } label { value: 4 label: "Volts (AC RMS)" } label { value: 5 label: "Amps (DC)" } label { value: 6 label: "Amps (AC Peak)" } label { value: 7 label: "Amps (AC RMS)" } label { value: 8 label: "Hertz" } label { value: 9 label: "Ohms" } label { value: 10 label: "Watts" } label { value: 11 label: "Kilograms" } label { value: 12 label: "Meters" } label { value: 13 label: "Meters Squared" } label { value: 14 label: "Meters Cubed" } label { value: 15 label: "Kilograms per Meter Cubed" } label { value: 16 label: "Meters per Second" } label { value: 17 label: "Meters per Second Squared" } label { value: 18 label: "Newtons" } label { value: 19 label: "Joules" } label { value: 20 label: "Pascals" } label { value: 21 label: "Seconds" } label { value: 22 label: "Degrees" } label { value: 23 label: "Steradian" } label { value: 24 label: "Candela" } label { value: 25 label: "Lumens" } label { value: 26 label: "Lux" } label { value: 27 label: "Ire" } label { value: 28 label: "Bytes" } range { min: 0 max: 28 } range { min: 128 max: 255 } } field { type: UINT8 name: "prefix" label { value: 0 label: "None" } label { value: 1 label: "Deci" } label { value: 2 label: "Centi" } label { value: 3 label: "Milli" } label { value: 4 label: "Micro" } label { value: 5 label: "Nano" } label { value: 6 label: "Pico" } label { value: 7 label: "Femto" } label { value: 8 label: "Atto" } label { value: 9 label: "Zepto" } label { value: 10 label: "Yocto" } label { value: 17 label: "Deca" } label { value: 18 label: "Hecto" } label { value: 19 label: "Kilo" } label { value: 20 label: "Mega" } label { value: 21 label: "Giga" } label { value: 22 label: "Tera" } label { value: 23 label: "Peta" } label { value: 24 label: "Exa" } label { value: 25 label: "Zetta" } label { value: 26 label: "Yotta" } range { min: 0 max: 10 } range { min: 17 max: 26 } } field { type: UINT32 name: "min_value" } field { type: UINT32 name: "max_value" } field { type: UINT32 name: "default_value" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_DEVICE } pid { name: "DEVICE_INFO" value: 96 get_request { } get_response { field { type: UINT8 name: "protocol_major" } field { type: UINT8 name: "protocol_minor" } field { type: UINT16 name: "device_model" } field { type: UINT16 name: "product_category" label { value: 0 label: "Not declared" } label { value: 256 label: "Fixture" } label { value: 257 label: "Fixed fixture" } label { value: 258 label: "Moving yoke fixture" } label { value: 259 label: "Moving mirror fixture" } label { value: 511 label: "Fixture other" } label { value: 512 label: "Fixture accessory" } label { value: 513 label: "Fixture accessory color" } label { value: 514 label: "Fixture accessory yoke" } label { value: 515 label: "Fixture accessory mirror" } label { value: 516 label: "Fixture accessory effect" } label { value: 517 label: "Fixture accessory beam" } label { value: 767 label: "Fixture accessory other" } label { value: 768 label: "Projector" } label { value: 769 label: "Projector fixed" } label { value: 770 label: "Projector moving yoke" } label { value: 771 label: "Projector moving mirror" } label { value: 1023 label: "Projector other" } label { value: 1024 label: "Atmospheric" } label { value: 1025 label: "Atmospheric effect" } label { value: 1026 label: "Atmospheric pyro" } label { value: 1279 label: "Atmospheric other" } label { value: 1280 label: "Dimmer" } label { value: 1281 label: "Dimmer AC incandescent" } label { value: 1282 label: "Dimmer AC fluorescent" } label { value: 1283 label: "Dimmer AC cold cathode" } label { value: 1284 label: "Dimmer AC no dim" } label { value: 1285 label: "Dimmer AC ELV" } label { value: 1286 label: "Dimmer AC other" } label { value: 1287 label: "Dimmer DC level" } label { value: 1288 label: "Dimmer DC PWM" } label { value: 1289 label: "Dimmer DC LED" } label { value: 1535 label: "Dimmer other" } label { value: 1536 label: "Power" } label { value: 1537 label: "Power control" } label { value: 1538 label: "Power source" } label { value: 1791 label: "Power other" } label { value: 1792 label: "Scenic" } label { value: 1793 label: "Scenic drive" } label { value: 2047 label: "Scenic other" } label { value: 2048 label: "Data" } label { value: 2049 label: "Data distribution" } label { value: 2050 label: "Data conversion" } label { value: 2303 label: "Data other" } label { value: 2304 label: "A/V" } label { value: 2305 label: "A/V audio" } label { value: 2306 label: "A/V video" } label { value: 2559 label: "AV other" } label { value: 2560 label: "Monitor" } label { value: 2561 label: "AC line power monitor" } label { value: 2562 label: "DC power monitor" } label { value: 2563 label: "Environmental monitor" } label { value: 2815 label: "Other monitor" } label { value: 28672 label: "Control" } label { value: 28673 label: "Controller" } label { value: 28674 label: "Backup device" } label { value: 28927 label: "Other control" } label { value: 28928 label: "Test" } label { value: 28929 label: "Test equipment" } label { value: 29183 label: "Test equipment other" } label { value: 32767 label: "Other" } range { min: 0 max: 0 } range { min: 256 max: 259 } range { min: 511 max: 517 } range { min: 767 max: 771 } range { min: 1023 max: 1026 } range { min: 1279 max: 1289 } range { min: 1535 max: 1538 } range { min: 1791 max: 1793 } range { min: 2047 max: 2050 } range { min: 2303 max: 2306 } range { min: 2559 max: 2563 } range { min: 2815 max: 2815 } range { min: 28672 max: 28674 } range { min: 28927 max: 28929 } range { min: 32767 max: 32767 } range { min: 32768 max: 57343 } } field { type: UINT32 name: "software_version" } field { type: UINT16 name: "dmx_footprint" } field { type: UINT8 name: "current_personality" } field { type: UINT8 name: "personality_count" } field { type: UINT16 name: "dmx_start_address" } field { type: UINT16 name: "sub_device_count" } field { type: UINT8 name: "sensor_count" } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "PRODUCT_DETAIL_ID_LIST" value: 112 get_request { } get_response { field { type: GROUP name: "detail_ids" max_size: 6 field { type: UINT16 name: "detail_id" label { value: 0 label: "Not declared" } label { value: 1 label: "Arc Lamp" } label { value: 2 label: "Metal Halide Lamp" } label { value: 3 label: "Incandescent Lamp" } label { value: 4 label: "LED" } label { value: 5 label: "Fluorescent" } label { value: 6 label: "Cold Cathode" } label { value: 7 label: "Electro-luminescent" } label { value: 8 label: "Laser" } label { value: 9 label: "Flash Tube" } label { value: 256 label: "Color Scroller" } label { value: 257 label: "Color Wheel" } label { value: 258 label: "Color Changer (Semaphore or other type)" } label { value: 259 label: "Iris" } label { value: 260 label: "Dimming Shuttle" } label { value: 261 label: "Profile Shuttle" } label { value: 262 label: "Barndoor Shuttle" } label { value: 263 label: "Effects Disc" } label { value: 264 label: "Gobo Rotator" } label { value: 512 label: "Video" } label { value: 513 label: "Slide" } label { value: 514 label: "Film" } label { value: 515 label: "Oil Wheel" } label { value: 516 label: "LCD Gate" } label { value: 768 label: "Fogger, Glycol" } label { value: 769 label: "Fogger, Mineral Oil" } label { value: 770 label: "Fogger, Water" } label { value: 771 label: "Dry Ice/ Carbon Dioxide Device" } label { value: 772 label: "Nitrogen based" } label { value: 773 label: "Bubble or Foam Machine" } label { value: 774 label: "Propane Flame" } label { value: 775 label: "Other Flame" } label { value: 776 label: "Scents" } label { value: 777 label: "Snow Machine" } label { value: 778 label: "Water Jet" } label { value: 779 label: "Wind Machine" } label { value: 780 label: "Confetti Machine" } label { value: 781 label: "Hazard (Any form of pyrotechnic control or device.)" } label { value: 1024 label: "Phase Control" } label { value: 1025 label: "Phase Angle" } label { value: 1026 label: "Sine" } label { value: 1027 label: "PWM" } label { value: 1028 label: "DC" } label { value: 1029 label: "HF Ballast" } label { value: 1030 label: "HFHV Neon/Argon" } label { value: 1031 label: "HFHV Electroluminscent" } label { value: 1032 label: "Metal Halide Ballast" } label { value: 1033 label: "Bit Angle Modulation" } label { value: 1034 label: "Frequency Modulation" } label { value: 1035 label: "High Frequency 12V" } label { value: 1036 label: "Mechanical Relay" } label { value: 1037 label: "Electronic Relay" } label { value: 1038 label: "Electronic Switch" } label { value: 1039 label: "Contactor" } label { value: 1280 label: "Mirror Ball Rotator" } label { value: 1281 label: "Other Rotator" } label { value: 1282 label: "Kabuki Drop" } label { value: 1283 label: "Curtain" } label { value: 1284 label: "Line Set" } label { value: 1285 label: "Motor Control" } label { value: 1286 label: "Damper Control" } label { value: 1536 label: "Splitter" } label { value: 1537 label: "Ethernet Node" } label { value: 1538 label: "DMX512 Merger" } label { value: 1539 label: "Data Patch" } label { value: 1540 label: "Wireless link" } label { value: 1793 label: "Protocol Converter" } label { value: 1794 label: "DMX512 to DC Voltage" } label { value: 1795 label: "DC Voltage to DMX512" } label { value: 1796 label: "Switch Panel" } label { value: 2048 label: "Router" } label { value: 2049 label: "Fader, Single Channel" } label { value: 2050 label: "Mixer, Multi Channel" } label { value: 2304 label: "Manual Changeover" } label { value: 2305 label: "Auto Changeover" } label { value: 2306 label: "Test Device" } label { value: 2560 label: "GFI / RCD Device" } label { value: 2561 label: "Battery" } label { value: 2562 label: "Controllable Breaker" } label { value: 32767 label: "Other Device" } range { min: 0 max: 9 } range { min: 256 max: 264 } range { min: 512 max: 516 } range { min: 768 max: 781 } range { min: 1024 max: 1039 } range { min: 1280 max: 1286 } range { min: 1536 max: 1540 } range { min: 1792 max: 1796 } range { min: 2048 max: 2050 } range { min: 2304 max: 2306 } range { min: 2560 max: 2562 } range { min: 32767 max: 32767 } range { min: 32768 max: 57343 } } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DEVICE_MODEL_DESCRIPTION" value: 128 get_request { } get_response { field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "MANUFACTURER_LABEL" value: 129 get_request { } get_response { field { type: STRING name: "label" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DEVICE_LABEL" value: 130 get_request { } get_response { field { type: STRING name: "label" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: STRING name: "label" max_size: 32 } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "FACTORY_DEFAULTS" value: 144 get_request { } get_response { field { type: BOOL name: "using_defaults" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LANGUAGE_CAPABILITIES" value: 160 get_request { } get_response { field { type: GROUP name: "languages" field { type: STRING name: "language" min_size: 2 max_size: 2 } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "LANGUAGE" value: 176 get_request { } get_response { field { type: STRING name: "language" max_size: 2 } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: STRING name: "language" max_size: 2 } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SOFTWARE_VERSION_LABEL" value: 192 get_request { } get_response { field { type: STRING name: "label" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "BOOT_SOFTWARE_VERSION_ID" value: 193 get_request { } get_response { field { type: UINT32 name: "version" } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "BOOT_SOFTWARE_VERSION_LABEL" value: 194 get_request { } get_response { field { type: STRING name: "label" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DMX_PERSONALITY" value: 224 get_request { } get_response { field { type: UINT8 name: "current_personality" } field { type: UINT8 name: "personality_count" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "personality" range { min: 1 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DMX_PERSONALITY_DESCRIPTION" value: 225 get_request { field { type: UINT8 name: "personality" range { min: 1 max: 255 } } } get_response { field { type: UINT8 name: "personality" } field { type: UINT16 name: "slots_required" } field { type: STRING name: "name" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DMX_START_ADDRESS" value: 240 get_request { } get_response { field { type: UINT16 name: "dmx_address" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "dmx_address" range { min: 1 max: 512 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SLOT_INFO" value: 288 get_request { } get_response { field { type: GROUP name: "slots" field { type: UINT16 name: "slot_offset" } field { type: UINT8 name: "slot_type" label { value: 0 label: "Primary" } label { value: 1 label: "Secondary fine" } label { value: 2 label: "Secondary timing" } label { value: 3 label: "Secondary speed" } label { value: 4 label: "Secondary control" } label { value: 5 label: "Secondary index" } label { value: 6 label: "Secondary rotation speed" } label { value: 7 label: "Secondary rotation index" } label { value: 255 label: "Secondary undefined" } } field { type: UINT16 name: "slot_label_id" label { value: 1 label: "Intensity" } label { value: 2 label: "Intensity Master" } label { value: 257 label: "Pan" } label { value: 258 label: "Tilt" } label { value: 513 label: "Color Wheel" } label { value: 514 label: "Subtractive Color Mixer - Cyan/Blue" } label { value: 515 label: "Subtractive Color Mixer - Yellow/Amber" } label { value: 516 label: "Subtractive Color Mixer - Magenta" } label { value: 517 label: "Additive Color Mixer - Red" } label { value: 518 label: "Additive Color Mixer - Green" } label { value: 519 label: "Additive Color Mixer - Blue" } label { value: 520 label: "Color Temperature Correction" } label { value: 521 label: "Color Scroll" } label { value: 528 label: "Color Semaphore" } label { value: 529 label: "Additive Color Mixer - Amber" } label { value: 530 label: "Additive Color Mixer - White" } label { value: 531 label: "Additive Color Mixer - Warm White" } label { value: 532 label: "Additive Color Mixer - Cool White" } label { value: 533 label: "Subtractive Color Mixer - UV" } label { value: 534 label: "Hue" } label { value: 535 label: "Saturation" } label { value: 769 label: "Static gobo wheel" } label { value: 770 label: "Rotating gobo wheel" } label { value: 771 label: "Prism wheel" } label { value: 772 label: "Effects wheel" } label { value: 1025 label: "Beam size iris" } label { value: 1026 label: "Edge/Lens focus" } label { value: 1027 label: "Frost/Diffusion" } label { value: 1028 label: "Strobe/Shutter" } label { value: 1029 label: "Zoom lens" } label { value: 1030 label: "Framing shutter" } label { value: 1031 label: "Framing shutter rotation" } label { value: 1032 label: "Douser" } label { value: 1033 label: "Barn Door" } label { value: 1281 label: "Lamp control functions" } label { value: 1282 label: "Fixture control channel" } label { value: 1283 label: "Overall speed setting applied to multiple or all parameters" } label { value: 1284 label: "Macro control" } label { value: 1285 label: "Relay or power control" } label { value: 1286 label: "Fan control" } label { value: 1287 label: "Heater control" } label { value: 1288 label: "Fountain water pump control" } label { value: 65535 label: "No definition" } range { min: 0 max: 65503 } range { min: 65535 max: 65535 } } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "SLOT_DESCRIPTION" value: 289 get_request { field { type: UINT16 name: "slot_number" } } get_response { field { type: UINT16 name: "slot_number" } field { type: STRING name: "name" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DEFAULT_SLOT_VALUE" value: 290 get_request { } get_response { field { type: GROUP name: "slot_values" field { type: UINT16 name: "slot_offset" } field { type: UINT8 name: "default_slot_value" } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DMX_BLOCK_ADDRESS" value: 320 get_request { } get_response { field { type: UINT16 name: "sub_device_footprint" } field { type: UINT16 name: "base_dmx_address" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "base_dmx_address" range { min: 1 max: 512 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DMX_FAIL_MODE" value: 321 get_request { } get_response { field { type: UINT16 name: "scene_number" } field { type: UINT16 name: "loss_of_signal_delay" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT16 name: "hold_time" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "scene_number" label { value: 0 label: "Fixed Level" } range { min: 0 max: 255 } } field { type: UINT16 name: "loss_of_signal_delay" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT16 name: "hold_time" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DMX_STARTUP_MODE" value: 322 get_request { } get_response { field { type: UINT16 name: "scene_number" } field { type: UINT16 name: "startup_delay" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT16 name: "hold_time" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "scene_number" label { value: 0 label: "Fixed Level" } range { min: 0 max: 255 } } field { type: UINT16 name: "startup_delay" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT16 name: "hold_time" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SENSOR_DEFINITION" value: 512 get_request { field { type: UINT8 name: "sensor_number" range { min: 0 max: 254 } } } get_response { field { type: UINT8 name: "sensor_number" } field { type: UINT8 name: "type" label { value: 0 label: "Temperature" } label { value: 1 label: "Voltage" } label { value: 2 label: "Current" } label { value: 3 label: "Frequency" } label { value: 4 label: "Resistance" } label { value: 5 label: "Power" } label { value: 6 label: "Mass" } label { value: 7 label: "Length" } label { value: 8 label: "Area" } label { value: 9 label: "Volume" } label { value: 10 label: "Density" } label { value: 11 label: "Velocity" } label { value: 12 label: "Acceleration" } label { value: 13 label: "Force" } label { value: 14 label: "Energy" } label { value: 15 label: "Pressure" } label { value: 16 label: "Time" } label { value: 17 label: "Angle" } label { value: 18 label: "Position X" } label { value: 19 label: "Position Y" } label { value: 20 label: "Position Z" } label { value: 21 label: "Angular velocity" } label { value: 22 label: "Luminous intensity" } label { value: 23 label: "Luminous flux" } label { value: 24 label: "Illuminance" } label { value: 25 label: "Chrominance red" } label { value: 26 label: "Chrominance green" } label { value: 27 label: "Chrominance blue" } label { value: 28 label: "Contacts" } label { value: 29 label: "Memory" } label { value: 30 label: "Items" } label { value: 31 label: "Humidity" } label { value: 32 label: "16 bit counter" } label { value: 127 label: "Other" } range { min: 0 max: 32 } range { min: 127 max: 255 } } field { type: UINT8 name: "unit" label { value: 0 label: "None" } label { value: 1 label: "Centigrade" } label { value: 2 label: "Volts (DC)" } label { value: 3 label: "Volts (AC Peak)" } label { value: 4 label: "Volts (AC RMS)" } label { value: 5 label: "Amps (DC)" } label { value: 6 label: "Amps (AC Peak)" } label { value: 7 label: "Amps (AC RMS)" } label { value: 8 label: "Hertz" } label { value: 9 label: "Ohms" } label { value: 10 label: "Watts" } label { value: 11 label: "Kilograms" } label { value: 12 label: "Meters" } label { value: 13 label: "Meters Squared" } label { value: 14 label: "Meters Cubed" } label { value: 15 label: "Kilograms per Meter Cubed" } label { value: 16 label: "Meters per Second" } label { value: 17 label: "Meters per Second Squared" } label { value: 18 label: "Newtons" } label { value: 19 label: "Joules" } label { value: 20 label: "Pascals" } label { value: 21 label: "Seconds" } label { value: 22 label: "Degrees" } label { value: 23 label: "Steradian" } label { value: 24 label: "Candela" } label { value: 25 label: "Lumens" } label { value: 26 label: "Lux" } label { value: 27 label: "Ire" } label { value: 28 label: "Bytes" } range { min: 0 max: 28 } range { min: 128 max: 255 } } field { type: UINT8 name: "prefix" label { value: 0 label: "None" } label { value: 1 label: "Deci" } label { value: 2 label: "Centi" } label { value: 3 label: "Milli" } label { value: 4 label: "Micro" } label { value: 5 label: "Nano" } label { value: 6 label: "Pico" } label { value: 7 label: "Femto" } label { value: 8 label: "Atto" } label { value: 9 label: "Zepto" } label { value: 10 label: "Yocto" } label { value: 17 label: "Deca" } label { value: 18 label: "Hecto" } label { value: 19 label: "Kilo" } label { value: 20 label: "Mega" } label { value: 21 label: "Giga" } label { value: 22 label: "Tera" } label { value: 23 label: "Peta" } label { value: 24 label: "Exa" } label { value: 25 label: "Zetta" } label { value: 26 label: "Yotta" } range { min: 0 max: 10 } range { min: 17 max: 26 } } field { type: INT16 name: "range_min" label { value: -32768 label: "Undefined" } range { min: -32768 max: 32767 } } field { type: INT16 name: "range_max" label { value: 32767 label: "Undefined" } range { min: -32767 max: 32767 } } field { type: INT16 name: "normal_min" label { value: -32768 label: "Undefined" } range { min: -32768 max: 32767 } } field { type: INT16 name: "normal_max" label { value: 32767 label: "Undefined" } range { min: -32768 max: 32767 } } field { type: UINT8 name: "supports_recording" } field { type: STRING name: "name" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "SENSOR_VALUE" value: 513 get_request { field { type: UINT8 name: "sensor_number" range { min: 0 max: 254 } } } get_response { field { type: UINT8 name: "sensor_number" } field { type: INT16 name: "present_value" } field { type: INT16 name: "lowest" } field { type: INT16 name: "highest" } field { type: INT16 name: "recorded" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "sensor_number" label { value: 255 label: "All Sensors" } range { min: 0 max: 255 } } } set_response { field { type: UINT8 name: "sensor_number" } field { type: UINT16 name: "present_value" } field { type: UINT16 name: "lowest" } field { type: UINT16 name: "highest" } field { type: UINT16 name: "recorded" } } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "RECORD_SENSORS" value: 514 set_request { field { type: UINT8 name: "sensor_number" label { value: 255 label: "All Sensors" } range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DIMMER_INFO" value: 832 get_request { } get_response { field { type: UINT16 name: "minimum_level_lower" } field { type: UINT16 name: "minimum_level_upper" } field { type: UINT16 name: "maximum_level_lower" } field { type: UINT16 name: "maximum_level_upper" } field { type: UINT8 name: "number_curves_supported" } field { type: UINT8 name: "levels_resolution" range { min: 0 max: 16 } } field { type: BOOL name: "split_levels_supported" } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "MINIMUM_LEVEL" value: 833 get_request { } get_response { field { type: UINT16 name: "minimum_level_increasing" } field { type: UINT16 name: "minimum_level_decreasing" } field { type: BOOL name: "on_below_minimum" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "minimum_level_increasing" } field { type: UINT16 name: "minimum_level_decreasing" } field { type: BOOL name: "on_below_minimum" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "MAXIMUM_LEVEL" value: 834 get_request { } get_response { field { type: UINT16 name: "maximum_level" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "maximum_level" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CURVE" value: 835 get_request { } get_response { field { type: UINT8 name: "current_curve" } field { type: UINT8 name: "number_curves" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "curve" range { min: 1 max: 4080 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CURVE_DESCRIPTION" value: 836 get_request { field { type: UINT8 name: "curve_number" range { min: 1 max: 255 } } } get_response { field { type: UINT8 name: "curve_number" range { min: 1 max: 255 } } field { type: STRING name: "curve_description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "OUTPUT_RESPONSE_TIME" value: 837 get_request { } get_response { field { type: UINT8 name: "current_response_time" } field { type: UINT8 name: "number_response_options" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "response_time" range { min: 1 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "OUTPUT_RESPONSE_TIME_DESCRIPTION" value: 838 get_request { field { type: UINT8 name: "response_time" range { min: 1 max: 255 } } } get_response { field { type: UINT8 name: "response_time" range { min: 1 max: 255 } } field { type: STRING name: "response_time_description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "MODULATION_FREQUENCY" value: 839 get_request { } get_response { field { type: UINT8 name: "current_modulation_frequency" } field { type: UINT8 name: "number_modulation_frequencies" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "modulation_frequency" range { min: 1 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "MODULATION_FREQUENCY_DESCRIPTION" value: 840 get_request { field { type: UINT8 name: "modulation_frequency" range { min: 1 max: 255 } } } get_response { field { type: UINT8 name: "modulation_frequency" range { min: 1 max: 255 } } field { type: UINT32 name: "frequency" } field { type: STRING name: "modulation_frequency_description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DEVICE_HOURS" value: 1024 get_request { } get_response { field { type: UINT32 name: "hours" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "hours" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LAMP_HOURS" value: 1025 get_request { } get_response { field { type: UINT32 name: "hours" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "hours" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LAMP_STRIKES" value: 1026 get_request { } get_response { field { type: UINT32 name: "strikes" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "strikes" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LAMP_STATE" value: 1027 get_request { } get_response { field { type: UINT8 name: "state" label { value: 0 label: "Off" } label { value: 1 label: "On" } label { value: 2 label: "Strike" } label { value: 3 label: "Standby" } label { value: 4 label: "Not Present" } label { value: 127 label: "Error" } range { min: 0 max: 4 } range { min: 127 max: 223 } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "state" label { value: 0 label: "Off" } label { value: 1 label: "On" } label { value: 2 label: "Strike" } label { value: 3 label: "Standby" } range { min: 0 max: 3 } range { min: 128 max: 223 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LAMP_ON_MODE" value: 1028 get_request { } get_response { field { type: UINT8 name: "mode" label { value: 0 label: "Off" } label { value: 1 label: "DMX" } label { value: 2 label: "On" } label { value: 3 label: "On After Calibration" } range { min: 0 max: 3 } range { min: 128 max: 223 } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "Off" } label { value: 1 label: "DMX" } label { value: 2 label: "On" } label { value: 3 label: "On After Calibration" } range { min: 0 max: 3 } range { min: 128 max: 223 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DEVICE_POWER_CYCLES" value: 1029 get_request { } get_response { field { type: UINT32 name: "power_cycles" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "power_cycles" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "BURN_IN" value: 1088 get_request { } get_response { field { type: UINT8 name: "hours_remaining" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "hours" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DISPLAY_INVERT" value: 1280 get_request { } get_response { field { type: UINT8 name: "invert_status" label { value: 0 label: "Off" } label { value: 1 label: "On" } label { value: 2 label: "Auto" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "invert_status" label { value: 0 label: "Off" } label { value: 1 label: "On" } label { value: 2 label: "Auto" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DISPLAY_LEVEL" value: 1281 get_request { } get_response { field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PAN_INVERT" value: 1536 get_request { } get_response { field { type: BOOL name: "invert" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "invert" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "TILT_INVERT" value: 1537 get_request { } get_response { field { type: BOOL name: "invert" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "invert" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PAN_TILT_SWAP" value: 1538 get_request { } get_response { field { type: BOOL name: "swap" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "swap" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "REAL_TIME_CLOCK" value: 1539 get_request { } get_response { field { type: UINT16 name: "year" } field { type: UINT8 name: "month" } field { type: UINT8 name: "day" } field { type: UINT8 name: "hour" } field { type: UINT8 name: "minute" } field { type: UINT8 name: "second" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "year" range { min: 2003 max: 65535 } } field { type: UINT8 name: "month" range { min: 1 max: 12 } } field { type: UINT8 name: "day" range { min: 1 max: 31 } } field { type: UINT8 name: "hour" range { min: 0 max: 23 } } field { type: UINT8 name: "minute" range { min: 0 max: 59 } } field { type: UINT8 name: "second" range { min: 0 max: 60 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LOCK_PIN" value: 1600 get_request { } get_response { field { type: UINT16 name: "pin_code" range { min: 0 max: 9999 } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "new_pin_code" range { min: 0 max: 9999 } } field { type: UINT16 name: "current_pin_code" range { min: 0 max: 9999 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LOCK_STATE" value: 1601 get_request { } get_response { field { type: UINT8 name: "current_lock_state" label { value: 0 label: "Unlocked" } range { min: 0 max: 255 } } field { type: UINT8 name: "number_of_lock_states" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "pin_code" range { min: 0 max: 9999 } } field { type: UINT8 name: "lock_state" label { value: 0 label: "Unlocked" } range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LOCK_STATE_DESCRIPTION" value: 1602 get_request { field { type: UINT8 name: "lock_state" range { min: 1 max: 255 } } } get_response { field { type: UINT8 name: "lock_state" range { min: 1 max: 255 } } field { type: STRING name: "lock_state_description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "LIST_INTERFACES" value: 1792 get_request { } get_response { field { type: GROUP name: "interfaces" field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } field { type: UINT16 name: "interface_hardware_type" label { value: 1 label: "Ethernet" } range { min: 0 max: 65535 } } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "INTERFACE_LABEL" value: 1793 get_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } } get_response { field { type: UINT32 name: "interface_identifier" } field { type: STRING name: "interface_label" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "INTERFACE_HARDWARE_ADDRESS_TYPE1" value: 1794 get_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } } get_response { field { type: UINT32 name: "interface_identifier" } field { type: MAC name: "hardware_address" } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "IPV4_DHCP_MODE" value: 1795 get_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } } get_response { field { type: UINT32 name: "interface_identifier" } field { type: BOOL name: "dhcp" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } field { type: BOOL name: "dhcp" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "IPV4_ZEROCONF_MODE" value: 1796 get_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } } get_response { field { type: UINT32 name: "interface_identifier" } field { type: BOOL name: "zeroconf" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } field { type: BOOL name: "zeroconf" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "IPV4_CURRENT_ADDRESS" value: 1797 get_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } } get_response { field { type: UINT32 name: "interface_identifier" } field { type: IPV4 name: "ipv4_address" label { value: 0 label: "IPv4 Unconfigured" } } field { type: UINT8 name: "netmask" range { min: 0 max: 32 } } field { type: UINT8 name: "dhcp_status" label { value: 0 label: "Inactive" } label { value: 1 label: "Active" } label { value: 2 label: "Unknown" } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "IPV4_STATIC_ADDRESS" value: 1798 get_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } } get_response { field { type: UINT32 name: "interface_identifier" } field { type: IPV4 name: "ipv4_address" label { value: 0 label: "IPv4 Unconfigured" } } field { type: UINT8 name: "netmask" range { min: 0 max: 32 } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } field { type: IPV4 name: "ipv4_address" label { value: 0 label: "IPv4 Unconfigured" } } field { type: UINT8 name: "netmask" range { min: 0 max: 32 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "INTERFACE_RENEW_DHCP" value: 1799 set_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "INTERFACE_RELEASE_DHCP" value: 1800 set_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "INTERFACE_APPLY_CONFIGURATION" value: 1801 set_request { field { type: UINT32 name: "interface_identifier" range { min: 1 max: 4294967040 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "IPV4_DEFAULT_ROUTE" value: 1802 get_request { } get_response { field { type: UINT32 name: "interface_identifier" } field { type: IPV4 name: "ipv4_address" label { value: 0 label: "No Default Route" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "interface_identifier" label { value: 0 label: "No Default Route" } range { min: 0 max: 4294967040 } } field { type: IPV4 name: "ipv4_address" label { value: 0 label: "No Default Route" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DNS_IPV4_NAME_SERVER" value: 1803 get_request { field { type: UINT8 name: "name_server_index" range { min: 0 max: 2 } } } get_response { field { type: UINT8 name: "name_server_index" } field { type: IPV4 name: "name_server_address" label { value: 0 label: "IPv4 Unconfigured" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "name_server_index" range { min: 0 max: 2 } } field { type: IPV4 name: "name_server_address" label { value: 0 label: "IPv4 Unconfigured" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DNS_HOSTNAME" value: 1804 get_request { } get_response { field { type: STRING name: "dns_hostname" min_size: 1 max_size: 63 } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: STRING name: "dns_hostname" min_size: 1 max_size: 63 } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DNS_DOMAIN_NAME" value: 1805 get_request { } get_response { field { type: STRING name: "dns_domain_name" max_size: 231 } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: STRING name: "dns_domain_name" max_size: 231 } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SEARCH_DOMAIN" value: 2049 get_request { } get_response { field { type: STRING name: "search_domain" min_size: 0 max_size: 231 } } get_sub_device_range: ROOT_DEVICE set_request { field { type: STRING name: "search_domain" min_size: 0 max_size: 231 } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "BROKER_STATUS" value: 2051 get_request { } get_response { field { type: BOOL name: "set_allowed" } field { type: UINT8 name: "broker_state" label { value: 0 label: "Disabled" } label { value: 1 label: "Active" } label { value: 2 label: "Standby" } range { min: 0 max: 2 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "broker_state" label { value: 0 label: "Disabled" } label { value: 1 label: "Active" } range { min: 0 max: 1 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "ENDPOINT_LIST" value: 2304 get_request { } get_response { field { type: UINT32 name: "list_change_number" } field { type: GROUP name: "endpoints" field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: UINT8 name: "endpoint_type" label { value: 0 label: "Virtual Endpoint" } label { value: 1 label: "Physical Endpoint" } range { min: 0 max: 1 } } } } get_sub_device_range: ROOT_DEVICE } pid { name: "ENDPOINT_LIST_CHANGE" value: 2305 get_request { } get_response { field { type: UINT32 name: "list_change_number" } } get_sub_device_range: ROOT_DEVICE } pid { name: "IDENTIFY_ENDPOINT" value: 2306 get_request { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } } get_response { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: BOOL name: "identify_state" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } field { type: BOOL name: "identify_state" } } set_response { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } } set_sub_device_range: ROOT_DEVICE } pid { name: "ENDPOINT_TO_UNIVERSE" value: 2307 get_request { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } } get_response { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: UINT16 name: "universe" label { value: 0 label: "Unpatched" } label { value: 65535 label: "Composite" } range { min: 0 max: 63999 } range { min: 65535 max: 65535 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } field { type: UINT16 name: "universe" label { value: 0 label: "Unpatch" } range { min: 0 max: 63999 } } } set_response { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } } set_sub_device_range: ROOT_DEVICE } pid { name: "ENDPOINT_MODE" value: 2308 get_request { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } } get_response { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: UINT8 name: "endpoint_mode" label { value: 0 label: "Disabled" } label { value: 1 label: "Input" } label { value: 2 label: "Output" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } field { type: UINT8 name: "endpoint_mode" label { value: 0 label: "Disable" } label { value: 1 label: "Input" } label { value: 2 label: "Output" } } } set_response { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } } set_sub_device_range: ROOT_DEVICE } pid { name: "ENDPOINT_LABEL" value: 2309 get_request { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } } get_response { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: STRING name: "endpoint_label" max_size: 32 } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } field { type: STRING name: "endpoint_label" max_size: 32 } } set_response { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } } set_sub_device_range: ROOT_DEVICE } pid { name: "RDM_TRAFFIC_ENABLE" value: 2310 get_request { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } } get_response { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: BOOL name: "rdm_enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } field { type: BOOL name: "rdm_enabled" } } set_response { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } } set_sub_device_range: ROOT_DEVICE } pid { name: "DISCOVERY_STATE" value: 2311 get_request { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } } get_response { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: UINT16 name: "device_count" label { value: 0 label: "Incomplete" } label { value: 65535 label: "Unknown" } range { min: 0 max: 65535 } } field { type: UINT8 name: "discovery_state" label { value: 0 label: "Incomplete" } label { value: 1 label: "Incremental" } label { value: 2 label: "Full" } label { value: 4 label: "Completed" } range { min: 0 max: 2 } range { min: 4 max: 4 } range { min: 128 max: 223 } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } field { type: UINT8 name: "discovery_state" label { value: 1 label: "Incremental" } label { value: 2 label: "Full" } label { value: 4 label: "Stop" } range { min: 1 max: 2 } range { min: 4 max: 4 } range { min: 128 max: 223 } } } set_response { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } } set_sub_device_range: ROOT_DEVICE } pid { name: "BACKGROUND_DISCOVERY" value: 2312 get_request { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } } get_response { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: BOOL name: "background_discovery" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } field { type: BOOL name: "background_discovery" } } set_response { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } } set_sub_device_range: ROOT_DEVICE } pid { name: "ENDPOINT_TIMING" value: 2313 get_request { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } } get_response { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: UINT8 name: "current_setting" range { min: 1 max: 255 } } field { type: UINT8 name: "number_of_settings" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } field { type: UINT8 name: "timing_setting" range { min: 1 max: 255 } } } set_response { field { type: UINT16 name: "endpoint_id" label { value: 65535 label: "All Endpoints" } range { min: 1 max: 63999 } range { min: 65535 max: 65535 } } } set_sub_device_range: ROOT_DEVICE } pid { name: "ENDPOINT_TIMING_DESCRIPTION" value: 2314 get_request { field { type: UINT8 name: "timing_setting" range { min: 1 max: 255 } } } get_response { field { type: UINT8 name: "timing_setting" range { min: 1 max: 255 } } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_DEVICE } pid { name: "ENDPOINT_RESPONDERS" value: 2315 get_request { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } } get_response { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: UINT32 name: "list_change_number" } field { type: GROUP name: "uids" field { type: UID name: "uid" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "ENDPOINT_RESPONDER_LIST_CHANGE" value: 2316 get_request { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } } get_response { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: UINT32 name: "list_change_number" } } get_sub_device_range: ROOT_DEVICE } pid { name: "BINDING_CONTROL_FIELDS" value: 2317 get_request { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: UID name: "uid" } } get_response { field { type: UINT16 name: "endpoint_id" range { min: 1 max: 63999 } } field { type: UID name: "uid" } field { type: UINT16 name: "control_bits" } field { type: UID name: "binding_uid" label { value: 0 label: "No Information Present" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "BACKGROUND_QUEUED_STATUS_POLICY" value: 2318 get_request { } get_response { field { type: UINT8 name: "current_policy_setting" label { value: 0 label: "None" } label { value: 1 label: "Advisory" } label { value: 2 label: "Warning" } label { value: 3 label: "Error" } range { min: 0 max: 255 } } field { type: UINT8 name: "num_policy_settings" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "policy" label { value: 0 label: "None" } label { value: 1 label: "Advisory" } label { value: 2 label: "Warning" } label { value: 3 label: "Error" } range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "BACKGROUND_QUEUED_STATUS_POLICY_DESCRIPTION" value: 2319 get_request { field { type: UINT8 name: "policy_setting" label { value: 0 label: "None" } label { value: 1 label: "Advisory" } label { value: 2 label: "Warning" } label { value: 3 label: "Error" } range { min: 0 max: 255 } } } get_response { field { type: UINT8 name: "policy_setting" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "IDENTIFY_DEVICE" value: 4096 get_request { } get_response { field { type: BOOL name: "identify_state" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "identify_state" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "RESET_DEVICE" value: 4097 set_request { field { type: UINT8 name: "reset_mode" label { value: 1 label: "Warm" } label { value: 255 label: "Cold" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "POWER_STATE" value: 4112 get_request { } get_response { field { type: UINT8 name: "power_state" label { value: 0 label: "Full Off" } label { value: 1 label: "Shutdown" } label { value: 2 label: "Standby" } label { value: 255 label: "Normal" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "power_state" label { value: 0 label: "Full Off" } label { value: 1 label: "Shutdown" } label { value: 2 label: "Standby" } label { value: 255 label: "Normal" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PERFORM_SELFTEST" value: 4128 get_request { } get_response { field { type: BOOL name: "tests_active" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "test_number" label { value: 0 label: "Off" } label { value: 255 label: "All" } range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SELF_TEST_DESCRIPTION" value: 4129 get_request { field { type: UINT8 name: "test_number" } } get_response { field { type: UINT8 name: "test_number" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "CAPTURE_PRESET" value: 4144 set_request { field { type: UINT16 name: "scene" range { min: 1 max: 65534 } } field { type: UINT16 name: "fade_up_time" multiplier: -1 } field { type: UINT16 name: "fade_down_time" multiplier: -1 } field { type: UINT16 name: "wait_time" multiplier: -1 } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PRESET_PLAYBACK" value: 4145 get_request { } get_response { field { type: UINT16 name: "mode" label { value: 0 label: "Off" } label { value: 65535 label: "All" } range { min: 0 max: 65535 } } field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "mode" label { value: 0 label: "Off" } label { value: 65535 label: "All" } range { min: 0 max: 65535 } } field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "IDENTIFY_MODE" value: 4160 get_request { } get_response { field { type: UINT8 name: "identify_mode" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "identify_mode" label { value: 0 label: "Quiet" } label { value: 255 label: "Loud" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PRESET_INFO" value: 4161 get_request { } get_response { field { type: BOOL name: "level_field_supported" } field { type: BOOL name: "preset_sequence_supported" } field { type: BOOL name: "split_times_supported" } field { type: BOOL name: "fail_infinite_delay_supported" } field { type: BOOL name: "fail_infinite_hold_supported" } field { type: BOOL name: "startup_infinite_hold_supported" } field { type: UINT16 name: "max_scene_number" } field { type: UINT16 name: "min_preset_fade_time" multiplier: -1 } field { type: UINT16 name: "max_preset_fade_time" multiplier: -1 } field { type: UINT16 name: "min_preset_wait_time" multiplier: -1 } field { type: UINT16 name: "max_preset_wait_time" multiplier: -1 } field { type: UINT16 name: "min_fail_delay_time" multiplier: -1 } field { type: UINT16 name: "max_fail_delay_time" multiplier: -1 } field { type: UINT16 name: "min_fail_hold_time" multiplier: -1 } field { type: UINT16 name: "max_fail_hold_time" multiplier: -1 } field { type: UINT16 name: "min_startup_delay_time" multiplier: -1 } field { type: UINT16 name: "max_startup_delay_time" multiplier: -1 } field { type: UINT16 name: "min_startup_hold_time" multiplier: -1 } field { type: UINT16 name: "max_startup_hold_time" multiplier: -1 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "PRESET_STATUS" value: 4162 get_request { field { type: UINT16 name: "scene_number" range { min: 1 max: 65534 } } } get_response { field { type: UINT16 name: "scene_number" range { min: 1 max: 65534 } } field { type: UINT16 name: "up_fade_time" multiplier: -1 } field { type: UINT16 name: "down_fade_time" multiplier: -1 } field { type: UINT16 name: "wait_time" multiplier: -1 } field { type: UINT8 name: "programmed" label { value: 0 label: "Not Programmed" } label { value: 1 label: "Programmed" } label { value: 2 label: "Read Only" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "scene_number" range { min: 1 max: 65534 } } field { type: UINT16 name: "up_fade_time" multiplier: -1 } field { type: UINT16 name: "down_fade_time" multiplier: -1 } field { type: UINT16 name: "wait_time" multiplier: -1 } field { type: BOOL name: "clear_preset" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PRESET_MERGEMODE" value: 4163 get_request { } get_response { field { type: UINT8 name: "merge_mode" label { value: 0 label: "Default" } label { value: 1 label: "HTP" } label { value: 2 label: "LTP" } label { value: 3 label: "DMX Only" } label { value: 255 label: "Other" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "merge_mode" label { value: 0 label: "Default" } label { value: 1 label: "HTP" } label { value: 2 label: "LTP" } label { value: 3 label: "DMX Only" } label { value: 255 label: "Other" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "POWER_ON_SELF_TEST" value: 4164 get_request { } get_response { field { type: BOOL name: "power_on_self_test" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "power_on_self_test" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } version: 1605848134 ola-0.10.9/data/rdm/PidDataTest.py0000775000175000017500000000276214376533110013527 00000000000000#!/usr/bin/python # This library is free software; you can redistribute it and/or # modify it under the terms of the GNU Lesser General Public # License as published by the Free Software Foundation; either # version 2.1 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Lesser General Public License for more details. # # You should have received a copy of the GNU Lesser General Public # License along with this library; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA # # PidDataTest.py # Copyright (C) 2013 Simon Newton """Test to check we can load the Pid data in Python.""" import os import unittest from ola import PidStore __author__ = 'nomis52@gmail.com (Simon Newton)' class PidDataTest(unittest.TestCase): # Implement assertIsNotNone for Python runtimes < 2.7 or < 3.1 # Copied from: # https://github.com/nvie/rq/commit/f5951900c8e79a116c59470b8f5b2f544000bf1f if not hasattr(unittest.TestCase, 'assertIsNotNone'): def assertIsNotNone(self, value, *args): self.assertNotEqual(value, None, *args) def testLoad(self): store = PidStore.GetStore(os.environ['PIDDATA']) self.assertIsNotNone(store) pids = store.Pids() self.assertNotEqual(0, len(pids)) if __name__ == '__main__': unittest.main() ola-0.10.9/data/rdm/download.sh0000775000175000017500000000061514376533110013145 00000000000000#!/bin/bash -x # # Fetch the new PIDs definition files from the RDM PID Index datahost="rdm.openlighting.org" if [ ! -z $1 ]; then datahost=$1 fi echo "Fetching PID data from $datahost" curl -o pids.proto -f http://$datahost/download?pids=esta curl -o draft_pids.proto -f http://$datahost/download?pids=esta-draft curl -o manufacturer_pids.proto -f http://$datahost/download?pids=manufacturers ola-0.10.9/data/rdm/draft_pids.proto0000664000175000017500000000002414376533110014175 00000000000000version: 1605848134 ola-0.10.9/data/rdm/Makefile.mk0000664000175000017500000000200714376533110013042 00000000000000# DATA ################################################ dist_piddata_DATA = \ data/rdm/draft_pids.proto \ data/rdm/pids.proto \ data/rdm/manufacturer_pids.proto # SCRIPTS ################################################ dist_noinst_SCRIPTS += \ data/rdm/download.sh \ data/rdm/PidDataTest.py # TESTS ################################################ if BUILD_TESTS test_programs += data/rdm/PidDataTester if BUILD_PYTHON_LIBS test_scripts += data/rdm/PidDataTest.sh endif endif data/rdm/PidDataTest.sh: data/rdm/Makefile.mk echo "PYTHONPATH=${top_builddir}/python PIDDATA=${srcdir}/data/rdm $(PYTHON) ${srcdir}/data/rdm/PidDataTest.py; exit \$$?" > data/rdm/PidDataTest.sh chmod +x data/rdm/PidDataTest.sh data_rdm_PidDataTester_SOURCES = data/rdm/PidDataTest.cpp data_rdm_PidDataTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) -DDATADIR=\"$(srcdir)/data/rdm\" data_rdm_PidDataTester_LDADD = $(COMMON_TESTING_LIBS) CLEANFILES += \ data/rdm/*.pyc \ data/rdm/PidDataTest.sh \ data/rdm/__pycache__/* ola-0.10.9/aclocal.m40000664000175000017500000014466214376533144011166 00000000000000# generated automatically by aclocal 1.15 -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # Copyright (C) 2002-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.15' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.15], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.15])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. dnl Redefine AC_PROG_CC to automatically invoke _AM_PROG_CC_C_O. m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC]) [_AM_PROG_CC_C_O ]) # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END AC_MSG_ERROR([Your 'rm' program is bad, sorry.]) fi fi dnl The trailing newline in this macro's definition is deliberate, for dnl backward compatibility and to allow trailing 'dnl'-style comments dnl after the AM_INIT_AUTOMAKE invocation. See automake bug#16841. ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_CC_C_O # --------------- # Like AC_PROG_CC_C_O, but changed for automake. We rewrite AC_PROG_CC # to automatically call this. AC_DEFUN([_AM_PROG_CC_C_O], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl AC_LANG_PUSH([C])dnl AC_CACHE_CHECK( [whether $CC understands -c and -o together], [am_cv_prog_cc_c_o], [AC_LANG_CONFTEST([AC_LANG_PROGRAM([])]) # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if AM_RUN_LOG([$CC -c conftest.$ac_ext -o conftest2.$ac_objext]) \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i]) if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi AC_LANG_POP([C])]) # For backward compatibility. AC_DEFUN_ONCE([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC])]) # Copyright (C) 1999-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PATH_PYTHON([MINIMUM-VERSION], [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # --------------------------------------------------------------------------- # Adds support for distributing Python modules and packages. To # install modules, copy them to $(pythondir), using the python_PYTHON # automake variable. To install a package with the same name as the # automake package, install to $(pkgpythondir), or use the # pkgpython_PYTHON automake variable. # # The variables $(pyexecdir) and $(pkgpyexecdir) are provided as # locations to install python extension modules (shared libraries). # Another macro is required to find the appropriate flags to compile # extension modules. # # If your package is configured with a different prefix to python, # users will have to add the install directory to the PYTHONPATH # environment variable, or create a .pth file (see the python # documentation for details). # # If the MINIMUM-VERSION argument is passed, AM_PATH_PYTHON will # cause an error if the version of python installed on the system # doesn't meet the requirement. MINIMUM-VERSION should consist of # numbers and dots only. AC_DEFUN([AM_PATH_PYTHON], [ dnl Find a Python interpreter. Python versions prior to 2.0 are not dnl supported. (2.0 was released on October 16, 2000). m4_define_default([_AM_PYTHON_INTERPRETER_LIST], [python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 dnl python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0]) AC_ARG_VAR([PYTHON], [the Python interpreter]) m4_if([$1],[],[ dnl No version check is needed. # Find any Python interpreter. if test -z "$PYTHON"; then AC_PATH_PROGS([PYTHON], _AM_PYTHON_INTERPRETER_LIST, :) fi am_display_PYTHON=python ], [ dnl A version check is needed. if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. AC_MSG_CHECKING([whether $PYTHON version is >= $1]) AM_PYTHON_CHECK_VERSION([$PYTHON], [$1], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]) AC_MSG_ERROR([Python interpreter is too old])]) am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. AC_CACHE_CHECK([for a Python interpreter with version >= $1], [am_cv_pathless_PYTHON],[ for am_cv_pathless_PYTHON in _AM_PYTHON_INTERPRETER_LIST none; do test "$am_cv_pathless_PYTHON" = none && break AM_PYTHON_CHECK_VERSION([$am_cv_pathless_PYTHON], [$1], [break]) done]) # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else AC_PATH_PROG([PYTHON], [$am_cv_pathless_PYTHON]) fi am_display_PYTHON=$am_cv_pathless_PYTHON fi ]) if test "$PYTHON" = :; then dnl Run any user-specified action, or abort. m4_default([$3], [AC_MSG_ERROR([no suitable Python interpreter found])]) else dnl Query Python for its version number. Getting [:3] seems to be dnl the best way to do this; it's what "site.py" does in the standard dnl library. AC_CACHE_CHECK([for $am_display_PYTHON version], [am_cv_python_version], [am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[[:3]])"`]) AC_SUBST([PYTHON_VERSION], [$am_cv_python_version]) dnl Use the values of $prefix and $exec_prefix for the corresponding dnl values of PYTHON_PREFIX and PYTHON_EXEC_PREFIX. These are made dnl distinct variables so they can be overridden if need be. However, dnl general consensus is that you shouldn't need this ability. AC_SUBST([PYTHON_PREFIX], ['${prefix}']) AC_SUBST([PYTHON_EXEC_PREFIX], ['${exec_prefix}']) dnl At times (like when building shared libraries) you may want dnl to know which OS platform Python thinks this is. AC_CACHE_CHECK([for $am_display_PYTHON platform], [am_cv_python_platform], [am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"`]) AC_SUBST([PYTHON_PLATFORM], [$am_cv_python_platform]) # Just factor out some code duplication. am_python_setup_sysconfig="\ import sys # Prefer sysconfig over distutils.sysconfig, for better compatibility # with python 3.x. See automake bug#10227. try: import sysconfig except ImportError: can_use_sysconfig = 0 else: can_use_sysconfig = 1 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: # try: from platform import python_implementation if python_implementation() == 'CPython' and sys.version[[:3]] == '2.7': can_use_sysconfig = 0 except ImportError: pass" dnl Set up 4 directories: dnl pythondir -- where to install python scripts. This is the dnl site-packages directory, not the python standard library dnl directory like in previous automake betas. This behavior dnl is more consistent with lispdir.m4 for example. dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON script directory], [am_cv_python_pythondir], [if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pythondir], [$am_cv_python_pythondir]) dnl pkgpythondir -- $PACKAGE directory under pythondir. Was dnl PYTHON_SITE_PACKAGE in previous betas, but this naming is dnl more consistent with the rest of automake. AC_SUBST([pkgpythondir], [\${pythondir}/$PACKAGE]) dnl pyexecdir -- directory for installing python extension modules dnl (shared libraries) dnl Query distutils for this directory. AC_CACHE_CHECK([for $am_display_PYTHON extension module directory], [am_cv_python_pyexecdir], [if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac ]) AC_SUBST([pyexecdir], [$am_cv_python_pyexecdir]) dnl pkgpyexecdir -- $(pyexecdir)/$(PACKAGE) AC_SUBST([pkgpyexecdir], [\${pyexecdir}/$PACKAGE]) dnl Run any user-specified action. $2 fi ]) # AM_PYTHON_CHECK_VERSION(PROG, VERSION, [ACTION-IF-TRUE], [ACTION-IF-FALSE]) # --------------------------------------------------------------------------- # Run ACTION-IF-TRUE if the Python interpreter PROG has version >= VERSION. # Run ACTION-IF-FALSE otherwise. # This test uses sys.hexversion instead of the string equivalent (first # word of sys.version), in order to cope with versions such as 2.2c1. # This supports Python 2.0 or higher. (2.0 was released on October 16, 2000). AC_DEFUN([AM_PYTHON_CHECK_VERSION], [prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '$2'.split('.'))) + [[0, 0, 0]] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[[i]] sys.exit(sys.hexversion < minverhex)" AS_IF([AM_RUN_LOG([$1 -c "$prog"])], [$3], [$4])]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2014 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([config/ac_prog_java_cc.m4]) m4_include([config/ac_pthread_set_name.m4]) m4_include([config/ac_saleae.m4]) m4_include([config/acx_pthread.m4]) m4_include([config/ax_have_epoll.m4]) m4_include([config/ax_prog_doxygen.m4]) m4_include([config/ax_python_module.m4]) m4_include([config/libtool.m4]) m4_include([config/ltoptions.m4]) m4_include([config/ltsugar.m4]) m4_include([config/ltversion.m4]) m4_include([config/lt~obsolete.m4]) m4_include([config/maven.m4]) m4_include([config/ola.m4]) m4_include([config/pkg.m4]) m4_include([config/resolv.m4]) m4_include([config/stl_hash.m4]) ola-0.10.9/man/0000775000175000017500000000000014376533270010144 500000000000000ola-0.10.9/man/ola_artnet.10000664000175000017500000000232514376533110012271 00000000000000.TH ola_artnet 1 "July 2013" .SH NAME ola_artnet \- Configure ArtNet devices managed by OLA. .SH SYNOPSIS .B ola_artnet -d -n -l -s .SH DESCRIPTION .B ola_artnet is used to configure ArtNet devices managed by OLA. .SH OPTIONS .IP "-d, --device " Id of the ArtNet device to configure. .IP "--net " Set the net parameter of the ArtNet device. .IP "-h, --help" Display the help message .IP "-l, --log-level " Set the logging level 0 .. 4. .IP "-n, --name " Set the name of the ArtNet device. .IP "-s, --subnet " Set the subnet parameter of the ArtNet device. .IP "-u, --universe " List the IPs of ArtNet devices for this universe. .IP "-v, --version" Display version information .IP "--long-name " Set the long name of the ArtNet device. .IP "--syslog" Send to syslog rather than stderr. .IP "--no-use-epoll" Disable the use of epoll(), revert to select() .IP "--no-use-kqueue" Disable the use of kqueue(), revert to select() .IP "--scheduler-policy " The thread scheduling policy, one of {fifo, rr}. .IP "--scheduler-priority " The thread priority, only used if --scheduler-policy is set. .SH SEE ALSO .BR olad(1) , . ola-0.10.9/man/ola_uni_name.10000664000175000017500000000063714376533110012573 00000000000000.TH ola_uni_name 1 "June 2015" .SH NAME ola_uni_name \- Set the name for a universe in olad. .SH SYNOPSIS .B ola_uni_name --name --universe .SH DESCRIPTION .B ola_uni_name is used to set the name for a universe. .SH OPTIONS .IP "-n, --name " Name for the universe. .IP "-u, --universe " Id of the universe to name. .IP "-h, --help" Display the help message .SH SEE ALSO .BR olad(1) , . ola-0.10.9/man/rdm_responder_test.py.10000664000175000017500000000404014376533110014466 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. .TH RDM_RESPONDER_TEST.PY "1" "October 2015" "rdm_responder_test.py " "User Commands" .SH NAME rdm_responder_test.py \- Test RDM responders for adherence to the standards .SH SYNOPSIS .B rdm_responder_test.py [\fIoptions\fR] \fI\fR .SH DESCRIPTION Run a series of tests on a RDM responder to check the behaviour. This requires the OLA server to be running, and the RDM device to have been detected. You can confirm this by running ola_rdm_discover \fB\-u\fR UNIVERSE. This will send SET commands to the broadcast UIDs which means the start address, device label etc. will be changed for all devices connected to the responder. Think twice about running this on your production lighting rig. .SH OPTIONS .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-c\fR SLOT_COUNT, \fB\-\-slot\-count\fR=\fISLOT_COUNT\fR Number of slots to send when sending DMX. .TP \fB\-d\fR, \fB\-\-debug\fR Print debug information to assist in diagnosing failures. .TP \fB\-f\fR DMX_FRAME_RATE, \fB\-\-dmx\-frame\-rate\fR=\fIDMX_FRAME_RATE\fR Send DMX frames at this rate in the background. .TP \fB\-l\fR FILE, \fB\-\-log\fR=\fIFILE\fR Also log to the file named FILE.uid.timestamp. .TP \fB\-\-list\-tests\fR Display a list of all tests .TP \fB\-p\fR DIR, \fB\-\-pid\-location\fR=\fIDIR\fR The location of the PID definitions. .TP \fB\-s\fR, \fB\-\-skip\-check\fR Skip the check for multiple devices. .TP \fB\-t\fR TEST1,TEST2, \fB\-\-tests\fR=\fITEST1\fR,TEST2 A comma separated list of tests to run. .TP \fB\-\-timestamp\fR Add timestamps to each test. .TP \fB\-\-no\-factory\-defaults\fR Don't run the SET factory defaults tests .TP \fB\-w\fR BROADCAST_WRITE_DELAY, \fB\-\-broadcast\-write\-delay\fR=\fIBROADCAST_WRITE_DELAY\fR The time in ms to wait after sending broadcast setcommands. .TP \fB\-u\fR UNIVERSE, \fB\-\-universe\fR=\fIUNIVERSE\fR The universe number to use, default is universe 0. .TP \fB\-\-inter\-test\-delay\fR=\fIINTER_TEST_DELAY\fR The delay in ms to wait between tests, defaults to 0. ola-0.10.9/man/rdm_model_collector.py.10000664000175000017500000000150514376533110014577 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. .TH RDM_MODEL_COLLECTOR.PY "1" "October 2015" "rdm_model_collector.py " "User Commands" .SH NAME rdm_model_collector.py \- Gather RDM model info from responders .SH SYNOPSIS .B rdm_model_collector.py \fI--universe \fR .SH DESCRIPTION Collect information about responders attached to a universe and output in a format that can be imported into the RDM manufacturer index (http://rdm.openlighting.org/) .TP \fB\-d\fR, \fB\-\-debug\fR Print extra debug info. .TP \fB\-h\fR, \fB\-\-help\fR Display this help message and exit. .TP \fB\-p\fR, \fB\-\-pid\-location\fR The directory to read PID definitions from. .TP \fB\-\-skip\-queued\-messages\fR Don't attempt to fetch queued messages for the device. .HP \fB\-u\fR, \fB\-\-universe\fR Universe number. ola-0.10.9/man/ola_rdm_set.10000664000175000017500000000155614376533110012436 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. .TH OLA_RDM_SET "1" "December 2015" "ola_rdm_set " "User Commands" .SH NAME ola_rdm_set \- Set the value of a PID for an RDM device .SH SYNOPSIS .B ola_rdm_set \fI--universe --uid \fR .SH DESCRIPTION Set the value of a PID for a device. Use 'ola_rdm_set \fB\-\-list\-pids\fR' to get a list of PIDs. .TP \fB\-\-frames\fR display the raw RDM frames if available. .TP \fB\-\-uid\fR the UID of the device to control. .HP \fB\-d\fR, \fB\-\-sub\-device\fR target a particular sub device (default is 0) .TP \fB\-h\fR, \fB\-\-help\fR display this help message and exit. .TP \fB\-l\fR, \fB\-\-list\-pids\fR display a list of PIDs .TP \fB\-p\fR, \fB\-\-pid\-location\fR the directory to read PID definitions from .HP \fB\-u\fR, \fB\-\-universe\fR universe number. ola-0.10.9/man/ola_dmxmonitor.10000664000175000017500000000155414376533110013177 00000000000000.TH ola_dmxmonitor 1 "March 2013" .SH NAME ola_dmxmonitor \- Monitor the DMX512 values on an OLA universe. .SH SYNOPSIS .B ola_dmxmonitor [-u .I universe-id .B ] .SH DESCRIPTION .B ola_dmxmonitor provides a simple monitor for DMX512 data. .SH OPTIONS .IP "-u, --universe " The universe ID to monitor. .IP "-h, --help" Displays a short help message. .SH CONTROLS Once running, the following keys control the behavior: .IP "m, M" Toggle display modes: hex, DMX and decimal. .IP "n, N" Toggle channel (slot) indexing mode. 0-indexed or 1-indexed. .IP "p, P" Toggle display palette. .IP "q, Q" Quit the program .IP "Arrow keys or k, j, h, l or K, J, H, L" Move the channel (slot) cursor. .IP "Home" Move the channel (slot) cursor to the first channel. .IP "End" Move the channel (slot) cursor to the last channel. .SH SEE ALSO .BR ola_dmxconsole(1) , .BR olad(1) , . ola-0.10.9/man/ola_usbpro.10000664000175000017500000000315614376533110012311 00000000000000.TH ola_usbpro 1 "July 2013" .SH NAME ola_usbpro \- Configure Enttec USB Pro Devices managed by OLA. .SH SYNOPSIS .B ola_usbpro -d [--serial | -p --g | -p -b -m -r ] .SH DESCRIPTION .B ola_usbpro is used to query and control the parameters of Enttec USB Pro devices. .SH OPTIONS .IP "-a, --assignments" Get the port assignments. .IP "-b, --brk " Set the break time (9 - 127). .IP "-d, --device " Id of the device to control. .IP "-g, --get-params" Get the current parameters. .IP "-h, --help" Display the help message .IP "-l, --log-level " Set the logging level 0 .. 4. .IP "-m, --mab " Set the make after-break-time (1 - 127). .IP "-p, --port " The port to configure. .IP "-r, --rate " Set the transmission rate (1 - 40). .IP "-s, --serial" Get the serial number. .IP "-v, --version" Display version information .IP "--syslog" Send to syslog rather than stderr. .IP "--no-use-epoll" Disable the use of epoll(), revert to select() .IP "--no-use-kqueue" Disable the use of kqueue(), revert to select() .IP "--scheduler-policy " The thread scheduling policy, one of {fifo, rr}. .IP "--scheduler-priority " The thread priority, only used if --scheduler-policy is set. .SH EXAMPLES .SS See the current parameters of port 0 of device 9: ola_usbpro -d 9 -p 0 --get-params .SS See the port assignments of device 9: ola_usbpro -d 9 --assignments .SS Set the packet rate of port 0 of device 9 to 40 packets/s: ola_usbpro -d 9 -p 0 -r 40 .SS See the serial number of device 9: ola_usbpro -d 9 --serial .SH SEE ALSO .BR olad(1) , .BR usbpro_firmware(1) , . ola-0.10.9/man/ola_e131.10000664000175000017500000000210014376533110011434 00000000000000.TH ola_e131 1 "July 2013" .SH NAME ola_e131 \- Configure E1.31 devices managed by OLA. .SH SYNOPSIS .B ola_e131 -d -p [--input] --preview-mode .SH DESCRIPTION .B ola_e131 is used to configure E1.31 devices managed by OLA. .SH OPTIONS .IP "-d, --device " Id of the device to control. .IP "-h, --help" Display the help message .IP "-i, --input" Set an input port, otherwise set an output port. .IP "-l, --log-level " Set the logging level 0 .. 4. .IP "-p, --port-id " Id of the port to control .IP "-v, --version" Display version information .IP "--preview-mode " Set the preview mode bit. .IP "--discovery" Get the discovery state .IP "--syslog" Send to syslog rather than stderr. .IP "--no-use-epoll" Disable the use of epoll(), revert to select() .IP "--no-use-kqueue" Disable the use of kqueue(), revert to select() .IP "--scheduler-policy " The thread scheduling policy, one of {fifo, rr}. .IP "--scheduler-priority " The thread priority, only used if --scheduler-policy is set. .SH SEE ALSO .BR olad(1) , . ola-0.10.9/man/ola_plugin_state.10000664000175000017500000000107714376533110013475 00000000000000.TH ola_plugin_state 1 "June 2015" .SH NAME ola_plugin_state \- Get and set the state of the plugins loaded by olad. .SH SYNOPSIS .B ola_plugin_state --plugin-id [--state ] .SH DESCRIPTION .B ola_plugin_state is used to get and set the enabled/disabled state for a plugin and the list of plugins this plugin will conflict with. .SH OPTIONS .IP "-h, --help" Display the help message .IP "-p, --plugin-id " Id of the plugin to fetch the state of. .IP "-s, --state " State to set a plugin to. .SH SEE ALSO .BR olad(1) , . ola-0.10.9/man/ola_trigger.10000664000175000017500000000202614376533110012435 00000000000000.TH ola_trigger 1 "October 2014" .SH NAME ola_trigger \- Run programs based on the values in a DMX stream. .SH SYNOPSIS .B ola_trigger [ options ] .SH DESCRIPTION .B ola_trigger Run programs based on the values in a DMX stream. .SH OPTIONS .IP "-h, --help" Display the help message .IP "-l, --log-level " Set the logging level 0 .. 4. .IP "-o, --offset " Apply an offset to the slot numbers. Valid offsets are 0 to 512, default is 0. .IP "-u, --universe " The universe to use, defaults to 0. .IP "--validate" Validate the config file, rather than running it. .IP "-v, --version" Display version information .IP "--syslog" Send to syslog rather than stderr. .IP "--no-use-epoll" Disable the use of epoll(), revert to select() .IP "--no-use-kqueue" Disable the use of kqueue(), revert to select() .IP "--scheduler-policy " The thread scheduling policy, one of {fifo, rr}. .IP "--scheduler-priority " The thread priority, only used if --scheduler-policy is set. .SH SEE ALSO .BR olad(1) . ola-0.10.9/man/rdmpro_sniffer.10000664000175000017500000000250314376533110013156 00000000000000.TH rdmpro_sniffer 1 "December 2013" .SH NAME rdmpro_sniffer \- Sniffer tool for use with the ENTTEC RDM Pro .SH SYNOPSIS rdmpro_sniffer [ options ] .SH DESCRIPTION Sniff traffic from a ENTTEC RDM Pro device. .SH OPTIONS .IP "-d, --display-dmx" Display DMX frames. Defaults to false. .IP "-h, --help" Display the help message .IP "-l, --log-level " Set the logging level 0 .. 4. .IP "-p, --readfile " Display data from a previously captured file. .IP "-r, --full-rdm" Unpack RDM parameter data. .IP "-t, --timestamp" Include timestamps. .IP "-v, --version" Print .B rdmpro_sniffer version information .IP "-w, --savefile " Also write the captured data to a file. .IP "--display-asc" Display non-RDM alternate start code frames. .IP "--dmx-slot-limit " Only display the first N slots of DMX data. .IP "--syslog" Send to syslog rather than stderr. .SH EXAMPLES .SS Display RDM messages from the RDM Pro device connected to /dev/tty.usbserial-00001014 rdmpro_sniffer -r /dev/tty.usbserial-00001014 .SS Display RDM and DMX frames from an RDM Pro device rdmpro_sniffer -r -d /dev/tty.usbserial-00001014 .SS Save a capture to a file for viewing later rdmpro_sniffer -w /tmp/savefile /dev/tty.usbserial-00001014 .SS Print the messages from a previously captured session. rdmpro_sniffer -p /tmp/savefile ola-0.10.9/man/ola_dmxconsole.10000664000175000017500000000322114376533110013143 00000000000000.TH ola_dmxconsole 1 "July 2013" .SH NAME ola_dmxconsole \- Send DMX512 information to .B olad .SH SYNOPSIS .B ola_dmxconsole [-u .I universe-id .B ] .SH DESCRIPTION .B ola_dmxconsole provides a simple 12 scene console to send DMX512 data. Each DMX512 universe is 512 slots. Each slot can have a value between 0 and 255. For most dimmers, a value of 0 is off, and a value of 255 is on. .SH OPTIONS .IP "-u, --universe " The universe ID to control. .IP "-h, --help" Displays a short help message. .SH CONTROLS Once running, the following keys control the behavior: .IP "+" Increment the current slot data by one. .IP "-" Decrement the current slot data by one. .IP "Page Up" Increment the current slot data by 16. .IP "Page Down" Decrement the current slot data by 16. .IP "" Toggle the current slot between 0 and 255. .IP "Insert" Insert a channel (slot), shifting the existing values up one channel. .IP "Delete" Delete a channel (slot), shifting the existing values down one channel. .IP "0 .. 9 Set the fade time from 0 to 9 seconds. .IP "b, B" Blackout, sets all slots to 0. .IP "f, F" Full, sets all slots to 255. .IP "m, M" Toggle display modes: hex, DMX and decimal. .IP "n, N" Toggle channel (slot) indexing mode. 0-indexed or 1-indexed. .IP "p, P" Toggle display palette. .IP "q, Q" Quit the program. .IP "u, U" Undo the last change. Only one level of undo is supported. .IP "Arrow keys" Move the channel (slot) cursor. .IP "Home" Move the channel (slot) cursor to the first channel. .IP "End" Move the channel (slot) cursor to the last channel. .IP "F1 - F12" Change scene honouring the fade time. .SH SEE ALSO .BR ola_dmxmonitor(1) , .BR olad(1) , . ola-0.10.9/man/ola_rdm_get.10000664000175000017500000000155614376533110012422 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. .TH OLA_RDM_GET "1" "December 2015" "ola_rdm_get " "User Commands" .SH NAME ola_rdm_get \- Get the value of a PID for an RDM device .SH SYNOPSIS .B ola_rdm_get \fI--universe --uid \fR .SH DESCRIPTION Get the value of a pid for a device. Use 'ola_rdm_get \fB\-\-list\-pids\fR' to get a list of pids. .TP \fB\-\-frames\fR display the raw RDM frames if available. .TP \fB\-\-uid\fR the UID of the device to control. .HP \fB\-d\fR, \fB\-\-sub\-device\fR target a particular sub device (default is 0) .TP \fB\-h\fR, \fB\-\-help\fR display this help message and exit. .TP \fB\-l\fR, \fB\-\-list\-pids\fR display a list of pids .TP \fB\-p\fR, \fB\-\-pid\-location\fR the directory to read PID definitions from .HP \fB\-u\fR, \fB\-\-universe\fR universe number. ola-0.10.9/man/ola_plugin_info.10000664000175000017500000000107014376533110013301 00000000000000.TH ola_plugin_info 1 "June 2015" .SH NAME ola_plugin_info \- Get info on the plugins loaded by olad. .SH SYNOPSIS .B ola_plugin_info [--plugin-id ] [--list-plugin-ids] .SH DESCRIPTION .B ola_plugin_info is used to get info on the plugins loaded by olad. With no arguments it shows the name and id of the loaded plugins. .SH OPTIONS .IP "-h, --help" Display the help message .IP "-p, --plugin-id " Id of the plugin to fetch the description of. .IP "--list-plugin-ids" List just the ids of the plugins loaded by olad. .SH SEE ALSO .BR olad(1) , . ola-0.10.9/man/ola_uni_merge.10000664000175000017500000000071014376533110012742 00000000000000.TH ola_uni_merge 1 "June 2015" .SH NAME ola_uni_merge \- Set the merge mode for a universe in olad. .SH SYNOPSIS .B ola_uni_merge --universe [--ltp] .SH DESCRIPTION .B ola_uni_merge is used to set the merge mode for a universe. Without --ltp it will revert to HTP mode. .SH OPTIONS .IP "-l, --ltp" Change to LTP mode. .IP "-u, --universe " Id of the universe to name. .IP "-h, --help" Display the help message .SH SEE ALSO .BR olad(1) , . ola-0.10.9/man/ola_set_dmx.10000664000175000017500000000114014376533110012431 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. .TH OLA_SET_DMX "1" "December 2015" "ola_set_dmx " "User Commands" .SH NAME ola_set_dmx \- Sets the DMX values for a universe. .SH SYNOPSIS .B ola_set_dmx \fI--universe --dmx \fR .SH DESCRIPTION Sets the DMX values for a universe. .TP \fB\-h\fR, \fB\-\-help\fR Display this help message and exit. .HP \fB\-u\fR, \fB\-\-universe\fR Universe number, e.g. 0. .TP \fB\-d\fR, \fB\-\-dmx\fR Comma separated DMX values, e.g. 0,255,128 sets first channel to 0, second channel to 255 and third channel to 128. ola-0.10.9/man/rdm_test_server.py.10000664000175000017500000000242314376533110013776 00000000000000.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.37.1. .TH RDM_TEST_SERVER.PY "1" "October 2015" "rdm_test_server.py " "User Commands" .SH NAME rdm_test_server.py \- A web server for testing RDM responders for adherence to the standards .SH SYNOPSIS .B rdm_test_server.py [\fIoptions\fR] .SH DESCRIPTION Starts the TestServer (A simple Web Server) which run a series of tests on a RDM responder and displays the results in a Web UI. This requires the OLA server to be running, and the RDM device to have been detected. You can confirm this by running ola_rdm_discover \fB\-u\fR UNIVERSE. This will send SET commands to the broadcast UIDs which means the start address, device label etc. will be changed for all devices connected to the responder. Think twice about running this on your production lighting rig. .SH OPTIONS .TP \fB\-h\fR, \fB\-\-help\fR show this help message and exit .TP \fB\-p\fR DIR, \fB\-\-pid\-location\fR=\fIDIR\fR The directory to load the PID definitions from. .TP \fB\-d\fR WWW_DIR, \fB\-\-www\-dir\fR=\fIWWW_DIR\fR The root directory to serve static files, this must be absolute. .TP \fB\-l\fR LOG_DIRECTORY, \fB\-\-log\-directory\fR=\fILOG_DIRECTORY\fR The directory to store log files. .TP \fB\-\-world\-writeable\fR Make the log directory world writeable. ola-0.10.9/man/logic_rdm_sniffer.10000664000175000017500000000214514376533110013614 00000000000000.TH logic_rdm_sniffer 1 "December 2013" .SH NAME logic_rdm_sniffer \- Decode DMX/RDM data from a Saleae Logic device. .SH SYNOPSIS logic_rdm_sniffer [ options ] .SH DESCRIPTION logic_rdm_sniffer Decode DMX/RDM data from a Saleae Logic device. .SH OPTIONS .IP "-d, --display-dmx" Display DMX Frames. Defaults to false. .IP "-h, --help" Display the help message .IP "-l, --log-level " Set the logging level 0 .. 4. .IP "-r, --full-rdm" Unpack RDM parameter data. .IP "-t, --timestamp" Include timestamps. .IP "--display-asc" Display non-RDM alternate start code frames. .IP "--dmx-slot-limit " Only display the first N slots of DMX data. .IP "--no-use-epoll" Disable the use of epoll(), revert to select() .IP "--pid-location " The directory containing the PID definitions. .IP "--sample-rate " Sample rate in HZ. .IP "--syslog" Send to syslog rather than stderr. .IP "-v, --version" Print .B logic_rdm_sniffer version information .SH EXAMPLES .SS Display RDM messages from the Logic device. logic_rdm_sniffer -r .SS Display RDM and DMX frames from the Logic device. logic_rdm_sniffer -r -d ola-0.10.9/man/ola_rdm_discover.10000664000175000017500000000203214376533110013447 00000000000000.TH ola_rdm_discover 1 "October 2015" .SH NAME ola_rdm_discover \- Fetch the UID list for a universe. .SH SYNOPSIS .B ola_rdm_discover --universe [--full|--incremental] .SH DESCRIPTION .B ola_rdm_discover Fetch the UID list for a universe. .SH OPTIONS .IP "-f, --full" Force full RDM Discovery for this universe .IP "-h, --help" Display the help message .IP "-i, --incremental" Force incremental RDM Discovery for this universe .IP "-l, --log-level " Set the logging level 0 .. 4. .IP "-u, --universe " The universe to do RDM discovery on .IP "-v, --version" Display version information .IP "--include-broadcast" Include broadcast UID for this universe .IP "--include-vendorcast" Include vendorcast UID for this universe .IP "--no-use-epoll" Disable the use of epoll(), revert to select() .IP "--scheduler-policy " The thread scheduling policy, one of {fifo, rr}. .IP "--scheduler-priority " The thread priority, only used if --scheduler-policy is set. .IP "--syslog" Send to syslog rather than stderr. ola-0.10.9/man/ola_set_priority.10000664000175000017500000000125114376533110013525 00000000000000.TH ola_set_priority 1 "July 2013" .SH NAME ola_set_priority \- Set an olad port's priority. .SH SYNOPSIS .B ola_set_priority [ options ] .SH DESCRIPTION .B ola_set_priority is used to set the priority of ports in olad(1). .SH OPTIONS .IP "-h, --help" Display the help message. .IP "-d, --device " Id of the device you want to set the priority of. .IP "-i, --input" Set an input port, otherwise set an output port. .IP "-o, --override " Set the port priority to a static value, if this option isn't used, the port will be set to inherit mode. .IP "-p, --port " Id of the port you want to set the priority of. .SH SEE ALSO .BR olad(1) , .BR ola_dev_info(1) , . ola-0.10.9/man/ola_uni_stats.10000664000175000017500000000145214376533110013005 00000000000000.TH ola_uni_stats 1 "August 2014" .SH NAME ola_uni_stats \- Produce statistics on DMX frame rates. .SH SYNOPSIS .B ola_uni_stats [options] ... .SH DESCRIPTION .B ola_uni_stats is used to watch one or more universes and produce stats on DMX frame rates. .SH OPTIONS .IP "-h, --help" Display the help message .IP "-l, --log-level " Set the logging level 0 .. 4. .IP "-v, --version" Display version information .IP "--syslog" Send to syslog rather than stderr. .IP "--no-use-epoll" Disable the use of epoll(), revert to select() .IP "--no-use-kqueue" Disable the use of kqueue(), revert to select() .IP "--scheduler-policy " The thread scheduling policy, one of {fifo, rr}. .IP "--scheduler-priority " The thread priority, only used if --scheduler-policy is set. ola-0.10.9/man/olad.10000664000175000017500000000427414376533110011065 00000000000000.TH olad 1 "August 2018" .SH NAME olad \- The Open Lighting Architecture Daemon .SH SYNOPSIS .B olad [options] .SH DESCRIPTION .B olad is the Open Lighting Architecture (OLA) daemon. It handles communication with DMX512 / RDM hardware devices and remote network hosts via various lighting control protocols. .SH OPTIONS .IP "-c, --config-dir " The path to the config directory, defaults to ~/.ola/ on *nix and %LOCALAPPDATA%\.ola\ on Windows. .IP "-d, --http-data-dir " The path to the static www content. .IP "-f, --daemon" Fork and run as a background process. .IP "-h, --help" Display the help message .IP "-i, --interface " The interface name (e.g. eth0) or IP address of the network interface to use for the web server. .IP "-l, --log-level " Set the logging level 0 .. 4. See LOGGING. .IP "-p, --http-port " The port to run the HTTP server on. Defaults to 9090. .IP "-r, --rpc-port " The port to listen for RPCs on. Defaults to 9010. .IP "-v, --version" Print .B olad version information .IP "--no-http" Disable the HTTP server. .IP "--no-http-quit" Disable the HTTP /quit handler. .IP "--no-register-with-dns-sd" Don't register the web service using DNS-SD (Bonjour). .IP "--no-use-async-libusb" Disable the use of the asynchronous libusb calls, revert to synchronous .IP "--no-use-epoll" Disable the use of epoll(), revert to select() .IP "--no-use-kqueue" Disable the use of kqueue(), revert to select() .IP "--pid-location " The directory containing the PID definitions. .IP "--scheduler-policy " The thread scheduling policy, one of {fifo, rr}. .IP "--scheduler-priority " The thread priority, only used if --scheduler-policy is set. .IP "--syslog" Send to syslog rather than stderr. .SH LOGGING .B olad can either log to .BR stderr(4) or .BR syslog(5). Each log level includes those of higher severity. .IP 0 No logging. .IP 1 Fatal logging. .IP 2 Warnings. .IP 3 Informational logging. .IP 4 Debug logging. .SH SIGNALS Once running, the following signals control the behavior of olad: .IP "SIGHUP" Reloads the plugins. .IP "SIGUSR1" Increases the logging level, eventually wrapping .SH SEE ALSO .BR ola_dmxconsole(1) , .BR ola_dmxmonitor(1) , . ola-0.10.9/man/ola_recorder.10000664000175000017500000000350514376533110012602 00000000000000.TH ola_recorder 1 "December 2013" .SH NAME ola_recorder \- Record to, or playback from, a file a number of universes for a show .SH SYNOPSIS ola_recorder [--record --universes ] [--playback ] [--verify ] .SH DESCRIPTION ola_recorder Record a series of universes, or playback a previously recorded show. .SH OPTIONS .IP "-d, --delay " The delay in ms between successive iterations. .IP "-h, --help" Display the help message .IP "-i, --iterations " The number of times to repeat the show, 0 means unlimited. .IP "-l, --log-level " Set the logging level 0 .. 4. .IP "-p, --playback " The show file to playback. .IP "-r, --record " The show file to record data to. .IP "-u, --universes " A comma separated list of universes to record .IP "--verify " The show file to verify. .IP "-v, --version" Print .B ola_recorder version information .IP "--duration " The length of time (seconds) to run for. .IP "--syslog" Send to syslog rather than stderr. .IP "--no-use-epoll" Disable the use of epoll(), revert to select() .IP "--no-use-kqueue" Disable the use of kqueue(), revert to select() .IP "--scheduler-policy " The thread scheduling policy, one of {fifo, rr}. .IP "--scheduler-priority " The thread priority, only used if --scheduler-policy is set. .SH EXAMPLES .SS Record universes 1 and 2 to the file foo: ola_recorder --universes 1,2 --record foo .SS Verify the previously recorded file bar: ola_recorder --verify bar .SS Playback the previously recorded file baz for 30 seconds: ola_recorder --playback baz --duration 30 .SS Playback the previously recorded file baz for 3 iterations: ola_recorder --playback baz --iterations 3 .SS Playback the previously recorded file baz, repeating forever: ola_recorder --playback baz --iterations 0 ola-0.10.9/man/ola_timecode.10000664000175000017500000000153114376533110012563 00000000000000.TH ola_timecode 1 "August 2014" .SH NAME ola_timecode \- OLA TimeCode Sender .SH SYNOPSIS .B ola_timecode [options] .SH DESCRIPTION .B ola_timecode lets you send TimeCode data to OLA. time_code is in the form: .PP Hours:Minutes:Seconds:Frames .SH OPTIONS .IP "-f, --format " One of FILM, EBU, DF, SMPTE (default). .IP "-h, --help" Display the help message .IP "-l, --log-level " Set the logging level 0 .. 4. .IP "-v, --version" Display version information .IP "--syslog" Send to syslog rather than stderr. .IP "--no-use-epoll" Disable the use of epoll(), revert to select() .IP "--no-use-kqueue" Disable the use of kqueue(), revert to select() .IP "--scheduler-policy " The thread scheduling policy, one of {fifo, rr}. .IP "--scheduler-priority " The thread priority, only used if --scheduler-policy is set. ola-0.10.9/man/Makefile.mk0000664000175000017500000000141714376533110012126 00000000000000dist_man_MANS += \ man/logic_rdm_sniffer.1 \ man/ola_artnet.1 \ man/ola_dev_info.1 \ man/ola_dmxconsole.1 \ man/ola_dmxmonitor.1 \ man/ola_e131.1 \ man/ola_patch.1 \ man/ola_plugin_info.1 \ man/ola_plugin_state.1 \ man/ola_rdm_discover.1 \ man/ola_rdm_get.1 \ man/ola_rdm_set.1 \ man/ola_recorder.1 \ man/ola_set_dmx.1 \ man/ola_set_priority.1 \ man/ola_streaming_client.1 \ man/ola_timecode.1 \ man/ola_trigger.1 \ man/ola_uni_info.1 \ man/ola_uni_merge.1 \ man/ola_uni_name.1 \ man/ola_uni_stats.1 \ man/ola_usbpro.1 \ man/olad.1 \ man/rdm_model_collector.py.1 \ man/rdm_responder_test.py.1 \ man/rdm_test_server.py.1 \ man/rdmpro_sniffer.1 \ man/usbpro_firmware.1 ola-0.10.9/man/ola_dev_info.10000664000175000017500000000065214376533110012566 00000000000000.TH ola_dev_info 1 "July 2013" .SH NAME ola_dev_info \- Display olad devices and ports. .SH SYNOPSIS .B ola_dev_info [ options ] .SH DESCRIPTION .B ola_dev_info is used to display information about the available devices and ports in olad(1). .SH OPTIONS .IP "-h, --help" Display the help message. .IP "-p, --plugin-id " Show only the devices owned by this plugin id. .SH SEE ALSO .BR olad(1) , .BR ola_patch(1) , . ola-0.10.9/man/ola_streaming_client.10000664000175000017500000000211214376533110014315 00000000000000.TH ola_streaming_client 1 "July 2013" .SH NAME ola_streaming_client \- Stream data to the OLA server. .SH SYNOPSIS .B ola_streaming_client [ options ] .SH DESCRIPTION .B ola_streaming_client is used to stream DMX512 data to olad(1). If DMX512 data isn't provided, it will read from STDIN. .SH OPTIONS .IP "-h, --help" Display the help message. .IP "-d, --dmx " Comma separated DMX values to send, e.g. 0,255,128 sets first channel to 0, second channel to 255 and third channel to 128. .IP "-l, --log-level " Set the logging level 0 .. 4. .IP "-u, --universe " Id of the universe to send data for. .IP "-v, --version" Print .B ola_streaming_client version information .IP "--syslog" Send to syslog rather than stderr. .IP "--no-use-epoll" Disable the use of epoll(), revert to select() .IP "--no-use-kqueue" Disable the use of kqueue(), revert to select() .IP "--scheduler-policy " The thread scheduling policy, one of {fifo, rr}. .IP "--scheduler-priority " The thread priority, only used if --scheduler-policy is set. .SH SEE ALSO .BR olad(1) , . ola-0.10.9/man/ola_uni_info.10000664000175000017500000000063614376533110012605 00000000000000.TH ola_uni_info 1 "July 2013" .SH NAME ola_uni_info \- Display the active universes in OLA. .SH SYNOPSIS .B ola_uni_info [ options ] .SH DESCRIPTION .B ola_uni_info displays the universe name and merge mode for the active universes in olad(1). .SH OPTIONS .IP "-h, --help" Display the help message. .IP "--list-universe-ids" Just list the universe ids with no additional information. .SH SEE ALSO .BR olad(1) , . ola-0.10.9/man/usbpro_firmware.10000664000175000017500000000106114376533110013343 00000000000000.TH usbpro_firmware 1 "July 2014" .SH NAME usbpro_firmware \- Update the firmware on an Enttec USB Pro Device. .SH SYNOPSIS .B usbpro_firmware -d -f [ options ] .SH DESCRIPTION .B usbpro_firmware is used to update the firmware on Enttec USB Pro devices. .SH OPTIONS .IP "-h, --help" Display the help message. .IP "-d, --device " The path to the device to update .IP "-f, --firmware " The path to the firmware to use .IP "-l, --log-level " Set the logging level 0 .. 4. .SH SEE ALSO .BR ola_usbpro(1) , . ola-0.10.9/man/ola_patch.10000664000175000017500000000140214376533110012066 00000000000000.TH ola_patch 1 "July 2013" .SH NAME ola_patch \- Control OLA port bindings. .SH SYNOPSIS .B ola_patch [ options ] .SH DESCRIPTION .B ola_patch is used to control the port to universe mappings in olad(1). .SH OPTIONS .IP "-d, --device " The id of device to patch. .IP "-h, --help" Display the help message. .IP "-p, --port " The id of the port to patch. .IP "-r, --unpatch" Unpatch this port. .IP "-i, --input" Patch the input port (default is output). .IP "-u, --universe " The id of the universe to patch to (default 0). .SH EXAMPLES .SS Patch output port 1 of device 4 to universe 3: ola_patch -d 4 -p 1 -u 3 .SS Patch input port 2 of device 5 to universe 10: ola_patch -d 5 -p 2 -i -u 10 .SH SEE ALSO .BR olad(1) , .BR ola_dev_info(1) , . ola-0.10.9/java/0000775000175000017500000000000014376533272010314 500000000000000ola-0.10.9/java/pom.xml0000664000175000017500000000256214376533110011545 00000000000000 4.0.0 ola ola-java-client 0.0.1 Java implementation of OLA RPC org.apache.maven.plugins maven-compiler-plugin 2.5.1 1.5 1.5 org.apache.maven.plugins maven-surefire-plugin 2.12 **/OlaClientTest.java com.google.protobuf protobuf-java 2.6.1 junit junit 4.8.2 test ola-0.10.9/java/Makefile.in0000664000175000017500000004064314376533151012304 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # OLA Java client VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = java ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_prog_java_cc.m4 \ $(top_srcdir)/config/ac_pthread_set_name.m4 \ $(top_srcdir)/config/ac_saleae.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/ax_have_epoll.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_python_module.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/maven.m4 $(top_srcdir)/config/ola.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/resolv.m4 \ $(top_srcdir)/config/stl_hash.m4 \ $(top_srcdir)/config/ola_version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(noinst_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) am__DIST_COMMON = $(srcdir)/Makefile.in DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPUNIT1_CFLAGS = @CPPUNIT1_CFLAGS@ CPPUNIT1_LIBS = @CPPUNIT1_LIBS@ CPPUNIT2_CFLAGS = @CPPUNIT2_CFLAGS@ CPPUNIT2_LIBS = @CPPUNIT2_LIBS@ CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ CPPUNIT_LIBS = @CPPUNIT_LIBS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_verbose = @DX_FLAG_verbose@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCJ_OPTS = @GCJ_OPTS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAVA_CC = @JAVA_CC@ JAVA_CC_FLAGS = @JAVA_CC_FLAGS@ JAVA_CC_OPTS = @JAVA_CC_OPTS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAVEN = @MAVEN@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLA_CLIENT_LIBS = @OLA_CLIENT_LIBS@ OLA_MAJOR_VERSION = @OLA_MAJOR_VERSION@ OLA_MINOR_VERSION = @OLA_MINOR_VERSION@ OLA_PROTOC = @OLA_PROTOC@ OLA_REVISION_VERSION = @OLA_REVISION_VERSION@ OLA_SERVER_LIBS = @OLA_SERVER_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_LIBS = @PLUGIN_LIBS@ PROTOBUF1_CFLAGS = @PROTOBUF1_CFLAGS@ PROTOBUF1_LIBS = @PROTOBUF1_LIBS@ PROTOC = @PROTOC@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_CXX = @PTHREAD_CXX@ PTHREAD_CXXFLAGS = @PTHREAD_CXXFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RESOLV_LIBS = @RESOLV_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_aux_dir = @ac_aux_dir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ avahi_CFLAGS = @avahi_CFLAGS@ avahi_LIBS = @avahi_LIBS@ base_uuid_CFLAGS = @base_uuid_CFLAGS@ base_uuid_LIBS = @base_uuid_LIBS@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cpplint = @cpplint@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ flake8 = @flake8@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libSaleaeDevice_LIBS = @libSaleaeDevice_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libftdi0_CFLAGS = @libftdi0_CFLAGS@ libftdi0_LIBS = @libftdi0_LIBS@ libftdi1_CFLAGS = @libftdi1_CFLAGS@ libftdi1_LIBS = @libftdi1_LIBS@ liblo_CFLAGS = @liblo_CFLAGS@ liblo_LIBS = @liblo_LIBS@ libmicrohttpd_CFLAGS = @libmicrohttpd_CFLAGS@ libmicrohttpd_LIBS = @libmicrohttpd_LIBS@ libncurses_CFLAGS = @libncurses_CFLAGS@ libncurses_LIBS = @libncurses_LIBS@ libprotobuf_CFLAGS = @libprotobuf_CFLAGS@ libprotobuf_LIBS = @libprotobuf_LIBS@ libusb_CFLAGS = @libusb_CFLAGS@ libusb_LIBS = @libusb_LIBS@ libusb_error_name_CFLAGS = @libusb_error_name_CFLAGS@ libusb_error_name_LIBS = @libusb_error_name_LIBS@ libusb_hotplug_api_CFLAGS = @libusb_hotplug_api_CFLAGS@ libusb_hotplug_api_LIBS = @libusb_hotplug_api_LIBS@ libusb_set_option_CFLAGS = @libusb_set_option_CFLAGS@ libusb_set_option_LIBS = @libusb_set_option_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ ola_major_version = @ola_major_version@ ola_minor_version = @ola_minor_version@ ola_revision_version = @ola_revision_version@ oldincludedir = @oldincludedir@ ossp_uuid_CFLAGS = @ossp_uuid_CFLAGS@ ossp_uuid_LIBS = @ossp_uuid_LIBS@ pdfdir = @pdfdir@ piddatadir = @piddatadir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uuid_CFLAGS = @uuid_CFLAGS@ uuid_LIBS = @uuid_LIBS@ www_datadir = @www_datadir@ EXTRA_DIST = pom.xml \ src/main/java/ola/OlaClient.java \ src/main/java/ola/rpc/SimpleRpcController.java \ src/main/java/ola/rpc/StreamRpcChannel.java \ src/test/java/ola/OlaClientTest.java CLEANFILES = src/main/java/ola/proto/Ola.java \ src/main/java/ola/rpc/Rpc.java # .jars aren't really data, but it sure ain't a program. @BUILD_JAVA_LIBS_TRUE@noinst_DATA = ola.jar all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu java/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu java/Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am .PRECIOUS: Makefile src/main/java/ola/proto/Ola.java: ${top_srcdir}/common/protocol/Ola.proto $(PROTOC) --java_out=src/main/java --proto_path=${top_srcdir}/common/protocol ${top_srcdir}/common/protocol/Ola.proto src/main/java/ola/rpc/Rpc.java: ${top_srcdir}/common/rpc/Rpc.proto $(PROTOC) --java_out=src/main/java --proto_path=${top_srcdir}/common/rpc ${top_srcdir}/common/rpc/Rpc.proto ola.jar: src/main/java/ola/proto/Ola.java src/main/java/ola/rpc/Rpc.java mvn package # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ola-0.10.9/java/src/0000775000175000017500000000000014376533272011103 500000000000000ola-0.10.9/java/src/test/0000775000175000017500000000000014376533272012062 500000000000000ola-0.10.9/java/src/test/java/0000775000175000017500000000000014376533272013003 500000000000000ola-0.10.9/java/src/test/java/ola/0000775000175000017500000000000014376533272013556 500000000000000ola-0.10.9/java/src/test/java/ola/OlaClientTest.java0000664000175000017500000001204614376533110017045 00000000000000package ola; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertTrue; import ola.proto.Ola.DeviceConfigReply; import ola.proto.Ola.DeviceInfoReply; import ola.proto.Ola.DmxData; import ola.proto.Ola.MergeMode; import ola.proto.Ola.PatchAction; import ola.proto.Ola.PluginDescriptionReply; import ola.proto.Ola.PluginListReply; import ola.proto.Ola.RDMResponse; import ola.proto.Ola.RegisterAction; import ola.proto.Ola.TimeCodeType; import ola.proto.Ola.UID; import ola.proto.Ola.UIDListReply; import ola.proto.Ola.UniverseInfoReply; import org.junit.Before; import org.junit.Test; /** * Test interaction with ola daemon. * Assumes that an ola daemon is running. */ public class OlaClientTest { private OlaClient client; @Before public void setup() throws Exception { if (client == null) { client = new OlaClient(); } } @Test public void testGetPlugins() { PluginListReply reply = client.getPlugins(); assertNotNull(reply); System.out.println(reply); } @Test public void testGetPluginDescription() { PluginDescriptionReply reply = client.getPluginDescription(1); assertNotNull(reply); System.out.println(reply); } @Test public void testGetDeviceInfo() { DeviceInfoReply reply = client.getDeviceInfo(); assertNotNull(reply); System.out.println(reply); } @Test public void testGetCandidatePorts() { DeviceInfoReply reply = client.getCandidatePorts(0); assertNotNull(reply); System.out.println(reply); } @Test public void testConfigureDevice() { DeviceConfigReply reply = client.configureDevice(2, new short[] {200,200,200}); // TODO verify result.. System.out.println(reply); } @Test public void testGetUniverseInfo() { UniverseInfoReply reply = client.getUniverseInfo(0); assertNotNull(reply); System.out.println(reply); } @Test public void testGetUIDs() { UIDListReply reply = client.getUIDs(0); assertNotNull(reply); System.out.println(reply); } @Test public void testForceDiscovery() { UIDListReply reply = client.forceDiscovery(0, true); assertNotNull(reply); System.out.println(reply); } @Test public void testGetDmx() { client.sendDmx(0, new short[] {45,12,244}); DmxData reply = client.getDmx(0); short[] state = client.convertFromUnsigned(reply.getData()); assertEquals(45, state[0]); assertEquals(12, state[1]); assertEquals(244, state[2]); System.out.println(reply); } @Test public void testPatchPort() { assertTrue(client.patchPort(1, 0, PatchAction.PATCH, 0)); } @Test public void testSendDmx() { assertTrue(client.sendDmx(0, new short[] {10,23,244})); } @Test public void testSetPortPriority() { assertTrue(client.setPortPriority(1, 0, 0 ,0, true)); } @Test public void testSetUniverseName() { client.setUniverseName(0, "outerspace"); UniverseInfoReply reply = client.getUniverseInfo(0); assertEquals(reply.getUniverse(0).getName(), "outerspace"); } @Test public void testSetMergeMode() { assertTrue(client.setMergeMode(0, MergeMode.HTP)); } @Test public void testRegisterForDmx() { assertTrue(client.registerForDmx(0, RegisterAction.REGISTER)); } @Test public void testSetSourceUID() { assertTrue(client.setSourceUID(1, 5)); } @Test public void testSendTimeCode() { assertTrue(client.sendTimeCode(TimeCodeType.TIMECODE_DF, 10, 1, 1, 1)); } @Test public void testSendRDMCommand() { UID id = UID.newBuilder() .setDeviceId(1) .setEstaId(9) .build(); RDMResponse reply = client.sendRDMCommand(id, 0, 0, false, false, 0, new short[] {1,2,3}); assertNotNull(reply); System.out.println(reply); } @Test public void testStreamDmx() { client.sendDmx(0, new short[] {9, 9, 9, 9}); client.streamDmx(0, new short[] {14, 33, 55, 99}); assertTrue(client.sendDmx(0, new short[] {9, 9, 9, 9})); } @Test public void testSendDmxRepetitive() throws Exception { OlaClient client = new OlaClient(); for (int i = 0; i < 20; i++) { client.sendDmx(0, new short[] {135, 0, 0}); Thread.currentThread().sleep(50); client.sendDmx(0, new short[] {135, 0, 135}); Thread.currentThread().sleep(50); } for (short i = 0; i < 25; i+=3) { client.sendDmx(0, new short[] {i, 0, 0}); } for (short i = 0; i < 25; i+=3) { client.sendDmx(0, new short[] {255, i, 0}); } for (short i = 0; i < 25; i+=3) { client.sendDmx(0, new short[] {255, 255, i}); } client.sendDmx(0, new short[] {0, 0, 0}); } } ola-0.10.9/java/src/main/0000775000175000017500000000000014376533272012027 500000000000000ola-0.10.9/java/src/main/java/0000775000175000017500000000000014376533272012750 500000000000000ola-0.10.9/java/src/main/java/ola/0000775000175000017500000000000014376533272013523 500000000000000ola-0.10.9/java/src/main/java/ola/OlaClient.java0000664000175000017500000003107314376533110016153 00000000000000/*********************************************************************** * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. * *************************************************************************/ package ola; import java.util.logging.Logger; import ola.proto.Ola.DeviceConfigReply; import ola.proto.Ola.DeviceConfigRequest; import ola.proto.Ola.DeviceInfoReply; import ola.proto.Ola.DeviceInfoRequest; import ola.proto.Ola.DiscoveryRequest; import ola.proto.Ola.DmxData; import ola.proto.Ola.MergeMode; import ola.proto.Ola.MergeModeRequest; import ola.proto.Ola.OlaServerService; import ola.proto.Ola.OptionalUniverseRequest; import ola.proto.Ola.PatchAction; import ola.proto.Ola.PatchPortRequest; import ola.proto.Ola.PluginDescriptionReply; import ola.proto.Ola.PluginDescriptionRequest; import ola.proto.Ola.PluginListReply; import ola.proto.Ola.PluginListRequest; import ola.proto.Ola.PortPriorityRequest; import ola.proto.Ola.RDMRequest; import ola.proto.Ola.RDMResponse; import ola.proto.Ola.RegisterAction; import ola.proto.Ola.RegisterDmxRequest; import ola.proto.Ola.TimeCode; import ola.proto.Ola.TimeCodeType; import ola.proto.Ola.UID; import ola.proto.Ola.UIDListReply; import ola.proto.Ola.UniverseInfoReply; import ola.proto.Ola.UniverseNameRequest; import ola.proto.Ola.UniverseRequest; import ola.rpc.SimpleRpcController; import ola.rpc.StreamRpcChannel; import com.google.protobuf.ByteString; import com.google.protobuf.Message; import com.google.protobuf.RpcCallback; import com.google.protobuf.RpcChannel; import com.google.protobuf.RpcController; public class OlaClient { private static Logger logger = Logger.getLogger(OlaClient.class.getName()); private OlaServerService serverService; private RpcController controller; private RpcChannel channel; public OlaClient() throws Exception { channel = new StreamRpcChannel(); controller = new SimpleRpcController(); serverService = OlaServerService.Stub.newStub(channel); } /** * Generic method for making Rpc Calls. * * @param method Name of the Rpc Method to call * @param inputMessage Input RpcMessage * @return Message result message or null if the call failed. */ private Message callRpcMethod(String method, Message inputMessage) { final Message[] outputMessage = new Message[1]; controller.reset(); RpcCallback cb = new RpcCallback() { public void run(Message arg0) { outputMessage[0] = arg0; } }; serverService.callMethod(serverService.getDescriptorForType().findMethodByName(method), controller, inputMessage, cb); if (controller.failed()) { logger.warning("RPC Call failed: " + controller.errorText()); return null; } return outputMessage[0]; } /** * Get a list of plugins from olad. * * @return The list of plugings. */ public PluginListReply getPlugins() { return (PluginListReply) callRpcMethod("GetPlugins", PluginListRequest.newBuilder().build()); } /** * Get a plugin description from olad. * * @param pluginId number of the plugin for which to receive the description * @return The list of plugings. */ public PluginDescriptionReply getPluginDescription(int pluginId) { PluginDescriptionRequest request = PluginDescriptionRequest.newBuilder() .setPluginId(pluginId) .build(); return (PluginDescriptionReply) callRpcMethod("GetPluginDescription", request); } /** * Get device info from olad. * * @return The Device Info. */ public DeviceInfoReply getDeviceInfo() { return (DeviceInfoReply) callRpcMethod("GetDeviceInfo", DeviceInfoRequest.newBuilder().build()); } /** * Get candidate ports for universe. * * @param universe the id of the universe. * @return device info */ public DeviceInfoReply getCandidatePorts(int universe) { OptionalUniverseRequest request = OptionalUniverseRequest.newBuilder().setUniverse(universe).build(); return (DeviceInfoReply) callRpcMethod("GetCandidatePorts", request); } /** * Configure device. * * @param device the id of the device to configure. * @param data device configuration data. * @return */ public DeviceConfigReply configureDevice(int device, short[] data) { DeviceConfigRequest request = DeviceConfigRequest.newBuilder() .setDeviceAlias(device) .setData(convertToUnsigned(data)) .build(); return (DeviceConfigReply) callRpcMethod("ConfigureDevice", request); } /** * Get universe information. * * @param universe the id of the universe * @return UniverseInfo */ public UniverseInfoReply getUniverseInfo(int universe) { OptionalUniverseRequest request = OptionalUniverseRequest.newBuilder().setUniverse(universe).build(); return (UniverseInfoReply) callRpcMethod("GetUniverseInfo", request); } /** * Get UID's. * * @param universe the id of the universe * @return UIDListReply */ public UIDListReply getUIDs(int universe) { UniverseRequest request = UniverseRequest.newBuilder().setUniverse(universe).build(); return (UIDListReply) callRpcMethod("GetUIDs", request); } /** * Force discovery of a universe. * * @param universe the id of the universe * @param full * @return UID List */ public UIDListReply forceDiscovery(int universe, boolean full) { DiscoveryRequest request = DiscoveryRequest.newBuilder() .setUniverse(universe) .setFull(full) .build(); return (UIDListReply) callRpcMethod("ForceDiscovery", request); } /** * Retrieve dmx data from universe. * @param universe the id of the universe * @return */ public DmxData getDmx(int universe) { return (DmxData) callRpcMethod("GetDmx", UniverseRequest.newBuilder().setUniverse(universe).build()); } /** * Patch a port. * * @param device number * @param port number * @param action PachAction.PATCH or PatchAction.UNPATCH * @param universe number * @return true when succeeded. */ public boolean patchPort(int device, int port, PatchAction action, int universe) { PatchPortRequest patchRequest = PatchPortRequest.newBuilder() .setPortId(port) .setAction(action) .setDeviceAlias(device) .setUniverse(universe) .setIsOutput(true) .build(); return callRpcMethod("PatchPort", patchRequest) != null; } /** * Send dmx data to olad. * * @param universe number * @param values array of dmx data values * @return true when succeeded. */ public boolean sendDmx(int universe, short[] values) { DmxData dmxData = DmxData.newBuilder() .setUniverse(universe) .setData(convertToUnsigned(values)) .build(); return callRpcMethod("UpdateDmxData", dmxData) != null; } /** * Set port priority. * * @return true if request succeeded. */ public boolean setPortPriority(int device, int port, int priority, int mode, boolean output) { PortPriorityRequest request = PortPriorityRequest.newBuilder() .setDeviceAlias(device) .setPortId(port) .setPriority(priority) .setPriorityMode(mode) .setIsOutput(output) .build(); return callRpcMethod("SetPortPriority", request) != null; } /** * Set universe name. * * @param universe id of universe for which to set the name. * @param name The name to set. * @return true if the call succeeded. */ public boolean setUniverseName(int universe, String name) { UniverseNameRequest request = UniverseNameRequest.newBuilder() .setUniverse(universe) .setName(name) .build(); return callRpcMethod("SetUniverseName", request) != null; } /** * Define merge mode for a universe. * * @param universe The id of the universe * @param mode, merge mode to use * @return true if call succeeded. */ public boolean setMergeMode(int universe, MergeMode mode) { MergeModeRequest request = MergeModeRequest.newBuilder() .setUniverse(universe) .setMergeMode(mode) .build(); return callRpcMethod("SetMergeMode", request) != null; } /** * Register for dmx * @param universe * @param action RegisterAction * @return true if call succeeded. */ public boolean registerForDmx(int universe, RegisterAction action) { RegisterDmxRequest request = RegisterDmxRequest.newBuilder() .setUniverse(universe) .setAction(action) .build(); return callRpcMethod("RegisterForDmx", request) != null; } /** * Set source UID for device. * @param device The id of the device * @param estaId the UID to set. * @return true if call succeeded. */ public boolean setSourceUID(int device, int estaId) { UID request = UID.newBuilder() .setDeviceId(device) .setEstaId(estaId) .build(); return callRpcMethod("SetSourceUID", request) != null; } /** * Send TimeCode. * * @param type TimeCodeType * @param frames number of frames * @param hours * @param minutes * @param seconds * @return true if call succeeded. */ public boolean sendTimeCode(TimeCodeType type, int frames, int hours, int minutes, int seconds) { TimeCode request = TimeCode.newBuilder() .setFrames(frames) .setHours(hours) .setMinutes(minutes) .setSeconds(seconds) .setType(type) .build(); return callRpcMethod("SendTimeCode", request) != null; } /** * Send RDM Command. * * @param uid * @param subDevice * @param paramId * @param isSet * @param includeRawResponse * @param universe * @param data * @return RDMResponse */ public RDMResponse sendRDMCommand(UID uid, int subDevice, int paramId, boolean isSet, boolean includeRawResponse, int universe, short[] data) { RDMRequest request = RDMRequest.newBuilder() .setUid(uid) .setSubDevice(subDevice) .setParamId(paramId) .setIsSet(isSet) .setIncludeRawResponse(includeRawResponse) .setUniverse(universe) .setData(convertToUnsigned(data)) .build(); return (RDMResponse) callRpcMethod("RDMCommand", request); } /** * Send dmx data, but don't wait for response. * * @param universe the id of the universe * @param values dmx data */ public void streamDmx(int universe, short[] values) { DmxData dmxData = DmxData.newBuilder() .setUniverse(universe) .setData(convertToUnsigned(values)) .build(); callRpcMethod("StreamDmxData", dmxData); } /** * Convert short array to bytestring */ public ByteString convertToUnsigned(short[] values) { byte[] unsigned = new byte[values.length]; for (int i = 0; i < values.length; i++) { unsigned[i] = (byte) values[i]; } return ByteString.copyFrom(unsigned); } /** * Convert bytestring to short array. */ public short[] convertFromUnsigned(ByteString data) { byte[] values = data.toByteArray(); short[] signed = new short[values.length]; for (int i = 0; i < values.length; i++) { signed[i] = (short) ((short) values[i] & 0xFF); } return signed; } } ola-0.10.9/java/src/main/java/ola/rpc/0000775000175000017500000000000014376533272014307 500000000000000ola-0.10.9/java/src/main/java/ola/rpc/SimpleRpcController.java0000664000175000017500000000446514376533110021034 00000000000000/*********************************************************************** * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. * *************************************************************************/ package ola.rpc; import com.google.protobuf.RpcCallback; import com.google.protobuf.RpcController; /** * Simple Rpc Controller implementation. */ public class SimpleRpcController implements RpcController { private boolean failed = false; private boolean cancelled = false; private String error = null; private RpcCallback callback = null; /* (non-Javadoc) * @see com.google.protobuf.RpcController#errorText() */ public String errorText() { return error; } /* (non-Javadoc) * @see com.google.protobuf.RpcController#failed() */ public boolean failed() { return failed; } /* (non-Javadoc) * @see com.google.protobuf.RpcController#isCanceled() */ public boolean isCanceled() { return cancelled; } /* (non-Javadoc) * @see com.google.protobuf.RpcController#notifyOnCancel(com.google.protobuf.RpcCallback) */ public void notifyOnCancel(RpcCallback notifyCallback) { callback = notifyCallback; } /* (non-Javadoc) * @see com.google.protobuf.RpcController#reset() */ public void reset() { failed = false; cancelled = false; error = null; callback = null; } /* (non-Javadoc) * @see com.google.protobuf.RpcController#setFailed(java.lang.String) */ public void setFailed(String reason) { failed = true; error = reason; } /* (non-Javadoc) * @see com.google.protobuf.RpcController#startCancel() */ public void startCancel() { cancelled = true; callback.run(null); } } ola-0.10.9/java/src/main/java/ola/rpc/StreamRpcChannel.java0000664000175000017500000001510214376533110020251 00000000000000/*********************************************************************** * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. * *************************************************************************/ package ola.rpc; import java.io.BufferedInputStream; import java.io.BufferedOutputStream; import java.net.Socket; import java.nio.ByteBuffer; import java.nio.ByteOrder; import java.util.logging.Level; import java.util.logging.Logger; import ola.proto.Ola.STREAMING_NO_RESPONSE; import ola.rpc.Rpc.RpcMessage; import com.google.protobuf.Descriptors.MethodDescriptor; import com.google.protobuf.DynamicMessage; import com.google.protobuf.Message; import com.google.protobuf.RpcCallback; import com.google.protobuf.RpcChannel; import com.google.protobuf.RpcController; /** * Basic RPC Channel implementation. All calls are done * synchronously. * * The RPC Channel is hard coded to localhost 9010 where the * olad daemon is running. */ public class StreamRpcChannel implements RpcChannel { private static Logger logger = Logger.getLogger(StreamRpcChannel.class.getName()); public static final int PORT = 9010; public static final String HOST = "localhost"; private static final int PROTOCOL_VERSION = 1; private static final int VERSION_MASK = 0xf0000000; private static final int SIZE_MASK = 0x0fffffff; private Socket socket = null; private BufferedOutputStream bos; private BufferedInputStream bis; private int sequence = 0; /** * Create new Rpc Channel Connection to olad. * @throws Exception */ public StreamRpcChannel() throws Exception { connect(); } /** * Open connection to olad daemon. * * @throws Exception */ public void connect() throws Exception { if (socket != null && socket.isConnected()) { logger.warning("Socket already connected."); return; } try { socket = new Socket(HOST, PORT); bos = new BufferedOutputStream(socket.getOutputStream()); bis = new BufferedInputStream(socket.getInputStream()); } catch (Exception e) { logger.severe("Error connecting. Make sure the olad daemon is running on port 9010"); throw e; } } /** * Close Rpc Channel. */ public void close() { if (socket != null && socket.isConnected()) { try { socket.close(); } catch (Exception e) { logger.warning("Error closing socket. " + e.getMessage()); } } } /* (non-Javadoc) * @see com.google.protobuf.RpcChannel#callMethod(com.google.protobuf.Descriptors.MethodDescriptor, com.google.protobuf.RpcController, com.google.protobuf.Message, com.google.protobuf.Message, com.google.protobuf.RpcCallback) */ public void callMethod(MethodDescriptor method, RpcController controller, Message requestMessage, Message responseMessage, RpcCallback done) { int messageId = sequence++; RpcMessage message = RpcMessage.newBuilder() .setType(Rpc.Type.REQUEST) .setId(messageId) .setName(method.getName()) .setBuffer(requestMessage.toByteString()) .build(); try { sendMessage(message); if (responseMessage.getDescriptorForType().getName().equals("STREAMING_NO_RESPONSE")) { // don't wait for response on streaming messages.. return; } RpcMessage response = readMessage(); if (response.getType().equals(Rpc.Type.RESPONSE)) { if (response.getId() != messageId) { controller.setFailed("Received message with id " + response.getId() + " , but was expecting " + messageId); } else { responseMessage = DynamicMessage.parseFrom(responseMessage.getDescriptorForType(), response.getBuffer()); if (done != null) { done.run(responseMessage); } } } else { controller.setFailed("No valid response received !"); } } catch (Exception e) { logger.severe("Error sending rpc message: " + e.getMessage()); controller.setFailed(e.getMessage()); done.run(null); } } /** * Send rpc message to olad. * * @param msg RpcMessage * @throws Exception */ private void sendMessage(RpcMessage msg) throws Exception { byte[] data = msg.toByteArray(); int headerContent = (PROTOCOL_VERSION << 28) & VERSION_MASK; headerContent |= data.length & SIZE_MASK; byte[] header = ByteBuffer.allocate(4).order(ByteOrder.nativeOrder()).putInt(headerContent).array(); if (logger.isLoggable(Level.FINEST)) { logger.info("Sending header " + header.length + " bytes"); for (byte b : header) { System.out.format("0x%x ", b); } logger.info("Sending data " + data.length + " bytes"); for (byte b : data) { System.out.format("0x%x ", b); } } bos.write(header); bos.write(data); bos.flush(); } /** * @return RpcMessage read back from olad. * * @throws Exception */ private RpcMessage readMessage() throws Exception { byte[] header = new byte[4]; bis.read(header); int headerValue = ByteBuffer.wrap(header).order(ByteOrder.nativeOrder()).getInt(); int size = headerValue & SIZE_MASK; byte[] data = new byte[size]; bis.read(data); if (logger.isLoggable(Level.FINEST)) { logger.info("Received header "); for (byte b : header) { System.out.format("0x%x ", b); } logger.info("Received data "); for (byte b : data) { System.out.format("0x%x ", b); } } return RpcMessage.parseFrom(data); } } ola-0.10.9/java/Makefile.am0000664000175000017500000000162514376533110012263 00000000000000# OLA Java client EXTRA_DIST = pom.xml \ src/main/java/ola/OlaClient.java \ src/main/java/ola/rpc/SimpleRpcController.java \ src/main/java/ola/rpc/StreamRpcChannel.java \ src/test/java/ola/OlaClientTest.java src/main/java/ola/proto/Ola.java: ${top_srcdir}/common/protocol/Ola.proto $(PROTOC) --java_out=src/main/java --proto_path=${top_srcdir}/common/protocol ${top_srcdir}/common/protocol/Ola.proto src/main/java/ola/rpc/Rpc.java: ${top_srcdir}/common/rpc/Rpc.proto $(PROTOC) --java_out=src/main/java --proto_path=${top_srcdir}/common/rpc ${top_srcdir}/common/rpc/Rpc.proto ola.jar: src/main/java/ola/proto/Ola.java src/main/java/ola/rpc/Rpc.java mvn package CLEANFILES = src/main/java/ola/proto/Ola.java \ src/main/java/ola/rpc/Rpc.java if BUILD_JAVA_LIBS # .jars aren't really data, but it sure ain't a program. noinst_DATA = ola.jar endif ola-0.10.9/libolaserver.pc.in0000664000175000017500000000044614376533110012730 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libolaserver Version: @VERSION@ Description: Open Lighting Architecture Server Requires: protobuf Libs: -L${libdir} -L${libdir}/olad -lola -lolacommon -lolaserver @OLA_SERVER_LIBS@ Cflags: -I${includedir} ola-0.10.9/LICENCE0000664000175000017500000000103314376533110010264 00000000000000Licencing Information for OLA ========================================= C++ ----------------------------------------- The files required for libola and libolacommon are licenced under the LGPLv2.1 (or later), this means you are free to link against the OLA client library in your own programs. The files required for libolaserver and olad are licenced under the GPL v2 (or later). Python ------------------------------------------ The Python client API is LGPL, the examples and RDM Responder Test Suite is GPL. Simon Newton 15/7/2005 ola-0.10.9/LGPL0000664000175000017500000006350414376533110007773 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ola-0.10.9/doxygen/0000775000175000017500000000000014376533271011047 500000000000000ola-0.10.9/doxygen/http.dox0000664000175000017500000000032114376533110012446 00000000000000/** * @defgroup http HTTP * @brief HTTP related functionality for the web server * * @addtogroup http * @{ * * @defgroup http_server HTTP Server * @brief The HTTP server. * * @} //End http group */ ola-0.10.9/doxygen/examples/0000775000175000017500000000000014376533271012665 500000000000000ola-0.10.9/doxygen/examples/receiver.cpp0000664000175000017500000000377714376533110015123 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2010 Simon Newton */ //! [Tutorial Example] NOLINT(whitespace/comments) #include #include #include #include static const unsigned int UNIVERSE = 1; // Called when universe registration completes. void RegisterComplete(const ola::client::Result& result) { if (!result.Success()) { OLA_WARN << "Failed to register universe: " << result.Error(); } } // Called when new DMX data arrives. void NewDmx(const ola::client::DMXMetadata &metadata, const ola::DmxBuffer &data) { std::cout << "Received " << data.Size() << " channels for universe " << metadata.universe << ", priority " << static_cast(metadata.priority) << std::endl; } int main() { ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); ola::client::OlaClientWrapper wrapper; if (!wrapper.Setup()) exit(1); ola::client::OlaClient *client = wrapper.GetClient(); // Set the callback and register our interest in this universe client->SetDMXCallback(ola::NewCallback(&NewDmx)); client->RegisterUniverse( UNIVERSE, ola::client::REGISTER, ola::NewSingleCallback(&RegisterComplete)); wrapper.GetSelectServer()->Run(); } //! [Tutorial Example] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/legacy_streaming_client.cpp0000664000175000017500000000360714376533110020162 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2010 Simon Newton */ //! [Tutorial Example] NOLINT(whitespace/comments) #include #include #include #include #include #include using std::cout; using std::endl; int main(int, char *[]) { unsigned int universe = 1; // universe to use for sending data // turn on OLA logging ola::InitLogging(ola::OLA_LOG_WARN, ola::OLA_LOG_STDERR); ola::DmxBuffer buffer; // A DmxBuffer to hold the data. buffer.Blackout(); // Set all channels to 0 // Create a new client. ola::StreamingClient ola_client((ola::StreamingClient::Options())); // Setup the client, this connects to the server if (!ola_client.Setup()) { std::cerr << "Setup failed" << endl; exit(1); } // Send 100 frames to the server. Increment slot (channel) 0 each time a // frame is sent. for (unsigned int i = 0; i < 100; i++) { buffer.SetChannel(0, i); if (!ola_client.SendDmx(universe, buffer)) { cout << "Send DMX failed" << endl; exit(1); } usleep(20000); // sleep for 25ms between frames. } return 0; } //! [Tutorial Example] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/streaming_client.cpp0000664000175000017500000000364514376533110016640 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2010 Simon Newton */ //! [Tutorial Example] NOLINT(whitespace/comments) #include #include #include #include #include #include using std::cout; using std::endl; int main(int, char *[]) { unsigned int universe = 1; // universe to use for sending data // turn on OLA logging ola::InitLogging(ola::OLA_LOG_WARN, ola::OLA_LOG_STDERR); ola::DmxBuffer buffer; // A DmxBuffer to hold the data. buffer.Blackout(); // Set all channels to 0 // Create a new client. ola::client::StreamingClient ola_client( (ola::client::StreamingClient::Options())); // Setup the client, this connects to the server if (!ola_client.Setup()) { std::cerr << "Setup failed" << endl; exit(1); } // Send 100 frames to the server. Increment slot (channel) 0 each time a // frame is sent. for (unsigned int i = 0; i < 100; i++) { buffer.SetChannel(0, i); if (!ola_client.SendDmx(universe, buffer)) { cout << "Send DMX failed" << endl; exit(1); } usleep(25000); // sleep for 25ms between frames. } return 0; } //! [Tutorial Example] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/udp_server.cpp0000664000175000017500000000366314376533110015467 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2014 Simon Newton */ //! [UDP Server] NOLINT(whitespace/comments) #include #include #include #include #include using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::network::UDPSocket; // The port to listen on. static const unsigned int PORT = 12345; // Called when a UDP datagram arrives. void ReceiveMessage(UDPSocket *socket) { ola::network::IPV4SocketAddress client; uint8_t data[1500]; ssize_t data_size = arraysize(data); if (socket->RecvFrom(data, &data_size, &client)) { OLA_INFO << "Received " << data_size << " bytes from " << client; } else { OLA_WARN << "Recv failure"; } } int main() { ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); IPV4SocketAddress listen_address(IPV4Address::WildCard(), PORT); UDPSocket udp_socket; if (!udp_socket.Init()) { return -1; } if (!udp_socket.Bind(listen_address)) { return -1; } udp_socket.SetOnData(ola::NewCallback(&ReceiveMessage, &udp_socket)); ola::io::SelectServer ss; ss.AddReadDescriptor(&udp_socket); ss.Run(); } //! [UDP Server] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/streaming_client_plugin.cpp0000664000175000017500000000561514376533110020215 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2014 Simon Newton */ //! [Streaming Client Plugin] NOLINT(whitespace/comments) #include #include #include #include #include using std::cout; using std::endl; /** * @brief Load a symbol. */ template FunctionType LoadSymbol(void *module, const char *symbol) { FunctionType ptr = reinterpret_cast(dlsym(module, symbol)); if (!ptr) { cout << "Failed to find " << symbol << " " << dlerror() << endl; } return ptr; } int main() { ola::client::StreamingClientInterface *client = NULL; // Adjust to suit. void *module = dlopen("/usr/local/lib/libola.dylib", RTLD_NOW); // void *module = dlopen("/usr/local/lib/libola.so", RTLD_NOW); if (!module) { cout << "Failed to load" << dlerror() << endl; return -1; } ola_new_streaming_client_t *new_client_ptr = LoadSymbol(module, OLA_NEW_STREAMING_CLIENT); ola_delete_streaming_client_t *delete_client_ptr = LoadSymbol( module, OLA_DELETE_STREAMING_CLIENT); ola_new_dmxbuffer_t *new_buffer_ptr = LoadSymbol(module, OLA_NEW_DMXBUFFER); ola_delete_dmxbuffer_t *delete_buffer_ptr = LoadSymbol(module, OLA_DELETE_DMXBUFFER); ola_set_dmxbuffer_t *set_buffer_ptr = LoadSymbol(module, OLA_SET_DMXBUFFER); if (!(new_client_ptr && delete_client_ptr && new_buffer_ptr && delete_buffer_ptr && set_buffer_ptr)) { return -1; } ola::client::StreamingClient::Options options; client = new_client_ptr(options); cout << "Setup() returned: " << client->Setup() << endl; ola::DmxBuffer *buffer = new_buffer_ptr(); // Now actually send the DMX uint8_t data[] = {1, 2, 3}; set_buffer_ptr(buffer, data, sizeof(data)); const unsigned int universe = 1; client->SendDMX(universe, *buffer, ola::client::StreamingClient::SendArgs()); client->Stop(); delete_buffer_ptr(buffer); delete_client_ptr(client); if (module) { dlclose(module); } } //! [Streaming Client Plugin] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/stdin_handler.cpp0000664000175000017500000000314714376533110016124 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2015 Simon Newton */ //! [Example] NOLINT(whitespace/comments) #include #include #include #include class ExampleStdinHandler { public: ExampleStdinHandler() : m_stdin_handler(&m_ss, ola::NewCallback(this, &ExampleStdinHandler::Input)) { } void Run() { m_ss.Run(); } private: ola::io::SelectServer m_ss; ola::io::StdinHandler m_stdin_handler; void Input(int c); }; void ExampleStdinHandler::Input(int c) { switch (c) { case 'q': m_ss.Terminate(); break; default: std::cout << "Got " << static_cast(c) << " - " << c << std::endl; break; } } int main(int argc, char* argv[]) { ola::AppInit(&argc, argv, "", "Example Stdin Handler"); ExampleStdinHandler handler; handler.Run(); } //! [Example] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/legacy_receiver.cpp0000664000175000017500000000404614376533110016435 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * * Copyright (C) 2010 Simon Newton */ //! [Tutorial Example] NOLINT(whitespace/comments) #include #include #include #include static const unsigned int UNIVERSE = 1; // Called when universe registration completes. void RegisterComplete(const std::string& error) { if (!error.empty()) { OLA_WARN << "Failed to register universe"; } } // Called when new DMX data arrives. void NewDmx(unsigned int universe, uint8_t priority, const ola::DmxBuffer &data, const std::string &error) { if (error.empty()) { OLA_INFO << "Received " << data.Size() << " channels for universe " << universe << ", priority " << static_cast(priority); } else { OLA_WARN << "Receive failed: " << error; } } int main() { ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); ola::OlaCallbackClientWrapper wrapper; if (!wrapper.Setup()) exit(1); ola::OlaCallbackClient *client = wrapper.GetClient(); // Set the callback and register our interest in this universe client->SetDmxCallback(ola::NewCallback(&NewDmx)); client->RegisterUniverse( UNIVERSE, ola::REGISTER, ola::NewSingleCallback(&RegisterComplete)); wrapper.GetSelectServer()->Run(); } //! [Tutorial Example] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/client_disconnect.cpp0000664000175000017500000000416414376533110016775 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2015 Simon Newton */ //! [Client Disconnect Example] NOLINT(whitespace/comments) #include #include #include #include #include #include using std::cout; using std::endl; // Called when the connection to olad is closed. void ConnectionClosed(ola::io::SelectServer *ss) { std::cerr << "Connection to olad was closed" << endl; ss->Terminate(); // terminate the program. } bool SendData(ola::client::OlaClientWrapper *wrapper) { static unsigned int universe = 1; static uint8_t i = 0; ola::DmxBuffer buffer; buffer.Blackout(); buffer.SetChannel(0, i++); wrapper->GetClient()->SendDMX(universe, buffer, ola::client::SendDMXArgs()); return true; } int main(int, char *[]) { ola::InitLogging(ola::OLA_LOG_WARN, ola::OLA_LOG_STDERR); ola::client::OlaClientWrapper wrapper; if (!wrapper.Setup()) { std::cerr << "Setup failed" << endl; exit(1); } // Create a timeout and register it with the SelectServer ola::io::SelectServer *ss = wrapper.GetSelectServer(); ss->RegisterRepeatingTimeout(25, ola::NewCallback(&SendData, &wrapper)); // Register the on-close handler wrapper.GetClient()->SetCloseHandler( ola::NewSingleCallback(ConnectionClosed, ss)); // Start the main loop ss->Run(); } //! [Client Disconnect Example] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/callback_client_transmit.cpp0000664000175000017500000000351114376533110020314 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2010 Simon Newton */ //! [Tutorial Example] NOLINT(whitespace/comments) #include #include #include #include #include using std::cout; using std::endl; bool SendData(ola::client::OlaClientWrapper *wrapper) { static unsigned int universe = 1; static unsigned int i = 0; ola::DmxBuffer buffer; buffer.Blackout(); buffer.SetChannel(0, i); wrapper->GetClient()->SendDMX(universe, buffer, ola::client::SendDMXArgs()); if (++i == 100) { wrapper->GetSelectServer()->Terminate(); } return true; } int main(int, char *[]) { ola::InitLogging(ola::OLA_LOG_WARN, ola::OLA_LOG_STDERR); ola::client::OlaClientWrapper wrapper; if (!wrapper.Setup()) { std::cerr << "Setup failed" << endl; exit(1); } // Create a timeout and register it with the SelectServer ola::io::SelectServer *ss = wrapper.GetSelectServer(); ss->RegisterRepeatingTimeout(25, ola::NewCallback(&SendData, &wrapper)); // Start the main loop ss->Run(); } //! [Tutorial Example] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/fetch_plugins.cpp0000664000175000017500000000413414376533110016135 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2015 Simon Newton */ //! [Client Fetch Plugins] NOLINT(whitespace/comments) #include #include #include #include #include using std::cout; using std::endl; using std::vector; // Called when plugin information is available. void ShowPluginList(ola::io::SelectServer *ss, const ola::client::Result &result, const vector &plugins) { if (!result.Success()) { std::cerr << result.Error() << endl; } else { vector::const_iterator iter = plugins.begin(); for (; iter != plugins.end(); ++iter) { cout << "Plugin: " << iter->Name() << endl; } } ss->Terminate(); // terminate the program. } int main(int, char *[]) { ola::InitLogging(ola::OLA_LOG_WARN, ola::OLA_LOG_STDERR); ola::client::OlaClientWrapper wrapper; if (!wrapper.Setup()) { std::cerr << "Setup failed" << endl; exit(1); } // Fetch the list of plugins, a pointer to the SelectServer is passed to the // callback so we can use it to terminate the program. ola::io::SelectServer *ss = wrapper.GetSelectServer(); wrapper.GetClient()->FetchPluginList( ola::NewSingleCallback(ShowPluginList, ss)); // Start the main loop ss->Run(); } //! [Client Fetch Plugins] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/client_thread.cpp0000664000175000017500000000644314376533110016115 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2015 Simon Newton */ //! [Client Thread] NOLINT(whitespace/comments) #include #include #include #include #include #include #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN #include #endif // _WIN32 using ola::io::SelectServer; using ola::NewSingleCallback; using std::cout; using std::endl; using std::vector; class OlaThread : public ola::thread::Thread { public: bool Start() { if (!m_wrapper.Setup()) { return false; } return ola::thread::Thread::Start(); } void Stop() { m_wrapper.GetSelectServer()->Terminate(); } void FetchPluginList(ola::client::PluginListCallback *callback) { m_wrapper.GetSelectServer()->Execute( NewSingleCallback(this, &OlaThread::InternalFetchPluginList, callback)); } ola::io::SelectServer* GetSelectServer() { return m_wrapper.GetSelectServer(); } protected: void *Run() { m_wrapper.GetSelectServer()->Run(); return NULL; } private: ola::client::OlaClientWrapper m_wrapper; void InternalFetchPluginList(ola::client::PluginListCallback *callback) { m_wrapper.GetClient()->FetchPluginList(callback); } }; // Called when plugin information is available. // This function is run from the OLA Thread, if you use variables in the main // program then you'll need to add locking. void ShowPluginList(ola::io::SelectServer *ss, const ola::client::Result &result, const vector &plugins) { if (!result.Success()) { std::cerr << result.Error() << endl; } else { vector::const_iterator iter = plugins.begin(); for (; iter != plugins.end(); ++iter) { cout << "Plugin: " << iter->Name() << endl; } } ss->Terminate(); // terminate the program. } int main(int, char *[]) { ola::InitLogging(ola::OLA_LOG_WARN, ola::OLA_LOG_STDERR); OlaThread ola_thread; if (!ola_thread.Start()) { std::cerr << "Failed to start OLA thread" << endl; exit(1); } // Control is returned to the main program here. // To fetch a list of plugins ola::io::SelectServer *ss = ola_thread.GetSelectServer(); ola_thread.FetchPluginList( ola::NewSingleCallback(ShowPluginList, ss)); // The main program continues... #ifdef _WIN32 Sleep(1000); #else sleep(1); #endif // _WIN32 // When it's time to exit, Stop the OLA thread. ola_thread.Stop(); ola_thread.Join(); } //! [Client Thread] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/flags.cpp0000664000175000017500000000322014376533110014372 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2010 Simon Newton */ //! [Example] NOLINT(whitespace/comments) #include #include using std::cout; using std::endl; // These options are --foo and --no-bar. DEFINE_default_bool(foo, false, "Enable feature foo"); DEFINE_default_bool(bar, true, "Disable feature bar"); // FLAGS_name defaults to "simon" and can be changed with --name bob DEFINE_string(name, "simon", "Specify the name"); // Short options can also be specified: // FLAGS_baz can be set with --baz or -b DEFINE_s_int8(baz, b, 0, "Sets the value of baz"); int main(int argc, char* argv[]) { ola::SetHelpString("[options]", "Description of binary"); ola::ParseFlags(&argc, argv); cout << "--foo is " << FLAGS_foo << endl; cout << "--bar is " << FLAGS_bar << endl; cout << "--name is " << FLAGS_name.str() << endl; cout << "--baz (-b) is " << static_cast(FLAGS_baz) << endl; } //! [Example] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/legacy_callback_client_transmit.cpp0000664000175000017500000000345014376533110021642 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2010 Simon Newton */ //! [Tutorial Example] NOLINT(whitespace/comments) #include #include #include #include #include using std::cout; using std::endl; bool SendData(ola::OlaCallbackClientWrapper *wrapper) { static unsigned int universe = 1; static unsigned int i = 0; ola::DmxBuffer buffer; buffer.Blackout(); buffer.SetChannel(0, i); wrapper->GetClient()->SendDmx(universe, buffer); if (++i == 100) { wrapper->GetSelectServer()->Terminate(); } return true; } int main(int, char *[]) { ola::InitLogging(ola::OLA_LOG_WARN, ola::OLA_LOG_STDERR); ola::OlaCallbackClientWrapper wrapper; if (!wrapper.Setup()) { std::cerr << "Setup failed" << endl; exit(1); } // Create a timeout and register it with the SelectServer ola::io::SelectServer *ss = wrapper.GetSelectServer(); ss->RegisterRepeatingTimeout(25, ola::NewCallback(&SendData, &wrapper)); // Start the main loop ss->Run(); } //! [Tutorial Example] NOLINT(whitespace/comments) ola-0.10.9/doxygen/examples/Makefile.mk0000664000175000017500000000537014376533110014650 00000000000000# The following should match what pkg-config --libs libola returns DOXYGEN_EXAMPLES_LDADD = common/libolacommon.la \ ola/libola.la if BUILD_EXAMPLES noinst_PROGRAMS += \ doxygen/examples/callback_client_transmit \ doxygen/examples/client_disconnect \ doxygen/examples/client_thread \ doxygen/examples/fetch_plugins \ doxygen/examples/flags \ doxygen/examples/legacy_callback_client_transmit \ doxygen/examples/legacy_receiver \ doxygen/examples/legacy_streaming_client \ doxygen/examples/receiver \ doxygen/examples/stdin_handler \ doxygen/examples/streaming_client \ doxygen/examples/udp_server if HAVE_DLOPEN noinst_PROGRAMS += doxygen/examples/streaming_client_plugin endif endif doxygen_examples_callback_client_transmit_SOURCES = \ doxygen/examples/callback_client_transmit.cpp doxygen_examples_callback_client_transmit_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_client_disconnect_SOURCES = \ doxygen/examples/client_disconnect.cpp doxygen_examples_client_disconnect_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_client_thread_SOURCES = \ doxygen/examples/client_thread.cpp doxygen_examples_client_thread_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_fetch_plugins_SOURCES = \ doxygen/examples/fetch_plugins.cpp doxygen_examples_fetch_plugins_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_legacy_callback_client_transmit_SOURCES = \ doxygen/examples/legacy_callback_client_transmit.cpp doxygen_examples_legacy_callback_client_transmit_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_flags_SOURCES = \ doxygen/examples/flags.cpp doxygen_examples_flags_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_streaming_client_SOURCES = \ doxygen/examples/streaming_client.cpp doxygen_examples_streaming_client_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_legacy_streaming_client_SOURCES = \ doxygen/examples/legacy_streaming_client.cpp doxygen_examples_legacy_streaming_client_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_streaming_client_plugin_SOURCES = \ doxygen/examples/streaming_client_plugin.cpp doxygen_examples_streaming_client_plugin_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_legacy_receiver_SOURCES = \ doxygen/examples/legacy_receiver.cpp doxygen_examples_legacy_receiver_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_receiver_SOURCES = \ doxygen/examples/receiver.cpp doxygen_examples_receiver_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_stdin_handler_SOURCES = \ doxygen/examples/stdin_handler.cpp doxygen_examples_stdin_handler_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_udp_server_SOURCES = \ doxygen/examples/udp_server.cpp doxygen_examples_udp_server_LDADD = $(DOXYGEN_EXAMPLES_LDADD) ola-0.10.9/doxygen/copy-doc.sh0000775000175000017500000000062314376533110013034 00000000000000#!/bin/sh if [ $# != 1 ]; then echo "Usage: $0 " exit 1; fi output_dir=$1 if [ ! -d $output_dir ]; then echo $output_dir is not a directory exit 1; fi echo "Output dir: $output_dir"; if [ ! -d ./html/ ]; then echo ./html/ doesn\'t exist, make doxygen-doc failed somehow exit 1; fi cp -a -v ./html/* $output_dir chmod -c -R a+r $output_dir chmod -c a+rx $output_dir/search ola-0.10.9/doxygen/OLA.png0000664000175000017500000000305314376533110012101 00000000000000‰PNG  IHDRo0$BòIDATxÚíÜylTUÆagÚŽ-[ T‘h""J\ˆaQ0j(ˆAÀ­)£‰…Ó ¨,j `ÀE²7\E[D@YLYìýü…@Ò|ùêÜ™¹[Ißäù‹éÜKß™;çž3§‰ÈY ©?9ßYCy åM6ò1ëQ†Ã¨FÊñ#Ö q .ä4BfXË‹bV ’ Ó؈‘ˆ!Ùˆ†D°ëÂV^ùØ qÉŒEúR^_È9ÃR^[¬‡xd'º\å•@ÎY†òîÇß:œÄ ¢7:"÷œŽ¸ ã±ÿ@êP…Âz\ÞMê|ªÑ.ÈòžG ÄðB8Mˆsé]€´zXÞ{eNPåM‡Ž`4ÒSü`„½Ã2¤Õ£ò:à D9Ž~—÷$İ­àVšáuˆan})Oý´gý,¯NC”©ˆÀ‹ŒBD)¨嵎sËtY~”× ¿A”gàu/š \òòfBâxÔò^2?týËãå+DCZ^ŽªóøÛŒÁ]ÔËòòŒK×7È€Ÿy¢Œ iyOA”.QzYÞkÆ}Ê ð;¹8¤Î¥ Ñ•ÃêJjM!–ªûÒ«òZá”:Ø|•q¥_ÈÊ{¢ôÁù< QzxQ^¡9;\²ð§:§wCT^eêøÛŒwæ}«åEyŸ©ƒ|„ ó‚:§SÈ Iyùet&ªÇÔ “›åeCôÑ:7B”ž!)ïkuìRD¡Óåê±o¹Y^ˆr‚Nĸt>‚òzAx±OU­Dk·Ê+2ÖØ¬DÐQ— j„º²J¿jCPÞZuÜ}q•sÁà,·Ê›ïàó®%¶BðKïÌö(Å,GtŠÕ¹m¸¼ÎÆ*K!âeŽú™£Èv£¼÷Õ¿éàƒwRÍbõœC 3A/Ú\ÞR½ÂâpI¬ªÕϹQÞZoéIê1Ó=øE s0]öK€å]n0N³Hýì~ÄR-o£ƒòšáS¾E.RÍÕµf(Jé ¼Ÿ,ïUc­®%œ¦“qÉ‘jy&°Ž–7‹3òšŠË¦=è(F¢Ñ¿ë]ˆ¤RÞBõ„Ë–ÌVç¶) ò¦Ãý6H4·@”»S)oб’–¬Òƒ)?ËÓ7ÚÙœJyCyÍÆø¿4…׉« “(¯â±.É–—Qî„•ŒZ×íÝIN^wÄTâÅx_¥Sºú\^ {![–ÊÄôž¸÷zö»t.¾¯ì+3ÔãNàbŸË{âƒ3¸"ÙòfÃàèŒP[ˆD³A=ÇÐÉ4:—ø¼$Á.uŒµ.nF9¢ž{^²å] qpš‰-À•°ÒMa¥'ŽÕšŠKsø]–¾>—×¢Ü ·2ÅXòÊu\žJ‰ñîk +yˆÁJªñ/†ÃJ:!lcó{D|.ïsõü[=¸w<®§“-¯»1°8MSµ6øÍkÞÓÇòºA”ûàv^6æJ;-Og D™ §ÉQóåH$ùÆ èD|.o¥ñÕ½4¸{Âz\²åµÂAcé~œ¦•8¡pš®8iì@ºÊ×/ÝÚsð*zueÒ–§s;NCÙ'à4Y nDéSu}_Óçò—²,x•kŒËT6š@ \ÞoçêØ13€&íPe|lxÕê˜Û/ÏžŒÕv£—Kƒ‚ÃBD(o¶11 ¯Ó¢ôNusej † ¸+ÁòîÁ&H^QÅùU^ pŸÆzBÀm̓q,ΦŃžhKÑÐaqœÙù Œ…Óˆ öךr›lLÐçÁ¯Ük ¯O±Remote * procedure call has some good background reading. * * On the client side there is a stub, usually a class. Each stub method takes * some request data and some sort of callback function that is run when the * remote call completes. The stub class is auto-generated from the protocol * specification. The stub class is responsible for serializing the request * data, sending it to the remote end, waiting for the response, deserializing * the response and finally invoking the callback function. * * On the server side there is a usually a 'Service' class that has to be * provided. Usually an abstract base class is generated from the protocol * specification and the programmer subclasses this and provides an * implementation for each method that can be called. * * Because the client stub is autogenerated their can be a lot of duplicated * code which constructs the request message, sets up the completion callbacks * and invokes the method. Rather than forcing the users of the client library * to do duplicate all this work, there is usually a layer in between that * provides a friendly API and calls into the stub. This layer can be thin * (all it does is wrap the stub functions) or thick (a single API call may * invoke multiple RPCs). * * These client APIs can be blocking or asynchronous. Blocking clients force the * caller to wait for the RPC to complete before the function call returns. * Asynchronous APIs take a callback, in much the same way as the stub itself * does. * * @section rpc_Proto Use of Protocol Buffers * * OLA uses Protocol Buffers * as the data serialization format. Protocol buffers allow us to wrap the * request and response data up into a message (similar to a C struct) and then * serialize the message to binary data in a platform independent way. It's * worth reading the * * Protocol Buffers documentation before going further. You don't need to * understand the binary format, but you should be familiar with the Protocol * Buffer definition format. * * As well as data serialization, protobufs also provide a basic framework for * building RPC services. Early versions of protobufs came with a * service generator. The generic service generator has been deprecated * since the 2.4.0 release since code generated was rather inflexible (in * trying to be all things to all people it left many needs un-addressed). * * Let's look at a simple example for a dictionary service, Dictionary.proto. * The client sends the word its looking for and the server replies with the * definition and maybe some extra information like the pronunciation and a * list of similar words. ~~~~~~~~~~~~~~~~~~~~~ message WordQuery { required string word = 1; } message WordDefinition { required string definition = 1; optional string pronunciation = 2; repeated string similar_words = 3; } service DictionaryLookup { rpc Lookup(WordQuery) returns(WordDefinition); } ~~~~~~~~~~~~~~~~~~~~~ * * We can generate the C++ code by running: * * protoc --plugin=protoc-gen-cppservice=protoc/ola_protoc_plugin \ * --cppservice_out ./ Dictionary.proto * * The generated C++ stub class definition in Dictionary.pb.h looks something * like: ~~~~~~~~~~~~~~~~~~~~~ class DictionaryLookup_Stub { public: DictionaryLookup_Stub(::google::protobuf::RpcChannel* channel); void Lookup(\::google::protobuf::RpcController* controller, const \::WordQuery* request, \::WordDefinition* response, \::google::protobuf::Closure* done); }; ~~~~~~~~~~~~~~~~~~~~~ * * As you can see the 2nd and 3rd arguments are the request and response * messages (WordQuery and WordDefinition respectively). The 4th argument is * the completion callback and the 1st argument keeps track of the outstanding * RPC. * * An implementation of DictionaryLookup_Stub::Lookup(...) is generated in * Dictionary.pb.cc. Since the only thing that differs between methods is the * request / response types and the method name, the implementation just calls * through to the RpcChannel class: * ~~~~~~~~~~~~~~~~~~~~~ void DictionaryLookup_Stub::Lookup(\::google::protobuf::RpcController* controller, const \::WordQuery* request, \::WordDefinition* response, \::google::protobuf::Closure* done) { channel_->CallMethod(descriptor()->method(0), controller, request, response, done); } ~~~~~~~~~~~~~~~~~~~~~ * * Protocol buffers doesn't provide an implementation of RpcChannel, since it's * implementation specific. Most of the time the RpcChannel uses a TCP * connection but you can imagine other data passing mechanisms. * * As part of writing a new client you'll need to write an implementation of * an RpcChannel. The C++ implementation is ola::rpc::RpcChannel. * * Putting it all together produces the flow shown in the diagram below. The * yellow code is auto-generated, the blue code has to be written. * * \image html rpc.png "The control flow from the Client to the Server" * * * @section rpc_OLA_RPC OLA's Model * * By default, olad listens on localhost:9010 . Clients open a TCP connection * to this ip:port and write serialized protobufs (see \ref rpc_RPCLayer) to * the connection. * * Why TCP and not UDP? Mostly because the original developer was lazy and * didn't want to deal with chunking data into packets, when TCP handles this * for us. However TCP has it's own problems, with [Head of line * blocking](http://en.wikipedia.org/wiki/Head-of-line_blocking). For this * reason RPC traffic should only be used on localhost, where packet loss is * unlikely. If you want cross-host RPC you should probably be using E1.31 * (sACN) or the Web APIs. * * The OLA client libraries follow the thin, asynchronous client model. * There is usually a 1:1 mapping between API methods and the underlying RPC * calls. The clients take the arguments supplied to the API method, construct * a request protobuf and invoke the stub method. * * The exception is the Java library, which could do with some love. * * The Python client continues to use the service generator that comes with * Protocol Buffers. The C++ client and olad (the server component) has * switched to our own generator, which can be found in protoc/ . If you're * writing a client in a new language we suggest you build your own generator, * protoc/CppGenerator.h is a good starting point. * * If you don't know C++ don't worry, we're happy to help. Once you know what * your generated code needs to look like we can build the generator for you. * * @section rpc_RPCLayer RPC Layer * * To make the RPC system message-agnostic we wrap the serialized request / * response protobufs in an outer layer protobuf. This outer layer also * contains the RPC control information, like what method to invoke, the * sequence number etc. * * The outer layer is defined in common/rpc/Rpc.proto and looks like: ~~~~~~~~~~~~~~~~~~~~~ enum Type { REQUEST = 1; RESPONSE = 2; ... }; message RpcMessage { required Type type = 1; optional uint32 id = 2; optional string name = 3; optional bytes buffer = 4; } ~~~~~~~~~~~~~~~~~~~~~ * * The fields are as follows: *
type
*
The type of this RPC message, usually REQUEST or RESPONSE
*
id
*
the sequence number of the message. The sequence number of response messages * must match the number used in the request.
*
name
*
the name of the remote method to call
*
buffer
*
the serialized inner protocol buffer.
*
* * So putting it all together, the RpcChannel::CallMethod() should look * something like: ~~~~~~~~~~~~~~~~~~~~~ void RpcChannel::CallMethod(const MethodDescriptor *method, RpcController *controller, const Message *request, Message *reply, SingleUseCallback0 *done) { RpcMessage message; message.set_type(REQUEST); message.set_id(m_sequence.Next()); message.set_name(method->name()); string output; request->SerializeToString(&output); message.set_buffer(output); // Send the message over the TCP connection. return SendMsg(&message); } ~~~~~~~~~~~~~~~~~~~~~ * * That's it on the sender side at a high level, although there is a bit of * detail that was skipped over. For instance you'll need to store the sequence * number, the reply message, the RpcController and the callback so you can do * the right thing when the response arrives. * * @section rpc_RPCHeader RPC Header * * Finally, since protobufs don't contain length information, we prepend a * 4 byte header to each message. The first 4 bits of the header is a version * number (currently 1) while the remaining 28 bits is the length of the * serialized RpcMessage. * * \image html rpc-message.png "The wire format of a single RPC message" * * When writing the code that sends a message, it's very important to enable * TCP_NODELAY on the socket and write the 4 byte header and the serialized * RpcMessage in a single call to write(). Otherwise, the write-write-read * pattern can introduce delays of up to 500ms to the RPCs, Nagle's algorithm * has a detailed analysis of why this is so. Fixing this in the C++ & Python * clients led to a 1000x improvement in the RPC latency and a 4x speedup in * the RDM Responder Tests, see commit * a80ce0ee1e714ffa3c036b14dc30cc0141c13363. * * @section rpc_OLAServices OLA Methods * * The methods exported by olad are defined in common/protocol/Ola.proto . If * you compare the RPC methods to those provided by the ola::client::OlaClient * class (the C++ API) you'll notice they are very similar. * * @section rpc_NewClient Writing a new Client * * To write a client in a new language you'll need the following: * - An implementation of Protocol Buffers for your language. Luckily there * are * many implementations available. It doesn't have to have a service * generator (see the first point below). * - A sockets library. * - If you're writing an asynchronous client (and we recommend you do) you'll * either need non-blocking I/O or a threading library. * * I'd tackle the problem in the following steps: * - Write (or ask us to help write) the service generator for your language. * This will allow you to generate the OlaServerService_Stub. * - Write an implementation of RpcChannel and RpcController. * - Write the code to establish a connection to localhost:9010 and read from * the network socket when new data arrives. * * Once that's complete you should have a working RPC implementation. However * it'll still require the callers to deal with protobufs, stub objects and the * network code. The final step is to write the thin layer on top that presents * a clean, programmer friendly API, and handles the protobuf creation * internally. * * The last part is the least technically challenging, but it does require good * API design so that new methods and arguments can be added later. * * @section rpc_SimpleExample A Very Simple Example * * A quick example in Python style pseudo code. This constructs a DmxData * message, sends it to the server and the extracts the Ack response. ~~~~~~~~~~~~~~~~~~~~~ # connect to socket server = socket.connect("127.0.0.1", 9010) # Build the request Ola_pb2.DmxData dmx_data dmx_data.universe = 1 dmx_data.data = ..... # Wrap in the outer layer Rpc_pb2.RpcMessage rpc_message rpc_message.type = RpcMessage::REQUEST rpc_message.id = 1 rpc_message.name = 'UpdateDmxData' rpc_message.buffer = dmx_data.Serialize() server.write(rpc_message.Serialize()) # wait for response on socket response_data = server.recv(1000) header = struct.unpack('> 28, header & 0x0ffffff) if version != 1: # Bad reply! return response = Rpc_pb2.RpcMessage() response.ParseFromString(response_data[4:size]) if message.type != RpcMessage::RESPONSE: # not a response return if message.id != 1: # not the response we're looking for return Ola_pb2.Ack ack ack.ParseFromString(response.buffer) ~~~~~~~~~~~~~~~~~~~~~ * */ ola-0.10.9/doxygen/json.dox0000664000175000017500000000173714376533110012454 00000000000000/** * @defgroup json JSON * @brief JSON based APIs. * * The ola::web namespace provides: * - Classes for parsing and serializing JSON (RFC 7159) * - Implementation of JSON pointers (RFC 6901) * - Classes for applying JSON Patch documents (RFC 6902) * - A JSON Schema validator (http://www.json-schema.org). * * @par Serialization Example * * ~~~~~~~~~~~~~~~~~~~~~ \#include \#include JsonObject obj; obj.Add("name", "simon"); obj.Add("age", 10); obj.Add("male", true); JsonArray *friends = obj.AddArray("friends"); friends->Add("Peter"); friends->Add("Bob"); friends->Add("Jane"); const std::string output = JsonWriter::AsString(json); ~~~~~~~~~~~~~~~~~~~~~ * * @par Parsing Example * * ~~~~~~~~~~~~~~~~~~~~~ \#include \#include std::string error; JsonValue *value = JsonParser::Parse(json_string, &error); ~~~~~~~~~~~~~~~~~~~~~ */ ola-0.10.9/doxygen/rpc-message.png0000664000175000017500000003426614376533110013706 00000000000000‰PNG  IHDRôb¦ž!` AiCCPICC ProfileH –wTSهϽ7½Ð" %ôz Ò;HQ‰I€P†„&vDF)VdTÀG‡"cE ƒ‚b× òPÆÁQDEåÝŒk ï­5óÞšýÇYßÙç·×Ùgï}׺Pü‚ÂtX€4¡XîëÁ\ËÄ÷XÀáffGøDÔü½=™™¨HƳöî.€d»Û,¿P&sÖÿ‘"7C$ EÕ6<~&å”S³Å2ÿÊô•)2†12¡ ¢¬"ãįlö§æ+»É˜—&ä¡Yμ4žŒ»PÞš%ᣌ¡\˜%àg£|e½TIšå÷(ÓÓøœL0™_Ìç&¡l‰2Eî‰ò”Ä9¼r‹ù9hžx¦g䊉Ib¦טiåèÈfúñ³Sùb1+”ÃMáˆxLÏô´ Ž0€¯o–E%Ym™h‘í­ííYÖæhù¿Ùß~Sý=ÈzûUñ&ìÏžAŒžYßlì¬/½ö$Z›³¾•U´m@åá¬Oï ò´Þœó†l^’Äâ ' ‹ììlsŸk.+è7ûŸ‚oÊ¿†9÷™ËîûV;¦?#I3eE妧¦KDÌÌ —Ïdý÷ÿãÀ9iÍÉÃ,œŸÀñ…èUQè” „‰h»…Ø A1ØvƒjpÔzÐN‚6p\WÀ p €G@ †ÁK0Þi‚ð¢Aª¤™BÖZyCAP8ÅC‰’@ùÐ&¨*ƒª¡CP=ô#tº]ƒú Ð 4ý}„˜Óa ض€Ù°;GÂËàDxœÀÛáJ¸>·Âáð,…_“@ÈÑFXñDBX$!k‘"¤©Eš¤¹H‘q䇡a˜Æã‡YŒábVaÖbJ0Õ˜c˜VLæ6f3ù‚¥bÕ±¦X'¬?v 6›-ÄV``[°—±Øaì;ÇÀâp~¸\2n5®·׌»€ëà á&ñx¼*Þï‚Ásðb|!¾ ߯¿' Zk‚!– $l$Tçý„Â4Q¨Ot"†yÄ\b)±ŽØA¼I&N“I†$R$)™´TIj"]&=&½!“É:dGrY@^O®$Ÿ _%’?P”(&OJEBÙN9J¹@y@yC¥R ¨nÔXª˜ºZO½D}J}/G“3—ó—ãÉ­“«‘k•ë—{%O”×—w—_.Ÿ'_!Jþ¦ü¸QÁ@ÁS£°V¡Fá´Â=…IEš¢•bˆbšb‰bƒâ5ÅQ%¼’’·O©@é°Ò%¥!BÓ¥yÒ¸´M´:ÚeÚ0G7¤ûÓ“éÅôè½ô e%e[å(ååå³ÊRÂ0`ø3R¥Œ“Œ»Œó4æ¹ÏãÏÛ6¯i^ÿ¼)•ù*n*|•"•f••ªLUoÕÕªmªOÔ0j&jajÙjûÕ.«Ï§ÏwžÏ_4ÿäü‡ê°º‰z¸újõÃê=ꓚ¾U—4Æ5šnšÉšåšç4Ç´hZ µZåZçµ^0•™îÌTf%³‹9¡­®í§-Ñ>¤Ý«=­c¨³Xg£N³Î]’.[7A·\·SwBOK/X/_¯Qï¡>QŸ­Ÿ¤¿G¿[ÊÀÐ Ú`‹A›Á¨¡Š¡¿aža£ác#ª‘«Ñ*£Z£;Æ8c¶qŠñ>ã[&°‰I’IÉMSØÔÞT`ºÏ´Ï kæh&4«5»Ç¢°ÜYY¬FÖ 9Ã<È|£y›ù+ =‹X‹Ý_,í,S-ë,Y)YXm´ê°úÃÚÄšk]c}džjãc³Î¦Ýæµ­©-ßv¿í};š]°Ý»N»Ïöö"û&û1=‡x‡½÷Øtv(»„}Õëèá¸ÎñŒã'{'±ÓI§ßYÎ)ΠΣ ðÔ-rÑqá¸r‘.d.Œ_xp¡ÔUÛ•ãZëúÌM×çvÄmÄÝØ=Ùý¸û+K‘G‹Ç”§“çÏ ^ˆ—¯W‘W¯·’÷bïjï§>:>‰>>¾v¾«}/øaýývúÝó×ðçú×ûO8¬ è ¤FV> 2 uÃÁÁ»‚/Ò_$\ÔBüCv…< 5 ]ús.,4¬&ìy¸Ux~xw-bEDCÄ»HÈÒÈG‹KwFÉGÅEÕGME{E—EK—X,Y³äFŒZŒ ¦={$vr©÷ÒÝK‡ãìâ ãî.3\–³ìÚrµå©ËÏ®_ÁYq*ßÿ‰©åL®ô_¹wåד»‡û’çÆ+çñ]øeü‘—„²„ÑD—Ä]‰cI®IIãOAµàu²_òä©””£)3©Ñ©Íi„´ø´ÓB%aа+]3='½/Ã4£0CºÊiÕîU¢@Ñ‘L(sYf»˜ŽþLõHŒ$›%ƒY ³j²ÞgGeŸÊQÌæôäšänËÉóÉû~5f5wug¾vþ†üÁ5îk­…Ö®\Û¹Nw]Áºáõ¾ëm mHÙðËFËeßnŠÞÔQ Q°¾`h³ïæÆB¹BQá½-Î[lÅllíÝf³­jÛ—"^ÑõbËâŠâO%Ü’ëßY}WùÝÌö„í½¥ö¥ûwàvwÜÝéºóX™bY^ÙЮà]­åÌò¢ò·»Wì¾Va[q`id´2¨²½J¯jGÕ§ê¤êšæ½ê{·íÚÇÛ׿ßmÓÅ>¼È÷Pk­AmÅaÜá¬ÃÏë¢êº¿g_DíHñ‘ÏG…G¥ÇÂuÕ;Ô×7¨7”6’ƱãqÇoýàõC{«éP3£¹ø8!9ñâÇøïž <ÙyŠ}ªé'ýŸö¶ÐZŠZ¡ÖÜÖ‰¶¤6i{L{ßé€ÓÎ-?›ÿ|ôŒö™š³ÊgKϑΜ›9Ÿw~òBÆ…ñ‹‰‡:Wt>º´äÒ®°®ÞË—¯^ñ¹r©Û½ûüU—«g®9];}}½í†ýÖ»ž–_ì~iéµïm½ép³ý–ã­Ž¾}çú]û/Þöº}åŽÿ‹úî.¾{ÿ^Ü=é}ÞýÑ©^?Ìz8ýhýcìã¢' O*žª?­ýÕø×f©½ôì ×`ϳˆg†¸C/ÿ•ù¯OÃÏ©Ï+F´FêG­GÏŒùŒÝz±ôÅðËŒ—Óã…¿)þ¶÷•Ñ«Ÿ~wû½gbÉÄðkÑë™?JÞ¨¾9úÖömçdèäÓwi獵ŠÞ«¾?öý¡ûcôÇ‘éìOøO•Ÿ?w| üòx&mfæß÷„óû2:Y~ pHYs  šœ7iTXtXML:com.adobe.xmp 72 72 1 1 2 ˆbù +ØIDATxí] œNÕûŒcìŒ%²+•BöŸ}'k²¤”$)%[¤¤ìQD‰Z„)[%)ÉZT$Y²ïÆ2ûŒ™ÿ÷ûÜ÷μ¦Qó×ÌxñœÏ¼ó¾÷žsÏò=˳œçKç.õLºÝ÷Oã’´¡Õš5˶~Ù²rmîë’±Å=sfô÷—ø8à’!­ù‰4neeˆŽ¥°ÐPy¡ï£R¡J éØå1É(q.Øøº²½c¥×žõfëeò¸‘e —¼õ†ƒ{v\W];ôö‚eã×˲¨¢ÅKJõº cýü ³÷ÚíéßšxL°€€9{&D‰xÁ‹HµZu%0stHëÆ0¦§X‰†À5Š×›ÀÀLqgNŸÂ¶±Dg;¸Ç·›Öº§µ'ù*ѨˆÒó qÐ3Ø‚ë[£á*« 'ØHâQ‘‘°ÒÀoŒ¯Hþ†Œ÷m|]ejÕ5|®7Xg2ÄÄİ–~1ѾWÙt"èNùÀº??ªÛMåî{CâꪑŽ'?I†×ørÇÙÕÕ«­!`ø2¾¾®˜qš/«›!`†€!BŒ §(Kf†€!`ø2FÐ}¹w¬n†€!`†@ 0‚žB ,™!`†€!àËA÷åÞ±º†€!`)DÀz ²d†€!`†€/#`Ý—{Çêf†€!`¤#è)Ê’†€!`¾Œ€ô4ïËy±\<¥ì¹”¦KófZ†€!`WtõwE[šî…ÇÃ+žŸøet^DCW·É¼òÓã¢Ôã5_ åqðuÏÏ¿yÓ£/sº95žºvÏ0 ë#èiÒ×1gÖŸ~8SråÉ+[´‘¨¨È‹ý‹ÃUéÄÿ±í}k)yxX˜”«XUš¶l+Ùsæ”ØXú v\æºU%ñ¦ B~ÿ±ýWÉœWòå/¨iq÷Ý”x’7,†€!`\ó˜Ê= º˜ïç–Ÿ7þ(ÞyRŽ> Ôw½Wa ´$¶ß,ÿ\NŸ<.•«×–;ÊW’ŠUkȈ=å£YS”Èè!ö‰Ïâí6’9sDGEIûFU%L@@¦L ä|áŸdÂ3™3‹?¤w †€!`×&¡§r?Sj&A=|pŸ¼ÿÎ$Í=sP–dTâŽO•{Ëv¤MÇöv¯çË(ÅJÞ$]Ú4”fwwÀkA3C¥+ Þ˜PS2aaç%äÔ)½·ëí’'_~É–-»ÄDGËï¿n‘Ó'åæ[o×ç¨î7•||öÃ0 k#è©Ø­$šx5¬DD„ËôIc¥EÛûå¶²wJèù³É«¾‘žRú¹sg@€Ã$"<Œ:r9zè ÔlÐT²çÈ)›7¬•Åó?—Þ˜†ë\ªVÿ`ú›’%k6•ÊYý_|*¥n¹MâA¸ß;RN;"%o¾UÆ Nú ~Ij7lšŠ­´¬ CÀ0|#è©Ø+$ÎPµ¯X¼@Ξ ‘wµ”=þã6¯Mí„òœ=ðà|dÞ¬©rà¯=ú>oãÅ 3?ýJ .,7Ÿ-#«VP-Brå–cGÉ{o½&._+7-.ãG –®Oô“b%n’YSÞ#Pï|}ªä/PPjÔk¤’þòõHa¤ŽŽJž±H¨“ý0 CÀ¸Z°=ôTê9JçܳþsÇv%Ðý’9³IdD„î§sOýâàyªÓ )‚[ ¼ˆÜR¦¬ªà¿ûzöÞKÁ‹Èƒö’oV|‰Ü_6¬]-ÍÚ? ¥‘Ž{é 9ræ’óçÎÊë#I¹ Ueçï¿Éw߬€fàœÆoݼNÕöf §p\7ÿ8&“~þkãÝüRšOÒô¼N«´¬äÊqÓ¸ßz¤$¹„—y/1ß¿gðOqOmw ÿ?I©Ìÿ?{BÍŒ Øá¡¡òÆ+/JŽ\y`}þë6Ù·w—…T½jÅ)_¹ša?ÇÌH\iÀvêÄqðûåî{”°Ðóºÿ~üèaiX±¤Tþ_miܲT©YGÞ›ú†´ «ìÚ±Mó¡ÊDœ!ùÅÄÐ^$4ôœlZ·F÷Ò¹—ÿÌð±ŒýõK›Ó‡ìßµ…‰&Æ™Hna¤I &9NøÍc‘—”1EÞbcÿ5 ŽñL0Ö¤†Š§52øù‰?˜Ð 8ŽÉí¡Ô e%—7ëC›žáŸXµ/a]Rç4ˆ{ •sáQRp'O;öWN0üô‘åý×úÚóצrO…þäbA'0°H¿çþ.òHÏþÒsÀ‹Ò{Ð)_©š4¼«µt{j€5s¥s“°€PŠ>zø ìß³OîÛ+{vî…óÞò÷·ã×̼8c^¬äÍ2{Ê•Îó`Œ‡Ôã.û±ÿî‡EjÐKãåÕ!åÀÞ=rþìùeóéÖ¾©ªÞ)©¹éS¡É–…"À±H[‰/>+­jÝ¡v æÌ”çzv•*¥ò€ÁÛˆ“^,‘ˆ¹Ä'±i^*{Œ·€€Lšï¤W‡+“ʲ’Ž)^óÃñHÂ6{Êxß\ mA€ìݽSÚÔ« û÷I€JÓ‰eýýWry{§rÊrîð÷LØ–lÛú³wýMbM¦÷àþ½Ò¸òÍòê°2êù¾òØý-epŸî²§DØ–ÄàÎ-÷ÚMqñ5ËÖ5Rùœ“¥Q¥Rò3ŒYuΡl¶¶14RíÒ¦ì`*c•œ¤îÝf§}nBB <8{_»¿ïÄçTÔ@zïà]Ž®E,¼ƒŸxïâôÞ)í·/!`z*÷FFx†ó÷w:ª'så –¬FÜýîÄâœ44V;ôý¸qÍîé(ï/þVÞb¡J§´U¯IsÿÒ`©ëwžA§”D¢ë“O+Ñž2g±´îð€JAÍk”‘¼ùòÉÉ'dâ¬R¸X U‘^´f¹…Ù÷5ƒ]2ˆß­\.Ï÷zD&ÍþDn½½$Ð9sú”l\ûž¤p‰—ªä1¶t­÷Ð3ªÒIh(]rÜ1O~“³¤ºž[@u7“Œû y%ì TíƒÔéXã7CB…¡=Ê"±°)Z¼”|´l3®qMÆ‚Ï0hz”ŧ\u>¥XÍ79vYÇ+¢£"g<#X?¿Ø šofø_H˜'óq·¥º>ÙO·¾Îž9#ËÍ—gztÆ|[%Ù²çÐüI€Ù^'ÖŠ˜pË‚¾€¿§îN;ùŸš¸Ó§Nhš% çA+Q9As¶uóF5ve$5&l7óO®Ì‡me¨”¯9:mHìÄ¡.Šs¼KRã }†<øŸL÷6€[®&@]XžãÒÙ qÆ„€„œ~a: ¾‹€ôTîªò0w4PÅ×öþ‡uâFEF$,‰‰Á©Ai¾Ëã}œÅ“wðGõyvº‘˜sÒeÉ¢ª÷Šÿ«%… åZ£ Çtï=PîïúT‡Yq=‡ty¬·îÇsñá‚™^ê˜G¢fÀ©›ý¿6ðÃ"¿çÏ?°-ó¸4mÕVÇI4|¸¡Ž2Þ¢Fš—\ôybâóO>’“Ça|ÄJ¥j5¥~“–’5{vÙñÛ/²võ×8zyŸlþñ{ùñûo¤Ó#O“áy0§õ8&mF¾\ñ©jrÌF„‡«V©IË{tÜq0;Ø!öÏlûUUðTwÏxs¬2 dvyÍPªô­Ò°YkeVwÀƒâç æhd`Ùž;+W×ñÌúoÿågY¬ñ±:ö™¶zÝFJœ’ë]Ï‚2nÓô$Ê4( 'Nç ÑÊ™;JÒ_~±P5bôà¸[ô Ѻ}'­õ´'N¾Ó´†«dl(ý“™æQQbÛsàÙMÁ¦uß ±8t`Ÿ|òá Ó'ÔX(QDe8/¹%¶LÚÓÜQ¡²ü0Œ£FƒíÍ‚u ]§G”A§]βEóäðýj›3W.iqÏ}Z×该 çëü¶†>,Ø… Ó~&Þ›fÅçŸ*LyòæSmBMœŠ¹­lhW2`l–Ïæ¿m›S*ÛSÚÜûâ ©ÁógžY‘¶P‘¢Z½ñ‚…Šè1µ¼ùop8ow·>©Þ\ËЧàVL.¦y³§bÿúK%‘ ´ ´Õ á%qàB=b`/ ©"X¡JuøÄC²rÙb+´ß7üYÜë,Û@8ó( 5V¶lZ/ß~½Ò¡¿.ôô¡pëå¥l…*Rµf=™8zˆ,–‘¾‡€cÜ-Ç) îéð„‡ú™`¡"Å•pòy2§SÇ¿¬>ƒÀPl•îíš(1ª^§ÜvÇòH»¦òÛ–MºïMçIïª!9AYwgOLIéTâ|æÌiņƪœ#áÀjÌ2mâÌÃìR½v}¤NPÿ¡0B%±[ºðcyòÁ6rÓ-e¤BÕêJ ×­ùV%tÚ­/YZê5m!+—~¦ "ÅK*´ă„q+¶Ä:µ¨­ùT¯ÓPÓ<вŽìÛó§n›Ì†!ì–Íë…v1wVþŸ ÚçpKåMl{ðšqÜÖ;qô¨ìÚù»÷3!§”°—cP­V=œ¼Ù&Ü&aŸR£²éÇï¤+°%f«ÕÐã°oŽæà€dBüñ£GdÔ >Jü‰=ñ:þ%YõåÅŠØYðMLBOã~¡úŒáRÕUþ­˜4\4à uïÐP{z¨ÔÇ"qªEï@Ü/ï”Ì£ñqƒ–kÐ…ãšÿæx¢JüGŸÒ­˜œ9²IË] Õ•”2åîÔ÷€¢È«WªÚ˜¶9à°ˆ‹4%¹®mK£æw«„L°z=7\Ê€˜RmαDI=E޳@lýÜÛùQeHHù®‚“ÇÈWptD‰•^™N‰:$ÃB…ЍôIíQÛûÒí¦™3ómH€-äÜ#½ùöxyü™!ªq¢.‹Dxßž]òÓúµjôöáô·¤ÇӃ屾ϩvŠZn)ÄКõL–öÌý$ÓLß,gèØÉ’ Nœ¨M Š›¡7ÚMF‡» dVZ×)/vJnÄÓÁ}ºÉŒ—ëö5rš·Ñ- –K ~æS·Q3útiÖæ^Õ2Üßµ‡Ã1oZþŸ#ôî›ãdô›3¡Që BœAµ'Ôš¬ýökäÝDÞ…MÀ;s—¨dÌçø>¶“Æu ?š% Wm†Z¿"»SîjÝNµ ôÙ i+%Üämˆ-·üztj­þ*¨ y´Ã]ª-h×éaÕ.pYñùô…£b_‡>¦ÆæÑ^[b’#gn0€OJýÆ-ô¶Q×VÌ‚Ï `ÝÓÉ.ž8ï{©tÞiœÇ° yI |îïi ½ÆóAϢß”¸óæÏ/«~=ª‹/÷GÉ xçãüN䘽ã˜Ç?…KÕ韞±8ßE€}OɘF“}@¸`oÛú“]nøá[Hžýeò‹ô½?møA%¼±0£ñ öY´J¢Ä=c†r f\Ð#!ÉÓ"œ÷¹˜“èRʦ¤LI’ûÑ´¤§tÉc›îó‰SÀ£!'Ži¾Ô$У"ÇôÊ¥‹eÔs½eéÛ‘Ç *ÉÇ`Ÿ™î~äG ¬ßü÷¦Igl)………*c1æ­Yú<ãYžnQiîÉüCEܹñí—KÁ(Ÿƒ¤=Oú­L 3ëäjÖ8ÿˆ Uí $–Gí×ßE`@u6q!ã6¦Õtx.Op>yiâ yì¾rßÃ=ÀLUÔ-ÆÓXŽ/aúnå2¨ùsËFH̬;$¶±ãC©ê½{Ÿgõù‡á8ªRµZð=qüR@í¦¥íý]åžú•°e7@*a+Žqd´xÂáè¡2ÿýé²Úú±ˆŒt444T$Nl%Oð;ôüyÕÒ„Á›%µa¸¦+é8nKM58ì÷ßýYÛ©ÇÙ >‰€tO·pqò&¦noQe¨RKN–ŒdÙ“Fª#u•Ã^S]NŽWÕ{zϳ&yÖ½dùšÊóœdêÏ„<)1÷Nw9¿™7 ˵p !€þ ‚MUÂ¥J—Ñq¢7eüh™›AQò­~î¸ã˜¥#ªŸ9Öü3:ó4¾Tbè'$~$b»ölWµ÷³#Æ) 'ÃõkVÉòÅ'ÏäQ¥Ì:eUz¿î÷ÉŒ+to˜’eS‚­^·¡úbˆÕ¹×u-X¨°ªçCïJÓ¬¥GÂL¾D2 º÷‹è'úV Õà+—/–梹•¥ÛžÇI`‰ ÛíòؼŽòmêö8¨ ÀÜöJb¨Øa{ƒ6 uÝ¥nœc/Áamô'´)Í•‰áÞ;ËjÚª½ãѶÎÐP;ðû/[dh¿îr:ä´L›·T¨žï3h¸æûûo[¤gç6š ûèjú¹§ºJ™²¥ç3/ªQîqHý_Á.€˜»e³,Ö•Ì·bh8Év’àŸƒ j­Ò´u{•ÔÙî8©CWÔìw§öß—0‚ŽÞà%—Ï滑óA÷µ¹•4èÞ$¸kå~‘Ž„’Ž4èÃý4^ Â…‡; ×XFÒr¸Ð„Â;÷6¹xzÇ““çBãª<“–}¹×,ƒ‹&Ëcý½Ë¼Ü<í¹+é#ШR¦A$oÚZÜPèF%Œ Ø·aßšêsJw¹òdƒÔÇy \Ã0œ7÷åÎ ‰«¼ðÓ!TKÇco}³,X/êŒýðüPΔ~Õ±ï’-2ÀNÎÜÊ‚z°ZYïݵS=õ°ŒŸ>WjB½Íùã‚á— „åRâ¬Y¯ž¦g5bbâ 1rFÂâ>FùÈdgÍ–M%Þè¨h=.çV÷RßdXrƒyyJ ë^ì÷¸Œ™÷ôƒ‚%syﮚŸË“×Á”NŠ— A„Ô …ójdžÿw,Óc¢c4¿o¶ü¥{ñ”öYW†8@C:¾M±f½†xN/!õÇI$¶.¢¢"ôÝ ÍÛ´ƒ ½%Ôý=…~(ÁP­L¹ zνEÛ{Ah[é‘XîyoÙ´N‰.̽8z41™àøª×ºæéOu- ã@õƒÝÀYì»SóÂ5ªAëqÿ=KV8‚B†}ž°Æ9µµÿ¾†ÀuMÐIÄÈqR%5ò¹>j5š; Ò°`pA ’.=ú€Sîµ[1ùå§ òέ†ž qÃõ—sçÃÀɶÓsçEáOD™G„ü¡Õnx—ƒç·?a1;sá×j`âO~S2GRÒ§ŠÚ9v‡µóŒL ç,ËfûØN.ŽŸ6Wútí€É5_Û àäWýA¡ èEsßÓöÐúžyP…ÞÞ"Y÷™oOÀ‰„ØÞÈ­R÷.¸{¦%:ë0О ªÐi¤È@ÍOÌŒÿŽ–;õçÉÆÜ¿OëHf®VýÆÂ­˜ÛÊ–W[zú;~ôúµ úŸÌŽí¡+¤>÷ïº&èÚ©cå’Odä„w¤RÕšº·G¢wRû« ´ÜÛê;h¤.dûÿÚ-“ß_¤©\Ü(=¿?íMÔ« X¾Ðhâè¡ò×î?åã¯Ö«•;³kWËÃ÷4’Ù‹VBXËKuçÒpÂp‘ìr,ƒ±ÀRZà1!rÏîþž{ö–q\¹Pp¢2P@ZÜ.ŽÚŸR;ùø,¯ÉÄd Pç\(˜%uJ\Üùqóe¥ –Éû,“ùXð=ØguÀDRÍÚ¹uý„ Þr{y™2çsU“ÀòøãÂo6Ë ^M|eˆ…|°×è·óÑ…*57-p„Ê Žª–ýÎY`XE£)JŠœ3½»¶×díì&­:t‚ä ›ÌŽGžÅæé ŒjÕ2Ý ižÚw…ƒ87nqLÀ †¨j9uªÞ†ÒûÙa0Hk(S1Ÿ&kðuš?÷‰¯LKaã™oñ1ô}~¤JÜÌÛ£dGPu5s Ý­%ý Â_ôíÏòô£å'H¶%n*-7€páÜYòÚðgä4Žè= 'QíxDëÏqßkàPg¯Vönà–O˜gkÖicb¨Ñs"jû¨R'A$‘¬Ù ±Ú4ð »þø]³¢Õú3Ã^U5ƒ´zÎ+§N„š}„°Ý”ª©Á`\>Ø-œÀ±ÃpñLC¼ÜÐN›¿LºßÛLó«P¥†´†[éûÀ„°_¹جMUó/œ;[FžÀúC- ™‘â¥J˧ßlÂÍËúò'fD6祷ßKÐæ±}|´îŠ’q<òHöwß}wQÏg†4èÖ³ˆŽŸÃ­¦uñÿ 8(rÑÑàxéEëƒÏWcª¾•LÀ)ÊgóæÉÛØ‹°ø­[óŒØS&ø¹ž—%§Ìɹ÷ÏÒ´Ú-²jë_ròØ1éФš,ùá7}¥)..l4¨™«Ö7Ý¢çl9ÙY>Õó§ QíÇ3ë-Ûß§8%bô¬ywïÜ.O¿ð²Zâ†`boÙ¸®d·êbÉã,”Â(M쀤Ãã0,óN7¹ ¯UåâÌòè#ž®89qËW¬*}»u„áÎt=örþÜ9ù\þÆWc1ɨÕ3™¢‘Ðáƒt&OkY—Qøg”Ó.VñÂ3ÄíTÂ)€ÖÒï…QI<ò¥]ù¾š3ûžccŽŒ‰eá8qΆ“I#óÇ#mT3ðšN‹È¼ÅâÕÆê¨Å³xs§tÉqIÉÙ%ZúÚ_d:ÁzÒÚ›G«8/I´¸åDæD‘'ë§Ïàù ›dø<™nG2¦ÛQg³Mn`2¯Ä„iyí–ï§gèÉðòH]óêe䣥k ¸C™{ÎWGÓàr^°lVšx»yòÛÆ6$ œƒÄy)þHÇŽí6µÓAy6žó•õSmðc{X—é&–t­ëÄe@\nc¸s’¸±ŸÈ¼fÔñ@ï|Ä•80»ÝF?õÊÕ6ó}Ä~’Ž ­ÈuúXƒ)Š[öÙ¿?p°Lù*wmߺqàP:ç °˜„îÕ ”¶1ÎAü.è´ïµDå±Ϋ˜Øh%Ž”‚9A)8qTãIàkÍ:à”óá<9¯‹ÉÉ Ju%>ç8]9QØ«oJã¤ç„ç:rè€~S‚c6}@„¹ÇEui,[´RË8]$'¾2T~Xµ\úBÊâ9ãNÍkÉ„ó”«ç¹Þ¶ *Ë€actaÜ./qn5SªXuY9goGL˜.öíQ™‹Vÿ,%À­Ïy÷m}%lMrÚpÒsO–‹‚ßC€”ÌfBÀXbqLq,ò›Ši2C «÷86éc]1Ax½ûX4Ožšé9Né‰äѽçÕC D·‰ÈD0Ž„/̧›Ž{ßÉÆ“ÀÅ£žÜÓE…d(Ï­ãIœè†ó‡×œ[ |>i`Ý“kƱo[þæQ6½‡Ìˆ•ËpN³-4Óà©óᶘÛ^'2ñ?Ÿa›Ýö³-Ì3+rO™‡¶ß,›ÄŸ­wÛH¦…Ï$Çz¹}ëh*¸f9Ø+Žx2S<—þΣõ¸ë0úÅþꈈt” Dþd&Ȥüml ? ¾‹€tô ÷ÔªÔ¬‹sŸ¯ÃÔ påa˜x9Ôk%î~/¼¤…Óêà¾ý²~²¹7ÆÉBg“à”aÀÐÑØ¢‡­­újS·Ë9ÁøaàâçNb7^§*òáÞÖëØÇ[ š{”TqÁ¢G§.=úbA‰VÇäªûBõV `AUyÖ/_*µT9}B¦CõWªt ¨éÃQ×=Bo[tø1oö4éÿâ+ò`·žºHPâî…=tJ=|#Ü„—__oP«ZJ\´,¦J®GßAj)ÛªÂC^Ñ=;:Ÿð^àÛb¿|Çi ÛEÕñ‹ŒàµH¯tÎXõ|ðÎDÓ{žå}ÎWrå5‡z\¬³5Ãk2:ú¡i½ò$J.x×3i§~NÝ•ð{ˆ7Ë wËJ.ߤå{§qµ$ì<ÊÆ³ùÔ.¸DÒ-—Ïð7·Ÿb½7Þ»½ÞùówÒòÝg.ÕFv~ÜÀ¶¹Ïü-‘nÓ»[iüÍûq¬Y?¾,‡Îh¾^²Hµ1ÏB]_ër7Å$±ø„ûÌÓ‚o"`ýBâIiº ÜÞtküŽ!p Ác'¯MûHÏ׺›ÝH#7|.dtÚ0æ­Ù0$i¢Ü, ¤«úóîrNfªôT% µ¯ 3QÕ[}ñu:… „îXÄÆÃÄlHÜo$qÏ–#‡úŸfùäøƒp^w‘Û=7žAýöË=z>˜î&z¼Ÿ2ô6wÙª %Î}üàà<Ê‘óÜ)úïW©sJ2|+Ö‚fH‡ºiÜÿ`DÅ3­¬¶³øémû磸‹ò¿UïŸÒ%—’{$ênHšÞûÚû·›>é÷?¥IçUlÒl®“>ãFPíNÍ å|´§Þæ<&žl@#“+ïRù»y$ŸÜ=¦¿Ôý‹K.ÞÍ‹m¢!! }]M×obž\šÈþù4FÐÑ=ì¿ÀÅ"9ÕêujƒÆK•êu¤öÒøò†»éž1'@ÑâÅ¥3&| ßæ +Mg¿Rð\móâx±z^‰r¯ö©2'A>ƒŸªöv #ñ"EKÀ¨¦œ³‡Ž=OÂ,\ŽA)@·wà lyadDf‚ÌÁ«ï8Ú»›>i¬¼ÿÎDUŸÕ¨×HZÁëìNf~“‘ ”޵\ÁT•Gã¿rØS§ñUyäþëÀò™-¤ùõðÆýr–ï½Oê>g߆€!`¾ƒ€tSÏÕ8*jg?-sæ,úò ¾½è¯Ýp€Ëu¾‚ûæôöäÝÄÎ$a¦Í—(0íG3§ÂÇõ)Ý“¯Ý°ŒÊ^vŽ‚A ç³LO&‚–Æ-ÚvÔ×:¾’82 ôæDÇL{ó­·ë9öfN‘åŸ}¬j{:«¹Ęw4|[8ã-Õ T‚êâ6ü°Zª8ß:aÆ|™‹—`ðHM+¼’¯{¤Õ+½Ñ~Á‡ïÊ”×_c-ÃÆ½×1v0uñBîŸ'mobËí—!`†À•F€ZÔ´ >}Ý»á$˜ ÞD‹÷hC"ïþæ·wï<ø›ñ$êLCÉ\Óã>÷»ùIÎ`Î}.¹|ù<ãøa}4_Ô‰†sTÿ“)pÓк•ÏpÏž/c úÞ}Ž ‚kýJ©{gÈ’¹kyMõ¾^#žf?î>¿›?¿}%8í´sè¾ÒVCàZF€ëC¿Jz˜„Ò%žn•Iyϵtu'Mç¦ç7Ÿq¥C|=“”^¥hÆ'’+Ÿé¼Ë¦£ˆ œúdsÀzxká5-ÔÈ„àT½jMG ƒãH‡5p· ܶI`YÞÏ»Z·ÎnZ-Àþ†€!`ø¦r÷t‰%%Óä‚w\JˆZ"DžŽðLJ¯Ä>¹üyïRù^|ß©ëC¡Üá .®3™ §dHœv%Ô ñ*óãaï¼ÏkWÚ÷®¯w:ÍÜþ†€!`øFкäb˜p[üSÜÅ)/¾Âs—ûèÅ%¹r ç’ÜÔK—p'Æ%©€Ã$F'ýõoñIÓÛµ!`†€O p ¯ >Q7«„!`†€!`¤#è)Ê’†€!`¾Œ€t_î«›!`†€!BŒ §(Kf†€!`ø2FÐ}¹w¬n†€!`†@ 0‚žB ,™!`†€!àˤë±5=ç̳Ξ/cuó}ô|<Æ”§²Îo_¾ßwVCCàjC a]IXo|¯éJÐé•/&á«;ÕŨyö½q5Õ‹ã‰nlyàßÏÏ_ôUïçëzÞ¹šZdu5 _EÀ³ÞÐÝ6ƒã“Ó·*›.ýHT”z7ákIÏ„œŽ#aw=˜ùV›« rÌ èçΞÁËrâôõ·|ß|æÌŽK\c¯¦î´º¾×›Lq¡çÏq«:>:Þ¡k¾Té´&èª ýéë¯éÔï›_Ⱦ=»ýýð~p`cÁøàE9ð?ÏWÑž?{VÖ¯Y%gAÐaü°Úㆀ! ú ¿Ã‡0.ðàÞ½PúVHâ4M*Ç2â³diÞ¿£ñIrÓ¤1–©Ï!À±tD<;üØ“M Å'#>Æ2 †€!ªp]Á¯³lŠŒ ŸŽßîÛ:RµËÌ0 CÀ0ÒëV8½nž¾ãËJ3 CÀHcHÏ|ަ¥w…Ò»¼4îSËÞ0 Cà:DÀ¶ô®ÃN·&†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`†€!`¤ÿ„„?øNê‡IEND®B`‚ola-0.10.9/doxygen/OLALayout.xml0000664000175000017500000001310014376533110013305 00000000000000 ola-0.10.9/doxygen/overview.dox0000664000175000017500000000341714376533110013346 00000000000000/** * @mainpage Open Lighting Architecture Developer Documentation * * [TOC] * * @section sec_Overview Overview * The Open Lighting Architecture is a flexible framework for working with * lighting control protocols such as * [DMX512](http://en.wikipedia.org/wiki/DMX512) and * [RDM](http://en.wikipedia.org/wiki/RDM_(lighting%29). It contains a framework * library (libola), a C++ API (libolaclient) and the main * program (olad). * * @section sec_Features Features * * OLA can act as a gateway, where it converts between different protocols. It * can also be used by client applications to communicate with DMX devices. * * OLA supports the following: * - Various DMX512 over IP Protocols, including: * - ArtNet 1, 2 & 3 * - Streaming ACN (E1.31) * - Pathway Pathport * - Strand ShowNet * - Enttec ESP * - Other network protocols, including: * - KiNet * - OSC (Open Sound Control) * - More than 20 USB DMX widgets, including those from the * following manufacturers: * - Enttec * - DMXKing * - JESE * - Robe * * Other features include: * - Built in web based control panel * - Support for acting as an RDM controller or RDM gateway. * - C++, Python and Java APIs. * * @section sec_Platforms Supported Platforms * OLA runs on Linux, Mac OS X and FreeBSD. It's been tested to run on x86, * x86_64 & arm platforms. * * @section sec_GettingStarted Getting Started * * As a developer, the easiest way to get started using OLA is with the * @ref dmx_cpp_client_tutorial. * * @section sec_Licensing Licensing * The OLA framework and C++ client library is licensed under the * [LGPL](http://www.gnu.org/licenses/lgpl.html). The * OLA Daemon (olad) is licenced under the * [GPL](http://www.gnu.org/licenses/gpl.html). */ ola-0.10.9/doxygen/cpp-client.dox0000664000175000017500000000540714376533110013537 00000000000000/** * @page cpp_client_tutorial Advanced C++ Client API * @brief Advanced C++ Client API Tutorial * * [TOC] * * @section cpp_client_Overview Overview * This page covers some of the more advanced aspects of the OLA C++ Client * API including using callbacks, handling a server-side shutdown and running * the client in a separate thread. For an introduction on using the OLA C++ * Client see @ref dmx_cpp_client_tutorial. * * @section cpp_client_Fetch_Plugins Using Callbacks * * Almost all of the ola::client::OlaClient methods take a \ref callbacks * "Callback" object. Each callback is executed when the server responds with * the results of the method invocation. * * Lets look at the ola::client::OlaClient::FetchPluginList method. This method * is used to fetch a list of available plugins from the olad server. The * client may choose to present the list of plugins to the user so they know * what Devices / Protocols are supported. * * The code below calls FetchPluginList() and then waits for the results from * the olad server. When the list of plugins is received, the name of each * plugin is printed to stdout and the program exits. * * @snippet fetch_plugins.cpp Client Fetch Plugins * * @section cpp_client_Disconnects Handling Server Shutdown. * * To write a robust program, you'll need to handle the case of olad * shutting down. This can be done by setting a callback to be executed when the * connection to the olad server is closed. * * The following example builds on the @ref dmx_cpp_client_OLAClient_TX * "OlaClient TX" example. Instead of exiting after 100 DMX frames have been * sent, the program runs until the connection to olad is closed. * * @snippet client_disconnect.cpp Client Disconnect Example * * Instead of exiting, a better approach would be to try and reconnect to the * olad server. Clients that do this should use a ola::BackOffPolicy to avoid * spinning in a loop trying to reconnect. * * @section cpp_client_Thread Running the OlaClient within a thread. * * Sometimes it can be difficult to integrate OLA's @ref event_driven * "Event Driven" programming model with the main event loop of your program. * The OlaClient is not thread safe, so a workaround is to run a separate * thread for the OlaClient. * * We can use ola::io::SelectServer::Execute to run a callback on a * SelectServer running in a different thread. This allows us to schedule the * calls to OlaClient on the thread where the SelectServer is running. * * @snippet client_thread.cpp Client Thread * * It's important to realize that the ShowPluginList function will be run from * the OLA thread. If this function uses any variables from the main program * (such as UI widgets), you must use locking, or some other thread * synchronization technique. */ ola-0.10.9/doxygen/dmx-cpp-client.dox0000664000175000017500000000551114376533110014321 00000000000000/** * @page dmx_cpp_client_tutorial C++ DMX Client API Tutorial * @brief Send and Receive DMX512 data using the C++ API. * * [TOC] * * @section dmx_cpp_client_Overview Overview * This page introduces the OLA Client API, and provides sample programs to * send and receive DMX512 data from olad. For information on how to use more * advanced features of the API, see \ref cpp_client_tutorial. * * OLA comes with two C++ clients. The ola::client::StreamingClient is a * simplified client that is limited to sending DMX512 data. * ola::client::OlaClient is a full featured client that can both send and * receive data, as well as control all aspects of OLA, like patching ports, * configuring devices etc. * * @section dmx_cpp_client_Building Building * Once OLA is installed on your system, the examples can be built with: * * g++ example.cpp $(pkg-config --cflags --libs libola) * * @section dmx_cpp_client_StreamingClient Streaming Client DMX512 Transmit * * The quickest way to get started is by using ola::client::StreamingClient * The program below sends 100 frames of DMX data to the olad server on universe * number 1. The frames are sent 25ms apart which gives a frame rate of 40 fps. * * Each frame consists of 512 DMX data slots. The first slot is incremented by * one each frame, the other slots are always 0. This produces the following * sequence of DMX frames: * * ~~~~~~~~~~~~~~~~~~~~~ * Time (ms) DMX Data * 0 0,0,0,0,..... * 25 1,0,0,0,..... * 50 2,0,0,0,..... * 75 3,0,0,0,..... * .... * 2475 100,0,0,0,..... * ~~~~~~~~~~~~~~~~~~~~~ * * @snippet streaming_client.cpp Tutorial Example * * @section dmx_cpp_client_OLAClient_TX OLA Client DMX512 Transmit * * While ola::client::StreamingClient is easy to use, it has the drawback that * it can only send DMX512 data. It's not possible to receive DMX512, use RDM or * control the behavior of olad with the StreamingClient. To do that we need * to use ola::client::OlaClient. * * ola::client::OlaClient provides a much richer interface for interacting * with the server and uses a @ref event_driven "Event Driven" programming * model. This makes it more complicated to use. For more examples showing the * non-DMX512 aspects of OlaClient, see the @ref cpp_client_tutorial. * * The following code uses ola::client::OlaClient and behaves the same as the * \ref dmx_cpp_client_StreamingClient example above. * * @snippet callback_client_transmit.cpp Tutorial Example * * @section dmx_cpp_client_OLAClient_RX DMX512 Receive * * Receiving DMX involves setting up a callback handler and then instructing the * OlaClient to call the handler when new DMX512 data is received. The example * below will print a line for each DMX512 frame received on universe 1. * * @snippet receiver.cpp Tutorial Example * */ ola-0.10.9/doxygen/rpc.png0000664000175000017500000011227314376533110012257 00000000000000‰PNG  IHDRôo¼w9 AiCCPICC ProfileH –wTSهϽ7½Ð" %ôz Ò;HQ‰I€P†„&vDF)VdTÀG‡"cE ƒ‚b× òPÆÁQDEåÝŒk ï­5óÞšýÇYßÙç·×Ùgï}׺Pü‚ÂtX€4¡XîëÁ\ËÄ÷XÀáffGøDÔü½=™™¨HƳöî.€d»Û,¿P&sÖÿ‘"7C$ EÕ6<~&å”S³Å2ÿÊô•)2†12¡ ¢¬"ãįlö§æ+»É˜—&ä¡Yμ4žŒ»PÞš%ᣌ¡\˜%àg£|e½TIšå÷(ÓÓøœL0™_Ìç&¡l‰2Eî‰ò”Ä9¼r‹ù9hžx¦g䊉Ib¦טiåèÈfúñ³Sùb1+”ÃMáˆxLÏô´ Ž0€¯o–E%Ym™h‘í­ííYÖæhù¿Ùß~Sý=ÈzûUñ&ìÏžAŒžYßlì¬/½ö$Z›³¾•U´m@åá¬Oï ò´Þœó†l^’Äâ ' ‹ììlsŸk.+è7ûŸ‚oÊ¿†9÷™ËîûV;¦?#I3eE妧¦KDÌÌ —Ïdý÷ÿãÀ9iÍÉÃ,œŸÀñ…èUQè” „‰h»…Ø A1ØvƒjpÔzÐN‚6p\WÀ p €G@ †ÁK0Þi‚ð¢Aª¤™BÖZyCAP8ÅC‰’@ùÐ&¨*ƒª¡CP=ô#tº]ƒú Ð 4ý}„˜Óa ض€Ù°;GÂËàDxœÀÛáJ¸>·Âáð,…_“@ÈÑFXñDBX$!k‘"¤©Eš¤¹H‘q䇡a˜Æã‡YŒábVaÖbJ0Õ˜c˜VLæ6f3ù‚¥bÕ±¦X'¬?v 6›-ÄV``[°—±Øaì;ÇÀâp~¸\2n5®·׌»€ëà á&ñx¼*Þï‚Ásðb|!¾ ߯¿' Zk‚!– $l$Tçý„Â4Q¨Ot"†yÄ\b)±ŽØA¼I&N“I†$R$)™´TIj"]&=&½!“É:dGrY@^O®$Ÿ _%’?P”(&OJEBÙN9J¹@y@yC¥R ¨nÔXª˜ºZO½D}J}/G“3—ó—ãÉ­“«‘k•ë—{%O”×—w—_.Ÿ'_!Jþ¦ü¸QÁ@ÁS£°V¡Fá´Â=…IEš¢•bˆbšb‰bƒâ5ÅQ%¼’’·O©@é°Ò%¥!BÓ¥yÒ¸´M´:ÚeÚ0G7¤ûÓ“éÅôè½ô e%e[å(ååå³ÊRÂ0`ø3R¥Œ“Œ»Œó4æ¹ÏãÏÛ6¯i^ÿ¼)•ù*n*|•"•f••ªLUoÕÕªmªOÔ0j&jajÙjûÕ.«Ï§ÏwžÏ_4ÿäü‡ê°º‰z¸újõÃê=ꓚ¾U—4Æ5šnšÉšåšç4Ç´hZ µZåZçµ^0•™îÌTf%³‹9¡­®í§-Ñ>¤Ý«=­c¨³Xg£N³Î]’.[7A·\·SwBOK/X/_¯Qï¡>QŸ­Ÿ¤¿G¿[ÊÀÐ Ú`‹A›Á¨¡Š¡¿aža£ác#ª‘«Ñ*£Z£;Æ8c¶qŠñ>ã[&°‰I’IÉMSØÔÞT`ºÏ´Ï kæh&4«5»Ç¢°ÜYY¬FÖ 9Ã<È|£y›ù+ =‹X‹Ý_,í,S-ë,Y)YXm´ê°úÃÚÄšk]c}džjãc³Î¦Ýæµ­©-ßv¿í};š]°Ý»N»Ïöö"û&û1=‡x‡½÷Øtv(»„}Õëèá¸ÎñŒã'{'±ÓI§ßYÎ)ΠΣ ðÔ-rÑqá¸r‘.d.Œ_xp¡ÔUÛ•ãZëúÌM×çvÄmÄÝØ=Ùý¸û+K‘G‹Ç”§“çÏ ^ˆ—¯W‘W¯·’÷bïjï§>:>‰>>¾v¾«}/øaýývúÝó×ðçú×ûO8¬ è ¤FV> 2 uÃÁÁ»‚/Ò_$\ÔBüCv…< 5 ]ús.,4¬&ìy¸Ux~xw-bEDCÄ»HÈÒÈG‹KwFÉGÅEÕGME{E—EK—X,Y³äFŒZŒ ¦={$vr©÷ÒÝK‡ãìâ ãî.3\–³ìÚrµå©ËÏ®_ÁYq*ßÿ‰©åL®ô_¹wåד»‡û’çÆ+çñ]øeü‘—„²„ÑD—Ä]‰cI®IIãOAµàu²_òä©””£)3©Ñ©Íi„´ø´ÓB%aа+]3='½/Ã4£0CºÊiÕîU¢@Ñ‘L(sYf»˜ŽþLõHŒ$›%ƒY ³j²ÞgGeŸÊQÌæôäšänËÉóÉû~5f5wug¾vþ†üÁ5îk­…Ö®\Û¹Nw]Áºáõ¾ëm mHÙðËFËeßnŠÞÔQ Q°¾`h³ïæÆB¹BQá½-Î[lÅllíÝf³­jÛ—"^ÑõbËâŠâO%Ü’ëßY}WùÝÌö„í½¥ö¥ûwàvwÜÝéºóX™bY^ÙЮà]­åÌò¢ò·»Wì¾Va[q`id´2¨²½J¯jGÕ§ê¤êšæ½ê{·íÚÇÛ׿ßmÓÅ>¼È÷Pk­AmÅaÜá¬ÃÏë¢êº¿g_DíHñ‘ÏG…G¥ÇÂuÕ;Ô×7¨7”6’ƱãqÇoýàõC{«éP3£¹ø8!9ñâÇøïž <ÙyŠ}ªé'ýŸö¶ÐZŠZ¡ÖÜÖ‰¶¤6i{L{ßé€ÓÎ-?›ÿ|ôŒö™š³ÊgKϑΜ›9Ÿw~òBÆ…ñ‹‰‡:Wt>º´äÒ®°®ÞË—¯^ñ¹r©Û½ûüU—«g®9];}}½í†ýÖ»ž–_ì~iéµïm½ép³ý–ã­Ž¾}çú]û/Þöº}åŽÿ‹úî.¾{ÿ^Ü=é}ÞýÑ©^?Ìz8ýhýcìã¢' O*žª?­ýÕø×f©½ôì ×`ϳˆg†¸C/ÿ•ù¯OÃÏ©Ï+F´FêG­GÏŒùŒÝz±ôÅðËŒ—Óã…¿)þ¶÷•Ñ«Ÿ~wû½gbÉÄðkÑë™?JÞ¨¾9úÖömçdèäÓwi獵ŠÞ«¾?öý¡ûcôÇ‘éìOøO•Ÿ?w| üòx&mfæß÷„óû2:Y~ pHYs  šœ7iTXtXML:com.adobe.xmp 72 72 1 1 2 ˆbù @IDATxì`Å÷ÇßÝåÒJè½ R¥Š‚‚Š(»±¬Š?`A±÷^P@À†‚té½—!½ÞÝÿû» G @ á.y›Û2õ3;óæ½™ÝQ§”€PJ@ (% ”€PJ@ (% ”€PJ@ (% ”€PJ@ (% ”€PJ@ (% ”€PJ PØŠ˜†/jEÌ‚W&à.p  ”€PJ@ (% ”€8Ù «]3œ'66¶qRRÒÕØwðødgVãWE ÀûÓ9?33mJâÑ J@ (€$Pn„¹¯4ïÖ¨]÷®z ‹Ýî€D÷¨ý= «¹lgÊQn·ÛeüY¹|ñ–ˆˆˆ.éééÛAÅŽMÍïeûöÐÒ+RC ¤°%ñx<6¸è®={Ëí÷ Îq††:ÜnzaÆ…Í…†SÇ'€{UBÃÃݳ~ŸæxìÞ›7Z¶ìßãTJ@ ( "PhaN¦+2"J*V®bs:6·Ë-6•çATýe#«èaá¶ØrX`="Rµò²QõZJ%P¦Z û(Ù\Ðʳ³2w»\Xó®½LÝAAPX t‡Ã!®œ“[Ç­7iÔ›fQ (‚(ª@‡ü†‘Ý·Q˜s_4æ¾Ô[3ЪEó£”@1ࢠuJ@ (% ”@Pä¨ÙWJ@ (%@*Ðõ>PJ@ (%P ¨@/•¨EPJ@ (% ]ï% ”€P¥€€ ôRP‰Z% ”€P*ÐõPJ@ (%P ¨@/•¨EPJ@ (% ]ï% ”€P¥€€ ôRP‰Z% ”€P*ÐõPJ@ (%P ¨@/•¨EPJ@ (% ]ï% ”€P¥€@‘¿¶V ³üô¦¿óÿš¯YÇþûþþ ¶Ï´ŽýI°cå§ iYñXù/HXõ«”€PG@z>uBg·Û%$$¿ãËív‹Ë•#ü¥ t:CÍ1/:NÉÁ÷¶-A™O´ÇaÎK;¶n–ËKNv¶4oÝVjÕ­/‡ÃïÕÿ-•µëÁ¾~5i&aááø^!IåÞûyø#…­%´- ™¿®ÎGÞjÁàiâ¢ìضE˜VVV¦4oÕVj×k€4ì‡ $òÆ}¨ˆF!6»M¶oÝdÂU¯Y;7lþáÅ {J@ (%˜t=O½P¨Ù <³!0¿ùä]éÕétùoÉ¿²ê¿%rI—–òÃןø¯GnºølÙ³k§¤¥¦ÈõŸ#éF›w»iŠ·ÁŸWØZœƒn&=sj÷¿ý\¶mÞh´}K¸RÓB‰¸¿ÿòcéufSY¾ø_Y½b™ô9§•ŒûâC–ñZa¬¸1È=ç½f3´ùi?~/þ2%÷:ý DZÃáS y0é¡PJ@ ¼ª`€e¯ä³CÚSû÷ß}%_ü¶Lüs´rjÁ6é}ùÕrõ…gI…¸ÊÒã¢K%4"J²³³p\Éø‹ˆŒ4&xgh¨Ñèsr²!@‡™ã)(©sÀ@S=·ýñ{åÙÇî—q¿Ì;L˜R¬R;Ÿ:ñ;ùôWeÂŒEÐÊ뛃ÉÏ$::F.íw£I›ñgef-<44LÜ8vC󧉀ÌÌ AúL“ŽþyÍ„ËÊâ ƒ•ç=ÆÒp¤uÁÔ?J@ (%PTC÷«#l!€wíØ&Ï y@ž|ñuiÖªM®æÚ²My÷ëI[®œŽ‘Q1F8RCÿcÚ$hÑ™ a¸eÃ:ñÌ£rÍ…dô³ÿ“Í8­›6ÈO(ü>í'¹¯ÿ•òÀ­WË’çáÿë” &'¯ {LV._Œx Œ!P9O¿kû6:èytøH_~BLžZžÑ^>þáä§‚p$'%Êøo>•[úö”Gî¼AþùûOɦÀNNJ’/?|Kúž×V>~{´1Ý;pžë2ÒÓå—Éäö~½ä®kûȯØwa0âÓWMÝïÑ]% ”@ÀPî_5ÔV¡½nÛ²Ihº¨ùòŒŒ hªn³.==M:wë)gÛfîlqAàR{NOK“×_zBÖ.Û·l”Ëa oÓñ,yìÏÒ¢M{xçõ²kçvc6§`^»j¹<úÌésÕ ÒÿŠ®›¥í™Í²¶+®ë/ÕjÔ†@ÍAlâqHüÞ]&—Mšµ4qpž ó˜Ÿg+Ý.¼ØìðúcŽ6ú]éÏÃrÇÕ½eþœ¿Œ°ïµÍ@cÌ'?H£¦ÍåÛOß3‚žOýñ; 4¾”a£Þ•'_#Ó&}/SÆ‹´Õ€cÀë% ”@Pž·’`a¦0­Û¸)¸EÐ&mV¶Ysßf•;Lל‡6×`¢æ"3: ÀKI«ŽgË™»IDd”t<»«ÄÄVÅóçHxD¤ñ×§ïuÒº};¹°O_©Q«Ž$'&JC¤× ñéÒ¢u;©R­ºÉƒeìö`NžŽùñî!uÎ Àq`A-{ݪÿdÜ'oËm÷="- ¹w:ç|ñÎ2éû¯dãº5òÕcäæ»”VmÛJ×ÉwÜHˆìÛ»Gž‡©ÿªn“ÊU«Iuä§GïËåÝQ/˜|qþž– uJ@ (%ØTó¯#£=Ä‘²yÝjIMI–*ÕkÁM‘ÆEc ö™Ej‘QQT ³ä]&´yjÍÞO>t‡™§Ü°z™DFE›9n§àOOË2&uÎÇS8gbN=óñ Ÿõ8é0 aë³”ä$©X©2bð®V§@N8o Ì{\,•*W3ùæµÓšµOÞ­}œÓãáœzZjºмæq¹Í\~ü¿9Òä%+õ;vé*‰Htl,ŸmóTÿ*% ”@ÀP~XÕ`µ9„iýFM¤Áé-dãú5Ò¤y+sŽB—qòcå`Â~¹ýþÁR¾B%£1û亼nÉ«n¼]6æú4o§ÄïÞ ¿q²{×)N×ÒêÍ3äˆÛÎø1ÿÎuÔ¸Ã9jà5j×…fÝ«-’Æ0—Ó‚`òƒyvÎw'&4°Ä`# ‹Þ"££Í¾Ą…sÕjÔ’}ñ{0=Àçê&Ïi©© ‚8 ±û}Æø£‚«õ“”¸JUÌ‚:Ëp*=PJ@ (€" &w¿ê àâJp ß;xL¢µ¿gübæ«yž ׸hælšÓ×­^Ae9×Qó®×°/ûPöBˆW«QSR°PíªóÛÉæëŒÀß·?>×?w’!Œ)Ô©å¯[³BöíÙ ­9Ël懳ÅU®"·Ü;P½çÿdÖÓfÏüüöóDyþI+,ÖkÕ¶ƒìزAfþ6Õ„M†6ÿÑ›¯È¹=/2×8øgöŸf0±Ú½ôä@wù ¥ïu·˜…z´L”¯ggûںΡVUz ”€hª¡ç©ÈP£w½ ·èÇ©##!àŽæÌ5ßÿ}žÊ/ÜQýåF~ø€!÷´ßN~ñZ^Žuý¸×Ì(ÀŠI•€PJ ˜è*÷`ª-Í«PJ@ (|¨@ÏŒžVJ@ (%LT Smi^•€PJ@ äC@z>`ô´PJ@ (`" =˜jK󪔀PJ *Ðó£§•€PJ@ èÁT[šW% ”€PùPž=­”€PJ ˜¨@¦ÚÒ¼*% ”€ȇ€ ô|Àèi% ”€PÁD@z0Õ–æU (% ”@>T çFO+% ”€&Eþ8 ¾2j¾ÐÅÏ{rÇüÍk©'À{ÓÜŸ¼EÕ)% J)" t;¾ î ‘l.7>×YJAi±‚—…yHˆSì‡)>+«¢=x«Ss®”@>Š,г23$%9Ù*n|Ï;ïçAóIWO‡€Ûã±cpäO>Çau¼ËèÙYÙîô´N1á0CÇǃ¦×•€:Eè¶¹ý.‰„؈JííÅrPqƒ07®X"-Ñ¥Ãá°ïܾ•Â6¯Yã*Ã8´èJ@ ”R…ÕTÎÛ1=)éFìçøø6¾RŠ·ÀÅ"¿,lõ±]„ílë°…aSMŠàܹ0#-íì+Ï"ÀÔ J@ (%p6iÞ¹|ÅJ;ë48­Ç xW/J@ (% ¤È&wCÕvŠçfâª-×– kœŒ.%é U?æ|ñ$Qæc±¬HzÏ–ù[A(ÒEÀ…-•vŠ…%§áN½gOyMW (“J@_,sRñ8òü„M~ç œ€PJ@ (ÒI@zé¬W-•PJ@ ”1*ÐËX…kq•€PJ tP^:ëUK¥”€PeŒ€ ô2VáZ\% ”€(T —ÎzÕR)% ”@# ½ŒU¸W (% J'襳^µTJ@ (%Pƨ@/c®ÅUJ@ (ÒI@zé¬W-•PJ@ ”1*ÐËX…kq•€PJ t(ê»ÜK'• /¾ÿm}€$ÈK"ü&¼¾ö6èkQ  ”@IP^”K8 ‚% \“SJ@ èP Å™ŸvŠ8ƒ_K_¿Þ#eé¥8ïK (ÒJ@z)©Y rŸà«Ÿ“ãbÅÙlö,¸ ¼Nq‰à¿Í^´1£üA¾NxxÁ´=ndÚn‹°Õ¯¿‚ ±$ú•¯”Ô˜C (%P¼T /ÏS¥¯'-;»\xˆ³dq”73‰Aê²sÜUû0_öMù‚´(šm% ”ÀI' ý¤#.Ù"NwrJjjFFFTÅŠs Ù ÝhÝÈŠÝn·Ûm2EÍ™ç3<ït†H|ü>ILL” ˜sÖõüJ⇕ŽÃá”ädÙºm›‰',,ì¸q1o;v쬬Lwà B`!HEšº(.?ðz^ (%àG ÀæX¿°º öìÙcÿéÇ™;Ö¯B²Ònw†8Ì>!ps÷y BÛaN#»}ñâEögŸnÂÒ/¯YqpŸqò×Úèÿ‰Ý‚^GDöoÆ~cŸ1ã{hh¨7 ŒøVžòþšø&==Ý>xÐ û„ƒ‚ÜØSRRàUPJ@ ;Xu¥Œ-%®Ñ¾Y4ˆZÉÉÉ‘¿ÿž#/<ÿ¼üýôSyãõ×eݺõ†µéÊ•+ D¹¬Å¹?ÿüS ñËÌ™JJJª‰oîܹ’m>^~ûýwùþ‡dä+#dË–­/«V¯‘Å‹Ëí·ß!”ñÆ*@£y>ŽyÎÎvÉiÉ­·Þ&ßg|FGGçBO+% ”€?èþ4JÓ>$MàÌÿ.X c¿ýVúöí+óæÎ“I“~2×_~é%‰‘víÚÉÀ‡–Ĥdz§DEEÉfçÁƒ‘š5k³üˆ#$99É„ûyòd9Nùm·Ü*UªT•fÍšËC> YÙ9²gÏnisF‰“ìW®YßÎïOà·lÕÒ 2³²óó©ç•€PJ CϤ´Rs…¹Ýî ÆiÓ¦ÉwÜ!-Z4—˜˜ÛdâeÑ¢ÅR£f ¹êÊ+M±7oÞ,K–,jÅ&N/>ûL¦N›.M›œ& ¥V­Ú^ÁŒ¨c0à<95ï[o»MÎ=§‹ddfÉŸf„qVV–´iÛö0œÔÂM¾pÖßòÄs9.7µ¤Zµj²k×.©W·ŽuY•€PJàT N0_¼µ1©³ öP§yfw:„° ÿhЧàuC@sò<;;Ú¼×<^¯n=éСƒ¬\µRš6mbü¦¤$ Íñð±¥²ÐÄt4Ëc=žñËs._zæ"þ.Ä‘£€·Â[û̧wžÓ ª¿J@ (%pjr? `¼ AíùsÚ0±{>ûü ÏÜ9s=}úôñ¼òÊHÏŠ•«<ï½÷®§jµªž6g´öì‹ßçÁ|µgÖìÙž¯¾úÊ­ÚƒÕé˜Ù=>â™Ǹqßeòé§„Ívûå‹ärÓÍÊÊÎÝgXUï¹çž{Üû$0ΘG¯LØ?.ƒ ¬oͲPJ Øèz±¡<åó4Lã›aÖ¾5#++‹Ö\pЈ˜O‘ÌLï:sÊc» æ2]8ò?–{.$Ä»ïrå`îüððˆW"##=QÑQQ‘8ÞÁÒ C܆…§W¯ C† ©Ø£{÷µjÕÊÆ£r6ÎÁSOKËÄ¢º_¾2M\óL™<©BÏž=Ý+”OÆœ|"¬‰æ"dºïW”€PJ@ ŠZaœé +–+wÁÄÄ¥A6¾Âä¡4†± yÖŶ ›u®4–·¤ÊD†ÜÂË•‹œ™˜˜ööiQ¡¥Ô™º-W®â‰‰´*¥•\ŠŠ•ÛGEFÇþ•–’ô"ÊVà>ª0Ø¿üªkç6×_Øý,q:CÄíažÔ•“¥ÿj÷¢ÆY¦Ãã¶ qÈŠUäã/'í«]»J§mÛön®M°£eQ)+¼õeÛ3;ßpv׸œü>B)+ª§tðˆÃ"Ö­’¿ýbåʵ:ÅÇo_²¨*ªÉÝÕ©CKüÐÍÙ!¡N‡Çå†*xOu)Ðí¥ö>ÅPÙÃÃÜ?OšžV·nuz1ĬQWË6¤ÿÝe;CCn”í¤‚ ÚÊV9Ð wϘ69=µzݺôC(ª@›ÝHpŒ—vÓN´±¸ŽÀ7.ÒáÑÑàðœyD÷¥Ã{¯Úìv›” È0˜½Ûm¸Pýäv sµ|sm–Þ¼ó¾DçÄâ–-\UdNÒ˜±0Âà¯J Ò{ÃkÉÜnhèæþô–Çz›ke<ßè½}û'ÓW< ¡N*Û+G‹’%oXöÚG£Æp2xF¸?õ=xƒ&N­þ ©ª²—QjçÅPêbèÅB (% ”€(4è…F§•€PJ@ èSš% ”€P…& ½Ðè4 PJ@ (À! =pêBs¢”€PJ ÐT TJ@ (%8T N]hN”€PJ@ š€ ôB£Ó€J@ (% ‡€ ôÀ© ͉PJ@ (BP^htP (% ”@àP8u¡9QJ@ (%Ph*Ð N*% ”€*Ч.‚6'øˆ¾´Ù׌+%”´ÓÉ[mA#ÐÝ…üô¡ùdbÞRëq±°>G‰o÷â;¾6#Ôý?Oi]/–Ä4%@¼÷¶»À9Ò6Q`dG Cóíp~çŽÇ꼊þ=ô“AÒû½K|î’”Ceáׂ¬æ¸Ä““c*S¼‚ÁwdålN„Ã÷°=.—د×ã„9V|ÅvÍ*cqÞŒ'#Î| lë„‚<+Ûs{¨¾Á:Û[G†7¯gƒý±¾ h],Nùä[O+‚ ð°÷)>BЗp?;+ G0vs|³µT«Y/;7¿>¯¹i0OVüy¯åÍ÷´_ÿ–fMHµŒ5þOPZñx½£\ÿ|´²Ziæý¥°NOI“¹ó—Éo3þ‘ltPÝÎi/çœÕFb+Ĉ¸Ü’žš.éR±bù܆aåñ±#ã `릲jí&9ïœâ _:=‹ZÞ”õX ” ¶ ŒÄƒ 2oÖ ÉĽìvspj“*ÕkJÝz ¥jš(NI8/ógÏ”Vm;HõÚu%'WÀx;†á–™ž.©)ÉR¹juÙ¼q­lX³Zº]ÐÛ´w«¿á¯é‘ØváüÛhÞkÆC®ŸÃÊÏòåýõoƒetÊ¢昲µ=³sžô¬°Þ¾ðDÒgˆÐÐPY¾ø_IMM‘3;wƒÀõö·¼ÆôY¦ÃóÁcsõˆô-üuC¬Y³Jfÿù‹ìزYš¶l-z Ä…k–ó2;œÇá½>½IâÌ4²²2åŸÙJíº ¤ÁiMZ—V:^ÆL‡Î[ÇÞýSó7 Lî8ЪÕå–{†ÉÆÍ;dæí2»m—äšþCdÏ®xÜ-ÛvËò•ëQù‡a {D<Šå°K„ö ·?)“EÂÂe ÛvìViÇÍ‹(£eøg8¯ÉØ[1Ôêé˜øàϺø›Ži!¿Ö5Ž#w„³1NŒ$­›‘ÕköqžC+o|TvíÙÇ¡~nxëð¦âMþé¬4ü¯™|{ïES¦‘c>—õ·¡ì^K„ Š,˜G“O_6nuG œ"£ý%A ¾ûF™õÇ4Ù¾u“lÙ¸N>ï5éÕ©©éøíèk(ìÌûK’““`´ò ,j’aá¸ÅÑæqC‡àø—Éãåï?•pô‰ ²rÙ"¿>ÂA&aaf aµCj –&ÊkN´kËY~¬pü¥ãy»ÝŽaCÃÂL8î›ÓçÇaÎ0LŸ$3~ýÙ„óﳬ¸h`LŸù±Òå/ýç^3ý¡[ïÂþ–™ˆÓáëã8p ú' ÿtxÌüÒqŸi0NntÞòØeþß3åÊøÃO—î¢.6È%[ÈKšòYÖÃìY^+¯Gˆ9füŒ—¬0)xûgÃ}Ïêÿ–b¶/·.ËΊå¼e'—ð#¸X~Jú7 4tSx(‚ºùºÞòôÿî2‚ƒ&ª'ß.÷<ü¼Œ~óKyùù‡ä¼sÛ!b49Þ00ó—M±JåŠY©¼l]³Y¦ÿ6Wöî; Õ«U–«¯¼@œ¼¡!èá¡’–˜"{㠒溂ĕ#IûJ4ÒÁ} ’”œŠø*HtlŒ×Üa–”b¬Ì`1(W±œ™8ˆpaˆ7))ÕŒCá766ã/f´ÖÄÝûPùNiÕ¢ÆÖxÊ’ÊÞê§ NÚPö8h¬ Õ«W67ž™6@œ) I댿&®m·V*ØEœˆ— ÷lß-11QfTËL9jθY3Ò3%- šs…Xh ©H”VƒÙ‡8y®øAå>ú½ˆx9 Zºh¥<7òcÙ°ìGiд™ú8·s[©Ò §Üú‹ä’‹ºÊ3H‡¶Í$ùÍ -=CâÀŠ(ñHH”*È3ùœ~Z}s=~ífçjõ*Þ馧N œ"¼ûØÿÐÝpÛiÝ®£Ñà(|(¬î¾¾üúï:©R­†Üvï#hcqÆÇŽÿÀ¾xô%2*Zªâz „ýÂy³¥QÓæ¿g4<ít„«n,U`F;·o‘¬ÌL)_1qU4¦ù´ÔT£=ÓÏþø½fP©JU“'æÃ«ÁÎí[M¾˜.µú¹thÇl×ì h °¢ ‹‰-g,fŒïàþ}&å‘V–™>0ÑæþaX @N-ìÞ¹Ýä§bå*èWÊÁúN§IcÇÖÍÆì]1®’DÇÄš4Ã#"$*ý& R LØ¿Ù[®¼¤Ø>µœ9Ï4À* þ™?kÿ ü0pe° —äõÃ7Fʨ÷¿–^—^…>VÁž½%Üo>~GŸÞܰát†Å±ò[¾‚ÉwjJf_=âÆuZ8Ðb^(Ü™òß·wúŸ0é{] º"LÙÈ”Væ‡ù`]Ó?ùÑÔ¿kÇ6S?•«TC^¢Ì9ÿÁJ.Ìر$J $uâI˜pôŽ› =…vù•åÑo–¯}.)ijæ,–w?þžÃ*IÅñK£>‘ž—Ý'Ï¿MyâUÙ»e§L™>Ë$zçýÏËÚõ[dÒÏÉ/Ô#Ãe¬÷=ò’ñß©ûí2ê/L¼l£0hxõ­¯äÁ#¥a«Ë䮞ÇͼWl0ݯúo<üØ(9·÷ÝR¿Å¥rÛ€á²jÅz£i¿õáwòäð·å‚ËÈà§Æ xRBð µl”eÁ¢ò܈0DxSáÐy,[¼J®¿í épÞ­ˆë>ùà“ñ’ž–í5L–-Y-ýï*]/ºKš´½FÞ|ï[ÉHM3BœÓÉÁâýbìÏrÿà¹ûã'ýA;˜Éç’ekdØ‹ï›|Ì›¿\?ùª<ùìÛrvÏ;¥ÏÕË’…+L|GäÍ:ø™º ´ddšMe .¶¬œ,gul- þýútyøñWÍôùoN7p@°)òÉ‚Y>\ÿE™_Džßç^©}ú2S˜¨S§š€ÕJÙS€q ‡ö×¹[iÖ²,]8‚v¼ñòPÙ¶e§Sþ&ùØ€[äîë.‘žmÈâse´È‰ß~.¯ {Lfþ6U6mX#_|ð&CˆÑðÇ}ñ¡ôëÑNnïw<~ÿ­Æ?5ü5+—Ëèçž Ì.†6Ú£]Cù{Ư¦ÿHKM– c?—›ûv—Û®ì!t8M~žð­6ë׬”מR^{á)¹¾÷Ù2ðökdüן'¬eh[™8¼?æeY¹|‰ê¶þÎ-ô[I°$|ðúù¿ËºÉM}ºÈó?„é‚uF+¥ ûæ“wåÖ¾=äÆ^å9\Û¸n5y(º¡˜F£ÿ;¯é-Û6o”½»wÊ«È'ô,|üö«°V,6ezcÄ0yóåáòÔÃwÊ][Ë„o>ƒ’fQ,¬]õŸ$%&¿¬“o¿On»º ‡d¤¥™2Þxñ¹rI—–ˆã.Y¿z…ÎKþýG^xüAöè¹óÚÞòÒSåÏ_¦K;{v퟈ÁÖnÔÓ&?àÔþ‡?v¿Üsã¥raûÆòˤñ& Ëþñ[£ä¢N§ËÅg·×_&;¶m1Öƒ£öíþpOÒ~Àö˜FL\”`Ì(Ð袢" †­Û÷Íy'ÌïœSùòÛŸåo̹ÿ5í=ÙºâGø÷È·?ü*W]ÖÃøÿäg¤I‹Æê›!ÄÒE ^zÍ@9fâ-+&Ê¢YŸM~Üø_ ¼gËæ-;äï¹Kåõ‘ƒåÀ–?0Í–±?L7šý{—V-#ÜOâN\ -›5’o¾›fö6hÄ£ß+_}ø¬Œyy´ÓÓeÆ_ÿŠ‚–SSù[Ô«)•«Äɼù+39™òBÇïÝ/­Ï¾Vn½éRÙ½vŠüôíh¹Š¿þ^$ûwÆË…}ï“K{w• K'Èš…cå÷ÆÉ¸ ¿Âtm-qÉôÉ3dä˜/dô %ªjœlÇ4ƒ}û ü[‘WÎ{³¼ï|ø,"—ÈÎ5“eðƒ7ILo$À:À8óÞ˜fä ¡Ü¤q]!W8ÎêÞ_žö¦Ì‚F^¹R‰ƒ`oß¶¹Ü÷5òö½êB#ÈgÎö6X.¤ËF}þöç|S?lü 1PiߦÊôÌùí]¹¤ßC²d1CèóæÁÒ?J „ °²6Î sÛY]{<…ãäñcFGíö~½Œ™4û?yýÓM—ž'+U‘»>!ƒžyY.º¬Ÿ$'ÄúBaŠŸ ¯<ù°Œ>_&ÏY)—\y\{QgÙ­˜ò_},g#­7&È›Ÿ—ÿw4ù YùäW†–¯&Í”ßo–¯¦ü%O8C¦-Ü"m:ž%Þrµ$'%a)[7o’aƒÈ-Áú¥Î’íx˦u°Òa^i¸1ÏQ:,Ðßù¬åeÌ'ßÉC züY0g–”‡õ㮇†ÈOã¾ÎM«Êð!È”ñPh2Ò¥QhçЬçþõ»Lýñ;÷ë?²lGš\~íÿÉ÷]kâfY~ž8N®½åùù½äª0yÇ»°°8"3ZFÈ(|©•?|Û5rÞËÄ‹ï||ÏM²ƒ, vZFæ®Ý+K·§JÍ:õäÛÏÞ7á¼VÆV²îP –lº'–×tá•D¨{ã¸PÎ !“ößÿdLò·IeËp˜Ê_xf€\vIWsâ°(KBÃM\Q³fÝÕk·Èå—t“˜˜«Ô®.£_(C_üÀ ÊÁ¼~ËM}¤R­jR¡Z%˜ê{ÊÒåë`âqË£ýŸ\}EOYyß…Ð*wîÚ›«­&b®~ÜgÏI ³JµªÂô|¹<Í7„ƒÔÍY$ÝÏëh´füñÆüõíãgÑÒÕÒ±]séÕ³³8Q–úMëË”ïÇÈøŸþÀš‚í‚q¹…rÍ&õeäsÈ䩳% fþ:Hóѧ^—^WÜ/ßñ²Ô>­®6§Lcõ%CS8ÎÙÑ€]ÎÞs­´9£©8b£¤{·3Í\7×.äç8ȲC«îóå²rÁ÷òÌãw6çöºCÚv¾AÖÀŠa‹‰”ä?qJX •{Ôòa™¤ø›‰)+/;uÖM˜Cov[yèÞëdâñ®1ðÓ¿JàT0÷¬é“¼¹€žkYûû¸nƒÐFCåß¹³äÚþwKûN]Œ9·ãÙ]eüÿJõšµŒvO3o4*Û$ÍßÙX„5gæ¯òüÛŸÃ ßÔ˜{ö¾Ü$B­‘¡y«¶fÁ]lùòÒ¼u;s-Zk£¦Íä{ÄÍ…¤+—.Â"»U™è˜·Ù]6kÝVÚŸuÒ®-ÌG,⣃'OVý·DÎíÑÛ 4(¼¸nˆÎ@3]jÆï¿ú<¬‚A`Õ5&ê>l,ž?Bo­h<õâR ™·]›Š9è%ÆÔýûÏ?Êýý¯’s»÷2ƒï ÁfLñVÀ49¨á‰iÇU®ŠÏÕ‡ó=lÔ»2}Ò$$¢,]䋟f`4UŸÖ Ã0éѶ¡ü‹ ´@´hÓÎX–-Z`Lí´l…e€ÊßÅW^/gŸÛ]ªÕ¨%­Úpn(¬µÿ“ù¯½$×õ¿ fóHcÎŒŠ2Ö‹: O§‹$ç›4o%SæÀ‚‰úžùûT,œ«ÁÎjc¥a]~òöhÙ¾e“‰—uRÒÎ;¹[Ò©žhz¨\V°¹ÁŒ‰(Û„ä¼ñ0s\ø‰0ÝpÞ7æß8ÌÇÁ<-”Ž6–]›}JÎÝö»ü|ÓøZ8—½bÕiŠÁì?¦L&ÿøÒ³n6ˆê`àbŽÁŽþÂ®í±¶ Áø%/gò Ö»Á–å8VˆÓa±8¿kGyä›äù‘É»}/¯ŽyÂÄIMöxE·öLô(Õ¯[S"ÐÉåÀz‚2s©SBÀôC¦ý @Dm}ó†µr„ÛoFºw= Kú q‡!CÁØ´yk£‰¦§±ºÐv`}Ä?j¤\PÇÁ9]šŸ9‡Î¸;s>Ú}št\UÏöÆ9[Ë4NáÈsÆ~a¬R\Àǹi6\˜[¯^£6ÒÍ0}Ø•×ß"¿ÿ<ƒƒŽ÷™ ‡°¤czt,#ûSVSs¯Û¨©)oÞ¼Ð/ I°0ì†5‚ërpž+ûiMhÑæLÌ9ÄXÜiý]zõÈßzcj¯†üx9z{Óß2·ÞÐ\kظ©É ¹0½Šq•¦Ì5{wí4‹Z¤ma ¸ìÚ›ÌÂÄ{oº\~ük‰D—+m?¦ôŸÁ>ÙÌç?ðøp3(b\Tfø¤µú*ÕkHKpX»j…T@4¡×kÐi{ב/çÝë7ll xBÊL£&ÍÌ hHÆÆ–7sû´€Vˆ‹“ÖÌ£ž¦L¦(%ö' {LŠ.ø¢¹•+£θ‹±bzŽ\racÒå\·YÏÙBéœÇ…‰8ZáFhÏßù“™#&I—·zoÔª0y7ñwsÝa´@š ¹øóõ‡nhD+ãڦۥ˷Ëu0!¿=úqþÒòðÍÞUô¸Q¸š“æ#†a£ ƒ€º÷ö«dГ¯Ãdÿ‹<1èS&Vv Ò EÙXF‡¯œÈ¨l?Mžen;¬ tÌ[,⢛…„` &aa^ŒT‚ÐßyþáXHøÑ›OÉU7=&+Wn`ᡤû‹Cþ&Ô;@àz:»¬ß´ÍÛ °¸„埆…„ò8@Šìj9Ó!l'LšEŠ/Š –´B E^ãêÖ£kíÌmÂŒøÃXâ3›#*o½b4nâfÓál…ÃX¸H‘õÇø°Žƒ(uJàT°îB®¬¦ÐåÆÅ[[6­7«ÖÛv<÷3猽JCl¹ Ðì£I1‚€š'Mß4¯[ ÁBBikƒà€¡Fè@ø´´T£Ùq~žm`Þ¬?ŒïÄœ½ÿsëV~(@§Â„L³ùcÃGÊS/½*wÂ$M–Æï”ÞvFÕ¼U3Ÿ?ÿï?¥1çUÅ@Áâ¦lè/¬_ çÌYïܶ٠2¸xŒsÊt´BT¬TÙ,ð#Î…GbA…0 \´ÇÍí<&ÏŒxK`Å8µgoZ˜½„E€}Wûó11c‰'æwÑüY¦ ‡²Bæ|¼¯UÛö’ázI—ж7˜A…uP©reiÓá,“'òà‰V‚ÇŸ%Ͼúž ü´¹^ š¾I›ýÒ°úø .¾Úõ¼v½è²°˜jŸT;w•Éß-3¦OÁt[~'ËÓï2Œ êæ"üÎm;Lœ‰˜é=z_&ÿÃB¸eX`ÇÕà\ ÇUð¸Ô&in†”ÇvH{¦€¢0äªöÌUoÙ¸&ðOL¼^MÚe´NöC`Ì#ç‡ÿ‚‡óìç]ØGÊ•¯hÎS¸.üg¶)«›óço0cOƒ†ž*ƒ‡Ž”g±(l4Ùø=»äó÷1­“x=h®W^+˜],kV,—½¸öÝ—ÊÙÝzJ“f­Œ¦p,‡'>ñœY4È@å*ÕÍ€€<÷îÞ >“°ÈïôÏ^qä 3Â×ömfAÚ¨ácý@O©Q«.æÐ—[a]¥¾‹×ÍŸg¸õ¿g žEo(—ö»A¼µŸü‹AW¬sAÝ-}{áL^|ÒÀrT¬X>>8凱æ >ÀóœjHKIÁ”E³ú~Êøo°®h¿,˜;ñ_z©i„‹äŽ«/‚ïDAÙßý‚|€E†Ö Ê{×X©•Ì/T¶;ÿÇ]Î:£õyçvð@;å–[˜ÇŠnž‰>A¶ ÞÖ¬Û"ÿ`ÅõÚõ[¥E³†òÊsK ,n£Û‹ëŽ»têØZã¥3åËÅÈÐÞ—1o+7]{‘ôÇŠÄrxd¬S¿ÿb’ÑŒNM·i«&Ò /—Y„…X<ñšü9k¡¼8ô>¹ìânf€ÀEd§ãQ¬Z˜“¦Û½‡[¸ä¢^]¤ÌÙƒŸ#ïA •/…Åd#ß9ù;­²aƒÚRæc¾ÕΆóå°(mÛæÒBò2,fÃÐÓŒÞöïO”—¬2yX²|­YµŸ ssnåÜ€\‘ÿ££0ß¿ÉÌïwëÒN"Ð0º´o!ó,—…€‹eÄðåŠ>çóû–­;¥9òQ½f5i\§†,YºÆhï=Ïë$ÊEKï«4†õ†•£6^hÓ”q•zyçUl£ÐþªÉÂ<¿«ÂiI;£C'£=SÀSuíy‘Ð<ÍUö/<~¿ì„ù»Ó9ݥ⭔ef¦Këög‹-|ŒŒBšæöƒž’ò0ÓŒÌEi×­2¦d>¿vå23¯V×îX p,N¬tY¾ýü}¬ìo+·Þ7&æJx¤¬ºÉ÷;¯ï9óœóäSÌ7ùá›Òá¬s¥,ÀÄá‘8>kÎAÊ㾔ߦLá£ß“Vx\SMš·Ä‹{êË7Ÿ¾+cžÁý7æÅ¯Ãcf7càP{5˜ÑÏ„•r¤|á+Ͻö¾ÔªSϬ@AäÍû€µ|®i¨Šõ ½.íg”*e ÔiÐHê7jA&ù,ñÌ 3ÅòÌÈ·Í9.‚«º~ýå§eì§ï  íäŽ5Ö Z-Á~¢÷/¬žÍÖÙð”BRµšu>ß³ckû(ÿÿDÓe«ü&盆?y¯Û洛礋ªN!<çj¨i €ÎÑcµ[¾áæ$úáüo$Ì2»žr0¦˜p³¸‹s4a8°‘0ÿHã<>víUÈù½Î74}"JÁ¯çbn.¤ÉÅj|) ç:p ѹr\Ô‡|™8Ѱr``¾ÃÐ)”çB3_¾¹zçhÂfùÓSÒqÉ-Qظ¡UÇã9yZ¢ñ´@:©Hüþ€òÿb5ùãÜŠügcmÜñMo,knM¾?„Èëȯö#Ÿ¬ ÆE†ÔªÉ-Ì(p,\<·uD³~”) oš£É ˆóè|¼…s÷|€©oÆS ÎpwO›2Ã~Qß¶uéÒºÇìÙK×"jÞ8(ˆºRF€whnÕÿž‡o0ø)7ÌävN…´£e»£@÷¶Wï­ÍÕÛ4ÁRCæynœc¥Yš‚š8µAn*®4 s€ÀÕáÌãàJušqig¸ƒ ŒÙº\… æ:Ø ‚ÏEÓ1?ê4 ‡ÂòÅgÌ©ÁSK§MN„6ì¿8ÏtL8ô`ÓúAæÏ™)O<ÿªÑFyþ²aIDFLÉæË<ÒÄÎéóE+4ý3 ÆMŸB–þ¨½2Ÿ|ž/Zá V;ž`ØÞºc—îKçÏ.px‹âP°PµPHÓ$­¦ Aíöä³9ï.ㇷ*ÙHT¬‚¢ÐÁ¯asaU´d Dœ0—M8ÎyW©-ññÅ4LAAgî`œgÂ8h 3iáe2X@g„ÂPƒŒ¦°Â5<N|ûÚ¯˜2xaÔÇrZúxÍëæymÆÏºŽa«lŒÛì#1„uc° ¡^­6æ±™&nTz`X¾7 uˆ@IDATÏæWå7¹_¾ù( Ï™ò ü\G?œÇ« ­œñ‘…É+âã óm˜vàÀ(–/”AÃ&¿%0£/ÃçÀy³ù;šê{žß £è8“§JxÀ y7.ŽïÝ7/Ýá>òÀü›º`t¸‰•ð,/ߊ0HÇÊ#ËIÿê”À©&ÀNŸó¢þΘe3ø¨ïQoÛŒŠÁKTØ^q³SŒŽ6á¸8‚‰~Ýn´ ˜¹q³cŸ6Ö=Î×fc¡…MÏœ[·Âp%6 ôOÇüðyl¦E?äÑшÇœÃæŽùˆŒ EsÏ1B‰«¯§ÀjðÖÈáòõ”YFðYøRæËß1NKÛŒƒ`exÌÅy„XáùB™C×¼e5kÀ†–ï+fCŒ6Ì8ž/Ï1a°OAÈÁ+ç¬é‡«Ý9ð¦åeìÍ -CXN¡²kâàÁ’‡8ò:óAîcÏgúYWÖZ–“/å¡Ð&c>,ÇîägêáÉ¿ZÚ&¬U/VÙã*UE9˜r)¸0·Ò,ŽßÀè(•Ç…ZBEø;V¼ÿ")ãÊÏs££0ÎÿkœçéÆÛøxˆ›Â•EçÃ+–q˜+ÌÃy…=Ïy,/2m£"½ñyã7'qo‘»áêÞÒç¢s%< ‹,`- :†9šc<æFe|7˜7o^ß¹é@Óy¯y#å ÆòküqPãó“·¬¦`°Ãñ­1A­ÙÃçåéç©ÉW«Š‘8&¼©½XXÜä80/°AÍ5‹;ÃZôí{‡Î[udåÏøgœhÀÎaõaRÕ?Jà”`g×Q ù;káÏñ¾æ1Ö³/‡Ú¢·Ÿâ9¾µÌ{ÍÛ—P󳜆mŒÎ:æu+-ž£`áFg{›¡wÁóŒƒæv I>öÕüŒv¹‚’×½á½qðØrŒÏJ—‚•Žq[ç¬ßÜk溷?òÏB˜¯ç=>Z˜¼þò†ñ?¶ö)i¿òúþÆ,Í)2gùó?—wÿX~Žvíxçü¯sŸƒjé­Ûv0“ǴFÍù‡=ñë^a"þóÆŸ÷Ø?Žc]ó÷Wû)ÐK¢à%’†Ñì½£ã@ªtÿ²Ój@©7–fíïןþ}Ã$ÿÓº¯”@€ðjÁ^m*Ѓ¯Î4ÇJ@ (% Ž  ý$zB (% ”@ðP|u¦9VJ@ (%pèG ÑJ@ (% ‚€ ôà«3ͱPJ@ (#¨@?‰žPJ@ (%|ŠüêW¾@ŸŸ¬Ãórý£}Ë#ø°hŽK~iÎ{”÷ªº2HÕîí§¼}T$ Ep”¡nŸ -JV‹*Ð=!ø¼&¾MîÁ‡³=v~ŒD¿–U”ú8Öãá§T"Rø=~&7,Ìãýä«xð©XåZxšÁÒãp  ÷„…†áKÈø,¦~V(Øê°Ôç—=r4ÄédY Ý?Z cÄ‹wèÛœûö'ÊêÕ›ìa¡N› §Êób¸÷PÐ%ØñhßS81ò u:[·íflÎÔ„4G1D«Qƒ ûeÓºÕvgh¨Í ¥C?þW–rI ’}ÔîÛYlgzzb¡¦ÃüÌÖñ)2ŒA„„„¼f·ÛÌÊÊÉÁ©BeàøÉ•Idlq.ôh­L’˷з#Äâ°Ëʬ¬ì àm6Þ³ü~¬ºÒEÀj;‚>êUôQ¹ÐI¡!iU<õlñÍFtT)­ã≽ìÆâÆýâ±ÛVege÷†÷Q¬ˆÂ8S‘‘‘ÕÓÒÒºù" à)l|…ÉCi C~éØÚ`»Û{Øæa‹Ä¦‚ é,v;Wã{Ë ¹‡ Ÿ |¦~£¢¢ª¥¦¦žçË®öQÅSo‡aë‹m"¶4ljõ„"8ÿ>j ú¨ùˆ«Dû(&¦î$¨_¿ZÇØ˜¨õjUëz¢×(•@Y! }ÔIªéÚµtˆŠ)·©Vƒ-ORm!ziY£]m4…ŸOŽr³·mÛ…_[jZéhÖr™=ýSÖˆWÍìE¡”¯`,Í67ÞV¥+n ssh% ÐO± ¤×Åu¿¢=@nìâÌ…¹OØY¯c,Îè&._gà6¬Â3Þb =ôÍù€)—fD ”è§øA—€rãÆyýú™Ïe ÁN¸Äèu+=3–0ÏÈÈh`w:{"FÞ”yn¬£+î|Õ“ËÜÇ|í“]\.´5œ4û¾ó‡+ýV[ôÇîWØ­°ïIKÏpïÞ³×ÅcZ  Oe!šw*ÐKyÉ$HËÏÖ­ÛlW\~™´lÕÚv÷Ý÷Øî¼ó.[ƒ† lëÖ­ãýkKLL´­Z½Æ–””dCáHÒ–’’bËÉÎfK°¡‘±­Ø233m3füi»îÚklÛ'¬Õ¶åË–Ù>ü°mÖ_³lè4–ñËK¶õ6Úâ÷ÆÛÐØlqÿú믶6˜¸y¼k×.øµÙRÓÒmÛ¶m·AH›kü¥Û¸i³->~Ÿ-$Ä{žç àmÛwì´íرƒy‘Œô f×®Ý2dÈ{rR’^Øð~ÎwC¡íÈ«}ذ¡öU«V™+>>Þô9ôÂþVJókõ1HÜ3<÷­>jÃÆ¶ôô Aš´hÚ““Säÿ{ܾ{÷.öJÇìW¬>iØ¡ÜØÿž=ÛôhóL£ÄÝ!A‰'­ žlcÇŽ•;î¸Sn¸þºÜ¤N?½©dgçÈâ%Kåã>’ºõêÊîÝ»¥W¯‹¤G÷óé w½ñ%óJ°uîÜYÎÇõiÓ¦Ém·Ý&sæÎ‘7ß|S/^B¸ìÙã7$2"ñí’+¯ºJ5j, Ì—x˜Ùÿ[ñŸ\qE_iÞ¼¹¼<âeiÑ¢…,\¸P®½öZé¿Ë»ï¼#iii‚†œwþùr9#©©i&Ÿ7n¸J•dΜ¹ÒåÜsLþ>ÿì3¾fÍ —`jÏkòu†„½¼…¾è‘AƒeõêÕ’•%öºÓ~"o¼þºôèÑý^=>|˜DFFÉÁƒÄíòÈC=$ Ô7}ÜY:I«–-÷qû(*Š~ñv² ­Z·– åËYÅ)Ñ_è%Š»dƒF+={ö0‰ffe›“‚7}­š5å±!C¤råÊòÅ_ȧŸ|"ݺu3£N†‚Ü;ä0Ì‘>=ûÈäɓ姟~Ä  [οðB™=ûoÖ+_~ù…´nÕZ®ºêJY3ÿ¥—ö‘)?O•óÎ;OêÔ®c^ÒÝ¿¿´o×^úßr‹lذ^ž~êiéÖµ›üòë/ë€ >æ·ÝÒ¿ܦ²eË™÷Ïã uO~ÿýwÁ4 Œ|åÙ´q£4nÜÈ(a¡aΑK¬vÉ€÷IÍÕeÊ”)йmÆI½|öìÙr&„5×1Bfþ5KÚµk'/¿ü’Lœ8ÁvÿÚ~F˜§žzÊd‰ÂÊ·•½£þe‚¿nÝ:PbÉVôYÊ·:ªß“}RúÉ&| ã‡yŠsB¹ÎkiòžJ×&Ô ÓüV)W®œÌÞ›×/B3ܾýû¤~ýúÒÂfü•«VKxx8Ÿ!ƒÞ'3fÌÎgw–×^#™aBLL¬T¨PA*V,/TP ßvûmR±By‰Â QãÆF8/Z´ƒ€ËŒÙ‹ƒ ZÖ­]+›Ñ8.¿ür)ƒx³¤víZˆ×fFÞ+V”,س´sk Âüúï€ul5Ðê5j`džËFw”€8UµW.NK8˜ˆÁþXï0bõ<2sæLY´h¡Q`V—:uëÊSO?-Û·m“,sŸ6}šŒýv¬|õÕ×PÎ5+Þ#aedœìÑØTª\É,^ã~ÿ[n•30PˆB_uå•WÉ7ß|mç4cKhæãâLø¼}‰Õäö¥€ ¿a¿s½Q`8ðhÝúÔôc=NUýjºÅB b…вB‘.,Ôi„%ç‰8_ôØ£BÈÆÉý< wÞu—ÝÒºeþÂüÎ`X‹–fuŽj)h¿úúiذ¡ÑÚCÃÂŒÿlk^» Â÷ò˯€?ÉhÿšN¤MÇ? þ™>iÈD ÅùÏgÓ@Ó?‚䮇y~ñ°*4ô Œê]yæ¿Y6nlt4ÛYûŒŸûÞÁŠ71ÑÑðg²¡”€8…ÂÂÃL¿À,P(RQ Æ»4rs•š–jü8!Æ:È ìORSS0ç1÷ÝwÝ-³gͬÑ%·ÃzȾ»P>ðØkˆ·/¢®ÇaDGó=âö𠚈ˆpÓßY›}ãÈÛ¯0}«_±úšðÓ1mxªœ ôSE¾Ò½ñ¦›äõ×ÇÈGb´`>†öæ½ÿ™77²KjÕªiÍÔ©?ËÌ5Y „€nûöæ†ÇâÙ¿Ï4€Ê•âäšk®1f{ÎM1.ší9NsµñªU«Ê¿ þ…àN—ºuêʯ¿ü*XÀbŽ©¡s``9ŽfÙx»c^ë›o¾1sdË–ÿ'óæÎ•V­ZsýÌw3<çã}t0‚z¤zµj& .Wg¾)¬Ç~û­,]¶Ü4²%X#0~ÂD³Q·|öÙç‚E€h´Þ[~ËÖ-f¤n"³2£¿J@ ”(,"—?Ðo,[ºÊÇ:hà‹a9; ·µ|öég’‚54\kóÞ»ïK·nݤK—Îòê«£ñ˜Z²,_¾LF%uêÔ1}KË-åO<5?.yþ¹ç$ k…êB‹ÿúë¯Mÿ1ûï9òƯ›þ‚}ÆìÙ³„Ó’»07räH˜ÞÛzйW¯YkÖñpÀ~eâ?™µBÞËÑ7Q¡á>cƼŽ'möBaò»×­[+UÐÿ*§&÷SEþ$§ ™é©_¯nÎÔ©Óìœè4h-ZiƤ´ë§ž*#F¼$S&O‘fÍ›É5×^cnt.Z£?*¯×]w­p´ê„9ëÒK/•HÒüÚ½¿ÿþÀÿ|~ûyýãÑ4Ï]wßãÁóãGÁÂ:¼¯cˆýÌ׎ubê´éžO?ûÜxÉÎvñÅ2%Þ¯¨†^úZ¥b:i;dët¼ó€Ïˆ{0‡nQ&´kK-ubNšf¥,œÃó–FûæE;þ!œ™ƒ"jå\YÎsþA3g}“H\QJÇ81Ë…Íû&âG~rãeœþiáÈ8ÎõóRVòéK€?|,áy‰KVù®åm°6Ä~ðþûa+V®ÌjÞ¬Úß›¦¼I›8­?N¼¸Ïœ†Ìü믰«ú]|»ááÛ|×·:% JˆÀB´?,ûíºº—Tt¾AZ¯·ÿ‰@»gÃä-vÞÅêëƒØ˜~çÙ·x_?á͸ÕwÙ°Þ†V9N³ùú„wqÕ»/£r@ò†feefD„‡yÐ/²›ÉÂúœXŸU¡B\äô_¦».éÝ;+3›Ï³[ 阺÷¾+áÙ»o¿}üãÃñäM„žq£xÆi¿âQ¬Ño¡5ô²­¨eFöZiQ£ÒðJ ´°ú¨BkèíþÐ ¹“©Sѯœ°™ä$”W£T…&€ÆÂ78á3‡ý8Ò.ІWØúûÇT~Éæ°Ð×€J@  ´{ïĸ_lV¿’§ðï/òÝÏæ”ô+jr÷«ÌÒ¶‹›³Ôjžh-¹öì—¶ªÓò(2A Ðú(ÿ~%+@z0ÖÚ æ7§Îßœ +õ¦”@ÉÐ>ªx™«É½xy56³B‘•“æ_„ª‚•¬†WJ@ ”r–À(åÅ øâYÛÌé`ÔÊW ñ3¥Ö+‡ø&ËOÀF3¨”€P%O@Mî%ÏU7°†0oˆŒðÝ«èñ¥âüõøUꔀPJàèÔä~t.%y–«µíxï9_p2:Y‘ÌöØðr„Ù<†ÓEn^úW (% òPžÈ©<„ðþºõMOß Øª8º™ë-»ì‹½äYaa‘Ÿåädõ Œœ”š˜Èøé2uÅG@×#Ë`ˆIû¨â«%Ã2"66#+-Í–é룎x/zñ%Y&c*TUXn%f+Wµj½zuëb5v¸j=E¼ïð…r[„=$ë`ÊÁ-û÷í™W©jjl“Øú™øÊ'>ë§|‹È7)~¯mãÆÕ;M 6ë.b¬<@ Xõëë£k*†Šr»\ö¨Ø°”›·6Hr„8£¢cëµj×®fjRf´ÝáÐSµâM_gKdtô€´””§A¶ÂÆU˜ôK{6Œ0l|]¹Om“idDdô_éi)·`_Ÿ(®‹ÕGÝ‹>êdRû¨â«)*|OF¶ØÒ±i?EtV5 }TÄUà>ª0ºi(Ì8Ê9=.¾¢Ê%}¯gh˜xÜÈV+ÑÞ±©X„•eá9ú…ÄZ qʲEóåQÏu­_¿IM›Ö¬ñ#íç[wK«yû¨Þ—W¹äÊë´*ŽŠõõO|‡ý½Ín«lžÊ±ú­âH£ ÆaõQË/·_yöÜÂöQ…èþ¸3ëÖo$çõê“jw³‚ý¯ê~¡  }ðá56uE$ÀÆêOÞ况•+{d幺2@ ³Nnf‡ÉØ4¬2Pî“ZD4)vOØlx"Gû©¢ÂÎí£¼/K+lUTns¹r$3#ÝŽÑšo4ãÛÍŠZ6 ˆ€Â<Ä¢Ð{X›`Âf瘵…ºâ¹Ð$ƒ2 B\û¨“Vw죴Ÿ*"^«ÊÉ1k ÝGU N!l\ 3»ïþ,æh5º` €Î‰æ.í£‚¡²Ên}}TÇF… ”]ðZr% ”€PG@zàÕ‰æH (% ”@ ¨@/02  ”€PJ ð¨@¼:Ñ)% ”€(0èF¦”€PJ@ èW'š#% ”€P& ½ÀÈ4€PJ@ (À# =ðêDs¤”€PJ ÀT ™PJ@ (%xT ^hŽ”€PJ@ ˜€ ô#ÓJ@ (% € ôÀ«Í‘PJ@ (P^`d@ (% ”@à(ò×Ö¯HEÌ>ô›÷#äÅÿIX¤áK$oÜü.nÞsE,Q¡ƒR^ ] ¨Jí£rkTû¨\fGúá<Äf·‹ý°oºÛÄíq ¾÷A[tƒã±;âz4Ì|£Ûÿ¦ä5ú Ǽ0ÌŸ:% ƒ€öQ‡êAû¨C,¸§ýp’••)ÿßÞyÀYQ¤[ü›ÈY’DE² ¢¢È‚J0¬ŠWT|‚oQ k@×gxV¦5¯ ºˆ>sZ]Ñ”hÀˆˆ ‚€ 0ÃäyçÔ½5s¹Ë3sáÎÜ{Š_ÑÕÕÕÕÕÿî:_¥¾STXã [Æcø/=#ÃÒÓ3ݱª·ôŒLËÍÝa›~YkÉIÉV¿Qc×€((pØÞòq,%%µZôÒóss]ã#)9ÐøC¥](F•A/Õ(hiP±ËÆaH=ä¡s¨ûíW_°K>†ϰââ"ãß›¯[¯õèÝÇúô==ë”@|ðÑûÞuè0¹3ú¾W‹Y`ïÍzÖ,œgµjÙ‘ÇþÎNqšµ<°ýüãj{ë¥çlðÉ£­eë¶VPóøÞsWyó˜‹w‰Ãùþš; ¤ =Vz¼´¼fI¨ltÉê7hh—ž3ÒÎ{ßRRSQaàÑkMKK·ÌZµ]œ7¨Ü²G›Š@ƒ‚‡Ð7ÿýwlÌð~v@ËV6åÎûmÂU7Ú7+?· 玲Í7Xa~ÍxòËݱùfXFF-wŸ7ï–×d¾ÌŸ c%OMMs×à@¦¿nÐHÊœbih¤¸ò¢üÞñ|æãó¤1G†¥(´·^|Ö6`$AND z`]_øá{˜ª+(Ó(èTýœŽ,üpn5ê]3¬L£&^}£}ûåNÿ¨QIœñ䃶cGNõШ—fJ£B^MõÐC` 3£˜‚ÖÞ1Ö·ÿ @OoÀ¡¶5+˵Šp‚}÷õJkа±­ûy zÕ?Xçî‡Z›v¹5 ýo›7Ú§K?q/ÿ!]º[ÛŽìÇV¡Â¶{Ÿ˜i'Ž<Ý 0´Ï¡õÛ¶·KÎáF:vêbÝzi[6o²Þm[·dYÏÃúX£&MQ–bg¼W,YdkZã*m'äÝ¢uËÉÞnß~õ…5iÖܾþâSÛ¶5˕ɵ óó]…¤!_ûÓ®ápHמ֪M;w©h ðV~ºÌ ¯wíÑ ŽÖŽ ·,£œˆ@5!ƒN:,D£Ø(§FmۺŖ-^hÇ¢Q?ÚOkV[jTûƒ¬£~É8? Q;¢Ž´ƒFýä4jÔ.5ê¿vÒ¨>¶å·ÍûH£Öئë­ó^iT‚Óªdh˜\€€ zø›€Ê‘‹ÖgÎöm¥Ftó¦\û †òˆ¾Ç"u‰ýßÓOÚêï¾±N]»¡7_l·]÷G»ïo/àøq0¬ŸÛ}·ßh 7ÁÐu’ÝpÙ6sögdy©£hùy¹n1ÄÑÐ>üÌ«–š–f›6¬GEÙdÓ½ì`ùEöÖ«Ø5¾Óå÷'¶hܹ«ýºþ{ôÞÿu•=ò)¼È:¢b6ÂuÙ«¾õÚÿ¶gßüÐ7kfÏMÌV¡rH·CqÞ:{â©vóÔ¿¢ñp¸-]ô‘KÛS ÞŸùÔ£vÃ÷¡qp€íÈÉ Ê¥}ýN€ { Qì!‡jÔ–ÍyöõÊÏìÐÃruö…gþf«¾ýÊéÚÝéØ-×\jNÓ†ý]ãÿÞÛ§8­ F]?ñöÜœ…¶º]iÔ_wÒ¨Í6ýÑû\#ÀiÔ+Íìš›ï‚F5µ<ùW[ðïºçv»÷É™Nç¦LºØ:B»!5ê–?M´gßšç´æ¹éÛwè”°sDzòþ»íÏyØMùQ£nƒžuëÕDZh¹L£šC£²Wpý§Eq¡ï[ºuêÖ³—gNsƵCïi©éhõ.pÉ~7h*G‰’çB¹ñ“®µ†šØáGõ³¯¸Øf¼ùo›óÆË®÷{Å ·¹áòN]zØ»o½ ãßÃŽÀüV †ÆyÄDŽЗ`޾¾.߃¾|Ñ<»ãá§mø)gºVð¸S‡Øç+–ºùû•Ÿ-µ›îzÐ:Ü „гýºau8è[ùùr5æ|;÷‰–ÆÈãÇØüÞµ“OƒýíhlôwåEßn»þ 4 æº2Ý|õ»ø×؈ÓÏÆÔ@‰M{ì~{õù§íìq¬Vº2è¡/ˆÂ"eü¨Ök”›¦C§€ÓpË?YhEXó3ðÄ“] 9$Ÿ†N‚Ó(4òƒF];ñ|û¿9‹lö/Y+ÌOžr»ë­S›Þ}ë×à?’Ýi;Ÿ~ûàßí¤SÏ´,ôÔÇv¢}¾} רã{·wwƱe6òÌó켋.³ììm6ùâ³í#hÔˆÓÎvšÅÑ%—_Ç?»µ ƒCP¶ÿ¹f¢]xÙÕ6ò÷Ð(h';<¯<÷´sá«í4ªz|åWÃ]^=ô°§P„¡íš·rF™=õGî½Ý~7ød›xõkÒ´¹åälwsÜgýá÷2qáZçî=]o|-†®?Â<ùå¨(üœ‚óM'z–ûŽ‹áØãåXÀ•m¹j5éù²ö:² vg·†ž€íÛ¶Z,Ìc#­WΡqØ}ó¦n6m;¢aq¬Ëƒ×èÙûHû Ç™'§ºtïå¶<Æa~ásžCôŸ/_bë×­uq?®^…ÅpÙðÑg:á()Qe {E´+Q#@ÕpÕ……´\¼ú(4ê8t6.»ú&7í–ƒ^+×áŒw)4ª¦÷òÝ{RRŠ­ƒnÌ{o¶M¾éŽ FåÛI§4j9†ëÙã-_£’žôÄ"ÙŽUu8: Û¶eA£êÛ×ï¬Qì¤pô±:Ò¦]G;âè~Bg¦ÇN•b]zôh:;­Ûu°b,Ä¥F}õù ûbÅ׫§nqúòùi¡Ü¢þÉÈ ‡¼ |‘·ãÅ<î„a6êŒóÜðÎQýÚIÇvwÃéÃFÿ¯aæ¡ ðòÖs/¾ŸÛæb´|÷íô´ ×ÛåÊð¼œ\1_ CëŸ-ýضemÁœx3ËCEä÷¤|ÙçÏy‹Üj£‚¶A%Kt‹èhˆÙcÎçcœóÊÞ¾Õ¼û7¿ÎÅzl¹Ò1ÛnE>ÊÆ<ÿ±1‘žx¼¼[ï¬TøÊÇò]+œ 4ou cÅoÓ¾£ qªÕª]Ç5^"ñí}bE@ªB ¨QýaÀwÒ¨cº¹ò°Ñg8]b¯[·¾Ó6¨\øš:žízõÔ—PâÔÝçË—£QïB£2]ÏžÃÞ^÷˜o^?µ¥Fm³‡¦Þê:Fõtwê~Ã!ÿû^£8ŸŸ–žµÂêl ¸Ó¨bhÊÉ<©QÄÿШOjî%0ÚY¨±s®V¹‡=K®òæ‹Ç•îlýr.û‘¼f×\zžk)ÒÓ<ÿW223lÓ¯Üu³æ-­Û¡‡¹¡¥”Ô ¥×u éî¿ó&×ãïû»ì—Ÿs5•ƒ€5ßçËmÆBÒOÔPi]ÿÿy£¿dá|{ùÙ¿Ûw>`c/¹£ÑgûÒoã3Ð`àð½;ÿ³Òù–vbðÓ·À1~––ä%4älÜöè}„~îYvÆØ±®ÍF{õ<ßç†I»" Q"@¢A-Õ¨Ù#3^‡Fµ¯>[ŽQ»Tì [4ÿ}§Q™Aâh5Š m¹ÖkÔ |wß7Ykôø0ØÞÀÊq6vÖ¨QNçmÁ½{=¡Öð+›%˜.|iÆS;iÔ蕳AÃÏOàèJ5 :ä; ^¯|žN£0Ð…eJÖŸä…jTÖ–ßJ5Jk9¬î?õÐËX¸¥åç啯²§Ëaï3Æ^lwÜx•M}xº5= …ÝsËuÖ¼ånAÇF²Ûøö[»ìœ:Ø-IKOsóKw<4Í7m†!±í,|²«NŸtŠ[i:iÜv.æ” i?c8ì‡Uß”ö¶ÙßæBöÒÛb…*¿?å‚’w0çÅU©~Yg-[µÁ‚˜O]%÷óò:ó-⬬ߜwÇPc˜_Z¶œÿ¿é®¿Ú™'㟯]xú‰ˆ{•=Õ~Dcƒ[ND ú(Ó¨€ù£Fñ72Î;Þn»a²Ýûø kÚ¼…Ý{ëõÎ òë—ó©Q÷? jUªQüz†Ÿ²Ž;mˆÝñÐßÝÈáD|J{Ö°cÝ—/Ô¨-øb‡u5jØH7d¿fÕ×¥ZÃlߺ½ô\×ù!¥ºÿÕiÔ«è°|ëôª%¾ÆqEëìLz‰Ó ~K—µe‹û¯T£{ü ¨QwC£†î¬Q7Üñ€Ó(j {úr2èaoÂÈÓÏq+ÊÑtt½S¶„Ùâ7ñJ›ýú‹n:ÜMw?ä>›;û {ô¹7ñã+ÇàÅ*Dë÷H{îíùXXöŒ{ÉŸziŽûaÑ.=³·~ióæ¾ƒÕ áeml£÷ÏnI‚1­aî˯¿Ý½Ä!t³CG`N¿¥Ô¹›ýýåwìU,¡±r²ÇϲpÄàNTÈzø^žç±tÿãÝ/Ñ1< ŸÉµE+žÃî %˜_ÇJXNÐüý9v`»ö6ëõ\ùŸxþŸÖ å¡ûÃ¥Wà“»ƒÝX&튀Dƒzºeó¢FQ.œ8ÙÞ¦Fá³×tJn¤Fa Èê±™Ð(|êFã_®FÁˆr›Åß̘â/YzbƒŸSq“Â5 ñØóïxH7›₵2´XªQC©Qí;–jÔ¡ÐQ»;‚ÖqÝO@£ ìqhÔaÐ(Õ½d’4*ä=ô#!Q{ ò¿ a:DÿÜK¯¼¡C.‰n>/XMv¬ ÚÙqU:‡‡œ‘ž2i¼[­Ùß{²7ï~àÅ ¹¡n?\Ä<8tM.¬t<ŸiÝ\âáŽãzl©rØÉ»ð2ð\.´ã Î0¿§ñæ°[µŒ =‡ûtŒ »HüÇ8–‰× //ã}y}þ¼š¸%ƒôôôâÍz#qây§üسϱƒ–/úðkÜ kÕ_M|¨»/óNuþ]~î„«¦ÄFQ“n˜t‘Ä: ~lj¢FñW5SҨݿ°^£Þ›õfâ„óFÿ:¾2¥zçP£Xv¿œLÃÇ9Ÿú ¹ál.*¡A¤‘¥ Õb´H†’qlÓ¶z£ÊV'Ü÷ǹ œÞpIÜ,¯ã>WÆÓù|Ã˺v'á?Æñ\o¼}¾,/ÝžÊãé?ýN`Wõ5¶L£°À¬>~øŠ Ì¢«Q¡piÔþ{EdÐ÷’µ7~4êã'ýÉ s³wÚ“ dÅÞrÀ`rß¿Ìþ2~?ð9X gííiËs}eöùìéœ=÷ùD:ß=]WÇE@"K€u™zÄÑDiTdÙÖ”ÜdÐ+ñ¤¸˜„ð?yE2 ‰Wä ¥½! ÚJ±—F½Ï”?Ùê{¶•8]§ˆ€ˆÀ>% Ú§x«mæe«°ªm«_ÁdÌ«ß3Q‰D@ÊH£ÊXÄSH=žž¶îUD@D f È Çì£Õ‰€ˆ€ÄôxzÚºW˜% ƒ³V7&" "OdÐãéië^E@D@b–€ zÌ>Zݘˆ€ˆ@<A§§­{ˆY2è1ûhuc" " ñD@=žž¶îUD@D f È Çì£Õ‰€ˆ€Ä*ÿ–;ÿHI¨'xº×šA€Ù.ðŽÖŒòª”&€¿J,Š0SeQ¥eåÿ í½¹`U zqRR²¥¥g§¦¦á¯á¯òʉ@õ"@1OMO-NIIáˆT1þ¦}ÕjMõº=•f÷ QIÒ¨Ý3ªÔQT+þd¼êR¥èí|5* •œШîý^U zÆßksg½‘œâ z± úÞ³WÊýDcHÆŠ²bÉ"^1sËú_’öÓ¥u™èH—F훇@KŽœúpÀ®QY6Tj:¼J#£V­+wdgÿ ÷“ _©D€…²½!PŒD™™µîÈÉ>áßàùþ«‡±ê¤Qûìɲ>±CX_%;²ÏJXó2v•žYkQnNö9(~…5ª² aRÝ&MÚ·k×û©5_5*qrrqQbbbI~¾«$Õ¨d±S¶zW¯þz=î¨Â%v(ÄÍH£öÁ£.).IHKO(Èúm[ãß6þú§z ßÕ vÝ y%%) ‰ jW‘y45ª²*Þrlž^§NýQ™µkOˆÍ»«vw¥w·Ú=’}R =ç}‚Õ z5"--=§výúöÑ%â=ÛJ½»U™CN¡h¸¥ ožhE99ÛFc…É¡Èë)øx>ÁÈE–ß[õ$"Ë´ºæ&Šì“¡^qˆ=qÇŽí@¯2r·oŽý÷àS‚ǰ‘«"JkTU :Ë\é Wñ†cétoÔ¹a¼7â¬8ä+'"PyҨʳ ?Ó­“Â×"}°*{hðàlÂo†w_‘㵉-d‹ôr.IîçQE‹€TÅÅÅ¡wž £ÎNGïäääÁ’ùÎIõ(h–B$ºnYD@*HÀõ¾ÓÒÒ†1Îï¦áJæÖ÷Öýè"ãä¢@@= ÐuI¨‰ŠŠŠ8wÞ,Xvg?°? ûð´òê¥áDc#ƒ 꺦ˆ€Ô®wŽâã=½söĹp—?©[ßÃî}¹'ƒà•ÿ«º(.*…ÖEE@D@ö¿87óçרgáÊGÁ_?þCôŸ ÔB^Bˆ–“Ay]WD@j?”¾Cîo±ÈXéΞy.‚ `Èÿ4æì{ãÏdrû™€†Ü÷3p]ND@j o¨ù½9‡Ú3±IÀ–sçtüû>‹ÐûŸ€ úþg®+Š€ˆ@M%ÀOÕèüŠvoÄý6pTÿG…€ zT°ë¢" " "Y2è‘å©ÜD@D@D *dУ‚]ÈA,Oå&" " Q! ƒ캨ˆ€ˆ€D–€ zdy*7ˆ ô¨`×EE@D@D ²dÐ#ËS¹‰€ˆ€ˆ@TÈ G».*" " ‘% ƒYžÊMD@D@¢B@=*ØuQˆ,ôÈòTn" " "2èQÁ®‹Š€ˆ€ˆ@d èï¡G–§r«>ÔX­>Ï¢:•„L¬:=•%bdÐ#†RU3þÏ;V³b©8Õ€@Ê £^ „ŠY2è‘å©Üª ŒŒŒÖ;w®m1\.Î lÛ¶-á³Ï>[ [àeÔãü}ˆÅÛ—Aŧ¿÷Äaöâ´´´wìØñÈ’%KR°¯žXü¾¡wΛÌZµj}’}6›àeÔC )\ã È ×øG¨'——wXÏž=Û\wÝuÖ¸qc+((°„uÒÃ9ÅË~II‰¥¦¦ÚâÅ‹íª«®:¦M›6þðÃ2èñòÄÑ}Ê ÇÑÃŽ£[- !:thQ:udÉãèÁïæV9rC½ËnРA ún’êÔL2è5ó¹©Ô»'€ysð{" zQQ‘%&Æ×¢wöJéü}s¿¤qhÞ”7ZáÒ ?g÷ˆkÎQ¾ IIIn¤†HjNÉUR¨ôŠñÚŸ©Ù³Ôüo%‰ÓhyÃÄmyF¬’ÙW›Óh„ÃïqþÞYPŸ&!içÁ ïoÆçï×Ô­¿/¿ ¹„P°\bV.šèAþ3/Ah… ‡§Óþð¼üö?SÔÐod¿ùæ{â‰'¬°°ÐÒÓÓ #¶uëVËÍÍ5,ø² /¼Ð0Gl9996gΛ1c†mÚ´ÉhcÆŒ±¶mÛ:ï¼óŽýë_ÿrÆž#t½{÷¶þýû[óæÍKî@lý—–¡ïGh8¶îtßÞã†F’:û–s…r—A¯®}ž¸WØ¼Š¾£®8î€e2˯ø©5ã |†g½zõr‹¼Ö­[g'N´ÇÜÔo`…E…ΨÓÀ?Þ°šÛ&Ožl} «ÿmú´é6uêTÃ15j”ñû3J‡ìl#FŒ°yóæó$CÝÒÌknÀ­«@ñëüüóÏ7ƒËz4x¨ªc{¦‰x'rñnŒÓš ,~ã·OSË ïS¼{Ÿ9*ÆKHÝÛžÁ³4¸÷øJSb(š=ˆ¥1à"/Αû¡r¿{ÇáuÉÓhÓ˜û4\vÉ%—¸^;Ó2:¼onËÿØ(`/žÃ÷1èü&ƒIgÜkÜ»ÈUüA{ž ~3ñIèÒ`>¾â9ꌈAÊJgä*Dyrø7¼žJgÇ'&À åàþo€ØÜO¶qÅ“½ö•+WZÓ¦MÝkಷݤIçy€ñ›7o¶µk×ZJJŠáWÔìÅ_´iÓ¦¹aw¦?nbÅã~hÀ·€ÃE_|ñÅB„kÁkj«âO˜õŠ,óàÙ€æ‹"ƒÑv2èÑ~e×g¥ˆÉ®QÙ-î·…&.ÝÞaΫO™2ÅÍ¿³Wß¡C;á„láÂ…Ö¥KÇnoóª) ƒ÷S‚{g£.;°ÑÿU c^x‘>U=ÒD+Ÿ_Üõ&+j—gRXèÙc¬òÚe²ØŽä õ¾}ûÚÆÝrh†Œ=òï¿ÿÞ–.]jC† qCñ×^{­Mš4ɰHÌÍ—×®]ÛÍ­Ç6!KÀh˜×=nÝ"¯¿ç}y{ê™ïKºÌÛ¿Øìóе-ﮘœFNb˜€ z ?Üx¾5pÌ;÷ÃʱÄ#ÜïÍþ®8„ŸKŒü½øûNMMñQÚŠ@LAÉÇ÷7•„?j«W¯NÀ¬$pÈ9 WÜ?õr°‡Î…€k×­eŠDü® ”ÃJÑ5›€ zÍ~~*ý. wžµlÙ2;å”Sü7Ö»H¦¨8"€]× ·ž·jÕªíqtëºÕ8"ü‚5ŽîX·Ëø>—Ô‡Û²eËH„9¬ŸöŒå'¾÷÷Æé—TüQšoÐCŸµ÷§)¥ˆ€ˆ€ˆ€ˆ€ìGê¡ïGغÔ~#À÷Zïö~Ã]ã.¤Q›÷ÈT`=HÚc %ˆd’Ïm¸ cš’ðÚÕ¤P Šðe”ÄV”]U–òâ«zçû*ߪ–Kç‹€T»Ò$–Ž ¹L@=ô}÷ðXi|o»Qrrr¿ÄÄÄÅÅÅ[Ÿ¼,+PKø»;V™kéˆ(Ò†üª”””¯°¿áïá/^­6ÂËà{§¥¥uDÅZø¶ÁcÉØú|hìC[ÏŒÝ÷ ³Däuò:(˜Ghš`”6" ñNZt´b ¶`»Û/ᇹx½ñú®7¡û Ó‡ºÐ}æá÷CÃL¾š‡Â"Pm¸Š€ ògøu0ÔÃQ²zðuQyÆ#® 55õT–6X©0Œøþؤ3\Žsù–sŒÑ ‘ÇZäÙ3˜†9 ×ð‡>ŒƒNüâêÃ7BÜØß”‘‘ÑŠ Ëq{Òžæ7Ãå¥MÃtÞ•ïk»ü=ªÄa¾”2o•p¶7¾éó)((x§†ºšã8ÌUŸô]±]Ÿ‹^v‡¢¢¢Kn ÿòxÛ 4ÖëŒp6†ðÏÁ–Ã÷#ßEÈw¬ ×#݈[Œ0+Uè>våD@â€3˜ÐC¡5 )xЊ+¡ М:Á¸&Гñ÷‚VýŒðyyyß`¿:#ƒGÛÁíWÈk ΟŽ}æ_‚ÌiØ#¯—ça êÝG¸æcØßŽüú!®)ÎíßçOFüxé TÖž\d 8¦x©A¶%xQg³gë˜ÇñRß„øGfåÁûœ‹JÒ/86ã¡2¼ˆø÷4ö{ <­¡2¶GüÓðçcwŽÓ€Ï„gåX‹-÷¯0öÛ±•OÀ5ì¡Ï"¢4å]ÜËà{c?š41??%™86 ÛÔhItçì·D>á¾ÇÖcÛþzè;#\3Téÿú—Œ{érà©Q§âZÔ=º#Pްåµ7b>?ƒ‘r"PÝøa­‹ñò®Aá8ÔNçZÇÁ­3úsý;ø#Ð#?•( qõ°½~ÂÞe"Íר$g#~üzT–nÁƒµpl5ârŸùq>>x,%¸ÕFD@HÀétâHhÆëÔxÎ¥ }ሟa{:ö×!èG9ø.ü=ˆã´ÞHs&ÓÒa.üŸžËFµè9Ä¿È0]Pã~B|øqð«ÝÈ,ÓÇà®6•! !÷ÊPÛ‹sÐúÜŠVi’Ö‚§¡¦sCRئÂse{¨óÇêâ\®>m‡Ê0 2á·cŸCøíþÛuhI³uLÇkäºP wŸŒÞ}Sì ¯¡ö mD@÷å zã ±w2<;½ )4ÐOÂÈrXS‚ÿ„Ùsæh_wøÍè¡g`„q#ÒAD-!áU¤É0zç#~“al[àXäÃQÊt¤§æ5D¿%Ò%ã8 ÿ&x¹AÈl\…Á »/p"Z¬Gaû޳çN[‚ü6¼èP©Æ…œÇ Ï-„§qŸ<.ÇËßióðò×BEZ‰üúaŸÇý³cØ;Ö°bæ¼¼œˆ€xÔ êK*Œöß ÿD§€; º2[ö²‚ΠƱ,ø¯w5<é">Úó ôˆžùøQFƒŽ½€s/ÀñÑH×Çü°z2ÒÿÇþ l‚Þ˜#è÷™G+¼j÷ùRéx%@#L=`c?Úôè¯s0ºG#ÐÚ±Û…Ø6‡q^}ü'_Œsކžq4Ðë Ï¥ ùéßGšG^Íúˆ°ÿ|W,¦ûqóæµÿÏyw–'4ìÊU•@¸a¨j~:?@€/«¡%:àI¼ìl¥r(‹/p'ø©¨$b[ /ùVl]ÏéÜ:Ž=‚ôÇÃ/B+B_¤áJÒÅh´F\6öýp:¯åÀ1~9ÒÏDº ¸þØçÈ@`l 9¸%@ƒÎ…ºW@[8ô=ÍA2Úaÿ5hÆ?á‹ÿtæuèÈ{8Ö átåë°ŸDýAœ×7òˆý—‘ÏEØÎÂÖÃunF>3à?Â9ËáOÀñwpœ‹wYÿ[ÊE‚€zp‘ ¸ë<\åá!¼Ðý±9,X >À‹¾$x %…ŠÂOÕX‰ú ¼aæÔá8§3*ç«hœYQš#][¤cyð‰Á<Ø`ø¾5zòCpÞôð?Ã~i9–ˆoìQ;ƒ Ý8ážðÔ~R6ÛR‡ãý°s´äh 6;\ÈÛ û_ ÌΈח Ä÷@ü—ˆcÇÄ_'#£ÑXh¸Op¹ØVµ·‡¦ÕEúÐÅ¿<$'Õ–_ö]9Æ—wŒéË› )/Þ_#<Ïð}ŸN[ø%Pž.0Þû]ÑÙ“þ„ŸS^úò®~¾ö+H@`+¬’Éùb{Ö"÷ÃUÌŽÇü~hØW,nyŽ÷>ÞŸƒC.Ðã>ÆÉ‰€ˆ@8¯#ÜÒQ+B5…q¡ºÅc^O¼¾0M¨c¼×!ÏüOz ýðkRêˆÿ‡Tv(ªÅgžIEND®B`‚ola-0.10.9/doxygen/Makefile.mk0000664000175000017500000000067214376533110013032 00000000000000include doxygen/examples/Makefile.mk EXTRA_DIST += \ doxygen/copy-doc.sh \ doxygen/cpp-client.dox \ doxygen/dmx-cpp-client.dox \ doxygen/event-driven.dox \ doxygen/http.dox \ doxygen/json.dox \ doxygen/namespaces.dox \ doxygen/olad.dox \ doxygen/OLALayout.xml \ doxygen/OLA.png \ doxygen/overview.dox \ doxygen/rdm.dox \ doxygen/rpc.dox \ doxygen/rpc-message.png \ doxygen/rpc.png ola-0.10.9/doxygen/namespaces.dox0000664000175000017500000000577514376533110013630 00000000000000/** * @namespace ola * @brief The namespace containing all OLA symbols. * * @namespace ola::acn * @brief ACN related code. * * @namespace ola::client * @brief OLA C++ API * * @namespace ola::dmx * @brief DMX512 related code. * * @namespace ola::e133 * @brief E1.33 (RDMNet) * * @namespace ola::io * @brief Classes for general I/O and event handling. * * @namespace ola::http * @brief The embedded HTTP server. * * @namespace ola::math * @brief Math helper functions. * * @namespace ola::messaging * @brief A framework for serializing simple message structures. * * @namespace ola::network * @brief Code for network communication. * * @namespace ola::plugin * @brief Code for supported devices and protocols. * * @namespace ola::plugin::artnet * @brief The ArtNet plugin. * * @namespace ola::plugin::dmx4linux * @brief Code for DMX4Linux devices. * * @namespace ola::plugin::dummy * @brief The Dummy plugin. * * @namespace ola::plugin::e131 * @brief The E1.31 (sACN) plugin. * * @namespace ola::plugin::espnet * @brief Code for the ESPNet protocol. * * @namespace ola::plugin::ftdidmx * @brief Code for FTDI devices. * * @namespace ola::plugin::gpio * @brief The General Purpose digital I/O Plugin. * * @namespace ola::plugin::karate * @brief Code for Karate devices. * * @namespace ola::plugin::kinet * @brief Code for the Kinet protocol. * * @namespace ola::plugin::milinst * @brief Code for Milford Instruments devices. * * @namespace ola::plugin::opendmx * @brief Code for the Enttec OpenDMX. * * @namespace ola::plugin::openpixelcontrol * @brief The Open Pixel Control (OPC) plugin. * * @namespace ola::plugin::osc * @brief Code for the OSC protocol. * * @namespace ola::plugin::pathport * @brief Code for the Pathport protocol. * * @namespace ola::plugin::renard * @brief Code for Renard devices. * * @namespace ola::plugin::sandnet * @brief Code for the SandNet protocol. * * @namespace ola::plugin::shownet * @brief Code for the Strand ShowNet protocol. * * @namespace ola::plugin::spi * @brief Code for SPI devices. * * @namespace ola::plugin::stageprofi * @brief Code for Stageprofi devices. * * @namespace ola::plugin::uartdmx * @brief Code for UART DMX devices. * * @namespace ola::plugin::usbdmx * @brief The plugin for hardware using libusb. * * @namespace ola::plugin::usbdmx::jarule * @brief Ja Rule code. * * @namespace ola::plugin::usbpro * @brief Code for Enttec USB Pro devices and others using the same protocol. * * @namespace ola::rdm * @brief PLASA E1.20 Remote %Device Management * * @namespace ola::rpc * @brief The RPC (Remote Procedure Call) system * * @namespace ola::stl * @brief STL Helper functions. * * @namespace ola::testing * @brief Code used for unit testing. * * @namespace ola::thread * @brief Threads and synchronization mechanisms. * * @namespace ola::timecode * @brief Timecode * * @namespace ola::web * @brief Classes to deal with web services. * * @namespace ola::usb * @brief USB Device drivers. */ ola-0.10.9/doxygen/olad.dox0000664000175000017500000000017114376533110012411 00000000000000/** * * @defgroup olad OLA Internals * @brief This group holds code specific to how the internals of OLA work. * */ ola-0.10.9/doxygen/event-driven.dox0000664000175000017500000001163614376533110014110 00000000000000/** * @page event_driven OLA & Event Driven Programming * * [TOC] * * @section event_Overview Overview * * This page describes event driven programming and how OLA uses it. It also * provides pointers on how OLA's event driven model can be used with other * event driven frameworks. * * @section event_Background Background * * [Event Driven * Programming](http://en.wikipedia.org/wiki/Event-driven_programming) is a * programming style where actions within the program are triggered by various * events. Event driven programs typically have a main event loop which then * executes the required handlers when events occur. * * The simplest event loop may look something like: ~~~~~~~~~~~~~~~~~~~~~ while ((c = getchar()) != EOF) { switch (c) { case 'q': printf("'q' was pressed\n"); break; default: printf("Something other than 'q' was pressed\n"); } } ~~~~~~~~~~~~~~~~~~~~~ * * While this works for key-presses, it doesn't support any other type of I/O * event. To support more generic types of events, the * [select()](http://linux.die.net/man/2/select) call (or a variant thereof) is * often used. * * Event driven frameworks allow the programmer to register to * receive notifications of certain events. Notifications are usually delivered * by executing a callback function. For example, for a timer event, the code * may look like: ~~~~~~~~~~~~~~~~~~~~~ app.RunAfter(1000, TimerFunction); ~~~~~~~~~~~~~~~~~~~~~ * * Usually after any initialization is performed, the application gives up * control to the main event loop. This is usually done with a call to Run(): ~~~~~~~~~~~~~~~~~~~~~ app.Run(); ~~~~~~~~~~~~~~~~~~~~~ * * The Run() call will only return when the application shuts down. * * While this appears limiting at first, the method is in fact very powerful. * Event driven programming allows the programmer to focus on writing code to * handle the events, rather than determining what action to take next. * * A caveat however that is that callbacks triggered by events can't block. * Doing so prevents control returning to the main event loop and will starve * other event notifications. Typical approaches are to either use * non-blocking I/O or perform blocking I/O in a separate thread. * * @section event_OLA OLA Event Management * * In OLA, there are two main types of events: * - Timer events, which trigger after a certain time interval. * - I/O events, which trigger when a network packet arrives, a device has new * data or some other I/O occurs. * * @subsection event_CPlusPlus C++ * * The ola::io::SelectServer is the core of OLA's event driven system. It * invokes \ref callbacks when events occur. * * For the OLA Client, the ola::OlaClientWrapper class encapsulates the * SelectServer behind an easy to use interface. This is described in the @ref * dmx_cpp_client_tutorial. * * @subsection event_Python Python * * The Python classes are similar to the C++ ones. The ola.ClientWrapper module * provides a basic SelectServer class. * * As the in C++ clase, the ola.ClientWrapper.ClientWrapper class encapsulates * this all so in the basic case you can just call: ~~~~~~~~~~~~~~~~~~~~~ from ola.ClientWrapper import ClientWrapper wrapper = ClientWrapper() wrapper.Run() # event loop is running ~~~~~~~~~~~~~~~~~~~~~ * * @section event_Integration Integration with other frameworks * * This section is for those who want to use the OLA client within another * event management framework. The OLA client code does not use timers so the * only events you need to handle are socket I/O. * * There are two main approaches. For frameworks that allow file descriptors to * be added to the main event loop, one can simply add the file descriptor for * the OLA server and call the appropriate read/write methods when the event * triggers. * * For frameworks that do not support raw file descriptor access the best * solution is to run the OLA client in a \ref cpp_client_Thread * "separate thread" and use a callback queue to pass control between the * threads. * * The OLA clients are not thread safe, and must only be accessed from the * thread in which the event loop is running. * * @subsection event_GLib Integration with GLib * * [GLib](https://developer.gnome.org/glib/stable/) has a * [g_source_add_unix_fd](https://developer.gnome.org/glib/stable/glib-The-Main-Event-Loop.html#g-source-add-unix-fd) * function. * * @subsection event_QT Integration with QT * * [Qt](http://qt-project.org/) provides a * [QSocketNotifier](http://qt-project.org/doc/qt-4.8/qsocketnotifier.html) * which allows the OLA socket to be added to Qt's main loop. * * @subsection event_kivy Integration with Kivy * * See https://github.com/jesseanderson/ola-rpiui for an example. * * @subsection event_pygame Integration with PyGame * * See [Example](https://groups.google.com/d/msg/open-lighting/hBq00uYXioA/zpG88fjJFDAJ) */ ola-0.10.9/COPYING0000664000175000017500000006350414376533110010345 00000000000000 GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 Copyright (C) 1991, 1999 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. [This is the first released version of the Lesser GPL. It also counts as the successor of the GNU Library Public License, version 2, hence the version number 2.1.] Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public Licenses are intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This license, the Lesser General Public License, applies to some specially designated software packages--typically libraries--of the Free Software Foundation and other authors who decide to use it. You can use it too, but we suggest you first think carefully about whether this license or the ordinary General Public License is the better strategy to use in any particular case, based on the explanations below. When we speak of free software, we are referring to freedom of use, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish); that you receive source code or can get it if you want it; that you can change the software and use pieces of it in new free programs; and that you are informed that you can do these things. To protect your rights, we need to make restrictions that forbid distributors to deny you these rights or to ask you to surrender these rights. These restrictions translate to certain responsibilities for you if you distribute copies of the library or if you modify it. For example, if you distribute copies of the library, whether gratis or for a fee, you must give the recipients all the rights that we gave you. You must make sure that they, too, receive or can get the source code. If you link other code with the library, you must provide complete object files to the recipients, so that they can relink them with the library after making changes to the library and recompiling it. And you must show them these terms so they know their rights. We protect your rights with a two-step method: (1) we copyright the library, and (2) we offer you this license, which gives you legal permission to copy, distribute and/or modify the library. To protect each distributor, we want to make it very clear that there is no warranty for the free library. Also, if the library is modified by someone else and passed on, the recipients should know that what they have is not the original version, so that the original author's reputation will not be affected by problems that might be introduced by others. Finally, software patents pose a constant threat to the existence of any free program. We wish to make sure that a company cannot effectively restrict the users of a free program by obtaining a restrictive license from a patent holder. Therefore, we insist that any patent license obtained for a version of the library must be consistent with the full freedom of use specified in this license. Most GNU software, including some libraries, is covered by the ordinary GNU General Public License. This license, the GNU Lesser General Public License, applies to certain designated libraries, and is quite different from the ordinary General Public License. We use this license for certain libraries in order to permit linking those libraries into non-free programs. When a program is linked with a library, whether statically or using a shared library, the combination of the two is legally speaking a combined work, a derivative of the original library. The ordinary General Public License therefore permits such linking only if the entire combination fits its criteria of freedom. The Lesser General Public License permits more lax criteria for linking other code with the library. We call this license the "Lesser" General Public License because it does Less to protect the user's freedom than the ordinary General Public License. It also provides other free software developers Less of an advantage over competing non-free programs. These disadvantages are the reason we use the ordinary General Public License for many libraries. However, the Lesser license provides advantages in certain special circumstances. For example, on rare occasions, there may be a special need to encourage the widest possible use of a certain library, so that it becomes a de-facto standard. To achieve this, non-free programs must be allowed to use the library. A more frequent case is that a free library does the same job as widely used non-free libraries. In this case, there is little to gain by limiting the free library to free software only, so we use the Lesser General Public License. In other cases, permission to use a particular library in non-free programs enables a greater number of people to use a large body of free software. For example, permission to use the GNU C Library in non-free programs enables many more people to use the whole GNU operating system, as well as its variant, the GNU/Linux operating system. Although the Lesser General Public License is Less protective of the users' freedom, it does ensure that the user of a program that is linked with the Library has the freedom and the wherewithal to run that program using a modified version of the Library. The precise terms and conditions for copying, distribution and modification follow. Pay close attention to the difference between a "work based on the library" and a "work that uses the library". The former contains code derived from the library, whereas the latter must be combined with the library in order to run. GNU LESSER GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License Agreement applies to any software library or other program which contains a notice placed by the copyright holder or other authorized party saying it may be distributed under the terms of this Lesser General Public License (also called "this License"). Each licensee is addressed as "you". A "library" means a collection of software functions and/or data prepared so as to be conveniently linked with application programs (which use some of those functions and data) to form executables. The "Library", below, refers to any such software library or work which has been distributed under these terms. A "work based on the Library" means either the Library or any derivative work under copyright law: that is to say, a work containing the Library or a portion of it, either verbatim or with modifications and/or translated straightforwardly into another language. (Hereinafter, translation is included without limitation in the term "modification".) "Source code" for a work means the preferred form of the work for making modifications to it. For a library, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the library. Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running a program using the Library is not restricted, and output from such a program is covered only if its contents constitute a work based on the Library (independent of the use of the Library in a tool for writing it). Whether that is true depends on what the Library does and what the program that uses the Library does. 1. You may copy and distribute verbatim copies of the Library's complete source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and distribute a copy of this License along with the Library. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Library or any portion of it, thus forming a work based on the Library, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) The modified work must itself be a software library. b) You must cause the files modified to carry prominent notices stating that you changed the files and the date of any change. c) You must cause the whole of the work to be licensed at no charge to all third parties under the terms of this License. d) If a facility in the modified Library refers to a function or a table of data to be supplied by an application program that uses the facility, other than as an argument passed when the facility is invoked, then you must make a good faith effort to ensure that, in the event an application does not supply such function or table, the facility still operates, and performs whatever part of its purpose remains meaningful. (For example, a function in a library to compute square roots has a purpose that is entirely well-defined independent of the application. Therefore, Subsection 2d requires that any application-supplied function or table used by this function must be optional: if the application does not supply it, the square root function must still compute square roots.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Library, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Library, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Library. In addition, mere aggregation of another work not based on the Library with the Library (or with a work based on the Library) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may opt to apply the terms of the ordinary GNU General Public License instead of this License to a given copy of the Library. To do this, you must alter all the notices that refer to this License, so that they refer to the ordinary GNU General Public License, version 2, instead of to this License. (If a newer version than version 2 of the ordinary GNU General Public License has appeared, then you can specify that version instead if you wish.) Do not make any other change in these notices. Once this change is made in a given copy, it is irreversible for that copy, so the ordinary GNU General Public License applies to all subsequent copies and derivative works made from that copy. This option is useful when you wish to copy part of the code of the Library into a program that is not a library. 4. You may copy and distribute the Library (or a portion or derivative of it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange. If distribution of object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place satisfies the requirement to distribute the source code, even though third parties are not compelled to copy the source along with the object code. 5. A program that contains no derivative of any portion of the Library, but is designed to work with the Library by being compiled or linked with it, is called a "work that uses the Library". Such a work, in isolation, is not a derivative work of the Library, and therefore falls outside the scope of this License. However, linking a "work that uses the Library" with the Library creates an executable that is a derivative of the Library (because it contains portions of the Library), rather than a "work that uses the library". The executable is therefore covered by this License. Section 6 states terms for distribution of such executables. When a "work that uses the Library" uses material from a header file that is part of the Library, the object code for the work may be a derivative work of the Library even though the source code is not. Whether this is true is especially significant if the work can be linked without the Library, or if the work is itself a library. The threshold for this to be true is not precisely defined by law. If such an object file uses only numerical parameters, data structure layouts and accessors, and small macros and small inline functions (ten lines or less in length), then the use of the object file is unrestricted, regardless of whether it is legally a derivative work. (Executables containing this object code plus portions of the Library will still fall under Section 6.) Otherwise, if the work is a derivative of the Library, you may distribute the object code for the work under the terms of Section 6. Any executables containing that work also fall under Section 6, whether or not they are linked directly with the Library itself. 6. As an exception to the Sections above, you may also combine or link a "work that uses the Library" with the Library to produce a work containing portions of the Library, and distribute that work under terms of your choice, provided that the terms permit modification of the work for the customer's own use and reverse engineering for debugging such modifications. You must give prominent notice with each copy of the work that the Library is used in it and that the Library and its use are covered by this License. You must supply a copy of this License. If the work during execution displays copyright notices, you must include the copyright notice for the Library among them, as well as a reference directing the user to the copy of this License. Also, you must do one of these things: a) Accompany the work with the complete corresponding machine-readable source code for the Library including whatever changes were used in the work (which must be distributed under Sections 1 and 2 above); and, if the work is an executable linked with the Library, with the complete machine-readable "work that uses the Library", as object code and/or source code, so that the user can modify the Library and then relink to produce a modified executable containing the modified Library. (It is understood that the user who changes the contents of definitions files in the Library will not necessarily be able to recompile the application to use the modified definitions.) b) Use a suitable shared library mechanism for linking with the Library. A suitable mechanism is one that (1) uses at run time a copy of the library already present on the user's computer system, rather than copying library functions into the executable, and (2) will operate properly with a modified version of the library, if the user installs one, as long as the modified version is interface-compatible with the version that the work was made with. c) Accompany the work with a written offer, valid for at least three years, to give the same user the materials specified in Subsection 6a, above, for a charge no more than the cost of performing this distribution. d) If distribution of the work is made by offering access to copy from a designated place, offer equivalent access to copy the above specified materials from the same place. e) Verify that the user has already received a copy of these materials or that you have already sent this user a copy. For an executable, the required form of the "work that uses the Library" must include any data and utility programs needed for reproducing the executable from it. However, as a special exception, the materials to be distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. It may happen that this requirement contradicts the license restrictions of other proprietary libraries that do not normally accompany the operating system. Such a contradiction means you cannot use both them and the Library together in an executable that you distribute. 7. You may place library facilities that are a work based on the Library side-by-side in a single library together with other library facilities not covered by this License, and distribute such a combined library, provided that the separate distribution of the work based on the Library and of the other library facilities is otherwise permitted, and provided that you do these two things: a) Accompany the combined library with a copy of the same work based on the Library, uncombined with any other library facilities. This must be distributed under the terms of the Sections above. b) Give prominent notice with the combined library of the fact that part of it is a work based on the Library, and explaining where to find the accompanying uncombined form of the same work. 8. You may not copy, modify, sublicense, link with, or distribute the Library except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense, link with, or distribute the Library is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 9. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Library or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Library (or any work based on the Library), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Library or works based on it. 10. Each time you redistribute the Library (or any work based on the Library), the recipient automatically receives a license from the original licensor to copy, distribute, link with or modify the Library subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties with this License. 11. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Library at all. For example, if a patent license would not permit royalty-free redistribution of the Library by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Library. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply, and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 12. If the distribution and/or use of the Library is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Library under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 13. The Free Software Foundation may publish revised and/or new versions of the Lesser General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Library specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Library does not specify a license version number, you may choose any version ever published by the Free Software Foundation. 14. If you wish to incorporate parts of the Library into other free programs whose distribution conditions are incompatible with these, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Libraries If you develop a new library, and you want it to be of the greatest possible use to the public, we recommend making it free software that everyone can redistribute and change. You can do so by permitting redistribution under these terms (or, alternatively, under the terms of the ordinary General Public License). To apply these terms, attach the following notices to the library. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or (at your option) any later version. This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the library, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the library `Frob' (a library for tweaking knobs) written by James Random Hacker. , 1 April 1990 Ty Coon, President of Vice That's all there is to it! ola-0.10.9/README.debian0000664000175000017500000000046314376533110011406 00000000000000 If you extracted a tarball you should be able to run $ debuild in the top level directory to create a set of .debs If you're building from the git repo do the following: $ autoreconf -i $ ./configure $ make dist $ cp ola-0.X.Y.tar.gz /tmp $ cd /tmp $ tar -zxf ola-0.X.Y.tar.gz $ cd ola-0.X.Y $ debuild ola-0.10.9/Makefile.in0000664000175000017500000577334014376533151011377 00000000000000# Makefile.in generated by automake 1.15 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2014 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ # Copyright (C) 2004 Oren Ben-Kiki # This file is distributed under the same terms as the Automake macro files. # Generate automatic documentation using Doxygen. Goals and variables values # are controlled by the various DX_COND_??? conditionals set by autoconf. # # The provided goals are: # doxygen-doc: Generate all doxygen documentation. # doxygen-run: Run doxygen, which will generate some of the documentation # (HTML, CHM, CHI, MAN, RTF, XML) but will not do the post # processing required for the rest of it (PS, PDF, and some MAN). # doxygen-man: Rename some doxygen generated man pages. # doxygen-ps: Generate doxygen PostScript documentation. # doxygen-pdf: Generate doxygen PDF documentation. # # Note that by default these are not integrated into the automake goals. If # doxygen is used to generate man pages, you can achieve this integration by # setting man3_MANS to the list of man pages generated and then adding the # dependency: # # $(man3_MANS): doxygen-doc # # This will cause make to run doxygen and generate all the documentation. # # The following variable is intended for use in Makefile.am: # # DX_CLEANFILES = everything to clean. # # This is usually added to MOSTLYCLEANFILES. # Note: gcc 4.6.1 is pretty strict about library ordering. Libraries need to be # specified in the order they are used. i.e. a library should depend on things # to the right, not the left. # See http://www.network-theory.co.uk/docs/gccintro/gccintro_18.html # This file is included directly in Makefile.am rather than via # olad/Makefile.mk due to the order of dependencies between them; we need to # build olad/plugin_api, then the plugins, then olad # OLA Python client # ola python client VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ false; \ elif test -n '$(MAKE_HOST)'; then \ true; \ elif test -n '$(MAKE_VERSION)' && test -n '$(CURDIR)'; then \ true; \ else \ false; \ fi; \ } am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ # The generated protobuf files don't compile with -Werror on win32 so we # disable fatal warnings on WIN32. @FATAL_WARNINGS_TRUE@@USING_WIN32_FALSE@am__append_1 = -Werror @FATAL_WARNINGS_TRUE@@USING_WIN32_FALSE@am__append_2 = -Werror -Wno-error=unused-parameter \ @FATAL_WARNINGS_TRUE@@USING_WIN32_FALSE@ -Wno-error=deprecated-declarations \ @FATAL_WARNINGS_TRUE@@USING_WIN32_FALSE@ -Wno-error=sign-compare @FATAL_WARNINGS_TRUE@@USING_WIN32_FALSE@am__append_3 = -Werror @FATAL_WARNINGS_TRUE@@USING_WIN32_FALSE@am__append_4 = -Werror -Wno-error=unused-parameter \ @FATAL_WARNINGS_TRUE@@USING_WIN32_FALSE@ -Wno-error=deprecated-declarations @FATAL_WARNINGS_TRUE@@GNU_PLUS_PLUS_11_DEPRECATIONS_TRUE@@USING_WIN32_FALSE@am__append_5 = -Wno-error=deprecated-declarations @FATAL_WARNINGS_TRUE@@GNU_PLUS_PLUS_11_DEPRECATIONS_TRUE@@USING_WIN32_FALSE@am__append_6 = -Wno-error=deprecated-declarations # Due to MinGW's handling of library archives, we need to append this. @USING_WIN32_TRUE@am__append_7 = $(CPPUNIT_LIBS) bin_PROGRAMS = $(am__EXEEXT_1) $(am__EXEEXT_2) $(am__EXEEXT_3) \ $(am__EXEEXT_4) $(am__EXEEXT_5) olad/olad$(EXEEXT) \ $(am__EXEEXT_6) $(am__EXEEXT_7) \ tools/ola_trigger/ola_trigger$(EXEEXT) $(am__EXEEXT_8) check_PROGRAMS = $(am__EXEEXT_20) noinst_PROGRAMS = $(am__EXEEXT_21) $(am__EXEEXT_22) $(am__EXEEXT_23) \ libs/acn/e131_transmit_test$(EXEEXT) \ libs/acn/e131_loadtest$(EXEEXT) $(am__EXEEXT_24) \ $(am__EXEEXT_25) $(am__EXEEXT_26) # ------------------------------------------ @USING_WIN32_TRUE@am__append_8 = -lWs2_32 -lIphlpapi # LIBRARIES ################################################## @HAVE_LIBMICROHTTPD_TRUE@am__append_9 = common/http/libolahttp.la @USING_WIN32_TRUE@am__append_10 = \ @USING_WIN32_TRUE@ common/io/WindowsPoller.cpp \ @USING_WIN32_TRUE@ common/io/WindowsPoller.h @USING_WIN32_FALSE@am__append_11 = \ @USING_WIN32_FALSE@ common/io/SelectPoller.cpp \ @USING_WIN32_FALSE@ common/io/SelectPoller.h @HAVE_EPOLL_TRUE@am__append_12 = \ @HAVE_EPOLL_TRUE@ common/io/EPoller.h \ @HAVE_EPOLL_TRUE@ common/io/EPoller.cpp @HAVE_KQUEUE_TRUE@am__append_13 = \ @HAVE_KQUEUE_TRUE@ common/io/KQueuePoller.h \ @HAVE_KQUEUE_TRUE@ common/io/KQueuePoller.cpp @USING_WIN32_TRUE@am__append_14 = \ @USING_WIN32_TRUE@ common/network/WindowsInterfacePicker.h \ @USING_WIN32_TRUE@ common/network/WindowsInterfacePicker.cpp @USING_WIN32_FALSE@am__append_15 = \ @USING_WIN32_FALSE@ common/network/PosixInterfacePicker.h \ @USING_WIN32_FALSE@ common/network/PosixInterfacePicker.cpp # LIBRARIES ################################################## @BUILD_TESTS_TRUE@am__append_16 = common/testing/libolatesting.la \ @BUILD_TESTS_TRUE@ common/testing/libtestmain.la # TESTS ################################################ @BUILD_TESTS_TRUE@am__append_17 = data/rdm/PidDataTester @BUILD_PYTHON_LIBS_TRUE@@BUILD_TESTS_TRUE@am__append_18 = data/rdm/PidDataTest.sh @BUILD_EXAMPLES_TRUE@am__append_19 = \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/callback_client_transmit \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/client_disconnect \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/client_thread \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/fetch_plugins \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/flags \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/legacy_callback_client_transmit \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/legacy_receiver \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/legacy_streaming_client \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/receiver \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/stdin_handler \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/streaming_client \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/udp_server @BUILD_EXAMPLES_TRUE@@HAVE_DLOPEN_TRUE@am__append_20 = doxygen/examples/streaming_client_plugin # LIBRARIES ################################################## @BUILD_EXAMPLES_TRUE@am__append_21 = examples/libolaconfig.la # PROGRAMS ################################################## @BUILD_EXAMPLES_TRUE@am__append_22 = \ @BUILD_EXAMPLES_TRUE@ examples/ola_dev_info \ @BUILD_EXAMPLES_TRUE@ examples/ola_rdm_discover \ @BUILD_EXAMPLES_TRUE@ examples/ola_rdm_get \ @BUILD_EXAMPLES_TRUE@ examples/ola_recorder \ @BUILD_EXAMPLES_TRUE@ examples/ola_streaming_client \ @BUILD_EXAMPLES_TRUE@ examples/ola_timecode \ @BUILD_EXAMPLES_TRUE@ examples/ola_uni_stats @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@am__append_23 = examples/ola_e131 @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@am__append_24 = examples/ola_usbpro @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@am__append_25 = examples/ola_artnet @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_TRUE@am__append_26 = examples/ola_dmxconsole examples/ola_dmxmonitor @BUILD_EXAMPLES_TRUE@am__append_27 = examples/ola_throughput examples/ola_latency @BUILD_EXAMPLES_TRUE@am__append_28 = install-exec-hook-examples # TESTS_DATA ################################################## @BUILD_EXAMPLES_TRUE@am__append_29 = \ @BUILD_EXAMPLES_TRUE@ examples/testdata/dos_line_endings \ @BUILD_EXAMPLES_TRUE@ examples/testdata/multiple_unis \ @BUILD_EXAMPLES_TRUE@ examples/testdata/partial_frames \ @BUILD_EXAMPLES_TRUE@ examples/testdata/single_uni \ @BUILD_EXAMPLES_TRUE@ examples/testdata/trailing_timeout # TESTS ################################################## @BUILD_EXAMPLES_TRUE@am__append_30 = examples/RecorderVerifyTest.sh @BUILD_EXAMPLES_TRUE@am__append_31 = examples/RecorderVerifyTest.sh @INSTALL_ACN_TRUE@am__append_32 = \ @INSTALL_ACN_TRUE@ include/ola/acn/ACNPort.h \ @INSTALL_ACN_TRUE@ include/ola/acn/ACNVectors.h \ @INSTALL_ACN_TRUE@ include/ola/acn/CID.h # pkg-config ################################################## @INSTALL_E133_TRUE@am__append_33 = libs/acn/libolaacn.pc # LIBRARIES ################################################## @INSTALL_ACN_TRUE@am__append_34 = libs/acn/libolaacn.la @INSTALL_ACN_FALSE@am__append_35 = libs/acn/libolaacn.la # LIBRARIES ################################################## @USE_LIBUSB_TRUE@am__append_36 = libs/usb/libolausb.la # TESTS ################################################## @USE_LIBUSB_TRUE@am__append_37 = libs/usb/LibUsbThreadTester # LIBRARIES ################################################## # The OLA artnet plugin @USE_ARTNET_TRUE@am__append_38 = \ @USE_ARTNET_TRUE@ plugins/artnet/messages/libolaartnetconf.la \ @USE_ARTNET_TRUE@ plugins/artnet/libolaartnet.la @USE_ARTNET_TRUE@am__append_39 = plugins/artnet/messages/ArtNetConfigMessages.pb.cc \ @USE_ARTNET_TRUE@ plugins/artnet/messages/ArtNetConfigMessages.pb.h # LIBRARIES ################################################## # This is a library which isn't coupled to olad @USE_ARTNET_TRUE@am__append_40 = plugins/artnet/libolaartnetnode.la # PROGRAMS ################################################## @USE_ARTNET_TRUE@am__append_41 = plugins/artnet/artnet_loadtest # TESTS ################################################## @USE_ARTNET_TRUE@am__append_42 = plugins/artnet/ArtNetTester # LIBRARIES ################################################## @USE_DUMMY_TRUE@am__append_43 = plugins/dummy/liboladummy.la # TESTS ################################################## @USE_DUMMY_TRUE@am__append_44 = plugins/dummy/DummyPluginTester # LIBRARIES ################################################## @USE_ESPNET_TRUE@am__append_45 = plugins/espnet/libolaespnet.la # TESTS ################################################## @USE_ESPNET_TRUE@am__append_46 = plugins/espnet/EspNetTester # LIBRARIES ################################################## @USE_FTDI_TRUE@am__append_47 = plugins/ftdidmx/libolaftdidmx.la @HAVE_LIBFTDI1_TRUE@@USE_FTDI_TRUE@am__append_48 = $(libftdi1_LIBS) @HAVE_LIBFTDI1_FALSE@@USE_FTDI_TRUE@am__append_49 = $(libftdi0_LIBS) # LIBRARIES ################################################## @USE_GPIO_TRUE@am__append_50 = plugins/gpio/libolagpiocore.la \ @USE_GPIO_TRUE@ plugins/gpio/libolagpio.la # LIBRARIES ################################################## @USE_KARATE_TRUE@am__append_51 = plugins/karate/libolakarate.la # LIBRARIES ################################################## # This is a library which isn't coupled to olad @USE_KINET_TRUE@am__append_52 = plugins/kinet/libolakinetnode.la @USE_KINET_TRUE@am__append_53 = plugins/kinet/libolakinet.la # TESTS ################################################## @USE_KINET_TRUE@am__append_54 = plugins/kinet/KiNetTester # LIBRARIES ################################################## @USE_MILINST_TRUE@am__append_55 = plugins/milinst/libolamilinst.la # LIBRARIES ################################################## @USE_OPENDMX_TRUE@am__append_56 = plugins/opendmx/libolaopendmx.la # LIBRARIES ################################################## # This is a library which isn't coupled to olad @USE_OPENPIXELCONTROL_TRUE@am__append_57 = plugins/openpixelcontrol/libolaopc.la @USE_OPENPIXELCONTROL_TRUE@am__append_58 = plugins/openpixelcontrol/libolaopenpixelcontrol.la # TESTS ################################################## @USE_OPENPIXELCONTROL_TRUE@am__append_59 = \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCClientTester \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCServerTester # LIBRARIES ################################################## # This is a library which isn't coupled to olad @USE_OSC_TRUE@am__append_60 = plugins/osc/libolaoscnode.la @USE_OSC_TRUE@am__append_61 = plugins/osc/libolaosc.la # TESTS ################################################## @USE_OSC_TRUE@am__append_62 = plugins/osc/OSCTester # LIBRARIES ################################################## @USE_PATHPORT_TRUE@am__append_63 = plugins/pathport/libolapathport.la # LIBRARIES ################################################## @USE_RENARD_TRUE@am__append_64 = plugins/renard/libolarenard.la # LIBRARIES ################################################## @USE_SANDNET_TRUE@am__append_65 = plugins/sandnet/libolasandnet.la # LIBRARIES ################################################## @USE_SHOWNET_TRUE@am__append_66 = plugins/shownet/libolashownet.la # TESTS ################################################## @USE_SHOWNET_TRUE@am__append_67 = plugins/shownet/ShowNetTester # LIBRARIES ################################################## # This is a library which isn't coupled to olad @USE_SPI_TRUE@am__append_68 = plugins/spi/libolaspicore.la plugins/spi/libolaspi.la # TESTS ################################################## @USE_SPI_TRUE@am__append_69 = plugins/spi/SPITester # LIBRARIES ################################################## @USE_STAGEPROFI_TRUE@am__append_70 = plugins/stageprofi/libolastageprofi.la # LIBRARIES ################################################## @USE_LIBUSB_TRUE@am__append_71 = plugins/usbdmx/libolausbdmxwidget.la @USE_LIBUSB_TRUE@am__append_72 = plugins/usbdmx/libolausbdmx.la # The UsbPro plugin config messages. This needs to be available to client # programs. # The E1.31 plugin config messages. This needs to be available to client # programs. @USING_WIN32_FALSE@am__append_73 = plugins/usbpro/messages/UsbProConfigMessages.proto \ @USING_WIN32_FALSE@ plugins/e131/messages/E131ConfigMessages.proto # pkg-config ################################################## # pkg-config ################################################## @USING_WIN32_FALSE@am__append_74 = plugins/usbpro/messages/libolausbproconf.pc \ @USING_WIN32_FALSE@ plugins/e131/messages/libolae131conf.pc # LIBRARIES ################################################## @USING_WIN32_FALSE@am__append_75 = plugins/usbpro/messages/libolausbproconf.la @USING_WIN32_FALSE@am__append_76 = plugins/usbpro/messages/UsbProConfigMessages.pb.cc \ @USING_WIN32_FALSE@ plugins/usbpro/messages/UsbProConfigMessages.pb.h # LIBRARIES ################################################## # This is a library which isn't coupled to olad @USING_WIN32_FALSE@am__append_77 = plugins/usbpro/libolausbprowidget.la # The OLA USB Pro Plugin @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__append_78 = plugins/usbpro/libolausbpro.la # TESTS ################################################## @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__append_79 = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/ArduinoWidgetTester \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/BaseRobeWidgetTester \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/BaseUsbProWidgetTester \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/DmxTriWidgetTester \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/DmxterWidgetTester \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/EnttecUsbProWidgetTester \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/RobeWidgetDetectorTester \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/RobeWidgetTester \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UltraDMXProWidgetTester \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UsbProWidgetDetectorTester \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/WidgetDetectorThreadTester # LIBRARIES ################################################## @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@am__append_80 = plugins/dmx4linux/liboladmx4linux.la # LIBRARIES ################################################## # LIBRARIES ################################################## @USE_E131_TRUE@@USING_WIN32_FALSE@am__append_81 = plugins/e131/messages/libolae131conf.la \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/libolae131.la @USE_E131_TRUE@@USING_WIN32_FALSE@am__append_82 = plugins/e131/messages/E131ConfigMessages.pb.cc \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/messages/E131ConfigMessages.pb.h # LIBRARIES ################################################## @USE_UART_TRUE@@USING_WIN32_FALSE@am__append_83 = plugins/uartdmx/libolauartdmx.la @HAVE_DNSSD_TRUE@am__append_84 = olad/BonjourDiscoveryAgent.h \ @HAVE_DNSSD_TRUE@ olad/BonjourDiscoveryAgent.cpp @HAVE_AVAHI_TRUE@am__append_85 = olad/AvahiDiscoveryAgent.h olad/AvahiDiscoveryAgent.cpp @HAVE_AVAHI_TRUE@am__append_86 = $(avahi_LIBS) @HAVE_LIBMICROHTTPD_TRUE@am__append_87 = olad/HttpServerActions.cpp \ @HAVE_LIBMICROHTTPD_TRUE@ olad/OladHTTPServer.cpp \ @HAVE_LIBMICROHTTPD_TRUE@ olad/RDMHTTPModule.cpp @HAVE_LIBMICROHTTPD_TRUE@am__append_88 = common/http/libolahttp.la # Programs ######################### @BUILD_OLA_PROTOC_PLUGIN_TRUE@am__append_89 = protoc/ola_protoc_plugin @BUILD_PYTHON_LIBS_TRUE@am__append_90 = python/ola/rpc/Rpc_pb2.py \ @BUILD_PYTHON_LIBS_TRUE@ $(output_files) # TESTS ################################################## @BUILD_PYTHON_LIBS_TRUE@am__append_91 = python/ola/rpc/SimpleRpcControllerTest.sh \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/DUBDecoderTest.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/ClientWrapperTest.sh \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/MACAddressTest.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/OlaClientTest.sh \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/PidStoreTest.sh \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/RDMTest.sh \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/StringUtilsTest.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/UIDTest.py \ @BUILD_PYTHON_LIBS_TRUE@ python/PyCompileTest.sh @BUILD_JA_RULE_TRUE@am__append_92 = tools/ja-rule/ja-rule \ @BUILD_JA_RULE_TRUE@ tools/ja-rule/ja-rule-controller @HAVE_SALEAE_LOGIC_TRUE@am__append_93 = tools/logic/logic_rdm_sniffer @BUILD_PYTHON_LIBS_TRUE@am__append_94 = \ @BUILD_PYTHON_LIBS_TRUE@ tools/rdm/ExpectedResultsTest.sh \ @BUILD_PYTHON_LIBS_TRUE@ tools/rdm/ResponderTestTest.sh \ @BUILD_PYTHON_LIBS_TRUE@ tools/rdm/TestHelpersTest.sh \ @BUILD_PYTHON_LIBS_TRUE@ tools/rdm/TestRunnerTest.sh \ @BUILD_PYTHON_LIBS_TRUE@ tools/rdm/TestStateTest.sh @INSTALL_RDM_TESTS_TRUE@am__append_95 = tools/rdm/DataLocation.py # pkg-config ################################################## @INSTALL_E133_TRUE@@USING_WIN32_FALSE@am__append_96 = \ @INSTALL_E133_TRUE@@USING_WIN32_FALSE@ tools/e133/libolae133common.pc \ @INSTALL_E133_TRUE@@USING_WIN32_FALSE@ tools/e133/libolae133controller.pc @INSTALL_E133_TRUE@@USING_WIN32_FALSE@am__append_97 = $(E133_LIBS) @INSTALL_E133_FALSE@@USING_WIN32_FALSE@am__append_98 = $(E133_LIBS) # PROGRAMS ################################################## @USING_WIN32_FALSE@am__append_99 = \ @USING_WIN32_FALSE@ tools/e133/basic_controller \ @USING_WIN32_FALSE@ tools/e133/basic_device \ @USING_WIN32_FALSE@ tools/e133/e133_controller \ @USING_WIN32_FALSE@ tools/e133/e133_monitor \ @USING_WIN32_FALSE@ tools/e133/e133_receiver @USE_SPI_TRUE@@USING_WIN32_FALSE@am__append_100 = plugins/spi/libolaspicore.la @USING_WIN32_FALSE@am__append_101 = tools/usbpro/download_firmware.sh @USING_WIN32_FALSE@am__append_102 = tools/usbpro/usbpro_firmware \ @USING_WIN32_FALSE@ tools/rdmpro/rdmpro_sniffer @USING_WIN32_FALSE@am__append_103 = tools/rdmpro/README.md @BUILD_TESTS_TRUE@TESTS = $(am__EXEEXT_20) $(test_scripts) subdir = . ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_prog_java_cc.m4 \ $(top_srcdir)/config/ac_pthread_set_name.m4 \ $(top_srcdir)/config/ac_saleae.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/ax_have_epoll.m4 \ $(top_srcdir)/config/ax_prog_doxygen.m4 \ $(top_srcdir)/config/ax_python_module.m4 \ $(top_srcdir)/config/libtool.m4 \ $(top_srcdir)/config/ltoptions.m4 \ $(top_srcdir)/config/ltsugar.m4 \ $(top_srcdir)/config/ltversion.m4 \ $(top_srcdir)/config/lt~obsolete.m4 \ $(top_srcdir)/config/maven.m4 $(top_srcdir)/config/ola.m4 \ $(top_srcdir)/config/pkg.m4 $(top_srcdir)/config/resolv.m4 \ $(top_srcdir)/config/stl_hash.m4 \ $(top_srcdir)/config/ola_version.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) DIST_COMMON = $(srcdir)/Makefile.am $(top_srcdir)/configure \ $(am__configure_deps) $(dist_check_SCRIPTS) \ $(am__dist_noinst_SCRIPTS_DIST) \ $(am__dist_rdmtestsexec_SCRIPTS_DIST) \ $(am__pkgpython_PYTHON_DIST) $(am__rdminit_PYTHON_DIST) \ $(am__rdmtests_PYTHON_DIST) $(am__rpcpython_PYTHON_DIST) \ $(dist_angular_DATA) $(dist_angularroute_DATA) \ $(dist_bootcss_DATA) $(dist_bootfonts_DATA) \ $(dist_bootjs_DATA) $(dist_css_DATA) $(dist_img_DATA) \ $(dist_jquery_DATA) $(dist_js_DATA) $(dist_new_DATA) \ $(dist_noinst_DATA) $(dist_piddata_DATA) \ $(am__dist_tools_rdm_testserver_images_DATA_DIST) \ $(am__dist_tools_rdm_testserver_static_DATA_DIST) \ $(dist_views_DATA) $(dist_www_DATA) $(noinst_HEADERS) \ $(am__olaacninclude_HEADERS_DIST) $(olabaseinclude_HEADERS) \ $(olaclientinclude_HEADERS) $(oladinclude_HEADERS) \ $(oladmxinclude_HEADERS) $(am__olae133include_HEADERS_DIST) \ $(olafileinclude_HEADERS) $(olahttpinclude_HEADERS) \ $(olaioinclude_HEADERS) $(olamathinclude_HEADERS) \ $(olamessaginginclude_HEADERS) $(olanetworkinclude_HEADERS) \ $(olardminclude_HEADERS) $(olarpcinclude_HEADERS) \ $(olastlinclude_HEADERS) $(olastringsinclude_HEADERS) \ $(olasysteminclude_HEADERS) $(olathreadinclude_HEADERS) \ $(olatimecodeinclude_HEADERS) $(olautilinclude_HEADERS) \ $(olawebinclude_HEADERS) $(olawininclude_HEADERS) \ $(pkginclude_HEADERS) $(am__DIST_COMMON) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = config.h CONFIG_CLEAN_FILES = include/ola/base/Version.h libola.pc \ libolaserver.pc libs/acn/libolaacn.pc ola.spec \ plugins/artnet/messages/libolaartnetconf.pc \ plugins/e131/messages/libolae131conf.pc \ plugins/usbpro/messages/libolausbproconf.pc \ tools/e133/libolae133common.pc \ tools/e133/libolae133controller.pc CONFIG_CLEAN_VPATH_FILES = python/ola/__init__.py \ python/ola/ClientWrapper.py python/ola/DMXConstants.py \ python/ola/DUBDecoder.py python/ola/MACAddress.py \ python/ola/OlaClient.py python/ola/PidStore.py \ python/ola/RDMAPI.py python/ola/RDMConstants.py \ python/ola/StringUtils.py python/ola/TestUtils.py \ python/ola/UID.py python/ola/rpc/__init__.py \ python/ola/rpc/SimpleRpcController.py \ python/ola/rpc/StreamRpcChannel.py tools/rdm/__init__.py \ tools/rdm/ExpectedResults.py tools/rdm/ResponderTest.py \ tools/rdm/TestCategory.py tools/rdm/TestDefinitions.py \ tools/rdm/TestHelpers.py tools/rdm/TestMixins.py \ tools/rdm/TestRunner.py tools/rdm/TestState.py \ tools/rdm/TimingStats.py am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" \ "$(DESTDIR)$(rdmtestsexecdir)" "$(DESTDIR)$(pkgpythondir)" \ "$(DESTDIR)$(rdmtestsdir)" "$(DESTDIR)$(rpcpythondir)" \ "$(DESTDIR)$(pkgpythondir)" "$(DESTDIR)$(rdminitdir)" \ "$(DESTDIR)$(rdmtestsdir)" "$(DESTDIR)$(rpcpythondir)" \ "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(angulardir)" \ "$(DESTDIR)$(angularroutedir)" "$(DESTDIR)$(bootcssdir)" \ "$(DESTDIR)$(bootfontsdir)" "$(DESTDIR)$(bootjsdir)" \ "$(DESTDIR)$(cssdir)" "$(DESTDIR)$(imgdir)" \ "$(DESTDIR)$(jquerydir)" "$(DESTDIR)$(jsdir)" \ "$(DESTDIR)$(newdir)" "$(DESTDIR)$(piddatadir)" \ "$(DESTDIR)$(tools_rdm_testserver_imagesdir)" \ "$(DESTDIR)$(tools_rdm_testserver_staticdir)" \ "$(DESTDIR)$(viewsdir)" "$(DESTDIR)$(wwwdir)" \ "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(artnetincludedir)" \ "$(DESTDIR)$(e131includedir)" "$(DESTDIR)$(olabaseincludedir)" \ "$(DESTDIR)$(olardmincludedir)" \ "$(DESTDIR)$(olatimecodeincludedir)" \ "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(usbproincludedir)" \ "$(DESTDIR)$(olaacnincludedir)" \ "$(DESTDIR)$(olabaseincludedir)" \ "$(DESTDIR)$(olaclientincludedir)" \ "$(DESTDIR)$(oladincludedir)" "$(DESTDIR)$(oladmxincludedir)" \ "$(DESTDIR)$(olae133includedir)" \ "$(DESTDIR)$(olafileincludedir)" \ "$(DESTDIR)$(olahttpincludedir)" \ "$(DESTDIR)$(olaioincludedir)" \ "$(DESTDIR)$(olamathincludedir)" \ "$(DESTDIR)$(olamessagingincludedir)" \ "$(DESTDIR)$(olanetworkincludedir)" \ "$(DESTDIR)$(olardmincludedir)" \ "$(DESTDIR)$(olarpcincludedir)" \ "$(DESTDIR)$(olastlincludedir)" \ "$(DESTDIR)$(olastringsincludedir)" \ "$(DESTDIR)$(olasystemincludedir)" \ "$(DESTDIR)$(olathreadincludedir)" \ "$(DESTDIR)$(olatimecodeincludedir)" \ "$(DESTDIR)$(olautilincludedir)" \ "$(DESTDIR)$(olawebincludedir)" \ "$(DESTDIR)$(olawinincludedir)" "$(DESTDIR)$(pkgincludedir)" LTLIBRARIES = $(lib_LTLIBRARIES) $(noinst_LTLIBRARIES) am__DEPENDENCIES_1 = @HAVE_LIBMICROHTTPD_TRUE@common_http_libolahttp_la_DEPENDENCIES = \ @HAVE_LIBMICROHTTPD_TRUE@ $(am__DEPENDENCIES_1) am__common_http_libolahttp_la_SOURCES_DIST = \ common/http/HTTPServer.cpp common/http/OlaHTTPServer.cpp am__dirstamp = $(am__leading_dot)dirstamp @HAVE_LIBMICROHTTPD_TRUE@am_common_http_libolahttp_la_OBJECTS = \ @HAVE_LIBMICROHTTPD_TRUE@ common/http/HTTPServer.lo \ @HAVE_LIBMICROHTTPD_TRUE@ common/http/OlaHTTPServer.lo common_http_libolahttp_la_OBJECTS = \ $(am_common_http_libolahttp_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = @HAVE_LIBMICROHTTPD_TRUE@am_common_http_libolahttp_la_rpath = common_libolacommon_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ $(am__DEPENDENCIES_1) common/protocol/libolaproto.la \ $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1) am__common_libolacommon_la_SOURCES_DIST = common/base/Credentials.cpp \ common/base/Env.cpp common/base/Flags.cpp common/base/Init.cpp \ common/base/Logging.cpp common/base/SysExits.cpp \ common/base/Version.cpp common/dmx/RunLengthEncoder.cpp \ common/export_map/ExportMap.cpp common/file/Util.cpp \ common/io/Descriptor.cpp common/io/ExtendedSerial.cpp \ common/io/EPoller.h common/io/IOQueue.cpp \ common/io/IOStack.cpp common/io/IOUtils.cpp \ common/io/NonBlockingSender.cpp common/io/PollerInterface.cpp \ common/io/PollerInterface.h common/io/SelectServer.cpp \ common/io/Serial.cpp common/io/StdinHandler.cpp \ common/io/TimeoutManager.cpp common/io/TimeoutManager.h \ common/io/WindowsPoller.cpp common/io/WindowsPoller.h \ common/io/SelectPoller.cpp common/io/SelectPoller.h \ common/io/EPoller.cpp common/io/KQueuePoller.h \ common/io/KQueuePoller.cpp common/math/Random.cpp \ common/messaging/Descriptor.cpp common/messaging/Message.cpp \ common/messaging/MessagePrinter.cpp \ common/messaging/SchemaPrinter.cpp \ common/network/AdvancedTCPConnector.cpp \ common/network/FakeInterfacePicker.h \ common/network/HealthCheckedConnection.cpp \ common/network/IPV4Address.cpp common/network/Interface.cpp \ common/network/InterfacePicker.cpp \ common/network/MACAddress.cpp common/network/NetworkUtils.cpp \ common/network/NetworkUtilsInternal.h \ common/network/Socket.cpp common/network/SocketAddress.cpp \ common/network/SocketCloser.cpp \ common/network/SocketHelper.cpp common/network/SocketHelper.h \ common/network/TCPConnector.cpp common/network/TCPSocket.cpp \ common/network/WindowsInterfacePicker.h \ common/network/WindowsInterfacePicker.cpp \ common/network/PosixInterfacePicker.h \ common/network/PosixInterfacePicker.cpp \ common/rdm/AckTimerResponder.cpp \ common/rdm/AdvancedDimmerResponder.cpp \ common/rdm/CommandPrinter.cpp \ common/rdm/DescriptorConsistencyChecker.cpp \ common/rdm/DescriptorConsistencyChecker.h \ common/rdm/DimmerResponder.cpp common/rdm/DimmerRootDevice.cpp \ common/rdm/DimmerSubDevice.cpp common/rdm/DiscoveryAgent.cpp \ common/rdm/DiscoveryAgentTestHelper.h \ common/rdm/DummyResponder.cpp \ common/rdm/FakeNetworkManager.cpp \ common/rdm/FakeNetworkManager.h \ common/rdm/GroupSizeCalculator.cpp \ common/rdm/GroupSizeCalculator.h \ common/rdm/MessageDeserializer.cpp \ common/rdm/MessageSerializer.cpp \ common/rdm/MovingLightResponder.cpp \ common/rdm/NetworkManager.cpp common/rdm/NetworkManager.h \ common/rdm/NetworkResponder.cpp \ common/rdm/OpenLightingEnums.cpp common/rdm/PidStore.cpp \ common/rdm/PidStoreHelper.cpp common/rdm/PidStoreLoader.cpp \ common/rdm/PidStoreLoader.h \ common/rdm/QueueingRDMController.cpp common/rdm/RDMAPI.cpp \ common/rdm/RDMCommand.cpp common/rdm/RDMCommandSerializer.cpp \ common/rdm/RDMFrame.cpp common/rdm/RDMHelper.cpp \ common/rdm/RDMReply.cpp common/rdm/ResponderHelper.cpp \ common/rdm/ResponderLoadSensor.cpp \ common/rdm/ResponderPersonality.cpp \ common/rdm/ResponderSettings.cpp \ common/rdm/ResponderSlotData.cpp \ common/rdm/SensorResponder.cpp \ common/rdm/StringMessageBuilder.cpp \ common/rdm/SubDeviceDispatcher.cpp common/rdm/UID.cpp \ common/rdm/VariableFieldSizeCalculator.cpp \ common/rdm/VariableFieldSizeCalculator.h \ common/rpc/RpcChannel.cpp common/rpc/RpcChannel.h \ common/rpc/RpcSession.h common/rpc/RpcController.cpp \ common/rpc/RpcController.h common/rpc/RpcHeader.h \ common/rpc/RpcPeer.h common/rpc/RpcServer.cpp \ common/rpc/RpcServer.h common/rpc/RpcService.h \ common/strings/Format.cpp common/strings/Utils.cpp \ common/system/Limits.cpp common/system/SystemUtils.cpp \ common/thread/ConsumerThread.cpp \ common/thread/ExecutorThread.cpp common/thread/Mutex.cpp \ common/thread/PeriodicThread.cpp \ common/thread/SignalThread.cpp common/thread/Thread.cpp \ common/thread/ThreadPool.cpp common/thread/Utils.cpp \ common/timecode/TimeCode.cpp common/utils/ActionQueue.cpp \ common/utils/Clock.cpp common/utils/DmxBuffer.cpp \ common/utils/StringUtils.cpp common/utils/TokenBucket.cpp \ common/utils/Watchdog.cpp @USING_WIN32_TRUE@am__objects_1 = common/io/common_libolacommon_la-WindowsPoller.lo @USING_WIN32_FALSE@am__objects_2 = common/io/common_libolacommon_la-SelectPoller.lo @HAVE_EPOLL_TRUE@am__objects_3 = \ @HAVE_EPOLL_TRUE@ common/io/common_libolacommon_la-EPoller.lo @HAVE_KQUEUE_TRUE@am__objects_4 = common/io/common_libolacommon_la-KQueuePoller.lo @USING_WIN32_TRUE@am__objects_5 = common/network/common_libolacommon_la-WindowsInterfacePicker.lo @USING_WIN32_FALSE@am__objects_6 = common/network/common_libolacommon_la-PosixInterfacePicker.lo am_common_libolacommon_la_OBJECTS = \ common/base/common_libolacommon_la-Credentials.lo \ common/base/common_libolacommon_la-Env.lo \ common/base/common_libolacommon_la-Flags.lo \ common/base/common_libolacommon_la-Init.lo \ common/base/common_libolacommon_la-Logging.lo \ common/base/common_libolacommon_la-SysExits.lo \ common/base/common_libolacommon_la-Version.lo \ common/dmx/common_libolacommon_la-RunLengthEncoder.lo \ common/export_map/common_libolacommon_la-ExportMap.lo \ common/file/common_libolacommon_la-Util.lo \ common/io/common_libolacommon_la-Descriptor.lo \ common/io/common_libolacommon_la-ExtendedSerial.lo \ common/io/common_libolacommon_la-IOQueue.lo \ common/io/common_libolacommon_la-IOStack.lo \ common/io/common_libolacommon_la-IOUtils.lo \ common/io/common_libolacommon_la-NonBlockingSender.lo \ common/io/common_libolacommon_la-PollerInterface.lo \ common/io/common_libolacommon_la-SelectServer.lo \ common/io/common_libolacommon_la-Serial.lo \ common/io/common_libolacommon_la-StdinHandler.lo \ common/io/common_libolacommon_la-TimeoutManager.lo \ $(am__objects_1) $(am__objects_2) $(am__objects_3) \ $(am__objects_4) common/math/common_libolacommon_la-Random.lo \ common/messaging/common_libolacommon_la-Descriptor.lo \ common/messaging/common_libolacommon_la-Message.lo \ common/messaging/common_libolacommon_la-MessagePrinter.lo \ common/messaging/common_libolacommon_la-SchemaPrinter.lo \ common/network/common_libolacommon_la-AdvancedTCPConnector.lo \ common/network/common_libolacommon_la-HealthCheckedConnection.lo \ common/network/common_libolacommon_la-IPV4Address.lo \ common/network/common_libolacommon_la-Interface.lo \ common/network/common_libolacommon_la-InterfacePicker.lo \ common/network/common_libolacommon_la-MACAddress.lo \ common/network/common_libolacommon_la-NetworkUtils.lo \ common/network/common_libolacommon_la-Socket.lo \ common/network/common_libolacommon_la-SocketAddress.lo \ common/network/common_libolacommon_la-SocketCloser.lo \ common/network/common_libolacommon_la-SocketHelper.lo \ common/network/common_libolacommon_la-TCPConnector.lo \ common/network/common_libolacommon_la-TCPSocket.lo \ $(am__objects_5) $(am__objects_6) \ common/rdm/common_libolacommon_la-AckTimerResponder.lo \ common/rdm/common_libolacommon_la-AdvancedDimmerResponder.lo \ common/rdm/common_libolacommon_la-CommandPrinter.lo \ common/rdm/common_libolacommon_la-DescriptorConsistencyChecker.lo \ common/rdm/common_libolacommon_la-DimmerResponder.lo \ common/rdm/common_libolacommon_la-DimmerRootDevice.lo \ common/rdm/common_libolacommon_la-DimmerSubDevice.lo \ common/rdm/common_libolacommon_la-DiscoveryAgent.lo \ common/rdm/common_libolacommon_la-DummyResponder.lo \ common/rdm/common_libolacommon_la-FakeNetworkManager.lo \ common/rdm/common_libolacommon_la-GroupSizeCalculator.lo \ common/rdm/common_libolacommon_la-MessageDeserializer.lo \ common/rdm/common_libolacommon_la-MessageSerializer.lo \ common/rdm/common_libolacommon_la-MovingLightResponder.lo \ common/rdm/common_libolacommon_la-NetworkManager.lo \ common/rdm/common_libolacommon_la-NetworkResponder.lo \ common/rdm/common_libolacommon_la-OpenLightingEnums.lo \ common/rdm/common_libolacommon_la-PidStore.lo \ common/rdm/common_libolacommon_la-PidStoreHelper.lo \ common/rdm/common_libolacommon_la-PidStoreLoader.lo \ common/rdm/common_libolacommon_la-QueueingRDMController.lo \ common/rdm/common_libolacommon_la-RDMAPI.lo \ common/rdm/common_libolacommon_la-RDMCommand.lo \ common/rdm/common_libolacommon_la-RDMCommandSerializer.lo \ common/rdm/common_libolacommon_la-RDMFrame.lo \ common/rdm/common_libolacommon_la-RDMHelper.lo \ common/rdm/common_libolacommon_la-RDMReply.lo \ common/rdm/common_libolacommon_la-ResponderHelper.lo \ common/rdm/common_libolacommon_la-ResponderLoadSensor.lo \ common/rdm/common_libolacommon_la-ResponderPersonality.lo \ common/rdm/common_libolacommon_la-ResponderSettings.lo \ common/rdm/common_libolacommon_la-ResponderSlotData.lo \ common/rdm/common_libolacommon_la-SensorResponder.lo \ common/rdm/common_libolacommon_la-StringMessageBuilder.lo \ common/rdm/common_libolacommon_la-SubDeviceDispatcher.lo \ common/rdm/common_libolacommon_la-UID.lo \ common/rdm/common_libolacommon_la-VariableFieldSizeCalculator.lo \ common/rpc/common_libolacommon_la-RpcChannel.lo \ common/rpc/common_libolacommon_la-RpcController.lo \ common/rpc/common_libolacommon_la-RpcServer.lo \ common/strings/common_libolacommon_la-Format.lo \ common/strings/common_libolacommon_la-Utils.lo \ common/system/common_libolacommon_la-Limits.lo \ common/system/common_libolacommon_la-SystemUtils.lo \ common/thread/common_libolacommon_la-ConsumerThread.lo \ common/thread/common_libolacommon_la-ExecutorThread.lo \ common/thread/common_libolacommon_la-Mutex.lo \ common/thread/common_libolacommon_la-PeriodicThread.lo \ common/thread/common_libolacommon_la-SignalThread.lo \ common/thread/common_libolacommon_la-Thread.lo \ common/thread/common_libolacommon_la-ThreadPool.lo \ common/thread/common_libolacommon_la-Utils.lo \ common/timecode/common_libolacommon_la-TimeCode.lo \ common/utils/common_libolacommon_la-ActionQueue.lo \ common/utils/common_libolacommon_la-Clock.lo \ common/utils/common_libolacommon_la-DmxBuffer.lo \ common/utils/common_libolacommon_la-StringUtils.lo \ common/utils/common_libolacommon_la-TokenBucket.lo \ common/utils/common_libolacommon_la-Watchdog.lo nodist_common_libolacommon_la_OBJECTS = \ common/rdm/common_libolacommon_la-Pids.pb.lo \ common/rpc/common_libolacommon_la-Rpc.pb.lo common_libolacommon_la_OBJECTS = $(am_common_libolacommon_la_OBJECTS) \ $(nodist_common_libolacommon_la_OBJECTS) common_libolacommon_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ common_protocol_libolaproto_la_DEPENDENCIES = $(am__DEPENDENCIES_1) nodist_common_protocol_libolaproto_la_OBJECTS = \ common/protocol/common_protocol_libolaproto_la-Ola.pb.lo \ common/protocol/common_protocol_libolaproto_la-OlaService.pb.lo common_protocol_libolaproto_la_OBJECTS = \ $(nodist_common_protocol_libolaproto_la_OBJECTS) common_protocol_libolaproto_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_protocol_libolaproto_la_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ common_testing_libolatesting_la_LIBADD = am__common_testing_libolatesting_la_SOURCES_DIST = \ common/testing/MockUDPSocket.cpp common/testing/TestUtils.cpp @BUILD_TESTS_TRUE@am_common_testing_libolatesting_la_OBJECTS = \ @BUILD_TESTS_TRUE@ common/testing/MockUDPSocket.lo \ @BUILD_TESTS_TRUE@ common/testing/TestUtils.lo common_testing_libolatesting_la_OBJECTS = \ $(am_common_testing_libolatesting_la_OBJECTS) @BUILD_TESTS_TRUE@am_common_testing_libolatesting_la_rpath = common_testing_libtestmain_la_LIBADD = am__common_testing_libtestmain_la_SOURCES_DIST = \ common/testing/GenericTester.cpp @BUILD_TESTS_TRUE@am_common_testing_libtestmain_la_OBJECTS = \ @BUILD_TESTS_TRUE@ common/testing/GenericTester.lo common_testing_libtestmain_la_OBJECTS = \ $(am_common_testing_libtestmain_la_OBJECTS) @BUILD_TESTS_TRUE@am_common_testing_libtestmain_la_rpath = @USING_WIN32_TRUE@common_web_libolaweb_la_DEPENDENCIES = \ @USING_WIN32_TRUE@ common/libolacommon.la am_common_web_libolaweb_la_OBJECTS = common/web/Json.lo \ common/web/JsonData.lo common/web/JsonLexer.lo \ common/web/JsonParser.lo common/web/JsonPatch.lo \ common/web/JsonPatchParser.lo common/web/JsonPointer.lo \ common/web/JsonSchema.lo common/web/JsonSections.lo \ common/web/JsonTypes.lo common/web/JsonWriter.lo \ common/web/PointerTracker.lo common/web/SchemaErrorLogger.lo \ common/web/SchemaKeywords.lo common/web/SchemaParseContext.lo \ common/web/SchemaParser.lo common_web_libolaweb_la_OBJECTS = \ $(am_common_web_libolaweb_la_OBJECTS) examples_libolaconfig_la_LIBADD = am__examples_libolaconfig_la_SOURCES_DIST = \ examples/OlaConfigurator.h examples/OlaConfigurator.cpp @BUILD_EXAMPLES_TRUE@am_examples_libolaconfig_la_OBJECTS = examples/examples_libolaconfig_la-OlaConfigurator.lo examples_libolaconfig_la_OBJECTS = \ $(am_examples_libolaconfig_la_OBJECTS) examples_libolaconfig_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(examples_libolaconfig_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @BUILD_EXAMPLES_TRUE@am_examples_libolaconfig_la_rpath = libs_acn_libolaacn_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ common/libolacommon.la am_libs_acn_libolaacn_la_OBJECTS = \ libs/acn/libs_acn_libolaacn_la-CID.lo \ libs/acn/libs_acn_libolaacn_la-CIDImpl.lo libs_acn_libolaacn_la_OBJECTS = $(am_libs_acn_libolaacn_la_OBJECTS) libs_acn_libolaacn_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(libs_acn_libolaacn_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @INSTALL_ACN_FALSE@am_libs_acn_libolaacn_la_rpath = @INSTALL_ACN_TRUE@am_libs_acn_libolaacn_la_rpath = -rpath $(libdir) libs_acn_libolae131core_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ common/libolacommon.la libs/acn/libolaacn.la am_libs_acn_libolae131core_la_OBJECTS = \ libs/acn/libs_acn_libolae131core_la-BaseInflator.lo \ libs/acn/libs_acn_libolae131core_la-DMPAddress.lo \ libs/acn/libs_acn_libolae131core_la-DMPE131Inflator.lo \ libs/acn/libs_acn_libolae131core_la-DMPInflator.lo \ libs/acn/libs_acn_libolae131core_la-DMPPDU.lo \ libs/acn/libs_acn_libolae131core_la-E131DiscoveryInflator.lo \ libs/acn/libs_acn_libolae131core_la-E131Inflator.lo \ libs/acn/libs_acn_libolae131core_la-E131Node.lo \ libs/acn/libs_acn_libolae131core_la-E131PDU.lo \ libs/acn/libs_acn_libolae131core_la-E131Sender.lo \ libs/acn/libs_acn_libolae131core_la-E133Inflator.lo \ libs/acn/libs_acn_libolae131core_la-E133PDU.lo \ libs/acn/libs_acn_libolae131core_la-E133StatusInflator.lo \ libs/acn/libs_acn_libolae131core_la-E133StatusPDU.lo \ libs/acn/libs_acn_libolae131core_la-PDU.lo \ libs/acn/libs_acn_libolae131core_la-PreamblePacker.lo \ libs/acn/libs_acn_libolae131core_la-RDMInflator.lo \ libs/acn/libs_acn_libolae131core_la-RDMPDU.lo \ libs/acn/libs_acn_libolae131core_la-RootInflator.lo \ libs/acn/libs_acn_libolae131core_la-RootPDU.lo \ libs/acn/libs_acn_libolae131core_la-RootSender.lo \ libs/acn/libs_acn_libolae131core_la-TCPTransport.lo \ libs/acn/libs_acn_libolae131core_la-UDPTransport.lo libs_acn_libolae131core_la_OBJECTS = \ $(am_libs_acn_libolae131core_la_OBJECTS) libs_acn_libolae131core_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_LIBUSB_TRUE@libs_usb_libolausb_la_DEPENDENCIES = \ @USE_LIBUSB_TRUE@ $(am__DEPENDENCIES_1) common/libolacommon.la am__libs_usb_libolausb_la_SOURCES_DIST = libs/usb/HotplugAgent.cpp \ libs/usb/HotplugAgent.h libs/usb/JaRuleConstants.h \ libs/usb/JaRuleConstants.cpp libs/usb/JaRulePortHandle.cpp \ libs/usb/JaRulePortHandle.h libs/usb/JaRulePortHandleImpl.cpp \ libs/usb/JaRulePortHandleImpl.h libs/usb/JaRuleWidget.cpp \ libs/usb/JaRuleWidget.h libs/usb/JaRuleWidgetPort.cpp \ libs/usb/JaRuleWidgetPort.h libs/usb/LibUsbAdaptor.cpp \ libs/usb/LibUsbAdaptor.h libs/usb/LibUsbThread.cpp \ libs/usb/LibUsbThread.h libs/usb/Types.cpp libs/usb/Types.h @USE_LIBUSB_TRUE@am_libs_usb_libolausb_la_OBJECTS = libs/usb/libs_usb_libolausb_la-HotplugAgent.lo \ @USE_LIBUSB_TRUE@ libs/usb/libs_usb_libolausb_la-JaRuleConstants.lo \ @USE_LIBUSB_TRUE@ libs/usb/libs_usb_libolausb_la-JaRulePortHandle.lo \ @USE_LIBUSB_TRUE@ libs/usb/libs_usb_libolausb_la-JaRulePortHandleImpl.lo \ @USE_LIBUSB_TRUE@ libs/usb/libs_usb_libolausb_la-JaRuleWidget.lo \ @USE_LIBUSB_TRUE@ libs/usb/libs_usb_libolausb_la-JaRuleWidgetPort.lo \ @USE_LIBUSB_TRUE@ libs/usb/libs_usb_libolausb_la-LibUsbAdaptor.lo \ @USE_LIBUSB_TRUE@ libs/usb/libs_usb_libolausb_la-LibUsbThread.lo \ @USE_LIBUSB_TRUE@ libs/usb/libs_usb_libolausb_la-Types.lo libs_usb_libolausb_la_OBJECTS = $(am_libs_usb_libolausb_la_OBJECTS) libs_usb_libolausb_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @USE_LIBUSB_TRUE@am_libs_usb_libolausb_la_rpath = ola_libola_la_DEPENDENCIES = common/libolacommon.la am_ola_libola_la_OBJECTS = ola/ola_libola_la-AutoStart.lo \ ola/ola_libola_la-ClientRDMAPIShim.lo \ ola/ola_libola_la-ClientTypesFactory.lo \ ola/ola_libola_la-Module.lo \ ola/ola_libola_la-OlaCallbackClient.lo \ ola/ola_libola_la-OlaClient.lo \ ola/ola_libola_la-OlaClientCore.lo \ ola/ola_libola_la-OlaClientWrapper.lo \ ola/ola_libola_la-StreamingClient.lo ola_libola_la_OBJECTS = $(am_ola_libola_la_OBJECTS) ola_libola_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) $(ola_libola_la_LDFLAGS) \ $(LDFLAGS) -o $@ @HAVE_AVAHI_TRUE@am__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) am__DEPENDENCIES_3 = $(am__DEPENDENCIES_2) $(am__append_88) olad_libolaserver_la_DEPENDENCIES = $(am__DEPENDENCIES_1) \ common/libolacommon.la common/web/libolaweb.la ola/libola.la \ olad/plugin_api/libolaserverplugininterface.la \ $(am__DEPENDENCIES_3) am__olad_libolaserver_la_SOURCES_DIST = olad/ClientBroker.cpp \ olad/ClientBroker.h olad/DiscoveryAgent.cpp \ olad/DiscoveryAgent.h olad/DynamicPluginLoader.cpp \ olad/DynamicPluginLoader.h olad/HttpServerActions.h \ olad/OlaServerServiceImpl.cpp olad/OlaServerServiceImpl.h \ olad/OladHTTPServer.h olad/PluginLoader.h \ olad/PluginManager.cpp olad/PluginManager.h \ olad/RDMHTTPModule.h olad/BonjourDiscoveryAgent.h \ olad/BonjourDiscoveryAgent.cpp olad/AvahiDiscoveryAgent.h \ olad/AvahiDiscoveryAgent.cpp olad/HttpServerActions.cpp \ olad/OladHTTPServer.cpp olad/RDMHTTPModule.cpp \ olad/OlaServer.cpp olad/OlaDaemon.cpp @HAVE_DNSSD_TRUE@am__objects_7 = olad/olad_libolaserver_la-BonjourDiscoveryAgent.lo @HAVE_AVAHI_TRUE@am__objects_8 = olad/olad_libolaserver_la-AvahiDiscoveryAgent.lo @HAVE_LIBMICROHTTPD_TRUE@am__objects_9 = olad/olad_libolaserver_la-HttpServerActions.lo \ @HAVE_LIBMICROHTTPD_TRUE@ olad/olad_libolaserver_la-OladHTTPServer.lo \ @HAVE_LIBMICROHTTPD_TRUE@ olad/olad_libolaserver_la-RDMHTTPModule.lo am__objects_10 = olad/olad_libolaserver_la-ClientBroker.lo \ olad/olad_libolaserver_la-DiscoveryAgent.lo \ olad/olad_libolaserver_la-DynamicPluginLoader.lo \ olad/olad_libolaserver_la-OlaServerServiceImpl.lo \ olad/olad_libolaserver_la-PluginManager.lo $(am__objects_7) \ $(am__objects_8) $(am__objects_9) am_olad_libolaserver_la_OBJECTS = $(am__objects_10) \ olad/olad_libolaserver_la-OlaServer.lo \ olad/olad_libolaserver_la-OlaDaemon.lo olad_libolaserver_la_OBJECTS = $(am_olad_libolaserver_la_OBJECTS) olad_libolaserver_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ olad_plugin_api_libolaserverplugininterface_la_DEPENDENCIES = \ common/libolacommon.la common/web/libolaweb.la ola/libola.la am_olad_plugin_api_libolaserverplugininterface_la_OBJECTS = olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Client.lo \ olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Device.lo \ olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DeviceManager.lo \ olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DmxSource.lo \ olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Plugin.lo \ olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PluginAdaptor.lo \ olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Port.lo \ olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortBroker.lo \ olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortManager.lo \ olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Preferences.lo \ olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Universe.lo \ olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-UniverseStore.lo olad_plugin_api_libolaserverplugininterface_la_OBJECTS = \ $(am_olad_plugin_api_libolaserverplugininterface_la_OBJECTS) olad_plugin_api_libolaserverplugininterface_la_LINK = $(LIBTOOL) \ $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) \ $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_ARTNET_TRUE@plugins_artnet_libolaartnet_la_DEPENDENCIES = olad/plugin_api/libolaserverplugininterface.la \ @USE_ARTNET_TRUE@ plugins/artnet/libolaartnetnode.la \ @USE_ARTNET_TRUE@ plugins/artnet/messages/libolaartnetconf.la am__plugins_artnet_libolaartnet_la_SOURCES_DIST = \ plugins/artnet/ArtNetPlugin.cpp plugins/artnet/ArtNetPlugin.h \ plugins/artnet/ArtNetDevice.cpp plugins/artnet/ArtNetDevice.h \ plugins/artnet/ArtNetPort.cpp plugins/artnet/ArtNetPort.h @USE_ARTNET_TRUE@am_plugins_artnet_libolaartnet_la_OBJECTS = plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPlugin.lo \ @USE_ARTNET_TRUE@ plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetDevice.lo \ @USE_ARTNET_TRUE@ plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPort.lo plugins_artnet_libolaartnet_la_OBJECTS = \ $(am_plugins_artnet_libolaartnet_la_OBJECTS) plugins_artnet_libolaartnet_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_artnet_libolaartnet_la_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_ARTNET_TRUE@am_plugins_artnet_libolaartnet_la_rpath = -rpath \ @USE_ARTNET_TRUE@ $(libdir) @USE_ARTNET_TRUE@plugins_artnet_libolaartnetnode_la_DEPENDENCIES = \ @USE_ARTNET_TRUE@ common/libolacommon.la am__plugins_artnet_libolaartnetnode_la_SOURCES_DIST = \ plugins/artnet/ArtNetPackets.h plugins/artnet/ArtNetNode.cpp \ plugins/artnet/ArtNetNode.h @USE_ARTNET_TRUE@am_plugins_artnet_libolaartnetnode_la_OBJECTS = \ @USE_ARTNET_TRUE@ plugins/artnet/ArtNetNode.lo plugins_artnet_libolaartnetnode_la_OBJECTS = \ $(am_plugins_artnet_libolaartnetnode_la_OBJECTS) @USE_ARTNET_TRUE@am_plugins_artnet_libolaartnetnode_la_rpath = @USE_ARTNET_TRUE@plugins_artnet_messages_libolaartnetconf_la_DEPENDENCIES = \ @USE_ARTNET_TRUE@ $(am__DEPENDENCIES_1) @USE_ARTNET_TRUE@nodist_plugins_artnet_messages_libolaartnetconf_la_OBJECTS = plugins/artnet/messages/plugins_artnet_messages_libolaartnetconf_la-ArtNetConfigMessages.pb.lo plugins_artnet_messages_libolaartnetconf_la_OBJECTS = \ $(nodist_plugins_artnet_messages_libolaartnetconf_la_OBJECTS) plugins_artnet_messages_libolaartnetconf_la_LINK = $(LIBTOOL) \ $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) \ $(plugins_artnet_messages_libolaartnetconf_la_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_ARTNET_TRUE@am_plugins_artnet_messages_libolaartnetconf_la_rpath = \ @USE_ARTNET_TRUE@ -rpath $(libdir) @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@plugins_dmx4linux_liboladmx4linux_la_DEPENDENCIES = \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ common/libolacommon.la \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_dmx4linux_liboladmx4linux_la_SOURCES_DIST = \ plugins/dmx4linux/Dmx4LinuxDevice.cpp \ plugins/dmx4linux/Dmx4LinuxDevice.h \ plugins/dmx4linux/Dmx4LinuxPlugin.cpp \ plugins/dmx4linux/Dmx4LinuxPlugin.h \ plugins/dmx4linux/Dmx4LinuxPort.cpp \ plugins/dmx4linux/Dmx4LinuxPort.h \ plugins/dmx4linux/Dmx4LinuxSocket.h @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@am_plugins_dmx4linux_liboladmx4linux_la_OBJECTS = plugins/dmx4linux/Dmx4LinuxDevice.lo \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ plugins/dmx4linux/Dmx4LinuxPlugin.lo \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ plugins/dmx4linux/Dmx4LinuxPort.lo plugins_dmx4linux_liboladmx4linux_la_OBJECTS = \ $(am_plugins_dmx4linux_liboladmx4linux_la_OBJECTS) @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@am_plugins_dmx4linux_liboladmx4linux_la_rpath = \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ -rpath $(libdir) @USE_DUMMY_TRUE@plugins_dummy_liboladummy_la_DEPENDENCIES = \ @USE_DUMMY_TRUE@ common/libolacommon.la \ @USE_DUMMY_TRUE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_dummy_liboladummy_la_SOURCES_DIST = \ plugins/dummy/DummyDevice.cpp plugins/dummy/DummyDevice.h \ plugins/dummy/DummyPlugin.cpp plugins/dummy/DummyPlugin.h \ plugins/dummy/DummyPort.cpp plugins/dummy/DummyPort.h @USE_DUMMY_TRUE@am_plugins_dummy_liboladummy_la_OBJECTS = \ @USE_DUMMY_TRUE@ plugins/dummy/DummyDevice.lo \ @USE_DUMMY_TRUE@ plugins/dummy/DummyPlugin.lo \ @USE_DUMMY_TRUE@ plugins/dummy/DummyPort.lo plugins_dummy_liboladummy_la_OBJECTS = \ $(am_plugins_dummy_liboladummy_la_OBJECTS) @USE_DUMMY_TRUE@am_plugins_dummy_liboladummy_la_rpath = -rpath \ @USE_DUMMY_TRUE@ $(libdir) @USE_E131_TRUE@@USING_WIN32_FALSE@plugins_e131_libolae131_la_DEPENDENCIES = olad/plugin_api/libolaserverplugininterface.la \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/messages/libolae131conf.la \ @USE_E131_TRUE@@USING_WIN32_FALSE@ libs/acn/libolae131core.la am__plugins_e131_libolae131_la_SOURCES_DIST = \ plugins/e131/E131Device.cpp plugins/e131/E131Device.h \ plugins/e131/E131Plugin.cpp plugins/e131/E131Plugin.h \ plugins/e131/E131Port.cpp plugins/e131/E131Port.h @USE_E131_TRUE@@USING_WIN32_FALSE@am_plugins_e131_libolae131_la_OBJECTS = plugins/e131/plugins_e131_libolae131_la-E131Device.lo \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/plugins_e131_libolae131_la-E131Plugin.lo \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/plugins_e131_libolae131_la-E131Port.lo plugins_e131_libolae131_la_OBJECTS = \ $(am_plugins_e131_libolae131_la_OBJECTS) plugins_e131_libolae131_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_e131_libolae131_la_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_E131_TRUE@@USING_WIN32_FALSE@am_plugins_e131_libolae131_la_rpath = \ @USE_E131_TRUE@@USING_WIN32_FALSE@ -rpath $(libdir) @USE_E131_TRUE@@USING_WIN32_FALSE@plugins_e131_messages_libolae131conf_la_DEPENDENCIES = \ @USE_E131_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_1) @USE_E131_TRUE@@USING_WIN32_FALSE@nodist_plugins_e131_messages_libolae131conf_la_OBJECTS = plugins/e131/messages/plugins_e131_messages_libolae131conf_la-E131ConfigMessages.pb.lo plugins_e131_messages_libolae131conf_la_OBJECTS = \ $(nodist_plugins_e131_messages_libolae131conf_la_OBJECTS) plugins_e131_messages_libolae131conf_la_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_e131_messages_libolae131conf_la_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_E131_TRUE@@USING_WIN32_FALSE@am_plugins_e131_messages_libolae131conf_la_rpath = \ @USE_E131_TRUE@@USING_WIN32_FALSE@ -rpath $(libdir) @USE_ESPNET_TRUE@plugins_espnet_libolaespnet_la_DEPENDENCIES = \ @USE_ESPNET_TRUE@ common/libolacommon.la \ @USE_ESPNET_TRUE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_espnet_libolaespnet_la_SOURCES_DIST = \ plugins/espnet/EspNetDevice.cpp plugins/espnet/EspNetDevice.h \ plugins/espnet/EspNetNode.cpp plugins/espnet/EspNetNode.h \ plugins/espnet/EspNetPackets.h plugins/espnet/EspNetPlugin.cpp \ plugins/espnet/EspNetPlugin.h \ plugins/espnet/EspNetPluginCommon.h \ plugins/espnet/EspNetPort.cpp plugins/espnet/EspNetPort.h \ plugins/espnet/RunLengthDecoder.cpp \ plugins/espnet/RunLengthDecoder.h @USE_ESPNET_TRUE@am_plugins_espnet_libolaespnet_la_OBJECTS = \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetDevice.lo \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetNode.lo \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetPlugin.lo \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetPort.lo \ @USE_ESPNET_TRUE@ plugins/espnet/RunLengthDecoder.lo plugins_espnet_libolaespnet_la_OBJECTS = \ $(am_plugins_espnet_libolaespnet_la_OBJECTS) @USE_ESPNET_TRUE@am_plugins_espnet_libolaespnet_la_rpath = -rpath \ @USE_ESPNET_TRUE@ $(libdir) @HAVE_LIBFTDI1_TRUE@@USE_FTDI_TRUE@am__DEPENDENCIES_4 = \ @HAVE_LIBFTDI1_TRUE@@USE_FTDI_TRUE@ $(am__DEPENDENCIES_1) @HAVE_LIBFTDI1_FALSE@@USE_FTDI_TRUE@am__DEPENDENCIES_5 = \ @HAVE_LIBFTDI1_FALSE@@USE_FTDI_TRUE@ $(am__DEPENDENCIES_1) @USE_FTDI_TRUE@plugins_ftdidmx_libolaftdidmx_la_DEPENDENCIES = \ @USE_FTDI_TRUE@ common/libolacommon.la \ @USE_FTDI_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_FTDI_TRUE@ $(am__DEPENDENCIES_4) $(am__DEPENDENCIES_5) am__plugins_ftdidmx_libolaftdidmx_la_SOURCES_DIST = \ plugins/ftdidmx/FtdiDmxDevice.cpp \ plugins/ftdidmx/FtdiDmxDevice.h \ plugins/ftdidmx/FtdiDmxPlugin.cpp \ plugins/ftdidmx/FtdiDmxPlugin.h plugins/ftdidmx/FtdiDmxPort.h \ plugins/ftdidmx/FtdiDmxThread.cpp \ plugins/ftdidmx/FtdiDmxThread.h plugins/ftdidmx/FtdiWidget.cpp \ plugins/ftdidmx/FtdiWidget.h @USE_FTDI_TRUE@am_plugins_ftdidmx_libolaftdidmx_la_OBJECTS = \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiDmxDevice.lo \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiDmxPlugin.lo \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiDmxThread.lo \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiWidget.lo plugins_ftdidmx_libolaftdidmx_la_OBJECTS = \ $(am_plugins_ftdidmx_libolaftdidmx_la_OBJECTS) @USE_FTDI_TRUE@am_plugins_ftdidmx_libolaftdidmx_la_rpath = -rpath \ @USE_FTDI_TRUE@ $(libdir) @USE_GPIO_TRUE@plugins_gpio_libolagpio_la_DEPENDENCIES = \ @USE_GPIO_TRUE@ common/libolacommon.la \ @USE_GPIO_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_GPIO_TRUE@ plugins/gpio/libolagpiocore.la am__plugins_gpio_libolagpio_la_SOURCES_DIST = \ plugins/gpio/GPIODevice.cpp plugins/gpio/GPIODevice.h \ plugins/gpio/GPIOPlugin.cpp plugins/gpio/GPIOPlugin.h \ plugins/gpio/GPIOPort.cpp plugins/gpio/GPIOPort.h @USE_GPIO_TRUE@am_plugins_gpio_libolagpio_la_OBJECTS = \ @USE_GPIO_TRUE@ plugins/gpio/GPIODevice.lo \ @USE_GPIO_TRUE@ plugins/gpio/GPIOPlugin.lo \ @USE_GPIO_TRUE@ plugins/gpio/GPIOPort.lo plugins_gpio_libolagpio_la_OBJECTS = \ $(am_plugins_gpio_libolagpio_la_OBJECTS) @USE_GPIO_TRUE@am_plugins_gpio_libolagpio_la_rpath = -rpath $(libdir) @USE_GPIO_TRUE@plugins_gpio_libolagpiocore_la_DEPENDENCIES = \ @USE_GPIO_TRUE@ common/libolacommon.la am__plugins_gpio_libolagpiocore_la_SOURCES_DIST = \ plugins/gpio/GPIODriver.cpp plugins/gpio/GPIODriver.h @USE_GPIO_TRUE@am_plugins_gpio_libolagpiocore_la_OBJECTS = \ @USE_GPIO_TRUE@ plugins/gpio/GPIODriver.lo plugins_gpio_libolagpiocore_la_OBJECTS = \ $(am_plugins_gpio_libolagpiocore_la_OBJECTS) @USE_GPIO_TRUE@am_plugins_gpio_libolagpiocore_la_rpath = -rpath \ @USE_GPIO_TRUE@ $(libdir) @USE_KARATE_TRUE@plugins_karate_libolakarate_la_DEPENDENCIES = \ @USE_KARATE_TRUE@ common/libolacommon.la \ @USE_KARATE_TRUE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_karate_libolakarate_la_SOURCES_DIST = \ plugins/karate/KaratePlugin.cpp \ plugins/karate/KarateDevice.cpp \ plugins/karate/KarateThread.cpp plugins/karate/KarateLight.cpp \ plugins/karate/KaratePlugin.h plugins/karate/KarateDevice.h \ plugins/karate/KaratePort.h plugins/karate/KarateThread.h \ plugins/karate/KarateLight.h @USE_KARATE_TRUE@am_plugins_karate_libolakarate_la_OBJECTS = \ @USE_KARATE_TRUE@ plugins/karate/KaratePlugin.lo \ @USE_KARATE_TRUE@ plugins/karate/KarateDevice.lo \ @USE_KARATE_TRUE@ plugins/karate/KarateThread.lo \ @USE_KARATE_TRUE@ plugins/karate/KarateLight.lo plugins_karate_libolakarate_la_OBJECTS = \ $(am_plugins_karate_libolakarate_la_OBJECTS) @USE_KARATE_TRUE@am_plugins_karate_libolakarate_la_rpath = -rpath \ @USE_KARATE_TRUE@ $(libdir) @USE_KINET_TRUE@plugins_kinet_libolakinet_la_DEPENDENCIES = olad/plugin_api/libolaserverplugininterface.la \ @USE_KINET_TRUE@ plugins/kinet/libolakinetnode.la am__plugins_kinet_libolakinet_la_SOURCES_DIST = \ plugins/kinet/KiNetPlugin.cpp plugins/kinet/KiNetPlugin.h \ plugins/kinet/KiNetDevice.cpp plugins/kinet/KiNetDevice.h \ plugins/kinet/KiNetPort.h @USE_KINET_TRUE@am_plugins_kinet_libolakinet_la_OBJECTS = \ @USE_KINET_TRUE@ plugins/kinet/KiNetPlugin.lo \ @USE_KINET_TRUE@ plugins/kinet/KiNetDevice.lo plugins_kinet_libolakinet_la_OBJECTS = \ $(am_plugins_kinet_libolakinet_la_OBJECTS) @USE_KINET_TRUE@am_plugins_kinet_libolakinet_la_rpath = -rpath \ @USE_KINET_TRUE@ $(libdir) @USE_KINET_TRUE@plugins_kinet_libolakinetnode_la_DEPENDENCIES = \ @USE_KINET_TRUE@ common/libolacommon.la am__plugins_kinet_libolakinetnode_la_SOURCES_DIST = \ plugins/kinet/KiNetNode.cpp plugins/kinet/KiNetNode.h @USE_KINET_TRUE@am_plugins_kinet_libolakinetnode_la_OBJECTS = \ @USE_KINET_TRUE@ plugins/kinet/KiNetNode.lo plugins_kinet_libolakinetnode_la_OBJECTS = \ $(am_plugins_kinet_libolakinetnode_la_OBJECTS) @USE_KINET_TRUE@am_plugins_kinet_libolakinetnode_la_rpath = @USE_MILINST_TRUE@plugins_milinst_libolamilinst_la_DEPENDENCIES = \ @USE_MILINST_TRUE@ common/libolacommon.la \ @USE_MILINST_TRUE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_milinst_libolamilinst_la_SOURCES_DIST = \ plugins/milinst/MilInstDevice.cpp \ plugins/milinst/MilInstDevice.h \ plugins/milinst/MilInstPlugin.cpp \ plugins/milinst/MilInstPlugin.h \ plugins/milinst/MilInstPort.cpp plugins/milinst/MilInstPort.h \ plugins/milinst/MilInstWidget.cpp \ plugins/milinst/MilInstWidget.h \ plugins/milinst/MilInstWidget1463.cpp \ plugins/milinst/MilInstWidget1463.h \ plugins/milinst/MilInstWidget1553.cpp \ plugins/milinst/MilInstWidget1553.h @USE_MILINST_TRUE@am_plugins_milinst_libolamilinst_la_OBJECTS = \ @USE_MILINST_TRUE@ plugins/milinst/MilInstDevice.lo \ @USE_MILINST_TRUE@ plugins/milinst/MilInstPlugin.lo \ @USE_MILINST_TRUE@ plugins/milinst/MilInstPort.lo \ @USE_MILINST_TRUE@ plugins/milinst/MilInstWidget.lo \ @USE_MILINST_TRUE@ plugins/milinst/MilInstWidget1463.lo \ @USE_MILINST_TRUE@ plugins/milinst/MilInstWidget1553.lo plugins_milinst_libolamilinst_la_OBJECTS = \ $(am_plugins_milinst_libolamilinst_la_OBJECTS) @USE_MILINST_TRUE@am_plugins_milinst_libolamilinst_la_rpath = -rpath \ @USE_MILINST_TRUE@ $(libdir) @USE_OPENDMX_TRUE@plugins_opendmx_libolaopendmx_la_DEPENDENCIES = \ @USE_OPENDMX_TRUE@ common/libolacommon.la \ @USE_OPENDMX_TRUE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_opendmx_libolaopendmx_la_SOURCES_DIST = \ plugins/opendmx/OpenDmxDevice.cpp \ plugins/opendmx/OpenDmxDevice.h \ plugins/opendmx/OpenDmxPlugin.cpp \ plugins/opendmx/OpenDmxPlugin.h plugins/opendmx/OpenDmxPort.h \ plugins/opendmx/OpenDmxThread.cpp \ plugins/opendmx/OpenDmxThread.h @USE_OPENDMX_TRUE@am_plugins_opendmx_libolaopendmx_la_OBJECTS = \ @USE_OPENDMX_TRUE@ plugins/opendmx/OpenDmxDevice.lo \ @USE_OPENDMX_TRUE@ plugins/opendmx/OpenDmxPlugin.lo \ @USE_OPENDMX_TRUE@ plugins/opendmx/OpenDmxThread.lo plugins_opendmx_libolaopendmx_la_OBJECTS = \ $(am_plugins_opendmx_libolaopendmx_la_OBJECTS) @USE_OPENDMX_TRUE@am_plugins_opendmx_libolaopendmx_la_rpath = -rpath \ @USE_OPENDMX_TRUE@ $(libdir) @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_libolaopc_la_DEPENDENCIES = \ @USE_OPENPIXELCONTROL_TRUE@ common/libolacommon.la am__plugins_openpixelcontrol_libolaopc_la_SOURCES_DIST = \ plugins/openpixelcontrol/OPCClient.cpp \ plugins/openpixelcontrol/OPCClient.h \ plugins/openpixelcontrol/OPCConstants.h \ plugins/openpixelcontrol/OPCServer.cpp \ plugins/openpixelcontrol/OPCServer.h @USE_OPENPIXELCONTROL_TRUE@am_plugins_openpixelcontrol_libolaopc_la_OBJECTS = plugins/openpixelcontrol/OPCClient.lo \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCServer.lo plugins_openpixelcontrol_libolaopc_la_OBJECTS = \ $(am_plugins_openpixelcontrol_libolaopc_la_OBJECTS) @USE_OPENPIXELCONTROL_TRUE@am_plugins_openpixelcontrol_libolaopc_la_rpath = @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_libolaopenpixelcontrol_la_DEPENDENCIES = \ @USE_OPENPIXELCONTROL_TRUE@ common/libolacommon.la \ @USE_OPENPIXELCONTROL_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/libolaopc.la am__plugins_openpixelcontrol_libolaopenpixelcontrol_la_SOURCES_DIST = \ plugins/openpixelcontrol/OPCDevice.cpp \ plugins/openpixelcontrol/OPCDevice.h \ plugins/openpixelcontrol/OPCPlugin.cpp \ plugins/openpixelcontrol/OPCPlugin.h \ plugins/openpixelcontrol/OPCPort.cpp \ plugins/openpixelcontrol/OPCPort.h @USE_OPENPIXELCONTROL_TRUE@am_plugins_openpixelcontrol_libolaopenpixelcontrol_la_OBJECTS = plugins/openpixelcontrol/OPCDevice.lo \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCPlugin.lo \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCPort.lo plugins_openpixelcontrol_libolaopenpixelcontrol_la_OBJECTS = $(am_plugins_openpixelcontrol_libolaopenpixelcontrol_la_OBJECTS) @USE_OPENPIXELCONTROL_TRUE@am_plugins_openpixelcontrol_libolaopenpixelcontrol_la_rpath = \ @USE_OPENPIXELCONTROL_TRUE@ -rpath $(libdir) @USE_OSC_TRUE@plugins_osc_libolaosc_la_DEPENDENCIES = \ @USE_OSC_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_OSC_TRUE@ plugins/osc/libolaoscnode.la am__plugins_osc_libolaosc_la_SOURCES_DIST = plugins/osc/OSCDevice.cpp \ plugins/osc/OSCDevice.h plugins/osc/OSCPlugin.cpp \ plugins/osc/OSCPlugin.h plugins/osc/OSCPort.cpp \ plugins/osc/OSCPort.h @USE_OSC_TRUE@am_plugins_osc_libolaosc_la_OBJECTS = plugins/osc/plugins_osc_libolaosc_la-OSCDevice.lo \ @USE_OSC_TRUE@ plugins/osc/plugins_osc_libolaosc_la-OSCPlugin.lo \ @USE_OSC_TRUE@ plugins/osc/plugins_osc_libolaosc_la-OSCPort.lo plugins_osc_libolaosc_la_OBJECTS = \ $(am_plugins_osc_libolaosc_la_OBJECTS) plugins_osc_libolaosc_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_osc_libolaosc_la_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ @USE_OSC_TRUE@am_plugins_osc_libolaosc_la_rpath = -rpath $(libdir) @USE_OSC_TRUE@plugins_osc_libolaoscnode_la_DEPENDENCIES = \ @USE_OSC_TRUE@ $(am__DEPENDENCIES_1) am__plugins_osc_libolaoscnode_la_SOURCES_DIST = \ plugins/osc/OSCAddressTemplate.cpp \ plugins/osc/OSCAddressTemplate.h plugins/osc/OSCNode.cpp \ plugins/osc/OSCNode.h plugins/osc/OSCTarget.h @USE_OSC_TRUE@am_plugins_osc_libolaoscnode_la_OBJECTS = plugins/osc/plugins_osc_libolaoscnode_la-OSCAddressTemplate.lo \ @USE_OSC_TRUE@ plugins/osc/plugins_osc_libolaoscnode_la-OSCNode.lo plugins_osc_libolaoscnode_la_OBJECTS = \ $(am_plugins_osc_libolaoscnode_la_OBJECTS) plugins_osc_libolaoscnode_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_osc_libolaoscnode_la_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_OSC_TRUE@am_plugins_osc_libolaoscnode_la_rpath = @USE_PATHPORT_TRUE@plugins_pathport_libolapathport_la_DEPENDENCIES = \ @USE_PATHPORT_TRUE@ common/libolacommon.la \ @USE_PATHPORT_TRUE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_pathport_libolapathport_la_SOURCES_DIST = \ plugins/pathport/PathportDevice.cpp \ plugins/pathport/PathportDevice.h \ plugins/pathport/PathportNode.cpp \ plugins/pathport/PathportNode.h \ plugins/pathport/PathportPackets.h \ plugins/pathport/PathportPlugin.cpp \ plugins/pathport/PathportPlugin.h \ plugins/pathport/PathportPort.cpp \ plugins/pathport/PathportPort.h @USE_PATHPORT_TRUE@am_plugins_pathport_libolapathport_la_OBJECTS = \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportDevice.lo \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportNode.lo \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportPlugin.lo \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportPort.lo plugins_pathport_libolapathport_la_OBJECTS = \ $(am_plugins_pathport_libolapathport_la_OBJECTS) @USE_PATHPORT_TRUE@am_plugins_pathport_libolapathport_la_rpath = \ @USE_PATHPORT_TRUE@ -rpath $(libdir) @USE_RENARD_TRUE@plugins_renard_libolarenard_la_DEPENDENCIES = \ @USE_RENARD_TRUE@ common/libolacommon.la \ @USE_RENARD_TRUE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_renard_libolarenard_la_SOURCES_DIST = \ plugins/renard/RenardDevice.cpp plugins/renard/RenardDevice.h \ plugins/renard/RenardPlugin.cpp plugins/renard/RenardPlugin.h \ plugins/renard/RenardPort.cpp plugins/renard/RenardPort.h \ plugins/renard/RenardWidget.cpp plugins/renard/RenardWidget.h @USE_RENARD_TRUE@am_plugins_renard_libolarenard_la_OBJECTS = \ @USE_RENARD_TRUE@ plugins/renard/RenardDevice.lo \ @USE_RENARD_TRUE@ plugins/renard/RenardPlugin.lo \ @USE_RENARD_TRUE@ plugins/renard/RenardPort.lo \ @USE_RENARD_TRUE@ plugins/renard/RenardWidget.lo plugins_renard_libolarenard_la_OBJECTS = \ $(am_plugins_renard_libolarenard_la_OBJECTS) @USE_RENARD_TRUE@am_plugins_renard_libolarenard_la_rpath = -rpath \ @USE_RENARD_TRUE@ $(libdir) @USE_SANDNET_TRUE@plugins_sandnet_libolasandnet_la_DEPENDENCIES = \ @USE_SANDNET_TRUE@ common/libolacommon.la \ @USE_SANDNET_TRUE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_sandnet_libolasandnet_la_SOURCES_DIST = \ plugins/sandnet/SandNetCommon.h \ plugins/sandnet/SandNetDevice.cpp \ plugins/sandnet/SandNetDevice.h \ plugins/sandnet/SandNetNode.cpp plugins/sandnet/SandNetNode.h \ plugins/sandnet/SandNetPackets.h \ plugins/sandnet/SandNetPlugin.cpp \ plugins/sandnet/SandNetPlugin.h \ plugins/sandnet/SandNetPort.cpp plugins/sandnet/SandNetPort.h @USE_SANDNET_TRUE@am_plugins_sandnet_libolasandnet_la_OBJECTS = \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetDevice.lo \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetNode.lo \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetPlugin.lo \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetPort.lo plugins_sandnet_libolasandnet_la_OBJECTS = \ $(am_plugins_sandnet_libolasandnet_la_OBJECTS) @USE_SANDNET_TRUE@am_plugins_sandnet_libolasandnet_la_rpath = -rpath \ @USE_SANDNET_TRUE@ $(libdir) @USE_SHOWNET_TRUE@plugins_shownet_libolashownet_la_DEPENDENCIES = \ @USE_SHOWNET_TRUE@ common/libolacommon.la \ @USE_SHOWNET_TRUE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_shownet_libolashownet_la_SOURCES_DIST = \ plugins/shownet/ShowNetPlugin.cpp \ plugins/shownet/ShowNetDevice.cpp \ plugins/shownet/ShowNetPort.cpp \ plugins/shownet/ShowNetNode.cpp \ plugins/shownet/ShowNetPlugin.h \ plugins/shownet/ShowNetDevice.h plugins/shownet/ShowNetPort.h \ plugins/shownet/ShowNetPackets.h plugins/shownet/ShowNetNode.h @USE_SHOWNET_TRUE@am_plugins_shownet_libolashownet_la_OBJECTS = \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetPlugin.lo \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetDevice.lo \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetPort.lo \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetNode.lo plugins_shownet_libolashownet_la_OBJECTS = \ $(am_plugins_shownet_libolashownet_la_OBJECTS) @USE_SHOWNET_TRUE@am_plugins_shownet_libolashownet_la_rpath = -rpath \ @USE_SHOWNET_TRUE@ $(libdir) @USE_SPI_TRUE@plugins_spi_libolaspi_la_DEPENDENCIES = \ @USE_SPI_TRUE@ common/libolacommon.la \ @USE_SPI_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_SPI_TRUE@ plugins/spi/libolaspicore.la am__plugins_spi_libolaspi_la_SOURCES_DIST = plugins/spi/SPIDevice.cpp \ plugins/spi/SPIDevice.h plugins/spi/SPIPlugin.cpp \ plugins/spi/SPIPlugin.h plugins/spi/SPIPort.cpp \ plugins/spi/SPIPort.h @USE_SPI_TRUE@am_plugins_spi_libolaspi_la_OBJECTS = \ @USE_SPI_TRUE@ plugins/spi/SPIDevice.lo \ @USE_SPI_TRUE@ plugins/spi/SPIPlugin.lo plugins/spi/SPIPort.lo plugins_spi_libolaspi_la_OBJECTS = \ $(am_plugins_spi_libolaspi_la_OBJECTS) @USE_SPI_TRUE@am_plugins_spi_libolaspi_la_rpath = -rpath $(libdir) @USE_SPI_TRUE@plugins_spi_libolaspicore_la_DEPENDENCIES = \ @USE_SPI_TRUE@ common/libolacommon.la am__plugins_spi_libolaspicore_la_SOURCES_DIST = \ plugins/spi/SPIBackend.cpp plugins/spi/SPIBackend.h \ plugins/spi/SPIOutput.cpp plugins/spi/SPIOutput.h \ plugins/spi/SPIWriter.cpp plugins/spi/SPIWriter.h @USE_SPI_TRUE@am_plugins_spi_libolaspicore_la_OBJECTS = \ @USE_SPI_TRUE@ plugins/spi/SPIBackend.lo \ @USE_SPI_TRUE@ plugins/spi/SPIOutput.lo \ @USE_SPI_TRUE@ plugins/spi/SPIWriter.lo plugins_spi_libolaspicore_la_OBJECTS = \ $(am_plugins_spi_libolaspicore_la_OBJECTS) @USE_SPI_TRUE@am_plugins_spi_libolaspicore_la_rpath = -rpath $(libdir) @USE_STAGEPROFI_TRUE@plugins_stageprofi_libolastageprofi_la_DEPENDENCIES = \ @USE_STAGEPROFI_TRUE@ common/libolacommon.la \ @USE_STAGEPROFI_TRUE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_stageprofi_libolastageprofi_la_SOURCES_DIST = \ plugins/stageprofi/StageProfiDetector.cpp \ plugins/stageprofi/StageProfiDetector.h \ plugins/stageprofi/StageProfiDevice.cpp \ plugins/stageprofi/StageProfiDevice.h \ plugins/stageprofi/StageProfiPlugin.cpp \ plugins/stageprofi/StageProfiPlugin.h \ plugins/stageprofi/StageProfiPort.cpp \ plugins/stageprofi/StageProfiPort.h \ plugins/stageprofi/StageProfiWidget.cpp \ plugins/stageprofi/StageProfiWidget.h @USE_STAGEPROFI_TRUE@am_plugins_stageprofi_libolastageprofi_la_OBJECTS = \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiDetector.lo \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiDevice.lo \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiPlugin.lo \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiPort.lo \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiWidget.lo plugins_stageprofi_libolastageprofi_la_OBJECTS = \ $(am_plugins_stageprofi_libolastageprofi_la_OBJECTS) @USE_STAGEPROFI_TRUE@am_plugins_stageprofi_libolastageprofi_la_rpath = \ @USE_STAGEPROFI_TRUE@ -rpath $(libdir) @USE_UART_TRUE@@USING_WIN32_FALSE@plugins_uartdmx_libolauartdmx_la_DEPENDENCIES = \ @USE_UART_TRUE@@USING_WIN32_FALSE@ common/libolacommon.la \ @USE_UART_TRUE@@USING_WIN32_FALSE@ olad/plugin_api/libolaserverplugininterface.la am__plugins_uartdmx_libolauartdmx_la_SOURCES_DIST = \ plugins/uartdmx/UartDmxDevice.cpp \ plugins/uartdmx/UartDmxDevice.h \ plugins/uartdmx/UartDmxPlugin.cpp \ plugins/uartdmx/UartDmxPlugin.h plugins/uartdmx/UartDmxPort.h \ plugins/uartdmx/UartDmxThread.cpp \ plugins/uartdmx/UartDmxThread.h plugins/uartdmx/UartWidget.cpp \ plugins/uartdmx/UartWidget.h @USE_UART_TRUE@@USING_WIN32_FALSE@am_plugins_uartdmx_libolauartdmx_la_OBJECTS = plugins/uartdmx/UartDmxDevice.lo \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartDmxPlugin.lo \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartDmxThread.lo \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartWidget.lo plugins_uartdmx_libolauartdmx_la_OBJECTS = \ $(am_plugins_uartdmx_libolauartdmx_la_OBJECTS) @USE_UART_TRUE@@USING_WIN32_FALSE@am_plugins_uartdmx_libolauartdmx_la_rpath = \ @USE_UART_TRUE@@USING_WIN32_FALSE@ -rpath $(libdir) @USE_LIBUSB_TRUE@plugins_usbdmx_libolausbdmx_la_DEPENDENCIES = olad/plugin_api/libolaserverplugininterface.la \ @USE_LIBUSB_TRUE@ plugins/usbdmx/libolausbdmxwidget.la am__plugins_usbdmx_libolausbdmx_la_SOURCES_DIST = \ plugins/usbdmx/AsyncPluginImpl.cpp \ plugins/usbdmx/AsyncPluginImpl.h \ plugins/usbdmx/DMXCProjectsNodleU1Device.cpp \ plugins/usbdmx/DMXCProjectsNodleU1Device.h \ plugins/usbdmx/DMXCProjectsNodleU1Port.cpp \ plugins/usbdmx/DMXCProjectsNodleU1Port.h \ plugins/usbdmx/GenericDevice.cpp \ plugins/usbdmx/GenericDevice.h \ plugins/usbdmx/GenericOutputPort.cpp \ plugins/usbdmx/GenericOutputPort.h \ plugins/usbdmx/JaRuleDevice.cpp plugins/usbdmx/JaRuleDevice.h \ plugins/usbdmx/JaRuleOutputPort.cpp \ plugins/usbdmx/JaRuleOutputPort.h \ plugins/usbdmx/PluginImplInterface.h \ plugins/usbdmx/SyncPluginImpl.cpp \ plugins/usbdmx/SyncPluginImpl.h \ plugins/usbdmx/UsbDmxPlugin.cpp plugins/usbdmx/UsbDmxPlugin.h @USE_LIBUSB_TRUE@am_plugins_usbdmx_libolausbdmx_la_OBJECTS = plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-AsyncPluginImpl.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Device.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Port.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericDevice.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericOutputPort.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleDevice.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleOutputPort.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-SyncPluginImpl.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-UsbDmxPlugin.lo plugins_usbdmx_libolausbdmx_la_OBJECTS = \ $(am_plugins_usbdmx_libolausbdmx_la_OBJECTS) plugins_usbdmx_libolausbdmx_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_LIBUSB_TRUE@am_plugins_usbdmx_libolausbdmx_la_rpath = -rpath \ @USE_LIBUSB_TRUE@ $(libdir) @USE_LIBUSB_TRUE@plugins_usbdmx_libolausbdmxwidget_la_DEPENDENCIES = \ @USE_LIBUSB_TRUE@ $(am__DEPENDENCIES_1) common/libolacommon.la \ @USE_LIBUSB_TRUE@ libs/usb/libolausb.la am__plugins_usbdmx_libolausbdmxwidget_la_SOURCES_DIST = \ plugins/usbdmx/AnymauDMX.cpp plugins/usbdmx/AnymauDMX.h \ plugins/usbdmx/AnymauDMXFactory.cpp \ plugins/usbdmx/AnymauDMXFactory.h \ plugins/usbdmx/AsyncUsbReceiver.cpp \ plugins/usbdmx/AsyncUsbReceiver.h \ plugins/usbdmx/AsyncUsbSender.cpp \ plugins/usbdmx/AsyncUsbSender.h \ plugins/usbdmx/AsyncUsbTransceiverBase.cpp \ plugins/usbdmx/AsyncUsbTransceiverBase.h \ plugins/usbdmx/DMXCProjectsNodleU1.cpp \ plugins/usbdmx/DMXCProjectsNodleU1.h \ plugins/usbdmx/DMXCProjectsNodleU1Factory.cpp \ plugins/usbdmx/DMXCProjectsNodleU1Factory.h \ plugins/usbdmx/EurolitePro.cpp plugins/usbdmx/EurolitePro.h \ plugins/usbdmx/EuroliteProFactory.cpp \ plugins/usbdmx/EuroliteProFactory.h \ plugins/usbdmx/FirmwareLoader.h plugins/usbdmx/Flags.cpp \ plugins/usbdmx/JaRuleFactory.cpp \ plugins/usbdmx/JaRuleFactory.h \ plugins/usbdmx/ScanlimeFadecandy.cpp \ plugins/usbdmx/ScanlimeFadecandy.h \ plugins/usbdmx/ScanlimeFadecandyFactory.cpp \ plugins/usbdmx/ScanlimeFadecandyFactory.h \ plugins/usbdmx/Sunlite.cpp plugins/usbdmx/Sunlite.h \ plugins/usbdmx/SunliteFactory.cpp \ plugins/usbdmx/SunliteFactory.h \ plugins/usbdmx/SunliteFirmware.h \ plugins/usbdmx/SunliteFirmwareLoader.cpp \ plugins/usbdmx/SunliteFirmwareLoader.h \ plugins/usbdmx/SyncronizedWidgetObserver.cpp \ plugins/usbdmx/SyncronizedWidgetObserver.h \ plugins/usbdmx/ThreadedUsbReceiver.cpp \ plugins/usbdmx/ThreadedUsbReceiver.h \ plugins/usbdmx/ThreadedUsbSender.cpp \ plugins/usbdmx/ThreadedUsbSender.h \ plugins/usbdmx/VellemanK8062.cpp \ plugins/usbdmx/VellemanK8062.h \ plugins/usbdmx/VellemanK8062Factory.cpp \ plugins/usbdmx/VellemanK8062Factory.h plugins/usbdmx/Widget.h \ plugins/usbdmx/WidgetFactory.h @USE_LIBUSB_TRUE@am_plugins_usbdmx_libolausbdmxwidget_la_OBJECTS = plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMX.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMXFactory.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbReceiver.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbSender.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbTransceiverBase.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1Factory.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EurolitePro.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EuroliteProFactory.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Flags.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-JaRuleFactory.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandy.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandyFactory.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Sunlite.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFactory.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFirmwareLoader.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SyncronizedWidgetObserver.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbReceiver.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbSender.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062.lo \ @USE_LIBUSB_TRUE@ plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062Factory.lo plugins_usbdmx_libolausbdmxwidget_la_OBJECTS = \ $(am_plugins_usbdmx_libolausbdmxwidget_la_OBJECTS) plugins_usbdmx_libolausbdmxwidget_la_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_LIBUSB_TRUE@am_plugins_usbdmx_libolausbdmxwidget_la_rpath = @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_libolausbpro_la_DEPENDENCIES = olad/plugin_api/libolaserverplugininterface.la \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/libolausbprowidget.la \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/messages/libolausbproconf.la am__plugins_usbpro_libolausbpro_la_SOURCES_DIST = \ plugins/usbpro/ArduinoRGBDevice.cpp \ plugins/usbpro/ArduinoRGBDevice.h \ plugins/usbpro/DmxTriDevice.cpp plugins/usbpro/DmxTriDevice.h \ plugins/usbpro/DmxterDevice.cpp plugins/usbpro/DmxterDevice.h \ plugins/usbpro/RobeDevice.cpp plugins/usbpro/RobeDevice.h \ plugins/usbpro/UltraDMXProDevice.cpp \ plugins/usbpro/UltraDMXProDevice.h \ plugins/usbpro/UsbProDevice.cpp plugins/usbpro/UsbProDevice.h \ plugins/usbpro/UsbSerialDevice.h \ plugins/usbpro/UsbSerialPlugin.cpp \ plugins/usbpro/UsbSerialPlugin.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_libolausbpro_la_OBJECTS = plugins/usbpro/plugins_usbpro_libolausbpro_la-ArduinoRGBDevice.lo \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxTriDevice.lo \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxterDevice.lo \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_libolausbpro_la-RobeDevice.lo \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_libolausbpro_la-UltraDMXProDevice.lo \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbProDevice.lo \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbSerialPlugin.lo plugins_usbpro_libolausbpro_la_OBJECTS = \ $(am_plugins_usbpro_libolausbpro_la_OBJECTS) plugins_usbpro_libolausbpro_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_libolausbpro_la_rpath = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ -rpath $(libdir) @USING_WIN32_FALSE@plugins_usbpro_libolausbprowidget_la_DEPENDENCIES = \ @USING_WIN32_FALSE@ common/libolacommon.la am__plugins_usbpro_libolausbprowidget_la_SOURCES_DIST = \ plugins/usbpro/ArduinoWidget.cpp \ plugins/usbpro/ArduinoWidget.h \ plugins/usbpro/BaseRobeWidget.cpp \ plugins/usbpro/BaseRobeWidget.h \ plugins/usbpro/BaseUsbProWidget.cpp \ plugins/usbpro/BaseUsbProWidget.h \ plugins/usbpro/DmxTriWidget.cpp plugins/usbpro/DmxTriWidget.h \ plugins/usbpro/DmxterWidget.cpp plugins/usbpro/DmxterWidget.h \ plugins/usbpro/EnttecUsbProWidget.cpp \ plugins/usbpro/EnttecUsbProWidget.h \ plugins/usbpro/EnttecUsbProWidgetImpl.h \ plugins/usbpro/GenericUsbProWidget.cpp \ plugins/usbpro/GenericUsbProWidget.h \ plugins/usbpro/RobeWidget.cpp plugins/usbpro/RobeWidget.h \ plugins/usbpro/RobeWidgetDetector.cpp \ plugins/usbpro/RobeWidgetDetector.h \ plugins/usbpro/SerialWidgetInterface.h \ plugins/usbpro/UltraDMXProWidget.cpp \ plugins/usbpro/UltraDMXProWidget.h \ plugins/usbpro/UsbProWidgetDetector.cpp \ plugins/usbpro/UsbProWidgetDetector.h \ plugins/usbpro/WidgetDetectorInterface.h \ plugins/usbpro/WidgetDetectorThread.cpp \ plugins/usbpro/WidgetDetectorThread.h @USING_WIN32_FALSE@am_plugins_usbpro_libolausbprowidget_la_OBJECTS = \ @USING_WIN32_FALSE@ plugins/usbpro/ArduinoWidget.lo \ @USING_WIN32_FALSE@ plugins/usbpro/BaseRobeWidget.lo \ @USING_WIN32_FALSE@ plugins/usbpro/BaseUsbProWidget.lo \ @USING_WIN32_FALSE@ plugins/usbpro/DmxTriWidget.lo \ @USING_WIN32_FALSE@ plugins/usbpro/DmxterWidget.lo \ @USING_WIN32_FALSE@ plugins/usbpro/EnttecUsbProWidget.lo \ @USING_WIN32_FALSE@ plugins/usbpro/GenericUsbProWidget.lo \ @USING_WIN32_FALSE@ plugins/usbpro/RobeWidget.lo \ @USING_WIN32_FALSE@ plugins/usbpro/RobeWidgetDetector.lo \ @USING_WIN32_FALSE@ plugins/usbpro/UltraDMXProWidget.lo \ @USING_WIN32_FALSE@ plugins/usbpro/UsbProWidgetDetector.lo \ @USING_WIN32_FALSE@ plugins/usbpro/WidgetDetectorThread.lo plugins_usbpro_libolausbprowidget_la_OBJECTS = \ $(am_plugins_usbpro_libolausbprowidget_la_OBJECTS) @USING_WIN32_FALSE@am_plugins_usbpro_libolausbprowidget_la_rpath = @USING_WIN32_FALSE@plugins_usbpro_messages_libolausbproconf_la_DEPENDENCIES = \ @USING_WIN32_FALSE@ $(am__DEPENDENCIES_1) @USING_WIN32_FALSE@nodist_plugins_usbpro_messages_libolausbproconf_la_OBJECTS = plugins/usbpro/messages/plugins_usbpro_messages_libolausbproconf_la-UsbProConfigMessages.pb.lo plugins_usbpro_messages_libolausbproconf_la_OBJECTS = \ $(nodist_plugins_usbpro_messages_libolausbproconf_la_OBJECTS) plugins_usbpro_messages_libolausbproconf_la_LINK = $(LIBTOOL) \ $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) \ $(plugins_usbpro_messages_libolausbproconf_la_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ @USING_WIN32_FALSE@am_plugins_usbpro_messages_libolausbproconf_la_rpath = \ @USING_WIN32_FALSE@ -rpath $(libdir) @USING_WIN32_FALSE@tools_e133_libolae133common_la_DEPENDENCIES = \ @USING_WIN32_FALSE@ libs/acn/libolae131core.la am__tools_e133_libolae133common_la_SOURCES_DIST = \ tools/e133/E133HealthCheckedConnection.cpp \ tools/e133/E133HealthCheckedConnection.h \ tools/e133/E133Receiver.cpp tools/e133/E133StatusHelper.cpp \ tools/e133/MessageBuilder.cpp @USING_WIN32_FALSE@am_tools_e133_libolae133common_la_OBJECTS = \ @USING_WIN32_FALSE@ tools/e133/E133HealthCheckedConnection.lo \ @USING_WIN32_FALSE@ tools/e133/E133Receiver.lo \ @USING_WIN32_FALSE@ tools/e133/E133StatusHelper.lo \ @USING_WIN32_FALSE@ tools/e133/MessageBuilder.lo tools_e133_libolae133common_la_OBJECTS = \ $(am_tools_e133_libolae133common_la_OBJECTS) @INSTALL_E133_FALSE@@USING_WIN32_FALSE@am_tools_e133_libolae133common_la_rpath = @INSTALL_E133_TRUE@@USING_WIN32_FALSE@am_tools_e133_libolae133common_la_rpath = \ @INSTALL_E133_TRUE@@USING_WIN32_FALSE@ -rpath $(libdir) @USING_WIN32_FALSE@tools_e133_libolae133controller_la_DEPENDENCIES = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolae131core.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la am__tools_e133_libolae133controller_la_SOURCES_DIST = \ tools/e133/DeviceManager.cpp tools/e133/DeviceManagerImpl.cpp \ tools/e133/DeviceManagerImpl.h @USING_WIN32_FALSE@am_tools_e133_libolae133controller_la_OBJECTS = \ @USING_WIN32_FALSE@ tools/e133/DeviceManager.lo \ @USING_WIN32_FALSE@ tools/e133/DeviceManagerImpl.lo tools_e133_libolae133controller_la_OBJECTS = \ $(am_tools_e133_libolae133controller_la_OBJECTS) @INSTALL_E133_FALSE@@USING_WIN32_FALSE@am_tools_e133_libolae133controller_la_rpath = @INSTALL_E133_TRUE@@USING_WIN32_FALSE@am_tools_e133_libolae133controller_la_rpath = \ @INSTALL_E133_TRUE@@USING_WIN32_FALSE@ -rpath $(libdir) @USING_WIN32_FALSE@tools_e133_libolae133device_la_DEPENDENCIES = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolae131core.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la am__tools_e133_libolae133device_la_SOURCES_DIST = \ tools/e133/DesignatedControllerConnection.cpp \ tools/e133/DesignatedControllerConnection.h \ tools/e133/E133Device.cpp tools/e133/E133Device.h \ tools/e133/E133Endpoint.cpp tools/e133/E133Endpoint.h \ tools/e133/EndpointManager.cpp tools/e133/EndpointManager.h \ tools/e133/ManagementEndpoint.cpp \ tools/e133/ManagementEndpoint.h tools/e133/SimpleE133Node.cpp \ tools/e133/SimpleE133Node.h tools/e133/TCPConnectionStats.h @USING_WIN32_FALSE@am_tools_e133_libolae133device_la_OBJECTS = tools/e133/DesignatedControllerConnection.lo \ @USING_WIN32_FALSE@ tools/e133/E133Device.lo \ @USING_WIN32_FALSE@ tools/e133/E133Endpoint.lo \ @USING_WIN32_FALSE@ tools/e133/EndpointManager.lo \ @USING_WIN32_FALSE@ tools/e133/ManagementEndpoint.lo \ @USING_WIN32_FALSE@ tools/e133/SimpleE133Node.lo tools_e133_libolae133device_la_OBJECTS = \ $(am_tools_e133_libolae133device_la_OBJECTS) @INSTALL_E133_FALSE@@USING_WIN32_FALSE@am_tools_e133_libolae133device_la_rpath = @INSTALL_E133_TRUE@@USING_WIN32_FALSE@am_tools_e133_libolae133device_la_rpath = \ @INSTALL_E133_TRUE@@USING_WIN32_FALSE@ -rpath $(libdir) tools_ola_trigger_libolatrigger_la_DEPENDENCIES = \ common/libolacommon.la am_tools_ola_trigger_libolatrigger_la_OBJECTS = \ tools/ola_trigger/Action.lo tools/ola_trigger/Context.lo \ tools/ola_trigger/DMXTrigger.lo \ tools/ola_trigger/VariableInterpolator.lo tools_ola_trigger_libolatrigger_la_OBJECTS = \ $(am_tools_ola_trigger_libolatrigger_la_OBJECTS) @BUILD_EXAMPLES_TRUE@am__EXEEXT_1 = examples/ola_dev_info$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ examples/ola_rdm_discover$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ examples/ola_rdm_get$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ examples/ola_recorder$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ examples/ola_streaming_client$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ examples/ola_timecode$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ examples/ola_uni_stats$(EXEEXT) @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@am__EXEEXT_2 = examples/ola_e131$(EXEEXT) @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@am__EXEEXT_3 = examples/ola_usbpro$(EXEEXT) @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@am__EXEEXT_4 = examples/ola_artnet$(EXEEXT) @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_TRUE@am__EXEEXT_5 = examples/ola_dmxconsole$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_TRUE@ examples/ola_dmxmonitor$(EXEEXT) @BUILD_JA_RULE_TRUE@am__EXEEXT_6 = tools/ja-rule/ja-rule$(EXEEXT) \ @BUILD_JA_RULE_TRUE@ tools/ja-rule/ja-rule-controller$(EXEEXT) @HAVE_SALEAE_LOGIC_TRUE@am__EXEEXT_7 = tools/logic/logic_rdm_sniffer$(EXEEXT) @USING_WIN32_FALSE@am__EXEEXT_8 = \ @USING_WIN32_FALSE@ tools/usbpro/usbpro_firmware$(EXEEXT) \ @USING_WIN32_FALSE@ tools/rdmpro/rdmpro_sniffer$(EXEEXT) @BUILD_TESTS_TRUE@am__EXEEXT_9 = data/rdm/PidDataTester$(EXEEXT) @USE_LIBUSB_TRUE@am__EXEEXT_10 = libs/usb/LibUsbThreadTester$(EXEEXT) @USE_ARTNET_TRUE@am__EXEEXT_11 = plugins/artnet/ArtNetTester$(EXEEXT) @USE_DUMMY_TRUE@am__EXEEXT_12 = \ @USE_DUMMY_TRUE@ plugins/dummy/DummyPluginTester$(EXEEXT) @USE_ESPNET_TRUE@am__EXEEXT_13 = plugins/espnet/EspNetTester$(EXEEXT) @USE_KINET_TRUE@am__EXEEXT_14 = plugins/kinet/KiNetTester$(EXEEXT) @USE_OPENPIXELCONTROL_TRUE@am__EXEEXT_15 = plugins/openpixelcontrol/OPCClientTester$(EXEEXT) \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCServerTester$(EXEEXT) @USE_OSC_TRUE@am__EXEEXT_16 = plugins/osc/OSCTester$(EXEEXT) @USE_SHOWNET_TRUE@am__EXEEXT_17 = \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetTester$(EXEEXT) @USE_SPI_TRUE@am__EXEEXT_18 = plugins/spi/SPITester$(EXEEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__EXEEXT_19 = plugins/usbpro/ArduinoWidgetTester$(EXEEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/BaseRobeWidgetTester$(EXEEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/BaseUsbProWidgetTester$(EXEEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/DmxTriWidgetTester$(EXEEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/DmxterWidgetTester$(EXEEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/EnttecUsbProWidgetTester$(EXEEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/RobeWidgetDetectorTester$(EXEEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/RobeWidgetTester$(EXEEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UltraDMXProWidgetTester$(EXEEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UsbProWidgetDetectorTester$(EXEEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/WidgetDetectorThreadTester$(EXEEXT) am__EXEEXT_20 = common/base/CredentialsTester$(EXEEXT) \ common/base/FlagsTester$(EXEEXT) \ common/base/LoggingTester$(EXEEXT) \ common/dmx/RunLengthEncoderTester$(EXEEXT) \ common/export_map/ExportMapTester$(EXEEXT) \ common/file/UtilTester$(EXEEXT) \ common/io/DescriptorTester$(EXEEXT) \ common/io/IOQueueTester$(EXEEXT) \ common/io/IOStackTester$(EXEEXT) \ common/io/MemoryBlockTester$(EXEEXT) \ common/io/SelectServerTester$(EXEEXT) \ common/io/StreamTester$(EXEEXT) \ common/io/TimeoutManagerTester$(EXEEXT) \ common/messaging/DescriptorTester$(EXEEXT) \ common/network/HealthCheckedConnectionTester$(EXEEXT) \ common/network/NetworkTester$(EXEEXT) \ common/network/TCPConnectorTester$(EXEEXT) \ common/rdm/DiscoveryAgentTester$(EXEEXT) \ common/rdm/PidStoreTester$(EXEEXT) \ common/rdm/QueueingRDMControllerTester$(EXEEXT) \ common/rdm/RDMAPITester$(EXEEXT) \ common/rdm/RDMCommandSerializerTester$(EXEEXT) \ common/rdm/RDMCommandTester$(EXEEXT) \ common/rdm/RDMFrameTester$(EXEEXT) \ common/rdm/RDMHelperTester$(EXEEXT) \ common/rdm/RDMMessageTester$(EXEEXT) \ common/rdm/RDMReplyTester$(EXEEXT) \ common/rdm/UIDAllocatorTester$(EXEEXT) \ common/rdm/UIDTester$(EXEEXT) common/rpc/RpcTester$(EXEEXT) \ common/rpc/RpcServerTester$(EXEEXT) \ common/strings/UtilsTester$(EXEEXT) \ common/thread/ExecutorThreadTester$(EXEEXT) \ common/thread/ThreadTester$(EXEEXT) \ common/thread/FutureTester$(EXEEXT) \ common/timecode/TimeCodeTester$(EXEEXT) \ common/utils/UtilsTester$(EXEEXT) \ common/web/JsonTester$(EXEEXT) \ common/web/ParserTester$(EXEEXT) \ common/web/PtchParserTester$(EXEEXT) \ common/web/PtchTester$(EXEEXT) \ common/web/PointerTester$(EXEEXT) \ common/web/PointerTrackerTester$(EXEEXT) \ common/web/SchemaParserTester$(EXEEXT) \ common/web/SchemaTester$(EXEEXT) \ common/web/SectionsTester$(EXEEXT) $(am__EXEEXT_9) \ libs/acn/E131Tester$(EXEEXT) libs/acn/E133Tester$(EXEEXT) \ libs/acn/TransportTester$(EXEEXT) $(am__EXEEXT_10) \ ola/OlaClientTester$(EXEEXT) \ olad/plugin_api/ClientTester$(EXEEXT) \ olad/plugin_api/DeviceTester$(EXEEXT) \ olad/plugin_api/DmxSourceTester$(EXEEXT) \ olad/plugin_api/PortTester$(EXEEXT) \ olad/plugin_api/PreferencesTester$(EXEEXT) \ olad/plugin_api/UniverseTester$(EXEEXT) $(am__EXEEXT_11) \ $(am__EXEEXT_12) $(am__EXEEXT_13) $(am__EXEEXT_14) \ $(am__EXEEXT_15) $(am__EXEEXT_16) $(am__EXEEXT_17) \ $(am__EXEEXT_18) $(am__EXEEXT_19) olad/OlaTester$(EXEEXT) \ tools/ola_trigger/ActionTester$(EXEEXT) @BUILD_EXAMPLES_TRUE@am__EXEEXT_21 = doxygen/examples/callback_client_transmit$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/client_disconnect$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/client_thread$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/fetch_plugins$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/flags$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/legacy_callback_client_transmit$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/legacy_receiver$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/legacy_streaming_client$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/receiver$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/stdin_handler$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/streaming_client$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ doxygen/examples/udp_server$(EXEEXT) @BUILD_EXAMPLES_TRUE@@HAVE_DLOPEN_TRUE@am__EXEEXT_22 = doxygen/examples/streaming_client_plugin$(EXEEXT) @BUILD_EXAMPLES_TRUE@am__EXEEXT_23 = examples/ola_throughput$(EXEEXT) \ @BUILD_EXAMPLES_TRUE@ examples/ola_latency$(EXEEXT) @USE_ARTNET_TRUE@am__EXEEXT_24 = \ @USE_ARTNET_TRUE@ plugins/artnet/artnet_loadtest$(EXEEXT) @BUILD_OLA_PROTOC_PLUGIN_TRUE@am__EXEEXT_25 = protoc/ola_protoc_plugin$(EXEEXT) @USING_WIN32_FALSE@am__EXEEXT_26 = \ @USING_WIN32_FALSE@ tools/e133/basic_controller$(EXEEXT) \ @USING_WIN32_FALSE@ tools/e133/basic_device$(EXEEXT) \ @USING_WIN32_FALSE@ tools/e133/e133_controller$(EXEEXT) \ @USING_WIN32_FALSE@ tools/e133/e133_monitor$(EXEEXT) \ @USING_WIN32_FALSE@ tools/e133/e133_receiver$(EXEEXT) PROGRAMS = $(bin_PROGRAMS) $(noinst_PROGRAMS) am_common_base_CredentialsTester_OBJECTS = common/base/common_base_CredentialsTester-CredentialsTest.$(OBJEXT) common_base_CredentialsTester_OBJECTS = \ $(am_common_base_CredentialsTester_OBJECTS) @USING_WIN32_TRUE@am__DEPENDENCIES_6 = $(am__DEPENDENCIES_1) am__DEPENDENCIES_7 = $(am__DEPENDENCIES_1) \ common/testing/libolatesting.la common/testing/libtestmain.la \ common/libolacommon.la $(am__DEPENDENCIES_6) common_base_CredentialsTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_base_CredentialsTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_base_CredentialsTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_base_FlagsTester_OBJECTS = \ common/base/common_base_FlagsTester-FlagsTest.$(OBJEXT) common_base_FlagsTester_OBJECTS = \ $(am_common_base_FlagsTester_OBJECTS) common_base_FlagsTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_base_FlagsTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_base_FlagsTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_base_LoggingTester_OBJECTS = \ common/base/common_base_LoggingTester-LoggingTest.$(OBJEXT) common_base_LoggingTester_OBJECTS = \ $(am_common_base_LoggingTester_OBJECTS) common_base_LoggingTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_base_LoggingTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_base_LoggingTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_dmx_RunLengthEncoderTester_OBJECTS = common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.$(OBJEXT) common_dmx_RunLengthEncoderTester_OBJECTS = \ $(am_common_dmx_RunLengthEncoderTester_OBJECTS) common_dmx_RunLengthEncoderTester_DEPENDENCIES = \ $(am__DEPENDENCIES_7) common_dmx_RunLengthEncoderTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(common_dmx_RunLengthEncoderTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_export_map_ExportMapTester_OBJECTS = common/export_map/common_export_map_ExportMapTester-ExportMapTest.$(OBJEXT) common_export_map_ExportMapTester_OBJECTS = \ $(am_common_export_map_ExportMapTester_OBJECTS) common_export_map_ExportMapTester_DEPENDENCIES = \ $(am__DEPENDENCIES_7) common_export_map_ExportMapTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(common_export_map_ExportMapTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_file_UtilTester_OBJECTS = \ common/file/common_file_UtilTester-UtilTest.$(OBJEXT) common_file_UtilTester_OBJECTS = $(am_common_file_UtilTester_OBJECTS) common_file_UtilTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_file_UtilTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_file_UtilTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_io_DescriptorTester_OBJECTS = \ common/io/common_io_DescriptorTester-DescriptorTest.$(OBJEXT) common_io_DescriptorTester_OBJECTS = \ $(am_common_io_DescriptorTester_OBJECTS) common_io_DescriptorTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_io_DescriptorTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_io_DescriptorTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_io_IOQueueTester_OBJECTS = \ common/io/common_io_IOQueueTester-IOQueueTest.$(OBJEXT) common_io_IOQueueTester_OBJECTS = \ $(am_common_io_IOQueueTester_OBJECTS) common_io_IOQueueTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_io_IOQueueTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_io_IOQueueTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_io_IOStackTester_OBJECTS = \ common/io/common_io_IOStackTester-IOStackTest.$(OBJEXT) common_io_IOStackTester_OBJECTS = \ $(am_common_io_IOStackTester_OBJECTS) common_io_IOStackTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_io_IOStackTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_io_IOStackTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_io_MemoryBlockTester_OBJECTS = common/io/common_io_MemoryBlockTester-MemoryBlockTest.$(OBJEXT) common_io_MemoryBlockTester_OBJECTS = \ $(am_common_io_MemoryBlockTester_OBJECTS) common_io_MemoryBlockTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_io_MemoryBlockTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_io_MemoryBlockTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_io_SelectServerTester_OBJECTS = common/io/common_io_SelectServerTester-SelectServerTest.$(OBJEXT) \ common/io/common_io_SelectServerTester-SelectServerThreadTest.$(OBJEXT) common_io_SelectServerTester_OBJECTS = \ $(am_common_io_SelectServerTester_OBJECTS) common_io_SelectServerTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_io_SelectServerTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_io_SelectServerTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_io_StreamTester_OBJECTS = \ common/io/common_io_StreamTester-InputStreamTest.$(OBJEXT) \ common/io/common_io_StreamTester-OutputStreamTest.$(OBJEXT) common_io_StreamTester_OBJECTS = $(am_common_io_StreamTester_OBJECTS) common_io_StreamTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_io_StreamTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_io_StreamTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_io_TimeoutManagerTester_OBJECTS = common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.$(OBJEXT) common_io_TimeoutManagerTester_OBJECTS = \ $(am_common_io_TimeoutManagerTester_OBJECTS) common_io_TimeoutManagerTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_io_TimeoutManagerTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_io_TimeoutManagerTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_messaging_DescriptorTester_OBJECTS = common/messaging/common_messaging_DescriptorTester-DescriptorTest.$(OBJEXT) \ common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.$(OBJEXT) \ common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.$(OBJEXT) common_messaging_DescriptorTester_OBJECTS = \ $(am_common_messaging_DescriptorTester_OBJECTS) common_messaging_DescriptorTester_DEPENDENCIES = \ $(am__DEPENDENCIES_7) common_messaging_DescriptorTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(common_messaging_DescriptorTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_network_HealthCheckedConnectionTester_OBJECTS = common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.$(OBJEXT) common_network_HealthCheckedConnectionTester_OBJECTS = \ $(am_common_network_HealthCheckedConnectionTester_OBJECTS) common_network_HealthCheckedConnectionTester_DEPENDENCIES = \ $(am__DEPENDENCIES_7) common_network_HealthCheckedConnectionTester_LINK = $(LIBTOOL) \ $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \ --mode=link $(CXXLD) \ $(common_network_HealthCheckedConnectionTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_network_NetworkTester_OBJECTS = common/network/common_network_NetworkTester-IPV4AddressTest.$(OBJEXT) \ common/network/common_network_NetworkTester-InterfacePickerTest.$(OBJEXT) \ common/network/common_network_NetworkTester-InterfaceTest.$(OBJEXT) \ common/network/common_network_NetworkTester-MACAddressTest.$(OBJEXT) \ common/network/common_network_NetworkTester-NetworkUtilsTest.$(OBJEXT) \ common/network/common_network_NetworkTester-SocketAddressTest.$(OBJEXT) \ common/network/common_network_NetworkTester-SocketTest.$(OBJEXT) common_network_NetworkTester_OBJECTS = \ $(am_common_network_NetworkTester_OBJECTS) common_network_NetworkTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_network_NetworkTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) \ $(common_network_NetworkTester_LDFLAGS) $(LDFLAGS) -o $@ am_common_network_TCPConnectorTester_OBJECTS = common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.$(OBJEXT) \ common/network/common_network_TCPConnectorTester-TCPConnectorTest.$(OBJEXT) common_network_TCPConnectorTester_OBJECTS = \ $(am_common_network_TCPConnectorTester_OBJECTS) common_network_TCPConnectorTester_DEPENDENCIES = \ $(am__DEPENDENCIES_7) common_network_TCPConnectorTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(common_network_TCPConnectorTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_rdm_DiscoveryAgentTester_OBJECTS = common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.$(OBJEXT) common_rdm_DiscoveryAgentTester_OBJECTS = \ $(am_common_rdm_DiscoveryAgentTester_OBJECTS) common_rdm_DiscoveryAgentTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_rdm_DiscoveryAgentTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rdm_DiscoveryAgentTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_rdm_PidStoreTester_OBJECTS = common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.$(OBJEXT) \ common/rdm/common_rdm_PidStoreTester-PidStoreTest.$(OBJEXT) common_rdm_PidStoreTester_OBJECTS = \ $(am_common_rdm_PidStoreTester_OBJECTS) common_rdm_PidStoreTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_rdm_PidStoreTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rdm_PidStoreTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_rdm_QueueingRDMControllerTester_OBJECTS = common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.$(OBJEXT) common_rdm_QueueingRDMControllerTester_OBJECTS = \ $(am_common_rdm_QueueingRDMControllerTester_OBJECTS) common_rdm_QueueingRDMControllerTester_DEPENDENCIES = \ $(am__DEPENDENCIES_7) common_rdm_QueueingRDMControllerTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(common_rdm_QueueingRDMControllerTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_rdm_RDMAPITester_OBJECTS = \ common/rdm/common_rdm_RDMAPITester-RDMAPITest.$(OBJEXT) common_rdm_RDMAPITester_OBJECTS = \ $(am_common_rdm_RDMAPITester_OBJECTS) common_rdm_RDMAPITester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_rdm_RDMAPITester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rdm_RDMAPITester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_rdm_RDMCommandSerializerTester_OBJECTS = common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.$(OBJEXT) common_rdm_RDMCommandSerializerTester_OBJECTS = \ $(am_common_rdm_RDMCommandSerializerTester_OBJECTS) common_rdm_RDMCommandSerializerTester_DEPENDENCIES = \ $(am__DEPENDENCIES_7) common_rdm_RDMCommandSerializerTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(common_rdm_RDMCommandSerializerTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_rdm_RDMCommandTester_OBJECTS = common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.$(OBJEXT) common_rdm_RDMCommandTester_OBJECTS = \ $(am_common_rdm_RDMCommandTester_OBJECTS) common_rdm_RDMCommandTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_rdm_RDMCommandTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rdm_RDMCommandTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_rdm_RDMFrameTester_OBJECTS = \ common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.$(OBJEXT) common_rdm_RDMFrameTester_OBJECTS = \ $(am_common_rdm_RDMFrameTester_OBJECTS) common_rdm_RDMFrameTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_rdm_RDMFrameTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rdm_RDMFrameTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_rdm_RDMHelperTester_OBJECTS = \ common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.$(OBJEXT) common_rdm_RDMHelperTester_OBJECTS = \ $(am_common_rdm_RDMHelperTester_OBJECTS) common_rdm_RDMHelperTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_rdm_RDMHelperTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rdm_RDMHelperTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_rdm_RDMMessageTester_OBJECTS = common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.$(OBJEXT) \ common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.$(OBJEXT) \ common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.$(OBJEXT) \ common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.$(OBJEXT) \ common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.$(OBJEXT) \ common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.$(OBJEXT) common_rdm_RDMMessageTester_OBJECTS = \ $(am_common_rdm_RDMMessageTester_OBJECTS) common_rdm_RDMMessageTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_rdm_RDMMessageTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_rdm_RDMReplyTester_OBJECTS = \ common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.$(OBJEXT) common_rdm_RDMReplyTester_OBJECTS = \ $(am_common_rdm_RDMReplyTester_OBJECTS) common_rdm_RDMReplyTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_rdm_RDMReplyTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rdm_RDMReplyTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_rdm_UIDAllocatorTester_OBJECTS = common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.$(OBJEXT) common_rdm_UIDAllocatorTester_OBJECTS = \ $(am_common_rdm_UIDAllocatorTester_OBJECTS) common_rdm_UIDAllocatorTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_rdm_UIDAllocatorTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rdm_UIDAllocatorTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_rdm_UIDTester_OBJECTS = \ common/rdm/common_rdm_UIDTester-UIDTest.$(OBJEXT) common_rdm_UIDTester_OBJECTS = $(am_common_rdm_UIDTester_OBJECTS) common_rdm_UIDTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_rdm_UIDTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rdm_UIDTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am__objects_11 = \ common/rpc/common_rpc_RpcServerTester-TestService.$(OBJEXT) am_common_rpc_RpcServerTester_OBJECTS = \ common/rpc/common_rpc_RpcServerTester-RpcServerTest.$(OBJEXT) \ $(am__objects_11) nodist_common_rpc_RpcServerTester_OBJECTS = common/rpc/common_rpc_RpcServerTester-TestService.pb.$(OBJEXT) \ common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.$(OBJEXT) common_rpc_RpcServerTester_OBJECTS = \ $(am_common_rpc_RpcServerTester_OBJECTS) \ $(nodist_common_rpc_RpcServerTester_OBJECTS) common_rpc_RpcServerTester_DEPENDENCIES = $(am__DEPENDENCIES_7) \ $(am__DEPENDENCIES_1) common_rpc_RpcServerTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__objects_12 = \ common/rpc/common_rpc_RpcTester-TestService.$(OBJEXT) am_common_rpc_RpcTester_OBJECTS = \ common/rpc/common_rpc_RpcTester-RpcControllerTest.$(OBJEXT) \ common/rpc/common_rpc_RpcTester-RpcChannelTest.$(OBJEXT) \ common/rpc/common_rpc_RpcTester-RpcHeaderTest.$(OBJEXT) \ $(am__objects_12) nodist_common_rpc_RpcTester_OBJECTS = \ common/rpc/common_rpc_RpcTester-TestService.pb.$(OBJEXT) \ common/rpc/common_rpc_RpcTester-TestServiceService.pb.$(OBJEXT) common_rpc_RpcTester_OBJECTS = $(am_common_rpc_RpcTester_OBJECTS) \ $(nodist_common_rpc_RpcTester_OBJECTS) common_rpc_RpcTester_DEPENDENCIES = $(am__DEPENDENCIES_7) \ $(am__DEPENDENCIES_1) common_rpc_RpcTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_strings_UtilsTester_OBJECTS = \ common/strings/common_strings_UtilsTester-UtilsTest.$(OBJEXT) common_strings_UtilsTester_OBJECTS = \ $(am_common_strings_UtilsTester_OBJECTS) common_strings_UtilsTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_strings_UtilsTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_strings_UtilsTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_thread_ExecutorThreadTester_OBJECTS = common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.$(OBJEXT) common_thread_ExecutorThreadTester_OBJECTS = \ $(am_common_thread_ExecutorThreadTester_OBJECTS) common_thread_ExecutorThreadTester_DEPENDENCIES = \ $(am__DEPENDENCIES_7) common_thread_ExecutorThreadTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(common_thread_ExecutorThreadTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_thread_FutureTester_OBJECTS = \ common/thread/common_thread_FutureTester-FutureTest.$(OBJEXT) common_thread_FutureTester_OBJECTS = \ $(am_common_thread_FutureTester_OBJECTS) common_thread_FutureTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_thread_FutureTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_thread_FutureTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_thread_ThreadTester_OBJECTS = common/thread/common_thread_ThreadTester-ThreadPoolTest.$(OBJEXT) \ common/thread/common_thread_ThreadTester-ThreadTest.$(OBJEXT) common_thread_ThreadTester_OBJECTS = \ $(am_common_thread_ThreadTester_OBJECTS) common_thread_ThreadTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_thread_ThreadTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_thread_ThreadTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_timecode_TimeCodeTester_OBJECTS = common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.$(OBJEXT) common_timecode_TimeCodeTester_OBJECTS = \ $(am_common_timecode_TimeCodeTester_OBJECTS) common_timecode_TimeCodeTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_timecode_TimeCodeTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_timecode_TimeCodeTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_utils_UtilsTester_OBJECTS = common/utils/common_utils_UtilsTester-ActionQueueTest.$(OBJEXT) \ common/utils/common_utils_UtilsTester-BackoffTest.$(OBJEXT) \ common/utils/common_utils_UtilsTester-CallbackTest.$(OBJEXT) \ common/utils/common_utils_UtilsTester-ClockTest.$(OBJEXT) \ common/utils/common_utils_UtilsTester-DmxBufferTest.$(OBJEXT) \ common/utils/common_utils_UtilsTester-MultiCallbackTest.$(OBJEXT) \ common/utils/common_utils_UtilsTester-StringUtilsTest.$(OBJEXT) \ common/utils/common_utils_UtilsTester-TokenBucketTest.$(OBJEXT) \ common/utils/common_utils_UtilsTester-UtilsTest.$(OBJEXT) \ common/utils/common_utils_UtilsTester-WatchdogTest.$(OBJEXT) common_utils_UtilsTester_OBJECTS = \ $(am_common_utils_UtilsTester_OBJECTS) common_utils_UtilsTester_DEPENDENCIES = $(am__DEPENDENCIES_7) common_utils_UtilsTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_web_JsonTester_OBJECTS = \ common/web/common_web_JsonTester-JsonTest.$(OBJEXT) common_web_JsonTester_OBJECTS = $(am_common_web_JsonTester_OBJECTS) am__DEPENDENCIES_8 = $(am__DEPENDENCIES_7) common/web/libolaweb.la common_web_JsonTester_DEPENDENCIES = $(am__DEPENDENCIES_8) common_web_JsonTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_web_JsonTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_web_ParserTester_OBJECTS = \ common/web/common_web_ParserTester-ParserTest.$(OBJEXT) common_web_ParserTester_OBJECTS = \ $(am_common_web_ParserTester_OBJECTS) common_web_ParserTester_DEPENDENCIES = $(am__DEPENDENCIES_8) common_web_ParserTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_web_ParserTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_web_PointerTester_OBJECTS = \ common/web/common_web_PointerTester-PointerTest.$(OBJEXT) common_web_PointerTester_OBJECTS = \ $(am_common_web_PointerTester_OBJECTS) common_web_PointerTester_DEPENDENCIES = $(am__DEPENDENCIES_8) common_web_PointerTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_web_PointerTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_web_PointerTrackerTester_OBJECTS = common/web/common_web_PointerTrackerTester-PointerTrackerTest.$(OBJEXT) common_web_PointerTrackerTester_OBJECTS = \ $(am_common_web_PointerTrackerTester_OBJECTS) common_web_PointerTrackerTester_DEPENDENCIES = $(am__DEPENDENCIES_8) common_web_PointerTrackerTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_web_PointerTrackerTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_web_PtchParserTester_OBJECTS = common/web/common_web_PtchParserTester-PatchParserTest.$(OBJEXT) common_web_PtchParserTester_OBJECTS = \ $(am_common_web_PtchParserTester_OBJECTS) common_web_PtchParserTester_DEPENDENCIES = $(am__DEPENDENCIES_8) common_web_PtchParserTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_web_PtchParserTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_web_PtchTester_OBJECTS = \ common/web/common_web_PtchTester-PatchTest.$(OBJEXT) common_web_PtchTester_OBJECTS = $(am_common_web_PtchTester_OBJECTS) common_web_PtchTester_DEPENDENCIES = $(am__DEPENDENCIES_8) common_web_PtchTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_web_PtchTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_web_SchemaParserTester_OBJECTS = common/web/common_web_SchemaParserTester-SchemaParserTest.$(OBJEXT) common_web_SchemaParserTester_OBJECTS = \ $(am_common_web_SchemaParserTester_OBJECTS) common_web_SchemaParserTester_DEPENDENCIES = $(am__DEPENDENCIES_8) common_web_SchemaParserTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_web_SchemaParserTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_common_web_SchemaTester_OBJECTS = \ common/web/common_web_SchemaTester-SchemaTest.$(OBJEXT) common_web_SchemaTester_OBJECTS = \ $(am_common_web_SchemaTester_OBJECTS) common_web_SchemaTester_DEPENDENCIES = $(am__DEPENDENCIES_8) common_web_SchemaTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_web_SchemaTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_common_web_SectionsTester_OBJECTS = \ common/web/common_web_SectionsTester-SectionsTest.$(OBJEXT) common_web_SectionsTester_OBJECTS = \ $(am_common_web_SectionsTester_OBJECTS) common_web_SectionsTester_DEPENDENCIES = $(am__DEPENDENCIES_8) common_web_SectionsTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(common_web_SectionsTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_data_rdm_PidDataTester_OBJECTS = \ data/rdm/data_rdm_PidDataTester-PidDataTest.$(OBJEXT) data_rdm_PidDataTester_OBJECTS = $(am_data_rdm_PidDataTester_OBJECTS) data_rdm_PidDataTester_DEPENDENCIES = $(am__DEPENDENCIES_7) data_rdm_PidDataTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(data_rdm_PidDataTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_doxygen_examples_callback_client_transmit_OBJECTS = \ doxygen/examples/callback_client_transmit.$(OBJEXT) doxygen_examples_callback_client_transmit_OBJECTS = \ $(am_doxygen_examples_callback_client_transmit_OBJECTS) doxygen_examples_callback_client_transmit_DEPENDENCIES = \ $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_client_disconnect_OBJECTS = \ doxygen/examples/client_disconnect.$(OBJEXT) doxygen_examples_client_disconnect_OBJECTS = \ $(am_doxygen_examples_client_disconnect_OBJECTS) doxygen_examples_client_disconnect_DEPENDENCIES = \ $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_client_thread_OBJECTS = \ doxygen/examples/client_thread.$(OBJEXT) doxygen_examples_client_thread_OBJECTS = \ $(am_doxygen_examples_client_thread_OBJECTS) doxygen_examples_client_thread_DEPENDENCIES = \ $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_fetch_plugins_OBJECTS = \ doxygen/examples/fetch_plugins.$(OBJEXT) doxygen_examples_fetch_plugins_OBJECTS = \ $(am_doxygen_examples_fetch_plugins_OBJECTS) doxygen_examples_fetch_plugins_DEPENDENCIES = \ $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_flags_OBJECTS = doxygen/examples/flags.$(OBJEXT) doxygen_examples_flags_OBJECTS = $(am_doxygen_examples_flags_OBJECTS) doxygen_examples_flags_DEPENDENCIES = $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_legacy_callback_client_transmit_OBJECTS = \ doxygen/examples/legacy_callback_client_transmit.$(OBJEXT) doxygen_examples_legacy_callback_client_transmit_OBJECTS = $(am_doxygen_examples_legacy_callback_client_transmit_OBJECTS) doxygen_examples_legacy_callback_client_transmit_DEPENDENCIES = \ $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_legacy_receiver_OBJECTS = \ doxygen/examples/legacy_receiver.$(OBJEXT) doxygen_examples_legacy_receiver_OBJECTS = \ $(am_doxygen_examples_legacy_receiver_OBJECTS) doxygen_examples_legacy_receiver_DEPENDENCIES = \ $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_legacy_streaming_client_OBJECTS = \ doxygen/examples/legacy_streaming_client.$(OBJEXT) doxygen_examples_legacy_streaming_client_OBJECTS = \ $(am_doxygen_examples_legacy_streaming_client_OBJECTS) doxygen_examples_legacy_streaming_client_DEPENDENCIES = \ $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_receiver_OBJECTS = \ doxygen/examples/receiver.$(OBJEXT) doxygen_examples_receiver_OBJECTS = \ $(am_doxygen_examples_receiver_OBJECTS) doxygen_examples_receiver_DEPENDENCIES = $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_stdin_handler_OBJECTS = \ doxygen/examples/stdin_handler.$(OBJEXT) doxygen_examples_stdin_handler_OBJECTS = \ $(am_doxygen_examples_stdin_handler_OBJECTS) doxygen_examples_stdin_handler_DEPENDENCIES = \ $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_streaming_client_OBJECTS = \ doxygen/examples/streaming_client.$(OBJEXT) doxygen_examples_streaming_client_OBJECTS = \ $(am_doxygen_examples_streaming_client_OBJECTS) doxygen_examples_streaming_client_DEPENDENCIES = \ $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_streaming_client_plugin_OBJECTS = \ doxygen/examples/streaming_client_plugin.$(OBJEXT) doxygen_examples_streaming_client_plugin_OBJECTS = \ $(am_doxygen_examples_streaming_client_plugin_OBJECTS) doxygen_examples_streaming_client_plugin_DEPENDENCIES = \ $(DOXYGEN_EXAMPLES_LDADD) am_doxygen_examples_udp_server_OBJECTS = \ doxygen/examples/udp_server.$(OBJEXT) doxygen_examples_udp_server_OBJECTS = \ $(am_doxygen_examples_udp_server_OBJECTS) doxygen_examples_udp_server_DEPENDENCIES = $(DOXYGEN_EXAMPLES_LDADD) am__examples_ola_artnet_SOURCES_DIST = examples/ola-artnet.cpp @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@am_examples_ola_artnet_OBJECTS = examples/examples_ola_artnet-ola-artnet.$(OBJEXT) examples_ola_artnet_OBJECTS = $(am_examples_ola_artnet_OBJECTS) @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@examples_ola_artnet_DEPENDENCIES = examples/libolaconfig.la \ @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@ $(EXAMPLE_COMMON_LIBS) \ @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@ plugins/artnet/messages/libolaartnetconf.la \ @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@ $(am__DEPENDENCIES_1) examples_ola_artnet_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(examples_ola_artnet_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am__examples_ola_dev_info_SOURCES_DIST = examples/ola-client.cpp @BUILD_EXAMPLES_TRUE@am_examples_ola_dev_info_OBJECTS = \ @BUILD_EXAMPLES_TRUE@ examples/ola-client.$(OBJEXT) examples_ola_dev_info_OBJECTS = $(am_examples_ola_dev_info_OBJECTS) @BUILD_EXAMPLES_TRUE@examples_ola_dev_info_DEPENDENCIES = \ @BUILD_EXAMPLES_TRUE@ $(EXAMPLE_COMMON_LIBS) am__examples_ola_dmxconsole_SOURCES_DIST = \ examples/ola-dmxconsole.cpp @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_TRUE@am_examples_ola_dmxconsole_OBJECTS = examples/ola-dmxconsole.$(OBJEXT) examples_ola_dmxconsole_OBJECTS = \ $(am_examples_ola_dmxconsole_OBJECTS) @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_PKGCONFIG_FALSE@@HAVE_NCURSES_TRUE@examples_ola_dmxconsole_DEPENDENCIES = $(EXAMPLE_COMMON_LIBS) @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_PKGCONFIG_TRUE@@HAVE_NCURSES_TRUE@examples_ola_dmxconsole_DEPENDENCIES = $(EXAMPLE_COMMON_LIBS) \ @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_PKGCONFIG_TRUE@@HAVE_NCURSES_TRUE@ $(am__DEPENDENCIES_1) am__examples_ola_dmxmonitor_SOURCES_DIST = \ examples/ola-dmxmonitor.cpp @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_TRUE@am_examples_ola_dmxmonitor_OBJECTS = examples/ola-dmxmonitor.$(OBJEXT) examples_ola_dmxmonitor_OBJECTS = \ $(am_examples_ola_dmxmonitor_OBJECTS) @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_PKGCONFIG_FALSE@@HAVE_NCURSES_TRUE@examples_ola_dmxmonitor_DEPENDENCIES = $(EXAMPLE_COMMON_LIBS) @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_PKGCONFIG_TRUE@@HAVE_NCURSES_TRUE@examples_ola_dmxmonitor_DEPENDENCIES = $(EXAMPLE_COMMON_LIBS) \ @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_PKGCONFIG_TRUE@@HAVE_NCURSES_TRUE@ $(am__DEPENDENCIES_1) am__examples_ola_e131_SOURCES_DIST = examples/ola-e131.cpp @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@am_examples_ola_e131_OBJECTS = examples/examples_ola_e131-ola-e131.$(OBJEXT) examples_ola_e131_OBJECTS = $(am_examples_ola_e131_OBJECTS) @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@examples_ola_e131_DEPENDENCIES = \ @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@ examples/libolaconfig.la \ @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@ $(EXAMPLE_COMMON_LIBS) \ @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@ plugins/e131/messages/libolae131conf.la \ @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@ $(am__DEPENDENCIES_1) examples_ola_e131_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(examples_ola_e131_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am__examples_ola_latency_SOURCES_DIST = examples/ola-latency.cpp @BUILD_EXAMPLES_TRUE@am_examples_ola_latency_OBJECTS = \ @BUILD_EXAMPLES_TRUE@ examples/ola-latency.$(OBJEXT) examples_ola_latency_OBJECTS = $(am_examples_ola_latency_OBJECTS) @BUILD_EXAMPLES_TRUE@examples_ola_latency_DEPENDENCIES = \ @BUILD_EXAMPLES_TRUE@ $(EXAMPLE_COMMON_LIBS) am__examples_ola_rdm_discover_SOURCES_DIST = \ examples/ola-rdm-discover.cpp @BUILD_EXAMPLES_TRUE@am_examples_ola_rdm_discover_OBJECTS = \ @BUILD_EXAMPLES_TRUE@ examples/ola-rdm-discover.$(OBJEXT) examples_ola_rdm_discover_OBJECTS = \ $(am_examples_ola_rdm_discover_OBJECTS) @BUILD_EXAMPLES_TRUE@examples_ola_rdm_discover_DEPENDENCIES = \ @BUILD_EXAMPLES_TRUE@ $(EXAMPLE_COMMON_LIBS) am__examples_ola_rdm_get_SOURCES_DIST = examples/ola-rdm.cpp @BUILD_EXAMPLES_TRUE@am_examples_ola_rdm_get_OBJECTS = \ @BUILD_EXAMPLES_TRUE@ examples/ola-rdm.$(OBJEXT) examples_ola_rdm_get_OBJECTS = $(am_examples_ola_rdm_get_OBJECTS) @BUILD_EXAMPLES_TRUE@examples_ola_rdm_get_DEPENDENCIES = \ @BUILD_EXAMPLES_TRUE@ $(EXAMPLE_COMMON_LIBS) am__examples_ola_recorder_SOURCES_DIST = examples/ola-recorder.cpp \ examples/ShowLoader.h examples/ShowLoader.cpp \ examples/ShowPlayer.h examples/ShowPlayer.cpp \ examples/ShowRecorder.h examples/ShowRecorder.cpp \ examples/ShowSaver.h examples/ShowSaver.cpp @BUILD_EXAMPLES_TRUE@am_examples_ola_recorder_OBJECTS = \ @BUILD_EXAMPLES_TRUE@ examples/ola-recorder.$(OBJEXT) \ @BUILD_EXAMPLES_TRUE@ examples/ShowLoader.$(OBJEXT) \ @BUILD_EXAMPLES_TRUE@ examples/ShowPlayer.$(OBJEXT) \ @BUILD_EXAMPLES_TRUE@ examples/ShowRecorder.$(OBJEXT) \ @BUILD_EXAMPLES_TRUE@ examples/ShowSaver.$(OBJEXT) examples_ola_recorder_OBJECTS = $(am_examples_ola_recorder_OBJECTS) @BUILD_EXAMPLES_TRUE@examples_ola_recorder_DEPENDENCIES = \ @BUILD_EXAMPLES_TRUE@ $(EXAMPLE_COMMON_LIBS) am__examples_ola_streaming_client_SOURCES_DIST = \ examples/ola-streaming-client.cpp @BUILD_EXAMPLES_TRUE@am_examples_ola_streaming_client_OBJECTS = \ @BUILD_EXAMPLES_TRUE@ examples/ola-streaming-client.$(OBJEXT) examples_ola_streaming_client_OBJECTS = \ $(am_examples_ola_streaming_client_OBJECTS) @BUILD_EXAMPLES_TRUE@examples_ola_streaming_client_DEPENDENCIES = \ @BUILD_EXAMPLES_TRUE@ $(EXAMPLE_COMMON_LIBS) am__examples_ola_throughput_SOURCES_DIST = \ examples/ola-throughput.cpp @BUILD_EXAMPLES_TRUE@am_examples_ola_throughput_OBJECTS = \ @BUILD_EXAMPLES_TRUE@ examples/ola-throughput.$(OBJEXT) examples_ola_throughput_OBJECTS = \ $(am_examples_ola_throughput_OBJECTS) @BUILD_EXAMPLES_TRUE@examples_ola_throughput_DEPENDENCIES = \ @BUILD_EXAMPLES_TRUE@ $(EXAMPLE_COMMON_LIBS) am__examples_ola_timecode_SOURCES_DIST = examples/ola-timecode.cpp @BUILD_EXAMPLES_TRUE@am_examples_ola_timecode_OBJECTS = \ @BUILD_EXAMPLES_TRUE@ examples/ola-timecode.$(OBJEXT) examples_ola_timecode_OBJECTS = $(am_examples_ola_timecode_OBJECTS) @BUILD_EXAMPLES_TRUE@examples_ola_timecode_DEPENDENCIES = \ @BUILD_EXAMPLES_TRUE@ $(EXAMPLE_COMMON_LIBS) am__examples_ola_uni_stats_SOURCES_DIST = examples/ola-uni-stats.cpp @BUILD_EXAMPLES_TRUE@am_examples_ola_uni_stats_OBJECTS = \ @BUILD_EXAMPLES_TRUE@ examples/ola-uni-stats.$(OBJEXT) examples_ola_uni_stats_OBJECTS = $(am_examples_ola_uni_stats_OBJECTS) @BUILD_EXAMPLES_TRUE@examples_ola_uni_stats_DEPENDENCIES = \ @BUILD_EXAMPLES_TRUE@ $(EXAMPLE_COMMON_LIBS) am__examples_ola_usbpro_SOURCES_DIST = examples/ola-usbpro.cpp @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@am_examples_ola_usbpro_OBJECTS = examples/examples_ola_usbpro-ola-usbpro.$(OBJEXT) examples_ola_usbpro_OBJECTS = $(am_examples_ola_usbpro_OBJECTS) @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@examples_ola_usbpro_DEPENDENCIES = examples/libolaconfig.la \ @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@ $(EXAMPLE_COMMON_LIBS) \ @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@ plugins/usbpro/messages/libolausbproconf.la \ @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@ $(am__DEPENDENCIES_1) examples_ola_usbpro_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(examples_ola_usbpro_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_libs_acn_E131Tester_OBJECTS = \ libs/acn/libs_acn_E131Tester-BaseInflatorTest.$(OBJEXT) \ libs/acn/libs_acn_E131Tester-CIDTest.$(OBJEXT) \ libs/acn/libs_acn_E131Tester-DMPAddressTest.$(OBJEXT) \ libs/acn/libs_acn_E131Tester-DMPInflatorTest.$(OBJEXT) \ libs/acn/libs_acn_E131Tester-DMPPDUTest.$(OBJEXT) \ libs/acn/libs_acn_E131Tester-E131InflatorTest.$(OBJEXT) \ libs/acn/libs_acn_E131Tester-E131PDUTest.$(OBJEXT) \ libs/acn/libs_acn_E131Tester-HeaderSetTest.$(OBJEXT) \ libs/acn/libs_acn_E131Tester-PDUTest.$(OBJEXT) \ libs/acn/libs_acn_E131Tester-RootInflatorTest.$(OBJEXT) \ libs/acn/libs_acn_E131Tester-RootPDUTest.$(OBJEXT) \ libs/acn/libs_acn_E131Tester-RootSenderTest.$(OBJEXT) libs_acn_E131Tester_OBJECTS = $(am_libs_acn_E131Tester_OBJECTS) libs_acn_E131Tester_DEPENDENCIES = libs/acn/libolae131core.la \ $(am__DEPENDENCIES_7) am_libs_acn_E133Tester_OBJECTS = \ libs/acn/libs_acn_E133Tester-E133InflatorTest.$(OBJEXT) \ libs/acn/libs_acn_E133Tester-E133PDUTest.$(OBJEXT) \ libs/acn/libs_acn_E133Tester-RDMPDUTest.$(OBJEXT) libs_acn_E133Tester_OBJECTS = $(am_libs_acn_E133Tester_OBJECTS) libs_acn_E133Tester_DEPENDENCIES = libs/acn/libolae131core.la \ $(am__DEPENDENCIES_7) am_libs_acn_TransportTester_OBJECTS = \ libs/acn/libs_acn_TransportTester-TCPTransportTest.$(OBJEXT) \ libs/acn/libs_acn_TransportTester-UDPTransportTest.$(OBJEXT) libs_acn_TransportTester_OBJECTS = \ $(am_libs_acn_TransportTester_OBJECTS) libs_acn_TransportTester_DEPENDENCIES = libs/acn/libolae131core.la \ $(am__DEPENDENCIES_7) am_libs_acn_e131_loadtest_OBJECTS = libs/acn/e131_loadtest.$(OBJEXT) libs_acn_e131_loadtest_OBJECTS = $(am_libs_acn_e131_loadtest_OBJECTS) libs_acn_e131_loadtest_DEPENDENCIES = libs/acn/libolae131core.la am_libs_acn_e131_transmit_test_OBJECTS = \ libs/acn/e131_transmit_test.$(OBJEXT) \ libs/acn/E131TestFramework.$(OBJEXT) libs_acn_e131_transmit_test_OBJECTS = \ $(am_libs_acn_e131_transmit_test_OBJECTS) libs_acn_e131_transmit_test_DEPENDENCIES = libs/acn/libolae131core.la am__libs_usb_LibUsbThreadTester_SOURCES_DIST = \ libs/usb/LibUsbThreadTest.cpp @USE_LIBUSB_TRUE@am_libs_usb_LibUsbThreadTester_OBJECTS = libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.$(OBJEXT) libs_usb_LibUsbThreadTester_OBJECTS = \ $(am_libs_usb_LibUsbThreadTester_OBJECTS) @USE_LIBUSB_TRUE@am__DEPENDENCIES_9 = $(am__DEPENDENCIES_7) \ @USE_LIBUSB_TRUE@ $(am__DEPENDENCIES_1) libs/usb/libolausb.la @USE_LIBUSB_TRUE@libs_usb_LibUsbThreadTester_DEPENDENCIES = \ @USE_LIBUSB_TRUE@ $(am__DEPENDENCIES_9) libs_usb_LibUsbThreadTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(libs_usb_LibUsbThreadTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_ola_OlaClientTester_OBJECTS = \ ola/ola_OlaClientTester-OlaClientWrapperTest.$(OBJEXT) \ ola/ola_OlaClientTester-StreamingClientTest.$(OBJEXT) ola_OlaClientTester_OBJECTS = $(am_ola_OlaClientTester_OBJECTS) ola_OlaClientTester_DEPENDENCIES = $(am__DEPENDENCIES_7) \ $(am__DEPENDENCIES_1) common/libolacommon.la \ olad/libolaserver.la ola/libola.la ola_OlaClientTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(ola_OlaClientTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_olad_OlaTester_OBJECTS = \ olad/olad_OlaTester-PluginManagerTest.$(OBJEXT) \ olad/olad_OlaTester-OlaServerServiceImplTest.$(OBJEXT) olad_OlaTester_OBJECTS = $(am_olad_OlaTester_OBJECTS) am__DEPENDENCIES_10 = $(am__DEPENDENCIES_7) $(am__DEPENDENCIES_1) \ olad/plugin_api/libolaserverplugininterface.la \ olad/libolaserver.la common/libolacommon.la olad_OlaTester_DEPENDENCIES = $(am__DEPENDENCIES_10) olad_OlaTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(olad_OlaTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_olad_olad_OBJECTS = olad/Olad.$(OBJEXT) olad_olad_OBJECTS = $(am_olad_olad_OBJECTS) olad_olad_DEPENDENCIES = olad/libolaserver.la common/libolacommon.la \ ola/libola.la olad_olad_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(olad_olad_LDFLAGS) $(LDFLAGS) -o $@ am_olad_plugin_api_ClientTester_OBJECTS = olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.$(OBJEXT) olad_plugin_api_ClientTester_OBJECTS = \ $(am_olad_plugin_api_ClientTester_OBJECTS) am__DEPENDENCIES_11 = $(am__DEPENDENCIES_7) $(am__DEPENDENCIES_1) \ olad/plugin_api/libolaserverplugininterface.la \ common/libolacommon.la olad_plugin_api_ClientTester_DEPENDENCIES = $(am__DEPENDENCIES_11) olad_plugin_api_ClientTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(olad_plugin_api_ClientTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_olad_plugin_api_DeviceTester_OBJECTS = olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.$(OBJEXT) \ olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.$(OBJEXT) olad_plugin_api_DeviceTester_OBJECTS = \ $(am_olad_plugin_api_DeviceTester_OBJECTS) olad_plugin_api_DeviceTester_DEPENDENCIES = $(am__DEPENDENCIES_11) olad_plugin_api_DeviceTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(olad_plugin_api_DeviceTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_olad_plugin_api_DmxSourceTester_OBJECTS = olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.$(OBJEXT) olad_plugin_api_DmxSourceTester_OBJECTS = \ $(am_olad_plugin_api_DmxSourceTester_OBJECTS) olad_plugin_api_DmxSourceTester_DEPENDENCIES = $(am__DEPENDENCIES_11) olad_plugin_api_DmxSourceTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(olad_plugin_api_DmxSourceTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_olad_plugin_api_PortTester_OBJECTS = \ olad/plugin_api/olad_plugin_api_PortTester-PortTest.$(OBJEXT) \ olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.$(OBJEXT) olad_plugin_api_PortTester_OBJECTS = \ $(am_olad_plugin_api_PortTester_OBJECTS) olad_plugin_api_PortTester_DEPENDENCIES = $(am__DEPENDENCIES_11) olad_plugin_api_PortTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(olad_plugin_api_PortTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_olad_plugin_api_PreferencesTester_OBJECTS = olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.$(OBJEXT) olad_plugin_api_PreferencesTester_OBJECTS = \ $(am_olad_plugin_api_PreferencesTester_OBJECTS) olad_plugin_api_PreferencesTester_DEPENDENCIES = \ $(am__DEPENDENCIES_11) olad_plugin_api_PreferencesTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(olad_plugin_api_PreferencesTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_olad_plugin_api_UniverseTester_OBJECTS = olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.$(OBJEXT) olad_plugin_api_UniverseTester_OBJECTS = \ $(am_olad_plugin_api_UniverseTester_OBJECTS) olad_plugin_api_UniverseTester_DEPENDENCIES = $(am__DEPENDENCIES_11) olad_plugin_api_UniverseTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(olad_plugin_api_UniverseTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_artnet_ArtNetTester_SOURCES_DIST = \ plugins/artnet/ArtNetNodeTest.cpp @USE_ARTNET_TRUE@am_plugins_artnet_ArtNetTester_OBJECTS = plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.$(OBJEXT) plugins_artnet_ArtNetTester_OBJECTS = \ $(am_plugins_artnet_ArtNetTester_OBJECTS) @USE_ARTNET_TRUE@plugins_artnet_ArtNetTester_DEPENDENCIES = \ @USE_ARTNET_TRUE@ $(am__DEPENDENCIES_7) \ @USE_ARTNET_TRUE@ plugins/artnet/libolaartnetnode.la plugins_artnet_ArtNetTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_artnet_ArtNetTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_artnet_artnet_loadtest_SOURCES_DIST = \ plugins/artnet/artnet_loadtest.cpp @USE_ARTNET_TRUE@am_plugins_artnet_artnet_loadtest_OBJECTS = \ @USE_ARTNET_TRUE@ plugins/artnet/artnet_loadtest.$(OBJEXT) plugins_artnet_artnet_loadtest_OBJECTS = \ $(am_plugins_artnet_artnet_loadtest_OBJECTS) @USE_ARTNET_TRUE@plugins_artnet_artnet_loadtest_DEPENDENCIES = \ @USE_ARTNET_TRUE@ plugins/artnet/libolaartnetnode.la am__plugins_dummy_DummyPluginTester_SOURCES_DIST = \ plugins/dummy/DummyPortTest.cpp @USE_DUMMY_TRUE@am_plugins_dummy_DummyPluginTester_OBJECTS = plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.$(OBJEXT) plugins_dummy_DummyPluginTester_OBJECTS = \ $(am_plugins_dummy_DummyPluginTester_OBJECTS) @USE_DUMMY_TRUE@plugins_dummy_DummyPluginTester_DEPENDENCIES = \ @USE_DUMMY_TRUE@ $(am__DEPENDENCIES_7) \ @USE_DUMMY_TRUE@ $(top_builddir)/olad/plugin_api/libolaserverplugininterface.la \ @USE_DUMMY_TRUE@ $(top_builddir)/olad/libolaserver.la \ @USE_DUMMY_TRUE@ plugins/dummy/liboladummy.la \ @USE_DUMMY_TRUE@ common/libolacommon.la plugins_dummy_DummyPluginTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_dummy_DummyPluginTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_espnet_EspNetTester_SOURCES_DIST = \ plugins/espnet/RunLengthDecoderTest.cpp \ plugins/espnet/RunLengthDecoder.cpp @USE_ESPNET_TRUE@am_plugins_espnet_EspNetTester_OBJECTS = plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.$(OBJEXT) \ @USE_ESPNET_TRUE@ plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.$(OBJEXT) plugins_espnet_EspNetTester_OBJECTS = \ $(am_plugins_espnet_EspNetTester_OBJECTS) @USE_ESPNET_TRUE@plugins_espnet_EspNetTester_DEPENDENCIES = \ @USE_ESPNET_TRUE@ $(am__DEPENDENCIES_7) common/libolacommon.la plugins_espnet_EspNetTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_espnet_EspNetTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_kinet_KiNetTester_SOURCES_DIST = \ plugins/kinet/KiNetNodeTest.cpp @USE_KINET_TRUE@am_plugins_kinet_KiNetTester_OBJECTS = plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.$(OBJEXT) plugins_kinet_KiNetTester_OBJECTS = \ $(am_plugins_kinet_KiNetTester_OBJECTS) @USE_KINET_TRUE@plugins_kinet_KiNetTester_DEPENDENCIES = \ @USE_KINET_TRUE@ $(am__DEPENDENCIES_7) \ @USE_KINET_TRUE@ plugins/kinet/libolakinetnode.la plugins_kinet_KiNetTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_kinet_KiNetTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_openpixelcontrol_OPCClientTester_SOURCES_DIST = \ plugins/openpixelcontrol/OPCClientTest.cpp @USE_OPENPIXELCONTROL_TRUE@am_plugins_openpixelcontrol_OPCClientTester_OBJECTS = plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.$(OBJEXT) plugins_openpixelcontrol_OPCClientTester_OBJECTS = \ $(am_plugins_openpixelcontrol_OPCClientTester_OBJECTS) @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_OPCClientTester_DEPENDENCIES = \ @USE_OPENPIXELCONTROL_TRUE@ $(am__DEPENDENCIES_7) \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/libolaopc.la plugins_openpixelcontrol_OPCClientTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_openpixelcontrol_OPCClientTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_openpixelcontrol_OPCServerTester_SOURCES_DIST = \ plugins/openpixelcontrol/OPCServerTest.cpp @USE_OPENPIXELCONTROL_TRUE@am_plugins_openpixelcontrol_OPCServerTester_OBJECTS = plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.$(OBJEXT) plugins_openpixelcontrol_OPCServerTester_OBJECTS = \ $(am_plugins_openpixelcontrol_OPCServerTester_OBJECTS) @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_OPCServerTester_DEPENDENCIES = \ @USE_OPENPIXELCONTROL_TRUE@ $(am__DEPENDENCIES_7) \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/libolaopc.la plugins_openpixelcontrol_OPCServerTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_openpixelcontrol_OPCServerTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_osc_OSCTester_SOURCES_DIST = \ plugins/osc/OSCAddressTemplateTest.cpp \ plugins/osc/OSCNodeTest.cpp @USE_OSC_TRUE@am_plugins_osc_OSCTester_OBJECTS = plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.$(OBJEXT) \ @USE_OSC_TRUE@ plugins/osc/plugins_osc_OSCTester-OSCNodeTest.$(OBJEXT) plugins_osc_OSCTester_OBJECTS = $(am_plugins_osc_OSCTester_OBJECTS) @USE_OSC_TRUE@plugins_osc_OSCTester_DEPENDENCIES = \ @USE_OSC_TRUE@ $(am__DEPENDENCIES_7) \ @USE_OSC_TRUE@ plugins/osc/libolaoscnode.la \ @USE_OSC_TRUE@ common/libolacommon.la plugins_osc_OSCTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_osc_OSCTester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am__plugins_shownet_ShowNetTester_SOURCES_DIST = \ plugins/shownet/ShowNetNode.cpp \ plugins/shownet/ShowNetNodeTest.cpp @USE_SHOWNET_TRUE@am_plugins_shownet_ShowNetTester_OBJECTS = plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.$(OBJEXT) \ @USE_SHOWNET_TRUE@ plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.$(OBJEXT) plugins_shownet_ShowNetTester_OBJECTS = \ $(am_plugins_shownet_ShowNetTester_OBJECTS) @USE_SHOWNET_TRUE@plugins_shownet_ShowNetTester_DEPENDENCIES = \ @USE_SHOWNET_TRUE@ $(am__DEPENDENCIES_7) common/libolacommon.la plugins_shownet_ShowNetTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_shownet_ShowNetTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_spi_SPITester_SOURCES_DIST = \ plugins/spi/SPIBackendTest.cpp plugins/spi/SPIOutputTest.cpp \ plugins/spi/FakeSPIWriter.cpp plugins/spi/FakeSPIWriter.h @USE_SPI_TRUE@am_plugins_spi_SPITester_OBJECTS = plugins/spi/plugins_spi_SPITester-SPIBackendTest.$(OBJEXT) \ @USE_SPI_TRUE@ plugins/spi/plugins_spi_SPITester-SPIOutputTest.$(OBJEXT) \ @USE_SPI_TRUE@ plugins/spi/plugins_spi_SPITester-FakeSPIWriter.$(OBJEXT) plugins_spi_SPITester_OBJECTS = $(am_plugins_spi_SPITester_OBJECTS) @USE_SPI_TRUE@plugins_spi_SPITester_DEPENDENCIES = \ @USE_SPI_TRUE@ $(am__DEPENDENCIES_7) \ @USE_SPI_TRUE@ plugins/spi/libolaspicore.la \ @USE_SPI_TRUE@ common/libolacommon.la plugins_spi_SPITester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am__plugins_usbpro_ArduinoWidgetTester_SOURCES_DIST = \ plugins/usbpro/ArduinoWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.h \ plugins/usbpro/MockEndpoint.cpp plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__objects_13 = plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.$(OBJEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_ArduinoWidgetTester_OBJECTS = plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__objects_13) plugins_usbpro_ArduinoWidgetTester_OBJECTS = \ $(am_plugins_usbpro_ArduinoWidgetTester_OBJECTS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__DEPENDENCIES_12 = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_7) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/libolausbprowidget.la @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_ArduinoWidgetTester_DEPENDENCIES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_12) plugins_usbpro_ArduinoWidgetTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_usbpro_BaseRobeWidgetTester_SOURCES_DIST = \ plugins/usbpro/BaseRobeWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.h \ plugins/usbpro/MockEndpoint.cpp plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__objects_14 = plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.$(OBJEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_BaseRobeWidgetTester_OBJECTS = plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__objects_14) plugins_usbpro_BaseRobeWidgetTester_OBJECTS = \ $(am_plugins_usbpro_BaseRobeWidgetTester_OBJECTS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_BaseRobeWidgetTester_DEPENDENCIES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_12) plugins_usbpro_BaseRobeWidgetTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_usbpro_BaseUsbProWidgetTester_SOURCES_DIST = \ plugins/usbpro/BaseUsbProWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.h \ plugins/usbpro/MockEndpoint.cpp plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__objects_15 = plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.$(OBJEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_BaseUsbProWidgetTester_OBJECTS = plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__objects_15) plugins_usbpro_BaseUsbProWidgetTester_OBJECTS = \ $(am_plugins_usbpro_BaseUsbProWidgetTester_OBJECTS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_BaseUsbProWidgetTester_DEPENDENCIES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_12) plugins_usbpro_BaseUsbProWidgetTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_usbpro_DmxTriWidgetTester_SOURCES_DIST = \ plugins/usbpro/DmxTriWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.h \ plugins/usbpro/MockEndpoint.cpp plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__objects_16 = plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.$(OBJEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_DmxTriWidgetTester_OBJECTS = plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__objects_16) plugins_usbpro_DmxTriWidgetTester_OBJECTS = \ $(am_plugins_usbpro_DmxTriWidgetTester_OBJECTS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_DmxTriWidgetTester_DEPENDENCIES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_12) plugins_usbpro_DmxTriWidgetTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_usbpro_DmxterWidgetTester_SOURCES_DIST = \ plugins/usbpro/DmxterWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.h \ plugins/usbpro/MockEndpoint.cpp plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__objects_17 = plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.$(OBJEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_DmxterWidgetTester_OBJECTS = plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__objects_17) plugins_usbpro_DmxterWidgetTester_OBJECTS = \ $(am_plugins_usbpro_DmxterWidgetTester_OBJECTS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_DmxterWidgetTester_DEPENDENCIES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_12) plugins_usbpro_DmxterWidgetTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_usbpro_EnttecUsbProWidgetTester_SOURCES_DIST = \ plugins/usbpro/EnttecUsbProWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.h \ plugins/usbpro/MockEndpoint.cpp plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__objects_18 = plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.$(OBJEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_EnttecUsbProWidgetTester_OBJECTS = plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__objects_18) plugins_usbpro_EnttecUsbProWidgetTester_OBJECTS = \ $(am_plugins_usbpro_EnttecUsbProWidgetTester_OBJECTS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_EnttecUsbProWidgetTester_DEPENDENCIES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_12) plugins_usbpro_EnttecUsbProWidgetTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_usbpro_RobeWidgetDetectorTester_SOURCES_DIST = \ plugins/usbpro/RobeWidgetDetectorTest.cpp \ plugins/usbpro/CommonWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.h \ plugins/usbpro/MockEndpoint.cpp plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__objects_19 = plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.$(OBJEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_RobeWidgetDetectorTester_OBJECTS = plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__objects_19) plugins_usbpro_RobeWidgetDetectorTester_OBJECTS = \ $(am_plugins_usbpro_RobeWidgetDetectorTester_OBJECTS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_RobeWidgetDetectorTester_DEPENDENCIES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_12) plugins_usbpro_RobeWidgetDetectorTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_usbpro_RobeWidgetTester_SOURCES_DIST = \ plugins/usbpro/RobeWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.h \ plugins/usbpro/MockEndpoint.cpp plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__objects_20 = plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.$(OBJEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_RobeWidgetTester_OBJECTS = plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__objects_20) plugins_usbpro_RobeWidgetTester_OBJECTS = \ $(am_plugins_usbpro_RobeWidgetTester_OBJECTS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_RobeWidgetTester_DEPENDENCIES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_12) plugins_usbpro_RobeWidgetTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_usbpro_UltraDMXProWidgetTester_SOURCES_DIST = \ plugins/usbpro/UltraDMXProWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.h \ plugins/usbpro/MockEndpoint.cpp plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__objects_21 = plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.$(OBJEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_UltraDMXProWidgetTester_OBJECTS = plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__objects_21) plugins_usbpro_UltraDMXProWidgetTester_OBJECTS = \ $(am_plugins_usbpro_UltraDMXProWidgetTester_OBJECTS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_UltraDMXProWidgetTester_DEPENDENCIES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_12) plugins_usbpro_UltraDMXProWidgetTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_usbpro_UsbProWidgetDetectorTester_SOURCES_DIST = \ plugins/usbpro/UsbProWidgetDetectorTest.cpp \ plugins/usbpro/CommonWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.h \ plugins/usbpro/MockEndpoint.cpp plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__objects_22 = plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.$(OBJEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_UsbProWidgetDetectorTester_OBJECTS = plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__objects_22) plugins_usbpro_UsbProWidgetDetectorTester_OBJECTS = \ $(am_plugins_usbpro_UsbProWidgetDetectorTester_OBJECTS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_UsbProWidgetDetectorTester_DEPENDENCIES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_12) plugins_usbpro_UsbProWidgetDetectorTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__plugins_usbpro_WidgetDetectorThreadTester_SOURCES_DIST = \ plugins/usbpro/WidgetDetectorThreadTest.cpp \ plugins/usbpro/CommonWidgetTest.cpp \ plugins/usbpro/CommonWidgetTest.h \ plugins/usbpro/MockEndpoint.cpp plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am__objects_23 = plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.$(OBJEXT) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@am_plugins_usbpro_WidgetDetectorThreadTester_OBJECTS = plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.$(OBJEXT) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__objects_23) plugins_usbpro_WidgetDetectorThreadTester_OBJECTS = \ $(am_plugins_usbpro_WidgetDetectorThreadTester_OBJECTS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_WidgetDetectorThreadTester_DEPENDENCIES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(am__DEPENDENCIES_12) plugins_usbpro_WidgetDetectorThreadTester_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__protoc_ola_protoc_plugin_SOURCES_DIST = \ protoc/CppFileGenerator.cpp protoc/CppFileGenerator.h \ protoc/CppGenerator.cpp protoc/CppGenerator.h \ protoc/GeneratorHelpers.cpp protoc/GeneratorHelpers.h \ protoc/ServiceGenerator.cpp protoc/ServiceGenerator.h \ protoc/StrUtil.cpp protoc/StrUtil.h \ protoc/ola-protoc-generator-plugin.cpp @BUILD_OLA_PROTOC_PLUGIN_TRUE@am_protoc_ola_protoc_plugin_OBJECTS = protoc/protoc_ola_protoc_plugin-CppFileGenerator.$(OBJEXT) \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/protoc_ola_protoc_plugin-CppGenerator.$(OBJEXT) \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/protoc_ola_protoc_plugin-GeneratorHelpers.$(OBJEXT) \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/protoc_ola_protoc_plugin-ServiceGenerator.$(OBJEXT) \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/protoc_ola_protoc_plugin-StrUtil.$(OBJEXT) \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.$(OBJEXT) protoc_ola_protoc_plugin_OBJECTS = \ $(am_protoc_ola_protoc_plugin_OBJECTS) @BUILD_OLA_PROTOC_PLUGIN_TRUE@protoc_ola_protoc_plugin_DEPENDENCIES = \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ $(am__DEPENDENCIES_1) protoc_ola_protoc_plugin_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am__tools_e133_basic_controller_SOURCES_DIST = \ tools/e133/basic-controller.cpp @USING_WIN32_FALSE@am_tools_e133_basic_controller_OBJECTS = \ @USING_WIN32_FALSE@ tools/e133/basic-controller.$(OBJEXT) tools_e133_basic_controller_OBJECTS = \ $(am_tools_e133_basic_controller_OBJECTS) @USING_WIN32_FALSE@tools_e133_basic_controller_DEPENDENCIES = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolaacn.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la am__tools_e133_basic_device_SOURCES_DIST = \ tools/e133/basic-device.cpp @USING_WIN32_FALSE@am_tools_e133_basic_device_OBJECTS = \ @USING_WIN32_FALSE@ tools/e133/basic-device.$(OBJEXT) tools_e133_basic_device_OBJECTS = \ $(am_tools_e133_basic_device_OBJECTS) @USING_WIN32_FALSE@tools_e133_basic_device_DEPENDENCIES = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolaacn.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la am__tools_e133_e133_controller_SOURCES_DIST = \ tools/e133/e133-controller.cpp @USING_WIN32_FALSE@am_tools_e133_e133_controller_OBJECTS = \ @USING_WIN32_FALSE@ tools/e133/e133-controller.$(OBJEXT) tools_e133_e133_controller_OBJECTS = \ $(am_tools_e133_e133_controller_OBJECTS) @USING_WIN32_FALSE@tools_e133_e133_controller_DEPENDENCIES = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolae131core.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la \ @USING_WIN32_FALSE@ tools/e133/libolae133controller.la am__tools_e133_e133_monitor_SOURCES_DIST = \ tools/e133/e133-monitor.cpp @USING_WIN32_FALSE@am_tools_e133_e133_monitor_OBJECTS = \ @USING_WIN32_FALSE@ tools/e133/e133-monitor.$(OBJEXT) tools_e133_e133_monitor_OBJECTS = \ $(am_tools_e133_e133_monitor_OBJECTS) @USING_WIN32_FALSE@tools_e133_e133_monitor_DEPENDENCIES = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolaacn.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la \ @USING_WIN32_FALSE@ tools/e133/libolae133controller.la am__tools_e133_e133_receiver_SOURCES_DIST = \ tools/e133/e133-receiver.cpp @USING_WIN32_FALSE@am_tools_e133_e133_receiver_OBJECTS = \ @USING_WIN32_FALSE@ tools/e133/e133-receiver.$(OBJEXT) tools_e133_e133_receiver_OBJECTS = \ $(am_tools_e133_e133_receiver_OBJECTS) @USING_WIN32_FALSE@tools_e133_e133_receiver_DEPENDENCIES = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolaacn.la \ @USING_WIN32_FALSE@ plugins/usbpro/libolausbprowidget.la \ @USING_WIN32_FALSE@ tools/e133/libolae133device.la \ @USING_WIN32_FALSE@ $(am__append_100) am_tools_ja_rule_ja_rule_OBJECTS = tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.$(OBJEXT) \ tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.$(OBJEXT) tools_ja_rule_ja_rule_OBJECTS = $(am_tools_ja_rule_ja_rule_OBJECTS) tools_ja_rule_ja_rule_DEPENDENCIES = $(am__DEPENDENCIES_1) \ common/libolacommon.la plugins/usbdmx/libolausbdmxwidget.la \ libs/usb/libolausb.la tools_ja_rule_ja_rule_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(tools_ja_rule_ja_rule_CXXFLAGS) $(CXXFLAGS) $(AM_LDFLAGS) \ $(LDFLAGS) -o $@ am_tools_ja_rule_ja_rule_controller_OBJECTS = tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.$(OBJEXT) \ tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.$(OBJEXT) tools_ja_rule_ja_rule_controller_OBJECTS = \ $(am_tools_ja_rule_ja_rule_controller_OBJECTS) tools_ja_rule_ja_rule_controller_DEPENDENCIES = $(am__DEPENDENCIES_1) \ common/libolacommon.la plugins/usbdmx/libolausbdmxwidget.la \ libs/usb/libolausb.la tools_ja_rule_ja_rule_controller_LINK = $(LIBTOOL) $(AM_V_lt) \ --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link \ $(CXXLD) $(tools_ja_rule_ja_rule_controller_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_tools_logic_logic_rdm_sniffer_OBJECTS = \ tools/logic/DMXSignalProcessor.$(OBJEXT) \ tools/logic/logic-rdm-sniffer.$(OBJEXT) tools_logic_logic_rdm_sniffer_OBJECTS = \ $(am_tools_logic_logic_rdm_sniffer_OBJECTS) tools_logic_logic_rdm_sniffer_DEPENDENCIES = common/libolacommon.la \ $(am__DEPENDENCIES_1) am_tools_ola_trigger_ActionTester_OBJECTS = tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.$(OBJEXT) \ tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.$(OBJEXT) \ tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.$(OBJEXT) \ tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.$(OBJEXT) \ tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.$(OBJEXT) \ tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.$(OBJEXT) tools_ola_trigger_ActionTester_OBJECTS = \ $(am_tools_ola_trigger_ActionTester_OBJECTS) tools_ola_trigger_ActionTester_DEPENDENCIES = $(am__DEPENDENCIES_7) \ tools/ola_trigger/libolatrigger.la tools_ola_trigger_ActionTester_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am_tools_ola_trigger_ola_trigger_OBJECTS = tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.$(OBJEXT) \ tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.$(OBJEXT) nodist_tools_ola_trigger_ola_trigger_OBJECTS = tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.$(OBJEXT) \ tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.$(OBJEXT) tools_ola_trigger_ola_trigger_OBJECTS = \ $(am_tools_ola_trigger_ola_trigger_OBJECTS) \ $(nodist_tools_ola_trigger_ola_trigger_OBJECTS) tools_ola_trigger_ola_trigger_DEPENDENCIES = common/libolacommon.la \ ola/libola.la tools/ola_trigger/libolatrigger.la \ $(am__DEPENDENCIES_1) tools_ola_trigger_ola_trigger_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CXXLD) \ $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ am__tools_rdmpro_rdmpro_sniffer_SOURCES_DIST = \ tools/rdmpro/rdm-sniffer.cpp @USING_WIN32_FALSE@am_tools_rdmpro_rdmpro_sniffer_OBJECTS = \ @USING_WIN32_FALSE@ tools/rdmpro/rdm-sniffer.$(OBJEXT) tools_rdmpro_rdmpro_sniffer_OBJECTS = \ $(am_tools_rdmpro_rdmpro_sniffer_OBJECTS) @USING_WIN32_FALSE@tools_rdmpro_rdmpro_sniffer_DEPENDENCIES = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ plugins/usbpro/libolausbprowidget.la am__tools_usbpro_usbpro_firmware_SOURCES_DIST = \ tools/usbpro/usbpro-firmware.cpp @USING_WIN32_FALSE@am_tools_usbpro_usbpro_firmware_OBJECTS = \ @USING_WIN32_FALSE@ tools/usbpro/usbpro-firmware.$(OBJEXT) tools_usbpro_usbpro_firmware_OBJECTS = \ $(am_tools_usbpro_usbpro_firmware_OBJECTS) @USING_WIN32_FALSE@tools_usbpro_usbpro_firmware_DEPENDENCIES = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ plugins/usbpro/libolausbprowidget.la am__dist_noinst_SCRIPTS_DIST = data/rdm/download.sh \ data/rdm/PidDataTest.py include/ola/rdm/make_rdm_codes.sh \ include/ola/timecode/make_timecode.sh \ include/ola/gen_callbacks.py include/ola/make_plugin_id.sh \ python/examples/ola_artnet_params.py \ python/examples/ola_candidate_ports.py \ python/examples/ola_devices.py \ python/examples/ola_fetch_dmx.py \ python/examples/ola_patch_unpatch.py \ python/examples/ola_plugin_info.py \ python/examples/ola_rdm_discover.py \ python/examples/ola_rdm_get.py python/examples/ola_recv_dmx.py \ python/examples/ola_send_dmx.py \ python/examples/ola_simple_fade.py \ python/examples/ola_universe_info.py \ python/examples/rdm_compare.py python/examples/rdm_snapshot.py \ tools/usbpro/download_firmware.sh am__dist_rdmtestsexec_SCRIPTS_DIST = tools/rdm/rdm_model_collector.py \ tools/rdm/rdm_responder_test.py tools/rdm/rdm_test_server.py SCRIPTS = $(dist_noinst_SCRIPTS) $(dist_rdmtestsexec_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f CXXCOMPILE = $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \ $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) LTCXXCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CXXFLAGS) $(CXXFLAGS) AM_V_CXX = $(am__v_CXX_@AM_V@) am__v_CXX_ = $(am__v_CXX_@AM_DEFAULT_V@) am__v_CXX_0 = @echo " CXX " $@; am__v_CXX_1 = CXXLD = $(CXX) CXXLINK = $(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CXXLD) $(AM_CXXFLAGS) \ $(CXXFLAGS) $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CXXLD = $(am__v_CXXLD_@AM_V@) am__v_CXXLD_ = $(am__v_CXXLD_@AM_DEFAULT_V@) am__v_CXXLD_0 = @echo " CXXLD " $@; am__v_CXXLD_1 = COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(common_http_libolahttp_la_SOURCES) \ $(common_libolacommon_la_SOURCES) \ $(nodist_common_libolacommon_la_SOURCES) \ $(nodist_common_protocol_libolaproto_la_SOURCES) \ $(common_testing_libolatesting_la_SOURCES) \ $(common_testing_libtestmain_la_SOURCES) \ $(common_web_libolaweb_la_SOURCES) \ $(examples_libolaconfig_la_SOURCES) \ $(libs_acn_libolaacn_la_SOURCES) \ $(libs_acn_libolae131core_la_SOURCES) \ $(libs_usb_libolausb_la_SOURCES) $(ola_libola_la_SOURCES) \ $(olad_libolaserver_la_SOURCES) \ $(olad_plugin_api_libolaserverplugininterface_la_SOURCES) \ $(plugins_artnet_libolaartnet_la_SOURCES) \ $(plugins_artnet_libolaartnetnode_la_SOURCES) \ $(nodist_plugins_artnet_messages_libolaartnetconf_la_SOURCES) \ $(plugins_dmx4linux_liboladmx4linux_la_SOURCES) \ $(plugins_dummy_liboladummy_la_SOURCES) \ $(plugins_e131_libolae131_la_SOURCES) \ $(nodist_plugins_e131_messages_libolae131conf_la_SOURCES) \ $(plugins_espnet_libolaespnet_la_SOURCES) \ $(plugins_ftdidmx_libolaftdidmx_la_SOURCES) \ $(plugins_gpio_libolagpio_la_SOURCES) \ $(plugins_gpio_libolagpiocore_la_SOURCES) \ $(plugins_karate_libolakarate_la_SOURCES) \ $(plugins_kinet_libolakinet_la_SOURCES) \ $(plugins_kinet_libolakinetnode_la_SOURCES) \ $(plugins_milinst_libolamilinst_la_SOURCES) \ $(plugins_opendmx_libolaopendmx_la_SOURCES) \ $(plugins_openpixelcontrol_libolaopc_la_SOURCES) \ $(plugins_openpixelcontrol_libolaopenpixelcontrol_la_SOURCES) \ $(plugins_osc_libolaosc_la_SOURCES) \ $(plugins_osc_libolaoscnode_la_SOURCES) \ $(plugins_pathport_libolapathport_la_SOURCES) \ $(plugins_renard_libolarenard_la_SOURCES) \ $(plugins_sandnet_libolasandnet_la_SOURCES) \ $(plugins_shownet_libolashownet_la_SOURCES) \ $(plugins_spi_libolaspi_la_SOURCES) \ $(plugins_spi_libolaspicore_la_SOURCES) \ $(plugins_stageprofi_libolastageprofi_la_SOURCES) \ $(plugins_uartdmx_libolauartdmx_la_SOURCES) \ $(plugins_usbdmx_libolausbdmx_la_SOURCES) \ $(plugins_usbdmx_libolausbdmxwidget_la_SOURCES) \ $(plugins_usbpro_libolausbpro_la_SOURCES) \ $(plugins_usbpro_libolausbprowidget_la_SOURCES) \ $(nodist_plugins_usbpro_messages_libolausbproconf_la_SOURCES) \ $(tools_e133_libolae133common_la_SOURCES) \ $(tools_e133_libolae133controller_la_SOURCES) \ $(tools_e133_libolae133device_la_SOURCES) \ $(tools_ola_trigger_libolatrigger_la_SOURCES) \ $(common_base_CredentialsTester_SOURCES) \ $(common_base_FlagsTester_SOURCES) \ $(common_base_LoggingTester_SOURCES) \ $(common_dmx_RunLengthEncoderTester_SOURCES) \ $(common_export_map_ExportMapTester_SOURCES) \ $(common_file_UtilTester_SOURCES) \ $(common_io_DescriptorTester_SOURCES) \ $(common_io_IOQueueTester_SOURCES) \ $(common_io_IOStackTester_SOURCES) \ $(common_io_MemoryBlockTester_SOURCES) \ $(common_io_SelectServerTester_SOURCES) \ $(common_io_StreamTester_SOURCES) \ $(common_io_TimeoutManagerTester_SOURCES) \ $(common_messaging_DescriptorTester_SOURCES) \ $(common_network_HealthCheckedConnectionTester_SOURCES) \ $(common_network_NetworkTester_SOURCES) \ $(common_network_TCPConnectorTester_SOURCES) \ $(common_rdm_DiscoveryAgentTester_SOURCES) \ $(common_rdm_PidStoreTester_SOURCES) \ $(common_rdm_QueueingRDMControllerTester_SOURCES) \ $(common_rdm_RDMAPITester_SOURCES) \ $(common_rdm_RDMCommandSerializerTester_SOURCES) \ $(common_rdm_RDMCommandTester_SOURCES) \ $(common_rdm_RDMFrameTester_SOURCES) \ $(common_rdm_RDMHelperTester_SOURCES) \ $(common_rdm_RDMMessageTester_SOURCES) \ $(common_rdm_RDMReplyTester_SOURCES) \ $(common_rdm_UIDAllocatorTester_SOURCES) \ $(common_rdm_UIDTester_SOURCES) \ $(common_rpc_RpcServerTester_SOURCES) \ $(nodist_common_rpc_RpcServerTester_SOURCES) \ $(common_rpc_RpcTester_SOURCES) \ $(nodist_common_rpc_RpcTester_SOURCES) \ $(common_strings_UtilsTester_SOURCES) \ $(common_thread_ExecutorThreadTester_SOURCES) \ $(common_thread_FutureTester_SOURCES) \ $(common_thread_ThreadTester_SOURCES) \ $(common_timecode_TimeCodeTester_SOURCES) \ $(common_utils_UtilsTester_SOURCES) \ $(common_web_JsonTester_SOURCES) \ $(common_web_ParserTester_SOURCES) \ $(common_web_PointerTester_SOURCES) \ $(common_web_PointerTrackerTester_SOURCES) \ $(common_web_PtchParserTester_SOURCES) \ $(common_web_PtchTester_SOURCES) \ $(common_web_SchemaParserTester_SOURCES) \ $(common_web_SchemaTester_SOURCES) \ $(common_web_SectionsTester_SOURCES) \ $(data_rdm_PidDataTester_SOURCES) \ $(doxygen_examples_callback_client_transmit_SOURCES) \ $(doxygen_examples_client_disconnect_SOURCES) \ $(doxygen_examples_client_thread_SOURCES) \ $(doxygen_examples_fetch_plugins_SOURCES) \ $(doxygen_examples_flags_SOURCES) \ $(doxygen_examples_legacy_callback_client_transmit_SOURCES) \ $(doxygen_examples_legacy_receiver_SOURCES) \ $(doxygen_examples_legacy_streaming_client_SOURCES) \ $(doxygen_examples_receiver_SOURCES) \ $(doxygen_examples_stdin_handler_SOURCES) \ $(doxygen_examples_streaming_client_SOURCES) \ $(doxygen_examples_streaming_client_plugin_SOURCES) \ $(doxygen_examples_udp_server_SOURCES) \ $(examples_ola_artnet_SOURCES) \ $(examples_ola_dev_info_SOURCES) \ $(examples_ola_dmxconsole_SOURCES) \ $(examples_ola_dmxmonitor_SOURCES) \ $(examples_ola_e131_SOURCES) $(examples_ola_latency_SOURCES) \ $(examples_ola_rdm_discover_SOURCES) \ $(examples_ola_rdm_get_SOURCES) \ $(examples_ola_recorder_SOURCES) \ $(examples_ola_streaming_client_SOURCES) \ $(examples_ola_throughput_SOURCES) \ $(examples_ola_timecode_SOURCES) \ $(examples_ola_uni_stats_SOURCES) \ $(examples_ola_usbpro_SOURCES) $(libs_acn_E131Tester_SOURCES) \ $(libs_acn_E133Tester_SOURCES) \ $(libs_acn_TransportTester_SOURCES) \ $(libs_acn_e131_loadtest_SOURCES) \ $(libs_acn_e131_transmit_test_SOURCES) \ $(libs_usb_LibUsbThreadTester_SOURCES) \ $(ola_OlaClientTester_SOURCES) $(olad_OlaTester_SOURCES) \ $(olad_olad_SOURCES) $(olad_plugin_api_ClientTester_SOURCES) \ $(olad_plugin_api_DeviceTester_SOURCES) \ $(olad_plugin_api_DmxSourceTester_SOURCES) \ $(olad_plugin_api_PortTester_SOURCES) \ $(olad_plugin_api_PreferencesTester_SOURCES) \ $(olad_plugin_api_UniverseTester_SOURCES) \ $(plugins_artnet_ArtNetTester_SOURCES) \ $(plugins_artnet_artnet_loadtest_SOURCES) \ $(plugins_dummy_DummyPluginTester_SOURCES) \ $(plugins_espnet_EspNetTester_SOURCES) \ $(plugins_kinet_KiNetTester_SOURCES) \ $(plugins_openpixelcontrol_OPCClientTester_SOURCES) \ $(plugins_openpixelcontrol_OPCServerTester_SOURCES) \ $(plugins_osc_OSCTester_SOURCES) \ $(plugins_shownet_ShowNetTester_SOURCES) \ $(plugins_spi_SPITester_SOURCES) \ $(plugins_usbpro_ArduinoWidgetTester_SOURCES) \ $(plugins_usbpro_BaseRobeWidgetTester_SOURCES) \ $(plugins_usbpro_BaseUsbProWidgetTester_SOURCES) \ $(plugins_usbpro_DmxTriWidgetTester_SOURCES) \ $(plugins_usbpro_DmxterWidgetTester_SOURCES) \ $(plugins_usbpro_EnttecUsbProWidgetTester_SOURCES) \ $(plugins_usbpro_RobeWidgetDetectorTester_SOURCES) \ $(plugins_usbpro_RobeWidgetTester_SOURCES) \ $(plugins_usbpro_UltraDMXProWidgetTester_SOURCES) \ $(plugins_usbpro_UsbProWidgetDetectorTester_SOURCES) \ $(plugins_usbpro_WidgetDetectorThreadTester_SOURCES) \ $(protoc_ola_protoc_plugin_SOURCES) \ $(tools_e133_basic_controller_SOURCES) \ $(tools_e133_basic_device_SOURCES) \ $(tools_e133_e133_controller_SOURCES) \ $(tools_e133_e133_monitor_SOURCES) \ $(tools_e133_e133_receiver_SOURCES) \ $(tools_ja_rule_ja_rule_SOURCES) \ $(tools_ja_rule_ja_rule_controller_SOURCES) \ $(tools_logic_logic_rdm_sniffer_SOURCES) \ $(tools_ola_trigger_ActionTester_SOURCES) \ $(tools_ola_trigger_ola_trigger_SOURCES) \ $(nodist_tools_ola_trigger_ola_trigger_SOURCES) \ $(tools_rdmpro_rdmpro_sniffer_SOURCES) \ $(tools_usbpro_usbpro_firmware_SOURCES) DIST_SOURCES = $(am__common_http_libolahttp_la_SOURCES_DIST) \ $(am__common_libolacommon_la_SOURCES_DIST) \ $(am__common_testing_libolatesting_la_SOURCES_DIST) \ $(am__common_testing_libtestmain_la_SOURCES_DIST) \ $(common_web_libolaweb_la_SOURCES) \ $(am__examples_libolaconfig_la_SOURCES_DIST) \ $(libs_acn_libolaacn_la_SOURCES) \ $(libs_acn_libolae131core_la_SOURCES) \ $(am__libs_usb_libolausb_la_SOURCES_DIST) \ $(ola_libola_la_SOURCES) \ $(am__olad_libolaserver_la_SOURCES_DIST) \ $(olad_plugin_api_libolaserverplugininterface_la_SOURCES) \ $(am__plugins_artnet_libolaartnet_la_SOURCES_DIST) \ $(am__plugins_artnet_libolaartnetnode_la_SOURCES_DIST) \ $(am__plugins_dmx4linux_liboladmx4linux_la_SOURCES_DIST) \ $(am__plugins_dummy_liboladummy_la_SOURCES_DIST) \ $(am__plugins_e131_libolae131_la_SOURCES_DIST) \ $(am__plugins_espnet_libolaespnet_la_SOURCES_DIST) \ $(am__plugins_ftdidmx_libolaftdidmx_la_SOURCES_DIST) \ $(am__plugins_gpio_libolagpio_la_SOURCES_DIST) \ $(am__plugins_gpio_libolagpiocore_la_SOURCES_DIST) \ $(am__plugins_karate_libolakarate_la_SOURCES_DIST) \ $(am__plugins_kinet_libolakinet_la_SOURCES_DIST) \ $(am__plugins_kinet_libolakinetnode_la_SOURCES_DIST) \ $(am__plugins_milinst_libolamilinst_la_SOURCES_DIST) \ $(am__plugins_opendmx_libolaopendmx_la_SOURCES_DIST) \ $(am__plugins_openpixelcontrol_libolaopc_la_SOURCES_DIST) \ $(am__plugins_openpixelcontrol_libolaopenpixelcontrol_la_SOURCES_DIST) \ $(am__plugins_osc_libolaosc_la_SOURCES_DIST) \ $(am__plugins_osc_libolaoscnode_la_SOURCES_DIST) \ $(am__plugins_pathport_libolapathport_la_SOURCES_DIST) \ $(am__plugins_renard_libolarenard_la_SOURCES_DIST) \ $(am__plugins_sandnet_libolasandnet_la_SOURCES_DIST) \ $(am__plugins_shownet_libolashownet_la_SOURCES_DIST) \ $(am__plugins_spi_libolaspi_la_SOURCES_DIST) \ $(am__plugins_spi_libolaspicore_la_SOURCES_DIST) \ $(am__plugins_stageprofi_libolastageprofi_la_SOURCES_DIST) \ $(am__plugins_uartdmx_libolauartdmx_la_SOURCES_DIST) \ $(am__plugins_usbdmx_libolausbdmx_la_SOURCES_DIST) \ $(am__plugins_usbdmx_libolausbdmxwidget_la_SOURCES_DIST) \ $(am__plugins_usbpro_libolausbpro_la_SOURCES_DIST) \ $(am__plugins_usbpro_libolausbprowidget_la_SOURCES_DIST) \ $(am__tools_e133_libolae133common_la_SOURCES_DIST) \ $(am__tools_e133_libolae133controller_la_SOURCES_DIST) \ $(am__tools_e133_libolae133device_la_SOURCES_DIST) \ $(tools_ola_trigger_libolatrigger_la_SOURCES) \ $(common_base_CredentialsTester_SOURCES) \ $(common_base_FlagsTester_SOURCES) \ $(common_base_LoggingTester_SOURCES) \ $(common_dmx_RunLengthEncoderTester_SOURCES) \ $(common_export_map_ExportMapTester_SOURCES) \ $(common_file_UtilTester_SOURCES) \ $(common_io_DescriptorTester_SOURCES) \ $(common_io_IOQueueTester_SOURCES) \ $(common_io_IOStackTester_SOURCES) \ $(common_io_MemoryBlockTester_SOURCES) \ $(common_io_SelectServerTester_SOURCES) \ $(common_io_StreamTester_SOURCES) \ $(common_io_TimeoutManagerTester_SOURCES) \ $(common_messaging_DescriptorTester_SOURCES) \ $(common_network_HealthCheckedConnectionTester_SOURCES) \ $(common_network_NetworkTester_SOURCES) \ $(common_network_TCPConnectorTester_SOURCES) \ $(common_rdm_DiscoveryAgentTester_SOURCES) \ $(common_rdm_PidStoreTester_SOURCES) \ $(common_rdm_QueueingRDMControllerTester_SOURCES) \ $(common_rdm_RDMAPITester_SOURCES) \ $(common_rdm_RDMCommandSerializerTester_SOURCES) \ $(common_rdm_RDMCommandTester_SOURCES) \ $(common_rdm_RDMFrameTester_SOURCES) \ $(common_rdm_RDMHelperTester_SOURCES) \ $(common_rdm_RDMMessageTester_SOURCES) \ $(common_rdm_RDMReplyTester_SOURCES) \ $(common_rdm_UIDAllocatorTester_SOURCES) \ $(common_rdm_UIDTester_SOURCES) \ $(common_rpc_RpcServerTester_SOURCES) \ $(common_rpc_RpcTester_SOURCES) \ $(common_strings_UtilsTester_SOURCES) \ $(common_thread_ExecutorThreadTester_SOURCES) \ $(common_thread_FutureTester_SOURCES) \ $(common_thread_ThreadTester_SOURCES) \ $(common_timecode_TimeCodeTester_SOURCES) \ $(common_utils_UtilsTester_SOURCES) \ $(common_web_JsonTester_SOURCES) \ $(common_web_ParserTester_SOURCES) \ $(common_web_PointerTester_SOURCES) \ $(common_web_PointerTrackerTester_SOURCES) \ $(common_web_PtchParserTester_SOURCES) \ $(common_web_PtchTester_SOURCES) \ $(common_web_SchemaParserTester_SOURCES) \ $(common_web_SchemaTester_SOURCES) \ $(common_web_SectionsTester_SOURCES) \ $(data_rdm_PidDataTester_SOURCES) \ $(doxygen_examples_callback_client_transmit_SOURCES) \ $(doxygen_examples_client_disconnect_SOURCES) \ $(doxygen_examples_client_thread_SOURCES) \ $(doxygen_examples_fetch_plugins_SOURCES) \ $(doxygen_examples_flags_SOURCES) \ $(doxygen_examples_legacy_callback_client_transmit_SOURCES) \ $(doxygen_examples_legacy_receiver_SOURCES) \ $(doxygen_examples_legacy_streaming_client_SOURCES) \ $(doxygen_examples_receiver_SOURCES) \ $(doxygen_examples_stdin_handler_SOURCES) \ $(doxygen_examples_streaming_client_SOURCES) \ $(doxygen_examples_streaming_client_plugin_SOURCES) \ $(doxygen_examples_udp_server_SOURCES) \ $(am__examples_ola_artnet_SOURCES_DIST) \ $(am__examples_ola_dev_info_SOURCES_DIST) \ $(am__examples_ola_dmxconsole_SOURCES_DIST) \ $(am__examples_ola_dmxmonitor_SOURCES_DIST) \ $(am__examples_ola_e131_SOURCES_DIST) \ $(am__examples_ola_latency_SOURCES_DIST) \ $(am__examples_ola_rdm_discover_SOURCES_DIST) \ $(am__examples_ola_rdm_get_SOURCES_DIST) \ $(am__examples_ola_recorder_SOURCES_DIST) \ $(am__examples_ola_streaming_client_SOURCES_DIST) \ $(am__examples_ola_throughput_SOURCES_DIST) \ $(am__examples_ola_timecode_SOURCES_DIST) \ $(am__examples_ola_uni_stats_SOURCES_DIST) \ $(am__examples_ola_usbpro_SOURCES_DIST) \ $(libs_acn_E131Tester_SOURCES) $(libs_acn_E133Tester_SOURCES) \ $(libs_acn_TransportTester_SOURCES) \ $(libs_acn_e131_loadtest_SOURCES) \ $(libs_acn_e131_transmit_test_SOURCES) \ $(am__libs_usb_LibUsbThreadTester_SOURCES_DIST) \ $(ola_OlaClientTester_SOURCES) $(olad_OlaTester_SOURCES) \ $(olad_olad_SOURCES) $(olad_plugin_api_ClientTester_SOURCES) \ $(olad_plugin_api_DeviceTester_SOURCES) \ $(olad_plugin_api_DmxSourceTester_SOURCES) \ $(olad_plugin_api_PortTester_SOURCES) \ $(olad_plugin_api_PreferencesTester_SOURCES) \ $(olad_plugin_api_UniverseTester_SOURCES) \ $(am__plugins_artnet_ArtNetTester_SOURCES_DIST) \ $(am__plugins_artnet_artnet_loadtest_SOURCES_DIST) \ $(am__plugins_dummy_DummyPluginTester_SOURCES_DIST) \ $(am__plugins_espnet_EspNetTester_SOURCES_DIST) \ $(am__plugins_kinet_KiNetTester_SOURCES_DIST) \ $(am__plugins_openpixelcontrol_OPCClientTester_SOURCES_DIST) \ $(am__plugins_openpixelcontrol_OPCServerTester_SOURCES_DIST) \ $(am__plugins_osc_OSCTester_SOURCES_DIST) \ $(am__plugins_shownet_ShowNetTester_SOURCES_DIST) \ $(am__plugins_spi_SPITester_SOURCES_DIST) \ $(am__plugins_usbpro_ArduinoWidgetTester_SOURCES_DIST) \ $(am__plugins_usbpro_BaseRobeWidgetTester_SOURCES_DIST) \ $(am__plugins_usbpro_BaseUsbProWidgetTester_SOURCES_DIST) \ $(am__plugins_usbpro_DmxTriWidgetTester_SOURCES_DIST) \ $(am__plugins_usbpro_DmxterWidgetTester_SOURCES_DIST) \ $(am__plugins_usbpro_EnttecUsbProWidgetTester_SOURCES_DIST) \ $(am__plugins_usbpro_RobeWidgetDetectorTester_SOURCES_DIST) \ $(am__plugins_usbpro_RobeWidgetTester_SOURCES_DIST) \ $(am__plugins_usbpro_UltraDMXProWidgetTester_SOURCES_DIST) \ $(am__plugins_usbpro_UsbProWidgetDetectorTester_SOURCES_DIST) \ $(am__plugins_usbpro_WidgetDetectorThreadTester_SOURCES_DIST) \ $(am__protoc_ola_protoc_plugin_SOURCES_DIST) \ $(am__tools_e133_basic_controller_SOURCES_DIST) \ $(am__tools_e133_basic_device_SOURCES_DIST) \ $(am__tools_e133_e133_controller_SOURCES_DIST) \ $(am__tools_e133_e133_monitor_SOURCES_DIST) \ $(am__tools_e133_e133_receiver_SOURCES_DIST) \ $(tools_ja_rule_ja_rule_SOURCES) \ $(tools_ja_rule_ja_rule_controller_SOURCES) \ $(tools_logic_logic_rdm_sniffer_SOURCES) \ $(tools_ola_trigger_ActionTester_SOURCES) \ $(tools_ola_trigger_ola_trigger_SOURCES) \ $(am__tools_rdmpro_rdmpro_sniffer_SOURCES_DIST) \ $(am__tools_usbpro_usbpro_firmware_SOURCES_DIST) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__py_compile = PYTHON=$(PYTHON) $(SHELL) $(py_compile) am__pep3147_tweak = \ sed -e 's|\.py$$||' -e 's|[^/]*$$|__pycache__/&.*.py|' am__pkgpython_PYTHON_DIST = python/ola/ClientWrapper.py \ python/ola/DMXConstants.py python/ola/DUBDecoder.py \ python/ola/MACAddress.py python/ola/OlaClient.py \ python/ola/RDMAPI.py python/ola/RDMConstants.py \ python/ola/PidStore.py python/ola/UID.py \ python/ola/__init__.py am__rdminit_PYTHON_DIST = tools/rdm/__init__.py am__rdmtests_PYTHON_DIST = tools/rdm/DMXSender.py \ tools/rdm/ExpectedResults.py tools/rdm/ModelCollector.py \ tools/rdm/ResponderTest.py tools/rdm/TestCategory.py \ tools/rdm/TestDefinitions.py tools/rdm/TestHelpers.py \ tools/rdm/TestLogger.py tools/rdm/TestMixins.py \ tools/rdm/TestRunner.py tools/rdm/TimingStats.py \ tools/rdm/TestState.py tools/rdm/__init__.py am__rpcpython_PYTHON_DIST = python/ola/rpc/SimpleRpcController.py \ python/ola/rpc/StreamRpcChannel.py python/ola/rpc/__init__.py py_compile = $(top_srcdir)/config/py-compile man1dir = $(mandir)/man1 NROFF = nroff MANS = $(dist_man_MANS) am__dist_tools_rdm_testserver_images_DATA_DIST = \ tools/rdm/static/images/discovery.png \ tools/rdm/static/images/external.png \ tools/rdm/static/images/favicon.ico \ tools/rdm/static/images/loader.gif \ tools/rdm/static/images/logo.png \ tools/rdm/static/images/ui-bg_flat_0_aaaaaa_40x100.png \ tools/rdm/static/images/ui-bg_flat_0_eeeeee_40x100.png \ tools/rdm/static/images/ui-bg_flat_55_c0402a_40x100.png \ tools/rdm/static/images/ui-bg_flat_55_eeeeee_40x100.png \ tools/rdm/static/images/ui-bg_glass_100_f8f8f8_1x400.png \ tools/rdm/static/images/ui-bg_glass_35_dddddd_1x400.png \ tools/rdm/static/images/ui-bg_glass_60_eeeeee_1x400.png \ tools/rdm/static/images/ui-bg_inset-hard_75_999999_1x100.png \ tools/rdm/static/images/ui-bg_inset-soft_50_c9c9c9_1x100.png \ tools/rdm/static/images/ui-icons_3383bb_256x240.png \ tools/rdm/static/images/ui-icons_454545_256x240.png \ tools/rdm/static/images/ui-icons_70b2e1_256x240.png \ tools/rdm/static/images/ui-icons_999999_256x240.png \ tools/rdm/static/images/ui-icons_fbc856_256x240.png am__dist_tools_rdm_testserver_static_DATA_DIST = \ tools/rdm/static/MIT-LICENSE.txt tools/rdm/static/common.css \ tools/rdm/static/jquery-1.7.2.min.js \ tools/rdm/static/jquery-ui-1.8.21.custom.css \ tools/rdm/static/jquery-ui-1.8.21.custom.min.js \ tools/rdm/static/rdm_tests.js tools/rdm/static/rdmtests.html \ tools/rdm/static/ui.multiselect.css \ tools/rdm/static/ui.multiselect.js DATA = $(dist_angular_DATA) $(dist_angularroute_DATA) \ $(dist_bootcss_DATA) $(dist_bootfonts_DATA) \ $(dist_bootjs_DATA) $(dist_css_DATA) $(dist_img_DATA) \ $(dist_jquery_DATA) $(dist_js_DATA) $(dist_new_DATA) \ $(dist_noinst_DATA) $(dist_piddata_DATA) \ $(dist_tools_rdm_testserver_images_DATA) \ $(dist_tools_rdm_testserver_static_DATA) $(dist_views_DATA) \ $(dist_www_DATA) $(noinst_DATA) $(pkgconfig_DATA) am__olaacninclude_HEADERS_DIST = include/ola/acn/ACNPort.h \ include/ola/acn/ACNVectors.h include/ola/acn/CID.h am__olae133include_HEADERS_DIST = include/ola/e133/DeviceManager.h \ include/ola/e133/E133Enums.h include/ola/e133/E133Receiver.h \ include/ola/e133/E133StatusHelper.h \ include/ola/e133/E133URLParser.h \ include/ola/e133/MessageBuilder.h HEADERS = $(nodist_artnetinclude_HEADERS) \ $(nodist_e131include_HEADERS) $(nodist_olabaseinclude_HEADERS) \ $(nodist_olardminclude_HEADERS) \ $(nodist_olatimecodeinclude_HEADERS) \ $(nodist_pkginclude_HEADERS) $(nodist_usbproinclude_HEADERS) \ $(noinst_HEADERS) $(olaacninclude_HEADERS) \ $(olabaseinclude_HEADERS) $(olaclientinclude_HEADERS) \ $(oladinclude_HEADERS) $(oladmxinclude_HEADERS) \ $(olae133include_HEADERS) $(olafileinclude_HEADERS) \ $(olahttpinclude_HEADERS) $(olaioinclude_HEADERS) \ $(olamathinclude_HEADERS) $(olamessaginginclude_HEADERS) \ $(olanetworkinclude_HEADERS) $(olardminclude_HEADERS) \ $(olarpcinclude_HEADERS) $(olastlinclude_HEADERS) \ $(olastringsinclude_HEADERS) $(olasysteminclude_HEADERS) \ $(olathreadinclude_HEADERS) $(olatimecodeinclude_HEADERS) \ $(olautilinclude_HEADERS) $(olawebinclude_HEADERS) \ $(olawininclude_HEADERS) $(pkginclude_HEADERS) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope check recheck distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) \ $(LISP)config.h.in # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope am__tty_colors_dummy = \ mgn= red= grn= lgn= blu= brg= std=; \ am__color_tests=no am__tty_colors = { \ $(am__tty_colors_dummy); \ if test "X$(AM_COLOR_TESTS)" = Xno; then \ am__color_tests=no; \ elif test "X$(AM_COLOR_TESTS)" = Xalways; then \ am__color_tests=yes; \ elif test "X$$TERM" != Xdumb && { test -t 1; } 2>/dev/null; then \ am__color_tests=yes; \ fi; \ if test $$am__color_tests = yes; then \ red=''; \ grn=''; \ lgn=''; \ blu=''; \ mgn=''; \ brg=''; \ std=''; \ fi; \ } am__recheck_rx = ^[ ]*:recheck:[ ]* am__global_test_result_rx = ^[ ]*:global-test-result:[ ]* am__copy_in_global_log_rx = ^[ ]*:copy-in-global-log:[ ]* # A command that, given a newline-separated list of test names on the # standard input, print the name of the tests that are to be re-run # upon "make recheck". am__list_recheck_tests = $(AWK) '{ \ recheck = 1; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ { \ if ((getline line2 < ($$0 ".log")) < 0) \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[nN][Oo]/) \ { \ recheck = 0; \ break; \ } \ else if (line ~ /$(am__recheck_rx)[yY][eE][sS]/) \ { \ break; \ } \ }; \ if (recheck) \ print $$0; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # A command that, given a newline-separated list of test names on the # standard input, create the global log from their .trs and .log files. am__create_global_log = $(AWK) ' \ function fatal(msg) \ { \ print "fatal: making $@: " msg | "cat >&2"; \ exit 1; \ } \ function rst_section(header) \ { \ print header; \ len = length(header); \ for (i = 1; i <= len; i = i + 1) \ printf "="; \ printf "\n\n"; \ } \ { \ copy_in_global_log = 1; \ global_test_result = "RUN"; \ while ((rc = (getline line < ($$0 ".trs"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".trs"); \ if (line ~ /$(am__global_test_result_rx)/) \ { \ sub("$(am__global_test_result_rx)", "", line); \ sub("[ ]*$$", "", line); \ global_test_result = line; \ } \ else if (line ~ /$(am__copy_in_global_log_rx)[nN][oO]/) \ copy_in_global_log = 0; \ }; \ if (copy_in_global_log) \ { \ rst_section(global_test_result ": " $$0); \ while ((rc = (getline line < ($$0 ".log"))) != 0) \ { \ if (rc < 0) \ fatal("failed to read from " $$0 ".log"); \ print line; \ }; \ printf "\n"; \ }; \ close ($$0 ".trs"); \ close ($$0 ".log"); \ }' # Restructured Text title. am__rst_title = { sed 's/.*/ & /;h;s/./=/g;p;x;s/ *$$//;p;g' && echo; } # Solaris 10 'make', and several other traditional 'make' implementations, # pass "-e" to $(SHELL), and POSIX 2008 even requires this. Work around it # by disabling -e (using the XSI extension "set +e") if it's set. am__sh_e_setup = case $$- in *e*) set +e;; esac # Default flags passed to test drivers. am__common_driver_flags = \ --color-tests "$$am__color_tests" \ --enable-hard-errors "$$am__enable_hard_errors" \ --expect-failure "$$am__expect_failure" # To be inserted before the command running the test. Creates the # directory for the log if needed. Stores in $dir the directory # containing $f, in $tst the test, in $log the log. Executes the # developer- defined test setup AM_TESTS_ENVIRONMENT (if any), and # passes TESTS_ENVIRONMENT. Set up options for the wrapper that # will run the test scripts (or their associated LOG_COMPILER, if # thy have one). am__check_pre = \ $(am__sh_e_setup); \ $(am__vpath_adj_setup) $(am__vpath_adj) \ $(am__tty_colors); \ srcdir=$(srcdir); export srcdir; \ case "$@" in \ */*) am__odir=`echo "./$@" | sed 's|/[^/]*$$||'`;; \ *) am__odir=.;; \ esac; \ test "x$$am__odir" = x"." || test -d "$$am__odir" \ || $(MKDIR_P) "$$am__odir" || exit $$?; \ if test -f "./$$f"; then dir=./; \ elif test -f "$$f"; then dir=; \ else dir="$(srcdir)/"; fi; \ tst=$$dir$$f; log='$@'; \ if test -n '$(DISABLE_HARD_ERRORS)'; then \ am__enable_hard_errors=no; \ else \ am__enable_hard_errors=yes; \ fi; \ case " $(XFAIL_TESTS) " in \ *[\ \ ]$$f[\ \ ]* | *[\ \ ]$$dir$$f[\ \ ]*) \ am__expect_failure=yes;; \ *) \ am__expect_failure=no;; \ esac; \ $(AM_TESTS_ENVIRONMENT) $(TESTS_ENVIRONMENT) # A shell command to get the names of the tests scripts with any registered # extension removed (i.e., equivalently, the names of the test logs, with # the '.log' extension removed). The result is saved in the shell variable # '$bases'. This honors runtime overriding of TESTS and TEST_LOGS. Sadly, # we cannot use something simpler, involving e.g., "$(TEST_LOGS:.log=)", # since that might cause problem with VPATH rewrites for suffix-less tests. # See also 'test-harness-vpath-rewrite.sh' and 'test-trs-basic.sh'. am__set_TESTS_bases = \ bases='$(TEST_LOGS)'; \ bases=`for i in $$bases; do echo $$i; done | sed 's/\.log$$//'`; \ bases=`echo $$bases` RECHECK_LOGS = $(TEST_LOGS) TEST_SUITE_LOG = test-suite.log LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver LOG_COMPILE = $(LOG_COMPILER) $(AM_LOG_FLAGS) $(LOG_FLAGS) am__set_b = \ case '$@' in \ */*) \ case '$*' in \ */*) b='$*';; \ *) b=`echo '$@' | sed 's/\.log$$//'`; \ esac;; \ *) \ b='$*';; \ esac am__test_logs1 = $(TESTS:=.log) am__test_logs2 = $(am__test_logs1:@EXEEXT@.log=.log) TEST_LOGS = $(am__test_logs2:.py.log=.log) PY_LOG_DRIVER = $(SHELL) $(top_srcdir)/config/test-driver PY_LOG_COMPILE = $(PY_LOG_COMPILER) $(AM_PY_LOG_FLAGS) $(PY_LOG_FLAGS) DIST_SUBDIRS = $(SUBDIRS) am__DIST_COMMON = $(dist_man_MANS) $(srcdir)/Makefile.in \ $(srcdir)/aminclude.am $(srcdir)/common/Makefile.mk \ $(srcdir)/common/base/Makefile.mk \ $(srcdir)/common/dmx/Makefile.mk \ $(srcdir)/common/export_map/Makefile.mk \ $(srcdir)/common/file/Makefile.mk \ $(srcdir)/common/http/Makefile.mk \ $(srcdir)/common/io/Makefile.mk \ $(srcdir)/common/math/Makefile.mk \ $(srcdir)/common/messaging/Makefile.mk \ $(srcdir)/common/network/Makefile.mk \ $(srcdir)/common/protocol/Makefile.mk \ $(srcdir)/common/rdm/Makefile.mk \ $(srcdir)/common/rpc/Makefile.mk \ $(srcdir)/common/strings/Makefile.mk \ $(srcdir)/common/system/Makefile.mk \ $(srcdir)/common/testing/Makefile.mk \ $(srcdir)/common/thread/Makefile.mk \ $(srcdir)/common/timecode/Makefile.mk \ $(srcdir)/common/utils/Makefile.mk \ $(srcdir)/common/web/Makefile.mk $(srcdir)/config.h.in \ $(srcdir)/data/Makefile.mk $(srcdir)/data/rdm/Makefile.mk \ $(srcdir)/debian/Makefile.mk $(srcdir)/doxygen/Makefile.mk \ $(srcdir)/doxygen/examples/Makefile.mk \ $(srcdir)/examples/Makefile.mk $(srcdir)/include/Makefile.mk \ $(srcdir)/include/ola/Makefile.mk \ $(srcdir)/include/ola/acn/Makefile.mk \ $(srcdir)/include/ola/base/Makefile.mk \ $(srcdir)/include/ola/client/Makefile.mk \ $(srcdir)/include/ola/dmx/Makefile.mk \ $(srcdir)/include/ola/e133/Makefile.mk \ $(srcdir)/include/ola/file/Makefile.mk \ $(srcdir)/include/ola/http/Makefile.mk \ $(srcdir)/include/ola/io/Makefile.mk \ $(srcdir)/include/ola/math/Makefile.mk \ $(srcdir)/include/ola/messaging/Makefile.mk \ $(srcdir)/include/ola/network/Makefile.mk \ $(srcdir)/include/ola/rdm/Makefile.mk \ $(srcdir)/include/ola/rpc/Makefile.mk \ $(srcdir)/include/ola/stl/Makefile.mk \ $(srcdir)/include/ola/strings/Makefile.mk \ $(srcdir)/include/ola/system/Makefile.mk \ $(srcdir)/include/ola/testing/Makefile.mk \ $(srcdir)/include/ola/thread/Makefile.mk \ $(srcdir)/include/ola/timecode/Makefile.mk \ $(srcdir)/include/ola/util/Makefile.mk \ $(srcdir)/include/ola/web/Makefile.mk \ $(srcdir)/include/ola/win/Makefile.mk \ $(srcdir)/include/olad/Makefile.mk \ $(srcdir)/javascript/Makefile.mk $(srcdir)/libola.pc.in \ $(srcdir)/libolaserver.pc.in $(srcdir)/libs/Makefile.mk \ $(srcdir)/libs/acn/Makefile.mk $(srcdir)/libs/usb/Makefile.mk \ $(srcdir)/man/Makefile.mk $(srcdir)/ola.spec.in \ $(srcdir)/ola/Makefile.mk $(srcdir)/olad/Makefile.mk \ $(srcdir)/olad/plugin_api/Makefile.mk \ $(srcdir)/olad/www/Makefile.mk $(srcdir)/plugins/Makefile.mk \ $(srcdir)/plugins/artnet/Makefile.mk \ $(srcdir)/plugins/artnet/messages/Makefile.mk \ $(srcdir)/plugins/dmx4linux/Makefile.mk \ $(srcdir)/plugins/dummy/Makefile.mk \ $(srcdir)/plugins/e131/Makefile.mk \ $(srcdir)/plugins/e131/messages/Makefile.mk \ $(srcdir)/plugins/espnet/Makefile.mk \ $(srcdir)/plugins/ftdidmx/Makefile.mk \ $(srcdir)/plugins/gpio/Makefile.mk \ $(srcdir)/plugins/karate/Makefile.mk \ $(srcdir)/plugins/kinet/Makefile.mk \ $(srcdir)/plugins/milinst/Makefile.mk \ $(srcdir)/plugins/opendmx/Makefile.mk \ $(srcdir)/plugins/openpixelcontrol/Makefile.mk \ $(srcdir)/plugins/osc/Makefile.mk \ $(srcdir)/plugins/pathport/Makefile.mk \ $(srcdir)/plugins/renard/Makefile.mk \ $(srcdir)/plugins/sandnet/Makefile.mk \ $(srcdir)/plugins/shownet/Makefile.mk \ $(srcdir)/plugins/spi/Makefile.mk \ $(srcdir)/plugins/stageprofi/Makefile.mk \ $(srcdir)/plugins/uartdmx/Makefile.mk \ $(srcdir)/plugins/usbdmx/Makefile.mk \ $(srcdir)/plugins/usbpro/Makefile.mk \ $(srcdir)/plugins/usbpro/messages/Makefile.mk \ $(srcdir)/protoc/Makefile.mk $(srcdir)/python/Makefile.mk \ $(srcdir)/python/examples/Makefile.mk \ $(srcdir)/python/ola/Makefile.mk \ $(srcdir)/python/ola/rpc/Makefile.mk \ $(srcdir)/scripts/Makefile.mk $(srcdir)/tools/Makefile.mk \ $(srcdir)/tools/e133/Makefile.mk \ $(srcdir)/tools/ja-rule/Makefile.mk \ $(srcdir)/tools/logic/Makefile.mk \ $(srcdir)/tools/ola_mon/Makefile.mk \ $(srcdir)/tools/ola_trigger/Makefile.mk \ $(srcdir)/tools/rdm/Makefile.mk \ $(srcdir)/tools/rdmpro/Makefile.mk \ $(srcdir)/tools/usbpro/Makefile.mk \ $(top_srcdir)/config/compile $(top_srcdir)/config/config.guess \ $(top_srcdir)/config/config.sub $(top_srcdir)/config/depcomp \ $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ $(top_srcdir)/config/missing $(top_srcdir)/config/py-compile \ $(top_srcdir)/config/test-driver \ $(top_srcdir)/include/ola/base/Version.h.in \ $(top_srcdir)/libs/acn/libolaacn.pc.in \ $(top_srcdir)/plugins/artnet/messages/libolaartnetconf.pc.in \ $(top_srcdir)/plugins/e131/messages/libolae131conf.pc.in \ $(top_srcdir)/plugins/usbpro/messages/libolausbproconf.pc.in \ $(top_srcdir)/python/ola/ClientWrapper.py \ $(top_srcdir)/python/ola/DMXConstants.py \ $(top_srcdir)/python/ola/DUBDecoder.py \ $(top_srcdir)/python/ola/MACAddress.py \ $(top_srcdir)/python/ola/OlaClient.py \ $(top_srcdir)/python/ola/PidStore.py \ $(top_srcdir)/python/ola/RDMAPI.py \ $(top_srcdir)/python/ola/RDMConstants.py \ $(top_srcdir)/python/ola/StringUtils.py \ $(top_srcdir)/python/ola/TestUtils.py \ $(top_srcdir)/python/ola/UID.py \ $(top_srcdir)/python/ola/__init__.py \ $(top_srcdir)/python/ola/rpc/SimpleRpcController.py \ $(top_srcdir)/python/ola/rpc/StreamRpcChannel.py \ $(top_srcdir)/python/ola/rpc/__init__.py \ $(top_srcdir)/tools/e133/libolae133common.pc.in \ $(top_srcdir)/tools/e133/libolae133controller.pc.in \ $(top_srcdir)/tools/rdm/ExpectedResults.py \ $(top_srcdir)/tools/rdm/ResponderTest.py \ $(top_srcdir)/tools/rdm/TestCategory.py \ $(top_srcdir)/tools/rdm/TestDefinitions.py \ $(top_srcdir)/tools/rdm/TestHelpers.py \ $(top_srcdir)/tools/rdm/TestMixins.py \ $(top_srcdir)/tools/rdm/TestRunner.py \ $(top_srcdir)/tools/rdm/TestState.py \ $(top_srcdir)/tools/rdm/TimingStats.py \ $(top_srcdir)/tools/rdm/__init__.py AUTHORS COPYING ChangeLog \ INSTALL NEWS README TODO config/compile config/config.guess \ config/config.sub config/depcomp config/install-sh \ config/ltmain.sh config/missing config/py-compile DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print # As suggested by libtoolize ACLOCAL = aclocal -I $(auxdir) AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AS = @AS@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ BISON = @BISON@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPPUNIT1_CFLAGS = @CPPUNIT1_CFLAGS@ CPPUNIT1_LIBS = @CPPUNIT1_LIBS@ CPPUNIT2_CFLAGS = @CPPUNIT2_CFLAGS@ CPPUNIT2_LIBS = @CPPUNIT2_LIBS@ CPPUNIT_CFLAGS = @CPPUNIT_CFLAGS@ CPPUNIT_LIBS = @CPPUNIT_LIBS@ CXX = @CXX@ CXXCPP = @CXXCPP@ CXXDEPMODE = @CXXDEPMODE@ CXXFLAGS = @CXXFLAGS@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DOXYGEN_PAPER_SIZE = @DOXYGEN_PAPER_SIZE@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ DX_CONFIG = @DX_CONFIG@ DX_DOCDIR = @DX_DOCDIR@ DX_DOT = @DX_DOT@ DX_DOXYGEN = @DX_DOXYGEN@ DX_DVIPS = @DX_DVIPS@ DX_EGREP = @DX_EGREP@ DX_ENV = @DX_ENV@ DX_FLAG_chi = @DX_FLAG_chi@ DX_FLAG_chm = @DX_FLAG_chm@ DX_FLAG_doc = @DX_FLAG_doc@ DX_FLAG_dot = @DX_FLAG_dot@ DX_FLAG_html = @DX_FLAG_html@ DX_FLAG_man = @DX_FLAG_man@ DX_FLAG_pdf = @DX_FLAG_pdf@ DX_FLAG_ps = @DX_FLAG_ps@ DX_FLAG_rtf = @DX_FLAG_rtf@ DX_FLAG_verbose = @DX_FLAG_verbose@ DX_FLAG_xml = @DX_FLAG_xml@ DX_HHC = @DX_HHC@ DX_LATEX = @DX_LATEX@ DX_MAKEINDEX = @DX_MAKEINDEX@ DX_PDFLATEX = @DX_PDFLATEX@ DX_PERL = @DX_PERL@ DX_PROJECT = @DX_PROJECT@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ GCJ_OPTS = @GCJ_OPTS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ JAVA_CC = @JAVA_CC@ JAVA_CC_FLAGS = @JAVA_CC_FLAGS@ JAVA_CC_OPTS = @JAVA_CC_OPTS@ LD = @LD@ LDFLAGS = @LDFLAGS@ LEX = @LEX@ LEXLIB = @LEXLIB@ LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ LT_SYS_LIBRARY_PATH = @LT_SYS_LIBRARY_PATH@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MAVEN = @MAVEN@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OLA_CLIENT_LIBS = @OLA_CLIENT_LIBS@ OLA_MAJOR_VERSION = @OLA_MAJOR_VERSION@ OLA_MINOR_VERSION = @OLA_MINOR_VERSION@ OLA_PROTOC = @OLA_PROTOC@ OLA_REVISION_VERSION = @OLA_REVISION_VERSION@ OLA_SERVER_LIBS = @OLA_SERVER_LIBS@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PLUGIN_LIBS = @PLUGIN_LIBS@ PROTOBUF1_CFLAGS = @PROTOBUF1_CFLAGS@ PROTOBUF1_LIBS = @PROTOBUF1_LIBS@ PROTOC = @PROTOC@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_CXX = @PTHREAD_CXX@ PTHREAD_CXXFLAGS = @PTHREAD_CXXFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ PYTHON = @PYTHON@ PYTHON_EXEC_PREFIX = @PYTHON_EXEC_PREFIX@ PYTHON_PLATFORM = @PYTHON_PLATFORM@ PYTHON_PREFIX = @PYTHON_PREFIX@ PYTHON_VERSION = @PYTHON_VERSION@ RANLIB = @RANLIB@ RESOLV_LIBS = @RESOLV_LIBS@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ VERSION = @VERSION@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_aux_dir = @ac_aux_dir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_CXX = @ac_ct_CXX@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ acx_pthread_config = @acx_pthread_config@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ avahi_CFLAGS = @avahi_CFLAGS@ avahi_LIBS = @avahi_LIBS@ base_uuid_CFLAGS = @base_uuid_CFLAGS@ base_uuid_LIBS = @base_uuid_LIBS@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ cpplint = @cpplint@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ flake8 = @flake8@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libSaleaeDevice_LIBS = @libSaleaeDevice_LIBS@ libdir = @libdir@ libexecdir = @libexecdir@ libftdi0_CFLAGS = @libftdi0_CFLAGS@ libftdi0_LIBS = @libftdi0_LIBS@ libftdi1_CFLAGS = @libftdi1_CFLAGS@ libftdi1_LIBS = @libftdi1_LIBS@ liblo_CFLAGS = @liblo_CFLAGS@ liblo_LIBS = @liblo_LIBS@ libmicrohttpd_CFLAGS = @libmicrohttpd_CFLAGS@ libmicrohttpd_LIBS = @libmicrohttpd_LIBS@ libncurses_CFLAGS = @libncurses_CFLAGS@ libncurses_LIBS = @libncurses_LIBS@ libprotobuf_CFLAGS = @libprotobuf_CFLAGS@ libprotobuf_LIBS = @libprotobuf_LIBS@ libusb_CFLAGS = @libusb_CFLAGS@ libusb_LIBS = @libusb_LIBS@ libusb_error_name_CFLAGS = @libusb_error_name_CFLAGS@ libusb_error_name_LIBS = @libusb_error_name_LIBS@ libusb_hotplug_api_CFLAGS = @libusb_hotplug_api_CFLAGS@ libusb_hotplug_api_LIBS = @libusb_hotplug_api_LIBS@ libusb_set_option_CFLAGS = @libusb_set_option_CFLAGS@ libusb_set_option_LIBS = @libusb_set_option_LIBS@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ ola_major_version = @ola_major_version@ ola_minor_version = @ola_minor_version@ ola_revision_version = @ola_revision_version@ oldincludedir = @oldincludedir@ ossp_uuid_CFLAGS = @ossp_uuid_CFLAGS@ ossp_uuid_LIBS = @ossp_uuid_LIBS@ pdfdir = @pdfdir@ piddatadir = @piddatadir@ pkgpyexecdir = @pkgpyexecdir@ pkgpythondir = @pkgpythondir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ pyexecdir = @pyexecdir@ pythondir = @pythondir@ runstatedir = @runstatedir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ uuid_CFLAGS = @uuid_CFLAGS@ uuid_LIBS = @uuid_LIBS@ www_datadir = @www_datadir@ # This is a non-recursive Makefile, see # https://github.com/OpenLightingProject/ola/issues/397 for links to useful # documentation. # # Rather than defining everything in a single Makefile we include a Makefile.mk # from each directory. This gives the build rules a bit more structure. auxdir = @ac_aux_dir@ AUX_DIST = $(auxdir)/install-sh $(auxdir)/missing \ $(auxdir)/mkinstalldirs ACLOCAL_AMFLAGS = -I config @DX_COND_doc_TRUE@@DX_COND_html_TRUE@DX_CLEAN_HTML = @DX_DOCDIR@/html @DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHM = @DX_DOCDIR@/chm @DX_COND_chi_TRUE@@DX_COND_chm_TRUE@@DX_COND_doc_TRUE@DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi @DX_COND_doc_TRUE@@DX_COND_man_TRUE@DX_CLEAN_MAN = @DX_DOCDIR@/man @DX_COND_doc_TRUE@@DX_COND_rtf_TRUE@DX_CLEAN_RTF = @DX_DOCDIR@/rtf @DX_COND_doc_TRUE@@DX_COND_xml_TRUE@DX_CLEAN_XML = @DX_DOCDIR@/xml @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@DX_PS_GOAL = doxygen-ps @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@DX_PDF_GOAL = doxygen-pdf @DX_COND_doc_TRUE@@DX_COND_latex_TRUE@DX_CLEAN_LATEX = @DX_DOCDIR@/latex @DX_COND_doc_TRUE@DX_CLEANFILES = \ @DX_COND_doc_TRUE@ @DX_DOCDIR@/@PACKAGE@.tag \ @DX_COND_doc_TRUE@ -r \ @DX_COND_doc_TRUE@ $(DX_CLEAN_HTML) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_CHM) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_CHI) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_MAN) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_RTF) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_XML) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_PS) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_PDF) \ @DX_COND_doc_TRUE@ $(DX_CLEAN_LATEX) # When running distcheck we want to enable the Python modules. AM_DISTCHECK_CONFIGURE_FLAGS = --enable-python-libs # C++ FLAGS variables # ------------------------------------------------------------------------------ # COMMON_CXXFLAGS # The common C++ flags. This may include -Werror if fatal-warning was enabled # in ./configure. AM_CXXFLAGS defaults to this, and it should be preferred. # # COMMON_PROTOBUF_CXXFLAGS # The common C++ flags with some warnings protobuf code throws disabled. Use # this for generated protobuf code that does not build correctly with # COMMON_CXXFLAGS. # # COMMON_CXXFLAGS_ONLY_WARNINGS # The common C++ flags with (non-fatal) warnings enabled. Use this for 3rd # party code that does not build correctly with COMMON_CXXFLAGS. # # COMMON_TESTING_FLAGS # The common C++ flags for testing. # # COMMON_TESTING_FLAGS_ONLY_WARNINGS # The common C++ flags for testing with (non-fatal) warnings enabled. Use this # for 3rd party code that does not build correctly with COMMON_TESTING_FLAGS. # # COMMON_TESTING_PROTOBUF_FLAGS # The common C++ flags for testing with some warnings protobuf code throws # disabled. COMMON_CXXFLAGS_ONLY_WARNINGS = \ -I$(top_srcdir)/include \ -I$(top_builddir)/include \ -Wall -Wformat -W -fvisibility-inlines-hidden \ $(libprotobuf_CFLAGS) COMMON_CXXFLAGS = $(COMMON_CXXFLAGS_ONLY_WARNINGS) $(am__append_1) \ $(am__append_5) COMMON_PROTOBUF_CXXFLAGS = $(COMMON_CXXFLAGS) $(am__append_2) COMMON_TESTING_FLAGS_ONLY_WARNINGS = $(COMMON_CXXFLAGS_ONLY_WARNINGS) \ $(CPPUNIT_CFLAGS) \ -DTEST_SRC_DIR=\"$(srcdir)\" \ -DTEST_BUILD_DIR=\"$(builddir)\" COMMON_TESTING_FLAGS = $(COMMON_TESTING_FLAGS_ONLY_WARNINGS) \ $(am__append_3) $(am__append_6) COMMON_TESTING_PROTOBUF_FLAGS = $(COMMON_TESTING_FLAGS) \ $(am__append_4) # AM_CXXFLAGS is used when target_CXXFLAGS isn't specified. AM_CXXFLAGS = $(COMMON_CXXFLAGS) # LIBS variables # ------------------------------------------------------------------------------ # # COMMON_TESTING_LIBS # The set of libraries used in the unittests. COMMON_TESTING_LIBS = $(CPPUNIT_LIBS) common/testing/libolatesting.la \ common/testing/libtestmain.la common/libolacommon.la \ $(am__append_7) # Setup pkgconfigdir, the path where .pc files are installed. pkgconfigdir = $(libdir)/pkgconfig oladincludedir = $(includedir)/olad # Define a custom runner for .py tests TESTS_ENVIRONMENT = PYTHONPATH=${top_srcdir}/python TEST_EXTENSIONS = .py PY_LOG_COMPILER = $(PYTHON) # Variables used by the included Makefile.mk(s) # ------------------------------------------------------------------------------ # Common automake variables. CLEANFILES = data/rdm/*.pyc data/rdm/PidDataTest.sh \ data/rdm/__pycache__/* $(am__append_31) include/ola/*.pyc \ include/ola/__pycache__/* olad/ola-output.conf \ python/examples/*.pyc python/examples/__pycache__/* \ python/ola/rpc/*.pyc python/ola/rpc/SimpleRpcControllerTest.sh \ python/ola/rpc/__pycache__/* python/ola/*.pyc \ python/ola/ClientWrapperTest.sh python/ola/OlaClientTest.sh \ python/ola/PidStoreTest.sh python/ola/RDMTest.sh \ python/ola/__pycache__/* python/PyCompileTest.sh scripts/*.pyc \ scripts/__pycache__/* tools/ola_mon/*.pyc \ tools/ola_mon/__pycache__/* \ tools/ola_trigger/FileValidateTest.sh python/ola/testing/*.pyc \ python/ola/testing/__pycache__/* \ python/ola/testing/__init__.py tools/rdm/*.pyc \ tools/rdm/ExpectedResultsTest.sh \ tools/rdm/ResponderTestTest.sh tools/rdm/TestHelpersTest.sh \ tools/rdm/TestRunnerTest.sh tools/rdm/TestStateTest.sh \ tools/rdm/__pycache__/* $(built_sources) # The includes # ----------------------------------------------------------------------------- # Since `make install` relinks the libraries, this should be in the order in # which libraries depend on each other. e.g. common, plugin_api, plugins, server. # olad/plugin_api/Makefile.mk is included directly due to the order of # dependencies between them; we need to build olad/plugin_api, then the # plugins, then olad # ----------------------------------------------------------------------------- # Now some post-processing BUILT_SOURCES = $(built_sources) # TESTS_DATA ################################################## # Debian build files # The ArtNet plugin config messages. This needs to be available to client # programs. EXTRA_DIST = common/protocol/Ola.proto common/rdm/Pids.proto \ common/rdm/testdata/duplicate_manufacturer.proto \ common/rdm/testdata/duplicate_pid_name.proto \ common/rdm/testdata/duplicate_pid_value.proto \ common/rdm/testdata/inconsistent_pid.proto \ common/rdm/testdata/invalid_esta_pid.proto \ common/rdm/testdata/pids/overrides.proto \ common/rdm/testdata/pids/pids1.proto \ common/rdm/testdata/pids/pids2.proto \ common/rdm/testdata/test_pids.proto common/rpc/Rpc.proto \ common/rpc/TestService.proto debian/changelog debian/compat \ debian/control debian/copyright debian/libola-dev.dirs \ debian/libola-dev.install debian/libola1.install \ debian/ola-python.dirs debian/ola-python.install \ debian/ola-rdm-tests.bash-completion \ debian/ola-rdm-tests.config debian/ola-rdm-tests.dirs \ debian/ola-rdm-tests.install debian/ola-rdm-tests.postinst \ debian/ola-rdm-tests.rdm_test_server.init \ debian/ola-rdm-tests.templates debian/ola.bash-completion \ debian/ola.config debian/ola.dirs debian/ola.docs \ debian/ola.install debian/ola.olad.init debian/ola.postinst \ debian/ola.templates debian/ola.udev \ debian/org.openlighting.ola.ola.metainfo.xml debian/rules \ debian/source/format debian/source/lintian-overrides \ debian/source/local-options debian/tests/control \ debian/tests/hw.cc debian/watch doxygen/copy-doc.sh \ doxygen/cpp-client.dox doxygen/dmx-cpp-client.dox \ doxygen/event-driven.dox doxygen/http.dox doxygen/json.dox \ doxygen/namespaces.dox doxygen/olad.dox doxygen/OLALayout.xml \ doxygen/OLA.png doxygen/overview.dox doxygen/rdm.dox \ doxygen/rpc.dox doxygen/rpc-message.png doxygen/rpc.png \ $(am__append_29) javascript/README javascript/new-src/.jscsrc \ javascript/new-src/.jshintrc javascript/new-src/Gruntfile.js \ javascript/new-src/README.md javascript/new-src/bower.json \ javascript/new-src/package.json \ javascript/new-src/css/style.css \ javascript/new-src/src/controllers/menu.js \ javascript/new-src/src/controllers/patch_universe.js \ javascript/new-src/src/controllers/rdm_universe.js \ javascript/new-src/src/controllers/universe.js \ javascript/new-src/src/controllers/fader_universe.js \ javascript/new-src/src/controllers/keypad_universe.js \ javascript/new-src/src/controllers/plugins.js \ javascript/new-src/src/controllers/add_universe.js \ javascript/new-src/src/controllers/plugin_info.js \ javascript/new-src/src/controllers/setting_universe.js \ javascript/new-src/src/controllers/header.js \ javascript/new-src/src/controllers/overview.js \ javascript/new-src/src/constants.js \ javascript/new-src/src/factories/ola.js \ javascript/new-src/src/app.js \ javascript/new-src/src/filters/start_form.js \ javascript/ola/base_frame.js \ javascript/ola/common/dmx_constants.js \ javascript/ola/common/dmx_monitor.js \ javascript/ola/common/keypad_controller.js \ javascript/ola/common/keypad_parser.js \ javascript/ola/common/plugin_list.js \ javascript/ola/common/rdm_section_list.js \ javascript/ola/common/section_render.js \ javascript/ola/common/server.js \ javascript/ola/common/server_stats.js \ javascript/ola/common/sorted_list.js \ javascript/ola/common/uid_list.js javascript/ola/dialog.js \ javascript/ola/full/available_port_table.js \ javascript/ola/full/base_universe_tab.js \ javascript/ola/full/custom_dragger.js \ javascript/ola/full/custom_dragscrollsupport.js \ javascript/ola/full/dmx_console.js \ javascript/ola/full/dmx_console_tab.js \ javascript/ola/full/dmx_monitor_tab.js \ javascript/ola/full/plugin_frame.js \ javascript/ola/full/rdm_attributes_panel.js \ javascript/ola/full/rdm_patcher.js \ javascript/ola/full/rdm_patcher_tab.js \ javascript/ola/full/rdm_tab.js \ javascript/ola/full/universe_frame.js \ javascript/ola/full/universe_settings_tab.js \ javascript/ola/home_frame.js javascript/ola/logger.js \ javascript/ola/mobile.js \ javascript/ola/mobile/controller_tab.js \ javascript/ola/mobile/monitor_tab.js \ javascript/ola/mobile/plugin_tab.js \ javascript/ola/mobile/universe_tab.js \ javascript/ola/new_universe_frame.js javascript/ola/ola.js \ javascript/ola/port_table.js \ javascript/ola/universe_control.js \ javascript/ola/universe_item.js \ plugins/artnet/messages/ArtNetConfigMessages.proto \ plugins/karate/README.protocol plugins/osc/README \ plugins/usbdmx/README.md $(am__append_73) \ tools/logic/README.md tools/ola_trigger/config.lex \ tools/ola_trigger/config.ypp $(launcher_files) \ $(am__append_103) CONTRIBUTING Doxyfile GPL LGPL LICENCE \ README.debian README.developer README.mingw32 README.rpm \ config/ac_prog_java_cc.m4 config/ac_python_devel.m4 \ config/ac_saleae.m4 config/ax_python_module.m4 config/maven.m4 \ config/ola.m4 config/ola_version.m4 config/pkg.m4 \ config/resolv.m4 config/stl_hash.m4 mac_build.sh ola.spec # pkg-config ################################################## pkgconfig_DATA = $(am__append_33) \ plugins/artnet/messages/libolaartnetconf.pc $(am__append_74) \ $(am__append_96) libola.pc libolaserver.pc noinst_DATA = dist_noinst_DATA = common/web/testdata/allof.test \ common/web/testdata/anyof.test common/web/testdata/arrays.test \ common/web/testdata/basic-keywords.test \ common/web/testdata/definitions.test \ common/web/testdata/integers.test \ common/web/testdata/misc.test common/web/testdata/not.test \ common/web/testdata/objects.test \ common/web/testdata/oneof.test common/web/testdata/schema.json \ common/web/testdata/strings.test common/web/testdata/type.test \ olad/testdata/test_preferences.conf \ tools/ola_trigger/contrib/mac_itunes.conf \ tools/ola_trigger/contrib/mac_volume.conf \ tools/ola_trigger/contrib/philips_hue_osram_lightify.conf \ tools/ola_trigger/example.conf \ tools/ola_trigger/test_file.conf \ tools/ola_trigger/test_file_falling.conf \ tools/ola_trigger/test_file_rising.conf \ tools/ola_mon/index.html tools/ola_mon/ola_mon.conf \ tools/ola_mon/ola_mon.py # LIBRARIES ################################################## # LIBRARIES ################################################## # lib olaserverplugininterface # lib olaserver # LIBRARIES ################################################## lib_LTLIBRARIES = common/libolacommon.la $(am__append_34) \ ola/libola.la olad/plugin_api/libolaserverplugininterface.la \ $(am__append_38) $(am__append_43) $(am__append_45) \ $(am__append_47) $(am__append_50) $(am__append_51) \ $(am__append_53) $(am__append_55) $(am__append_56) \ $(am__append_58) $(am__append_61) $(am__append_63) \ $(am__append_64) $(am__append_65) $(am__append_66) \ $(am__append_68) $(am__append_70) $(am__append_72) \ $(am__append_75) $(am__append_78) $(am__append_80) \ $(am__append_81) $(am__append_83) olad/libolaserver.la \ tools/ola_trigger/libolatrigger.la $(am__append_97) # LIBRARIES ################################################## # We build the .cc files as a separate unit because they aren't warning-clean. # LIBRARIES ################################################ # libolae131core.la # This needs to be after libolaacn.la since it depends on it. Otherwise it # breaks the freeBSD build noinst_LTLIBRARIES = $(am__append_9) common/protocol/libolaproto.la \ $(am__append_16) common/web/libolaweb.la $(am__append_21) \ $(am__append_35) libs/acn/libolae131core.la $(am__append_36) \ $(am__append_40) $(am__append_52) $(am__append_57) \ $(am__append_60) $(am__append_71) $(am__append_77) \ $(am__append_98) check_SCRIPTS = dist_check_SCRIPTS = python/ola/rpc/SimpleRpcControllerTest.py \ python/ola/DUBDecoderTest.py python/ola/ClientWrapperTest.py \ python/ola/MACAddressTest.py python/ola/OlaClientTest.py \ python/ola/PidStoreTest.py python/ola/RDMTest.py \ python/ola/StringUtilsTest.py python/ola/TestUtils.py \ python/ola/UIDTest.py tools/rdm/ExpectedResultsTest.py \ tools/rdm/ResponderTestTest.py tools/rdm/TestHelpersTest.py \ tools/rdm/TestRunnerTest.py tools/rdm/TestStateTest.py # SCRIPTS ################################################ # example python scripts dist_noinst_SCRIPTS = data/rdm/download.sh data/rdm/PidDataTest.py \ include/ola/rdm/make_rdm_codes.sh \ include/ola/timecode/make_timecode.sh \ include/ola/gen_callbacks.py include/ola/make_plugin_id.sh \ python/examples/ola_artnet_params.py \ python/examples/ola_candidate_ports.py \ python/examples/ola_devices.py \ python/examples/ola_fetch_dmx.py \ python/examples/ola_patch_unpatch.py \ python/examples/ola_plugin_info.py \ python/examples/ola_rdm_discover.py \ python/examples/ola_rdm_get.py python/examples/ola_recv_dmx.py \ python/examples/ola_send_dmx.py \ python/examples/ola_simple_fade.py \ python/examples/ola_universe_info.py \ python/examples/rdm_compare.py python/examples/rdm_snapshot.py \ $(am__append_101) dist_man_MANS = man/logic_rdm_sniffer.1 man/ola_artnet.1 \ man/ola_dev_info.1 man/ola_dmxconsole.1 man/ola_dmxmonitor.1 \ man/ola_e131.1 man/ola_patch.1 man/ola_plugin_info.1 \ man/ola_plugin_state.1 man/ola_rdm_discover.1 \ man/ola_rdm_get.1 man/ola_rdm_set.1 man/ola_recorder.1 \ man/ola_set_dmx.1 man/ola_set_priority.1 \ man/ola_streaming_client.1 man/ola_timecode.1 \ man/ola_trigger.1 man/ola_uni_info.1 man/ola_uni_merge.1 \ man/ola_uni_name.1 man/ola_uni_stats.1 man/ola_usbpro.1 \ man/olad.1 man/rdm_model_collector.py.1 \ man/rdm_responder_test.py.1 man/rdm_test_server.py.1 \ man/rdmpro_sniffer.1 man/usbpro_firmware.1 pkginclude_HEADERS = include/ola/ActionQueue.h include/ola/BaseTypes.h \ include/ola/Callback.h include/ola/CallbackRunner.h \ include/ola/Clock.h include/ola/Constants.h \ include/ola/DmxBuffer.h include/ola/ExportMap.h \ include/ola/Logging.h include/ola/MultiCallback.h \ include/ola/StringUtils.h ola/AutoStart.h \ ola/OlaClientWrapper.h $(DEPRECATED) # These aren't installed # HEADERS ################################################## noinst_HEADERS = include/ola/testing/MockUDPSocket.h \ include/ola/testing/TestUtils.h olad/plugin_api/TestCommon.h nodist_pkginclude_HEADERS = include/ola/plugin_id.h # Append to this to define an install-exec-hook. INSTALL_EXEC_HOOKS = $(am__append_28) # Test programs, these are added to check_PROGRAMS and TESTS if BUILD_TESTS is # true. # TESTS ################################################## # TESTS ################################################## # TESTS ################################################## # TESTS ################################################## # TESTS ################################################## # TESTS ################################################## # TESTS ################################################## # TESTS ################################################## # TESTS ################################################## # TESTS ################################################ # TESTS ################################################## # TESTS ################################################## # TESTS ################################################ # TESTS ################################################ # Patch test names are abbreviated to prevent Windows' UAC from blocking them. # TESTS ################################################## # TESTS ################################################## # TESTS ################################################## # TESTS ################################################## # TESTS ################################################## test_programs = common/base/CredentialsTester common/base/FlagsTester \ common/base/LoggingTester common/dmx/RunLengthEncoderTester \ common/export_map/ExportMapTester common/file/UtilTester \ common/io/DescriptorTester common/io/IOQueueTester \ common/io/IOStackTester common/io/MemoryBlockTester \ common/io/SelectServerTester common/io/StreamTester \ common/io/TimeoutManagerTester \ common/messaging/DescriptorTester \ common/network/HealthCheckedConnectionTester \ common/network/NetworkTester common/network/TCPConnectorTester \ common/rdm/DiscoveryAgentTester common/rdm/PidStoreTester \ common/rdm/QueueingRDMControllerTester common/rdm/RDMAPITester \ common/rdm/RDMCommandSerializerTester \ common/rdm/RDMCommandTester common/rdm/RDMFrameTester \ common/rdm/RDMHelperTester common/rdm/RDMMessageTester \ common/rdm/RDMReplyTester common/rdm/UIDAllocatorTester \ common/rdm/UIDTester common/rpc/RpcTester \ common/rpc/RpcServerTester common/strings/UtilsTester \ common/thread/ExecutorThreadTester common/thread/ThreadTester \ common/thread/FutureTester common/timecode/TimeCodeTester \ common/utils/UtilsTester common/web/JsonTester \ common/web/ParserTester common/web/PtchParserTester \ common/web/PtchTester common/web/PointerTester \ common/web/PointerTrackerTester common/web/SchemaParserTester \ common/web/SchemaTester common/web/SectionsTester \ $(am__append_17) libs/acn/E131Tester libs/acn/E133Tester \ libs/acn/TransportTester $(am__append_37) ola/OlaClientTester \ olad/plugin_api/ClientTester olad/plugin_api/DeviceTester \ olad/plugin_api/DmxSourceTester olad/plugin_api/PortTester \ olad/plugin_api/PreferencesTester \ olad/plugin_api/UniverseTester $(am__append_42) \ $(am__append_44) $(am__append_46) $(am__append_54) \ $(am__append_59) $(am__append_62) $(am__append_67) \ $(am__append_69) $(am__append_79) olad/OlaTester \ tools/ola_trigger/ActionTester # Files in built_sources are included in BUILT_SOURCES and CLEANFILES # The .h files are included elsewhere so we have to put them in BUILT_SOURCES # BUILT_SOURCES is our only option here since we can't override the generated # automake rules for common/libolacommon.la # BUILT_SOURCES is our only option here since we can't override the generated # automake rules for common/libolacommon.la # BUILT_SOURCES is our only option here since we can't override the generated # automake rules for common/libolacommon.la built_sources = common/protocol/Ola.pb.cc common/protocol/Ola.pb.h \ common/protocol/OlaService.pb.h \ common/protocol/OlaService.pb.cpp common/rdm/Pids.pb.cc \ common/rdm/Pids.pb.h common/rpc/Rpc.pb.cc common/rpc/Rpc.pb.h \ common/rpc/TestService.pb.cc common/rpc/TestService.pb.h \ common/rpc/TestServiceService.pb.cpp \ common/rpc/TestServiceService.pb.h \ include/ola/rdm/RDMResponseCodes.h \ include/ola/timecode/TimeCodeEnums.h include/ola/plugin_id.h \ $(am__append_39) $(am__append_76) $(am__append_82) \ $(am__append_90) tools/ola_trigger/lex.yy.cpp \ tools/ola_trigger/config.tab.cpp \ tools/ola_trigger/config.tab.h $(am__append_95) # Test scripts are run if BUILD_TESTS is true. test_scripts = $(am__append_18) $(am__append_30) $(am__append_91) \ tools/ola_trigger/FileValidateTest.sh $(am__append_94) # directories with python code that should be test compiled during the build PYTHON_BUILD_DIRS = data include python scripts tools # Variables the included files can append to # ------------------------------------------ common_libolacommon_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) \ -DPID_DATA_DIR=\"${piddatadir}\" common_libolacommon_la_LIBADD = $(am__append_8) $(RESOLV_LIBS) \ common/protocol/libolaproto.la $(libprotobuf_LIBS) \ $(libprotobuf_LIBS) # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################## # LIBRARIES ################################################ common_libolacommon_la_SOURCES = common/base/Credentials.cpp \ common/base/Env.cpp common/base/Flags.cpp common/base/Init.cpp \ common/base/Logging.cpp common/base/SysExits.cpp \ common/base/Version.cpp common/dmx/RunLengthEncoder.cpp \ common/export_map/ExportMap.cpp common/file/Util.cpp \ common/io/Descriptor.cpp common/io/ExtendedSerial.cpp \ common/io/EPoller.h common/io/IOQueue.cpp \ common/io/IOStack.cpp common/io/IOUtils.cpp \ common/io/NonBlockingSender.cpp common/io/PollerInterface.cpp \ common/io/PollerInterface.h common/io/SelectServer.cpp \ common/io/Serial.cpp common/io/StdinHandler.cpp \ common/io/TimeoutManager.cpp common/io/TimeoutManager.h \ $(am__append_10) $(am__append_11) $(am__append_12) \ $(am__append_13) common/math/Random.cpp \ common/messaging/Descriptor.cpp common/messaging/Message.cpp \ common/messaging/MessagePrinter.cpp \ common/messaging/SchemaPrinter.cpp \ common/network/AdvancedTCPConnector.cpp \ common/network/FakeInterfacePicker.h \ common/network/HealthCheckedConnection.cpp \ common/network/IPV4Address.cpp common/network/Interface.cpp \ common/network/InterfacePicker.cpp \ common/network/MACAddress.cpp common/network/NetworkUtils.cpp \ common/network/NetworkUtilsInternal.h \ common/network/Socket.cpp common/network/SocketAddress.cpp \ common/network/SocketCloser.cpp \ common/network/SocketHelper.cpp common/network/SocketHelper.h \ common/network/TCPConnector.cpp common/network/TCPSocket.cpp \ $(am__append_14) $(am__append_15) \ common/rdm/AckTimerResponder.cpp \ common/rdm/AdvancedDimmerResponder.cpp \ common/rdm/CommandPrinter.cpp \ common/rdm/DescriptorConsistencyChecker.cpp \ common/rdm/DescriptorConsistencyChecker.h \ common/rdm/DimmerResponder.cpp common/rdm/DimmerRootDevice.cpp \ common/rdm/DimmerSubDevice.cpp common/rdm/DiscoveryAgent.cpp \ common/rdm/DiscoveryAgentTestHelper.h \ common/rdm/DummyResponder.cpp \ common/rdm/FakeNetworkManager.cpp \ common/rdm/FakeNetworkManager.h \ common/rdm/GroupSizeCalculator.cpp \ common/rdm/GroupSizeCalculator.h \ common/rdm/MessageDeserializer.cpp \ common/rdm/MessageSerializer.cpp \ common/rdm/MovingLightResponder.cpp \ common/rdm/NetworkManager.cpp common/rdm/NetworkManager.h \ common/rdm/NetworkResponder.cpp \ common/rdm/OpenLightingEnums.cpp common/rdm/PidStore.cpp \ common/rdm/PidStoreHelper.cpp common/rdm/PidStoreLoader.cpp \ common/rdm/PidStoreLoader.h \ common/rdm/QueueingRDMController.cpp common/rdm/RDMAPI.cpp \ common/rdm/RDMCommand.cpp common/rdm/RDMCommandSerializer.cpp \ common/rdm/RDMFrame.cpp common/rdm/RDMHelper.cpp \ common/rdm/RDMReply.cpp common/rdm/ResponderHelper.cpp \ common/rdm/ResponderLoadSensor.cpp \ common/rdm/ResponderPersonality.cpp \ common/rdm/ResponderSettings.cpp \ common/rdm/ResponderSlotData.cpp \ common/rdm/SensorResponder.cpp \ common/rdm/StringMessageBuilder.cpp \ common/rdm/SubDeviceDispatcher.cpp common/rdm/UID.cpp \ common/rdm/VariableFieldSizeCalculator.cpp \ common/rdm/VariableFieldSizeCalculator.h \ common/rpc/RpcChannel.cpp common/rpc/RpcChannel.h \ common/rpc/RpcSession.h common/rpc/RpcController.cpp \ common/rpc/RpcController.h common/rpc/RpcHeader.h \ common/rpc/RpcPeer.h common/rpc/RpcServer.cpp \ common/rpc/RpcServer.h common/rpc/RpcService.h \ common/strings/Format.cpp common/strings/Utils.cpp \ common/system/Limits.cpp common/system/SystemUtils.cpp \ common/thread/ConsumerThread.cpp \ common/thread/ExecutorThread.cpp common/thread/Mutex.cpp \ common/thread/PeriodicThread.cpp \ common/thread/SignalThread.cpp common/thread/Thread.cpp \ common/thread/ThreadPool.cpp common/thread/Utils.cpp \ common/timecode/TimeCode.cpp common/utils/ActionQueue.cpp \ common/utils/Clock.cpp common/utils/DmxBuffer.cpp \ common/utils/StringUtils.cpp common/utils/TokenBucket.cpp \ common/utils/Watchdog.cpp nodist_common_libolacommon_la_SOURCES = common/rdm/Pids.pb.cc \ common/rpc/Rpc.pb.cc common_base_CredentialsTester_SOURCES = common/base/CredentialsTest.cpp common_base_CredentialsTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_base_CredentialsTester_LDADD = $(COMMON_TESTING_LIBS) common_base_FlagsTester_SOURCES = common/base/FlagsTest.cpp common_base_FlagsTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_base_FlagsTester_LDADD = $(COMMON_TESTING_LIBS) common_base_LoggingTester_SOURCES = common/base/LoggingTest.cpp common_base_LoggingTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_base_LoggingTester_LDADD = $(COMMON_TESTING_LIBS) common_dmx_RunLengthEncoderTester_SOURCES = common/dmx/RunLengthEncoderTest.cpp common_dmx_RunLengthEncoderTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_dmx_RunLengthEncoderTester_LDADD = $(COMMON_TESTING_LIBS) common_export_map_ExportMapTester_SOURCES = common/export_map/ExportMapTest.cpp common_export_map_ExportMapTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_export_map_ExportMapTester_LDADD = $(COMMON_TESTING_LIBS) common_file_UtilTester_SOURCES = common/file/UtilTest.cpp common_file_UtilTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_file_UtilTester_LDADD = $(COMMON_TESTING_LIBS) @HAVE_LIBMICROHTTPD_TRUE@common_http_libolahttp_la_SOURCES = \ @HAVE_LIBMICROHTTPD_TRUE@ common/http/HTTPServer.cpp \ @HAVE_LIBMICROHTTPD_TRUE@ common/http/OlaHTTPServer.cpp @HAVE_LIBMICROHTTPD_TRUE@common_http_libolahttp_la_LIBADD = $(libmicrohttpd_LIBS) common_io_IOQueueTester_SOURCES = common/io/IOQueueTest.cpp common_io_IOQueueTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_IOQueueTester_LDADD = $(COMMON_TESTING_LIBS) common_io_IOStackTester_SOURCES = common/io/IOStackTest.cpp common_io_IOStackTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_IOStackTester_LDADD = $(COMMON_TESTING_LIBS) common_io_DescriptorTester_SOURCES = common/io/DescriptorTest.cpp common_io_DescriptorTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_DescriptorTester_LDADD = $(COMMON_TESTING_LIBS) common_io_MemoryBlockTester_SOURCES = common/io/MemoryBlockTest.cpp common_io_MemoryBlockTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_MemoryBlockTester_LDADD = $(COMMON_TESTING_LIBS) common_io_SelectServerTester_SOURCES = common/io/SelectServerTest.cpp \ common/io/SelectServerThreadTest.cpp common_io_SelectServerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_SelectServerTester_LDADD = $(COMMON_TESTING_LIBS) common_io_TimeoutManagerTester_SOURCES = common/io/TimeoutManagerTest.cpp common_io_TimeoutManagerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_TimeoutManagerTester_LDADD = $(COMMON_TESTING_LIBS) common_io_StreamTester_SOURCES = common/io/InputStreamTest.cpp \ common/io/OutputStreamTest.cpp common_io_StreamTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_StreamTester_LDADD = $(COMMON_TESTING_LIBS) common_messaging_DescriptorTester_SOURCES = \ common/messaging/DescriptorTest.cpp \ common/messaging/SchemaPrinterTest.cpp \ common/messaging/MessagePrinterTest.cpp common_messaging_DescriptorTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_messaging_DescriptorTester_LDADD = $(COMMON_TESTING_LIBS) common_network_HealthCheckedConnectionTester_SOURCES = \ common/network/HealthCheckedConnectionTest.cpp common_network_HealthCheckedConnectionTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_network_HealthCheckedConnectionTester_LDADD = $(COMMON_TESTING_LIBS) common_network_NetworkTester_SOURCES = \ common/network/IPV4AddressTest.cpp \ common/network/InterfacePickerTest.cpp \ common/network/InterfaceTest.cpp \ common/network/MACAddressTest.cpp \ common/network/NetworkUtilsTest.cpp \ common/network/SocketAddressTest.cpp \ common/network/SocketTest.cpp common_network_NetworkTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_network_NetworkTester_LDADD = $(COMMON_TESTING_LIBS) @USING_WIN32_TRUE@common_network_NetworkTester_LDFLAGS = -no-undefined -liphlpapi -lnetapi32 \ @USING_WIN32_TRUE@ -lcap -lws2_32 -ldpnet -lwsock32 common_network_TCPConnectorTester_SOURCES = \ common/network/AdvancedTCPConnectorTest.cpp \ common/network/TCPConnectorTest.cpp common_network_TCPConnectorTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_network_TCPConnectorTester_LDADD = $(COMMON_TESTING_LIBS) nodist_common_protocol_libolaproto_la_SOURCES = \ common/protocol/Ola.pb.cc \ common/protocol/OlaService.pb.cpp common_protocol_libolaproto_la_LIBADD = $(libprotobuf_LIBS) # required, otherwise we get build errors common_protocol_libolaproto_la_CXXFLAGS = $(COMMON_CXXFLAGS_ONLY_WARNINGS) common_rdm_DiscoveryAgentTester_SOURCES = common/rdm/DiscoveryAgentTest.cpp common_rdm_DiscoveryAgentTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_DiscoveryAgentTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_PidStoreTester_SOURCES = \ common/rdm/DescriptorConsistencyCheckerTest.cpp \ common/rdm/PidStoreTest.cpp common_rdm_PidStoreTester_CXXFLAGS = $(COMMON_TESTING_PROTOBUF_FLAGS) common_rdm_PidStoreTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMHelperTester_SOURCES = common/rdm/RDMHelperTest.cpp common_rdm_RDMHelperTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMHelperTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMMessageTester_SOURCES = \ common/rdm/GroupSizeCalculatorTest.cpp \ common/rdm/MessageSerializerTest.cpp \ common/rdm/MessageDeserializerTest.cpp \ common/rdm/RDMMessageInterationTest.cpp \ common/rdm/StringMessageBuilderTest.cpp \ common/rdm/VariableFieldSizeCalculatorTest.cpp common_rdm_RDMMessageTester_CXXFLAGS = $(COMMON_TESTING_PROTOBUF_FLAGS) common_rdm_RDMMessageTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMAPITester_SOURCES = \ common/rdm/RDMAPITest.cpp common_rdm_RDMAPITester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMAPITester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMCommandTester_SOURCES = \ common/rdm/RDMCommandTest.cpp \ common/rdm/TestHelper.h common_rdm_RDMCommandTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMCommandTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMFrameTester_SOURCES = \ common/rdm/RDMFrameTest.cpp \ common/rdm/TestHelper.h common_rdm_RDMFrameTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMFrameTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMReplyTester_SOURCES = \ common/rdm/RDMReplyTest.cpp \ common/rdm/TestHelper.h common_rdm_RDMReplyTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMReplyTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMCommandSerializerTester_SOURCES = \ common/rdm/RDMCommandSerializerTest.cpp \ common/rdm/TestHelper.h common_rdm_RDMCommandSerializerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMCommandSerializerTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_QueueingRDMControllerTester_SOURCES = \ common/rdm/QueueingRDMControllerTest.cpp \ common/rdm/TestHelper.h common_rdm_QueueingRDMControllerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_QueueingRDMControllerTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_UIDAllocatorTester_SOURCES = \ common/rdm/UIDAllocatorTest.cpp common_rdm_UIDAllocatorTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_UIDAllocatorTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_UIDTester_SOURCES = \ common/rdm/UIDTest.cpp common_rdm_UIDTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_UIDTester_LDADD = $(COMMON_TESTING_LIBS) common_rpc_TEST_SOURCES = \ common/rpc/TestService.h \ common/rpc/TestService.cpp common_rpc_RpcTester_SOURCES = \ common/rpc/RpcControllerTest.cpp \ common/rpc/RpcChannelTest.cpp \ common/rpc/RpcHeaderTest.cpp \ $(common_rpc_TEST_SOURCES) nodist_common_rpc_RpcTester_SOURCES = \ common/rpc/TestService.pb.cc \ common/rpc/TestServiceService.pb.cpp # required, otherwise we get build errors common_rpc_RpcTester_CXXFLAGS = $(COMMON_TESTING_FLAGS_ONLY_WARNINGS) common_rpc_RpcTester_LDADD = $(COMMON_TESTING_LIBS) \ $(libprotobuf_LIBS) common_rpc_RpcServerTester_SOURCES = \ common/rpc/RpcServerTest.cpp \ $(common_rpc_TEST_SOURCES) nodist_common_rpc_RpcServerTester_SOURCES = \ common/rpc/TestService.pb.cc \ common/rpc/TestServiceService.pb.cpp # required, otherwise we get build errors common_rpc_RpcServerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS_ONLY_WARNINGS) common_rpc_RpcServerTester_LDADD = $(COMMON_TESTING_LIBS) \ $(libprotobuf_LIBS) common_strings_UtilsTester_SOURCES = \ common/strings/UtilsTest.cpp common_strings_UtilsTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_strings_UtilsTester_LDADD = $(COMMON_TESTING_LIBS) @BUILD_TESTS_TRUE@common_testing_libolatesting_la_SOURCES = \ @BUILD_TESTS_TRUE@ common/testing/MockUDPSocket.cpp \ @BUILD_TESTS_TRUE@ common/testing/TestUtils.cpp @BUILD_TESTS_TRUE@common_testing_libtestmain_la_SOURCES = common/testing/GenericTester.cpp common_thread_ThreadTester_SOURCES = \ common/thread/ThreadPoolTest.cpp \ common/thread/ThreadTest.cpp common_thread_ThreadTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_thread_ThreadTester_LDADD = $(COMMON_TESTING_LIBS) common_thread_FutureTester_SOURCES = common/thread/FutureTest.cpp common_thread_FutureTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_thread_FutureTester_LDADD = $(COMMON_TESTING_LIBS) common_thread_ExecutorThreadTester_SOURCES = \ common/thread/ExecutorThreadTest.cpp common_thread_ExecutorThreadTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_thread_ExecutorThreadTester_LDADD = $(COMMON_TESTING_LIBS) common_timecode_TimeCodeTester_SOURCES = common/timecode/TimeCodeTest.cpp common_timecode_TimeCodeTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_timecode_TimeCodeTester_LDADD = $(COMMON_TESTING_LIBS) common_utils_UtilsTester_SOURCES = \ common/utils/ActionQueueTest.cpp \ common/utils/BackoffTest.cpp \ common/utils/CallbackTest.cpp \ common/utils/ClockTest.cpp \ common/utils/DmxBufferTest.cpp \ common/utils/MultiCallbackTest.cpp \ common/utils/StringUtilsTest.cpp \ common/utils/TokenBucketTest.cpp \ common/utils/UtilsTest.cpp \ common/utils/WatchdogTest.cpp common_utils_UtilsTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_utils_UtilsTester_LDADD = $(COMMON_TESTING_LIBS) common_web_libolaweb_la_SOURCES = \ common/web/Json.cpp \ common/web/JsonData.cpp \ common/web/JsonLexer.cpp \ common/web/JsonParser.cpp \ common/web/JsonPatch.cpp \ common/web/JsonPatchParser.cpp \ common/web/JsonPointer.cpp \ common/web/JsonSchema.cpp \ common/web/JsonSections.cpp \ common/web/JsonTypes.cpp \ common/web/JsonWriter.cpp \ common/web/PointerTracker.cpp \ common/web/PointerTracker.h \ common/web/SchemaErrorLogger.cpp \ common/web/SchemaErrorLogger.h \ common/web/SchemaKeywords.cpp \ common/web/SchemaKeywords.h \ common/web/SchemaParseContext.cpp \ common/web/SchemaParseContext.h \ common/web/SchemaParser.cpp \ common/web/SchemaParser.h #Work around limitations with Windows library linking @USING_WIN32_TRUE@common_web_libolaweb_la_LIBADD = common/libolacommon.la COMMON_WEB_TEST_LDADD = $(COMMON_TESTING_LIBS) \ common/web/libolaweb.la common_web_JsonTester_SOURCES = common/web/JsonTest.cpp common_web_JsonTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_JsonTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_ParserTester_SOURCES = common/web/ParserTest.cpp common_web_ParserTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_ParserTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_PtchParserTester_SOURCES = common/web/PatchParserTest.cpp common_web_PtchParserTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_PtchParserTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_PtchTester_SOURCES = common/web/PatchTest.cpp common_web_PtchTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_PtchTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_PointerTester_SOURCES = common/web/PointerTest.cpp common_web_PointerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_PointerTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_PointerTrackerTester_SOURCES = common/web/PointerTrackerTest.cpp common_web_PointerTrackerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_PointerTrackerTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_SchemaParserTester_SOURCES = common/web/SchemaParserTest.cpp common_web_SchemaParserTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_SchemaParserTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_SchemaTester_SOURCES = common/web/SchemaTest.cpp common_web_SchemaTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_SchemaTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_SectionsTester_SOURCES = common/web/SectionsTest.cpp common_web_SectionsTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_SectionsTester_LDADD = $(COMMON_WEB_TEST_LDADD) # DATA ################################################ dist_piddata_DATA = \ data/rdm/draft_pids.proto \ data/rdm/pids.proto \ data/rdm/manufacturer_pids.proto data_rdm_PidDataTester_SOURCES = data/rdm/PidDataTest.cpp data_rdm_PidDataTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) -DDATADIR=\"$(srcdir)/data/rdm\" data_rdm_PidDataTester_LDADD = $(COMMON_TESTING_LIBS) # The following should match what pkg-config --libs libola returns DOXYGEN_EXAMPLES_LDADD = common/libolacommon.la \ ola/libola.la doxygen_examples_callback_client_transmit_SOURCES = \ doxygen/examples/callback_client_transmit.cpp doxygen_examples_callback_client_transmit_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_client_disconnect_SOURCES = \ doxygen/examples/client_disconnect.cpp doxygen_examples_client_disconnect_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_client_thread_SOURCES = \ doxygen/examples/client_thread.cpp doxygen_examples_client_thread_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_fetch_plugins_SOURCES = \ doxygen/examples/fetch_plugins.cpp doxygen_examples_fetch_plugins_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_legacy_callback_client_transmit_SOURCES = \ doxygen/examples/legacy_callback_client_transmit.cpp doxygen_examples_legacy_callback_client_transmit_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_flags_SOURCES = \ doxygen/examples/flags.cpp doxygen_examples_flags_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_streaming_client_SOURCES = \ doxygen/examples/streaming_client.cpp doxygen_examples_streaming_client_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_legacy_streaming_client_SOURCES = \ doxygen/examples/legacy_streaming_client.cpp doxygen_examples_legacy_streaming_client_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_streaming_client_plugin_SOURCES = \ doxygen/examples/streaming_client_plugin.cpp doxygen_examples_streaming_client_plugin_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_legacy_receiver_SOURCES = \ doxygen/examples/legacy_receiver.cpp doxygen_examples_legacy_receiver_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_receiver_SOURCES = \ doxygen/examples/receiver.cpp doxygen_examples_receiver_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_stdin_handler_SOURCES = \ doxygen/examples/stdin_handler.cpp doxygen_examples_stdin_handler_LDADD = $(DOXYGEN_EXAMPLES_LDADD) doxygen_examples_udp_server_SOURCES = \ doxygen/examples/udp_server.cpp doxygen_examples_udp_server_LDADD = $(DOXYGEN_EXAMPLES_LDADD) # The following should match what pkg-config --libs libola returns @BUILD_EXAMPLES_TRUE@EXAMPLE_COMMON_LIBS = common/libolacommon.la \ @BUILD_EXAMPLES_TRUE@ ola/libola.la @BUILD_EXAMPLES_TRUE@examples_libolaconfig_la_SOURCES = \ @BUILD_EXAMPLES_TRUE@ examples/OlaConfigurator.h \ @BUILD_EXAMPLES_TRUE@ examples/OlaConfigurator.cpp @BUILD_EXAMPLES_TRUE@examples_libolaconfig_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@examples_ola_e131_SOURCES = examples/ola-e131.cpp @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@examples_ola_e131_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@examples_ola_e131_LDADD = examples/libolaconfig.la \ @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@ $(EXAMPLE_COMMON_LIBS) \ @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@ plugins/e131/messages/libolae131conf.la \ @BUILD_EXAMPLES_TRUE@@USE_E131_TRUE@ $(libprotobuf_LIBS) @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@examples_ola_usbpro_SOURCES = examples/ola-usbpro.cpp @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@examples_ola_usbpro_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@examples_ola_usbpro_LDADD = examples/libolaconfig.la \ @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@ $(EXAMPLE_COMMON_LIBS) \ @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@ plugins/usbpro/messages/libolausbproconf.la \ @BUILD_EXAMPLES_TRUE@@USE_USBPRO_TRUE@ $(libprotobuf_LIBS) @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@examples_ola_artnet_SOURCES = examples/ola-artnet.cpp @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@examples_ola_artnet_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@examples_ola_artnet_LDADD = examples/libolaconfig.la \ @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@ $(EXAMPLE_COMMON_LIBS) \ @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@ plugins/artnet/messages/libolaartnetconf.la \ @BUILD_EXAMPLES_TRUE@@USE_ARTNET_TRUE@ $(libprotobuf_LIBS) @BUILD_EXAMPLES_TRUE@examples_ola_dev_info_SOURCES = examples/ola-client.cpp @BUILD_EXAMPLES_TRUE@examples_ola_dev_info_LDADD = $(EXAMPLE_COMMON_LIBS) @BUILD_EXAMPLES_TRUE@examples_ola_streaming_client_SOURCES = examples/ola-streaming-client.cpp @BUILD_EXAMPLES_TRUE@examples_ola_streaming_client_LDADD = $(EXAMPLE_COMMON_LIBS) @BUILD_EXAMPLES_TRUE@examples_ola_rdm_get_SOURCES = examples/ola-rdm.cpp @BUILD_EXAMPLES_TRUE@examples_ola_rdm_get_LDADD = $(EXAMPLE_COMMON_LIBS) @BUILD_EXAMPLES_TRUE@examples_ola_rdm_discover_SOURCES = examples/ola-rdm-discover.cpp @BUILD_EXAMPLES_TRUE@examples_ola_rdm_discover_LDADD = $(EXAMPLE_COMMON_LIBS) @BUILD_EXAMPLES_TRUE@examples_ola_recorder_SOURCES = \ @BUILD_EXAMPLES_TRUE@ examples/ola-recorder.cpp \ @BUILD_EXAMPLES_TRUE@ examples/ShowLoader.h \ @BUILD_EXAMPLES_TRUE@ examples/ShowLoader.cpp \ @BUILD_EXAMPLES_TRUE@ examples/ShowPlayer.h \ @BUILD_EXAMPLES_TRUE@ examples/ShowPlayer.cpp \ @BUILD_EXAMPLES_TRUE@ examples/ShowRecorder.h \ @BUILD_EXAMPLES_TRUE@ examples/ShowRecorder.cpp \ @BUILD_EXAMPLES_TRUE@ examples/ShowSaver.h \ @BUILD_EXAMPLES_TRUE@ examples/ShowSaver.cpp @BUILD_EXAMPLES_TRUE@examples_ola_recorder_LDADD = $(EXAMPLE_COMMON_LIBS) @BUILD_EXAMPLES_TRUE@examples_ola_timecode_SOURCES = examples/ola-timecode.cpp @BUILD_EXAMPLES_TRUE@examples_ola_timecode_LDADD = $(EXAMPLE_COMMON_LIBS) @BUILD_EXAMPLES_TRUE@examples_ola_uni_stats_SOURCES = examples/ola-uni-stats.cpp @BUILD_EXAMPLES_TRUE@examples_ola_uni_stats_LDADD = $(EXAMPLE_COMMON_LIBS) @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_TRUE@examples_ola_dmxconsole_SOURCES = examples/ola-dmxconsole.cpp @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_TRUE@examples_ola_dmxmonitor_SOURCES = examples/ola-dmxmonitor.cpp # Fallback when pkg-config didn't know about ncurses @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_PKGCONFIG_FALSE@@HAVE_NCURSES_TRUE@examples_ola_dmxconsole_LDADD = $(EXAMPLE_COMMON_LIBS) -lncurses @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_PKGCONFIG_TRUE@@HAVE_NCURSES_TRUE@examples_ola_dmxconsole_LDADD = $(EXAMPLE_COMMON_LIBS) $(libncurses_LIBS) @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_PKGCONFIG_FALSE@@HAVE_NCURSES_TRUE@examples_ola_dmxmonitor_LDADD = $(EXAMPLE_COMMON_LIBS) -lncurses @BUILD_EXAMPLES_TRUE@@HAVE_NCURSES_PKGCONFIG_TRUE@@HAVE_NCURSES_TRUE@examples_ola_dmxmonitor_LDADD = $(EXAMPLE_COMMON_LIBS) $(libncurses_LIBS) @BUILD_EXAMPLES_TRUE@examples_ola_throughput_SOURCES = examples/ola-throughput.cpp @BUILD_EXAMPLES_TRUE@examples_ola_throughput_LDADD = $(EXAMPLE_COMMON_LIBS) @BUILD_EXAMPLES_TRUE@examples_ola_latency_SOURCES = examples/ola-latency.cpp @BUILD_EXAMPLES_TRUE@examples_ola_latency_LDADD = $(EXAMPLE_COMMON_LIBS) @BUILD_EXAMPLES_TRUE@@USING_WIN32_FALSE@OLA_PATCH_NAME = ola_patch # rename this program, otherwise UAC will block it @BUILD_EXAMPLES_TRUE@@USING_WIN32_TRUE@OLA_PATCH_NAME = ola_ptch olaacnincludedir = $(pkgincludedir)/acn/ olaacninclude_HEADERS = $(am__append_32) olabaseincludedir = $(pkgincludedir)/base/ olabaseinclude_HEADERS = \ include/ola/base/Array.h \ include/ola/base/Credentials.h \ include/ola/base/Env.h \ include/ola/base/Flags.h \ include/ola/base/FlagsPrivate.h \ include/ola/base/Init.h \ include/ola/base/Macro.h \ include/ola/base/SysExits.h nodist_olabaseinclude_HEADERS = \ include/ola/base/Version.h olaclientincludedir = $(pkgincludedir)/client/ olaclientinclude_HEADERS = \ include/ola/client/CallbackTypes.h \ include/ola/client/ClientArgs.h \ include/ola/client/ClientRDMAPIShim.h \ include/ola/client/ClientTypes.h \ include/ola/client/ClientWrapper.h \ include/ola/client/Module.h \ include/ola/client/OlaClient.h \ include/ola/client/Result.h \ include/ola/client/StreamingClient.h oladmxincludedir = $(pkgincludedir)/dmx/ oladmxinclude_HEADERS = \ include/ola/dmx/RunLengthEncoder.h \ include/ola/dmx/SourcePriorities.h olae133includedir = $(pkgincludedir)/e133/ @INSTALL_E133_TRUE@olae133include_HEADERS = \ @INSTALL_E133_TRUE@ include/ola/e133/DeviceManager.h \ @INSTALL_E133_TRUE@ include/ola/e133/E133Enums.h \ @INSTALL_E133_TRUE@ include/ola/e133/E133Receiver.h \ @INSTALL_E133_TRUE@ include/ola/e133/E133StatusHelper.h \ @INSTALL_E133_TRUE@ include/ola/e133/E133URLParser.h \ @INSTALL_E133_TRUE@ include/ola/e133/MessageBuilder.h olafileincludedir = $(pkgincludedir)/file/ olafileinclude_HEADERS = include/ola/file/Util.h olahttpincludedir = $(pkgincludedir)/http/ olahttpinclude_HEADERS = \ include/ola/http/HTTPServer.h \ include/ola/http/OlaHTTPServer.h olaioincludedir = $(pkgincludedir)/io/ olaioinclude_HEADERS = \ include/ola/io/BigEndianStream.h \ include/ola/io/ByteString.h \ include/ola/io/Descriptor.h \ include/ola/io/ExtendedSerial.h \ include/ola/io/IOQueue.h \ include/ola/io/IOStack.h \ include/ola/io/IOUtils.h \ include/ola/io/IOVecInterface.h \ include/ola/io/InputBuffer.h \ include/ola/io/InputStream.h \ include/ola/io/MemoryBlock.h \ include/ola/io/MemoryBlockPool.h \ include/ola/io/MemoryBuffer.h \ include/ola/io/NonBlockingSender.h \ include/ola/io/OutputBuffer.h \ include/ola/io/OutputStream.h \ include/ola/io/SelectServer.h \ include/ola/io/SelectServerInterface.h \ include/ola/io/Serial.h \ include/ola/io/StdinHandler.h olamathincludedir = $(pkgincludedir)/random/ olamathinclude_HEADERS = include/ola/math/Random.h olamessagingincludedir = $(pkgincludedir)/messaging/ olamessaginginclude_HEADERS = \ include/ola/messaging/Descriptor.h \ include/ola/messaging/DescriptorVisitor.h \ include/ola/messaging/Message.h \ include/ola/messaging/MessagePrinter.h \ include/ola/messaging/MessageVisitor.h \ include/ola/messaging/SchemaPrinter.h \ include/ola/messaging/StringMessageBuilder.h olanetworkincludedir = $(pkgincludedir)/network/ olanetworkinclude_HEADERS = \ include/ola/network/AdvancedTCPConnector.h\ include/ola/network/HealthCheckedConnection.h \ include/ola/network/IPV4Address.h \ include/ola/network/Interface.h \ include/ola/network/InterfacePicker.h \ include/ola/network/MACAddress.h \ include/ola/network/NetworkUtils.h \ include/ola/network/Socket.h \ include/ola/network/SocketAddress.h \ include/ola/network/SocketCloser.h \ include/ola/network/TCPConnector.h \ include/ola/network/TCPSocket.h \ include/ola/network/TCPSocketFactory.h olardmincludedir = $(pkgincludedir)/rdm/ olardminclude_HEADERS = \ include/ola/rdm/AckTimerResponder.h \ include/ola/rdm/AdvancedDimmerResponder.h \ include/ola/rdm/CommandPrinter.h \ include/ola/rdm/DimmerResponder.h \ include/ola/rdm/DimmerRootDevice.h \ include/ola/rdm/DimmerSubDevice.h \ include/ola/rdm/DiscoveryAgent.h \ include/ola/rdm/DummyResponder.h \ include/ola/rdm/MessageDeserializer.h \ include/ola/rdm/MessageSerializer.h \ include/ola/rdm/MovingLightResponder.h \ include/ola/rdm/NetworkManagerInterface.h \ include/ola/rdm/NetworkResponder.h \ include/ola/rdm/OpenLightingEnums.h \ include/ola/rdm/PidStore.h \ include/ola/rdm/PidStoreHelper.h \ include/ola/rdm/QueueingRDMController.h \ include/ola/rdm/RDMAPI.h \ include/ola/rdm/RDMAPIImplInterface.h \ include/ola/rdm/RDMCommand.h \ include/ola/rdm/RDMCommandSerializer.h \ include/ola/rdm/RDMControllerAdaptor.h \ include/ola/rdm/RDMControllerInterface.h \ include/ola/rdm/RDMEnums.h \ include/ola/rdm/RDMFrame.h \ include/ola/rdm/RDMHelper.h \ include/ola/rdm/RDMMessagePrinters.h \ include/ola/rdm/RDMPacket.h \ include/ola/rdm/RDMReply.h \ include/ola/rdm/ResponderHelper.h \ include/ola/rdm/ResponderLoadSensor.h \ include/ola/rdm/ResponderOps.h \ include/ola/rdm/ResponderOpsPrivate.h \ include/ola/rdm/ResponderPersonality.h \ include/ola/rdm/ResponderSensor.h \ include/ola/rdm/ResponderSettings.h \ include/ola/rdm/ResponderSlotData.h \ include/ola/rdm/SensorResponder.h \ include/ola/rdm/StringMessageBuilder.h \ include/ola/rdm/SubDeviceDispatcher.h \ include/ola/rdm/UID.h \ include/ola/rdm/UIDAllocator.h \ include/ola/rdm/UIDSet.h nodist_olardminclude_HEADERS = include/ola/rdm/RDMResponseCodes.h olarpcincludedir = $(pkgincludedir)/rpc/ olarpcinclude_HEADERS = \ include/ola/rpc/RpcSessionHandler.h olastlincludedir = $(pkgincludedir)/stl/ olastlinclude_HEADERS = include/ola/stl/STLUtils.h olastringsincludedir = $(pkgincludedir)/strings/ olastringsinclude_HEADERS = \ include/ola/strings/Format.h \ include/ola/strings/FormatPrivate.h \ include/ola/strings/Utils.h olasystemincludedir = $(pkgincludedir)/system/ olasysteminclude_HEADERS = \ include/ola/system/Limits.h \ include/ola/system/SystemUtils.h olathreadincludedir = $(pkgincludedir)/thread/ olathreadinclude_HEADERS = \ include/ola/thread/CallbackThread.h \ include/ola/thread/ConsumerThread.h \ include/ola/thread/ExecutorInterface.h \ include/ola/thread/ExecutorThread.h \ include/ola/thread/Future.h \ include/ola/thread/FuturePrivate.h \ include/ola/thread/Mutex.h \ include/ola/thread/PeriodicThread.h \ include/ola/thread/SchedulerInterface.h \ include/ola/thread/SchedulingExecutorInterface.h \ include/ola/thread/SignalThread.h \ include/ola/thread/Thread.h \ include/ola/thread/ThreadPool.h \ include/ola/thread/Utils.h olatimecodeincludedir = $(pkgincludedir)/timecode/ olatimecodeinclude_HEADERS = include/ola/timecode/TimeCode.h nodist_olatimecodeinclude_HEADERS = include/ola/timecode/TimeCodeEnums.h olautilincludedir = $(pkgincludedir)/util/ olautilinclude_HEADERS = \ include/ola/util/Backoff.h \ include/ola/util/Deleter.h \ include/ola/util/SequenceNumber.h \ include/ola/util/Utils.h \ include/ola/util/Watchdog.h olawebincludedir = $(pkgincludedir)/web/ olawebinclude_HEADERS = \ include/ola/web/Json.h \ include/ola/web/JsonData.h \ include/ola/web/JsonLexer.h \ include/ola/web/JsonParser.h \ include/ola/web/JsonPatch.h \ include/ola/web/JsonPatchParser.h \ include/ola/web/JsonPointer.h \ include/ola/web/JsonSchema.h \ include/ola/web/JsonSections.h \ include/ola/web/JsonTypes.h \ include/ola/web/JsonWriter.h \ include/ola/web/OptionalItem.h olawinincludedir = $(pkgincludedir)/win/ olawininclude_HEADERS = \ include/ola/win/CleanWinSock2.h \ include/ola/win/CleanWindows.h # HEADERS ################################################## oladinclude_HEADERS = include/olad/Device.h include/olad/DmxSource.h \ include/olad/Plugin.h include/olad/PluginAdaptor.h \ include/olad/Port.h include/olad/PortBroker.h \ include/olad/PortConstants.h include/olad/Preferences.h \ include/olad/TokenBucket.h include/olad/Universe.h \ olad/OlaDaemon.h olad/OlaServer.h COMMON_E131_CXXFLAGS = $(COMMON_CXXFLAGS) -Wconversion # libolaacn.la libs_acn_libolaacn_la_SOURCES = \ libs/acn/CID.cpp \ libs/acn/CIDImpl.cpp \ libs/acn/CIDImpl.h libs_acn_libolaacn_la_CXXFLAGS = $(COMMON_E131_CXXFLAGS) $(uuid_CFLAGS) libs_acn_libolaacn_la_LIBADD = $(uuid_LIBS) \ common/libolacommon.la libs_acn_libolae131core_la_SOURCES = \ libs/acn/BaseInflator.cpp \ libs/acn/BaseInflator.h \ libs/acn/DMPAddress.cpp \ libs/acn/DMPAddress.h \ libs/acn/DMPE131Inflator.cpp \ libs/acn/DMPE131Inflator.h \ libs/acn/DMPHeader.h \ libs/acn/DMPInflator.cpp \ libs/acn/DMPInflator.h \ libs/acn/DMPPDU.cpp \ libs/acn/DMPPDU.h \ libs/acn/E131DiscoveryInflator.cpp \ libs/acn/E131DiscoveryInflator.h \ libs/acn/E131Header.h \ libs/acn/E131Inflator.cpp \ libs/acn/E131Inflator.h \ libs/acn/E131Node.cpp \ libs/acn/E131Node.h \ libs/acn/E131PDU.cpp \ libs/acn/E131PDU.h \ libs/acn/E131Sender.cpp \ libs/acn/E131Sender.h \ libs/acn/E133Header.h \ libs/acn/E133Inflator.cpp \ libs/acn/E133Inflator.h \ libs/acn/E133PDU.cpp \ libs/acn/E133PDU.h \ libs/acn/E133StatusInflator.cpp \ libs/acn/E133StatusInflator.h \ libs/acn/E133StatusPDU.cpp \ libs/acn/E133StatusPDU.h \ libs/acn/HeaderSet.h \ libs/acn/PDU.cpp \ libs/acn/PDU.h \ libs/acn/PDUTestCommon.h \ libs/acn/PreamblePacker.cpp \ libs/acn/PreamblePacker.h \ libs/acn/RDMInflator.cpp \ libs/acn/RDMInflator.h \ libs/acn/RDMPDU.cpp \ libs/acn/RDMPDU.h \ libs/acn/RootHeader.h \ libs/acn/RootInflator.cpp \ libs/acn/RootInflator.h \ libs/acn/RootPDU.cpp \ libs/acn/RootPDU.h \ libs/acn/RootSender.cpp \ libs/acn/RootSender.h \ libs/acn/TCPTransport.cpp \ libs/acn/TCPTransport.h \ libs/acn/Transport.h \ libs/acn/TransportHeader.h \ libs/acn/UDPTransport.cpp \ libs/acn/UDPTransport.h libs_acn_libolae131core_la_CXXFLAGS = \ $(COMMON_E131_CXXFLAGS) $(uuid_CFLAGS) libs_acn_libolae131core_la_LIBADD = $(uuid_LIBS) \ common/libolacommon.la \ libs/acn/libolaacn.la libs_acn_e131_transmit_test_SOURCES = \ libs/acn/e131_transmit_test.cpp \ libs/acn/E131TestFramework.cpp \ libs/acn/E131TestFramework.h libs_acn_e131_transmit_test_LDADD = libs/acn/libolae131core.la libs_acn_e131_loadtest_SOURCES = libs/acn/e131_loadtest.cpp libs_acn_e131_loadtest_LDADD = libs/acn/libolae131core.la libs_acn_E131Tester_SOURCES = \ libs/acn/BaseInflatorTest.cpp \ libs/acn/CIDTest.cpp \ libs/acn/DMPAddressTest.cpp \ libs/acn/DMPInflatorTest.cpp \ libs/acn/DMPPDUTest.cpp \ libs/acn/E131InflatorTest.cpp \ libs/acn/E131PDUTest.cpp \ libs/acn/HeaderSetTest.cpp \ libs/acn/PDUTest.cpp \ libs/acn/RootInflatorTest.cpp \ libs/acn/RootPDUTest.cpp \ libs/acn/RootSenderTest.cpp libs_acn_E131Tester_CPPFLAGS = $(COMMON_TESTING_FLAGS) # For some completely messed up reason on mac CPPUNIT_LIBS has to come after # the ossp uuid library. # CPPUNIT_LIBS contains -ldl which causes the tests to fail in strange ways libs_acn_E131Tester_LDADD = \ libs/acn/libolae131core.la \ $(COMMON_TESTING_LIBS) libs_acn_E133Tester_SOURCES = \ libs/acn/E133InflatorTest.cpp \ libs/acn/E133PDUTest.cpp \ libs/acn/RDMPDUTest.cpp libs_acn_E133Tester_CPPFLAGS = $(COMMON_TESTING_FLAGS) libs_acn_E133Tester_LDADD = \ libs/acn/libolae131core.la \ $(COMMON_TESTING_LIBS) libs_acn_TransportTester_SOURCES = \ libs/acn/TCPTransportTest.cpp \ libs/acn/UDPTransportTest.cpp libs_acn_TransportTester_CPPFLAGS = $(COMMON_TESTING_FLAGS) libs_acn_TransportTester_LDADD = libs/acn/libolae131core.la \ $(COMMON_TESTING_LIBS) @USE_LIBUSB_TRUE@libs_usb_libolausb_la_SOURCES = \ @USE_LIBUSB_TRUE@ libs/usb/HotplugAgent.cpp \ @USE_LIBUSB_TRUE@ libs/usb/HotplugAgent.h \ @USE_LIBUSB_TRUE@ libs/usb/JaRuleConstants.h \ @USE_LIBUSB_TRUE@ libs/usb/JaRuleConstants.cpp \ @USE_LIBUSB_TRUE@ libs/usb/JaRulePortHandle.cpp \ @USE_LIBUSB_TRUE@ libs/usb/JaRulePortHandle.h \ @USE_LIBUSB_TRUE@ libs/usb/JaRulePortHandleImpl.cpp \ @USE_LIBUSB_TRUE@ libs/usb/JaRulePortHandleImpl.h \ @USE_LIBUSB_TRUE@ libs/usb/JaRuleWidget.cpp \ @USE_LIBUSB_TRUE@ libs/usb/JaRuleWidget.h \ @USE_LIBUSB_TRUE@ libs/usb/JaRuleWidgetPort.cpp \ @USE_LIBUSB_TRUE@ libs/usb/JaRuleWidgetPort.h \ @USE_LIBUSB_TRUE@ libs/usb/LibUsbAdaptor.cpp \ @USE_LIBUSB_TRUE@ libs/usb/LibUsbAdaptor.h \ @USE_LIBUSB_TRUE@ libs/usb/LibUsbThread.cpp \ @USE_LIBUSB_TRUE@ libs/usb/LibUsbThread.h \ @USE_LIBUSB_TRUE@ libs/usb/Types.cpp \ @USE_LIBUSB_TRUE@ libs/usb/Types.h @USE_LIBUSB_TRUE@libs_usb_libolausb_la_CXXFLAGS = $(COMMON_CXXFLAGS) \ @USE_LIBUSB_TRUE@ $(libusb_CFLAGS) @USE_LIBUSB_TRUE@libs_usb_libolausb_la_LIBADD = $(libusb_LIBS) \ @USE_LIBUSB_TRUE@ common/libolacommon.la @USE_LIBUSB_TRUE@LIBS_USB_TEST_LDADD = $(COMMON_TESTING_LIBS) \ @USE_LIBUSB_TRUE@ $(libusb_LIBS) \ @USE_LIBUSB_TRUE@ libs/usb/libolausb.la @USE_LIBUSB_TRUE@libs_usb_LibUsbThreadTester_SOURCES = \ @USE_LIBUSB_TRUE@ libs/usb/LibUsbThreadTest.cpp @USE_LIBUSB_TRUE@libs_usb_LibUsbThreadTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) \ @USE_LIBUSB_TRUE@ $(libusb_CFLAGS) @USE_LIBUSB_TRUE@libs_usb_LibUsbThreadTester_LDADD = $(LIBS_USB_TEST_LDADD) # HEADERS ################################################## # These headers are deprecated and will be removed 6 months after the 0.9.0 # release. DEPRECATED = \ ola/OlaCallbackClient.h \ ola/OlaDevice.h \ ola/StreamingClient.h ola_libola_la_SOURCES = \ ola/AutoStart.cpp \ ola/ClientRDMAPIShim.cpp \ ola/ClientTypesFactory.h \ ola/ClientTypesFactory.cpp \ ola/Module.cpp \ ola/OlaCallbackClient.cpp \ ola/OlaClient.cpp \ ola/OlaClientCore.h \ ola/OlaClientCore.cpp \ ola/OlaClientWrapper.cpp \ ola/StreamingClient.cpp ola_libola_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) ola_libola_la_LDFLAGS = -version-info 1:1:0 ola_libola_la_LIBADD = common/libolacommon.la ola_OlaClientTester_SOURCES = ola/OlaClientWrapperTest.cpp \ ola/StreamingClientTest.cpp ola_OlaClientTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) ola_OlaClientTester_LDADD = $(COMMON_TESTING_LIBS) \ $(PLUGIN_LIBS) \ common/libolacommon.la \ olad/libolaserver.la \ ola/libola.la olad_plugin_api_libolaserverplugininterface_la_SOURCES = \ olad/plugin_api/Client.cpp \ olad/plugin_api/Client.h \ olad/plugin_api/Device.cpp \ olad/plugin_api/DeviceManager.cpp \ olad/plugin_api/DeviceManager.h \ olad/plugin_api/DmxSource.cpp \ olad/plugin_api/Plugin.cpp \ olad/plugin_api/PluginAdaptor.cpp \ olad/plugin_api/Port.cpp \ olad/plugin_api/PortBroker.cpp \ olad/plugin_api/PortManager.cpp \ olad/plugin_api/PortManager.h \ olad/plugin_api/Preferences.cpp \ olad/plugin_api/Universe.cpp \ olad/plugin_api/UniverseStore.cpp \ olad/plugin_api/UniverseStore.h olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS = \ $(COMMON_PROTOBUF_CXXFLAGS) olad_plugin_api_libolaserverplugininterface_la_LIBADD = \ common/libolacommon.la \ common/web/libolaweb.la \ ola/libola.la COMMON_OLAD_PLUGIN_API_TEST_LDADD = \ $(COMMON_TESTING_LIBS) \ $(libprotobuf_LIBS) \ olad/plugin_api/libolaserverplugininterface.la \ common/libolacommon.la olad_plugin_api_ClientTester_SOURCES = olad/plugin_api/ClientTest.cpp olad_plugin_api_ClientTester_CXXFLAGS = $(COMMON_TESTING_PROTOBUF_FLAGS) olad_plugin_api_ClientTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) olad_plugin_api_DeviceTester_SOURCES = olad/plugin_api/DeviceManagerTest.cpp \ olad/plugin_api/DeviceTest.cpp olad_plugin_api_DeviceTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) olad_plugin_api_DeviceTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) olad_plugin_api_DmxSourceTester_SOURCES = olad/plugin_api/DmxSourceTest.cpp olad_plugin_api_DmxSourceTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) olad_plugin_api_DmxSourceTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) olad_plugin_api_PortTester_SOURCES = olad/plugin_api/PortTest.cpp \ olad/plugin_api/PortManagerTest.cpp olad_plugin_api_PortTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) olad_plugin_api_PortTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) olad_plugin_api_PreferencesTester_SOURCES = olad/plugin_api/PreferencesTest.cpp olad_plugin_api_PreferencesTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) olad_plugin_api_PreferencesTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) olad_plugin_api_UniverseTester_SOURCES = olad/plugin_api/UniverseTest.cpp olad_plugin_api_UniverseTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) olad_plugin_api_UniverseTester_LDADD = $(COMMON_OLAD_PLUGIN_API_TEST_LDADD) @USE_ARTNET_TRUE@artnetincludedir = $(includedir)/ola/artnet @USE_ARTNET_TRUE@nodist_artnetinclude_HEADERS = \ @USE_ARTNET_TRUE@ plugins/artnet/messages/ArtNetConfigMessages.pb.h @USE_ARTNET_TRUE@nodist_plugins_artnet_messages_libolaartnetconf_la_SOURCES = \ @USE_ARTNET_TRUE@ plugins/artnet/messages/ArtNetConfigMessages.pb.cc @USE_ARTNET_TRUE@plugins_artnet_messages_libolaartnetconf_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) @USE_ARTNET_TRUE@plugins_artnet_messages_libolaartnetconf_la_LIBADD = $(libprotobuf_LIBS) @USE_ARTNET_TRUE@plugins_artnet_libolaartnetnode_la_SOURCES = \ @USE_ARTNET_TRUE@ plugins/artnet/ArtNetPackets.h \ @USE_ARTNET_TRUE@ plugins/artnet/ArtNetNode.cpp \ @USE_ARTNET_TRUE@ plugins/artnet/ArtNetNode.h @USE_ARTNET_TRUE@plugins_artnet_libolaartnetnode_la_LIBADD = common/libolacommon.la @USE_ARTNET_TRUE@plugins_artnet_libolaartnet_la_SOURCES = \ @USE_ARTNET_TRUE@ plugins/artnet/ArtNetPlugin.cpp \ @USE_ARTNET_TRUE@ plugins/artnet/ArtNetPlugin.h \ @USE_ARTNET_TRUE@ plugins/artnet/ArtNetDevice.cpp \ @USE_ARTNET_TRUE@ plugins/artnet/ArtNetDevice.h \ @USE_ARTNET_TRUE@ plugins/artnet/ArtNetPort.cpp \ @USE_ARTNET_TRUE@ plugins/artnet/ArtNetPort.h @USE_ARTNET_TRUE@plugins_artnet_libolaartnet_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) @USE_ARTNET_TRUE@plugins_artnet_libolaartnet_la_LIBADD = \ @USE_ARTNET_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_ARTNET_TRUE@ plugins/artnet/libolaartnetnode.la \ @USE_ARTNET_TRUE@ plugins/artnet/messages/libolaartnetconf.la @USE_ARTNET_TRUE@plugins_artnet_artnet_loadtest_SOURCES = plugins/artnet/artnet_loadtest.cpp @USE_ARTNET_TRUE@plugins_artnet_artnet_loadtest_LDADD = plugins/artnet/libolaartnetnode.la @USE_ARTNET_TRUE@plugins_artnet_ArtNetTester_SOURCES = plugins/artnet/ArtNetNodeTest.cpp @USE_ARTNET_TRUE@plugins_artnet_ArtNetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_ARTNET_TRUE@plugins_artnet_ArtNetTester_LDADD = $(COMMON_TESTING_LIBS) \ @USE_ARTNET_TRUE@ plugins/artnet/libolaartnetnode.la @USE_DUMMY_TRUE@plugins_dummy_liboladummy_la_SOURCES = \ @USE_DUMMY_TRUE@ plugins/dummy/DummyDevice.cpp \ @USE_DUMMY_TRUE@ plugins/dummy/DummyDevice.h \ @USE_DUMMY_TRUE@ plugins/dummy/DummyPlugin.cpp \ @USE_DUMMY_TRUE@ plugins/dummy/DummyPlugin.h \ @USE_DUMMY_TRUE@ plugins/dummy/DummyPort.cpp \ @USE_DUMMY_TRUE@ plugins/dummy/DummyPort.h @USE_DUMMY_TRUE@plugins_dummy_liboladummy_la_LIBADD = \ @USE_DUMMY_TRUE@ common/libolacommon.la \ @USE_DUMMY_TRUE@ olad/plugin_api/libolaserverplugininterface.la @USE_DUMMY_TRUE@plugins_dummy_DummyPluginTester_SOURCES = plugins/dummy/DummyPortTest.cpp @USE_DUMMY_TRUE@plugins_dummy_DummyPluginTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) # it's unclear to me why liboladummyresponder has to be included here # but if it isn't, the test breaks with gcc 4.6.1 @USE_DUMMY_TRUE@plugins_dummy_DummyPluginTester_LDADD = \ @USE_DUMMY_TRUE@ $(COMMON_TESTING_LIBS) \ @USE_DUMMY_TRUE@ $(top_builddir)/olad/plugin_api/libolaserverplugininterface.la \ @USE_DUMMY_TRUE@ $(top_builddir)/olad/libolaserver.la \ @USE_DUMMY_TRUE@ plugins/dummy/liboladummy.la \ @USE_DUMMY_TRUE@ common/libolacommon.la @USE_ESPNET_TRUE@plugins_espnet_libolaespnet_la_SOURCES = \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetDevice.cpp \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetDevice.h \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetNode.cpp \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetNode.h \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetPackets.h \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetPlugin.cpp \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetPlugin.h \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetPluginCommon.h \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetPort.cpp \ @USE_ESPNET_TRUE@ plugins/espnet/EspNetPort.h \ @USE_ESPNET_TRUE@ plugins/espnet/RunLengthDecoder.cpp \ @USE_ESPNET_TRUE@ plugins/espnet/RunLengthDecoder.h @USE_ESPNET_TRUE@plugins_espnet_libolaespnet_la_LIBADD = \ @USE_ESPNET_TRUE@ common/libolacommon.la \ @USE_ESPNET_TRUE@ olad/plugin_api/libolaserverplugininterface.la @USE_ESPNET_TRUE@plugins_espnet_EspNetTester_SOURCES = \ @USE_ESPNET_TRUE@ plugins/espnet/RunLengthDecoderTest.cpp \ @USE_ESPNET_TRUE@ plugins/espnet/RunLengthDecoder.cpp @USE_ESPNET_TRUE@plugins_espnet_EspNetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_ESPNET_TRUE@plugins_espnet_EspNetTester_LDADD = $(COMMON_TESTING_LIBS) \ @USE_ESPNET_TRUE@ common/libolacommon.la @USE_FTDI_TRUE@plugins_ftdidmx_libolaftdidmx_la_SOURCES = \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiDmxDevice.cpp \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiDmxDevice.h \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiDmxPlugin.cpp \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiDmxPlugin.h \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiDmxPort.h \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiDmxThread.cpp \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiDmxThread.h \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiWidget.cpp \ @USE_FTDI_TRUE@ plugins/ftdidmx/FtdiWidget.h @USE_FTDI_TRUE@plugins_ftdidmx_libolaftdidmx_la_LIBADD = \ @USE_FTDI_TRUE@ common/libolacommon.la \ @USE_FTDI_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_FTDI_TRUE@ $(am__append_48) $(am__append_49) # This is a library which isn't coupled to olad @USE_GPIO_TRUE@plugins_gpio_libolagpiocore_la_SOURCES = \ @USE_GPIO_TRUE@ plugins/gpio/GPIODriver.cpp \ @USE_GPIO_TRUE@ plugins/gpio/GPIODriver.h @USE_GPIO_TRUE@plugins_gpio_libolagpiocore_la_LIBADD = common/libolacommon.la @USE_GPIO_TRUE@plugins_gpio_libolagpio_la_SOURCES = \ @USE_GPIO_TRUE@ plugins/gpio/GPIODevice.cpp \ @USE_GPIO_TRUE@ plugins/gpio/GPIODevice.h \ @USE_GPIO_TRUE@ plugins/gpio/GPIOPlugin.cpp \ @USE_GPIO_TRUE@ plugins/gpio/GPIOPlugin.h \ @USE_GPIO_TRUE@ plugins/gpio/GPIOPort.cpp \ @USE_GPIO_TRUE@ plugins/gpio/GPIOPort.h @USE_GPIO_TRUE@plugins_gpio_libolagpio_la_LIBADD = \ @USE_GPIO_TRUE@ common/libolacommon.la \ @USE_GPIO_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_GPIO_TRUE@ plugins/gpio/libolagpiocore.la @USE_KARATE_TRUE@plugins_karate_libolakarate_la_SOURCES = \ @USE_KARATE_TRUE@ plugins/karate/KaratePlugin.cpp \ @USE_KARATE_TRUE@ plugins/karate/KarateDevice.cpp \ @USE_KARATE_TRUE@ plugins/karate/KarateThread.cpp \ @USE_KARATE_TRUE@ plugins/karate/KarateLight.cpp \ @USE_KARATE_TRUE@ plugins/karate/KaratePlugin.h \ @USE_KARATE_TRUE@ plugins/karate/KarateDevice.h \ @USE_KARATE_TRUE@ plugins/karate/KaratePort.h \ @USE_KARATE_TRUE@ plugins/karate/KarateThread.h \ @USE_KARATE_TRUE@ plugins/karate/KarateLight.h @USE_KARATE_TRUE@plugins_karate_libolakarate_la_LIBADD = \ @USE_KARATE_TRUE@ common/libolacommon.la \ @USE_KARATE_TRUE@ olad/plugin_api/libolaserverplugininterface.la @USE_KINET_TRUE@plugins_kinet_libolakinetnode_la_SOURCES = plugins/kinet/KiNetNode.cpp \ @USE_KINET_TRUE@ plugins/kinet/KiNetNode.h @USE_KINET_TRUE@plugins_kinet_libolakinetnode_la_LIBADD = common/libolacommon.la @USE_KINET_TRUE@plugins_kinet_libolakinet_la_SOURCES = \ @USE_KINET_TRUE@ plugins/kinet/KiNetPlugin.cpp \ @USE_KINET_TRUE@ plugins/kinet/KiNetPlugin.h \ @USE_KINET_TRUE@ plugins/kinet/KiNetDevice.cpp \ @USE_KINET_TRUE@ plugins/kinet/KiNetDevice.h \ @USE_KINET_TRUE@ plugins/kinet/KiNetPort.h @USE_KINET_TRUE@plugins_kinet_libolakinet_la_LIBADD = \ @USE_KINET_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_KINET_TRUE@ plugins/kinet/libolakinetnode.la @USE_KINET_TRUE@plugins_kinet_KiNetTester_SOURCES = plugins/kinet/KiNetNodeTest.cpp @USE_KINET_TRUE@plugins_kinet_KiNetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_KINET_TRUE@plugins_kinet_KiNetTester_LDADD = $(COMMON_TESTING_LIBS) \ @USE_KINET_TRUE@ plugins/kinet/libolakinetnode.la @USE_MILINST_TRUE@plugins_milinst_libolamilinst_la_SOURCES = \ @USE_MILINST_TRUE@ plugins/milinst/MilInstDevice.cpp \ @USE_MILINST_TRUE@ plugins/milinst/MilInstDevice.h \ @USE_MILINST_TRUE@ plugins/milinst/MilInstPlugin.cpp \ @USE_MILINST_TRUE@ plugins/milinst/MilInstPlugin.h \ @USE_MILINST_TRUE@ plugins/milinst/MilInstPort.cpp \ @USE_MILINST_TRUE@ plugins/milinst/MilInstPort.h \ @USE_MILINST_TRUE@ plugins/milinst/MilInstWidget.cpp \ @USE_MILINST_TRUE@ plugins/milinst/MilInstWidget.h \ @USE_MILINST_TRUE@ plugins/milinst/MilInstWidget1463.cpp \ @USE_MILINST_TRUE@ plugins/milinst/MilInstWidget1463.h \ @USE_MILINST_TRUE@ plugins/milinst/MilInstWidget1553.cpp \ @USE_MILINST_TRUE@ plugins/milinst/MilInstWidget1553.h @USE_MILINST_TRUE@plugins_milinst_libolamilinst_la_LIBADD = \ @USE_MILINST_TRUE@ common/libolacommon.la \ @USE_MILINST_TRUE@ olad/plugin_api/libolaserverplugininterface.la @USE_OPENDMX_TRUE@plugins_opendmx_libolaopendmx_la_SOURCES = \ @USE_OPENDMX_TRUE@ plugins/opendmx/OpenDmxDevice.cpp \ @USE_OPENDMX_TRUE@ plugins/opendmx/OpenDmxDevice.h \ @USE_OPENDMX_TRUE@ plugins/opendmx/OpenDmxPlugin.cpp \ @USE_OPENDMX_TRUE@ plugins/opendmx/OpenDmxPlugin.h \ @USE_OPENDMX_TRUE@ plugins/opendmx/OpenDmxPort.h \ @USE_OPENDMX_TRUE@ plugins/opendmx/OpenDmxThread.cpp \ @USE_OPENDMX_TRUE@ plugins/opendmx/OpenDmxThread.h @USE_OPENDMX_TRUE@plugins_opendmx_libolaopendmx_la_LIBADD = \ @USE_OPENDMX_TRUE@ common/libolacommon.la \ @USE_OPENDMX_TRUE@ olad/plugin_api/libolaserverplugininterface.la @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_libolaopc_la_SOURCES = \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCClient.cpp \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCClient.h \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCConstants.h \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCServer.cpp \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCServer.h @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_libolaopc_la_LIBADD = \ @USE_OPENPIXELCONTROL_TRUE@ common/libolacommon.la @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_libolaopenpixelcontrol_la_SOURCES = \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCDevice.cpp \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCDevice.h \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCPlugin.cpp \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCPlugin.h \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCPort.cpp \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCPort.h @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_libolaopenpixelcontrol_la_LIBADD = \ @USE_OPENPIXELCONTROL_TRUE@ common/libolacommon.la \ @USE_OPENPIXELCONTROL_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/libolaopc.la @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_OPCClientTester_SOURCES = \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCClientTest.cpp @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_OPCClientTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_OPCClientTester_LDADD = \ @USE_OPENPIXELCONTROL_TRUE@ $(COMMON_TESTING_LIBS) \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/libolaopc.la @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_OPCServerTester_SOURCES = \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/OPCServerTest.cpp @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_OPCServerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_OPENPIXELCONTROL_TRUE@plugins_openpixelcontrol_OPCServerTester_LDADD = \ @USE_OPENPIXELCONTROL_TRUE@ $(COMMON_TESTING_LIBS) \ @USE_OPENPIXELCONTROL_TRUE@ plugins/openpixelcontrol/libolaopc.la @USE_OSC_TRUE@plugins_osc_libolaoscnode_la_SOURCES = \ @USE_OSC_TRUE@ plugins/osc/OSCAddressTemplate.cpp \ @USE_OSC_TRUE@ plugins/osc/OSCAddressTemplate.h \ @USE_OSC_TRUE@ plugins/osc/OSCNode.cpp \ @USE_OSC_TRUE@ plugins/osc/OSCNode.h \ @USE_OSC_TRUE@ plugins/osc/OSCTarget.h @USE_OSC_TRUE@plugins_osc_libolaoscnode_la_CXXFLAGS = $(COMMON_CXXFLAGS) $(liblo_CFLAGS) @USE_OSC_TRUE@plugins_osc_libolaoscnode_la_LIBADD = $(liblo_LIBS) @USE_OSC_TRUE@plugins_osc_libolaosc_la_SOURCES = \ @USE_OSC_TRUE@ plugins/osc/OSCDevice.cpp \ @USE_OSC_TRUE@ plugins/osc/OSCDevice.h \ @USE_OSC_TRUE@ plugins/osc/OSCPlugin.cpp \ @USE_OSC_TRUE@ plugins/osc/OSCPlugin.h \ @USE_OSC_TRUE@ plugins/osc/OSCPort.cpp \ @USE_OSC_TRUE@ plugins/osc/OSCPort.h @USE_OSC_TRUE@plugins_osc_libolaosc_la_CXXFLAGS = $(COMMON_CXXFLAGS) $(liblo_CFLAGS) @USE_OSC_TRUE@plugins_osc_libolaosc_la_LIBADD = \ @USE_OSC_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_OSC_TRUE@ plugins/osc/libolaoscnode.la @USE_OSC_TRUE@plugins_osc_OSCTester_SOURCES = \ @USE_OSC_TRUE@ plugins/osc/OSCAddressTemplateTest.cpp \ @USE_OSC_TRUE@ plugins/osc/OSCNodeTest.cpp @USE_OSC_TRUE@plugins_osc_OSCTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_OSC_TRUE@plugins_osc_OSCTester_LDADD = $(COMMON_TESTING_LIBS) \ @USE_OSC_TRUE@ plugins/osc/libolaoscnode.la \ @USE_OSC_TRUE@ common/libolacommon.la @USE_PATHPORT_TRUE@plugins_pathport_libolapathport_la_SOURCES = \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportDevice.cpp \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportDevice.h \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportNode.cpp \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportNode.h \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportPackets.h \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportPlugin.cpp \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportPlugin.h \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportPort.cpp \ @USE_PATHPORT_TRUE@ plugins/pathport/PathportPort.h @USE_PATHPORT_TRUE@plugins_pathport_libolapathport_la_LIBADD = \ @USE_PATHPORT_TRUE@ common/libolacommon.la \ @USE_PATHPORT_TRUE@ olad/plugin_api/libolaserverplugininterface.la @USE_RENARD_TRUE@plugins_renard_libolarenard_la_SOURCES = \ @USE_RENARD_TRUE@ plugins/renard/RenardDevice.cpp \ @USE_RENARD_TRUE@ plugins/renard/RenardDevice.h \ @USE_RENARD_TRUE@ plugins/renard/RenardPlugin.cpp \ @USE_RENARD_TRUE@ plugins/renard/RenardPlugin.h \ @USE_RENARD_TRUE@ plugins/renard/RenardPort.cpp \ @USE_RENARD_TRUE@ plugins/renard/RenardPort.h \ @USE_RENARD_TRUE@ plugins/renard/RenardWidget.cpp \ @USE_RENARD_TRUE@ plugins/renard/RenardWidget.h @USE_RENARD_TRUE@plugins_renard_libolarenard_la_LIBADD = \ @USE_RENARD_TRUE@ common/libolacommon.la \ @USE_RENARD_TRUE@ olad/plugin_api/libolaserverplugininterface.la @USE_SANDNET_TRUE@plugins_sandnet_libolasandnet_la_SOURCES = \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetCommon.h \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetDevice.cpp \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetDevice.h \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetNode.cpp \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetNode.h \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetPackets.h \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetPlugin.cpp \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetPlugin.h \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetPort.cpp \ @USE_SANDNET_TRUE@ plugins/sandnet/SandNetPort.h @USE_SANDNET_TRUE@plugins_sandnet_libolasandnet_la_LIBADD = \ @USE_SANDNET_TRUE@ common/libolacommon.la \ @USE_SANDNET_TRUE@ olad/plugin_api/libolaserverplugininterface.la @USE_SHOWNET_TRUE@plugins_shownet_libolashownet_la_SOURCES = \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetPlugin.cpp \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetDevice.cpp \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetPort.cpp \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetNode.cpp \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetPlugin.h \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetDevice.h \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetPort.h \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetPackets.h \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetNode.h @USE_SHOWNET_TRUE@plugins_shownet_libolashownet_la_LIBADD = \ @USE_SHOWNET_TRUE@ common/libolacommon.la \ @USE_SHOWNET_TRUE@ olad/plugin_api/libolaserverplugininterface.la @USE_SHOWNET_TRUE@plugins_shownet_ShowNetTester_SOURCES = \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetNode.cpp \ @USE_SHOWNET_TRUE@ plugins/shownet/ShowNetNodeTest.cpp @USE_SHOWNET_TRUE@plugins_shownet_ShowNetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_SHOWNET_TRUE@plugins_shownet_ShowNetTester_LDADD = $(COMMON_TESTING_LIBS) \ @USE_SHOWNET_TRUE@ common/libolacommon.la @USE_SPI_TRUE@plugins_spi_libolaspicore_la_SOURCES = \ @USE_SPI_TRUE@ plugins/spi/SPIBackend.cpp \ @USE_SPI_TRUE@ plugins/spi/SPIBackend.h \ @USE_SPI_TRUE@ plugins/spi/SPIOutput.cpp \ @USE_SPI_TRUE@ plugins/spi/SPIOutput.h \ @USE_SPI_TRUE@ plugins/spi/SPIWriter.cpp \ @USE_SPI_TRUE@ plugins/spi/SPIWriter.h @USE_SPI_TRUE@plugins_spi_libolaspicore_la_LIBADD = common/libolacommon.la @USE_SPI_TRUE@plugins_spi_libolaspi_la_SOURCES = \ @USE_SPI_TRUE@ plugins/spi/SPIDevice.cpp \ @USE_SPI_TRUE@ plugins/spi/SPIDevice.h \ @USE_SPI_TRUE@ plugins/spi/SPIPlugin.cpp \ @USE_SPI_TRUE@ plugins/spi/SPIPlugin.h \ @USE_SPI_TRUE@ plugins/spi/SPIPort.cpp \ @USE_SPI_TRUE@ plugins/spi/SPIPort.h @USE_SPI_TRUE@plugins_spi_libolaspi_la_LIBADD = \ @USE_SPI_TRUE@ common/libolacommon.la \ @USE_SPI_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_SPI_TRUE@ plugins/spi/libolaspicore.la @USE_SPI_TRUE@plugins_spi_SPITester_SOURCES = \ @USE_SPI_TRUE@ plugins/spi/SPIBackendTest.cpp \ @USE_SPI_TRUE@ plugins/spi/SPIOutputTest.cpp \ @USE_SPI_TRUE@ plugins/spi/FakeSPIWriter.cpp \ @USE_SPI_TRUE@ plugins/spi/FakeSPIWriter.h @USE_SPI_TRUE@plugins_spi_SPITester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_SPI_TRUE@plugins_spi_SPITester_LDADD = $(COMMON_TESTING_LIBS) \ @USE_SPI_TRUE@ plugins/spi/libolaspicore.la \ @USE_SPI_TRUE@ common/libolacommon.la @USE_STAGEPROFI_TRUE@plugins_stageprofi_libolastageprofi_la_SOURCES = \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiDetector.cpp \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiDetector.h \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiDevice.cpp \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiDevice.h \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiPlugin.cpp \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiPlugin.h \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiPort.cpp \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiPort.h \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiWidget.cpp \ @USE_STAGEPROFI_TRUE@ plugins/stageprofi/StageProfiWidget.h @USE_STAGEPROFI_TRUE@plugins_stageprofi_libolastageprofi_la_LIBADD = \ @USE_STAGEPROFI_TRUE@ common/libolacommon.la \ @USE_STAGEPROFI_TRUE@ olad/plugin_api/libolaserverplugininterface.la @USE_LIBUSB_TRUE@plugins_usbdmx_libolausbdmxwidget_la_SOURCES = \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AnymauDMX.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AnymauDMX.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AnymauDMXFactory.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AnymauDMXFactory.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AsyncUsbReceiver.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AsyncUsbReceiver.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AsyncUsbSender.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AsyncUsbSender.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AsyncUsbTransceiverBase.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AsyncUsbTransceiverBase.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/DMXCProjectsNodleU1.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/DMXCProjectsNodleU1.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/DMXCProjectsNodleU1Factory.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/DMXCProjectsNodleU1Factory.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/EurolitePro.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/EurolitePro.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/EuroliteProFactory.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/EuroliteProFactory.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/FirmwareLoader.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/Flags.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/JaRuleFactory.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/JaRuleFactory.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/ScanlimeFadecandy.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/ScanlimeFadecandy.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/ScanlimeFadecandyFactory.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/ScanlimeFadecandyFactory.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/Sunlite.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/Sunlite.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/SunliteFactory.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/SunliteFactory.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/SunliteFirmware.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/SunliteFirmwareLoader.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/SunliteFirmwareLoader.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/SyncronizedWidgetObserver.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/SyncronizedWidgetObserver.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/ThreadedUsbReceiver.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/ThreadedUsbReceiver.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/ThreadedUsbSender.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/ThreadedUsbSender.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/VellemanK8062.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/VellemanK8062.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/VellemanK8062Factory.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/VellemanK8062Factory.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/Widget.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/WidgetFactory.h @USE_LIBUSB_TRUE@plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS = \ @USE_LIBUSB_TRUE@ $(COMMON_CXXFLAGS) \ @USE_LIBUSB_TRUE@ $(libusb_CFLAGS) @USE_LIBUSB_TRUE@plugins_usbdmx_libolausbdmxwidget_la_LIBADD = \ @USE_LIBUSB_TRUE@ $(libusb_LIBS) \ @USE_LIBUSB_TRUE@ common/libolacommon.la \ @USE_LIBUSB_TRUE@ libs/usb/libolausb.la @USE_LIBUSB_TRUE@plugins_usbdmx_libolausbdmx_la_SOURCES = \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AsyncPluginImpl.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/AsyncPluginImpl.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/DMXCProjectsNodleU1Device.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/DMXCProjectsNodleU1Device.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/DMXCProjectsNodleU1Port.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/DMXCProjectsNodleU1Port.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/GenericDevice.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/GenericDevice.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/GenericOutputPort.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/GenericOutputPort.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/JaRuleDevice.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/JaRuleDevice.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/JaRuleOutputPort.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/JaRuleOutputPort.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/PluginImplInterface.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/SyncPluginImpl.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/SyncPluginImpl.h \ @USE_LIBUSB_TRUE@ plugins/usbdmx/UsbDmxPlugin.cpp \ @USE_LIBUSB_TRUE@ plugins/usbdmx/UsbDmxPlugin.h @USE_LIBUSB_TRUE@plugins_usbdmx_libolausbdmx_la_CXXFLAGS = $(COMMON_CXXFLAGS) $(libusb_CFLAGS) @USE_LIBUSB_TRUE@plugins_usbdmx_libolausbdmx_la_LIBADD = \ @USE_LIBUSB_TRUE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_LIBUSB_TRUE@ plugins/usbdmx/libolausbdmxwidget.la @USING_WIN32_FALSE@usbproincludedir = $(includedir)/ola/usbpro @USING_WIN32_FALSE@nodist_usbproinclude_HEADERS = \ @USING_WIN32_FALSE@ plugins/usbpro/messages/UsbProConfigMessages.pb.h @USING_WIN32_FALSE@nodist_plugins_usbpro_messages_libolausbproconf_la_SOURCES = \ @USING_WIN32_FALSE@ plugins/usbpro/messages/UsbProConfigMessages.pb.cc @USING_WIN32_FALSE@plugins_usbpro_messages_libolausbproconf_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) @USING_WIN32_FALSE@plugins_usbpro_messages_libolausbproconf_la_LIBADD = $(libprotobuf_LIBS) @USING_WIN32_FALSE@plugins_usbpro_libolausbprowidget_la_SOURCES = \ @USING_WIN32_FALSE@ plugins/usbpro/ArduinoWidget.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/ArduinoWidget.h \ @USING_WIN32_FALSE@ plugins/usbpro/BaseRobeWidget.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/BaseRobeWidget.h \ @USING_WIN32_FALSE@ plugins/usbpro/BaseUsbProWidget.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/BaseUsbProWidget.h \ @USING_WIN32_FALSE@ plugins/usbpro/DmxTriWidget.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/DmxTriWidget.h \ @USING_WIN32_FALSE@ plugins/usbpro/DmxterWidget.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/DmxterWidget.h \ @USING_WIN32_FALSE@ plugins/usbpro/EnttecUsbProWidget.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/EnttecUsbProWidget.h \ @USING_WIN32_FALSE@ plugins/usbpro/EnttecUsbProWidgetImpl.h \ @USING_WIN32_FALSE@ plugins/usbpro/GenericUsbProWidget.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/GenericUsbProWidget.h \ @USING_WIN32_FALSE@ plugins/usbpro/RobeWidget.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/RobeWidget.h \ @USING_WIN32_FALSE@ plugins/usbpro/RobeWidgetDetector.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/RobeWidgetDetector.h \ @USING_WIN32_FALSE@ plugins/usbpro/SerialWidgetInterface.h \ @USING_WIN32_FALSE@ plugins/usbpro/SerialWidgetInterface.h \ @USING_WIN32_FALSE@ plugins/usbpro/UltraDMXProWidget.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/UltraDMXProWidget.h \ @USING_WIN32_FALSE@ plugins/usbpro/UsbProWidgetDetector.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/UsbProWidgetDetector.h \ @USING_WIN32_FALSE@ plugins/usbpro/WidgetDetectorInterface.h \ @USING_WIN32_FALSE@ plugins/usbpro/WidgetDetectorThread.cpp \ @USING_WIN32_FALSE@ plugins/usbpro/WidgetDetectorThread.h @USING_WIN32_FALSE@plugins_usbpro_libolausbprowidget_la_LIBADD = common/libolacommon.la @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_libolausbpro_la_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/ArduinoRGBDevice.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/ArduinoRGBDevice.h \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/DmxTriDevice.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/DmxTriDevice.h \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/DmxterDevice.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/DmxterDevice.h \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/RobeDevice.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/RobeDevice.h \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UltraDMXProDevice.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UltraDMXProDevice.h \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UsbProDevice.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UsbProDevice.h \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UsbSerialDevice.h \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UsbSerialPlugin.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UsbSerialPlugin.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_libolausbpro_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_libolausbpro_la_LIBADD = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/libolausbprowidget.la \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/messages/libolausbproconf.la @USE_USBPRO_TRUE@@USING_WIN32_FALSE@COMMON_USBPRO_TEST_LDADD = $(COMMON_TESTING_LIBS) \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/libolausbprowidget.la @USE_USBPRO_TRUE@@USING_WIN32_FALSE@common_test_sources = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/CommonWidgetTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/CommonWidgetTest.h \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/MockEndpoint.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/MockEndpoint.h @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_ArduinoWidgetTester_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/ArduinoWidgetTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(common_test_sources) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_ArduinoWidgetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_ArduinoWidgetTester_LDADD = $(COMMON_USBPRO_TEST_LDADD) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_BaseRobeWidgetTester_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/BaseRobeWidgetTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(common_test_sources) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_BaseRobeWidgetTester_LDADD = $(COMMON_USBPRO_TEST_LDADD) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_BaseUsbProWidgetTester_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/BaseUsbProWidgetTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(common_test_sources) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_BaseUsbProWidgetTester_LDADD = $(COMMON_USBPRO_TEST_LDADD) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_DmxTriWidgetTester_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/DmxTriWidgetTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(common_test_sources) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_DmxTriWidgetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_DmxTriWidgetTester_LDADD = $(COMMON_USBPRO_TEST_LDADD) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_DmxterWidgetTester_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/DmxterWidgetTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(common_test_sources) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_DmxterWidgetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_DmxterWidgetTester_LDADD = $(COMMON_USBPRO_TEST_LDADD) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_EnttecUsbProWidgetTester_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/EnttecUsbProWidgetTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(common_test_sources) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_EnttecUsbProWidgetTester_LDADD = $(COMMON_USBPRO_TEST_LDADD) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_RobeWidgetDetectorTester_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/RobeWidgetDetectorTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(common_test_sources) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_RobeWidgetDetectorTester_LDADD = $(COMMON_USBPRO_TEST_LDADD) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_RobeWidgetTester_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/RobeWidgetTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(common_test_sources) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_RobeWidgetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_RobeWidgetTester_LDADD = $(COMMON_USBPRO_TEST_LDADD) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_UltraDMXProWidgetTester_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UltraDMXProWidgetTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(common_test_sources) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_UltraDMXProWidgetTester_LDADD = $(COMMON_USBPRO_TEST_LDADD) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_UsbProWidgetDetectorTester_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/UsbProWidgetDetectorTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(common_test_sources) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_UsbProWidgetDetectorTester_LDADD = $(COMMON_USBPRO_TEST_LDADD) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_WidgetDetectorThreadTester_SOURCES = \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ plugins/usbpro/WidgetDetectorThreadTest.cpp \ @USE_USBPRO_TRUE@@USING_WIN32_FALSE@ $(common_test_sources) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) @USE_USBPRO_TRUE@@USING_WIN32_FALSE@plugins_usbpro_WidgetDetectorThreadTester_LDADD = $(COMMON_USBPRO_TEST_LDADD) @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@plugins_dmx4linux_liboladmx4linux_la_SOURCES = \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ plugins/dmx4linux/Dmx4LinuxDevice.cpp \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ plugins/dmx4linux/Dmx4LinuxDevice.h \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ plugins/dmx4linux/Dmx4LinuxPlugin.cpp \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ plugins/dmx4linux/Dmx4LinuxPlugin.h \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ plugins/dmx4linux/Dmx4LinuxPort.cpp \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ plugins/dmx4linux/Dmx4LinuxPort.h \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ plugins/dmx4linux/Dmx4LinuxSocket.h @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@plugins_dmx4linux_liboladmx4linux_la_LIBADD = \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ common/libolacommon.la \ @USE_DMX4LINUX_TRUE@@USING_WIN32_FALSE@ olad/plugin_api/libolaserverplugininterface.la @USE_E131_TRUE@@USING_WIN32_FALSE@e131includedir = $(includedir)/ola/e131 @USE_E131_TRUE@@USING_WIN32_FALSE@nodist_e131include_HEADERS = \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/messages/E131ConfigMessages.pb.h @USE_E131_TRUE@@USING_WIN32_FALSE@nodist_plugins_e131_messages_libolae131conf_la_SOURCES = \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/messages/E131ConfigMessages.pb.cc @USE_E131_TRUE@@USING_WIN32_FALSE@plugins_e131_messages_libolae131conf_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) @USE_E131_TRUE@@USING_WIN32_FALSE@plugins_e131_messages_libolae131conf_la_LIBADD = $(libprotobuf_LIBS) @USE_E131_TRUE@@USING_WIN32_FALSE@plugins_e131_libolae131_la_SOURCES = \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/E131Device.cpp \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/E131Device.h \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/E131Plugin.cpp \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/E131Plugin.h \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/E131Port.cpp \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/E131Port.h @USE_E131_TRUE@@USING_WIN32_FALSE@plugins_e131_libolae131_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) @USE_E131_TRUE@@USING_WIN32_FALSE@plugins_e131_libolae131_la_LIBADD = \ @USE_E131_TRUE@@USING_WIN32_FALSE@ olad/plugin_api/libolaserverplugininterface.la \ @USE_E131_TRUE@@USING_WIN32_FALSE@ plugins/e131/messages/libolae131conf.la \ @USE_E131_TRUE@@USING_WIN32_FALSE@ libs/acn/libolae131core.la @USE_UART_TRUE@@USING_WIN32_FALSE@plugins_uartdmx_libolauartdmx_la_SOURCES = \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartDmxDevice.cpp \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartDmxDevice.h \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartDmxPlugin.cpp \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartDmxPlugin.h \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartDmxPort.h \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartDmxThread.cpp \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartDmxThread.h \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartWidget.cpp \ @USE_UART_TRUE@@USING_WIN32_FALSE@ plugins/uartdmx/UartWidget.h @USE_UART_TRUE@@USING_WIN32_FALSE@plugins_uartdmx_libolauartdmx_la_LIBADD = \ @USE_UART_TRUE@@USING_WIN32_FALSE@ common/libolacommon.la \ @USE_UART_TRUE@@USING_WIN32_FALSE@ olad/plugin_api/libolaserverplugininterface.la wwwdir = $(www_datadir) newdir = $(www_datadir)/new viewsdir = $(www_datadir)/new/views jsdir = $(www_datadir)/new/js cssdir = $(www_datadir)/new/css imgdir = $(www_datadir)/new/img jquerydir = $(www_datadir)/new/libs/jquery/js angularroutedir = $(www_datadir)/new/libs/angular-route/js angulardir = $(www_datadir)/new/libs/angular/js bootcssdir = $(www_datadir)/new/libs/bootstrap/css bootjsdir = $(www_datadir)/new/libs/bootstrap/js bootfontsdir = $(www_datadir)/new/libs/bootstrap/fonts dist_www_DATA = \ olad/www/back.png \ olad/www/blank.gif \ olad/www/button-bg.png \ olad/www/console_values.html \ olad/www/custombutton.css \ olad/www/discovery.png \ olad/www/editortoolbar.png \ olad/www/expander.png \ olad/www/forward.png \ olad/www/handle.vertical.png \ olad/www/hide_sections.png \ olad/www/incremental-discovery.png \ olad/www/landing.html \ olad/www/light_bulb_off.png \ olad/www/light_bulb.png \ olad/www/loader-mini.gif \ olad/www/loader.gif \ olad/www/logo-mini.png \ olad/www/logo.png \ olad/www/mobile.html \ olad/www/mobile.js \ olad/www/ola.html \ olad/www/ola.js \ olad/www/refresh.png \ olad/www/show_sections.png \ olad/www/tick.gif \ olad/www/toolbar-bg.png \ olad/www/toolbar.css \ olad/www/toolbar_sprites.png \ olad/www/vertical.gif \ olad/www/wand.png \ olad/www/warning.png dist_new_DATA = \ olad/www/new/index.html dist_views_DATA = \ olad/www/new/views/overview.html \ olad/www/new/views/plugin-info.html \ olad/www/new/views/plugins.html \ olad/www/new/views/universe-add.html \ olad/www/new/views/universe-faders.html \ olad/www/new/views/universe-header.html \ olad/www/new/views/universe-keypad.html \ olad/www/new/views/universe-overview.html \ olad/www/new/views/universe-patch.html \ olad/www/new/views/universe-rdm.html \ olad/www/new/views/universe-settings.html \ olad/www/new/views/universes.html dist_js_DATA = \ olad/www/new/js/app.min.js \ olad/www/new/js/app.min.js.map dist_css_DATA = \ olad/www/new/css/style.min.css dist_img_DATA = \ olad/www/new/img/light_bulb_off.png \ olad/www/new/img/light_bulb.png \ olad/www/new/img/logo-mini.png \ olad/www/new/img/logo.png dist_jquery_DATA = \ olad/www/new/libs/jquery/js/jquery.min.js dist_angularroute_DATA = \ olad/www/new/libs/angular-route/js/angular-route.min.js dist_angular_DATA = \ olad/www/new/libs/angular/js/angular.min.js dist_bootjs_DATA = \ olad/www/new/libs/bootstrap/js/bootstrap.min.js dist_bootfonts_DATA = \ olad/www/new/libs/bootstrap/fonts/glyphicons-halflings-regular.eot \ olad/www/new/libs/bootstrap/fonts/glyphicons-halflings-regular.svg \ olad/www/new/libs/bootstrap/fonts/glyphicons-halflings-regular.ttf \ olad/www/new/libs/bootstrap/fonts/glyphicons-halflings-regular.woff \ olad/www/new/libs/bootstrap/fonts/glyphicons-halflings-regular.woff2 dist_bootcss_DATA = \ olad/www/new/libs/bootstrap/css/bootstrap.min.css # LIBRARIES ################################################## ola_server_sources = olad/ClientBroker.cpp olad/ClientBroker.h \ olad/DiscoveryAgent.cpp olad/DiscoveryAgent.h \ olad/DynamicPluginLoader.cpp olad/DynamicPluginLoader.h \ olad/HttpServerActions.h olad/OlaServerServiceImpl.cpp \ olad/OlaServerServiceImpl.h olad/OladHTTPServer.h \ olad/PluginLoader.h olad/PluginManager.cpp \ olad/PluginManager.h olad/RDMHTTPModule.h $(am__append_84) \ $(am__append_85) $(am__append_87) ola_server_additional_libs = $(am__append_86) $(am__append_88) olad_libolaserver_la_SOURCES = $(ola_server_sources) \ olad/OlaServer.cpp \ olad/OlaDaemon.cpp olad_libolaserver_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) \ -DHTTP_DATA_DIR=\"${www_datadir}\" olad_libolaserver_la_LIBADD = $(PLUGIN_LIBS) \ common/libolacommon.la \ common/web/libolaweb.la \ ola/libola.la \ olad/plugin_api/libolaserverplugininterface.la \ $(ola_server_additional_libs) # Simon: I'm not too sure about this but it seems that because PLUGIN_LIBS is # determined at configure time, we need to add them here. EXTRA_olad_libolaserver_la_DEPENDENCIES = $(PLUGIN_LIBS) olad_olad_SOURCES = olad/Olad.cpp @SUPPORTS_RDYNAMIC_TRUE@olad_olad_LDFLAGS = -rdynamic olad_olad_LDADD = olad/libolaserver.la \ common/libolacommon.la \ ola/libola.la COMMON_OLAD_TEST_LDADD = $(COMMON_TESTING_LIBS) $(libprotobuf_LIBS) \ olad/plugin_api/libolaserverplugininterface.la \ olad/libolaserver.la \ common/libolacommon.la olad_OlaTester_SOURCES = \ olad/PluginManagerTest.cpp \ olad/OlaServerServiceImplTest.cpp olad_OlaTester_CXXFLAGS = $(COMMON_TESTING_PROTOBUF_FLAGS) olad_OlaTester_LDADD = $(COMMON_OLAD_TEST_LDADD) @BUILD_OLA_PROTOC_PLUGIN_TRUE@protoc_ola_protoc_plugin_SOURCES = \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/CppFileGenerator.cpp \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/CppFileGenerator.h \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/CppGenerator.cpp \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/CppGenerator.h \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/GeneratorHelpers.cpp \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/GeneratorHelpers.h \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/ServiceGenerator.cpp \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/ServiceGenerator.h \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/StrUtil.cpp \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/StrUtil.h \ @BUILD_OLA_PROTOC_PLUGIN_TRUE@ protoc/ola-protoc-generator-plugin.cpp @BUILD_OLA_PROTOC_PLUGIN_TRUE@protoc_ola_protoc_plugin_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) @BUILD_OLA_PROTOC_PLUGIN_TRUE@protoc_ola_protoc_plugin_LDADD = $(libprotobuf_LIBS) -lprotoc # Python modules. ################################################## @BUILD_PYTHON_LIBS_TRUE@rpcpythondir = $(pkgpythondir)/rpc @BUILD_PYTHON_LIBS_TRUE@nodist_rpcpython_PYTHON = python/ola/rpc/Rpc_pb2.py @BUILD_PYTHON_LIBS_TRUE@rpcpython_PYTHON = python/ola/rpc/SimpleRpcController.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/rpc/StreamRpcChannel.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/rpc/__init__.py # Python modules. ################################################## artnet_path = ${top_srcdir}/plugins/artnet/messages artnet_proto = $(artnet_path)/ArtNetConfigMessages.proto ola_path = ${top_srcdir}/common/protocol ola_proto = $(ola_path)/Ola.proto pids_path = ${top_srcdir}/common/rdm pids_proto = $(pids_path)/Pids.proto usbpro_path = ${top_srcdir}/plugins/usbpro/messages usbpro_proto = $(usbpro_path)/UsbProConfigMessages.proto @BUILD_PYTHON_LIBS_TRUE@output_files = \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/ArtNetConfigMessages_pb2.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/Ola_pb2.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/UsbProConfigMessages_pb2.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/Pids_pb2.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/PidStoreLocation.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/Version.py @BUILD_PYTHON_LIBS_TRUE@nodist_pkgpython_PYTHON = $(output_files) @BUILD_PYTHON_LIBS_TRUE@pkgpython_PYTHON = \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/ClientWrapper.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/DMXConstants.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/DUBDecoder.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/MACAddress.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/OlaClient.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/RDMAPI.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/RDMConstants.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/PidStore.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/UID.py \ @BUILD_PYTHON_LIBS_TRUE@ python/ola/__init__.py tools_ja_rule_ja_rule_SOURCES = \ tools/ja-rule/USBDeviceManager.cpp \ tools/ja-rule/USBDeviceManager.h \ tools/ja-rule/ja-rule.cpp tools_ja_rule_ja_rule_CXXFLAGS = $(COMMON_CXXFLAGS) $(libusb_CFLAGS) tools_ja_rule_ja_rule_LDADD = $(libusb_LIBS) \ common/libolacommon.la \ plugins/usbdmx/libolausbdmxwidget.la \ libs/usb/libolausb.la tools_ja_rule_ja_rule_controller_SOURCES = \ tools/ja-rule/USBDeviceManager.cpp \ tools/ja-rule/USBDeviceManager.h \ tools/ja-rule/ja-rule-controller.cpp tools_ja_rule_ja_rule_controller_CXXFLAGS = $(COMMON_CXXFLAGS) $(libusb_CFLAGS) tools_ja_rule_ja_rule_controller_LDADD = $(libusb_LIBS) \ common/libolacommon.la \ plugins/usbdmx/libolausbdmxwidget.la \ libs/usb/libolausb.la tools_logic_logic_rdm_sniffer_SOURCES = \ tools/logic/DMXSignalProcessor.cpp \ tools/logic/DMXSignalProcessor.h \ tools/logic/logic-rdm-sniffer.cpp tools_logic_logic_rdm_sniffer_LDADD = common/libolacommon.la \ $(libSaleaeDevice_LIBS) tools_ola_trigger_libolatrigger_la_SOURCES = \ tools/ola_trigger/Action.cpp \ tools/ola_trigger/Action.h \ tools/ola_trigger/Context.cpp \ tools/ola_trigger/Context.h \ tools/ola_trigger/DMXTrigger.cpp \ tools/ola_trigger/DMXTrigger.h \ tools/ola_trigger/VariableInterpolator.h \ tools/ola_trigger/VariableInterpolator.cpp tools_ola_trigger_libolatrigger_la_LIBADD = common/libolacommon.la tools_ola_trigger_ola_trigger_SOURCES = \ tools/ola_trigger/ConfigCommon.h \ tools/ola_trigger/ParserActions.cpp \ tools/ola_trigger/ParserActions.h \ tools/ola_trigger/ParserGlobals.h \ tools/ola_trigger/ola-trigger.cpp nodist_tools_ola_trigger_ola_trigger_SOURCES = \ tools/ola_trigger/config.tab.cpp \ tools/ola_trigger/lex.yy.cpp # required, otherwise we get build errors from the flex output tools_ola_trigger_ola_trigger_CXXFLAGS = $(COMMON_CXXFLAGS_ONLY_WARNINGS) tools_ola_trigger_ola_trigger_LDADD = common/libolacommon.la \ ola/libola.la \ tools/ola_trigger/libolatrigger.la \ $(LEXLIB) tools_ola_trigger_ActionTester_SOURCES = \ tools/ola_trigger/ActionTest.cpp \ tools/ola_trigger/ContextTest.cpp \ tools/ola_trigger/DMXTriggerTest.cpp \ tools/ola_trigger/IntervalTest.cpp \ tools/ola_trigger/MockAction.h \ tools/ola_trigger/SlotTest.cpp \ tools/ola_trigger/VariableInterpolatorTest.cpp tools_ola_trigger_ActionTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) tools_ola_trigger_ActionTester_LDADD = $(COMMON_TESTING_LIBS) \ tools/ola_trigger/libolatrigger.la module_files = \ tools/rdm/DMXSender.py \ tools/rdm/ExpectedResults.py \ tools/rdm/ModelCollector.py \ tools/rdm/ResponderTest.py \ tools/rdm/TestCategory.py \ tools/rdm/TestDefinitions.py \ tools/rdm/TestHelpers.py \ tools/rdm/TestLogger.py \ tools/rdm/TestMixins.py \ tools/rdm/TestRunner.py \ tools/rdm/TimingStats.py \ tools/rdm/TestState.py \ tools/rdm/__init__.py # These files are installed to the directory from DataLocation.py testserver_static_files = \ tools/rdm/static/MIT-LICENSE.txt \ tools/rdm/static/common.css \ tools/rdm/static/jquery-1.7.2.min.js \ tools/rdm/static/jquery-ui-1.8.21.custom.css \ tools/rdm/static/jquery-ui-1.8.21.custom.min.js \ tools/rdm/static/rdm_tests.js \ tools/rdm/static/rdmtests.html \ tools/rdm/static/ui.multiselect.css \ tools/rdm/static/ui.multiselect.js # These files are installed to the images directory under the directory from # DataLocation.py testserver_image_files = \ tools/rdm/static/images/discovery.png \ tools/rdm/static/images/external.png \ tools/rdm/static/images/favicon.ico \ tools/rdm/static/images/loader.gif \ tools/rdm/static/images/logo.png \ tools/rdm/static/images/ui-bg_flat_0_aaaaaa_40x100.png \ tools/rdm/static/images/ui-bg_flat_0_eeeeee_40x100.png \ tools/rdm/static/images/ui-bg_flat_55_c0402a_40x100.png \ tools/rdm/static/images/ui-bg_flat_55_eeeeee_40x100.png \ tools/rdm/static/images/ui-bg_glass_100_f8f8f8_1x400.png \ tools/rdm/static/images/ui-bg_glass_35_dddddd_1x400.png \ tools/rdm/static/images/ui-bg_glass_60_eeeeee_1x400.png \ tools/rdm/static/images/ui-bg_inset-hard_75_999999_1x100.png \ tools/rdm/static/images/ui-bg_inset-soft_50_c9c9c9_1x100.png \ tools/rdm/static/images/ui-icons_3383bb_256x240.png \ tools/rdm/static/images/ui-icons_454545_256x240.png \ tools/rdm/static/images/ui-icons_70b2e1_256x240.png \ tools/rdm/static/images/ui-icons_999999_256x240.png \ tools/rdm/static/images/ui-icons_fbc856_256x240.png launcher_files = \ tools/rdm/launch_tests.py \ tools/rdm/setup_patch.py \ tools/rdm/skel_config/ola-usbserial.conf # RDM Test modules @INSTALL_RDM_TESTS_TRUE@rdmtestsdir = $(pkgpythondir)/testing/rdm @INSTALL_RDM_TESTS_TRUE@rdmtests_PYTHON = $(module_files) @INSTALL_RDM_TESTS_TRUE@nodist_rdmtests_PYTHON = tools/rdm/DataLocation.py # Hack to put the top level __init__.py file in place @INSTALL_RDM_TESTS_TRUE@rdminitdir = $(pkgpythondir)/testing @INSTALL_RDM_TESTS_TRUE@rdminit_PYTHON = tools/rdm/__init__.py # RDM Test Scripts @INSTALL_RDM_TESTS_TRUE@rdmtestsexecdir = $(bindir) @INSTALL_RDM_TESTS_TRUE@dist_rdmtestsexec_SCRIPTS = \ @INSTALL_RDM_TESTS_TRUE@ tools/rdm/rdm_model_collector.py \ @INSTALL_RDM_TESTS_TRUE@ tools/rdm/rdm_responder_test.py \ @INSTALL_RDM_TESTS_TRUE@ tools/rdm/rdm_test_server.py # Data files for the RDM Test Server @INSTALL_RDM_TESTS_TRUE@tools_rdm_testserver_staticdir = $(datadir)/ola/rdm-server @INSTALL_RDM_TESTS_TRUE@dist_tools_rdm_testserver_static_DATA = $(testserver_static_files) @INSTALL_RDM_TESTS_TRUE@tools_rdm_testserver_imagesdir = $(datadir)/ola/rdm-server/images @INSTALL_RDM_TESTS_TRUE@dist_tools_rdm_testserver_images_DATA = $(testserver_image_files) # LIBRARIES ################################################## @USING_WIN32_FALSE@E133_LIBS = \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la \ @USING_WIN32_FALSE@ tools/e133/libolae133controller.la \ @USING_WIN32_FALSE@ tools/e133/libolae133device.la # libolae133common # Code required by both the controller and device. @USING_WIN32_FALSE@tools_e133_libolae133common_la_SOURCES = \ @USING_WIN32_FALSE@ tools/e133/E133HealthCheckedConnection.cpp \ @USING_WIN32_FALSE@ tools/e133/E133HealthCheckedConnection.h \ @USING_WIN32_FALSE@ tools/e133/E133Receiver.cpp \ @USING_WIN32_FALSE@ tools/e133/E133StatusHelper.cpp \ @USING_WIN32_FALSE@ tools/e133/MessageBuilder.cpp @USING_WIN32_FALSE@tools_e133_libolae133common_la_LIBADD = libs/acn/libolae131core.la # libolae133controller # Controller side. @USING_WIN32_FALSE@tools_e133_libolae133controller_la_SOURCES = \ @USING_WIN32_FALSE@ tools/e133/DeviceManager.cpp \ @USING_WIN32_FALSE@ tools/e133/DeviceManagerImpl.cpp \ @USING_WIN32_FALSE@ tools/e133/DeviceManagerImpl.h @USING_WIN32_FALSE@tools_e133_libolae133controller_la_LIBADD = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolae131core.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la # libolae133device # Device side. @USING_WIN32_FALSE@tools_e133_libolae133device_la_SOURCES = \ @USING_WIN32_FALSE@ tools/e133/DesignatedControllerConnection.cpp \ @USING_WIN32_FALSE@ tools/e133/DesignatedControllerConnection.h \ @USING_WIN32_FALSE@ tools/e133/E133Device.cpp \ @USING_WIN32_FALSE@ tools/e133/E133Device.h \ @USING_WIN32_FALSE@ tools/e133/E133Endpoint.cpp \ @USING_WIN32_FALSE@ tools/e133/E133Endpoint.h \ @USING_WIN32_FALSE@ tools/e133/EndpointManager.cpp \ @USING_WIN32_FALSE@ tools/e133/EndpointManager.h \ @USING_WIN32_FALSE@ tools/e133/ManagementEndpoint.cpp \ @USING_WIN32_FALSE@ tools/e133/ManagementEndpoint.h \ @USING_WIN32_FALSE@ tools/e133/SimpleE133Node.cpp \ @USING_WIN32_FALSE@ tools/e133/SimpleE133Node.h \ @USING_WIN32_FALSE@ tools/e133/TCPConnectionStats.h @USING_WIN32_FALSE@tools_e133_libolae133device_la_LIBADD = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolae131core.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la @USING_WIN32_FALSE@tools_e133_e133_receiver_SOURCES = tools/e133/e133-receiver.cpp @USING_WIN32_FALSE@tools_e133_e133_receiver_LDADD = \ @USING_WIN32_FALSE@ common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolaacn.la \ @USING_WIN32_FALSE@ plugins/usbpro/libolausbprowidget.la \ @USING_WIN32_FALSE@ tools/e133/libolae133device.la \ @USING_WIN32_FALSE@ $(am__append_100) @USING_WIN32_FALSE@tools_e133_e133_monitor_SOURCES = tools/e133/e133-monitor.cpp @USING_WIN32_FALSE@tools_e133_e133_monitor_LDADD = common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolaacn.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la \ @USING_WIN32_FALSE@ tools/e133/libolae133controller.la @USING_WIN32_FALSE@tools_e133_e133_controller_SOURCES = tools/e133/e133-controller.cpp # required for PID_DATA_FILE @USING_WIN32_FALSE@tools_e133_e133_controller_LDADD = common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolae131core.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la \ @USING_WIN32_FALSE@ tools/e133/libolae133controller.la @USING_WIN32_FALSE@tools_e133_basic_controller_SOURCES = tools/e133/basic-controller.cpp @USING_WIN32_FALSE@tools_e133_basic_controller_LDADD = common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolaacn.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la @USING_WIN32_FALSE@tools_e133_basic_device_SOURCES = tools/e133/basic-device.cpp @USING_WIN32_FALSE@tools_e133_basic_device_LDADD = common/libolacommon.la \ @USING_WIN32_FALSE@ libs/acn/libolaacn.la \ @USING_WIN32_FALSE@ tools/e133/libolae133common.la @USING_WIN32_FALSE@tools_usbpro_usbpro_firmware_SOURCES = tools/usbpro/usbpro-firmware.cpp @USING_WIN32_FALSE@tools_usbpro_usbpro_firmware_LDADD = common/libolacommon.la \ @USING_WIN32_FALSE@ plugins/usbpro/libolausbprowidget.la @USING_WIN32_FALSE@tools_rdmpro_rdmpro_sniffer_SOURCES = tools/rdmpro/rdm-sniffer.cpp @USING_WIN32_FALSE@tools_rdmpro_rdmpro_sniffer_LDADD = common/libolacommon.la \ @USING_WIN32_FALSE@ plugins/usbpro/libolausbprowidget.la # I can't figure out how to safely execute a command (mvn) in a subdirectory, # so this is recursive for now. SUBDIRS = java # cpplint linter CPP_LINT_FILTER = "-legal/copyright,-readability/streams,-runtime/arrays" CPP_LINT_FILES = $(shell find . \( -name "*.h" -or -name "*.cpp" \) -and ! \( \ -wholename "./common/protocol/Ola.pb.*" -or \ -wholename "./common/rpc/Rpc.pb.*" -or \ -wholename "./common/rpc/TestService.pb.*" -or \ -wholename "./common/rdm/Pids.pb.*" -or \ -wholename "./config.h" -or \ -wholename "./plugins/*/messages/*ConfigMessages.pb.*" -or \ -wholename "./tools/ola_trigger/config.tab.*" -or \ -wholename "./tools/ola_trigger/lex.yy.cpp" \) | xargs) all: $(BUILT_SOURCES) config.h $(MAKE) $(AM_MAKEFLAGS) all-recursive .SUFFIXES: .SUFFIXES: .cc .cpp .lo .log .o .obj .py .py$(EXEEXT) .trs am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(srcdir)/aminclude.am $(srcdir)/common/Makefile.mk $(srcdir)/common/base/Makefile.mk $(srcdir)/common/dmx/Makefile.mk $(srcdir)/common/export_map/Makefile.mk $(srcdir)/common/file/Makefile.mk $(srcdir)/common/http/Makefile.mk $(srcdir)/common/io/Makefile.mk $(srcdir)/common/math/Makefile.mk $(srcdir)/common/messaging/Makefile.mk $(srcdir)/common/network/Makefile.mk $(srcdir)/common/protocol/Makefile.mk $(srcdir)/common/rdm/Makefile.mk $(srcdir)/common/rpc/Makefile.mk $(srcdir)/common/strings/Makefile.mk $(srcdir)/common/system/Makefile.mk $(srcdir)/common/testing/Makefile.mk $(srcdir)/common/thread/Makefile.mk $(srcdir)/common/timecode/Makefile.mk $(srcdir)/common/utils/Makefile.mk $(srcdir)/common/web/Makefile.mk $(srcdir)/data/Makefile.mk $(srcdir)/data/rdm/Makefile.mk $(srcdir)/debian/Makefile.mk $(srcdir)/doxygen/Makefile.mk $(srcdir)/doxygen/examples/Makefile.mk $(srcdir)/examples/Makefile.mk $(srcdir)/include/Makefile.mk $(srcdir)/include/ola/Makefile.mk $(srcdir)/include/ola/acn/Makefile.mk $(srcdir)/include/ola/base/Makefile.mk $(srcdir)/include/ola/client/Makefile.mk $(srcdir)/include/ola/dmx/Makefile.mk $(srcdir)/include/ola/e133/Makefile.mk $(srcdir)/include/ola/file/Makefile.mk $(srcdir)/include/ola/http/Makefile.mk $(srcdir)/include/ola/io/Makefile.mk $(srcdir)/include/ola/math/Makefile.mk $(srcdir)/include/ola/messaging/Makefile.mk $(srcdir)/include/ola/network/Makefile.mk $(srcdir)/include/ola/rdm/Makefile.mk $(srcdir)/include/ola/rpc/Makefile.mk $(srcdir)/include/ola/stl/Makefile.mk $(srcdir)/include/ola/strings/Makefile.mk $(srcdir)/include/ola/system/Makefile.mk $(srcdir)/include/ola/testing/Makefile.mk $(srcdir)/include/ola/thread/Makefile.mk $(srcdir)/include/ola/timecode/Makefile.mk $(srcdir)/include/ola/util/Makefile.mk $(srcdir)/include/ola/web/Makefile.mk $(srcdir)/include/ola/win/Makefile.mk $(srcdir)/include/olad/Makefile.mk $(srcdir)/javascript/Makefile.mk $(srcdir)/man/Makefile.mk $(srcdir)/libs/Makefile.mk $(srcdir)/libs/acn/Makefile.mk $(srcdir)/libs/usb/Makefile.mk $(srcdir)/ola/Makefile.mk $(srcdir)/olad/plugin_api/Makefile.mk $(srcdir)/plugins/Makefile.mk $(srcdir)/plugins/artnet/Makefile.mk $(srcdir)/plugins/artnet/messages/Makefile.mk $(srcdir)/plugins/dummy/Makefile.mk $(srcdir)/plugins/espnet/Makefile.mk $(srcdir)/plugins/ftdidmx/Makefile.mk $(srcdir)/plugins/gpio/Makefile.mk $(srcdir)/plugins/karate/Makefile.mk $(srcdir)/plugins/kinet/Makefile.mk $(srcdir)/plugins/milinst/Makefile.mk $(srcdir)/plugins/opendmx/Makefile.mk $(srcdir)/plugins/openpixelcontrol/Makefile.mk $(srcdir)/plugins/osc/Makefile.mk $(srcdir)/plugins/pathport/Makefile.mk $(srcdir)/plugins/renard/Makefile.mk $(srcdir)/plugins/sandnet/Makefile.mk $(srcdir)/plugins/shownet/Makefile.mk $(srcdir)/plugins/spi/Makefile.mk $(srcdir)/plugins/stageprofi/Makefile.mk $(srcdir)/plugins/usbdmx/Makefile.mk $(srcdir)/plugins/usbpro/Makefile.mk $(srcdir)/plugins/usbpro/messages/Makefile.mk $(srcdir)/plugins/dmx4linux/Makefile.mk $(srcdir)/plugins/e131/Makefile.mk $(srcdir)/plugins/e131/messages/Makefile.mk $(srcdir)/plugins/uartdmx/Makefile.mk $(srcdir)/olad/Makefile.mk $(srcdir)/olad/www/Makefile.mk $(srcdir)/protoc/Makefile.mk $(srcdir)/python/Makefile.mk $(srcdir)/python/examples/Makefile.mk $(srcdir)/python/ola/Makefile.mk $(srcdir)/python/ola/rpc/Makefile.mk $(srcdir)/scripts/Makefile.mk $(srcdir)/tools/Makefile.mk $(srcdir)/tools/ja-rule/Makefile.mk $(srcdir)/tools/logic/Makefile.mk $(srcdir)/tools/ola_mon/Makefile.mk $(srcdir)/tools/ola_trigger/Makefile.mk $(srcdir)/tools/rdm/Makefile.mk $(srcdir)/tools/e133/Makefile.mk $(srcdir)/tools/usbpro/Makefile.mk $(srcdir)/tools/rdmpro/Makefile.mk $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(srcdir)/aminclude.am $(srcdir)/common/Makefile.mk $(srcdir)/common/base/Makefile.mk $(srcdir)/common/dmx/Makefile.mk $(srcdir)/common/export_map/Makefile.mk $(srcdir)/common/file/Makefile.mk $(srcdir)/common/http/Makefile.mk $(srcdir)/common/io/Makefile.mk $(srcdir)/common/math/Makefile.mk $(srcdir)/common/messaging/Makefile.mk $(srcdir)/common/network/Makefile.mk $(srcdir)/common/protocol/Makefile.mk $(srcdir)/common/rdm/Makefile.mk $(srcdir)/common/rpc/Makefile.mk $(srcdir)/common/strings/Makefile.mk $(srcdir)/common/system/Makefile.mk $(srcdir)/common/testing/Makefile.mk $(srcdir)/common/thread/Makefile.mk $(srcdir)/common/timecode/Makefile.mk $(srcdir)/common/utils/Makefile.mk $(srcdir)/common/web/Makefile.mk $(srcdir)/data/Makefile.mk $(srcdir)/data/rdm/Makefile.mk $(srcdir)/debian/Makefile.mk $(srcdir)/doxygen/Makefile.mk $(srcdir)/doxygen/examples/Makefile.mk $(srcdir)/examples/Makefile.mk $(srcdir)/include/Makefile.mk $(srcdir)/include/ola/Makefile.mk $(srcdir)/include/ola/acn/Makefile.mk $(srcdir)/include/ola/base/Makefile.mk $(srcdir)/include/ola/client/Makefile.mk $(srcdir)/include/ola/dmx/Makefile.mk $(srcdir)/include/ola/e133/Makefile.mk $(srcdir)/include/ola/file/Makefile.mk $(srcdir)/include/ola/http/Makefile.mk $(srcdir)/include/ola/io/Makefile.mk $(srcdir)/include/ola/math/Makefile.mk $(srcdir)/include/ola/messaging/Makefile.mk $(srcdir)/include/ola/network/Makefile.mk $(srcdir)/include/ola/rdm/Makefile.mk $(srcdir)/include/ola/rpc/Makefile.mk $(srcdir)/include/ola/stl/Makefile.mk $(srcdir)/include/ola/strings/Makefile.mk $(srcdir)/include/ola/system/Makefile.mk $(srcdir)/include/ola/testing/Makefile.mk $(srcdir)/include/ola/thread/Makefile.mk $(srcdir)/include/ola/timecode/Makefile.mk $(srcdir)/include/ola/util/Makefile.mk $(srcdir)/include/ola/web/Makefile.mk $(srcdir)/include/ola/win/Makefile.mk $(srcdir)/include/olad/Makefile.mk $(srcdir)/javascript/Makefile.mk $(srcdir)/man/Makefile.mk $(srcdir)/libs/Makefile.mk $(srcdir)/libs/acn/Makefile.mk $(srcdir)/libs/usb/Makefile.mk $(srcdir)/ola/Makefile.mk $(srcdir)/olad/plugin_api/Makefile.mk $(srcdir)/plugins/Makefile.mk $(srcdir)/plugins/artnet/Makefile.mk $(srcdir)/plugins/artnet/messages/Makefile.mk $(srcdir)/plugins/dummy/Makefile.mk $(srcdir)/plugins/espnet/Makefile.mk $(srcdir)/plugins/ftdidmx/Makefile.mk $(srcdir)/plugins/gpio/Makefile.mk $(srcdir)/plugins/karate/Makefile.mk $(srcdir)/plugins/kinet/Makefile.mk $(srcdir)/plugins/milinst/Makefile.mk $(srcdir)/plugins/opendmx/Makefile.mk $(srcdir)/plugins/openpixelcontrol/Makefile.mk $(srcdir)/plugins/osc/Makefile.mk $(srcdir)/plugins/pathport/Makefile.mk $(srcdir)/plugins/renard/Makefile.mk $(srcdir)/plugins/sandnet/Makefile.mk $(srcdir)/plugins/shownet/Makefile.mk $(srcdir)/plugins/spi/Makefile.mk $(srcdir)/plugins/stageprofi/Makefile.mk $(srcdir)/plugins/usbdmx/Makefile.mk $(srcdir)/plugins/usbpro/Makefile.mk $(srcdir)/plugins/usbpro/messages/Makefile.mk $(srcdir)/plugins/dmx4linux/Makefile.mk $(srcdir)/plugins/e131/Makefile.mk $(srcdir)/plugins/e131/messages/Makefile.mk $(srcdir)/plugins/uartdmx/Makefile.mk $(srcdir)/olad/Makefile.mk $(srcdir)/olad/www/Makefile.mk $(srcdir)/protoc/Makefile.mk $(srcdir)/python/Makefile.mk $(srcdir)/python/examples/Makefile.mk $(srcdir)/python/ola/Makefile.mk $(srcdir)/python/ola/rpc/Makefile.mk $(srcdir)/scripts/Makefile.mk $(srcdir)/tools/Makefile.mk $(srcdir)/tools/ja-rule/Makefile.mk $(srcdir)/tools/logic/Makefile.mk $(srcdir)/tools/ola_mon/Makefile.mk $(srcdir)/tools/ola_trigger/Makefile.mk $(srcdir)/tools/rdm/Makefile.mk $(srcdir)/tools/e133/Makefile.mk $(srcdir)/tools/usbpro/Makefile.mk $(srcdir)/tools/rdmpro/Makefile.mk $(am__empty): $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config.h: stamp-h1 @test -f $@ || rm -f stamp-h1 @test -f $@ || $(MAKE) $(AM_MAKEFLAGS) stamp-h1 stamp-h1: $(srcdir)/config.h.in $(top_builddir)/config.status @rm -f stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config.h $(srcdir)/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f stamp-h1 touch $@ distclean-hdr: -rm -f config.h stamp-h1 include/ola/base/Version.h: $(top_builddir)/config.status $(top_srcdir)/include/ola/base/Version.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ libola.pc: $(top_builddir)/config.status $(srcdir)/libola.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libolaserver.pc: $(top_builddir)/config.status $(srcdir)/libolaserver.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ libs/acn/libolaacn.pc: $(top_builddir)/config.status $(top_srcdir)/libs/acn/libolaacn.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ ola.spec: $(top_builddir)/config.status $(srcdir)/ola.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ plugins/artnet/messages/libolaartnetconf.pc: $(top_builddir)/config.status $(top_srcdir)/plugins/artnet/messages/libolaartnetconf.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ plugins/e131/messages/libolae131conf.pc: $(top_builddir)/config.status $(top_srcdir)/plugins/e131/messages/libolae131conf.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ plugins/usbpro/messages/libolausbproconf.pc: $(top_builddir)/config.status $(top_srcdir)/plugins/usbpro/messages/libolausbproconf.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ tools/e133/libolae133common.pc: $(top_builddir)/config.status $(top_srcdir)/tools/e133/libolae133common.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ tools/e133/libolae133controller.pc: $(top_builddir)/config.status $(top_srcdir)/tools/e133/libolae133controller.pc.in cd $(top_builddir) && $(SHELL) ./config.status $@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } common/http/$(am__dirstamp): @$(MKDIR_P) common/http @: > common/http/$(am__dirstamp) common/http/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/http/$(DEPDIR) @: > common/http/$(DEPDIR)/$(am__dirstamp) common/http/HTTPServer.lo: common/http/$(am__dirstamp) \ common/http/$(DEPDIR)/$(am__dirstamp) common/http/OlaHTTPServer.lo: common/http/$(am__dirstamp) \ common/http/$(DEPDIR)/$(am__dirstamp) common/http/libolahttp.la: $(common_http_libolahttp_la_OBJECTS) $(common_http_libolahttp_la_DEPENDENCIES) $(EXTRA_common_http_libolahttp_la_DEPENDENCIES) common/http/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_common_http_libolahttp_la_rpath) $(common_http_libolahttp_la_OBJECTS) $(common_http_libolahttp_la_LIBADD) $(LIBS) common/base/$(am__dirstamp): @$(MKDIR_P) common/base @: > common/base/$(am__dirstamp) common/base/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/base/$(DEPDIR) @: > common/base/$(DEPDIR)/$(am__dirstamp) common/base/common_libolacommon_la-Credentials.lo: \ common/base/$(am__dirstamp) \ common/base/$(DEPDIR)/$(am__dirstamp) common/base/common_libolacommon_la-Env.lo: \ common/base/$(am__dirstamp) \ common/base/$(DEPDIR)/$(am__dirstamp) common/base/common_libolacommon_la-Flags.lo: \ common/base/$(am__dirstamp) \ common/base/$(DEPDIR)/$(am__dirstamp) common/base/common_libolacommon_la-Init.lo: \ common/base/$(am__dirstamp) \ common/base/$(DEPDIR)/$(am__dirstamp) common/base/common_libolacommon_la-Logging.lo: \ common/base/$(am__dirstamp) \ common/base/$(DEPDIR)/$(am__dirstamp) common/base/common_libolacommon_la-SysExits.lo: \ common/base/$(am__dirstamp) \ common/base/$(DEPDIR)/$(am__dirstamp) common/base/common_libolacommon_la-Version.lo: \ common/base/$(am__dirstamp) \ common/base/$(DEPDIR)/$(am__dirstamp) common/dmx/$(am__dirstamp): @$(MKDIR_P) common/dmx @: > common/dmx/$(am__dirstamp) common/dmx/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/dmx/$(DEPDIR) @: > common/dmx/$(DEPDIR)/$(am__dirstamp) common/dmx/common_libolacommon_la-RunLengthEncoder.lo: \ common/dmx/$(am__dirstamp) \ common/dmx/$(DEPDIR)/$(am__dirstamp) common/export_map/$(am__dirstamp): @$(MKDIR_P) common/export_map @: > common/export_map/$(am__dirstamp) common/export_map/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/export_map/$(DEPDIR) @: > common/export_map/$(DEPDIR)/$(am__dirstamp) common/export_map/common_libolacommon_la-ExportMap.lo: \ common/export_map/$(am__dirstamp) \ common/export_map/$(DEPDIR)/$(am__dirstamp) common/file/$(am__dirstamp): @$(MKDIR_P) common/file @: > common/file/$(am__dirstamp) common/file/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/file/$(DEPDIR) @: > common/file/$(DEPDIR)/$(am__dirstamp) common/file/common_libolacommon_la-Util.lo: \ common/file/$(am__dirstamp) \ common/file/$(DEPDIR)/$(am__dirstamp) common/io/$(am__dirstamp): @$(MKDIR_P) common/io @: > common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/io/$(DEPDIR) @: > common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-Descriptor.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-ExtendedSerial.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-IOQueue.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-IOStack.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-IOUtils.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-NonBlockingSender.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-PollerInterface.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-SelectServer.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-Serial.lo: common/io/$(am__dirstamp) \ common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-StdinHandler.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-TimeoutManager.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-WindowsPoller.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-SelectPoller.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-EPoller.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_libolacommon_la-KQueuePoller.lo: \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/math/$(am__dirstamp): @$(MKDIR_P) common/math @: > common/math/$(am__dirstamp) common/math/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/math/$(DEPDIR) @: > common/math/$(DEPDIR)/$(am__dirstamp) common/math/common_libolacommon_la-Random.lo: \ common/math/$(am__dirstamp) \ common/math/$(DEPDIR)/$(am__dirstamp) common/messaging/$(am__dirstamp): @$(MKDIR_P) common/messaging @: > common/messaging/$(am__dirstamp) common/messaging/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/messaging/$(DEPDIR) @: > common/messaging/$(DEPDIR)/$(am__dirstamp) common/messaging/common_libolacommon_la-Descriptor.lo: \ common/messaging/$(am__dirstamp) \ common/messaging/$(DEPDIR)/$(am__dirstamp) common/messaging/common_libolacommon_la-Message.lo: \ common/messaging/$(am__dirstamp) \ common/messaging/$(DEPDIR)/$(am__dirstamp) common/messaging/common_libolacommon_la-MessagePrinter.lo: \ common/messaging/$(am__dirstamp) \ common/messaging/$(DEPDIR)/$(am__dirstamp) common/messaging/common_libolacommon_la-SchemaPrinter.lo: \ common/messaging/$(am__dirstamp) \ common/messaging/$(DEPDIR)/$(am__dirstamp) common/network/$(am__dirstamp): @$(MKDIR_P) common/network @: > common/network/$(am__dirstamp) common/network/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/network/$(DEPDIR) @: > common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-AdvancedTCPConnector.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-HealthCheckedConnection.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-IPV4Address.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-Interface.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-InterfacePicker.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-MACAddress.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-NetworkUtils.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-Socket.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-SocketAddress.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-SocketCloser.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-SocketHelper.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-TCPConnector.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-TCPSocket.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-WindowsInterfacePicker.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_libolacommon_la-PosixInterfacePicker.lo: \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/rdm/$(am__dirstamp): @$(MKDIR_P) common/rdm @: > common/rdm/$(am__dirstamp) common/rdm/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/rdm/$(DEPDIR) @: > common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-AckTimerResponder.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-AdvancedDimmerResponder.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-CommandPrinter.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-DescriptorConsistencyChecker.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-DimmerResponder.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-DimmerRootDevice.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-DimmerSubDevice.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-DiscoveryAgent.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-DummyResponder.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-FakeNetworkManager.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-GroupSizeCalculator.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-MessageDeserializer.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-MessageSerializer.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-MovingLightResponder.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-NetworkManager.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-NetworkResponder.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-OpenLightingEnums.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-PidStore.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-PidStoreHelper.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-PidStoreLoader.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-QueueingRDMController.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-RDMAPI.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-RDMCommand.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-RDMCommandSerializer.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-RDMFrame.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-RDMHelper.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-RDMReply.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-ResponderHelper.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-ResponderLoadSensor.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-ResponderPersonality.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-ResponderSettings.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-ResponderSlotData.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-SensorResponder.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-StringMessageBuilder.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-SubDeviceDispatcher.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-UID.lo: common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-VariableFieldSizeCalculator.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rpc/$(am__dirstamp): @$(MKDIR_P) common/rpc @: > common/rpc/$(am__dirstamp) common/rpc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/rpc/$(DEPDIR) @: > common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/common_libolacommon_la-RpcChannel.lo: \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/common_libolacommon_la-RpcController.lo: \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/common_libolacommon_la-RpcServer.lo: \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/strings/$(am__dirstamp): @$(MKDIR_P) common/strings @: > common/strings/$(am__dirstamp) common/strings/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/strings/$(DEPDIR) @: > common/strings/$(DEPDIR)/$(am__dirstamp) common/strings/common_libolacommon_la-Format.lo: \ common/strings/$(am__dirstamp) \ common/strings/$(DEPDIR)/$(am__dirstamp) common/strings/common_libolacommon_la-Utils.lo: \ common/strings/$(am__dirstamp) \ common/strings/$(DEPDIR)/$(am__dirstamp) common/system/$(am__dirstamp): @$(MKDIR_P) common/system @: > common/system/$(am__dirstamp) common/system/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/system/$(DEPDIR) @: > common/system/$(DEPDIR)/$(am__dirstamp) common/system/common_libolacommon_la-Limits.lo: \ common/system/$(am__dirstamp) \ common/system/$(DEPDIR)/$(am__dirstamp) common/system/common_libolacommon_la-SystemUtils.lo: \ common/system/$(am__dirstamp) \ common/system/$(DEPDIR)/$(am__dirstamp) common/thread/$(am__dirstamp): @$(MKDIR_P) common/thread @: > common/thread/$(am__dirstamp) common/thread/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/thread/$(DEPDIR) @: > common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/common_libolacommon_la-ConsumerThread.lo: \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/common_libolacommon_la-ExecutorThread.lo: \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/common_libolacommon_la-Mutex.lo: \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/common_libolacommon_la-PeriodicThread.lo: \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/common_libolacommon_la-SignalThread.lo: \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/common_libolacommon_la-Thread.lo: \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/common_libolacommon_la-ThreadPool.lo: \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/common_libolacommon_la-Utils.lo: \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/timecode/$(am__dirstamp): @$(MKDIR_P) common/timecode @: > common/timecode/$(am__dirstamp) common/timecode/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/timecode/$(DEPDIR) @: > common/timecode/$(DEPDIR)/$(am__dirstamp) common/timecode/common_libolacommon_la-TimeCode.lo: \ common/timecode/$(am__dirstamp) \ common/timecode/$(DEPDIR)/$(am__dirstamp) common/utils/$(am__dirstamp): @$(MKDIR_P) common/utils @: > common/utils/$(am__dirstamp) common/utils/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/utils/$(DEPDIR) @: > common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_libolacommon_la-ActionQueue.lo: \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_libolacommon_la-Clock.lo: \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_libolacommon_la-DmxBuffer.lo: \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_libolacommon_la-StringUtils.lo: \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_libolacommon_la-TokenBucket.lo: \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_libolacommon_la-Watchdog.lo: \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/rdm/common_libolacommon_la-Pids.pb.lo: \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rpc/common_libolacommon_la-Rpc.pb.lo: \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/$(am__dirstamp): @$(MKDIR_P) common @: > common/$(am__dirstamp) common/libolacommon.la: $(common_libolacommon_la_OBJECTS) $(common_libolacommon_la_DEPENDENCIES) $(EXTRA_common_libolacommon_la_DEPENDENCIES) common/$(am__dirstamp) $(AM_V_CXXLD)$(common_libolacommon_la_LINK) -rpath $(libdir) $(common_libolacommon_la_OBJECTS) $(common_libolacommon_la_LIBADD) $(LIBS) common/protocol/$(am__dirstamp): @$(MKDIR_P) common/protocol @: > common/protocol/$(am__dirstamp) common/protocol/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/protocol/$(DEPDIR) @: > common/protocol/$(DEPDIR)/$(am__dirstamp) common/protocol/common_protocol_libolaproto_la-Ola.pb.lo: \ common/protocol/$(am__dirstamp) \ common/protocol/$(DEPDIR)/$(am__dirstamp) common/protocol/common_protocol_libolaproto_la-OlaService.pb.lo: \ common/protocol/$(am__dirstamp) \ common/protocol/$(DEPDIR)/$(am__dirstamp) common/protocol/libolaproto.la: $(common_protocol_libolaproto_la_OBJECTS) $(common_protocol_libolaproto_la_DEPENDENCIES) $(EXTRA_common_protocol_libolaproto_la_DEPENDENCIES) common/protocol/$(am__dirstamp) $(AM_V_CXXLD)$(common_protocol_libolaproto_la_LINK) $(common_protocol_libolaproto_la_OBJECTS) $(common_protocol_libolaproto_la_LIBADD) $(LIBS) common/testing/$(am__dirstamp): @$(MKDIR_P) common/testing @: > common/testing/$(am__dirstamp) common/testing/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/testing/$(DEPDIR) @: > common/testing/$(DEPDIR)/$(am__dirstamp) common/testing/MockUDPSocket.lo: common/testing/$(am__dirstamp) \ common/testing/$(DEPDIR)/$(am__dirstamp) common/testing/TestUtils.lo: common/testing/$(am__dirstamp) \ common/testing/$(DEPDIR)/$(am__dirstamp) common/testing/libolatesting.la: $(common_testing_libolatesting_la_OBJECTS) $(common_testing_libolatesting_la_DEPENDENCIES) $(EXTRA_common_testing_libolatesting_la_DEPENDENCIES) common/testing/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_common_testing_libolatesting_la_rpath) $(common_testing_libolatesting_la_OBJECTS) $(common_testing_libolatesting_la_LIBADD) $(LIBS) common/testing/GenericTester.lo: common/testing/$(am__dirstamp) \ common/testing/$(DEPDIR)/$(am__dirstamp) common/testing/libtestmain.la: $(common_testing_libtestmain_la_OBJECTS) $(common_testing_libtestmain_la_DEPENDENCIES) $(EXTRA_common_testing_libtestmain_la_DEPENDENCIES) common/testing/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_common_testing_libtestmain_la_rpath) $(common_testing_libtestmain_la_OBJECTS) $(common_testing_libtestmain_la_LIBADD) $(LIBS) common/web/$(am__dirstamp): @$(MKDIR_P) common/web @: > common/web/$(am__dirstamp) common/web/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) common/web/$(DEPDIR) @: > common/web/$(DEPDIR)/$(am__dirstamp) common/web/Json.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/JsonData.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/JsonLexer.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/JsonParser.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/JsonPatch.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/JsonPatchParser.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/JsonPointer.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/JsonSchema.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/JsonSections.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/JsonTypes.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/JsonWriter.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/PointerTracker.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/SchemaErrorLogger.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/SchemaKeywords.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/SchemaParseContext.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/SchemaParser.lo: common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/libolaweb.la: $(common_web_libolaweb_la_OBJECTS) $(common_web_libolaweb_la_DEPENDENCIES) $(EXTRA_common_web_libolaweb_la_DEPENDENCIES) common/web/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(common_web_libolaweb_la_OBJECTS) $(common_web_libolaweb_la_LIBADD) $(LIBS) examples/$(am__dirstamp): @$(MKDIR_P) examples @: > examples/$(am__dirstamp) examples/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) examples/$(DEPDIR) @: > examples/$(DEPDIR)/$(am__dirstamp) examples/examples_libolaconfig_la-OlaConfigurator.lo: \ examples/$(am__dirstamp) examples/$(DEPDIR)/$(am__dirstamp) examples/libolaconfig.la: $(examples_libolaconfig_la_OBJECTS) $(examples_libolaconfig_la_DEPENDENCIES) $(EXTRA_examples_libolaconfig_la_DEPENDENCIES) examples/$(am__dirstamp) $(AM_V_CXXLD)$(examples_libolaconfig_la_LINK) $(am_examples_libolaconfig_la_rpath) $(examples_libolaconfig_la_OBJECTS) $(examples_libolaconfig_la_LIBADD) $(LIBS) libs/acn/$(am__dirstamp): @$(MKDIR_P) libs/acn @: > libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) libs/acn/$(DEPDIR) @: > libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolaacn_la-CID.lo: libs/acn/$(am__dirstamp) \ libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolaacn_la-CIDImpl.lo: libs/acn/$(am__dirstamp) \ libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libolaacn.la: $(libs_acn_libolaacn_la_OBJECTS) $(libs_acn_libolaacn_la_DEPENDENCIES) $(EXTRA_libs_acn_libolaacn_la_DEPENDENCIES) libs/acn/$(am__dirstamp) $(AM_V_CXXLD)$(libs_acn_libolaacn_la_LINK) $(am_libs_acn_libolaacn_la_rpath) $(libs_acn_libolaacn_la_OBJECTS) $(libs_acn_libolaacn_la_LIBADD) $(LIBS) libs/acn/libs_acn_libolae131core_la-BaseInflator.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-DMPAddress.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-DMPE131Inflator.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-DMPInflator.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-DMPPDU.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-E131DiscoveryInflator.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-E131Inflator.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-E131Node.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-E131PDU.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-E131Sender.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-E133Inflator.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-E133PDU.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-E133StatusInflator.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-E133StatusPDU.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-PDU.lo: libs/acn/$(am__dirstamp) \ libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-PreamblePacker.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-RDMInflator.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-RDMPDU.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-RootInflator.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-RootPDU.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-RootSender.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-TCPTransport.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_libolae131core_la-UDPTransport.lo: \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libolae131core.la: $(libs_acn_libolae131core_la_OBJECTS) $(libs_acn_libolae131core_la_DEPENDENCIES) $(EXTRA_libs_acn_libolae131core_la_DEPENDENCIES) libs/acn/$(am__dirstamp) $(AM_V_CXXLD)$(libs_acn_libolae131core_la_LINK) $(libs_acn_libolae131core_la_OBJECTS) $(libs_acn_libolae131core_la_LIBADD) $(LIBS) libs/usb/$(am__dirstamp): @$(MKDIR_P) libs/usb @: > libs/usb/$(am__dirstamp) libs/usb/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) libs/usb/$(DEPDIR) @: > libs/usb/$(DEPDIR)/$(am__dirstamp) libs/usb/libs_usb_libolausb_la-HotplugAgent.lo: \ libs/usb/$(am__dirstamp) libs/usb/$(DEPDIR)/$(am__dirstamp) libs/usb/libs_usb_libolausb_la-JaRuleConstants.lo: \ libs/usb/$(am__dirstamp) libs/usb/$(DEPDIR)/$(am__dirstamp) libs/usb/libs_usb_libolausb_la-JaRulePortHandle.lo: \ libs/usb/$(am__dirstamp) libs/usb/$(DEPDIR)/$(am__dirstamp) libs/usb/libs_usb_libolausb_la-JaRulePortHandleImpl.lo: \ libs/usb/$(am__dirstamp) libs/usb/$(DEPDIR)/$(am__dirstamp) libs/usb/libs_usb_libolausb_la-JaRuleWidget.lo: \ libs/usb/$(am__dirstamp) libs/usb/$(DEPDIR)/$(am__dirstamp) libs/usb/libs_usb_libolausb_la-JaRuleWidgetPort.lo: \ libs/usb/$(am__dirstamp) libs/usb/$(DEPDIR)/$(am__dirstamp) libs/usb/libs_usb_libolausb_la-LibUsbAdaptor.lo: \ libs/usb/$(am__dirstamp) libs/usb/$(DEPDIR)/$(am__dirstamp) libs/usb/libs_usb_libolausb_la-LibUsbThread.lo: \ libs/usb/$(am__dirstamp) libs/usb/$(DEPDIR)/$(am__dirstamp) libs/usb/libs_usb_libolausb_la-Types.lo: libs/usb/$(am__dirstamp) \ libs/usb/$(DEPDIR)/$(am__dirstamp) libs/usb/libolausb.la: $(libs_usb_libolausb_la_OBJECTS) $(libs_usb_libolausb_la_DEPENDENCIES) $(EXTRA_libs_usb_libolausb_la_DEPENDENCIES) libs/usb/$(am__dirstamp) $(AM_V_CXXLD)$(libs_usb_libolausb_la_LINK) $(am_libs_usb_libolausb_la_rpath) $(libs_usb_libolausb_la_OBJECTS) $(libs_usb_libolausb_la_LIBADD) $(LIBS) ola/$(am__dirstamp): @$(MKDIR_P) ola @: > ola/$(am__dirstamp) ola/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) ola/$(DEPDIR) @: > ola/$(DEPDIR)/$(am__dirstamp) ola/ola_libola_la-AutoStart.lo: ola/$(am__dirstamp) \ ola/$(DEPDIR)/$(am__dirstamp) ola/ola_libola_la-ClientRDMAPIShim.lo: ola/$(am__dirstamp) \ ola/$(DEPDIR)/$(am__dirstamp) ola/ola_libola_la-ClientTypesFactory.lo: ola/$(am__dirstamp) \ ola/$(DEPDIR)/$(am__dirstamp) ola/ola_libola_la-Module.lo: ola/$(am__dirstamp) \ ola/$(DEPDIR)/$(am__dirstamp) ola/ola_libola_la-OlaCallbackClient.lo: ola/$(am__dirstamp) \ ola/$(DEPDIR)/$(am__dirstamp) ola/ola_libola_la-OlaClient.lo: ola/$(am__dirstamp) \ ola/$(DEPDIR)/$(am__dirstamp) ola/ola_libola_la-OlaClientCore.lo: ola/$(am__dirstamp) \ ola/$(DEPDIR)/$(am__dirstamp) ola/ola_libola_la-OlaClientWrapper.lo: ola/$(am__dirstamp) \ ola/$(DEPDIR)/$(am__dirstamp) ola/ola_libola_la-StreamingClient.lo: ola/$(am__dirstamp) \ ola/$(DEPDIR)/$(am__dirstamp) ola/libola.la: $(ola_libola_la_OBJECTS) $(ola_libola_la_DEPENDENCIES) $(EXTRA_ola_libola_la_DEPENDENCIES) ola/$(am__dirstamp) $(AM_V_CXXLD)$(ola_libola_la_LINK) -rpath $(libdir) $(ola_libola_la_OBJECTS) $(ola_libola_la_LIBADD) $(LIBS) olad/$(am__dirstamp): @$(MKDIR_P) olad @: > olad/$(am__dirstamp) olad/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) olad/$(DEPDIR) @: > olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-ClientBroker.lo: olad/$(am__dirstamp) \ olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-DiscoveryAgent.lo: olad/$(am__dirstamp) \ olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-DynamicPluginLoader.lo: \ olad/$(am__dirstamp) olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-OlaServerServiceImpl.lo: \ olad/$(am__dirstamp) olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-PluginManager.lo: olad/$(am__dirstamp) \ olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-BonjourDiscoveryAgent.lo: \ olad/$(am__dirstamp) olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-AvahiDiscoveryAgent.lo: \ olad/$(am__dirstamp) olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-HttpServerActions.lo: olad/$(am__dirstamp) \ olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-OladHTTPServer.lo: olad/$(am__dirstamp) \ olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-RDMHTTPModule.lo: olad/$(am__dirstamp) \ olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-OlaServer.lo: olad/$(am__dirstamp) \ olad/$(DEPDIR)/$(am__dirstamp) olad/olad_libolaserver_la-OlaDaemon.lo: olad/$(am__dirstamp) \ olad/$(DEPDIR)/$(am__dirstamp) olad/libolaserver.la: $(olad_libolaserver_la_OBJECTS) $(olad_libolaserver_la_DEPENDENCIES) $(EXTRA_olad_libolaserver_la_DEPENDENCIES) olad/$(am__dirstamp) $(AM_V_CXXLD)$(olad_libolaserver_la_LINK) -rpath $(libdir) $(olad_libolaserver_la_OBJECTS) $(olad_libolaserver_la_LIBADD) $(LIBS) olad/plugin_api/$(am__dirstamp): @$(MKDIR_P) olad/plugin_api @: > olad/plugin_api/$(am__dirstamp) olad/plugin_api/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) olad/plugin_api/$(DEPDIR) @: > olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Client.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Device.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DeviceManager.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DmxSource.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Plugin.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PluginAdaptor.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Port.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortBroker.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortManager.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Preferences.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Universe.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-UniverseStore.lo: \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/libolaserverplugininterface.la: $(olad_plugin_api_libolaserverplugininterface_la_OBJECTS) $(olad_plugin_api_libolaserverplugininterface_la_DEPENDENCIES) $(EXTRA_olad_plugin_api_libolaserverplugininterface_la_DEPENDENCIES) olad/plugin_api/$(am__dirstamp) $(AM_V_CXXLD)$(olad_plugin_api_libolaserverplugininterface_la_LINK) -rpath $(libdir) $(olad_plugin_api_libolaserverplugininterface_la_OBJECTS) $(olad_plugin_api_libolaserverplugininterface_la_LIBADD) $(LIBS) plugins/artnet/$(am__dirstamp): @$(MKDIR_P) plugins/artnet @: > plugins/artnet/$(am__dirstamp) plugins/artnet/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/artnet/$(DEPDIR) @: > plugins/artnet/$(DEPDIR)/$(am__dirstamp) plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPlugin.lo: \ plugins/artnet/$(am__dirstamp) \ plugins/artnet/$(DEPDIR)/$(am__dirstamp) plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetDevice.lo: \ plugins/artnet/$(am__dirstamp) \ plugins/artnet/$(DEPDIR)/$(am__dirstamp) plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPort.lo: \ plugins/artnet/$(am__dirstamp) \ plugins/artnet/$(DEPDIR)/$(am__dirstamp) plugins/artnet/libolaartnet.la: $(plugins_artnet_libolaartnet_la_OBJECTS) $(plugins_artnet_libolaartnet_la_DEPENDENCIES) $(EXTRA_plugins_artnet_libolaartnet_la_DEPENDENCIES) plugins/artnet/$(am__dirstamp) $(AM_V_CXXLD)$(plugins_artnet_libolaartnet_la_LINK) $(am_plugins_artnet_libolaartnet_la_rpath) $(plugins_artnet_libolaartnet_la_OBJECTS) $(plugins_artnet_libolaartnet_la_LIBADD) $(LIBS) plugins/artnet/ArtNetNode.lo: plugins/artnet/$(am__dirstamp) \ plugins/artnet/$(DEPDIR)/$(am__dirstamp) plugins/artnet/libolaartnetnode.la: $(plugins_artnet_libolaartnetnode_la_OBJECTS) $(plugins_artnet_libolaartnetnode_la_DEPENDENCIES) $(EXTRA_plugins_artnet_libolaartnetnode_la_DEPENDENCIES) plugins/artnet/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_artnet_libolaartnetnode_la_rpath) $(plugins_artnet_libolaartnetnode_la_OBJECTS) $(plugins_artnet_libolaartnetnode_la_LIBADD) $(LIBS) plugins/artnet/messages/$(am__dirstamp): @$(MKDIR_P) plugins/artnet/messages @: > plugins/artnet/messages/$(am__dirstamp) plugins/artnet/messages/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/artnet/messages/$(DEPDIR) @: > plugins/artnet/messages/$(DEPDIR)/$(am__dirstamp) plugins/artnet/messages/plugins_artnet_messages_libolaartnetconf_la-ArtNetConfigMessages.pb.lo: \ plugins/artnet/messages/$(am__dirstamp) \ plugins/artnet/messages/$(DEPDIR)/$(am__dirstamp) plugins/artnet/messages/libolaartnetconf.la: $(plugins_artnet_messages_libolaartnetconf_la_OBJECTS) $(plugins_artnet_messages_libolaartnetconf_la_DEPENDENCIES) $(EXTRA_plugins_artnet_messages_libolaartnetconf_la_DEPENDENCIES) plugins/artnet/messages/$(am__dirstamp) $(AM_V_CXXLD)$(plugins_artnet_messages_libolaartnetconf_la_LINK) $(am_plugins_artnet_messages_libolaartnetconf_la_rpath) $(plugins_artnet_messages_libolaartnetconf_la_OBJECTS) $(plugins_artnet_messages_libolaartnetconf_la_LIBADD) $(LIBS) plugins/dmx4linux/$(am__dirstamp): @$(MKDIR_P) plugins/dmx4linux @: > plugins/dmx4linux/$(am__dirstamp) plugins/dmx4linux/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/dmx4linux/$(DEPDIR) @: > plugins/dmx4linux/$(DEPDIR)/$(am__dirstamp) plugins/dmx4linux/Dmx4LinuxDevice.lo: \ plugins/dmx4linux/$(am__dirstamp) \ plugins/dmx4linux/$(DEPDIR)/$(am__dirstamp) plugins/dmx4linux/Dmx4LinuxPlugin.lo: \ plugins/dmx4linux/$(am__dirstamp) \ plugins/dmx4linux/$(DEPDIR)/$(am__dirstamp) plugins/dmx4linux/Dmx4LinuxPort.lo: plugins/dmx4linux/$(am__dirstamp) \ plugins/dmx4linux/$(DEPDIR)/$(am__dirstamp) plugins/dmx4linux/liboladmx4linux.la: $(plugins_dmx4linux_liboladmx4linux_la_OBJECTS) $(plugins_dmx4linux_liboladmx4linux_la_DEPENDENCIES) $(EXTRA_plugins_dmx4linux_liboladmx4linux_la_DEPENDENCIES) plugins/dmx4linux/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_dmx4linux_liboladmx4linux_la_rpath) $(plugins_dmx4linux_liboladmx4linux_la_OBJECTS) $(plugins_dmx4linux_liboladmx4linux_la_LIBADD) $(LIBS) plugins/dummy/$(am__dirstamp): @$(MKDIR_P) plugins/dummy @: > plugins/dummy/$(am__dirstamp) plugins/dummy/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/dummy/$(DEPDIR) @: > plugins/dummy/$(DEPDIR)/$(am__dirstamp) plugins/dummy/DummyDevice.lo: plugins/dummy/$(am__dirstamp) \ plugins/dummy/$(DEPDIR)/$(am__dirstamp) plugins/dummy/DummyPlugin.lo: plugins/dummy/$(am__dirstamp) \ plugins/dummy/$(DEPDIR)/$(am__dirstamp) plugins/dummy/DummyPort.lo: plugins/dummy/$(am__dirstamp) \ plugins/dummy/$(DEPDIR)/$(am__dirstamp) plugins/dummy/liboladummy.la: $(plugins_dummy_liboladummy_la_OBJECTS) $(plugins_dummy_liboladummy_la_DEPENDENCIES) $(EXTRA_plugins_dummy_liboladummy_la_DEPENDENCIES) plugins/dummy/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_dummy_liboladummy_la_rpath) $(plugins_dummy_liboladummy_la_OBJECTS) $(plugins_dummy_liboladummy_la_LIBADD) $(LIBS) plugins/e131/$(am__dirstamp): @$(MKDIR_P) plugins/e131 @: > plugins/e131/$(am__dirstamp) plugins/e131/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/e131/$(DEPDIR) @: > plugins/e131/$(DEPDIR)/$(am__dirstamp) plugins/e131/plugins_e131_libolae131_la-E131Device.lo: \ plugins/e131/$(am__dirstamp) \ plugins/e131/$(DEPDIR)/$(am__dirstamp) plugins/e131/plugins_e131_libolae131_la-E131Plugin.lo: \ plugins/e131/$(am__dirstamp) \ plugins/e131/$(DEPDIR)/$(am__dirstamp) plugins/e131/plugins_e131_libolae131_la-E131Port.lo: \ plugins/e131/$(am__dirstamp) \ plugins/e131/$(DEPDIR)/$(am__dirstamp) plugins/e131/libolae131.la: $(plugins_e131_libolae131_la_OBJECTS) $(plugins_e131_libolae131_la_DEPENDENCIES) $(EXTRA_plugins_e131_libolae131_la_DEPENDENCIES) plugins/e131/$(am__dirstamp) $(AM_V_CXXLD)$(plugins_e131_libolae131_la_LINK) $(am_plugins_e131_libolae131_la_rpath) $(plugins_e131_libolae131_la_OBJECTS) $(plugins_e131_libolae131_la_LIBADD) $(LIBS) plugins/e131/messages/$(am__dirstamp): @$(MKDIR_P) plugins/e131/messages @: > plugins/e131/messages/$(am__dirstamp) plugins/e131/messages/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/e131/messages/$(DEPDIR) @: > plugins/e131/messages/$(DEPDIR)/$(am__dirstamp) plugins/e131/messages/plugins_e131_messages_libolae131conf_la-E131ConfigMessages.pb.lo: \ plugins/e131/messages/$(am__dirstamp) \ plugins/e131/messages/$(DEPDIR)/$(am__dirstamp) plugins/e131/messages/libolae131conf.la: $(plugins_e131_messages_libolae131conf_la_OBJECTS) $(plugins_e131_messages_libolae131conf_la_DEPENDENCIES) $(EXTRA_plugins_e131_messages_libolae131conf_la_DEPENDENCIES) plugins/e131/messages/$(am__dirstamp) $(AM_V_CXXLD)$(plugins_e131_messages_libolae131conf_la_LINK) $(am_plugins_e131_messages_libolae131conf_la_rpath) $(plugins_e131_messages_libolae131conf_la_OBJECTS) $(plugins_e131_messages_libolae131conf_la_LIBADD) $(LIBS) plugins/espnet/$(am__dirstamp): @$(MKDIR_P) plugins/espnet @: > plugins/espnet/$(am__dirstamp) plugins/espnet/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/espnet/$(DEPDIR) @: > plugins/espnet/$(DEPDIR)/$(am__dirstamp) plugins/espnet/EspNetDevice.lo: plugins/espnet/$(am__dirstamp) \ plugins/espnet/$(DEPDIR)/$(am__dirstamp) plugins/espnet/EspNetNode.lo: plugins/espnet/$(am__dirstamp) \ plugins/espnet/$(DEPDIR)/$(am__dirstamp) plugins/espnet/EspNetPlugin.lo: plugins/espnet/$(am__dirstamp) \ plugins/espnet/$(DEPDIR)/$(am__dirstamp) plugins/espnet/EspNetPort.lo: plugins/espnet/$(am__dirstamp) \ plugins/espnet/$(DEPDIR)/$(am__dirstamp) plugins/espnet/RunLengthDecoder.lo: plugins/espnet/$(am__dirstamp) \ plugins/espnet/$(DEPDIR)/$(am__dirstamp) plugins/espnet/libolaespnet.la: $(plugins_espnet_libolaespnet_la_OBJECTS) $(plugins_espnet_libolaespnet_la_DEPENDENCIES) $(EXTRA_plugins_espnet_libolaespnet_la_DEPENDENCIES) plugins/espnet/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_espnet_libolaespnet_la_rpath) $(plugins_espnet_libolaespnet_la_OBJECTS) $(plugins_espnet_libolaespnet_la_LIBADD) $(LIBS) plugins/ftdidmx/$(am__dirstamp): @$(MKDIR_P) plugins/ftdidmx @: > plugins/ftdidmx/$(am__dirstamp) plugins/ftdidmx/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/ftdidmx/$(DEPDIR) @: > plugins/ftdidmx/$(DEPDIR)/$(am__dirstamp) plugins/ftdidmx/FtdiDmxDevice.lo: plugins/ftdidmx/$(am__dirstamp) \ plugins/ftdidmx/$(DEPDIR)/$(am__dirstamp) plugins/ftdidmx/FtdiDmxPlugin.lo: plugins/ftdidmx/$(am__dirstamp) \ plugins/ftdidmx/$(DEPDIR)/$(am__dirstamp) plugins/ftdidmx/FtdiDmxThread.lo: plugins/ftdidmx/$(am__dirstamp) \ plugins/ftdidmx/$(DEPDIR)/$(am__dirstamp) plugins/ftdidmx/FtdiWidget.lo: plugins/ftdidmx/$(am__dirstamp) \ plugins/ftdidmx/$(DEPDIR)/$(am__dirstamp) plugins/ftdidmx/libolaftdidmx.la: $(plugins_ftdidmx_libolaftdidmx_la_OBJECTS) $(plugins_ftdidmx_libolaftdidmx_la_DEPENDENCIES) $(EXTRA_plugins_ftdidmx_libolaftdidmx_la_DEPENDENCIES) plugins/ftdidmx/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_ftdidmx_libolaftdidmx_la_rpath) $(plugins_ftdidmx_libolaftdidmx_la_OBJECTS) $(plugins_ftdidmx_libolaftdidmx_la_LIBADD) $(LIBS) plugins/gpio/$(am__dirstamp): @$(MKDIR_P) plugins/gpio @: > plugins/gpio/$(am__dirstamp) plugins/gpio/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/gpio/$(DEPDIR) @: > plugins/gpio/$(DEPDIR)/$(am__dirstamp) plugins/gpio/GPIODevice.lo: plugins/gpio/$(am__dirstamp) \ plugins/gpio/$(DEPDIR)/$(am__dirstamp) plugins/gpio/GPIOPlugin.lo: plugins/gpio/$(am__dirstamp) \ plugins/gpio/$(DEPDIR)/$(am__dirstamp) plugins/gpio/GPIOPort.lo: plugins/gpio/$(am__dirstamp) \ plugins/gpio/$(DEPDIR)/$(am__dirstamp) plugins/gpio/libolagpio.la: $(plugins_gpio_libolagpio_la_OBJECTS) $(plugins_gpio_libolagpio_la_DEPENDENCIES) $(EXTRA_plugins_gpio_libolagpio_la_DEPENDENCIES) plugins/gpio/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_gpio_libolagpio_la_rpath) $(plugins_gpio_libolagpio_la_OBJECTS) $(plugins_gpio_libolagpio_la_LIBADD) $(LIBS) plugins/gpio/GPIODriver.lo: plugins/gpio/$(am__dirstamp) \ plugins/gpio/$(DEPDIR)/$(am__dirstamp) plugins/gpio/libolagpiocore.la: $(plugins_gpio_libolagpiocore_la_OBJECTS) $(plugins_gpio_libolagpiocore_la_DEPENDENCIES) $(EXTRA_plugins_gpio_libolagpiocore_la_DEPENDENCIES) plugins/gpio/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_gpio_libolagpiocore_la_rpath) $(plugins_gpio_libolagpiocore_la_OBJECTS) $(plugins_gpio_libolagpiocore_la_LIBADD) $(LIBS) plugins/karate/$(am__dirstamp): @$(MKDIR_P) plugins/karate @: > plugins/karate/$(am__dirstamp) plugins/karate/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/karate/$(DEPDIR) @: > plugins/karate/$(DEPDIR)/$(am__dirstamp) plugins/karate/KaratePlugin.lo: plugins/karate/$(am__dirstamp) \ plugins/karate/$(DEPDIR)/$(am__dirstamp) plugins/karate/KarateDevice.lo: plugins/karate/$(am__dirstamp) \ plugins/karate/$(DEPDIR)/$(am__dirstamp) plugins/karate/KarateThread.lo: plugins/karate/$(am__dirstamp) \ plugins/karate/$(DEPDIR)/$(am__dirstamp) plugins/karate/KarateLight.lo: plugins/karate/$(am__dirstamp) \ plugins/karate/$(DEPDIR)/$(am__dirstamp) plugins/karate/libolakarate.la: $(plugins_karate_libolakarate_la_OBJECTS) $(plugins_karate_libolakarate_la_DEPENDENCIES) $(EXTRA_plugins_karate_libolakarate_la_DEPENDENCIES) plugins/karate/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_karate_libolakarate_la_rpath) $(plugins_karate_libolakarate_la_OBJECTS) $(plugins_karate_libolakarate_la_LIBADD) $(LIBS) plugins/kinet/$(am__dirstamp): @$(MKDIR_P) plugins/kinet @: > plugins/kinet/$(am__dirstamp) plugins/kinet/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/kinet/$(DEPDIR) @: > plugins/kinet/$(DEPDIR)/$(am__dirstamp) plugins/kinet/KiNetPlugin.lo: plugins/kinet/$(am__dirstamp) \ plugins/kinet/$(DEPDIR)/$(am__dirstamp) plugins/kinet/KiNetDevice.lo: plugins/kinet/$(am__dirstamp) \ plugins/kinet/$(DEPDIR)/$(am__dirstamp) plugins/kinet/libolakinet.la: $(plugins_kinet_libolakinet_la_OBJECTS) $(plugins_kinet_libolakinet_la_DEPENDENCIES) $(EXTRA_plugins_kinet_libolakinet_la_DEPENDENCIES) plugins/kinet/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_kinet_libolakinet_la_rpath) $(plugins_kinet_libolakinet_la_OBJECTS) $(plugins_kinet_libolakinet_la_LIBADD) $(LIBS) plugins/kinet/KiNetNode.lo: plugins/kinet/$(am__dirstamp) \ plugins/kinet/$(DEPDIR)/$(am__dirstamp) plugins/kinet/libolakinetnode.la: $(plugins_kinet_libolakinetnode_la_OBJECTS) $(plugins_kinet_libolakinetnode_la_DEPENDENCIES) $(EXTRA_plugins_kinet_libolakinetnode_la_DEPENDENCIES) plugins/kinet/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_kinet_libolakinetnode_la_rpath) $(plugins_kinet_libolakinetnode_la_OBJECTS) $(plugins_kinet_libolakinetnode_la_LIBADD) $(LIBS) plugins/milinst/$(am__dirstamp): @$(MKDIR_P) plugins/milinst @: > plugins/milinst/$(am__dirstamp) plugins/milinst/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/milinst/$(DEPDIR) @: > plugins/milinst/$(DEPDIR)/$(am__dirstamp) plugins/milinst/MilInstDevice.lo: plugins/milinst/$(am__dirstamp) \ plugins/milinst/$(DEPDIR)/$(am__dirstamp) plugins/milinst/MilInstPlugin.lo: plugins/milinst/$(am__dirstamp) \ plugins/milinst/$(DEPDIR)/$(am__dirstamp) plugins/milinst/MilInstPort.lo: plugins/milinst/$(am__dirstamp) \ plugins/milinst/$(DEPDIR)/$(am__dirstamp) plugins/milinst/MilInstWidget.lo: plugins/milinst/$(am__dirstamp) \ plugins/milinst/$(DEPDIR)/$(am__dirstamp) plugins/milinst/MilInstWidget1463.lo: plugins/milinst/$(am__dirstamp) \ plugins/milinst/$(DEPDIR)/$(am__dirstamp) plugins/milinst/MilInstWidget1553.lo: plugins/milinst/$(am__dirstamp) \ plugins/milinst/$(DEPDIR)/$(am__dirstamp) plugins/milinst/libolamilinst.la: $(plugins_milinst_libolamilinst_la_OBJECTS) $(plugins_milinst_libolamilinst_la_DEPENDENCIES) $(EXTRA_plugins_milinst_libolamilinst_la_DEPENDENCIES) plugins/milinst/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_milinst_libolamilinst_la_rpath) $(plugins_milinst_libolamilinst_la_OBJECTS) $(plugins_milinst_libolamilinst_la_LIBADD) $(LIBS) plugins/opendmx/$(am__dirstamp): @$(MKDIR_P) plugins/opendmx @: > plugins/opendmx/$(am__dirstamp) plugins/opendmx/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/opendmx/$(DEPDIR) @: > plugins/opendmx/$(DEPDIR)/$(am__dirstamp) plugins/opendmx/OpenDmxDevice.lo: plugins/opendmx/$(am__dirstamp) \ plugins/opendmx/$(DEPDIR)/$(am__dirstamp) plugins/opendmx/OpenDmxPlugin.lo: plugins/opendmx/$(am__dirstamp) \ plugins/opendmx/$(DEPDIR)/$(am__dirstamp) plugins/opendmx/OpenDmxThread.lo: plugins/opendmx/$(am__dirstamp) \ plugins/opendmx/$(DEPDIR)/$(am__dirstamp) plugins/opendmx/libolaopendmx.la: $(plugins_opendmx_libolaopendmx_la_OBJECTS) $(plugins_opendmx_libolaopendmx_la_DEPENDENCIES) $(EXTRA_plugins_opendmx_libolaopendmx_la_DEPENDENCIES) plugins/opendmx/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_opendmx_libolaopendmx_la_rpath) $(plugins_opendmx_libolaopendmx_la_OBJECTS) $(plugins_opendmx_libolaopendmx_la_LIBADD) $(LIBS) plugins/openpixelcontrol/$(am__dirstamp): @$(MKDIR_P) plugins/openpixelcontrol @: > plugins/openpixelcontrol/$(am__dirstamp) plugins/openpixelcontrol/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/openpixelcontrol/$(DEPDIR) @: > plugins/openpixelcontrol/$(DEPDIR)/$(am__dirstamp) plugins/openpixelcontrol/OPCClient.lo: \ plugins/openpixelcontrol/$(am__dirstamp) \ plugins/openpixelcontrol/$(DEPDIR)/$(am__dirstamp) plugins/openpixelcontrol/OPCServer.lo: \ plugins/openpixelcontrol/$(am__dirstamp) \ plugins/openpixelcontrol/$(DEPDIR)/$(am__dirstamp) plugins/openpixelcontrol/libolaopc.la: $(plugins_openpixelcontrol_libolaopc_la_OBJECTS) $(plugins_openpixelcontrol_libolaopc_la_DEPENDENCIES) $(EXTRA_plugins_openpixelcontrol_libolaopc_la_DEPENDENCIES) plugins/openpixelcontrol/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_openpixelcontrol_libolaopc_la_rpath) $(plugins_openpixelcontrol_libolaopc_la_OBJECTS) $(plugins_openpixelcontrol_libolaopc_la_LIBADD) $(LIBS) plugins/openpixelcontrol/OPCDevice.lo: \ plugins/openpixelcontrol/$(am__dirstamp) \ plugins/openpixelcontrol/$(DEPDIR)/$(am__dirstamp) plugins/openpixelcontrol/OPCPlugin.lo: \ plugins/openpixelcontrol/$(am__dirstamp) \ plugins/openpixelcontrol/$(DEPDIR)/$(am__dirstamp) plugins/openpixelcontrol/OPCPort.lo: \ plugins/openpixelcontrol/$(am__dirstamp) \ plugins/openpixelcontrol/$(DEPDIR)/$(am__dirstamp) plugins/openpixelcontrol/libolaopenpixelcontrol.la: $(plugins_openpixelcontrol_libolaopenpixelcontrol_la_OBJECTS) $(plugins_openpixelcontrol_libolaopenpixelcontrol_la_DEPENDENCIES) $(EXTRA_plugins_openpixelcontrol_libolaopenpixelcontrol_la_DEPENDENCIES) plugins/openpixelcontrol/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_openpixelcontrol_libolaopenpixelcontrol_la_rpath) $(plugins_openpixelcontrol_libolaopenpixelcontrol_la_OBJECTS) $(plugins_openpixelcontrol_libolaopenpixelcontrol_la_LIBADD) $(LIBS) plugins/osc/$(am__dirstamp): @$(MKDIR_P) plugins/osc @: > plugins/osc/$(am__dirstamp) plugins/osc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/osc/$(DEPDIR) @: > plugins/osc/$(DEPDIR)/$(am__dirstamp) plugins/osc/plugins_osc_libolaosc_la-OSCDevice.lo: \ plugins/osc/$(am__dirstamp) \ plugins/osc/$(DEPDIR)/$(am__dirstamp) plugins/osc/plugins_osc_libolaosc_la-OSCPlugin.lo: \ plugins/osc/$(am__dirstamp) \ plugins/osc/$(DEPDIR)/$(am__dirstamp) plugins/osc/plugins_osc_libolaosc_la-OSCPort.lo: \ plugins/osc/$(am__dirstamp) \ plugins/osc/$(DEPDIR)/$(am__dirstamp) plugins/osc/libolaosc.la: $(plugins_osc_libolaosc_la_OBJECTS) $(plugins_osc_libolaosc_la_DEPENDENCIES) $(EXTRA_plugins_osc_libolaosc_la_DEPENDENCIES) plugins/osc/$(am__dirstamp) $(AM_V_CXXLD)$(plugins_osc_libolaosc_la_LINK) $(am_plugins_osc_libolaosc_la_rpath) $(plugins_osc_libolaosc_la_OBJECTS) $(plugins_osc_libolaosc_la_LIBADD) $(LIBS) plugins/osc/plugins_osc_libolaoscnode_la-OSCAddressTemplate.lo: \ plugins/osc/$(am__dirstamp) \ plugins/osc/$(DEPDIR)/$(am__dirstamp) plugins/osc/plugins_osc_libolaoscnode_la-OSCNode.lo: \ plugins/osc/$(am__dirstamp) \ plugins/osc/$(DEPDIR)/$(am__dirstamp) plugins/osc/libolaoscnode.la: $(plugins_osc_libolaoscnode_la_OBJECTS) $(plugins_osc_libolaoscnode_la_DEPENDENCIES) $(EXTRA_plugins_osc_libolaoscnode_la_DEPENDENCIES) plugins/osc/$(am__dirstamp) $(AM_V_CXXLD)$(plugins_osc_libolaoscnode_la_LINK) $(am_plugins_osc_libolaoscnode_la_rpath) $(plugins_osc_libolaoscnode_la_OBJECTS) $(plugins_osc_libolaoscnode_la_LIBADD) $(LIBS) plugins/pathport/$(am__dirstamp): @$(MKDIR_P) plugins/pathport @: > plugins/pathport/$(am__dirstamp) plugins/pathport/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/pathport/$(DEPDIR) @: > plugins/pathport/$(DEPDIR)/$(am__dirstamp) plugins/pathport/PathportDevice.lo: plugins/pathport/$(am__dirstamp) \ plugins/pathport/$(DEPDIR)/$(am__dirstamp) plugins/pathport/PathportNode.lo: plugins/pathport/$(am__dirstamp) \ plugins/pathport/$(DEPDIR)/$(am__dirstamp) plugins/pathport/PathportPlugin.lo: plugins/pathport/$(am__dirstamp) \ plugins/pathport/$(DEPDIR)/$(am__dirstamp) plugins/pathport/PathportPort.lo: plugins/pathport/$(am__dirstamp) \ plugins/pathport/$(DEPDIR)/$(am__dirstamp) plugins/pathport/libolapathport.la: $(plugins_pathport_libolapathport_la_OBJECTS) $(plugins_pathport_libolapathport_la_DEPENDENCIES) $(EXTRA_plugins_pathport_libolapathport_la_DEPENDENCIES) plugins/pathport/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_pathport_libolapathport_la_rpath) $(plugins_pathport_libolapathport_la_OBJECTS) $(plugins_pathport_libolapathport_la_LIBADD) $(LIBS) plugins/renard/$(am__dirstamp): @$(MKDIR_P) plugins/renard @: > plugins/renard/$(am__dirstamp) plugins/renard/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/renard/$(DEPDIR) @: > plugins/renard/$(DEPDIR)/$(am__dirstamp) plugins/renard/RenardDevice.lo: plugins/renard/$(am__dirstamp) \ plugins/renard/$(DEPDIR)/$(am__dirstamp) plugins/renard/RenardPlugin.lo: plugins/renard/$(am__dirstamp) \ plugins/renard/$(DEPDIR)/$(am__dirstamp) plugins/renard/RenardPort.lo: plugins/renard/$(am__dirstamp) \ plugins/renard/$(DEPDIR)/$(am__dirstamp) plugins/renard/RenardWidget.lo: plugins/renard/$(am__dirstamp) \ plugins/renard/$(DEPDIR)/$(am__dirstamp) plugins/renard/libolarenard.la: $(plugins_renard_libolarenard_la_OBJECTS) $(plugins_renard_libolarenard_la_DEPENDENCIES) $(EXTRA_plugins_renard_libolarenard_la_DEPENDENCIES) plugins/renard/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_renard_libolarenard_la_rpath) $(plugins_renard_libolarenard_la_OBJECTS) $(plugins_renard_libolarenard_la_LIBADD) $(LIBS) plugins/sandnet/$(am__dirstamp): @$(MKDIR_P) plugins/sandnet @: > plugins/sandnet/$(am__dirstamp) plugins/sandnet/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/sandnet/$(DEPDIR) @: > plugins/sandnet/$(DEPDIR)/$(am__dirstamp) plugins/sandnet/SandNetDevice.lo: plugins/sandnet/$(am__dirstamp) \ plugins/sandnet/$(DEPDIR)/$(am__dirstamp) plugins/sandnet/SandNetNode.lo: plugins/sandnet/$(am__dirstamp) \ plugins/sandnet/$(DEPDIR)/$(am__dirstamp) plugins/sandnet/SandNetPlugin.lo: plugins/sandnet/$(am__dirstamp) \ plugins/sandnet/$(DEPDIR)/$(am__dirstamp) plugins/sandnet/SandNetPort.lo: plugins/sandnet/$(am__dirstamp) \ plugins/sandnet/$(DEPDIR)/$(am__dirstamp) plugins/sandnet/libolasandnet.la: $(plugins_sandnet_libolasandnet_la_OBJECTS) $(plugins_sandnet_libolasandnet_la_DEPENDENCIES) $(EXTRA_plugins_sandnet_libolasandnet_la_DEPENDENCIES) plugins/sandnet/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_sandnet_libolasandnet_la_rpath) $(plugins_sandnet_libolasandnet_la_OBJECTS) $(plugins_sandnet_libolasandnet_la_LIBADD) $(LIBS) plugins/shownet/$(am__dirstamp): @$(MKDIR_P) plugins/shownet @: > plugins/shownet/$(am__dirstamp) plugins/shownet/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/shownet/$(DEPDIR) @: > plugins/shownet/$(DEPDIR)/$(am__dirstamp) plugins/shownet/ShowNetPlugin.lo: plugins/shownet/$(am__dirstamp) \ plugins/shownet/$(DEPDIR)/$(am__dirstamp) plugins/shownet/ShowNetDevice.lo: plugins/shownet/$(am__dirstamp) \ plugins/shownet/$(DEPDIR)/$(am__dirstamp) plugins/shownet/ShowNetPort.lo: plugins/shownet/$(am__dirstamp) \ plugins/shownet/$(DEPDIR)/$(am__dirstamp) plugins/shownet/ShowNetNode.lo: plugins/shownet/$(am__dirstamp) \ plugins/shownet/$(DEPDIR)/$(am__dirstamp) plugins/shownet/libolashownet.la: $(plugins_shownet_libolashownet_la_OBJECTS) $(plugins_shownet_libolashownet_la_DEPENDENCIES) $(EXTRA_plugins_shownet_libolashownet_la_DEPENDENCIES) plugins/shownet/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_shownet_libolashownet_la_rpath) $(plugins_shownet_libolashownet_la_OBJECTS) $(plugins_shownet_libolashownet_la_LIBADD) $(LIBS) plugins/spi/$(am__dirstamp): @$(MKDIR_P) plugins/spi @: > plugins/spi/$(am__dirstamp) plugins/spi/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/spi/$(DEPDIR) @: > plugins/spi/$(DEPDIR)/$(am__dirstamp) plugins/spi/SPIDevice.lo: plugins/spi/$(am__dirstamp) \ plugins/spi/$(DEPDIR)/$(am__dirstamp) plugins/spi/SPIPlugin.lo: plugins/spi/$(am__dirstamp) \ plugins/spi/$(DEPDIR)/$(am__dirstamp) plugins/spi/SPIPort.lo: plugins/spi/$(am__dirstamp) \ plugins/spi/$(DEPDIR)/$(am__dirstamp) plugins/spi/libolaspi.la: $(plugins_spi_libolaspi_la_OBJECTS) $(plugins_spi_libolaspi_la_DEPENDENCIES) $(EXTRA_plugins_spi_libolaspi_la_DEPENDENCIES) plugins/spi/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_spi_libolaspi_la_rpath) $(plugins_spi_libolaspi_la_OBJECTS) $(plugins_spi_libolaspi_la_LIBADD) $(LIBS) plugins/spi/SPIBackend.lo: plugins/spi/$(am__dirstamp) \ plugins/spi/$(DEPDIR)/$(am__dirstamp) plugins/spi/SPIOutput.lo: plugins/spi/$(am__dirstamp) \ plugins/spi/$(DEPDIR)/$(am__dirstamp) plugins/spi/SPIWriter.lo: plugins/spi/$(am__dirstamp) \ plugins/spi/$(DEPDIR)/$(am__dirstamp) plugins/spi/libolaspicore.la: $(plugins_spi_libolaspicore_la_OBJECTS) $(plugins_spi_libolaspicore_la_DEPENDENCIES) $(EXTRA_plugins_spi_libolaspicore_la_DEPENDENCIES) plugins/spi/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_spi_libolaspicore_la_rpath) $(plugins_spi_libolaspicore_la_OBJECTS) $(plugins_spi_libolaspicore_la_LIBADD) $(LIBS) plugins/stageprofi/$(am__dirstamp): @$(MKDIR_P) plugins/stageprofi @: > plugins/stageprofi/$(am__dirstamp) plugins/stageprofi/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/stageprofi/$(DEPDIR) @: > plugins/stageprofi/$(DEPDIR)/$(am__dirstamp) plugins/stageprofi/StageProfiDetector.lo: \ plugins/stageprofi/$(am__dirstamp) \ plugins/stageprofi/$(DEPDIR)/$(am__dirstamp) plugins/stageprofi/StageProfiDevice.lo: \ plugins/stageprofi/$(am__dirstamp) \ plugins/stageprofi/$(DEPDIR)/$(am__dirstamp) plugins/stageprofi/StageProfiPlugin.lo: \ plugins/stageprofi/$(am__dirstamp) \ plugins/stageprofi/$(DEPDIR)/$(am__dirstamp) plugins/stageprofi/StageProfiPort.lo: \ plugins/stageprofi/$(am__dirstamp) \ plugins/stageprofi/$(DEPDIR)/$(am__dirstamp) plugins/stageprofi/StageProfiWidget.lo: \ plugins/stageprofi/$(am__dirstamp) \ plugins/stageprofi/$(DEPDIR)/$(am__dirstamp) plugins/stageprofi/libolastageprofi.la: $(plugins_stageprofi_libolastageprofi_la_OBJECTS) $(plugins_stageprofi_libolastageprofi_la_DEPENDENCIES) $(EXTRA_plugins_stageprofi_libolastageprofi_la_DEPENDENCIES) plugins/stageprofi/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_stageprofi_libolastageprofi_la_rpath) $(plugins_stageprofi_libolastageprofi_la_OBJECTS) $(plugins_stageprofi_libolastageprofi_la_LIBADD) $(LIBS) plugins/uartdmx/$(am__dirstamp): @$(MKDIR_P) plugins/uartdmx @: > plugins/uartdmx/$(am__dirstamp) plugins/uartdmx/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/uartdmx/$(DEPDIR) @: > plugins/uartdmx/$(DEPDIR)/$(am__dirstamp) plugins/uartdmx/UartDmxDevice.lo: plugins/uartdmx/$(am__dirstamp) \ plugins/uartdmx/$(DEPDIR)/$(am__dirstamp) plugins/uartdmx/UartDmxPlugin.lo: plugins/uartdmx/$(am__dirstamp) \ plugins/uartdmx/$(DEPDIR)/$(am__dirstamp) plugins/uartdmx/UartDmxThread.lo: plugins/uartdmx/$(am__dirstamp) \ plugins/uartdmx/$(DEPDIR)/$(am__dirstamp) plugins/uartdmx/UartWidget.lo: plugins/uartdmx/$(am__dirstamp) \ plugins/uartdmx/$(DEPDIR)/$(am__dirstamp) plugins/uartdmx/libolauartdmx.la: $(plugins_uartdmx_libolauartdmx_la_OBJECTS) $(plugins_uartdmx_libolauartdmx_la_DEPENDENCIES) $(EXTRA_plugins_uartdmx_libolauartdmx_la_DEPENDENCIES) plugins/uartdmx/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_uartdmx_libolauartdmx_la_rpath) $(plugins_uartdmx_libolauartdmx_la_OBJECTS) $(plugins_uartdmx_libolauartdmx_la_LIBADD) $(LIBS) plugins/usbdmx/$(am__dirstamp): @$(MKDIR_P) plugins/usbdmx @: > plugins/usbdmx/$(am__dirstamp) plugins/usbdmx/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/usbdmx/$(DEPDIR) @: > plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-AsyncPluginImpl.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Device.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Port.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericDevice.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericOutputPort.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleDevice.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleOutputPort.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-SyncPluginImpl.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-UsbDmxPlugin.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/libolausbdmx.la: $(plugins_usbdmx_libolausbdmx_la_OBJECTS) $(plugins_usbdmx_libolausbdmx_la_DEPENDENCIES) $(EXTRA_plugins_usbdmx_libolausbdmx_la_DEPENDENCIES) plugins/usbdmx/$(am__dirstamp) $(AM_V_CXXLD)$(plugins_usbdmx_libolausbdmx_la_LINK) $(am_plugins_usbdmx_libolausbdmx_la_rpath) $(plugins_usbdmx_libolausbdmx_la_OBJECTS) $(plugins_usbdmx_libolausbdmx_la_LIBADD) $(LIBS) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMX.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMXFactory.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbReceiver.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbSender.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbTransceiverBase.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1Factory.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EurolitePro.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EuroliteProFactory.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Flags.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-JaRuleFactory.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandy.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandyFactory.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Sunlite.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFactory.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFirmwareLoader.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SyncronizedWidgetObserver.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbReceiver.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbSender.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062Factory.lo: \ plugins/usbdmx/$(am__dirstamp) \ plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) plugins/usbdmx/libolausbdmxwidget.la: $(plugins_usbdmx_libolausbdmxwidget_la_OBJECTS) $(plugins_usbdmx_libolausbdmxwidget_la_DEPENDENCIES) $(EXTRA_plugins_usbdmx_libolausbdmxwidget_la_DEPENDENCIES) plugins/usbdmx/$(am__dirstamp) $(AM_V_CXXLD)$(plugins_usbdmx_libolausbdmxwidget_la_LINK) $(am_plugins_usbdmx_libolausbdmxwidget_la_rpath) $(plugins_usbdmx_libolausbdmxwidget_la_OBJECTS) $(plugins_usbdmx_libolausbdmxwidget_la_LIBADD) $(LIBS) plugins/usbpro/$(am__dirstamp): @$(MKDIR_P) plugins/usbpro @: > plugins/usbpro/$(am__dirstamp) plugins/usbpro/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/usbpro/$(DEPDIR) @: > plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_libolausbpro_la-ArduinoRGBDevice.lo: \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxTriDevice.lo: \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxterDevice.lo: \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_libolausbpro_la-RobeDevice.lo: \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_libolausbpro_la-UltraDMXProDevice.lo: \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbProDevice.lo: \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbSerialPlugin.lo: \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/libolausbpro.la: $(plugins_usbpro_libolausbpro_la_OBJECTS) $(plugins_usbpro_libolausbpro_la_DEPENDENCIES) $(EXTRA_plugins_usbpro_libolausbpro_la_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) $(AM_V_CXXLD)$(plugins_usbpro_libolausbpro_la_LINK) $(am_plugins_usbpro_libolausbpro_la_rpath) $(plugins_usbpro_libolausbpro_la_OBJECTS) $(plugins_usbpro_libolausbpro_la_LIBADD) $(LIBS) plugins/usbpro/ArduinoWidget.lo: plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/BaseRobeWidget.lo: plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/BaseUsbProWidget.lo: plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/DmxTriWidget.lo: plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/DmxterWidget.lo: plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/EnttecUsbProWidget.lo: plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/GenericUsbProWidget.lo: plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/RobeWidget.lo: plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/RobeWidgetDetector.lo: plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/UltraDMXProWidget.lo: plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/UsbProWidgetDetector.lo: \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/WidgetDetectorThread.lo: \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/libolausbprowidget.la: $(plugins_usbpro_libolausbprowidget_la_OBJECTS) $(plugins_usbpro_libolausbprowidget_la_DEPENDENCIES) $(EXTRA_plugins_usbpro_libolausbprowidget_la_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_plugins_usbpro_libolausbprowidget_la_rpath) $(plugins_usbpro_libolausbprowidget_la_OBJECTS) $(plugins_usbpro_libolausbprowidget_la_LIBADD) $(LIBS) plugins/usbpro/messages/$(am__dirstamp): @$(MKDIR_P) plugins/usbpro/messages @: > plugins/usbpro/messages/$(am__dirstamp) plugins/usbpro/messages/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) plugins/usbpro/messages/$(DEPDIR) @: > plugins/usbpro/messages/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/messages/plugins_usbpro_messages_libolausbproconf_la-UsbProConfigMessages.pb.lo: \ plugins/usbpro/messages/$(am__dirstamp) \ plugins/usbpro/messages/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/messages/libolausbproconf.la: $(plugins_usbpro_messages_libolausbproconf_la_OBJECTS) $(plugins_usbpro_messages_libolausbproconf_la_DEPENDENCIES) $(EXTRA_plugins_usbpro_messages_libolausbproconf_la_DEPENDENCIES) plugins/usbpro/messages/$(am__dirstamp) $(AM_V_CXXLD)$(plugins_usbpro_messages_libolausbproconf_la_LINK) $(am_plugins_usbpro_messages_libolausbproconf_la_rpath) $(plugins_usbpro_messages_libolausbproconf_la_OBJECTS) $(plugins_usbpro_messages_libolausbproconf_la_LIBADD) $(LIBS) tools/e133/$(am__dirstamp): @$(MKDIR_P) tools/e133 @: > tools/e133/$(am__dirstamp) tools/e133/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tools/e133/$(DEPDIR) @: > tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/E133HealthCheckedConnection.lo: tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/E133Receiver.lo: tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/E133StatusHelper.lo: tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/MessageBuilder.lo: tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/libolae133common.la: $(tools_e133_libolae133common_la_OBJECTS) $(tools_e133_libolae133common_la_DEPENDENCIES) $(EXTRA_tools_e133_libolae133common_la_DEPENDENCIES) tools/e133/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_tools_e133_libolae133common_la_rpath) $(tools_e133_libolae133common_la_OBJECTS) $(tools_e133_libolae133common_la_LIBADD) $(LIBS) tools/e133/DeviceManager.lo: tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/DeviceManagerImpl.lo: tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/libolae133controller.la: $(tools_e133_libolae133controller_la_OBJECTS) $(tools_e133_libolae133controller_la_DEPENDENCIES) $(EXTRA_tools_e133_libolae133controller_la_DEPENDENCIES) tools/e133/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_tools_e133_libolae133controller_la_rpath) $(tools_e133_libolae133controller_la_OBJECTS) $(tools_e133_libolae133controller_la_LIBADD) $(LIBS) tools/e133/DesignatedControllerConnection.lo: \ tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/E133Device.lo: tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/E133Endpoint.lo: tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/EndpointManager.lo: tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/ManagementEndpoint.lo: tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/SimpleE133Node.lo: tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/libolae133device.la: $(tools_e133_libolae133device_la_OBJECTS) $(tools_e133_libolae133device_la_DEPENDENCIES) $(EXTRA_tools_e133_libolae133device_la_DEPENDENCIES) tools/e133/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) $(am_tools_e133_libolae133device_la_rpath) $(tools_e133_libolae133device_la_OBJECTS) $(tools_e133_libolae133device_la_LIBADD) $(LIBS) tools/ola_trigger/$(am__dirstamp): @$(MKDIR_P) tools/ola_trigger @: > tools/ola_trigger/$(am__dirstamp) tools/ola_trigger/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tools/ola_trigger/$(DEPDIR) @: > tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/Action.lo: tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/Context.lo: tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/DMXTrigger.lo: tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/VariableInterpolator.lo: \ tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/libolatrigger.la: $(tools_ola_trigger_libolatrigger_la_OBJECTS) $(tools_ola_trigger_libolatrigger_la_DEPENDENCIES) $(EXTRA_tools_ola_trigger_libolatrigger_la_DEPENDENCIES) tools/ola_trigger/$(am__dirstamp) $(AM_V_CXXLD)$(CXXLINK) -rpath $(libdir) $(tools_ola_trigger_libolatrigger_la_OBJECTS) $(tools_ola_trigger_libolatrigger_la_LIBADD) $(LIBS) install-binPROGRAMS: $(bin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(bindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(bindir)$$dir" || exit $$?; \ } \ ; done uninstall-binPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(bin_PROGRAMS)'; test -n "$(bindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(bindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(bindir)" && rm -f $$files clean-binPROGRAMS: @list='$(bin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-checkPROGRAMS: @list='$(check_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list clean-noinstPROGRAMS: @list='$(noinst_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list common/base/common_base_CredentialsTester-CredentialsTest.$(OBJEXT): \ common/base/$(am__dirstamp) \ common/base/$(DEPDIR)/$(am__dirstamp) common/base/CredentialsTester$(EXEEXT): $(common_base_CredentialsTester_OBJECTS) $(common_base_CredentialsTester_DEPENDENCIES) $(EXTRA_common_base_CredentialsTester_DEPENDENCIES) common/base/$(am__dirstamp) @rm -f common/base/CredentialsTester$(EXEEXT) $(AM_V_CXXLD)$(common_base_CredentialsTester_LINK) $(common_base_CredentialsTester_OBJECTS) $(common_base_CredentialsTester_LDADD) $(LIBS) common/base/common_base_FlagsTester-FlagsTest.$(OBJEXT): \ common/base/$(am__dirstamp) \ common/base/$(DEPDIR)/$(am__dirstamp) common/base/FlagsTester$(EXEEXT): $(common_base_FlagsTester_OBJECTS) $(common_base_FlagsTester_DEPENDENCIES) $(EXTRA_common_base_FlagsTester_DEPENDENCIES) common/base/$(am__dirstamp) @rm -f common/base/FlagsTester$(EXEEXT) $(AM_V_CXXLD)$(common_base_FlagsTester_LINK) $(common_base_FlagsTester_OBJECTS) $(common_base_FlagsTester_LDADD) $(LIBS) common/base/common_base_LoggingTester-LoggingTest.$(OBJEXT): \ common/base/$(am__dirstamp) \ common/base/$(DEPDIR)/$(am__dirstamp) common/base/LoggingTester$(EXEEXT): $(common_base_LoggingTester_OBJECTS) $(common_base_LoggingTester_DEPENDENCIES) $(EXTRA_common_base_LoggingTester_DEPENDENCIES) common/base/$(am__dirstamp) @rm -f common/base/LoggingTester$(EXEEXT) $(AM_V_CXXLD)$(common_base_LoggingTester_LINK) $(common_base_LoggingTester_OBJECTS) $(common_base_LoggingTester_LDADD) $(LIBS) common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.$(OBJEXT): \ common/dmx/$(am__dirstamp) \ common/dmx/$(DEPDIR)/$(am__dirstamp) common/dmx/RunLengthEncoderTester$(EXEEXT): $(common_dmx_RunLengthEncoderTester_OBJECTS) $(common_dmx_RunLengthEncoderTester_DEPENDENCIES) $(EXTRA_common_dmx_RunLengthEncoderTester_DEPENDENCIES) common/dmx/$(am__dirstamp) @rm -f common/dmx/RunLengthEncoderTester$(EXEEXT) $(AM_V_CXXLD)$(common_dmx_RunLengthEncoderTester_LINK) $(common_dmx_RunLengthEncoderTester_OBJECTS) $(common_dmx_RunLengthEncoderTester_LDADD) $(LIBS) common/export_map/common_export_map_ExportMapTester-ExportMapTest.$(OBJEXT): \ common/export_map/$(am__dirstamp) \ common/export_map/$(DEPDIR)/$(am__dirstamp) common/export_map/ExportMapTester$(EXEEXT): $(common_export_map_ExportMapTester_OBJECTS) $(common_export_map_ExportMapTester_DEPENDENCIES) $(EXTRA_common_export_map_ExportMapTester_DEPENDENCIES) common/export_map/$(am__dirstamp) @rm -f common/export_map/ExportMapTester$(EXEEXT) $(AM_V_CXXLD)$(common_export_map_ExportMapTester_LINK) $(common_export_map_ExportMapTester_OBJECTS) $(common_export_map_ExportMapTester_LDADD) $(LIBS) common/file/common_file_UtilTester-UtilTest.$(OBJEXT): \ common/file/$(am__dirstamp) \ common/file/$(DEPDIR)/$(am__dirstamp) common/file/UtilTester$(EXEEXT): $(common_file_UtilTester_OBJECTS) $(common_file_UtilTester_DEPENDENCIES) $(EXTRA_common_file_UtilTester_DEPENDENCIES) common/file/$(am__dirstamp) @rm -f common/file/UtilTester$(EXEEXT) $(AM_V_CXXLD)$(common_file_UtilTester_LINK) $(common_file_UtilTester_OBJECTS) $(common_file_UtilTester_LDADD) $(LIBS) common/io/common_io_DescriptorTester-DescriptorTest.$(OBJEXT): \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/DescriptorTester$(EXEEXT): $(common_io_DescriptorTester_OBJECTS) $(common_io_DescriptorTester_DEPENDENCIES) $(EXTRA_common_io_DescriptorTester_DEPENDENCIES) common/io/$(am__dirstamp) @rm -f common/io/DescriptorTester$(EXEEXT) $(AM_V_CXXLD)$(common_io_DescriptorTester_LINK) $(common_io_DescriptorTester_OBJECTS) $(common_io_DescriptorTester_LDADD) $(LIBS) common/io/common_io_IOQueueTester-IOQueueTest.$(OBJEXT): \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/IOQueueTester$(EXEEXT): $(common_io_IOQueueTester_OBJECTS) $(common_io_IOQueueTester_DEPENDENCIES) $(EXTRA_common_io_IOQueueTester_DEPENDENCIES) common/io/$(am__dirstamp) @rm -f common/io/IOQueueTester$(EXEEXT) $(AM_V_CXXLD)$(common_io_IOQueueTester_LINK) $(common_io_IOQueueTester_OBJECTS) $(common_io_IOQueueTester_LDADD) $(LIBS) common/io/common_io_IOStackTester-IOStackTest.$(OBJEXT): \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/IOStackTester$(EXEEXT): $(common_io_IOStackTester_OBJECTS) $(common_io_IOStackTester_DEPENDENCIES) $(EXTRA_common_io_IOStackTester_DEPENDENCIES) common/io/$(am__dirstamp) @rm -f common/io/IOStackTester$(EXEEXT) $(AM_V_CXXLD)$(common_io_IOStackTester_LINK) $(common_io_IOStackTester_OBJECTS) $(common_io_IOStackTester_LDADD) $(LIBS) common/io/common_io_MemoryBlockTester-MemoryBlockTest.$(OBJEXT): \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/MemoryBlockTester$(EXEEXT): $(common_io_MemoryBlockTester_OBJECTS) $(common_io_MemoryBlockTester_DEPENDENCIES) $(EXTRA_common_io_MemoryBlockTester_DEPENDENCIES) common/io/$(am__dirstamp) @rm -f common/io/MemoryBlockTester$(EXEEXT) $(AM_V_CXXLD)$(common_io_MemoryBlockTester_LINK) $(common_io_MemoryBlockTester_OBJECTS) $(common_io_MemoryBlockTester_LDADD) $(LIBS) common/io/common_io_SelectServerTester-SelectServerTest.$(OBJEXT): \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_io_SelectServerTester-SelectServerThreadTest.$(OBJEXT): \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/SelectServerTester$(EXEEXT): $(common_io_SelectServerTester_OBJECTS) $(common_io_SelectServerTester_DEPENDENCIES) $(EXTRA_common_io_SelectServerTester_DEPENDENCIES) common/io/$(am__dirstamp) @rm -f common/io/SelectServerTester$(EXEEXT) $(AM_V_CXXLD)$(common_io_SelectServerTester_LINK) $(common_io_SelectServerTester_OBJECTS) $(common_io_SelectServerTester_LDADD) $(LIBS) common/io/common_io_StreamTester-InputStreamTest.$(OBJEXT): \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/common_io_StreamTester-OutputStreamTest.$(OBJEXT): \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/StreamTester$(EXEEXT): $(common_io_StreamTester_OBJECTS) $(common_io_StreamTester_DEPENDENCIES) $(EXTRA_common_io_StreamTester_DEPENDENCIES) common/io/$(am__dirstamp) @rm -f common/io/StreamTester$(EXEEXT) $(AM_V_CXXLD)$(common_io_StreamTester_LINK) $(common_io_StreamTester_OBJECTS) $(common_io_StreamTester_LDADD) $(LIBS) common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.$(OBJEXT): \ common/io/$(am__dirstamp) common/io/$(DEPDIR)/$(am__dirstamp) common/io/TimeoutManagerTester$(EXEEXT): $(common_io_TimeoutManagerTester_OBJECTS) $(common_io_TimeoutManagerTester_DEPENDENCIES) $(EXTRA_common_io_TimeoutManagerTester_DEPENDENCIES) common/io/$(am__dirstamp) @rm -f common/io/TimeoutManagerTester$(EXEEXT) $(AM_V_CXXLD)$(common_io_TimeoutManagerTester_LINK) $(common_io_TimeoutManagerTester_OBJECTS) $(common_io_TimeoutManagerTester_LDADD) $(LIBS) common/messaging/common_messaging_DescriptorTester-DescriptorTest.$(OBJEXT): \ common/messaging/$(am__dirstamp) \ common/messaging/$(DEPDIR)/$(am__dirstamp) common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.$(OBJEXT): \ common/messaging/$(am__dirstamp) \ common/messaging/$(DEPDIR)/$(am__dirstamp) common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.$(OBJEXT): \ common/messaging/$(am__dirstamp) \ common/messaging/$(DEPDIR)/$(am__dirstamp) common/messaging/DescriptorTester$(EXEEXT): $(common_messaging_DescriptorTester_OBJECTS) $(common_messaging_DescriptorTester_DEPENDENCIES) $(EXTRA_common_messaging_DescriptorTester_DEPENDENCIES) common/messaging/$(am__dirstamp) @rm -f common/messaging/DescriptorTester$(EXEEXT) $(AM_V_CXXLD)$(common_messaging_DescriptorTester_LINK) $(common_messaging_DescriptorTester_OBJECTS) $(common_messaging_DescriptorTester_LDADD) $(LIBS) common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.$(OBJEXT): \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/HealthCheckedConnectionTester$(EXEEXT): $(common_network_HealthCheckedConnectionTester_OBJECTS) $(common_network_HealthCheckedConnectionTester_DEPENDENCIES) $(EXTRA_common_network_HealthCheckedConnectionTester_DEPENDENCIES) common/network/$(am__dirstamp) @rm -f common/network/HealthCheckedConnectionTester$(EXEEXT) $(AM_V_CXXLD)$(common_network_HealthCheckedConnectionTester_LINK) $(common_network_HealthCheckedConnectionTester_OBJECTS) $(common_network_HealthCheckedConnectionTester_LDADD) $(LIBS) common/network/common_network_NetworkTester-IPV4AddressTest.$(OBJEXT): \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_network_NetworkTester-InterfacePickerTest.$(OBJEXT): \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_network_NetworkTester-InterfaceTest.$(OBJEXT): \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_network_NetworkTester-MACAddressTest.$(OBJEXT): \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_network_NetworkTester-NetworkUtilsTest.$(OBJEXT): \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_network_NetworkTester-SocketAddressTest.$(OBJEXT): \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_network_NetworkTester-SocketTest.$(OBJEXT): \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/NetworkTester$(EXEEXT): $(common_network_NetworkTester_OBJECTS) $(common_network_NetworkTester_DEPENDENCIES) $(EXTRA_common_network_NetworkTester_DEPENDENCIES) common/network/$(am__dirstamp) @rm -f common/network/NetworkTester$(EXEEXT) $(AM_V_CXXLD)$(common_network_NetworkTester_LINK) $(common_network_NetworkTester_OBJECTS) $(common_network_NetworkTester_LDADD) $(LIBS) common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.$(OBJEXT): \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/common_network_TCPConnectorTester-TCPConnectorTest.$(OBJEXT): \ common/network/$(am__dirstamp) \ common/network/$(DEPDIR)/$(am__dirstamp) common/network/TCPConnectorTester$(EXEEXT): $(common_network_TCPConnectorTester_OBJECTS) $(common_network_TCPConnectorTester_DEPENDENCIES) $(EXTRA_common_network_TCPConnectorTester_DEPENDENCIES) common/network/$(am__dirstamp) @rm -f common/network/TCPConnectorTester$(EXEEXT) $(AM_V_CXXLD)$(common_network_TCPConnectorTester_LINK) $(common_network_TCPConnectorTester_OBJECTS) $(common_network_TCPConnectorTester_LDADD) $(LIBS) common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/DiscoveryAgentTester$(EXEEXT): $(common_rdm_DiscoveryAgentTester_OBJECTS) $(common_rdm_DiscoveryAgentTester_DEPENDENCIES) $(EXTRA_common_rdm_DiscoveryAgentTester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/DiscoveryAgentTester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_DiscoveryAgentTester_LINK) $(common_rdm_DiscoveryAgentTester_OBJECTS) $(common_rdm_DiscoveryAgentTester_LDADD) $(LIBS) common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_rdm_PidStoreTester-PidStoreTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/PidStoreTester$(EXEEXT): $(common_rdm_PidStoreTester_OBJECTS) $(common_rdm_PidStoreTester_DEPENDENCIES) $(EXTRA_common_rdm_PidStoreTester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/PidStoreTester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_PidStoreTester_LINK) $(common_rdm_PidStoreTester_OBJECTS) $(common_rdm_PidStoreTester_LDADD) $(LIBS) common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/QueueingRDMControllerTester$(EXEEXT): $(common_rdm_QueueingRDMControllerTester_OBJECTS) $(common_rdm_QueueingRDMControllerTester_DEPENDENCIES) $(EXTRA_common_rdm_QueueingRDMControllerTester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/QueueingRDMControllerTester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_QueueingRDMControllerTester_LINK) $(common_rdm_QueueingRDMControllerTester_OBJECTS) $(common_rdm_QueueingRDMControllerTester_LDADD) $(LIBS) common/rdm/common_rdm_RDMAPITester-RDMAPITest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/RDMAPITester$(EXEEXT): $(common_rdm_RDMAPITester_OBJECTS) $(common_rdm_RDMAPITester_DEPENDENCIES) $(EXTRA_common_rdm_RDMAPITester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/RDMAPITester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_RDMAPITester_LINK) $(common_rdm_RDMAPITester_OBJECTS) $(common_rdm_RDMAPITester_LDADD) $(LIBS) common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/RDMCommandSerializerTester$(EXEEXT): $(common_rdm_RDMCommandSerializerTester_OBJECTS) $(common_rdm_RDMCommandSerializerTester_DEPENDENCIES) $(EXTRA_common_rdm_RDMCommandSerializerTester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/RDMCommandSerializerTester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_RDMCommandSerializerTester_LINK) $(common_rdm_RDMCommandSerializerTester_OBJECTS) $(common_rdm_RDMCommandSerializerTester_LDADD) $(LIBS) common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/RDMCommandTester$(EXEEXT): $(common_rdm_RDMCommandTester_OBJECTS) $(common_rdm_RDMCommandTester_DEPENDENCIES) $(EXTRA_common_rdm_RDMCommandTester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/RDMCommandTester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_RDMCommandTester_LINK) $(common_rdm_RDMCommandTester_OBJECTS) $(common_rdm_RDMCommandTester_LDADD) $(LIBS) common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/RDMFrameTester$(EXEEXT): $(common_rdm_RDMFrameTester_OBJECTS) $(common_rdm_RDMFrameTester_DEPENDENCIES) $(EXTRA_common_rdm_RDMFrameTester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/RDMFrameTester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_RDMFrameTester_LINK) $(common_rdm_RDMFrameTester_OBJECTS) $(common_rdm_RDMFrameTester_LDADD) $(LIBS) common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/RDMHelperTester$(EXEEXT): $(common_rdm_RDMHelperTester_OBJECTS) $(common_rdm_RDMHelperTester_DEPENDENCIES) $(EXTRA_common_rdm_RDMHelperTester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/RDMHelperTester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_RDMHelperTester_LINK) $(common_rdm_RDMHelperTester_OBJECTS) $(common_rdm_RDMHelperTester_LDADD) $(LIBS) common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/RDMMessageTester$(EXEEXT): $(common_rdm_RDMMessageTester_OBJECTS) $(common_rdm_RDMMessageTester_DEPENDENCIES) $(EXTRA_common_rdm_RDMMessageTester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/RDMMessageTester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_RDMMessageTester_LINK) $(common_rdm_RDMMessageTester_OBJECTS) $(common_rdm_RDMMessageTester_LDADD) $(LIBS) common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/RDMReplyTester$(EXEEXT): $(common_rdm_RDMReplyTester_OBJECTS) $(common_rdm_RDMReplyTester_DEPENDENCIES) $(EXTRA_common_rdm_RDMReplyTester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/RDMReplyTester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_RDMReplyTester_LINK) $(common_rdm_RDMReplyTester_OBJECTS) $(common_rdm_RDMReplyTester_LDADD) $(LIBS) common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/UIDAllocatorTester$(EXEEXT): $(common_rdm_UIDAllocatorTester_OBJECTS) $(common_rdm_UIDAllocatorTester_DEPENDENCIES) $(EXTRA_common_rdm_UIDAllocatorTester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/UIDAllocatorTester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_UIDAllocatorTester_LINK) $(common_rdm_UIDAllocatorTester_OBJECTS) $(common_rdm_UIDAllocatorTester_LDADD) $(LIBS) common/rdm/common_rdm_UIDTester-UIDTest.$(OBJEXT): \ common/rdm/$(am__dirstamp) \ common/rdm/$(DEPDIR)/$(am__dirstamp) common/rdm/UIDTester$(EXEEXT): $(common_rdm_UIDTester_OBJECTS) $(common_rdm_UIDTester_DEPENDENCIES) $(EXTRA_common_rdm_UIDTester_DEPENDENCIES) common/rdm/$(am__dirstamp) @rm -f common/rdm/UIDTester$(EXEEXT) $(AM_V_CXXLD)$(common_rdm_UIDTester_LINK) $(common_rdm_UIDTester_OBJECTS) $(common_rdm_UIDTester_LDADD) $(LIBS) common/rpc/common_rpc_RpcServerTester-RpcServerTest.$(OBJEXT): \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/common_rpc_RpcServerTester-TestService.$(OBJEXT): \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/common_rpc_RpcServerTester-TestService.pb.$(OBJEXT): \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.$(OBJEXT): \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/RpcServerTester$(EXEEXT): $(common_rpc_RpcServerTester_OBJECTS) $(common_rpc_RpcServerTester_DEPENDENCIES) $(EXTRA_common_rpc_RpcServerTester_DEPENDENCIES) common/rpc/$(am__dirstamp) @rm -f common/rpc/RpcServerTester$(EXEEXT) $(AM_V_CXXLD)$(common_rpc_RpcServerTester_LINK) $(common_rpc_RpcServerTester_OBJECTS) $(common_rpc_RpcServerTester_LDADD) $(LIBS) common/rpc/common_rpc_RpcTester-RpcControllerTest.$(OBJEXT): \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/common_rpc_RpcTester-RpcChannelTest.$(OBJEXT): \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/common_rpc_RpcTester-RpcHeaderTest.$(OBJEXT): \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/common_rpc_RpcTester-TestService.$(OBJEXT): \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/common_rpc_RpcTester-TestService.pb.$(OBJEXT): \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/common_rpc_RpcTester-TestServiceService.pb.$(OBJEXT): \ common/rpc/$(am__dirstamp) \ common/rpc/$(DEPDIR)/$(am__dirstamp) common/rpc/RpcTester$(EXEEXT): $(common_rpc_RpcTester_OBJECTS) $(common_rpc_RpcTester_DEPENDENCIES) $(EXTRA_common_rpc_RpcTester_DEPENDENCIES) common/rpc/$(am__dirstamp) @rm -f common/rpc/RpcTester$(EXEEXT) $(AM_V_CXXLD)$(common_rpc_RpcTester_LINK) $(common_rpc_RpcTester_OBJECTS) $(common_rpc_RpcTester_LDADD) $(LIBS) common/strings/common_strings_UtilsTester-UtilsTest.$(OBJEXT): \ common/strings/$(am__dirstamp) \ common/strings/$(DEPDIR)/$(am__dirstamp) common/strings/UtilsTester$(EXEEXT): $(common_strings_UtilsTester_OBJECTS) $(common_strings_UtilsTester_DEPENDENCIES) $(EXTRA_common_strings_UtilsTester_DEPENDENCIES) common/strings/$(am__dirstamp) @rm -f common/strings/UtilsTester$(EXEEXT) $(AM_V_CXXLD)$(common_strings_UtilsTester_LINK) $(common_strings_UtilsTester_OBJECTS) $(common_strings_UtilsTester_LDADD) $(LIBS) common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.$(OBJEXT): \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/ExecutorThreadTester$(EXEEXT): $(common_thread_ExecutorThreadTester_OBJECTS) $(common_thread_ExecutorThreadTester_DEPENDENCIES) $(EXTRA_common_thread_ExecutorThreadTester_DEPENDENCIES) common/thread/$(am__dirstamp) @rm -f common/thread/ExecutorThreadTester$(EXEEXT) $(AM_V_CXXLD)$(common_thread_ExecutorThreadTester_LINK) $(common_thread_ExecutorThreadTester_OBJECTS) $(common_thread_ExecutorThreadTester_LDADD) $(LIBS) common/thread/common_thread_FutureTester-FutureTest.$(OBJEXT): \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/FutureTester$(EXEEXT): $(common_thread_FutureTester_OBJECTS) $(common_thread_FutureTester_DEPENDENCIES) $(EXTRA_common_thread_FutureTester_DEPENDENCIES) common/thread/$(am__dirstamp) @rm -f common/thread/FutureTester$(EXEEXT) $(AM_V_CXXLD)$(common_thread_FutureTester_LINK) $(common_thread_FutureTester_OBJECTS) $(common_thread_FutureTester_LDADD) $(LIBS) common/thread/common_thread_ThreadTester-ThreadPoolTest.$(OBJEXT): \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/common_thread_ThreadTester-ThreadTest.$(OBJEXT): \ common/thread/$(am__dirstamp) \ common/thread/$(DEPDIR)/$(am__dirstamp) common/thread/ThreadTester$(EXEEXT): $(common_thread_ThreadTester_OBJECTS) $(common_thread_ThreadTester_DEPENDENCIES) $(EXTRA_common_thread_ThreadTester_DEPENDENCIES) common/thread/$(am__dirstamp) @rm -f common/thread/ThreadTester$(EXEEXT) $(AM_V_CXXLD)$(common_thread_ThreadTester_LINK) $(common_thread_ThreadTester_OBJECTS) $(common_thread_ThreadTester_LDADD) $(LIBS) common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.$(OBJEXT): \ common/timecode/$(am__dirstamp) \ common/timecode/$(DEPDIR)/$(am__dirstamp) common/timecode/TimeCodeTester$(EXEEXT): $(common_timecode_TimeCodeTester_OBJECTS) $(common_timecode_TimeCodeTester_DEPENDENCIES) $(EXTRA_common_timecode_TimeCodeTester_DEPENDENCIES) common/timecode/$(am__dirstamp) @rm -f common/timecode/TimeCodeTester$(EXEEXT) $(AM_V_CXXLD)$(common_timecode_TimeCodeTester_LINK) $(common_timecode_TimeCodeTester_OBJECTS) $(common_timecode_TimeCodeTester_LDADD) $(LIBS) common/utils/common_utils_UtilsTester-ActionQueueTest.$(OBJEXT): \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_utils_UtilsTester-BackoffTest.$(OBJEXT): \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_utils_UtilsTester-CallbackTest.$(OBJEXT): \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_utils_UtilsTester-ClockTest.$(OBJEXT): \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_utils_UtilsTester-DmxBufferTest.$(OBJEXT): \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_utils_UtilsTester-MultiCallbackTest.$(OBJEXT): \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_utils_UtilsTester-StringUtilsTest.$(OBJEXT): \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_utils_UtilsTester-TokenBucketTest.$(OBJEXT): \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_utils_UtilsTester-UtilsTest.$(OBJEXT): \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/common_utils_UtilsTester-WatchdogTest.$(OBJEXT): \ common/utils/$(am__dirstamp) \ common/utils/$(DEPDIR)/$(am__dirstamp) common/utils/UtilsTester$(EXEEXT): $(common_utils_UtilsTester_OBJECTS) $(common_utils_UtilsTester_DEPENDENCIES) $(EXTRA_common_utils_UtilsTester_DEPENDENCIES) common/utils/$(am__dirstamp) @rm -f common/utils/UtilsTester$(EXEEXT) $(AM_V_CXXLD)$(common_utils_UtilsTester_LINK) $(common_utils_UtilsTester_OBJECTS) $(common_utils_UtilsTester_LDADD) $(LIBS) common/web/common_web_JsonTester-JsonTest.$(OBJEXT): \ common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/JsonTester$(EXEEXT): $(common_web_JsonTester_OBJECTS) $(common_web_JsonTester_DEPENDENCIES) $(EXTRA_common_web_JsonTester_DEPENDENCIES) common/web/$(am__dirstamp) @rm -f common/web/JsonTester$(EXEEXT) $(AM_V_CXXLD)$(common_web_JsonTester_LINK) $(common_web_JsonTester_OBJECTS) $(common_web_JsonTester_LDADD) $(LIBS) common/web/common_web_ParserTester-ParserTest.$(OBJEXT): \ common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/ParserTester$(EXEEXT): $(common_web_ParserTester_OBJECTS) $(common_web_ParserTester_DEPENDENCIES) $(EXTRA_common_web_ParserTester_DEPENDENCIES) common/web/$(am__dirstamp) @rm -f common/web/ParserTester$(EXEEXT) $(AM_V_CXXLD)$(common_web_ParserTester_LINK) $(common_web_ParserTester_OBJECTS) $(common_web_ParserTester_LDADD) $(LIBS) common/web/common_web_PointerTester-PointerTest.$(OBJEXT): \ common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/PointerTester$(EXEEXT): $(common_web_PointerTester_OBJECTS) $(common_web_PointerTester_DEPENDENCIES) $(EXTRA_common_web_PointerTester_DEPENDENCIES) common/web/$(am__dirstamp) @rm -f common/web/PointerTester$(EXEEXT) $(AM_V_CXXLD)$(common_web_PointerTester_LINK) $(common_web_PointerTester_OBJECTS) $(common_web_PointerTester_LDADD) $(LIBS) common/web/common_web_PointerTrackerTester-PointerTrackerTest.$(OBJEXT): \ common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/PointerTrackerTester$(EXEEXT): $(common_web_PointerTrackerTester_OBJECTS) $(common_web_PointerTrackerTester_DEPENDENCIES) $(EXTRA_common_web_PointerTrackerTester_DEPENDENCIES) common/web/$(am__dirstamp) @rm -f common/web/PointerTrackerTester$(EXEEXT) $(AM_V_CXXLD)$(common_web_PointerTrackerTester_LINK) $(common_web_PointerTrackerTester_OBJECTS) $(common_web_PointerTrackerTester_LDADD) $(LIBS) common/web/common_web_PtchParserTester-PatchParserTest.$(OBJEXT): \ common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/PtchParserTester$(EXEEXT): $(common_web_PtchParserTester_OBJECTS) $(common_web_PtchParserTester_DEPENDENCIES) $(EXTRA_common_web_PtchParserTester_DEPENDENCIES) common/web/$(am__dirstamp) @rm -f common/web/PtchParserTester$(EXEEXT) $(AM_V_CXXLD)$(common_web_PtchParserTester_LINK) $(common_web_PtchParserTester_OBJECTS) $(common_web_PtchParserTester_LDADD) $(LIBS) common/web/common_web_PtchTester-PatchTest.$(OBJEXT): \ common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/PtchTester$(EXEEXT): $(common_web_PtchTester_OBJECTS) $(common_web_PtchTester_DEPENDENCIES) $(EXTRA_common_web_PtchTester_DEPENDENCIES) common/web/$(am__dirstamp) @rm -f common/web/PtchTester$(EXEEXT) $(AM_V_CXXLD)$(common_web_PtchTester_LINK) $(common_web_PtchTester_OBJECTS) $(common_web_PtchTester_LDADD) $(LIBS) common/web/common_web_SchemaParserTester-SchemaParserTest.$(OBJEXT): \ common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/SchemaParserTester$(EXEEXT): $(common_web_SchemaParserTester_OBJECTS) $(common_web_SchemaParserTester_DEPENDENCIES) $(EXTRA_common_web_SchemaParserTester_DEPENDENCIES) common/web/$(am__dirstamp) @rm -f common/web/SchemaParserTester$(EXEEXT) $(AM_V_CXXLD)$(common_web_SchemaParserTester_LINK) $(common_web_SchemaParserTester_OBJECTS) $(common_web_SchemaParserTester_LDADD) $(LIBS) common/web/common_web_SchemaTester-SchemaTest.$(OBJEXT): \ common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/SchemaTester$(EXEEXT): $(common_web_SchemaTester_OBJECTS) $(common_web_SchemaTester_DEPENDENCIES) $(EXTRA_common_web_SchemaTester_DEPENDENCIES) common/web/$(am__dirstamp) @rm -f common/web/SchemaTester$(EXEEXT) $(AM_V_CXXLD)$(common_web_SchemaTester_LINK) $(common_web_SchemaTester_OBJECTS) $(common_web_SchemaTester_LDADD) $(LIBS) common/web/common_web_SectionsTester-SectionsTest.$(OBJEXT): \ common/web/$(am__dirstamp) \ common/web/$(DEPDIR)/$(am__dirstamp) common/web/SectionsTester$(EXEEXT): $(common_web_SectionsTester_OBJECTS) $(common_web_SectionsTester_DEPENDENCIES) $(EXTRA_common_web_SectionsTester_DEPENDENCIES) common/web/$(am__dirstamp) @rm -f common/web/SectionsTester$(EXEEXT) $(AM_V_CXXLD)$(common_web_SectionsTester_LINK) $(common_web_SectionsTester_OBJECTS) $(common_web_SectionsTester_LDADD) $(LIBS) data/rdm/$(am__dirstamp): @$(MKDIR_P) data/rdm @: > data/rdm/$(am__dirstamp) data/rdm/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) data/rdm/$(DEPDIR) @: > data/rdm/$(DEPDIR)/$(am__dirstamp) data/rdm/data_rdm_PidDataTester-PidDataTest.$(OBJEXT): \ data/rdm/$(am__dirstamp) data/rdm/$(DEPDIR)/$(am__dirstamp) data/rdm/PidDataTester$(EXEEXT): $(data_rdm_PidDataTester_OBJECTS) $(data_rdm_PidDataTester_DEPENDENCIES) $(EXTRA_data_rdm_PidDataTester_DEPENDENCIES) data/rdm/$(am__dirstamp) @rm -f data/rdm/PidDataTester$(EXEEXT) $(AM_V_CXXLD)$(data_rdm_PidDataTester_LINK) $(data_rdm_PidDataTester_OBJECTS) $(data_rdm_PidDataTester_LDADD) $(LIBS) doxygen/examples/$(am__dirstamp): @$(MKDIR_P) doxygen/examples @: > doxygen/examples/$(am__dirstamp) doxygen/examples/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) doxygen/examples/$(DEPDIR) @: > doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/callback_client_transmit.$(OBJEXT): \ doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/callback_client_transmit$(EXEEXT): $(doxygen_examples_callback_client_transmit_OBJECTS) $(doxygen_examples_callback_client_transmit_DEPENDENCIES) $(EXTRA_doxygen_examples_callback_client_transmit_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/callback_client_transmit$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_callback_client_transmit_OBJECTS) $(doxygen_examples_callback_client_transmit_LDADD) $(LIBS) doxygen/examples/client_disconnect.$(OBJEXT): \ doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/client_disconnect$(EXEEXT): $(doxygen_examples_client_disconnect_OBJECTS) $(doxygen_examples_client_disconnect_DEPENDENCIES) $(EXTRA_doxygen_examples_client_disconnect_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/client_disconnect$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_client_disconnect_OBJECTS) $(doxygen_examples_client_disconnect_LDADD) $(LIBS) doxygen/examples/client_thread.$(OBJEXT): \ doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/client_thread$(EXEEXT): $(doxygen_examples_client_thread_OBJECTS) $(doxygen_examples_client_thread_DEPENDENCIES) $(EXTRA_doxygen_examples_client_thread_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/client_thread$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_client_thread_OBJECTS) $(doxygen_examples_client_thread_LDADD) $(LIBS) doxygen/examples/fetch_plugins.$(OBJEXT): \ doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/fetch_plugins$(EXEEXT): $(doxygen_examples_fetch_plugins_OBJECTS) $(doxygen_examples_fetch_plugins_DEPENDENCIES) $(EXTRA_doxygen_examples_fetch_plugins_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/fetch_plugins$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_fetch_plugins_OBJECTS) $(doxygen_examples_fetch_plugins_LDADD) $(LIBS) doxygen/examples/flags.$(OBJEXT): doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/flags$(EXEEXT): $(doxygen_examples_flags_OBJECTS) $(doxygen_examples_flags_DEPENDENCIES) $(EXTRA_doxygen_examples_flags_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/flags$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_flags_OBJECTS) $(doxygen_examples_flags_LDADD) $(LIBS) doxygen/examples/legacy_callback_client_transmit.$(OBJEXT): \ doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/legacy_callback_client_transmit$(EXEEXT): $(doxygen_examples_legacy_callback_client_transmit_OBJECTS) $(doxygen_examples_legacy_callback_client_transmit_DEPENDENCIES) $(EXTRA_doxygen_examples_legacy_callback_client_transmit_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/legacy_callback_client_transmit$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_legacy_callback_client_transmit_OBJECTS) $(doxygen_examples_legacy_callback_client_transmit_LDADD) $(LIBS) doxygen/examples/legacy_receiver.$(OBJEXT): \ doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/legacy_receiver$(EXEEXT): $(doxygen_examples_legacy_receiver_OBJECTS) $(doxygen_examples_legacy_receiver_DEPENDENCIES) $(EXTRA_doxygen_examples_legacy_receiver_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/legacy_receiver$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_legacy_receiver_OBJECTS) $(doxygen_examples_legacy_receiver_LDADD) $(LIBS) doxygen/examples/legacy_streaming_client.$(OBJEXT): \ doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/legacy_streaming_client$(EXEEXT): $(doxygen_examples_legacy_streaming_client_OBJECTS) $(doxygen_examples_legacy_streaming_client_DEPENDENCIES) $(EXTRA_doxygen_examples_legacy_streaming_client_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/legacy_streaming_client$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_legacy_streaming_client_OBJECTS) $(doxygen_examples_legacy_streaming_client_LDADD) $(LIBS) doxygen/examples/receiver.$(OBJEXT): doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/receiver$(EXEEXT): $(doxygen_examples_receiver_OBJECTS) $(doxygen_examples_receiver_DEPENDENCIES) $(EXTRA_doxygen_examples_receiver_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/receiver$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_receiver_OBJECTS) $(doxygen_examples_receiver_LDADD) $(LIBS) doxygen/examples/stdin_handler.$(OBJEXT): \ doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/stdin_handler$(EXEEXT): $(doxygen_examples_stdin_handler_OBJECTS) $(doxygen_examples_stdin_handler_DEPENDENCIES) $(EXTRA_doxygen_examples_stdin_handler_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/stdin_handler$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_stdin_handler_OBJECTS) $(doxygen_examples_stdin_handler_LDADD) $(LIBS) doxygen/examples/streaming_client.$(OBJEXT): \ doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/streaming_client$(EXEEXT): $(doxygen_examples_streaming_client_OBJECTS) $(doxygen_examples_streaming_client_DEPENDENCIES) $(EXTRA_doxygen_examples_streaming_client_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/streaming_client$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_streaming_client_OBJECTS) $(doxygen_examples_streaming_client_LDADD) $(LIBS) doxygen/examples/streaming_client_plugin.$(OBJEXT): \ doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/streaming_client_plugin$(EXEEXT): $(doxygen_examples_streaming_client_plugin_OBJECTS) $(doxygen_examples_streaming_client_plugin_DEPENDENCIES) $(EXTRA_doxygen_examples_streaming_client_plugin_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/streaming_client_plugin$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_streaming_client_plugin_OBJECTS) $(doxygen_examples_streaming_client_plugin_LDADD) $(LIBS) doxygen/examples/udp_server.$(OBJEXT): \ doxygen/examples/$(am__dirstamp) \ doxygen/examples/$(DEPDIR)/$(am__dirstamp) doxygen/examples/udp_server$(EXEEXT): $(doxygen_examples_udp_server_OBJECTS) $(doxygen_examples_udp_server_DEPENDENCIES) $(EXTRA_doxygen_examples_udp_server_DEPENDENCIES) doxygen/examples/$(am__dirstamp) @rm -f doxygen/examples/udp_server$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(doxygen_examples_udp_server_OBJECTS) $(doxygen_examples_udp_server_LDADD) $(LIBS) examples/examples_ola_artnet-ola-artnet.$(OBJEXT): \ examples/$(am__dirstamp) examples/$(DEPDIR)/$(am__dirstamp) examples/ola_artnet$(EXEEXT): $(examples_ola_artnet_OBJECTS) $(examples_ola_artnet_DEPENDENCIES) $(EXTRA_examples_ola_artnet_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_artnet$(EXEEXT) $(AM_V_CXXLD)$(examples_ola_artnet_LINK) $(examples_ola_artnet_OBJECTS) $(examples_ola_artnet_LDADD) $(LIBS) examples/ola-client.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ola_dev_info$(EXEEXT): $(examples_ola_dev_info_OBJECTS) $(examples_ola_dev_info_DEPENDENCIES) $(EXTRA_examples_ola_dev_info_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_dev_info$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(examples_ola_dev_info_OBJECTS) $(examples_ola_dev_info_LDADD) $(LIBS) examples/ola-dmxconsole.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ola_dmxconsole$(EXEEXT): $(examples_ola_dmxconsole_OBJECTS) $(examples_ola_dmxconsole_DEPENDENCIES) $(EXTRA_examples_ola_dmxconsole_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_dmxconsole$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(examples_ola_dmxconsole_OBJECTS) $(examples_ola_dmxconsole_LDADD) $(LIBS) examples/ola-dmxmonitor.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ola_dmxmonitor$(EXEEXT): $(examples_ola_dmxmonitor_OBJECTS) $(examples_ola_dmxmonitor_DEPENDENCIES) $(EXTRA_examples_ola_dmxmonitor_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_dmxmonitor$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(examples_ola_dmxmonitor_OBJECTS) $(examples_ola_dmxmonitor_LDADD) $(LIBS) examples/examples_ola_e131-ola-e131.$(OBJEXT): \ examples/$(am__dirstamp) examples/$(DEPDIR)/$(am__dirstamp) examples/ola_e131$(EXEEXT): $(examples_ola_e131_OBJECTS) $(examples_ola_e131_DEPENDENCIES) $(EXTRA_examples_ola_e131_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_e131$(EXEEXT) $(AM_V_CXXLD)$(examples_ola_e131_LINK) $(examples_ola_e131_OBJECTS) $(examples_ola_e131_LDADD) $(LIBS) examples/ola-latency.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ola_latency$(EXEEXT): $(examples_ola_latency_OBJECTS) $(examples_ola_latency_DEPENDENCIES) $(EXTRA_examples_ola_latency_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_latency$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(examples_ola_latency_OBJECTS) $(examples_ola_latency_LDADD) $(LIBS) examples/ola-rdm-discover.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ola_rdm_discover$(EXEEXT): $(examples_ola_rdm_discover_OBJECTS) $(examples_ola_rdm_discover_DEPENDENCIES) $(EXTRA_examples_ola_rdm_discover_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_rdm_discover$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(examples_ola_rdm_discover_OBJECTS) $(examples_ola_rdm_discover_LDADD) $(LIBS) examples/ola-rdm.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ola_rdm_get$(EXEEXT): $(examples_ola_rdm_get_OBJECTS) $(examples_ola_rdm_get_DEPENDENCIES) $(EXTRA_examples_ola_rdm_get_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_rdm_get$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(examples_ola_rdm_get_OBJECTS) $(examples_ola_rdm_get_LDADD) $(LIBS) examples/ola-recorder.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ShowLoader.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ShowPlayer.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ShowRecorder.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ShowSaver.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ola_recorder$(EXEEXT): $(examples_ola_recorder_OBJECTS) $(examples_ola_recorder_DEPENDENCIES) $(EXTRA_examples_ola_recorder_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_recorder$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(examples_ola_recorder_OBJECTS) $(examples_ola_recorder_LDADD) $(LIBS) examples/ola-streaming-client.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ola_streaming_client$(EXEEXT): $(examples_ola_streaming_client_OBJECTS) $(examples_ola_streaming_client_DEPENDENCIES) $(EXTRA_examples_ola_streaming_client_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_streaming_client$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(examples_ola_streaming_client_OBJECTS) $(examples_ola_streaming_client_LDADD) $(LIBS) examples/ola-throughput.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ola_throughput$(EXEEXT): $(examples_ola_throughput_OBJECTS) $(examples_ola_throughput_DEPENDENCIES) $(EXTRA_examples_ola_throughput_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_throughput$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(examples_ola_throughput_OBJECTS) $(examples_ola_throughput_LDADD) $(LIBS) examples/ola-timecode.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ola_timecode$(EXEEXT): $(examples_ola_timecode_OBJECTS) $(examples_ola_timecode_DEPENDENCIES) $(EXTRA_examples_ola_timecode_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_timecode$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(examples_ola_timecode_OBJECTS) $(examples_ola_timecode_LDADD) $(LIBS) examples/ola-uni-stats.$(OBJEXT): examples/$(am__dirstamp) \ examples/$(DEPDIR)/$(am__dirstamp) examples/ola_uni_stats$(EXEEXT): $(examples_ola_uni_stats_OBJECTS) $(examples_ola_uni_stats_DEPENDENCIES) $(EXTRA_examples_ola_uni_stats_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_uni_stats$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(examples_ola_uni_stats_OBJECTS) $(examples_ola_uni_stats_LDADD) $(LIBS) examples/examples_ola_usbpro-ola-usbpro.$(OBJEXT): \ examples/$(am__dirstamp) examples/$(DEPDIR)/$(am__dirstamp) examples/ola_usbpro$(EXEEXT): $(examples_ola_usbpro_OBJECTS) $(examples_ola_usbpro_DEPENDENCIES) $(EXTRA_examples_ola_usbpro_DEPENDENCIES) examples/$(am__dirstamp) @rm -f examples/ola_usbpro$(EXEEXT) $(AM_V_CXXLD)$(examples_ola_usbpro_LINK) $(examples_ola_usbpro_OBJECTS) $(examples_ola_usbpro_LDADD) $(LIBS) libs/acn/libs_acn_E131Tester-BaseInflatorTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E131Tester-CIDTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E131Tester-DMPAddressTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E131Tester-DMPInflatorTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E131Tester-DMPPDUTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E131Tester-E131InflatorTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E131Tester-E131PDUTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E131Tester-HeaderSetTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E131Tester-PDUTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E131Tester-RootInflatorTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E131Tester-RootPDUTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E131Tester-RootSenderTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/E131Tester$(EXEEXT): $(libs_acn_E131Tester_OBJECTS) $(libs_acn_E131Tester_DEPENDENCIES) $(EXTRA_libs_acn_E131Tester_DEPENDENCIES) libs/acn/$(am__dirstamp) @rm -f libs/acn/E131Tester$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(libs_acn_E131Tester_OBJECTS) $(libs_acn_E131Tester_LDADD) $(LIBS) libs/acn/libs_acn_E133Tester-E133InflatorTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E133Tester-E133PDUTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_E133Tester-RDMPDUTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/E133Tester$(EXEEXT): $(libs_acn_E133Tester_OBJECTS) $(libs_acn_E133Tester_DEPENDENCIES) $(EXTRA_libs_acn_E133Tester_DEPENDENCIES) libs/acn/$(am__dirstamp) @rm -f libs/acn/E133Tester$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(libs_acn_E133Tester_OBJECTS) $(libs_acn_E133Tester_LDADD) $(LIBS) libs/acn/libs_acn_TransportTester-TCPTransportTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/libs_acn_TransportTester-UDPTransportTest.$(OBJEXT): \ libs/acn/$(am__dirstamp) libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/TransportTester$(EXEEXT): $(libs_acn_TransportTester_OBJECTS) $(libs_acn_TransportTester_DEPENDENCIES) $(EXTRA_libs_acn_TransportTester_DEPENDENCIES) libs/acn/$(am__dirstamp) @rm -f libs/acn/TransportTester$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(libs_acn_TransportTester_OBJECTS) $(libs_acn_TransportTester_LDADD) $(LIBS) libs/acn/e131_loadtest.$(OBJEXT): libs/acn/$(am__dirstamp) \ libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/e131_loadtest$(EXEEXT): $(libs_acn_e131_loadtest_OBJECTS) $(libs_acn_e131_loadtest_DEPENDENCIES) $(EXTRA_libs_acn_e131_loadtest_DEPENDENCIES) libs/acn/$(am__dirstamp) @rm -f libs/acn/e131_loadtest$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(libs_acn_e131_loadtest_OBJECTS) $(libs_acn_e131_loadtest_LDADD) $(LIBS) libs/acn/e131_transmit_test.$(OBJEXT): libs/acn/$(am__dirstamp) \ libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/E131TestFramework.$(OBJEXT): libs/acn/$(am__dirstamp) \ libs/acn/$(DEPDIR)/$(am__dirstamp) libs/acn/e131_transmit_test$(EXEEXT): $(libs_acn_e131_transmit_test_OBJECTS) $(libs_acn_e131_transmit_test_DEPENDENCIES) $(EXTRA_libs_acn_e131_transmit_test_DEPENDENCIES) libs/acn/$(am__dirstamp) @rm -f libs/acn/e131_transmit_test$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(libs_acn_e131_transmit_test_OBJECTS) $(libs_acn_e131_transmit_test_LDADD) $(LIBS) libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.$(OBJEXT): \ libs/usb/$(am__dirstamp) libs/usb/$(DEPDIR)/$(am__dirstamp) libs/usb/LibUsbThreadTester$(EXEEXT): $(libs_usb_LibUsbThreadTester_OBJECTS) $(libs_usb_LibUsbThreadTester_DEPENDENCIES) $(EXTRA_libs_usb_LibUsbThreadTester_DEPENDENCIES) libs/usb/$(am__dirstamp) @rm -f libs/usb/LibUsbThreadTester$(EXEEXT) $(AM_V_CXXLD)$(libs_usb_LibUsbThreadTester_LINK) $(libs_usb_LibUsbThreadTester_OBJECTS) $(libs_usb_LibUsbThreadTester_LDADD) $(LIBS) ola/ola_OlaClientTester-OlaClientWrapperTest.$(OBJEXT): \ ola/$(am__dirstamp) ola/$(DEPDIR)/$(am__dirstamp) ola/ola_OlaClientTester-StreamingClientTest.$(OBJEXT): \ ola/$(am__dirstamp) ola/$(DEPDIR)/$(am__dirstamp) ola/OlaClientTester$(EXEEXT): $(ola_OlaClientTester_OBJECTS) $(ola_OlaClientTester_DEPENDENCIES) $(EXTRA_ola_OlaClientTester_DEPENDENCIES) ola/$(am__dirstamp) @rm -f ola/OlaClientTester$(EXEEXT) $(AM_V_CXXLD)$(ola_OlaClientTester_LINK) $(ola_OlaClientTester_OBJECTS) $(ola_OlaClientTester_LDADD) $(LIBS) olad/olad_OlaTester-PluginManagerTest.$(OBJEXT): olad/$(am__dirstamp) \ olad/$(DEPDIR)/$(am__dirstamp) olad/olad_OlaTester-OlaServerServiceImplTest.$(OBJEXT): \ olad/$(am__dirstamp) olad/$(DEPDIR)/$(am__dirstamp) olad/OlaTester$(EXEEXT): $(olad_OlaTester_OBJECTS) $(olad_OlaTester_DEPENDENCIES) $(EXTRA_olad_OlaTester_DEPENDENCIES) olad/$(am__dirstamp) @rm -f olad/OlaTester$(EXEEXT) $(AM_V_CXXLD)$(olad_OlaTester_LINK) $(olad_OlaTester_OBJECTS) $(olad_OlaTester_LDADD) $(LIBS) olad/Olad.$(OBJEXT): olad/$(am__dirstamp) \ olad/$(DEPDIR)/$(am__dirstamp) olad/olad$(EXEEXT): $(olad_olad_OBJECTS) $(olad_olad_DEPENDENCIES) $(EXTRA_olad_olad_DEPENDENCIES) olad/$(am__dirstamp) @rm -f olad/olad$(EXEEXT) $(AM_V_CXXLD)$(olad_olad_LINK) $(olad_olad_OBJECTS) $(olad_olad_LDADD) $(LIBS) olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.$(OBJEXT): \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/ClientTester$(EXEEXT): $(olad_plugin_api_ClientTester_OBJECTS) $(olad_plugin_api_ClientTester_DEPENDENCIES) $(EXTRA_olad_plugin_api_ClientTester_DEPENDENCIES) olad/plugin_api/$(am__dirstamp) @rm -f olad/plugin_api/ClientTester$(EXEEXT) $(AM_V_CXXLD)$(olad_plugin_api_ClientTester_LINK) $(olad_plugin_api_ClientTester_OBJECTS) $(olad_plugin_api_ClientTester_LDADD) $(LIBS) olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.$(OBJEXT): \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.$(OBJEXT): \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/DeviceTester$(EXEEXT): $(olad_plugin_api_DeviceTester_OBJECTS) $(olad_plugin_api_DeviceTester_DEPENDENCIES) $(EXTRA_olad_plugin_api_DeviceTester_DEPENDENCIES) olad/plugin_api/$(am__dirstamp) @rm -f olad/plugin_api/DeviceTester$(EXEEXT) $(AM_V_CXXLD)$(olad_plugin_api_DeviceTester_LINK) $(olad_plugin_api_DeviceTester_OBJECTS) $(olad_plugin_api_DeviceTester_LDADD) $(LIBS) olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.$(OBJEXT): \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/DmxSourceTester$(EXEEXT): $(olad_plugin_api_DmxSourceTester_OBJECTS) $(olad_plugin_api_DmxSourceTester_DEPENDENCIES) $(EXTRA_olad_plugin_api_DmxSourceTester_DEPENDENCIES) olad/plugin_api/$(am__dirstamp) @rm -f olad/plugin_api/DmxSourceTester$(EXEEXT) $(AM_V_CXXLD)$(olad_plugin_api_DmxSourceTester_LINK) $(olad_plugin_api_DmxSourceTester_OBJECTS) $(olad_plugin_api_DmxSourceTester_LDADD) $(LIBS) olad/plugin_api/olad_plugin_api_PortTester-PortTest.$(OBJEXT): \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.$(OBJEXT): \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/PortTester$(EXEEXT): $(olad_plugin_api_PortTester_OBJECTS) $(olad_plugin_api_PortTester_DEPENDENCIES) $(EXTRA_olad_plugin_api_PortTester_DEPENDENCIES) olad/plugin_api/$(am__dirstamp) @rm -f olad/plugin_api/PortTester$(EXEEXT) $(AM_V_CXXLD)$(olad_plugin_api_PortTester_LINK) $(olad_plugin_api_PortTester_OBJECTS) $(olad_plugin_api_PortTester_LDADD) $(LIBS) olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.$(OBJEXT): \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/PreferencesTester$(EXEEXT): $(olad_plugin_api_PreferencesTester_OBJECTS) $(olad_plugin_api_PreferencesTester_DEPENDENCIES) $(EXTRA_olad_plugin_api_PreferencesTester_DEPENDENCIES) olad/plugin_api/$(am__dirstamp) @rm -f olad/plugin_api/PreferencesTester$(EXEEXT) $(AM_V_CXXLD)$(olad_plugin_api_PreferencesTester_LINK) $(olad_plugin_api_PreferencesTester_OBJECTS) $(olad_plugin_api_PreferencesTester_LDADD) $(LIBS) olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.$(OBJEXT): \ olad/plugin_api/$(am__dirstamp) \ olad/plugin_api/$(DEPDIR)/$(am__dirstamp) olad/plugin_api/UniverseTester$(EXEEXT): $(olad_plugin_api_UniverseTester_OBJECTS) $(olad_plugin_api_UniverseTester_DEPENDENCIES) $(EXTRA_olad_plugin_api_UniverseTester_DEPENDENCIES) olad/plugin_api/$(am__dirstamp) @rm -f olad/plugin_api/UniverseTester$(EXEEXT) $(AM_V_CXXLD)$(olad_plugin_api_UniverseTester_LINK) $(olad_plugin_api_UniverseTester_OBJECTS) $(olad_plugin_api_UniverseTester_LDADD) $(LIBS) plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.$(OBJEXT): \ plugins/artnet/$(am__dirstamp) \ plugins/artnet/$(DEPDIR)/$(am__dirstamp) plugins/artnet/ArtNetTester$(EXEEXT): $(plugins_artnet_ArtNetTester_OBJECTS) $(plugins_artnet_ArtNetTester_DEPENDENCIES) $(EXTRA_plugins_artnet_ArtNetTester_DEPENDENCIES) plugins/artnet/$(am__dirstamp) @rm -f plugins/artnet/ArtNetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_artnet_ArtNetTester_LINK) $(plugins_artnet_ArtNetTester_OBJECTS) $(plugins_artnet_ArtNetTester_LDADD) $(LIBS) plugins/artnet/artnet_loadtest.$(OBJEXT): \ plugins/artnet/$(am__dirstamp) \ plugins/artnet/$(DEPDIR)/$(am__dirstamp) plugins/artnet/artnet_loadtest$(EXEEXT): $(plugins_artnet_artnet_loadtest_OBJECTS) $(plugins_artnet_artnet_loadtest_DEPENDENCIES) $(EXTRA_plugins_artnet_artnet_loadtest_DEPENDENCIES) plugins/artnet/$(am__dirstamp) @rm -f plugins/artnet/artnet_loadtest$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(plugins_artnet_artnet_loadtest_OBJECTS) $(plugins_artnet_artnet_loadtest_LDADD) $(LIBS) plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.$(OBJEXT): \ plugins/dummy/$(am__dirstamp) \ plugins/dummy/$(DEPDIR)/$(am__dirstamp) plugins/dummy/DummyPluginTester$(EXEEXT): $(plugins_dummy_DummyPluginTester_OBJECTS) $(plugins_dummy_DummyPluginTester_DEPENDENCIES) $(EXTRA_plugins_dummy_DummyPluginTester_DEPENDENCIES) plugins/dummy/$(am__dirstamp) @rm -f plugins/dummy/DummyPluginTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_dummy_DummyPluginTester_LINK) $(plugins_dummy_DummyPluginTester_OBJECTS) $(plugins_dummy_DummyPluginTester_LDADD) $(LIBS) plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.$(OBJEXT): \ plugins/espnet/$(am__dirstamp) \ plugins/espnet/$(DEPDIR)/$(am__dirstamp) plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.$(OBJEXT): \ plugins/espnet/$(am__dirstamp) \ plugins/espnet/$(DEPDIR)/$(am__dirstamp) plugins/espnet/EspNetTester$(EXEEXT): $(plugins_espnet_EspNetTester_OBJECTS) $(plugins_espnet_EspNetTester_DEPENDENCIES) $(EXTRA_plugins_espnet_EspNetTester_DEPENDENCIES) plugins/espnet/$(am__dirstamp) @rm -f plugins/espnet/EspNetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_espnet_EspNetTester_LINK) $(plugins_espnet_EspNetTester_OBJECTS) $(plugins_espnet_EspNetTester_LDADD) $(LIBS) plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.$(OBJEXT): \ plugins/kinet/$(am__dirstamp) \ plugins/kinet/$(DEPDIR)/$(am__dirstamp) plugins/kinet/KiNetTester$(EXEEXT): $(plugins_kinet_KiNetTester_OBJECTS) $(plugins_kinet_KiNetTester_DEPENDENCIES) $(EXTRA_plugins_kinet_KiNetTester_DEPENDENCIES) plugins/kinet/$(am__dirstamp) @rm -f plugins/kinet/KiNetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_kinet_KiNetTester_LINK) $(plugins_kinet_KiNetTester_OBJECTS) $(plugins_kinet_KiNetTester_LDADD) $(LIBS) plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.$(OBJEXT): \ plugins/openpixelcontrol/$(am__dirstamp) \ plugins/openpixelcontrol/$(DEPDIR)/$(am__dirstamp) plugins/openpixelcontrol/OPCClientTester$(EXEEXT): $(plugins_openpixelcontrol_OPCClientTester_OBJECTS) $(plugins_openpixelcontrol_OPCClientTester_DEPENDENCIES) $(EXTRA_plugins_openpixelcontrol_OPCClientTester_DEPENDENCIES) plugins/openpixelcontrol/$(am__dirstamp) @rm -f plugins/openpixelcontrol/OPCClientTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_openpixelcontrol_OPCClientTester_LINK) $(plugins_openpixelcontrol_OPCClientTester_OBJECTS) $(plugins_openpixelcontrol_OPCClientTester_LDADD) $(LIBS) plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.$(OBJEXT): \ plugins/openpixelcontrol/$(am__dirstamp) \ plugins/openpixelcontrol/$(DEPDIR)/$(am__dirstamp) plugins/openpixelcontrol/OPCServerTester$(EXEEXT): $(plugins_openpixelcontrol_OPCServerTester_OBJECTS) $(plugins_openpixelcontrol_OPCServerTester_DEPENDENCIES) $(EXTRA_plugins_openpixelcontrol_OPCServerTester_DEPENDENCIES) plugins/openpixelcontrol/$(am__dirstamp) @rm -f plugins/openpixelcontrol/OPCServerTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_openpixelcontrol_OPCServerTester_LINK) $(plugins_openpixelcontrol_OPCServerTester_OBJECTS) $(plugins_openpixelcontrol_OPCServerTester_LDADD) $(LIBS) plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.$(OBJEXT): \ plugins/osc/$(am__dirstamp) \ plugins/osc/$(DEPDIR)/$(am__dirstamp) plugins/osc/plugins_osc_OSCTester-OSCNodeTest.$(OBJEXT): \ plugins/osc/$(am__dirstamp) \ plugins/osc/$(DEPDIR)/$(am__dirstamp) plugins/osc/OSCTester$(EXEEXT): $(plugins_osc_OSCTester_OBJECTS) $(plugins_osc_OSCTester_DEPENDENCIES) $(EXTRA_plugins_osc_OSCTester_DEPENDENCIES) plugins/osc/$(am__dirstamp) @rm -f plugins/osc/OSCTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_osc_OSCTester_LINK) $(plugins_osc_OSCTester_OBJECTS) $(plugins_osc_OSCTester_LDADD) $(LIBS) plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.$(OBJEXT): \ plugins/shownet/$(am__dirstamp) \ plugins/shownet/$(DEPDIR)/$(am__dirstamp) plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.$(OBJEXT): \ plugins/shownet/$(am__dirstamp) \ plugins/shownet/$(DEPDIR)/$(am__dirstamp) plugins/shownet/ShowNetTester$(EXEEXT): $(plugins_shownet_ShowNetTester_OBJECTS) $(plugins_shownet_ShowNetTester_DEPENDENCIES) $(EXTRA_plugins_shownet_ShowNetTester_DEPENDENCIES) plugins/shownet/$(am__dirstamp) @rm -f plugins/shownet/ShowNetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_shownet_ShowNetTester_LINK) $(plugins_shownet_ShowNetTester_OBJECTS) $(plugins_shownet_ShowNetTester_LDADD) $(LIBS) plugins/spi/plugins_spi_SPITester-SPIBackendTest.$(OBJEXT): \ plugins/spi/$(am__dirstamp) \ plugins/spi/$(DEPDIR)/$(am__dirstamp) plugins/spi/plugins_spi_SPITester-SPIOutputTest.$(OBJEXT): \ plugins/spi/$(am__dirstamp) \ plugins/spi/$(DEPDIR)/$(am__dirstamp) plugins/spi/plugins_spi_SPITester-FakeSPIWriter.$(OBJEXT): \ plugins/spi/$(am__dirstamp) \ plugins/spi/$(DEPDIR)/$(am__dirstamp) plugins/spi/SPITester$(EXEEXT): $(plugins_spi_SPITester_OBJECTS) $(plugins_spi_SPITester_DEPENDENCIES) $(EXTRA_plugins_spi_SPITester_DEPENDENCIES) plugins/spi/$(am__dirstamp) @rm -f plugins/spi/SPITester$(EXEEXT) $(AM_V_CXXLD)$(plugins_spi_SPITester_LINK) $(plugins_spi_SPITester_OBJECTS) $(plugins_spi_SPITester_LDADD) $(LIBS) plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/ArduinoWidgetTester$(EXEEXT): $(plugins_usbpro_ArduinoWidgetTester_OBJECTS) $(plugins_usbpro_ArduinoWidgetTester_DEPENDENCIES) $(EXTRA_plugins_usbpro_ArduinoWidgetTester_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) @rm -f plugins/usbpro/ArduinoWidgetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_usbpro_ArduinoWidgetTester_LINK) $(plugins_usbpro_ArduinoWidgetTester_OBJECTS) $(plugins_usbpro_ArduinoWidgetTester_LDADD) $(LIBS) plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/BaseRobeWidgetTester$(EXEEXT): $(plugins_usbpro_BaseRobeWidgetTester_OBJECTS) $(plugins_usbpro_BaseRobeWidgetTester_DEPENDENCIES) $(EXTRA_plugins_usbpro_BaseRobeWidgetTester_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) @rm -f plugins/usbpro/BaseRobeWidgetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_usbpro_BaseRobeWidgetTester_LINK) $(plugins_usbpro_BaseRobeWidgetTester_OBJECTS) $(plugins_usbpro_BaseRobeWidgetTester_LDADD) $(LIBS) plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/BaseUsbProWidgetTester$(EXEEXT): $(plugins_usbpro_BaseUsbProWidgetTester_OBJECTS) $(plugins_usbpro_BaseUsbProWidgetTester_DEPENDENCIES) $(EXTRA_plugins_usbpro_BaseUsbProWidgetTester_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) @rm -f plugins/usbpro/BaseUsbProWidgetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_usbpro_BaseUsbProWidgetTester_LINK) $(plugins_usbpro_BaseUsbProWidgetTester_OBJECTS) $(plugins_usbpro_BaseUsbProWidgetTester_LDADD) $(LIBS) plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/DmxTriWidgetTester$(EXEEXT): $(plugins_usbpro_DmxTriWidgetTester_OBJECTS) $(plugins_usbpro_DmxTriWidgetTester_DEPENDENCIES) $(EXTRA_plugins_usbpro_DmxTriWidgetTester_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) @rm -f plugins/usbpro/DmxTriWidgetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_usbpro_DmxTriWidgetTester_LINK) $(plugins_usbpro_DmxTriWidgetTester_OBJECTS) $(plugins_usbpro_DmxTriWidgetTester_LDADD) $(LIBS) plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/DmxterWidgetTester$(EXEEXT): $(plugins_usbpro_DmxterWidgetTester_OBJECTS) $(plugins_usbpro_DmxterWidgetTester_DEPENDENCIES) $(EXTRA_plugins_usbpro_DmxterWidgetTester_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) @rm -f plugins/usbpro/DmxterWidgetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_usbpro_DmxterWidgetTester_LINK) $(plugins_usbpro_DmxterWidgetTester_OBJECTS) $(plugins_usbpro_DmxterWidgetTester_LDADD) $(LIBS) plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/EnttecUsbProWidgetTester$(EXEEXT): $(plugins_usbpro_EnttecUsbProWidgetTester_OBJECTS) $(plugins_usbpro_EnttecUsbProWidgetTester_DEPENDENCIES) $(EXTRA_plugins_usbpro_EnttecUsbProWidgetTester_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) @rm -f plugins/usbpro/EnttecUsbProWidgetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_usbpro_EnttecUsbProWidgetTester_LINK) $(plugins_usbpro_EnttecUsbProWidgetTester_OBJECTS) $(plugins_usbpro_EnttecUsbProWidgetTester_LDADD) $(LIBS) plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/RobeWidgetDetectorTester$(EXEEXT): $(plugins_usbpro_RobeWidgetDetectorTester_OBJECTS) $(plugins_usbpro_RobeWidgetDetectorTester_DEPENDENCIES) $(EXTRA_plugins_usbpro_RobeWidgetDetectorTester_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) @rm -f plugins/usbpro/RobeWidgetDetectorTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_usbpro_RobeWidgetDetectorTester_LINK) $(plugins_usbpro_RobeWidgetDetectorTester_OBJECTS) $(plugins_usbpro_RobeWidgetDetectorTester_LDADD) $(LIBS) plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/RobeWidgetTester$(EXEEXT): $(plugins_usbpro_RobeWidgetTester_OBJECTS) $(plugins_usbpro_RobeWidgetTester_DEPENDENCIES) $(EXTRA_plugins_usbpro_RobeWidgetTester_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) @rm -f plugins/usbpro/RobeWidgetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_usbpro_RobeWidgetTester_LINK) $(plugins_usbpro_RobeWidgetTester_OBJECTS) $(plugins_usbpro_RobeWidgetTester_LDADD) $(LIBS) plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/UltraDMXProWidgetTester$(EXEEXT): $(plugins_usbpro_UltraDMXProWidgetTester_OBJECTS) $(plugins_usbpro_UltraDMXProWidgetTester_DEPENDENCIES) $(EXTRA_plugins_usbpro_UltraDMXProWidgetTester_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) @rm -f plugins/usbpro/UltraDMXProWidgetTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_usbpro_UltraDMXProWidgetTester_LINK) $(plugins_usbpro_UltraDMXProWidgetTester_OBJECTS) $(plugins_usbpro_UltraDMXProWidgetTester_LDADD) $(LIBS) plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/UsbProWidgetDetectorTester$(EXEEXT): $(plugins_usbpro_UsbProWidgetDetectorTester_OBJECTS) $(plugins_usbpro_UsbProWidgetDetectorTester_DEPENDENCIES) $(EXTRA_plugins_usbpro_UsbProWidgetDetectorTester_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) @rm -f plugins/usbpro/UsbProWidgetDetectorTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_usbpro_UsbProWidgetDetectorTester_LINK) $(plugins_usbpro_UsbProWidgetDetectorTester_OBJECTS) $(plugins_usbpro_UsbProWidgetDetectorTester_LDADD) $(LIBS) plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.$(OBJEXT): \ plugins/usbpro/$(am__dirstamp) \ plugins/usbpro/$(DEPDIR)/$(am__dirstamp) plugins/usbpro/WidgetDetectorThreadTester$(EXEEXT): $(plugins_usbpro_WidgetDetectorThreadTester_OBJECTS) $(plugins_usbpro_WidgetDetectorThreadTester_DEPENDENCIES) $(EXTRA_plugins_usbpro_WidgetDetectorThreadTester_DEPENDENCIES) plugins/usbpro/$(am__dirstamp) @rm -f plugins/usbpro/WidgetDetectorThreadTester$(EXEEXT) $(AM_V_CXXLD)$(plugins_usbpro_WidgetDetectorThreadTester_LINK) $(plugins_usbpro_WidgetDetectorThreadTester_OBJECTS) $(plugins_usbpro_WidgetDetectorThreadTester_LDADD) $(LIBS) protoc/$(am__dirstamp): @$(MKDIR_P) protoc @: > protoc/$(am__dirstamp) protoc/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) protoc/$(DEPDIR) @: > protoc/$(DEPDIR)/$(am__dirstamp) protoc/protoc_ola_protoc_plugin-CppFileGenerator.$(OBJEXT): \ protoc/$(am__dirstamp) protoc/$(DEPDIR)/$(am__dirstamp) protoc/protoc_ola_protoc_plugin-CppGenerator.$(OBJEXT): \ protoc/$(am__dirstamp) protoc/$(DEPDIR)/$(am__dirstamp) protoc/protoc_ola_protoc_plugin-GeneratorHelpers.$(OBJEXT): \ protoc/$(am__dirstamp) protoc/$(DEPDIR)/$(am__dirstamp) protoc/protoc_ola_protoc_plugin-ServiceGenerator.$(OBJEXT): \ protoc/$(am__dirstamp) protoc/$(DEPDIR)/$(am__dirstamp) protoc/protoc_ola_protoc_plugin-StrUtil.$(OBJEXT): \ protoc/$(am__dirstamp) protoc/$(DEPDIR)/$(am__dirstamp) protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.$(OBJEXT): \ protoc/$(am__dirstamp) protoc/$(DEPDIR)/$(am__dirstamp) @BUILD_OLA_PROTOC_PLUGIN_TRUE@protoc/ola_protoc_plugin$(EXEEXT): $(protoc_ola_protoc_plugin_OBJECTS) $(protoc_ola_protoc_plugin_DEPENDENCIES) $(EXTRA_protoc_ola_protoc_plugin_DEPENDENCIES) protoc/$(am__dirstamp) @BUILD_OLA_PROTOC_PLUGIN_TRUE@ @rm -f protoc/ola_protoc_plugin$(EXEEXT) @BUILD_OLA_PROTOC_PLUGIN_TRUE@ $(AM_V_CXXLD)$(protoc_ola_protoc_plugin_LINK) $(protoc_ola_protoc_plugin_OBJECTS) $(protoc_ola_protoc_plugin_LDADD) $(LIBS) tools/e133/basic-controller.$(OBJEXT): tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/basic_controller$(EXEEXT): $(tools_e133_basic_controller_OBJECTS) $(tools_e133_basic_controller_DEPENDENCIES) $(EXTRA_tools_e133_basic_controller_DEPENDENCIES) tools/e133/$(am__dirstamp) @rm -f tools/e133/basic_controller$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(tools_e133_basic_controller_OBJECTS) $(tools_e133_basic_controller_LDADD) $(LIBS) tools/e133/basic-device.$(OBJEXT): tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/basic_device$(EXEEXT): $(tools_e133_basic_device_OBJECTS) $(tools_e133_basic_device_DEPENDENCIES) $(EXTRA_tools_e133_basic_device_DEPENDENCIES) tools/e133/$(am__dirstamp) @rm -f tools/e133/basic_device$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(tools_e133_basic_device_OBJECTS) $(tools_e133_basic_device_LDADD) $(LIBS) tools/e133/e133-controller.$(OBJEXT): tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/e133_controller$(EXEEXT): $(tools_e133_e133_controller_OBJECTS) $(tools_e133_e133_controller_DEPENDENCIES) $(EXTRA_tools_e133_e133_controller_DEPENDENCIES) tools/e133/$(am__dirstamp) @rm -f tools/e133/e133_controller$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(tools_e133_e133_controller_OBJECTS) $(tools_e133_e133_controller_LDADD) $(LIBS) tools/e133/e133-monitor.$(OBJEXT): tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/e133_monitor$(EXEEXT): $(tools_e133_e133_monitor_OBJECTS) $(tools_e133_e133_monitor_DEPENDENCIES) $(EXTRA_tools_e133_e133_monitor_DEPENDENCIES) tools/e133/$(am__dirstamp) @rm -f tools/e133/e133_monitor$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(tools_e133_e133_monitor_OBJECTS) $(tools_e133_e133_monitor_LDADD) $(LIBS) tools/e133/e133-receiver.$(OBJEXT): tools/e133/$(am__dirstamp) \ tools/e133/$(DEPDIR)/$(am__dirstamp) tools/e133/e133_receiver$(EXEEXT): $(tools_e133_e133_receiver_OBJECTS) $(tools_e133_e133_receiver_DEPENDENCIES) $(EXTRA_tools_e133_e133_receiver_DEPENDENCIES) tools/e133/$(am__dirstamp) @rm -f tools/e133/e133_receiver$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(tools_e133_e133_receiver_OBJECTS) $(tools_e133_e133_receiver_LDADD) $(LIBS) tools/ja-rule/$(am__dirstamp): @$(MKDIR_P) tools/ja-rule @: > tools/ja-rule/$(am__dirstamp) tools/ja-rule/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tools/ja-rule/$(DEPDIR) @: > tools/ja-rule/$(DEPDIR)/$(am__dirstamp) tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.$(OBJEXT): \ tools/ja-rule/$(am__dirstamp) \ tools/ja-rule/$(DEPDIR)/$(am__dirstamp) tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.$(OBJEXT): \ tools/ja-rule/$(am__dirstamp) \ tools/ja-rule/$(DEPDIR)/$(am__dirstamp) tools/ja-rule/ja-rule$(EXEEXT): $(tools_ja_rule_ja_rule_OBJECTS) $(tools_ja_rule_ja_rule_DEPENDENCIES) $(EXTRA_tools_ja_rule_ja_rule_DEPENDENCIES) tools/ja-rule/$(am__dirstamp) @rm -f tools/ja-rule/ja-rule$(EXEEXT) $(AM_V_CXXLD)$(tools_ja_rule_ja_rule_LINK) $(tools_ja_rule_ja_rule_OBJECTS) $(tools_ja_rule_ja_rule_LDADD) $(LIBS) tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.$(OBJEXT): \ tools/ja-rule/$(am__dirstamp) \ tools/ja-rule/$(DEPDIR)/$(am__dirstamp) tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.$(OBJEXT): \ tools/ja-rule/$(am__dirstamp) \ tools/ja-rule/$(DEPDIR)/$(am__dirstamp) tools/ja-rule/ja-rule-controller$(EXEEXT): $(tools_ja_rule_ja_rule_controller_OBJECTS) $(tools_ja_rule_ja_rule_controller_DEPENDENCIES) $(EXTRA_tools_ja_rule_ja_rule_controller_DEPENDENCIES) tools/ja-rule/$(am__dirstamp) @rm -f tools/ja-rule/ja-rule-controller$(EXEEXT) $(AM_V_CXXLD)$(tools_ja_rule_ja_rule_controller_LINK) $(tools_ja_rule_ja_rule_controller_OBJECTS) $(tools_ja_rule_ja_rule_controller_LDADD) $(LIBS) tools/logic/$(am__dirstamp): @$(MKDIR_P) tools/logic @: > tools/logic/$(am__dirstamp) tools/logic/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tools/logic/$(DEPDIR) @: > tools/logic/$(DEPDIR)/$(am__dirstamp) tools/logic/DMXSignalProcessor.$(OBJEXT): tools/logic/$(am__dirstamp) \ tools/logic/$(DEPDIR)/$(am__dirstamp) tools/logic/logic-rdm-sniffer.$(OBJEXT): tools/logic/$(am__dirstamp) \ tools/logic/$(DEPDIR)/$(am__dirstamp) tools/logic/logic_rdm_sniffer$(EXEEXT): $(tools_logic_logic_rdm_sniffer_OBJECTS) $(tools_logic_logic_rdm_sniffer_DEPENDENCIES) $(EXTRA_tools_logic_logic_rdm_sniffer_DEPENDENCIES) tools/logic/$(am__dirstamp) @rm -f tools/logic/logic_rdm_sniffer$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(tools_logic_logic_rdm_sniffer_OBJECTS) $(tools_logic_logic_rdm_sniffer_LDADD) $(LIBS) tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.$(OBJEXT): \ tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.$(OBJEXT): \ tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.$(OBJEXT): \ tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.$(OBJEXT): \ tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.$(OBJEXT): \ tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.$(OBJEXT): \ tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/ActionTester$(EXEEXT): $(tools_ola_trigger_ActionTester_OBJECTS) $(tools_ola_trigger_ActionTester_DEPENDENCIES) $(EXTRA_tools_ola_trigger_ActionTester_DEPENDENCIES) tools/ola_trigger/$(am__dirstamp) @rm -f tools/ola_trigger/ActionTester$(EXEEXT) $(AM_V_CXXLD)$(tools_ola_trigger_ActionTester_LINK) $(tools_ola_trigger_ActionTester_OBJECTS) $(tools_ola_trigger_ActionTester_LDADD) $(LIBS) tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.$(OBJEXT): \ tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.$(OBJEXT): \ tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.$(OBJEXT): \ tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.$(OBJEXT): \ tools/ola_trigger/$(am__dirstamp) \ tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) tools/ola_trigger/ola_trigger$(EXEEXT): $(tools_ola_trigger_ola_trigger_OBJECTS) $(tools_ola_trigger_ola_trigger_DEPENDENCIES) $(EXTRA_tools_ola_trigger_ola_trigger_DEPENDENCIES) tools/ola_trigger/$(am__dirstamp) @rm -f tools/ola_trigger/ola_trigger$(EXEEXT) $(AM_V_CXXLD)$(tools_ola_trigger_ola_trigger_LINK) $(tools_ola_trigger_ola_trigger_OBJECTS) $(tools_ola_trigger_ola_trigger_LDADD) $(LIBS) tools/rdmpro/$(am__dirstamp): @$(MKDIR_P) tools/rdmpro @: > tools/rdmpro/$(am__dirstamp) tools/rdmpro/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tools/rdmpro/$(DEPDIR) @: > tools/rdmpro/$(DEPDIR)/$(am__dirstamp) tools/rdmpro/rdm-sniffer.$(OBJEXT): tools/rdmpro/$(am__dirstamp) \ tools/rdmpro/$(DEPDIR)/$(am__dirstamp) tools/rdmpro/rdmpro_sniffer$(EXEEXT): $(tools_rdmpro_rdmpro_sniffer_OBJECTS) $(tools_rdmpro_rdmpro_sniffer_DEPENDENCIES) $(EXTRA_tools_rdmpro_rdmpro_sniffer_DEPENDENCIES) tools/rdmpro/$(am__dirstamp) @rm -f tools/rdmpro/rdmpro_sniffer$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(tools_rdmpro_rdmpro_sniffer_OBJECTS) $(tools_rdmpro_rdmpro_sniffer_LDADD) $(LIBS) tools/usbpro/$(am__dirstamp): @$(MKDIR_P) tools/usbpro @: > tools/usbpro/$(am__dirstamp) tools/usbpro/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) tools/usbpro/$(DEPDIR) @: > tools/usbpro/$(DEPDIR)/$(am__dirstamp) tools/usbpro/usbpro-firmware.$(OBJEXT): tools/usbpro/$(am__dirstamp) \ tools/usbpro/$(DEPDIR)/$(am__dirstamp) tools/usbpro/usbpro_firmware$(EXEEXT): $(tools_usbpro_usbpro_firmware_OBJECTS) $(tools_usbpro_usbpro_firmware_DEPENDENCIES) $(EXTRA_tools_usbpro_usbpro_firmware_DEPENDENCIES) tools/usbpro/$(am__dirstamp) @rm -f tools/usbpro/usbpro_firmware$(EXEEXT) $(AM_V_CXXLD)$(CXXLINK) $(tools_usbpro_usbpro_firmware_OBJECTS) $(tools_usbpro_usbpro_firmware_LDADD) $(LIBS) install-dist_rdmtestsexecSCRIPTS: $(dist_rdmtestsexec_SCRIPTS) @$(NORMAL_INSTALL) @list='$(dist_rdmtestsexec_SCRIPTS)'; test -n "$(rdmtestsexecdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(rdmtestsexecdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(rdmtestsexecdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(rdmtestsexecdir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(rdmtestsexecdir)$$dir" || exit $$?; \ } \ ; done uninstall-dist_rdmtestsexecSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(dist_rdmtestsexec_SCRIPTS)'; test -n "$(rdmtestsexecdir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(rdmtestsexecdir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f common/base/*.$(OBJEXT) -rm -f common/base/*.lo -rm -f common/dmx/*.$(OBJEXT) -rm -f common/dmx/*.lo -rm -f common/export_map/*.$(OBJEXT) -rm -f common/export_map/*.lo -rm -f common/file/*.$(OBJEXT) -rm -f common/file/*.lo -rm -f common/http/*.$(OBJEXT) -rm -f common/http/*.lo -rm -f common/io/*.$(OBJEXT) -rm -f common/io/*.lo -rm -f common/math/*.$(OBJEXT) -rm -f common/math/*.lo -rm -f common/messaging/*.$(OBJEXT) -rm -f common/messaging/*.lo -rm -f common/network/*.$(OBJEXT) -rm -f common/network/*.lo -rm -f common/protocol/*.$(OBJEXT) -rm -f common/protocol/*.lo -rm -f common/rdm/*.$(OBJEXT) -rm -f common/rdm/*.lo -rm -f common/rpc/*.$(OBJEXT) -rm -f common/rpc/*.lo -rm -f common/strings/*.$(OBJEXT) -rm -f common/strings/*.lo -rm -f common/system/*.$(OBJEXT) -rm -f common/system/*.lo -rm -f common/testing/*.$(OBJEXT) -rm -f common/testing/*.lo -rm -f common/thread/*.$(OBJEXT) -rm -f common/thread/*.lo -rm -f common/timecode/*.$(OBJEXT) -rm -f common/timecode/*.lo -rm -f common/utils/*.$(OBJEXT) -rm -f common/utils/*.lo -rm -f common/web/*.$(OBJEXT) -rm -f common/web/*.lo -rm -f data/rdm/*.$(OBJEXT) -rm -f doxygen/examples/*.$(OBJEXT) -rm -f examples/*.$(OBJEXT) -rm -f examples/*.lo -rm -f libs/acn/*.$(OBJEXT) -rm -f libs/acn/*.lo -rm -f libs/usb/*.$(OBJEXT) -rm -f libs/usb/*.lo -rm -f ola/*.$(OBJEXT) -rm -f ola/*.lo -rm -f olad/*.$(OBJEXT) -rm -f olad/*.lo -rm -f olad/plugin_api/*.$(OBJEXT) -rm -f olad/plugin_api/*.lo -rm -f plugins/artnet/*.$(OBJEXT) -rm -f plugins/artnet/*.lo -rm -f plugins/artnet/messages/*.$(OBJEXT) -rm -f plugins/artnet/messages/*.lo -rm -f plugins/dmx4linux/*.$(OBJEXT) -rm -f plugins/dmx4linux/*.lo -rm -f plugins/dummy/*.$(OBJEXT) -rm -f plugins/dummy/*.lo -rm -f plugins/e131/*.$(OBJEXT) -rm -f plugins/e131/*.lo -rm -f plugins/e131/messages/*.$(OBJEXT) -rm -f plugins/e131/messages/*.lo -rm -f plugins/espnet/*.$(OBJEXT) -rm -f plugins/espnet/*.lo -rm -f plugins/ftdidmx/*.$(OBJEXT) -rm -f plugins/ftdidmx/*.lo -rm -f plugins/gpio/*.$(OBJEXT) -rm -f plugins/gpio/*.lo -rm -f plugins/karate/*.$(OBJEXT) -rm -f plugins/karate/*.lo -rm -f plugins/kinet/*.$(OBJEXT) -rm -f plugins/kinet/*.lo -rm -f plugins/milinst/*.$(OBJEXT) -rm -f plugins/milinst/*.lo -rm -f plugins/opendmx/*.$(OBJEXT) -rm -f plugins/opendmx/*.lo -rm -f plugins/openpixelcontrol/*.$(OBJEXT) -rm -f plugins/openpixelcontrol/*.lo -rm -f plugins/osc/*.$(OBJEXT) -rm -f plugins/osc/*.lo -rm -f plugins/pathport/*.$(OBJEXT) -rm -f plugins/pathport/*.lo -rm -f plugins/renard/*.$(OBJEXT) -rm -f plugins/renard/*.lo -rm -f plugins/sandnet/*.$(OBJEXT) -rm -f plugins/sandnet/*.lo -rm -f plugins/shownet/*.$(OBJEXT) -rm -f plugins/shownet/*.lo -rm -f plugins/spi/*.$(OBJEXT) -rm -f plugins/spi/*.lo -rm -f plugins/stageprofi/*.$(OBJEXT) -rm -f plugins/stageprofi/*.lo -rm -f plugins/uartdmx/*.$(OBJEXT) -rm -f plugins/uartdmx/*.lo -rm -f plugins/usbdmx/*.$(OBJEXT) -rm -f plugins/usbdmx/*.lo -rm -f plugins/usbpro/*.$(OBJEXT) -rm -f plugins/usbpro/*.lo -rm -f plugins/usbpro/messages/*.$(OBJEXT) -rm -f plugins/usbpro/messages/*.lo -rm -f protoc/*.$(OBJEXT) -rm -f tools/e133/*.$(OBJEXT) -rm -f tools/e133/*.lo -rm -f tools/ja-rule/*.$(OBJEXT) -rm -f tools/logic/*.$(OBJEXT) -rm -f tools/ola_trigger/*.$(OBJEXT) -rm -f tools/ola_trigger/*.lo -rm -f tools/rdmpro/*.$(OBJEXT) -rm -f tools/usbpro/*.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@common/base/$(DEPDIR)/common_base_CredentialsTester-CredentialsTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/base/$(DEPDIR)/common_base_FlagsTester-FlagsTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/base/$(DEPDIR)/common_base_LoggingTester-LoggingTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/base/$(DEPDIR)/common_libolacommon_la-Credentials.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/base/$(DEPDIR)/common_libolacommon_la-Env.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/base/$(DEPDIR)/common_libolacommon_la-Flags.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/base/$(DEPDIR)/common_libolacommon_la-Init.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/base/$(DEPDIR)/common_libolacommon_la-Logging.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/base/$(DEPDIR)/common_libolacommon_la-SysExits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/base/$(DEPDIR)/common_libolacommon_la-Version.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/dmx/$(DEPDIR)/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/dmx/$(DEPDIR)/common_libolacommon_la-RunLengthEncoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/export_map/$(DEPDIR)/common_export_map_ExportMapTester-ExportMapTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/export_map/$(DEPDIR)/common_libolacommon_la-ExportMap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/file/$(DEPDIR)/common_file_UtilTester-UtilTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/file/$(DEPDIR)/common_libolacommon_la-Util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/http/$(DEPDIR)/HTTPServer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/http/$(DEPDIR)/OlaHTTPServer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_io_DescriptorTester-DescriptorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_io_IOQueueTester-IOQueueTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_io_IOStackTester-IOStackTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_io_MemoryBlockTester-MemoryBlockTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerThreadTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_io_StreamTester-InputStreamTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_io_StreamTester-OutputStreamTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_io_TimeoutManagerTester-TimeoutManagerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-Descriptor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-EPoller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-ExtendedSerial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-IOQueue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-IOStack.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-IOUtils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-KQueuePoller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-NonBlockingSender.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-PollerInterface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-SelectPoller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-SelectServer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-Serial.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-StdinHandler.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-TimeoutManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/io/$(DEPDIR)/common_libolacommon_la-WindowsPoller.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/math/$(DEPDIR)/common_libolacommon_la-Random.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/messaging/$(DEPDIR)/common_libolacommon_la-Descriptor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/messaging/$(DEPDIR)/common_libolacommon_la-Message.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/messaging/$(DEPDIR)/common_libolacommon_la-MessagePrinter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/messaging/$(DEPDIR)/common_libolacommon_la-SchemaPrinter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-DescriptorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-MessagePrinterTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-SchemaPrinterTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-AdvancedTCPConnector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-HealthCheckedConnection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-IPV4Address.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-Interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-InterfacePicker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-MACAddress.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-NetworkUtils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-PosixInterfacePicker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-Socket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-SocketAddress.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-SocketCloser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-SocketHelper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-TCPConnector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-TCPSocket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_libolacommon_la-WindowsInterfacePicker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_network_NetworkTester-IPV4AddressTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_network_NetworkTester-InterfacePickerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_network_NetworkTester-InterfaceTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_network_NetworkTester-MACAddressTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_network_NetworkTester-NetworkUtilsTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_network_NetworkTester-SocketAddressTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_network_NetworkTester-SocketTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/network/$(DEPDIR)/common_network_TCPConnectorTester-TCPConnectorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/protocol/$(DEPDIR)/common_protocol_libolaproto_la-Ola.pb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/protocol/$(DEPDIR)/common_protocol_libolaproto_la-OlaService.pb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-AckTimerResponder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-AdvancedDimmerResponder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-CommandPrinter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-DescriptorConsistencyChecker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerResponder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerRootDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerSubDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-DiscoveryAgent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-DummyResponder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-FakeNetworkManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-GroupSizeCalculator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-MessageDeserializer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-MessageSerializer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-MovingLightResponder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-NetworkManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-NetworkResponder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-OpenLightingEnums.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-PidStore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-PidStoreHelper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-PidStoreLoader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-Pids.pb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-QueueingRDMController.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-RDMAPI.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-RDMCommand.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-RDMCommandSerializer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-RDMFrame.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-RDMHelper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-RDMReply.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderHelper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderLoadSensor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderPersonality.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderSettings.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderSlotData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-SensorResponder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-StringMessageBuilder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-SubDeviceDispatcher.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-UID.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_libolacommon_la-VariableFieldSizeCalculator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-PidStoreTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMAPITester-RDMAPITest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMCommandTester-RDMCommandTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMFrameTester-RDMFrameTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMHelperTester-RDMHelperTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageDeserializerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageSerializerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-RDMMessageInterationTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-StringMessageBuilderTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_RDMReplyTester-RDMReplyTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_UIDAllocatorTester-UIDAllocatorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rdm/$(DEPDIR)/common_rdm_UIDTester-UIDTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_libolacommon_la-Rpc.pb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_libolacommon_la-RpcChannel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_libolacommon_la-RpcController.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_libolacommon_la-RpcServer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-RpcServerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.pb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestServiceService.pb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcChannelTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcControllerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcHeaderTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.pb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestServiceService.pb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/strings/$(DEPDIR)/common_libolacommon_la-Format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/strings/$(DEPDIR)/common_libolacommon_la-Utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/strings/$(DEPDIR)/common_strings_UtilsTester-UtilsTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/system/$(DEPDIR)/common_libolacommon_la-Limits.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/system/$(DEPDIR)/common_libolacommon_la-SystemUtils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/testing/$(DEPDIR)/GenericTester.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/testing/$(DEPDIR)/MockUDPSocket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/testing/$(DEPDIR)/TestUtils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_libolacommon_la-ConsumerThread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_libolacommon_la-ExecutorThread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_libolacommon_la-Mutex.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_libolacommon_la-PeriodicThread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_libolacommon_la-SignalThread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_libolacommon_la-Thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_libolacommon_la-ThreadPool.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_libolacommon_la-Utils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_thread_ExecutorThreadTester-ExecutorThreadTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_thread_FutureTester-FutureTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadPoolTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/timecode/$(DEPDIR)/common_libolacommon_la-TimeCode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/timecode/$(DEPDIR)/common_timecode_TimeCodeTester-TimeCodeTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_libolacommon_la-ActionQueue.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_libolacommon_la-Clock.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_libolacommon_la-DmxBuffer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_libolacommon_la-StringUtils.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_libolacommon_la-TokenBucket.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_libolacommon_la-Watchdog.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_utils_UtilsTester-ActionQueueTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_utils_UtilsTester-BackoffTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_utils_UtilsTester-CallbackTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_utils_UtilsTester-ClockTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_utils_UtilsTester-DmxBufferTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_utils_UtilsTester-MultiCallbackTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_utils_UtilsTester-StringUtilsTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_utils_UtilsTester-TokenBucketTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_utils_UtilsTester-UtilsTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/utils/$(DEPDIR)/common_utils_UtilsTester-WatchdogTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/Json.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/JsonData.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/JsonLexer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/JsonParser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/JsonPatch.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/JsonPatchParser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/JsonPointer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/JsonSchema.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/JsonSections.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/JsonTypes.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/JsonWriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/PointerTracker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/SchemaErrorLogger.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/SchemaKeywords.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/SchemaParseContext.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/SchemaParser.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/common_web_JsonTester-JsonTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/common_web_ParserTester-ParserTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/common_web_PointerTester-PointerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/common_web_PointerTrackerTester-PointerTrackerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/common_web_PtchParserTester-PatchParserTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/common_web_PtchTester-PatchTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/common_web_SchemaParserTester-SchemaParserTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/common_web_SchemaTester-SchemaTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@common/web/$(DEPDIR)/common_web_SectionsTester-SectionsTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@data/rdm/$(DEPDIR)/data_rdm_PidDataTester-PidDataTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/callback_client_transmit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/client_disconnect.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/client_thread.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/fetch_plugins.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/flags.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/legacy_callback_client_transmit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/legacy_receiver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/legacy_streaming_client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/receiver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/stdin_handler.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/streaming_client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/streaming_client_plugin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@doxygen/examples/$(DEPDIR)/udp_server.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ShowLoader.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ShowPlayer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ShowRecorder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ShowSaver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/examples_libolaconfig_la-OlaConfigurator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/examples_ola_artnet-ola-artnet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/examples_ola_e131-ola-e131.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/examples_ola_usbpro-ola-usbpro.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ola-client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ola-dmxconsole.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ola-dmxmonitor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ola-latency.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ola-rdm-discover.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ola-rdm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ola-recorder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ola-streaming-client.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ola-throughput.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ola-timecode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@examples/$(DEPDIR)/ola-uni-stats.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/E131TestFramework.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/e131_loadtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/e131_transmit_test.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-BaseInflatorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-CIDTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPAddressTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPInflatorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPPDUTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131InflatorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131PDUTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-HeaderSetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-PDUTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootInflatorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootPDUTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootSenderTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133InflatorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133PDUTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_E133Tester-RDMPDUTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_TransportTester-TCPTransportTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_TransportTester-UDPTransportTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolaacn_la-CID.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolaacn_la-CIDImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-BaseInflator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPAddress.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPE131Inflator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPInflator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPPDU.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131DiscoveryInflator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Inflator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Node.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131PDU.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Sender.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133Inflator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133PDU.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133StatusInflator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133StatusPDU.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-PDU.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-PreamblePacker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RDMInflator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RDMPDU.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootInflator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootPDU.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootSender.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-TCPTransport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-UDPTransport.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/usb/$(DEPDIR)/libs_usb_LibUsbThreadTester-LibUsbThreadTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/usb/$(DEPDIR)/libs_usb_libolausb_la-HotplugAgent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleConstants.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRulePortHandle.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRulePortHandleImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleWidgetPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/usb/$(DEPDIR)/libs_usb_libolausb_la-LibUsbAdaptor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/usb/$(DEPDIR)/libs_usb_libolausb_la-LibUsbThread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libs/usb/$(DEPDIR)/libs_usb_libolausb_la-Types.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ola/$(DEPDIR)/ola_OlaClientTester-OlaClientWrapperTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ola/$(DEPDIR)/ola_OlaClientTester-StreamingClientTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ola/$(DEPDIR)/ola_libola_la-AutoStart.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ola/$(DEPDIR)/ola_libola_la-ClientRDMAPIShim.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ola/$(DEPDIR)/ola_libola_la-ClientTypesFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ola/$(DEPDIR)/ola_libola_la-Module.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ola/$(DEPDIR)/ola_libola_la-OlaCallbackClient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ola/$(DEPDIR)/ola_libola_la-OlaClient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ola/$(DEPDIR)/ola_libola_la-OlaClientCore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ola/$(DEPDIR)/ola_libola_la-OlaClientWrapper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@ola/$(DEPDIR)/ola_libola_la-StreamingClient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/Olad.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_OlaTester-OlaServerServiceImplTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_OlaTester-PluginManagerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-AvahiDiscoveryAgent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-BonjourDiscoveryAgent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-ClientBroker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-DiscoveryAgent.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-DynamicPluginLoader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-HttpServerActions.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-OlaDaemon.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-OlaServer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-OlaServerServiceImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-OladHTTPServer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-PluginManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/$(DEPDIR)/olad_libolaserver_la-RDMHTTPModule.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_ClientTester-ClientTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceManagerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_DmxSourceTester-DmxSourceTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortManagerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_PreferencesTester-PreferencesTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_UniverseTester-UniverseTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Client.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-DeviceManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-DmxSource.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PluginAdaptor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Port.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PortBroker.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PortManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Preferences.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Universe.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-UniverseStore.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/artnet/$(DEPDIR)/ArtNetNode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/artnet/$(DEPDIR)/artnet_loadtest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/artnet/$(DEPDIR)/plugins_artnet_ArtNetTester-ArtNetNodeTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/artnet/messages/$(DEPDIR)/plugins_artnet_messages_libolaartnetconf_la-ArtNetConfigMessages.pb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/dmx4linux/$(DEPDIR)/Dmx4LinuxDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/dmx4linux/$(DEPDIR)/Dmx4LinuxPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/dmx4linux/$(DEPDIR)/Dmx4LinuxPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/dummy/$(DEPDIR)/DummyDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/dummy/$(DEPDIR)/DummyPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/dummy/$(DEPDIR)/DummyPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/dummy/$(DEPDIR)/plugins_dummy_DummyPluginTester-DummyPortTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Plugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Port.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/e131/messages/$(DEPDIR)/plugins_e131_messages_libolae131conf_la-E131ConfigMessages.pb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/espnet/$(DEPDIR)/EspNetDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/espnet/$(DEPDIR)/EspNetNode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/espnet/$(DEPDIR)/EspNetPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/espnet/$(DEPDIR)/EspNetPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/espnet/$(DEPDIR)/RunLengthDecoder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoder.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoderTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/ftdidmx/$(DEPDIR)/FtdiDmxDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/ftdidmx/$(DEPDIR)/FtdiDmxPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/ftdidmx/$(DEPDIR)/FtdiDmxThread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/ftdidmx/$(DEPDIR)/FtdiWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/gpio/$(DEPDIR)/GPIODevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/gpio/$(DEPDIR)/GPIODriver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/gpio/$(DEPDIR)/GPIOPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/gpio/$(DEPDIR)/GPIOPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/karate/$(DEPDIR)/KarateDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/karate/$(DEPDIR)/KarateLight.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/karate/$(DEPDIR)/KaratePlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/karate/$(DEPDIR)/KarateThread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/kinet/$(DEPDIR)/KiNetDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/kinet/$(DEPDIR)/KiNetNode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/kinet/$(DEPDIR)/KiNetPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/kinet/$(DEPDIR)/plugins_kinet_KiNetTester-KiNetNodeTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/milinst/$(DEPDIR)/MilInstDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/milinst/$(DEPDIR)/MilInstPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/milinst/$(DEPDIR)/MilInstPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/milinst/$(DEPDIR)/MilInstWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/milinst/$(DEPDIR)/MilInstWidget1463.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/milinst/$(DEPDIR)/MilInstWidget1553.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/opendmx/$(DEPDIR)/OpenDmxDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/opendmx/$(DEPDIR)/OpenDmxPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/opendmx/$(DEPDIR)/OpenDmxThread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/openpixelcontrol/$(DEPDIR)/OPCClient.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/openpixelcontrol/$(DEPDIR)/OPCDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/openpixelcontrol/$(DEPDIR)/OPCPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/openpixelcontrol/$(DEPDIR)/OPCPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/openpixelcontrol/$(DEPDIR)/OPCServer.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCAddressTemplateTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCNodeTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/osc/$(DEPDIR)/plugins_osc_libolaoscnode_la-OSCAddressTemplate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/osc/$(DEPDIR)/plugins_osc_libolaoscnode_la-OSCNode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/pathport/$(DEPDIR)/PathportDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/pathport/$(DEPDIR)/PathportNode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/pathport/$(DEPDIR)/PathportPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/pathport/$(DEPDIR)/PathportPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/renard/$(DEPDIR)/RenardDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/renard/$(DEPDIR)/RenardPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/renard/$(DEPDIR)/RenardPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/renard/$(DEPDIR)/RenardWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/sandnet/$(DEPDIR)/SandNetDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/sandnet/$(DEPDIR)/SandNetNode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/sandnet/$(DEPDIR)/SandNetPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/sandnet/$(DEPDIR)/SandNetPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/shownet/$(DEPDIR)/ShowNetDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/shownet/$(DEPDIR)/ShowNetNode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/shownet/$(DEPDIR)/ShowNetPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/shownet/$(DEPDIR)/ShowNetPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNode.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNodeTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/spi/$(DEPDIR)/SPIBackend.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/spi/$(DEPDIR)/SPIDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/spi/$(DEPDIR)/SPIOutput.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/spi/$(DEPDIR)/SPIPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/spi/$(DEPDIR)/SPIPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/spi/$(DEPDIR)/SPIWriter.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/spi/$(DEPDIR)/plugins_spi_SPITester-FakeSPIWriter.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIBackendTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIOutputTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/stageprofi/$(DEPDIR)/StageProfiDetector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/stageprofi/$(DEPDIR)/StageProfiDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/stageprofi/$(DEPDIR)/StageProfiPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/stageprofi/$(DEPDIR)/StageProfiPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/stageprofi/$(DEPDIR)/StageProfiWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/uartdmx/$(DEPDIR)/UartDmxDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/uartdmx/$(DEPDIR)/UartDmxPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/uartdmx/$(DEPDIR)/UartDmxThread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/uartdmx/$(DEPDIR)/UartWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-AsyncPluginImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Port.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-GenericDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-GenericOutputPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-JaRuleDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-JaRuleOutputPort.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-SyncPluginImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-UsbDmxPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMX.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMXFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbReceiver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbSender.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbTransceiverBase.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1Factory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-EurolitePro.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-EuroliteProFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-Flags.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-JaRuleFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandy.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandyFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-Sunlite.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SunliteFactory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SunliteFirmwareLoader.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SyncronizedWidgetObserver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbReceiver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbSender.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062Factory.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/ArduinoWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/BaseRobeWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/BaseUsbProWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/DmxTriWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/DmxterWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/EnttecUsbProWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/GenericUsbProWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/RobeWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/RobeWidgetDetector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/UltraDMXProWidget.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/UsbProWidgetDetector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/WidgetDetectorThread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-MockEndpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-MockEndpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-ArduinoRGBDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-DmxTriDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-DmxterDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-RobeDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UltraDMXProDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UsbProDevice.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UsbSerialPlugin.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@plugins/usbpro/messages/$(DEPDIR)/plugins_usbpro_messages_libolausbproconf_la-UsbProConfigMessages.pb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppFileGenerator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppGenerator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@protoc/$(DEPDIR)/protoc_ola_protoc_plugin-GeneratorHelpers.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ServiceGenerator.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@protoc/$(DEPDIR)/protoc_ola_protoc_plugin-StrUtil.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/DesignatedControllerConnection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/DeviceManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/DeviceManagerImpl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/E133Device.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/E133Endpoint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/E133HealthCheckedConnection.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/E133Receiver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/E133StatusHelper.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/EndpointManager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/ManagementEndpoint.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/MessageBuilder.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/SimpleE133Node.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/basic-controller.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/basic-device.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/e133-controller.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/e133-monitor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/e133/$(DEPDIR)/e133-receiver.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-USBDeviceManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-ja-rule.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-USBDeviceManager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-ja-rule-controller.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/logic/$(DEPDIR)/DMXSignalProcessor.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/logic/$(DEPDIR)/logic-rdm-sniffer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/Action.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/Context.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/DMXTrigger.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/VariableInterpolator.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ActionTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ContextTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-DMXTriggerTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-IntervalTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-SlotTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-VariableInterpolatorTest.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ParserActions.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-config.tab.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-lex.yy.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ola-trigger.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/rdmpro/$(DEPDIR)/rdm-sniffer.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@tools/usbpro/$(DEPDIR)/usbpro-firmware.Po@am__quote@ .cc.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cc.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cc.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< common/base/common_libolacommon_la-Credentials.lo: common/base/Credentials.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_libolacommon_la-Credentials.lo -MD -MP -MF common/base/$(DEPDIR)/common_libolacommon_la-Credentials.Tpo -c -o common/base/common_libolacommon_la-Credentials.lo `test -f 'common/base/Credentials.cpp' || echo '$(srcdir)/'`common/base/Credentials.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_libolacommon_la-Credentials.Tpo common/base/$(DEPDIR)/common_libolacommon_la-Credentials.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/Credentials.cpp' object='common/base/common_libolacommon_la-Credentials.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_libolacommon_la-Credentials.lo `test -f 'common/base/Credentials.cpp' || echo '$(srcdir)/'`common/base/Credentials.cpp common/base/common_libolacommon_la-Env.lo: common/base/Env.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_libolacommon_la-Env.lo -MD -MP -MF common/base/$(DEPDIR)/common_libolacommon_la-Env.Tpo -c -o common/base/common_libolacommon_la-Env.lo `test -f 'common/base/Env.cpp' || echo '$(srcdir)/'`common/base/Env.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_libolacommon_la-Env.Tpo common/base/$(DEPDIR)/common_libolacommon_la-Env.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/Env.cpp' object='common/base/common_libolacommon_la-Env.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_libolacommon_la-Env.lo `test -f 'common/base/Env.cpp' || echo '$(srcdir)/'`common/base/Env.cpp common/base/common_libolacommon_la-Flags.lo: common/base/Flags.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_libolacommon_la-Flags.lo -MD -MP -MF common/base/$(DEPDIR)/common_libolacommon_la-Flags.Tpo -c -o common/base/common_libolacommon_la-Flags.lo `test -f 'common/base/Flags.cpp' || echo '$(srcdir)/'`common/base/Flags.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_libolacommon_la-Flags.Tpo common/base/$(DEPDIR)/common_libolacommon_la-Flags.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/Flags.cpp' object='common/base/common_libolacommon_la-Flags.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_libolacommon_la-Flags.lo `test -f 'common/base/Flags.cpp' || echo '$(srcdir)/'`common/base/Flags.cpp common/base/common_libolacommon_la-Init.lo: common/base/Init.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_libolacommon_la-Init.lo -MD -MP -MF common/base/$(DEPDIR)/common_libolacommon_la-Init.Tpo -c -o common/base/common_libolacommon_la-Init.lo `test -f 'common/base/Init.cpp' || echo '$(srcdir)/'`common/base/Init.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_libolacommon_la-Init.Tpo common/base/$(DEPDIR)/common_libolacommon_la-Init.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/Init.cpp' object='common/base/common_libolacommon_la-Init.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_libolacommon_la-Init.lo `test -f 'common/base/Init.cpp' || echo '$(srcdir)/'`common/base/Init.cpp common/base/common_libolacommon_la-Logging.lo: common/base/Logging.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_libolacommon_la-Logging.lo -MD -MP -MF common/base/$(DEPDIR)/common_libolacommon_la-Logging.Tpo -c -o common/base/common_libolacommon_la-Logging.lo `test -f 'common/base/Logging.cpp' || echo '$(srcdir)/'`common/base/Logging.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_libolacommon_la-Logging.Tpo common/base/$(DEPDIR)/common_libolacommon_la-Logging.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/Logging.cpp' object='common/base/common_libolacommon_la-Logging.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_libolacommon_la-Logging.lo `test -f 'common/base/Logging.cpp' || echo '$(srcdir)/'`common/base/Logging.cpp common/base/common_libolacommon_la-SysExits.lo: common/base/SysExits.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_libolacommon_la-SysExits.lo -MD -MP -MF common/base/$(DEPDIR)/common_libolacommon_la-SysExits.Tpo -c -o common/base/common_libolacommon_la-SysExits.lo `test -f 'common/base/SysExits.cpp' || echo '$(srcdir)/'`common/base/SysExits.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_libolacommon_la-SysExits.Tpo common/base/$(DEPDIR)/common_libolacommon_la-SysExits.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/SysExits.cpp' object='common/base/common_libolacommon_la-SysExits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_libolacommon_la-SysExits.lo `test -f 'common/base/SysExits.cpp' || echo '$(srcdir)/'`common/base/SysExits.cpp common/base/common_libolacommon_la-Version.lo: common/base/Version.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_libolacommon_la-Version.lo -MD -MP -MF common/base/$(DEPDIR)/common_libolacommon_la-Version.Tpo -c -o common/base/common_libolacommon_la-Version.lo `test -f 'common/base/Version.cpp' || echo '$(srcdir)/'`common/base/Version.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_libolacommon_la-Version.Tpo common/base/$(DEPDIR)/common_libolacommon_la-Version.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/Version.cpp' object='common/base/common_libolacommon_la-Version.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_libolacommon_la-Version.lo `test -f 'common/base/Version.cpp' || echo '$(srcdir)/'`common/base/Version.cpp common/dmx/common_libolacommon_la-RunLengthEncoder.lo: common/dmx/RunLengthEncoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/dmx/common_libolacommon_la-RunLengthEncoder.lo -MD -MP -MF common/dmx/$(DEPDIR)/common_libolacommon_la-RunLengthEncoder.Tpo -c -o common/dmx/common_libolacommon_la-RunLengthEncoder.lo `test -f 'common/dmx/RunLengthEncoder.cpp' || echo '$(srcdir)/'`common/dmx/RunLengthEncoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/dmx/$(DEPDIR)/common_libolacommon_la-RunLengthEncoder.Tpo common/dmx/$(DEPDIR)/common_libolacommon_la-RunLengthEncoder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/dmx/RunLengthEncoder.cpp' object='common/dmx/common_libolacommon_la-RunLengthEncoder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/dmx/common_libolacommon_la-RunLengthEncoder.lo `test -f 'common/dmx/RunLengthEncoder.cpp' || echo '$(srcdir)/'`common/dmx/RunLengthEncoder.cpp common/export_map/common_libolacommon_la-ExportMap.lo: common/export_map/ExportMap.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/export_map/common_libolacommon_la-ExportMap.lo -MD -MP -MF common/export_map/$(DEPDIR)/common_libolacommon_la-ExportMap.Tpo -c -o common/export_map/common_libolacommon_la-ExportMap.lo `test -f 'common/export_map/ExportMap.cpp' || echo '$(srcdir)/'`common/export_map/ExportMap.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/export_map/$(DEPDIR)/common_libolacommon_la-ExportMap.Tpo common/export_map/$(DEPDIR)/common_libolacommon_la-ExportMap.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/export_map/ExportMap.cpp' object='common/export_map/common_libolacommon_la-ExportMap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/export_map/common_libolacommon_la-ExportMap.lo `test -f 'common/export_map/ExportMap.cpp' || echo '$(srcdir)/'`common/export_map/ExportMap.cpp common/file/common_libolacommon_la-Util.lo: common/file/Util.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/file/common_libolacommon_la-Util.lo -MD -MP -MF common/file/$(DEPDIR)/common_libolacommon_la-Util.Tpo -c -o common/file/common_libolacommon_la-Util.lo `test -f 'common/file/Util.cpp' || echo '$(srcdir)/'`common/file/Util.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/file/$(DEPDIR)/common_libolacommon_la-Util.Tpo common/file/$(DEPDIR)/common_libolacommon_la-Util.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/file/Util.cpp' object='common/file/common_libolacommon_la-Util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/file/common_libolacommon_la-Util.lo `test -f 'common/file/Util.cpp' || echo '$(srcdir)/'`common/file/Util.cpp common/io/common_libolacommon_la-Descriptor.lo: common/io/Descriptor.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-Descriptor.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-Descriptor.Tpo -c -o common/io/common_libolacommon_la-Descriptor.lo `test -f 'common/io/Descriptor.cpp' || echo '$(srcdir)/'`common/io/Descriptor.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-Descriptor.Tpo common/io/$(DEPDIR)/common_libolacommon_la-Descriptor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/Descriptor.cpp' object='common/io/common_libolacommon_la-Descriptor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-Descriptor.lo `test -f 'common/io/Descriptor.cpp' || echo '$(srcdir)/'`common/io/Descriptor.cpp common/io/common_libolacommon_la-ExtendedSerial.lo: common/io/ExtendedSerial.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-ExtendedSerial.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-ExtendedSerial.Tpo -c -o common/io/common_libolacommon_la-ExtendedSerial.lo `test -f 'common/io/ExtendedSerial.cpp' || echo '$(srcdir)/'`common/io/ExtendedSerial.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-ExtendedSerial.Tpo common/io/$(DEPDIR)/common_libolacommon_la-ExtendedSerial.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/ExtendedSerial.cpp' object='common/io/common_libolacommon_la-ExtendedSerial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-ExtendedSerial.lo `test -f 'common/io/ExtendedSerial.cpp' || echo '$(srcdir)/'`common/io/ExtendedSerial.cpp common/io/common_libolacommon_la-IOQueue.lo: common/io/IOQueue.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-IOQueue.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-IOQueue.Tpo -c -o common/io/common_libolacommon_la-IOQueue.lo `test -f 'common/io/IOQueue.cpp' || echo '$(srcdir)/'`common/io/IOQueue.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-IOQueue.Tpo common/io/$(DEPDIR)/common_libolacommon_la-IOQueue.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/IOQueue.cpp' object='common/io/common_libolacommon_la-IOQueue.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-IOQueue.lo `test -f 'common/io/IOQueue.cpp' || echo '$(srcdir)/'`common/io/IOQueue.cpp common/io/common_libolacommon_la-IOStack.lo: common/io/IOStack.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-IOStack.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-IOStack.Tpo -c -o common/io/common_libolacommon_la-IOStack.lo `test -f 'common/io/IOStack.cpp' || echo '$(srcdir)/'`common/io/IOStack.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-IOStack.Tpo common/io/$(DEPDIR)/common_libolacommon_la-IOStack.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/IOStack.cpp' object='common/io/common_libolacommon_la-IOStack.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-IOStack.lo `test -f 'common/io/IOStack.cpp' || echo '$(srcdir)/'`common/io/IOStack.cpp common/io/common_libolacommon_la-IOUtils.lo: common/io/IOUtils.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-IOUtils.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-IOUtils.Tpo -c -o common/io/common_libolacommon_la-IOUtils.lo `test -f 'common/io/IOUtils.cpp' || echo '$(srcdir)/'`common/io/IOUtils.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-IOUtils.Tpo common/io/$(DEPDIR)/common_libolacommon_la-IOUtils.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/IOUtils.cpp' object='common/io/common_libolacommon_la-IOUtils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-IOUtils.lo `test -f 'common/io/IOUtils.cpp' || echo '$(srcdir)/'`common/io/IOUtils.cpp common/io/common_libolacommon_la-NonBlockingSender.lo: common/io/NonBlockingSender.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-NonBlockingSender.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-NonBlockingSender.Tpo -c -o common/io/common_libolacommon_la-NonBlockingSender.lo `test -f 'common/io/NonBlockingSender.cpp' || echo '$(srcdir)/'`common/io/NonBlockingSender.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-NonBlockingSender.Tpo common/io/$(DEPDIR)/common_libolacommon_la-NonBlockingSender.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/NonBlockingSender.cpp' object='common/io/common_libolacommon_la-NonBlockingSender.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-NonBlockingSender.lo `test -f 'common/io/NonBlockingSender.cpp' || echo '$(srcdir)/'`common/io/NonBlockingSender.cpp common/io/common_libolacommon_la-PollerInterface.lo: common/io/PollerInterface.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-PollerInterface.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-PollerInterface.Tpo -c -o common/io/common_libolacommon_la-PollerInterface.lo `test -f 'common/io/PollerInterface.cpp' || echo '$(srcdir)/'`common/io/PollerInterface.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-PollerInterface.Tpo common/io/$(DEPDIR)/common_libolacommon_la-PollerInterface.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/PollerInterface.cpp' object='common/io/common_libolacommon_la-PollerInterface.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-PollerInterface.lo `test -f 'common/io/PollerInterface.cpp' || echo '$(srcdir)/'`common/io/PollerInterface.cpp common/io/common_libolacommon_la-SelectServer.lo: common/io/SelectServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-SelectServer.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-SelectServer.Tpo -c -o common/io/common_libolacommon_la-SelectServer.lo `test -f 'common/io/SelectServer.cpp' || echo '$(srcdir)/'`common/io/SelectServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-SelectServer.Tpo common/io/$(DEPDIR)/common_libolacommon_la-SelectServer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/SelectServer.cpp' object='common/io/common_libolacommon_la-SelectServer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-SelectServer.lo `test -f 'common/io/SelectServer.cpp' || echo '$(srcdir)/'`common/io/SelectServer.cpp common/io/common_libolacommon_la-Serial.lo: common/io/Serial.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-Serial.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-Serial.Tpo -c -o common/io/common_libolacommon_la-Serial.lo `test -f 'common/io/Serial.cpp' || echo '$(srcdir)/'`common/io/Serial.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-Serial.Tpo common/io/$(DEPDIR)/common_libolacommon_la-Serial.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/Serial.cpp' object='common/io/common_libolacommon_la-Serial.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-Serial.lo `test -f 'common/io/Serial.cpp' || echo '$(srcdir)/'`common/io/Serial.cpp common/io/common_libolacommon_la-StdinHandler.lo: common/io/StdinHandler.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-StdinHandler.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-StdinHandler.Tpo -c -o common/io/common_libolacommon_la-StdinHandler.lo `test -f 'common/io/StdinHandler.cpp' || echo '$(srcdir)/'`common/io/StdinHandler.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-StdinHandler.Tpo common/io/$(DEPDIR)/common_libolacommon_la-StdinHandler.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/StdinHandler.cpp' object='common/io/common_libolacommon_la-StdinHandler.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-StdinHandler.lo `test -f 'common/io/StdinHandler.cpp' || echo '$(srcdir)/'`common/io/StdinHandler.cpp common/io/common_libolacommon_la-TimeoutManager.lo: common/io/TimeoutManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-TimeoutManager.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-TimeoutManager.Tpo -c -o common/io/common_libolacommon_la-TimeoutManager.lo `test -f 'common/io/TimeoutManager.cpp' || echo '$(srcdir)/'`common/io/TimeoutManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-TimeoutManager.Tpo common/io/$(DEPDIR)/common_libolacommon_la-TimeoutManager.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/TimeoutManager.cpp' object='common/io/common_libolacommon_la-TimeoutManager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-TimeoutManager.lo `test -f 'common/io/TimeoutManager.cpp' || echo '$(srcdir)/'`common/io/TimeoutManager.cpp common/io/common_libolacommon_la-WindowsPoller.lo: common/io/WindowsPoller.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-WindowsPoller.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-WindowsPoller.Tpo -c -o common/io/common_libolacommon_la-WindowsPoller.lo `test -f 'common/io/WindowsPoller.cpp' || echo '$(srcdir)/'`common/io/WindowsPoller.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-WindowsPoller.Tpo common/io/$(DEPDIR)/common_libolacommon_la-WindowsPoller.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/WindowsPoller.cpp' object='common/io/common_libolacommon_la-WindowsPoller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-WindowsPoller.lo `test -f 'common/io/WindowsPoller.cpp' || echo '$(srcdir)/'`common/io/WindowsPoller.cpp common/io/common_libolacommon_la-SelectPoller.lo: common/io/SelectPoller.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-SelectPoller.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-SelectPoller.Tpo -c -o common/io/common_libolacommon_la-SelectPoller.lo `test -f 'common/io/SelectPoller.cpp' || echo '$(srcdir)/'`common/io/SelectPoller.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-SelectPoller.Tpo common/io/$(DEPDIR)/common_libolacommon_la-SelectPoller.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/SelectPoller.cpp' object='common/io/common_libolacommon_la-SelectPoller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-SelectPoller.lo `test -f 'common/io/SelectPoller.cpp' || echo '$(srcdir)/'`common/io/SelectPoller.cpp common/io/common_libolacommon_la-EPoller.lo: common/io/EPoller.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-EPoller.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-EPoller.Tpo -c -o common/io/common_libolacommon_la-EPoller.lo `test -f 'common/io/EPoller.cpp' || echo '$(srcdir)/'`common/io/EPoller.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-EPoller.Tpo common/io/$(DEPDIR)/common_libolacommon_la-EPoller.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/EPoller.cpp' object='common/io/common_libolacommon_la-EPoller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-EPoller.lo `test -f 'common/io/EPoller.cpp' || echo '$(srcdir)/'`common/io/EPoller.cpp common/io/common_libolacommon_la-KQueuePoller.lo: common/io/KQueuePoller.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_libolacommon_la-KQueuePoller.lo -MD -MP -MF common/io/$(DEPDIR)/common_libolacommon_la-KQueuePoller.Tpo -c -o common/io/common_libolacommon_la-KQueuePoller.lo `test -f 'common/io/KQueuePoller.cpp' || echo '$(srcdir)/'`common/io/KQueuePoller.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_libolacommon_la-KQueuePoller.Tpo common/io/$(DEPDIR)/common_libolacommon_la-KQueuePoller.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/KQueuePoller.cpp' object='common/io/common_libolacommon_la-KQueuePoller.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_libolacommon_la-KQueuePoller.lo `test -f 'common/io/KQueuePoller.cpp' || echo '$(srcdir)/'`common/io/KQueuePoller.cpp common/math/common_libolacommon_la-Random.lo: common/math/Random.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/math/common_libolacommon_la-Random.lo -MD -MP -MF common/math/$(DEPDIR)/common_libolacommon_la-Random.Tpo -c -o common/math/common_libolacommon_la-Random.lo `test -f 'common/math/Random.cpp' || echo '$(srcdir)/'`common/math/Random.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/math/$(DEPDIR)/common_libolacommon_la-Random.Tpo common/math/$(DEPDIR)/common_libolacommon_la-Random.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/math/Random.cpp' object='common/math/common_libolacommon_la-Random.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/math/common_libolacommon_la-Random.lo `test -f 'common/math/Random.cpp' || echo '$(srcdir)/'`common/math/Random.cpp common/messaging/common_libolacommon_la-Descriptor.lo: common/messaging/Descriptor.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/messaging/common_libolacommon_la-Descriptor.lo -MD -MP -MF common/messaging/$(DEPDIR)/common_libolacommon_la-Descriptor.Tpo -c -o common/messaging/common_libolacommon_la-Descriptor.lo `test -f 'common/messaging/Descriptor.cpp' || echo '$(srcdir)/'`common/messaging/Descriptor.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/messaging/$(DEPDIR)/common_libolacommon_la-Descriptor.Tpo common/messaging/$(DEPDIR)/common_libolacommon_la-Descriptor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/messaging/Descriptor.cpp' object='common/messaging/common_libolacommon_la-Descriptor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/messaging/common_libolacommon_la-Descriptor.lo `test -f 'common/messaging/Descriptor.cpp' || echo '$(srcdir)/'`common/messaging/Descriptor.cpp common/messaging/common_libolacommon_la-Message.lo: common/messaging/Message.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/messaging/common_libolacommon_la-Message.lo -MD -MP -MF common/messaging/$(DEPDIR)/common_libolacommon_la-Message.Tpo -c -o common/messaging/common_libolacommon_la-Message.lo `test -f 'common/messaging/Message.cpp' || echo '$(srcdir)/'`common/messaging/Message.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/messaging/$(DEPDIR)/common_libolacommon_la-Message.Tpo common/messaging/$(DEPDIR)/common_libolacommon_la-Message.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/messaging/Message.cpp' object='common/messaging/common_libolacommon_la-Message.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/messaging/common_libolacommon_la-Message.lo `test -f 'common/messaging/Message.cpp' || echo '$(srcdir)/'`common/messaging/Message.cpp common/messaging/common_libolacommon_la-MessagePrinter.lo: common/messaging/MessagePrinter.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/messaging/common_libolacommon_la-MessagePrinter.lo -MD -MP -MF common/messaging/$(DEPDIR)/common_libolacommon_la-MessagePrinter.Tpo -c -o common/messaging/common_libolacommon_la-MessagePrinter.lo `test -f 'common/messaging/MessagePrinter.cpp' || echo '$(srcdir)/'`common/messaging/MessagePrinter.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/messaging/$(DEPDIR)/common_libolacommon_la-MessagePrinter.Tpo common/messaging/$(DEPDIR)/common_libolacommon_la-MessagePrinter.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/messaging/MessagePrinter.cpp' object='common/messaging/common_libolacommon_la-MessagePrinter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/messaging/common_libolacommon_la-MessagePrinter.lo `test -f 'common/messaging/MessagePrinter.cpp' || echo '$(srcdir)/'`common/messaging/MessagePrinter.cpp common/messaging/common_libolacommon_la-SchemaPrinter.lo: common/messaging/SchemaPrinter.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/messaging/common_libolacommon_la-SchemaPrinter.lo -MD -MP -MF common/messaging/$(DEPDIR)/common_libolacommon_la-SchemaPrinter.Tpo -c -o common/messaging/common_libolacommon_la-SchemaPrinter.lo `test -f 'common/messaging/SchemaPrinter.cpp' || echo '$(srcdir)/'`common/messaging/SchemaPrinter.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/messaging/$(DEPDIR)/common_libolacommon_la-SchemaPrinter.Tpo common/messaging/$(DEPDIR)/common_libolacommon_la-SchemaPrinter.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/messaging/SchemaPrinter.cpp' object='common/messaging/common_libolacommon_la-SchemaPrinter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/messaging/common_libolacommon_la-SchemaPrinter.lo `test -f 'common/messaging/SchemaPrinter.cpp' || echo '$(srcdir)/'`common/messaging/SchemaPrinter.cpp common/network/common_libolacommon_la-AdvancedTCPConnector.lo: common/network/AdvancedTCPConnector.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-AdvancedTCPConnector.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-AdvancedTCPConnector.Tpo -c -o common/network/common_libolacommon_la-AdvancedTCPConnector.lo `test -f 'common/network/AdvancedTCPConnector.cpp' || echo '$(srcdir)/'`common/network/AdvancedTCPConnector.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-AdvancedTCPConnector.Tpo common/network/$(DEPDIR)/common_libolacommon_la-AdvancedTCPConnector.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/AdvancedTCPConnector.cpp' object='common/network/common_libolacommon_la-AdvancedTCPConnector.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-AdvancedTCPConnector.lo `test -f 'common/network/AdvancedTCPConnector.cpp' || echo '$(srcdir)/'`common/network/AdvancedTCPConnector.cpp common/network/common_libolacommon_la-HealthCheckedConnection.lo: common/network/HealthCheckedConnection.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-HealthCheckedConnection.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-HealthCheckedConnection.Tpo -c -o common/network/common_libolacommon_la-HealthCheckedConnection.lo `test -f 'common/network/HealthCheckedConnection.cpp' || echo '$(srcdir)/'`common/network/HealthCheckedConnection.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-HealthCheckedConnection.Tpo common/network/$(DEPDIR)/common_libolacommon_la-HealthCheckedConnection.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/HealthCheckedConnection.cpp' object='common/network/common_libolacommon_la-HealthCheckedConnection.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-HealthCheckedConnection.lo `test -f 'common/network/HealthCheckedConnection.cpp' || echo '$(srcdir)/'`common/network/HealthCheckedConnection.cpp common/network/common_libolacommon_la-IPV4Address.lo: common/network/IPV4Address.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-IPV4Address.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-IPV4Address.Tpo -c -o common/network/common_libolacommon_la-IPV4Address.lo `test -f 'common/network/IPV4Address.cpp' || echo '$(srcdir)/'`common/network/IPV4Address.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-IPV4Address.Tpo common/network/$(DEPDIR)/common_libolacommon_la-IPV4Address.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/IPV4Address.cpp' object='common/network/common_libolacommon_la-IPV4Address.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-IPV4Address.lo `test -f 'common/network/IPV4Address.cpp' || echo '$(srcdir)/'`common/network/IPV4Address.cpp common/network/common_libolacommon_la-Interface.lo: common/network/Interface.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-Interface.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-Interface.Tpo -c -o common/network/common_libolacommon_la-Interface.lo `test -f 'common/network/Interface.cpp' || echo '$(srcdir)/'`common/network/Interface.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-Interface.Tpo common/network/$(DEPDIR)/common_libolacommon_la-Interface.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/Interface.cpp' object='common/network/common_libolacommon_la-Interface.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-Interface.lo `test -f 'common/network/Interface.cpp' || echo '$(srcdir)/'`common/network/Interface.cpp common/network/common_libolacommon_la-InterfacePicker.lo: common/network/InterfacePicker.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-InterfacePicker.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-InterfacePicker.Tpo -c -o common/network/common_libolacommon_la-InterfacePicker.lo `test -f 'common/network/InterfacePicker.cpp' || echo '$(srcdir)/'`common/network/InterfacePicker.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-InterfacePicker.Tpo common/network/$(DEPDIR)/common_libolacommon_la-InterfacePicker.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/InterfacePicker.cpp' object='common/network/common_libolacommon_la-InterfacePicker.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-InterfacePicker.lo `test -f 'common/network/InterfacePicker.cpp' || echo '$(srcdir)/'`common/network/InterfacePicker.cpp common/network/common_libolacommon_la-MACAddress.lo: common/network/MACAddress.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-MACAddress.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-MACAddress.Tpo -c -o common/network/common_libolacommon_la-MACAddress.lo `test -f 'common/network/MACAddress.cpp' || echo '$(srcdir)/'`common/network/MACAddress.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-MACAddress.Tpo common/network/$(DEPDIR)/common_libolacommon_la-MACAddress.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/MACAddress.cpp' object='common/network/common_libolacommon_la-MACAddress.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-MACAddress.lo `test -f 'common/network/MACAddress.cpp' || echo '$(srcdir)/'`common/network/MACAddress.cpp common/network/common_libolacommon_la-NetworkUtils.lo: common/network/NetworkUtils.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-NetworkUtils.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-NetworkUtils.Tpo -c -o common/network/common_libolacommon_la-NetworkUtils.lo `test -f 'common/network/NetworkUtils.cpp' || echo '$(srcdir)/'`common/network/NetworkUtils.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-NetworkUtils.Tpo common/network/$(DEPDIR)/common_libolacommon_la-NetworkUtils.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/NetworkUtils.cpp' object='common/network/common_libolacommon_la-NetworkUtils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-NetworkUtils.lo `test -f 'common/network/NetworkUtils.cpp' || echo '$(srcdir)/'`common/network/NetworkUtils.cpp common/network/common_libolacommon_la-Socket.lo: common/network/Socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-Socket.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-Socket.Tpo -c -o common/network/common_libolacommon_la-Socket.lo `test -f 'common/network/Socket.cpp' || echo '$(srcdir)/'`common/network/Socket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-Socket.Tpo common/network/$(DEPDIR)/common_libolacommon_la-Socket.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/Socket.cpp' object='common/network/common_libolacommon_la-Socket.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-Socket.lo `test -f 'common/network/Socket.cpp' || echo '$(srcdir)/'`common/network/Socket.cpp common/network/common_libolacommon_la-SocketAddress.lo: common/network/SocketAddress.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-SocketAddress.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-SocketAddress.Tpo -c -o common/network/common_libolacommon_la-SocketAddress.lo `test -f 'common/network/SocketAddress.cpp' || echo '$(srcdir)/'`common/network/SocketAddress.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-SocketAddress.Tpo common/network/$(DEPDIR)/common_libolacommon_la-SocketAddress.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/SocketAddress.cpp' object='common/network/common_libolacommon_la-SocketAddress.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-SocketAddress.lo `test -f 'common/network/SocketAddress.cpp' || echo '$(srcdir)/'`common/network/SocketAddress.cpp common/network/common_libolacommon_la-SocketCloser.lo: common/network/SocketCloser.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-SocketCloser.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-SocketCloser.Tpo -c -o common/network/common_libolacommon_la-SocketCloser.lo `test -f 'common/network/SocketCloser.cpp' || echo '$(srcdir)/'`common/network/SocketCloser.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-SocketCloser.Tpo common/network/$(DEPDIR)/common_libolacommon_la-SocketCloser.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/SocketCloser.cpp' object='common/network/common_libolacommon_la-SocketCloser.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-SocketCloser.lo `test -f 'common/network/SocketCloser.cpp' || echo '$(srcdir)/'`common/network/SocketCloser.cpp common/network/common_libolacommon_la-SocketHelper.lo: common/network/SocketHelper.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-SocketHelper.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-SocketHelper.Tpo -c -o common/network/common_libolacommon_la-SocketHelper.lo `test -f 'common/network/SocketHelper.cpp' || echo '$(srcdir)/'`common/network/SocketHelper.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-SocketHelper.Tpo common/network/$(DEPDIR)/common_libolacommon_la-SocketHelper.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/SocketHelper.cpp' object='common/network/common_libolacommon_la-SocketHelper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-SocketHelper.lo `test -f 'common/network/SocketHelper.cpp' || echo '$(srcdir)/'`common/network/SocketHelper.cpp common/network/common_libolacommon_la-TCPConnector.lo: common/network/TCPConnector.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-TCPConnector.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-TCPConnector.Tpo -c -o common/network/common_libolacommon_la-TCPConnector.lo `test -f 'common/network/TCPConnector.cpp' || echo '$(srcdir)/'`common/network/TCPConnector.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-TCPConnector.Tpo common/network/$(DEPDIR)/common_libolacommon_la-TCPConnector.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/TCPConnector.cpp' object='common/network/common_libolacommon_la-TCPConnector.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-TCPConnector.lo `test -f 'common/network/TCPConnector.cpp' || echo '$(srcdir)/'`common/network/TCPConnector.cpp common/network/common_libolacommon_la-TCPSocket.lo: common/network/TCPSocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-TCPSocket.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-TCPSocket.Tpo -c -o common/network/common_libolacommon_la-TCPSocket.lo `test -f 'common/network/TCPSocket.cpp' || echo '$(srcdir)/'`common/network/TCPSocket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-TCPSocket.Tpo common/network/$(DEPDIR)/common_libolacommon_la-TCPSocket.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/TCPSocket.cpp' object='common/network/common_libolacommon_la-TCPSocket.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-TCPSocket.lo `test -f 'common/network/TCPSocket.cpp' || echo '$(srcdir)/'`common/network/TCPSocket.cpp common/network/common_libolacommon_la-WindowsInterfacePicker.lo: common/network/WindowsInterfacePicker.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-WindowsInterfacePicker.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-WindowsInterfacePicker.Tpo -c -o common/network/common_libolacommon_la-WindowsInterfacePicker.lo `test -f 'common/network/WindowsInterfacePicker.cpp' || echo '$(srcdir)/'`common/network/WindowsInterfacePicker.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-WindowsInterfacePicker.Tpo common/network/$(DEPDIR)/common_libolacommon_la-WindowsInterfacePicker.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/WindowsInterfacePicker.cpp' object='common/network/common_libolacommon_la-WindowsInterfacePicker.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-WindowsInterfacePicker.lo `test -f 'common/network/WindowsInterfacePicker.cpp' || echo '$(srcdir)/'`common/network/WindowsInterfacePicker.cpp common/network/common_libolacommon_la-PosixInterfacePicker.lo: common/network/PosixInterfacePicker.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_libolacommon_la-PosixInterfacePicker.lo -MD -MP -MF common/network/$(DEPDIR)/common_libolacommon_la-PosixInterfacePicker.Tpo -c -o common/network/common_libolacommon_la-PosixInterfacePicker.lo `test -f 'common/network/PosixInterfacePicker.cpp' || echo '$(srcdir)/'`common/network/PosixInterfacePicker.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_libolacommon_la-PosixInterfacePicker.Tpo common/network/$(DEPDIR)/common_libolacommon_la-PosixInterfacePicker.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/PosixInterfacePicker.cpp' object='common/network/common_libolacommon_la-PosixInterfacePicker.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_libolacommon_la-PosixInterfacePicker.lo `test -f 'common/network/PosixInterfacePicker.cpp' || echo '$(srcdir)/'`common/network/PosixInterfacePicker.cpp common/rdm/common_libolacommon_la-AckTimerResponder.lo: common/rdm/AckTimerResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-AckTimerResponder.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-AckTimerResponder.Tpo -c -o common/rdm/common_libolacommon_la-AckTimerResponder.lo `test -f 'common/rdm/AckTimerResponder.cpp' || echo '$(srcdir)/'`common/rdm/AckTimerResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-AckTimerResponder.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-AckTimerResponder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/AckTimerResponder.cpp' object='common/rdm/common_libolacommon_la-AckTimerResponder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-AckTimerResponder.lo `test -f 'common/rdm/AckTimerResponder.cpp' || echo '$(srcdir)/'`common/rdm/AckTimerResponder.cpp common/rdm/common_libolacommon_la-AdvancedDimmerResponder.lo: common/rdm/AdvancedDimmerResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-AdvancedDimmerResponder.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-AdvancedDimmerResponder.Tpo -c -o common/rdm/common_libolacommon_la-AdvancedDimmerResponder.lo `test -f 'common/rdm/AdvancedDimmerResponder.cpp' || echo '$(srcdir)/'`common/rdm/AdvancedDimmerResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-AdvancedDimmerResponder.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-AdvancedDimmerResponder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/AdvancedDimmerResponder.cpp' object='common/rdm/common_libolacommon_la-AdvancedDimmerResponder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-AdvancedDimmerResponder.lo `test -f 'common/rdm/AdvancedDimmerResponder.cpp' || echo '$(srcdir)/'`common/rdm/AdvancedDimmerResponder.cpp common/rdm/common_libolacommon_la-CommandPrinter.lo: common/rdm/CommandPrinter.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-CommandPrinter.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-CommandPrinter.Tpo -c -o common/rdm/common_libolacommon_la-CommandPrinter.lo `test -f 'common/rdm/CommandPrinter.cpp' || echo '$(srcdir)/'`common/rdm/CommandPrinter.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-CommandPrinter.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-CommandPrinter.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/CommandPrinter.cpp' object='common/rdm/common_libolacommon_la-CommandPrinter.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-CommandPrinter.lo `test -f 'common/rdm/CommandPrinter.cpp' || echo '$(srcdir)/'`common/rdm/CommandPrinter.cpp common/rdm/common_libolacommon_la-DescriptorConsistencyChecker.lo: common/rdm/DescriptorConsistencyChecker.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-DescriptorConsistencyChecker.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-DescriptorConsistencyChecker.Tpo -c -o common/rdm/common_libolacommon_la-DescriptorConsistencyChecker.lo `test -f 'common/rdm/DescriptorConsistencyChecker.cpp' || echo '$(srcdir)/'`common/rdm/DescriptorConsistencyChecker.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-DescriptorConsistencyChecker.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-DescriptorConsistencyChecker.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/DescriptorConsistencyChecker.cpp' object='common/rdm/common_libolacommon_la-DescriptorConsistencyChecker.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-DescriptorConsistencyChecker.lo `test -f 'common/rdm/DescriptorConsistencyChecker.cpp' || echo '$(srcdir)/'`common/rdm/DescriptorConsistencyChecker.cpp common/rdm/common_libolacommon_la-DimmerResponder.lo: common/rdm/DimmerResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-DimmerResponder.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerResponder.Tpo -c -o common/rdm/common_libolacommon_la-DimmerResponder.lo `test -f 'common/rdm/DimmerResponder.cpp' || echo '$(srcdir)/'`common/rdm/DimmerResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerResponder.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerResponder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/DimmerResponder.cpp' object='common/rdm/common_libolacommon_la-DimmerResponder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-DimmerResponder.lo `test -f 'common/rdm/DimmerResponder.cpp' || echo '$(srcdir)/'`common/rdm/DimmerResponder.cpp common/rdm/common_libolacommon_la-DimmerRootDevice.lo: common/rdm/DimmerRootDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-DimmerRootDevice.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerRootDevice.Tpo -c -o common/rdm/common_libolacommon_la-DimmerRootDevice.lo `test -f 'common/rdm/DimmerRootDevice.cpp' || echo '$(srcdir)/'`common/rdm/DimmerRootDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerRootDevice.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerRootDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/DimmerRootDevice.cpp' object='common/rdm/common_libolacommon_la-DimmerRootDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-DimmerRootDevice.lo `test -f 'common/rdm/DimmerRootDevice.cpp' || echo '$(srcdir)/'`common/rdm/DimmerRootDevice.cpp common/rdm/common_libolacommon_la-DimmerSubDevice.lo: common/rdm/DimmerSubDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-DimmerSubDevice.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerSubDevice.Tpo -c -o common/rdm/common_libolacommon_la-DimmerSubDevice.lo `test -f 'common/rdm/DimmerSubDevice.cpp' || echo '$(srcdir)/'`common/rdm/DimmerSubDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerSubDevice.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-DimmerSubDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/DimmerSubDevice.cpp' object='common/rdm/common_libolacommon_la-DimmerSubDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-DimmerSubDevice.lo `test -f 'common/rdm/DimmerSubDevice.cpp' || echo '$(srcdir)/'`common/rdm/DimmerSubDevice.cpp common/rdm/common_libolacommon_la-DiscoveryAgent.lo: common/rdm/DiscoveryAgent.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-DiscoveryAgent.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-DiscoveryAgent.Tpo -c -o common/rdm/common_libolacommon_la-DiscoveryAgent.lo `test -f 'common/rdm/DiscoveryAgent.cpp' || echo '$(srcdir)/'`common/rdm/DiscoveryAgent.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-DiscoveryAgent.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-DiscoveryAgent.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/DiscoveryAgent.cpp' object='common/rdm/common_libolacommon_la-DiscoveryAgent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-DiscoveryAgent.lo `test -f 'common/rdm/DiscoveryAgent.cpp' || echo '$(srcdir)/'`common/rdm/DiscoveryAgent.cpp common/rdm/common_libolacommon_la-DummyResponder.lo: common/rdm/DummyResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-DummyResponder.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-DummyResponder.Tpo -c -o common/rdm/common_libolacommon_la-DummyResponder.lo `test -f 'common/rdm/DummyResponder.cpp' || echo '$(srcdir)/'`common/rdm/DummyResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-DummyResponder.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-DummyResponder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/DummyResponder.cpp' object='common/rdm/common_libolacommon_la-DummyResponder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-DummyResponder.lo `test -f 'common/rdm/DummyResponder.cpp' || echo '$(srcdir)/'`common/rdm/DummyResponder.cpp common/rdm/common_libolacommon_la-FakeNetworkManager.lo: common/rdm/FakeNetworkManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-FakeNetworkManager.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-FakeNetworkManager.Tpo -c -o common/rdm/common_libolacommon_la-FakeNetworkManager.lo `test -f 'common/rdm/FakeNetworkManager.cpp' || echo '$(srcdir)/'`common/rdm/FakeNetworkManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-FakeNetworkManager.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-FakeNetworkManager.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/FakeNetworkManager.cpp' object='common/rdm/common_libolacommon_la-FakeNetworkManager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-FakeNetworkManager.lo `test -f 'common/rdm/FakeNetworkManager.cpp' || echo '$(srcdir)/'`common/rdm/FakeNetworkManager.cpp common/rdm/common_libolacommon_la-GroupSizeCalculator.lo: common/rdm/GroupSizeCalculator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-GroupSizeCalculator.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-GroupSizeCalculator.Tpo -c -o common/rdm/common_libolacommon_la-GroupSizeCalculator.lo `test -f 'common/rdm/GroupSizeCalculator.cpp' || echo '$(srcdir)/'`common/rdm/GroupSizeCalculator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-GroupSizeCalculator.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-GroupSizeCalculator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/GroupSizeCalculator.cpp' object='common/rdm/common_libolacommon_la-GroupSizeCalculator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-GroupSizeCalculator.lo `test -f 'common/rdm/GroupSizeCalculator.cpp' || echo '$(srcdir)/'`common/rdm/GroupSizeCalculator.cpp common/rdm/common_libolacommon_la-MessageDeserializer.lo: common/rdm/MessageDeserializer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-MessageDeserializer.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-MessageDeserializer.Tpo -c -o common/rdm/common_libolacommon_la-MessageDeserializer.lo `test -f 'common/rdm/MessageDeserializer.cpp' || echo '$(srcdir)/'`common/rdm/MessageDeserializer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-MessageDeserializer.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-MessageDeserializer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/MessageDeserializer.cpp' object='common/rdm/common_libolacommon_la-MessageDeserializer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-MessageDeserializer.lo `test -f 'common/rdm/MessageDeserializer.cpp' || echo '$(srcdir)/'`common/rdm/MessageDeserializer.cpp common/rdm/common_libolacommon_la-MessageSerializer.lo: common/rdm/MessageSerializer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-MessageSerializer.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-MessageSerializer.Tpo -c -o common/rdm/common_libolacommon_la-MessageSerializer.lo `test -f 'common/rdm/MessageSerializer.cpp' || echo '$(srcdir)/'`common/rdm/MessageSerializer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-MessageSerializer.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-MessageSerializer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/MessageSerializer.cpp' object='common/rdm/common_libolacommon_la-MessageSerializer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-MessageSerializer.lo `test -f 'common/rdm/MessageSerializer.cpp' || echo '$(srcdir)/'`common/rdm/MessageSerializer.cpp common/rdm/common_libolacommon_la-MovingLightResponder.lo: common/rdm/MovingLightResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-MovingLightResponder.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-MovingLightResponder.Tpo -c -o common/rdm/common_libolacommon_la-MovingLightResponder.lo `test -f 'common/rdm/MovingLightResponder.cpp' || echo '$(srcdir)/'`common/rdm/MovingLightResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-MovingLightResponder.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-MovingLightResponder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/MovingLightResponder.cpp' object='common/rdm/common_libolacommon_la-MovingLightResponder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-MovingLightResponder.lo `test -f 'common/rdm/MovingLightResponder.cpp' || echo '$(srcdir)/'`common/rdm/MovingLightResponder.cpp common/rdm/common_libolacommon_la-NetworkManager.lo: common/rdm/NetworkManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-NetworkManager.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-NetworkManager.Tpo -c -o common/rdm/common_libolacommon_la-NetworkManager.lo `test -f 'common/rdm/NetworkManager.cpp' || echo '$(srcdir)/'`common/rdm/NetworkManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-NetworkManager.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-NetworkManager.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/NetworkManager.cpp' object='common/rdm/common_libolacommon_la-NetworkManager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-NetworkManager.lo `test -f 'common/rdm/NetworkManager.cpp' || echo '$(srcdir)/'`common/rdm/NetworkManager.cpp common/rdm/common_libolacommon_la-NetworkResponder.lo: common/rdm/NetworkResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-NetworkResponder.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-NetworkResponder.Tpo -c -o common/rdm/common_libolacommon_la-NetworkResponder.lo `test -f 'common/rdm/NetworkResponder.cpp' || echo '$(srcdir)/'`common/rdm/NetworkResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-NetworkResponder.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-NetworkResponder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/NetworkResponder.cpp' object='common/rdm/common_libolacommon_la-NetworkResponder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-NetworkResponder.lo `test -f 'common/rdm/NetworkResponder.cpp' || echo '$(srcdir)/'`common/rdm/NetworkResponder.cpp common/rdm/common_libolacommon_la-OpenLightingEnums.lo: common/rdm/OpenLightingEnums.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-OpenLightingEnums.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-OpenLightingEnums.Tpo -c -o common/rdm/common_libolacommon_la-OpenLightingEnums.lo `test -f 'common/rdm/OpenLightingEnums.cpp' || echo '$(srcdir)/'`common/rdm/OpenLightingEnums.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-OpenLightingEnums.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-OpenLightingEnums.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/OpenLightingEnums.cpp' object='common/rdm/common_libolacommon_la-OpenLightingEnums.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-OpenLightingEnums.lo `test -f 'common/rdm/OpenLightingEnums.cpp' || echo '$(srcdir)/'`common/rdm/OpenLightingEnums.cpp common/rdm/common_libolacommon_la-PidStore.lo: common/rdm/PidStore.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-PidStore.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-PidStore.Tpo -c -o common/rdm/common_libolacommon_la-PidStore.lo `test -f 'common/rdm/PidStore.cpp' || echo '$(srcdir)/'`common/rdm/PidStore.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-PidStore.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-PidStore.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/PidStore.cpp' object='common/rdm/common_libolacommon_la-PidStore.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-PidStore.lo `test -f 'common/rdm/PidStore.cpp' || echo '$(srcdir)/'`common/rdm/PidStore.cpp common/rdm/common_libolacommon_la-PidStoreHelper.lo: common/rdm/PidStoreHelper.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-PidStoreHelper.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-PidStoreHelper.Tpo -c -o common/rdm/common_libolacommon_la-PidStoreHelper.lo `test -f 'common/rdm/PidStoreHelper.cpp' || echo '$(srcdir)/'`common/rdm/PidStoreHelper.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-PidStoreHelper.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-PidStoreHelper.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/PidStoreHelper.cpp' object='common/rdm/common_libolacommon_la-PidStoreHelper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-PidStoreHelper.lo `test -f 'common/rdm/PidStoreHelper.cpp' || echo '$(srcdir)/'`common/rdm/PidStoreHelper.cpp common/rdm/common_libolacommon_la-PidStoreLoader.lo: common/rdm/PidStoreLoader.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-PidStoreLoader.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-PidStoreLoader.Tpo -c -o common/rdm/common_libolacommon_la-PidStoreLoader.lo `test -f 'common/rdm/PidStoreLoader.cpp' || echo '$(srcdir)/'`common/rdm/PidStoreLoader.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-PidStoreLoader.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-PidStoreLoader.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/PidStoreLoader.cpp' object='common/rdm/common_libolacommon_la-PidStoreLoader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-PidStoreLoader.lo `test -f 'common/rdm/PidStoreLoader.cpp' || echo '$(srcdir)/'`common/rdm/PidStoreLoader.cpp common/rdm/common_libolacommon_la-QueueingRDMController.lo: common/rdm/QueueingRDMController.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-QueueingRDMController.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-QueueingRDMController.Tpo -c -o common/rdm/common_libolacommon_la-QueueingRDMController.lo `test -f 'common/rdm/QueueingRDMController.cpp' || echo '$(srcdir)/'`common/rdm/QueueingRDMController.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-QueueingRDMController.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-QueueingRDMController.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/QueueingRDMController.cpp' object='common/rdm/common_libolacommon_la-QueueingRDMController.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-QueueingRDMController.lo `test -f 'common/rdm/QueueingRDMController.cpp' || echo '$(srcdir)/'`common/rdm/QueueingRDMController.cpp common/rdm/common_libolacommon_la-RDMAPI.lo: common/rdm/RDMAPI.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-RDMAPI.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-RDMAPI.Tpo -c -o common/rdm/common_libolacommon_la-RDMAPI.lo `test -f 'common/rdm/RDMAPI.cpp' || echo '$(srcdir)/'`common/rdm/RDMAPI.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-RDMAPI.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-RDMAPI.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMAPI.cpp' object='common/rdm/common_libolacommon_la-RDMAPI.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-RDMAPI.lo `test -f 'common/rdm/RDMAPI.cpp' || echo '$(srcdir)/'`common/rdm/RDMAPI.cpp common/rdm/common_libolacommon_la-RDMCommand.lo: common/rdm/RDMCommand.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-RDMCommand.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-RDMCommand.Tpo -c -o common/rdm/common_libolacommon_la-RDMCommand.lo `test -f 'common/rdm/RDMCommand.cpp' || echo '$(srcdir)/'`common/rdm/RDMCommand.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-RDMCommand.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-RDMCommand.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMCommand.cpp' object='common/rdm/common_libolacommon_la-RDMCommand.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-RDMCommand.lo `test -f 'common/rdm/RDMCommand.cpp' || echo '$(srcdir)/'`common/rdm/RDMCommand.cpp common/rdm/common_libolacommon_la-RDMCommandSerializer.lo: common/rdm/RDMCommandSerializer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-RDMCommandSerializer.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-RDMCommandSerializer.Tpo -c -o common/rdm/common_libolacommon_la-RDMCommandSerializer.lo `test -f 'common/rdm/RDMCommandSerializer.cpp' || echo '$(srcdir)/'`common/rdm/RDMCommandSerializer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-RDMCommandSerializer.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-RDMCommandSerializer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMCommandSerializer.cpp' object='common/rdm/common_libolacommon_la-RDMCommandSerializer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-RDMCommandSerializer.lo `test -f 'common/rdm/RDMCommandSerializer.cpp' || echo '$(srcdir)/'`common/rdm/RDMCommandSerializer.cpp common/rdm/common_libolacommon_la-RDMFrame.lo: common/rdm/RDMFrame.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-RDMFrame.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-RDMFrame.Tpo -c -o common/rdm/common_libolacommon_la-RDMFrame.lo `test -f 'common/rdm/RDMFrame.cpp' || echo '$(srcdir)/'`common/rdm/RDMFrame.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-RDMFrame.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-RDMFrame.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMFrame.cpp' object='common/rdm/common_libolacommon_la-RDMFrame.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-RDMFrame.lo `test -f 'common/rdm/RDMFrame.cpp' || echo '$(srcdir)/'`common/rdm/RDMFrame.cpp common/rdm/common_libolacommon_la-RDMHelper.lo: common/rdm/RDMHelper.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-RDMHelper.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-RDMHelper.Tpo -c -o common/rdm/common_libolacommon_la-RDMHelper.lo `test -f 'common/rdm/RDMHelper.cpp' || echo '$(srcdir)/'`common/rdm/RDMHelper.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-RDMHelper.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-RDMHelper.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMHelper.cpp' object='common/rdm/common_libolacommon_la-RDMHelper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-RDMHelper.lo `test -f 'common/rdm/RDMHelper.cpp' || echo '$(srcdir)/'`common/rdm/RDMHelper.cpp common/rdm/common_libolacommon_la-RDMReply.lo: common/rdm/RDMReply.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-RDMReply.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-RDMReply.Tpo -c -o common/rdm/common_libolacommon_la-RDMReply.lo `test -f 'common/rdm/RDMReply.cpp' || echo '$(srcdir)/'`common/rdm/RDMReply.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-RDMReply.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-RDMReply.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMReply.cpp' object='common/rdm/common_libolacommon_la-RDMReply.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-RDMReply.lo `test -f 'common/rdm/RDMReply.cpp' || echo '$(srcdir)/'`common/rdm/RDMReply.cpp common/rdm/common_libolacommon_la-ResponderHelper.lo: common/rdm/ResponderHelper.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-ResponderHelper.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderHelper.Tpo -c -o common/rdm/common_libolacommon_la-ResponderHelper.lo `test -f 'common/rdm/ResponderHelper.cpp' || echo '$(srcdir)/'`common/rdm/ResponderHelper.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderHelper.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderHelper.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/ResponderHelper.cpp' object='common/rdm/common_libolacommon_la-ResponderHelper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-ResponderHelper.lo `test -f 'common/rdm/ResponderHelper.cpp' || echo '$(srcdir)/'`common/rdm/ResponderHelper.cpp common/rdm/common_libolacommon_la-ResponderLoadSensor.lo: common/rdm/ResponderLoadSensor.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-ResponderLoadSensor.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderLoadSensor.Tpo -c -o common/rdm/common_libolacommon_la-ResponderLoadSensor.lo `test -f 'common/rdm/ResponderLoadSensor.cpp' || echo '$(srcdir)/'`common/rdm/ResponderLoadSensor.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderLoadSensor.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderLoadSensor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/ResponderLoadSensor.cpp' object='common/rdm/common_libolacommon_la-ResponderLoadSensor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-ResponderLoadSensor.lo `test -f 'common/rdm/ResponderLoadSensor.cpp' || echo '$(srcdir)/'`common/rdm/ResponderLoadSensor.cpp common/rdm/common_libolacommon_la-ResponderPersonality.lo: common/rdm/ResponderPersonality.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-ResponderPersonality.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderPersonality.Tpo -c -o common/rdm/common_libolacommon_la-ResponderPersonality.lo `test -f 'common/rdm/ResponderPersonality.cpp' || echo '$(srcdir)/'`common/rdm/ResponderPersonality.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderPersonality.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderPersonality.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/ResponderPersonality.cpp' object='common/rdm/common_libolacommon_la-ResponderPersonality.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-ResponderPersonality.lo `test -f 'common/rdm/ResponderPersonality.cpp' || echo '$(srcdir)/'`common/rdm/ResponderPersonality.cpp common/rdm/common_libolacommon_la-ResponderSettings.lo: common/rdm/ResponderSettings.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-ResponderSettings.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderSettings.Tpo -c -o common/rdm/common_libolacommon_la-ResponderSettings.lo `test -f 'common/rdm/ResponderSettings.cpp' || echo '$(srcdir)/'`common/rdm/ResponderSettings.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderSettings.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderSettings.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/ResponderSettings.cpp' object='common/rdm/common_libolacommon_la-ResponderSettings.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-ResponderSettings.lo `test -f 'common/rdm/ResponderSettings.cpp' || echo '$(srcdir)/'`common/rdm/ResponderSettings.cpp common/rdm/common_libolacommon_la-ResponderSlotData.lo: common/rdm/ResponderSlotData.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-ResponderSlotData.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderSlotData.Tpo -c -o common/rdm/common_libolacommon_la-ResponderSlotData.lo `test -f 'common/rdm/ResponderSlotData.cpp' || echo '$(srcdir)/'`common/rdm/ResponderSlotData.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderSlotData.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-ResponderSlotData.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/ResponderSlotData.cpp' object='common/rdm/common_libolacommon_la-ResponderSlotData.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-ResponderSlotData.lo `test -f 'common/rdm/ResponderSlotData.cpp' || echo '$(srcdir)/'`common/rdm/ResponderSlotData.cpp common/rdm/common_libolacommon_la-SensorResponder.lo: common/rdm/SensorResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-SensorResponder.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-SensorResponder.Tpo -c -o common/rdm/common_libolacommon_la-SensorResponder.lo `test -f 'common/rdm/SensorResponder.cpp' || echo '$(srcdir)/'`common/rdm/SensorResponder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-SensorResponder.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-SensorResponder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/SensorResponder.cpp' object='common/rdm/common_libolacommon_la-SensorResponder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-SensorResponder.lo `test -f 'common/rdm/SensorResponder.cpp' || echo '$(srcdir)/'`common/rdm/SensorResponder.cpp common/rdm/common_libolacommon_la-StringMessageBuilder.lo: common/rdm/StringMessageBuilder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-StringMessageBuilder.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-StringMessageBuilder.Tpo -c -o common/rdm/common_libolacommon_la-StringMessageBuilder.lo `test -f 'common/rdm/StringMessageBuilder.cpp' || echo '$(srcdir)/'`common/rdm/StringMessageBuilder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-StringMessageBuilder.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-StringMessageBuilder.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/StringMessageBuilder.cpp' object='common/rdm/common_libolacommon_la-StringMessageBuilder.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-StringMessageBuilder.lo `test -f 'common/rdm/StringMessageBuilder.cpp' || echo '$(srcdir)/'`common/rdm/StringMessageBuilder.cpp common/rdm/common_libolacommon_la-SubDeviceDispatcher.lo: common/rdm/SubDeviceDispatcher.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-SubDeviceDispatcher.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-SubDeviceDispatcher.Tpo -c -o common/rdm/common_libolacommon_la-SubDeviceDispatcher.lo `test -f 'common/rdm/SubDeviceDispatcher.cpp' || echo '$(srcdir)/'`common/rdm/SubDeviceDispatcher.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-SubDeviceDispatcher.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-SubDeviceDispatcher.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/SubDeviceDispatcher.cpp' object='common/rdm/common_libolacommon_la-SubDeviceDispatcher.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-SubDeviceDispatcher.lo `test -f 'common/rdm/SubDeviceDispatcher.cpp' || echo '$(srcdir)/'`common/rdm/SubDeviceDispatcher.cpp common/rdm/common_libolacommon_la-UID.lo: common/rdm/UID.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-UID.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-UID.Tpo -c -o common/rdm/common_libolacommon_la-UID.lo `test -f 'common/rdm/UID.cpp' || echo '$(srcdir)/'`common/rdm/UID.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-UID.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-UID.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/UID.cpp' object='common/rdm/common_libolacommon_la-UID.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-UID.lo `test -f 'common/rdm/UID.cpp' || echo '$(srcdir)/'`common/rdm/UID.cpp common/rdm/common_libolacommon_la-VariableFieldSizeCalculator.lo: common/rdm/VariableFieldSizeCalculator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-VariableFieldSizeCalculator.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-VariableFieldSizeCalculator.Tpo -c -o common/rdm/common_libolacommon_la-VariableFieldSizeCalculator.lo `test -f 'common/rdm/VariableFieldSizeCalculator.cpp' || echo '$(srcdir)/'`common/rdm/VariableFieldSizeCalculator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-VariableFieldSizeCalculator.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-VariableFieldSizeCalculator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/VariableFieldSizeCalculator.cpp' object='common/rdm/common_libolacommon_la-VariableFieldSizeCalculator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-VariableFieldSizeCalculator.lo `test -f 'common/rdm/VariableFieldSizeCalculator.cpp' || echo '$(srcdir)/'`common/rdm/VariableFieldSizeCalculator.cpp common/rpc/common_libolacommon_la-RpcChannel.lo: common/rpc/RpcChannel.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_libolacommon_la-RpcChannel.lo -MD -MP -MF common/rpc/$(DEPDIR)/common_libolacommon_la-RpcChannel.Tpo -c -o common/rpc/common_libolacommon_la-RpcChannel.lo `test -f 'common/rpc/RpcChannel.cpp' || echo '$(srcdir)/'`common/rpc/RpcChannel.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_libolacommon_la-RpcChannel.Tpo common/rpc/$(DEPDIR)/common_libolacommon_la-RpcChannel.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/RpcChannel.cpp' object='common/rpc/common_libolacommon_la-RpcChannel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_libolacommon_la-RpcChannel.lo `test -f 'common/rpc/RpcChannel.cpp' || echo '$(srcdir)/'`common/rpc/RpcChannel.cpp common/rpc/common_libolacommon_la-RpcController.lo: common/rpc/RpcController.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_libolacommon_la-RpcController.lo -MD -MP -MF common/rpc/$(DEPDIR)/common_libolacommon_la-RpcController.Tpo -c -o common/rpc/common_libolacommon_la-RpcController.lo `test -f 'common/rpc/RpcController.cpp' || echo '$(srcdir)/'`common/rpc/RpcController.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_libolacommon_la-RpcController.Tpo common/rpc/$(DEPDIR)/common_libolacommon_la-RpcController.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/RpcController.cpp' object='common/rpc/common_libolacommon_la-RpcController.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_libolacommon_la-RpcController.lo `test -f 'common/rpc/RpcController.cpp' || echo '$(srcdir)/'`common/rpc/RpcController.cpp common/rpc/common_libolacommon_la-RpcServer.lo: common/rpc/RpcServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_libolacommon_la-RpcServer.lo -MD -MP -MF common/rpc/$(DEPDIR)/common_libolacommon_la-RpcServer.Tpo -c -o common/rpc/common_libolacommon_la-RpcServer.lo `test -f 'common/rpc/RpcServer.cpp' || echo '$(srcdir)/'`common/rpc/RpcServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_libolacommon_la-RpcServer.Tpo common/rpc/$(DEPDIR)/common_libolacommon_la-RpcServer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/RpcServer.cpp' object='common/rpc/common_libolacommon_la-RpcServer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_libolacommon_la-RpcServer.lo `test -f 'common/rpc/RpcServer.cpp' || echo '$(srcdir)/'`common/rpc/RpcServer.cpp common/strings/common_libolacommon_la-Format.lo: common/strings/Format.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/strings/common_libolacommon_la-Format.lo -MD -MP -MF common/strings/$(DEPDIR)/common_libolacommon_la-Format.Tpo -c -o common/strings/common_libolacommon_la-Format.lo `test -f 'common/strings/Format.cpp' || echo '$(srcdir)/'`common/strings/Format.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/strings/$(DEPDIR)/common_libolacommon_la-Format.Tpo common/strings/$(DEPDIR)/common_libolacommon_la-Format.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/strings/Format.cpp' object='common/strings/common_libolacommon_la-Format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/strings/common_libolacommon_la-Format.lo `test -f 'common/strings/Format.cpp' || echo '$(srcdir)/'`common/strings/Format.cpp common/strings/common_libolacommon_la-Utils.lo: common/strings/Utils.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/strings/common_libolacommon_la-Utils.lo -MD -MP -MF common/strings/$(DEPDIR)/common_libolacommon_la-Utils.Tpo -c -o common/strings/common_libolacommon_la-Utils.lo `test -f 'common/strings/Utils.cpp' || echo '$(srcdir)/'`common/strings/Utils.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/strings/$(DEPDIR)/common_libolacommon_la-Utils.Tpo common/strings/$(DEPDIR)/common_libolacommon_la-Utils.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/strings/Utils.cpp' object='common/strings/common_libolacommon_la-Utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/strings/common_libolacommon_la-Utils.lo `test -f 'common/strings/Utils.cpp' || echo '$(srcdir)/'`common/strings/Utils.cpp common/system/common_libolacommon_la-Limits.lo: common/system/Limits.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/system/common_libolacommon_la-Limits.lo -MD -MP -MF common/system/$(DEPDIR)/common_libolacommon_la-Limits.Tpo -c -o common/system/common_libolacommon_la-Limits.lo `test -f 'common/system/Limits.cpp' || echo '$(srcdir)/'`common/system/Limits.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/system/$(DEPDIR)/common_libolacommon_la-Limits.Tpo common/system/$(DEPDIR)/common_libolacommon_la-Limits.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/system/Limits.cpp' object='common/system/common_libolacommon_la-Limits.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/system/common_libolacommon_la-Limits.lo `test -f 'common/system/Limits.cpp' || echo '$(srcdir)/'`common/system/Limits.cpp common/system/common_libolacommon_la-SystemUtils.lo: common/system/SystemUtils.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/system/common_libolacommon_la-SystemUtils.lo -MD -MP -MF common/system/$(DEPDIR)/common_libolacommon_la-SystemUtils.Tpo -c -o common/system/common_libolacommon_la-SystemUtils.lo `test -f 'common/system/SystemUtils.cpp' || echo '$(srcdir)/'`common/system/SystemUtils.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/system/$(DEPDIR)/common_libolacommon_la-SystemUtils.Tpo common/system/$(DEPDIR)/common_libolacommon_la-SystemUtils.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/system/SystemUtils.cpp' object='common/system/common_libolacommon_la-SystemUtils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/system/common_libolacommon_la-SystemUtils.lo `test -f 'common/system/SystemUtils.cpp' || echo '$(srcdir)/'`common/system/SystemUtils.cpp common/thread/common_libolacommon_la-ConsumerThread.lo: common/thread/ConsumerThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_libolacommon_la-ConsumerThread.lo -MD -MP -MF common/thread/$(DEPDIR)/common_libolacommon_la-ConsumerThread.Tpo -c -o common/thread/common_libolacommon_la-ConsumerThread.lo `test -f 'common/thread/ConsumerThread.cpp' || echo '$(srcdir)/'`common/thread/ConsumerThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_libolacommon_la-ConsumerThread.Tpo common/thread/$(DEPDIR)/common_libolacommon_la-ConsumerThread.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/ConsumerThread.cpp' object='common/thread/common_libolacommon_la-ConsumerThread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_libolacommon_la-ConsumerThread.lo `test -f 'common/thread/ConsumerThread.cpp' || echo '$(srcdir)/'`common/thread/ConsumerThread.cpp common/thread/common_libolacommon_la-ExecutorThread.lo: common/thread/ExecutorThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_libolacommon_la-ExecutorThread.lo -MD -MP -MF common/thread/$(DEPDIR)/common_libolacommon_la-ExecutorThread.Tpo -c -o common/thread/common_libolacommon_la-ExecutorThread.lo `test -f 'common/thread/ExecutorThread.cpp' || echo '$(srcdir)/'`common/thread/ExecutorThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_libolacommon_la-ExecutorThread.Tpo common/thread/$(DEPDIR)/common_libolacommon_la-ExecutorThread.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/ExecutorThread.cpp' object='common/thread/common_libolacommon_la-ExecutorThread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_libolacommon_la-ExecutorThread.lo `test -f 'common/thread/ExecutorThread.cpp' || echo '$(srcdir)/'`common/thread/ExecutorThread.cpp common/thread/common_libolacommon_la-Mutex.lo: common/thread/Mutex.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_libolacommon_la-Mutex.lo -MD -MP -MF common/thread/$(DEPDIR)/common_libolacommon_la-Mutex.Tpo -c -o common/thread/common_libolacommon_la-Mutex.lo `test -f 'common/thread/Mutex.cpp' || echo '$(srcdir)/'`common/thread/Mutex.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_libolacommon_la-Mutex.Tpo common/thread/$(DEPDIR)/common_libolacommon_la-Mutex.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/Mutex.cpp' object='common/thread/common_libolacommon_la-Mutex.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_libolacommon_la-Mutex.lo `test -f 'common/thread/Mutex.cpp' || echo '$(srcdir)/'`common/thread/Mutex.cpp common/thread/common_libolacommon_la-PeriodicThread.lo: common/thread/PeriodicThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_libolacommon_la-PeriodicThread.lo -MD -MP -MF common/thread/$(DEPDIR)/common_libolacommon_la-PeriodicThread.Tpo -c -o common/thread/common_libolacommon_la-PeriodicThread.lo `test -f 'common/thread/PeriodicThread.cpp' || echo '$(srcdir)/'`common/thread/PeriodicThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_libolacommon_la-PeriodicThread.Tpo common/thread/$(DEPDIR)/common_libolacommon_la-PeriodicThread.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/PeriodicThread.cpp' object='common/thread/common_libolacommon_la-PeriodicThread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_libolacommon_la-PeriodicThread.lo `test -f 'common/thread/PeriodicThread.cpp' || echo '$(srcdir)/'`common/thread/PeriodicThread.cpp common/thread/common_libolacommon_la-SignalThread.lo: common/thread/SignalThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_libolacommon_la-SignalThread.lo -MD -MP -MF common/thread/$(DEPDIR)/common_libolacommon_la-SignalThread.Tpo -c -o common/thread/common_libolacommon_la-SignalThread.lo `test -f 'common/thread/SignalThread.cpp' || echo '$(srcdir)/'`common/thread/SignalThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_libolacommon_la-SignalThread.Tpo common/thread/$(DEPDIR)/common_libolacommon_la-SignalThread.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/SignalThread.cpp' object='common/thread/common_libolacommon_la-SignalThread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_libolacommon_la-SignalThread.lo `test -f 'common/thread/SignalThread.cpp' || echo '$(srcdir)/'`common/thread/SignalThread.cpp common/thread/common_libolacommon_la-Thread.lo: common/thread/Thread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_libolacommon_la-Thread.lo -MD -MP -MF common/thread/$(DEPDIR)/common_libolacommon_la-Thread.Tpo -c -o common/thread/common_libolacommon_la-Thread.lo `test -f 'common/thread/Thread.cpp' || echo '$(srcdir)/'`common/thread/Thread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_libolacommon_la-Thread.Tpo common/thread/$(DEPDIR)/common_libolacommon_la-Thread.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/Thread.cpp' object='common/thread/common_libolacommon_la-Thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_libolacommon_la-Thread.lo `test -f 'common/thread/Thread.cpp' || echo '$(srcdir)/'`common/thread/Thread.cpp common/thread/common_libolacommon_la-ThreadPool.lo: common/thread/ThreadPool.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_libolacommon_la-ThreadPool.lo -MD -MP -MF common/thread/$(DEPDIR)/common_libolacommon_la-ThreadPool.Tpo -c -o common/thread/common_libolacommon_la-ThreadPool.lo `test -f 'common/thread/ThreadPool.cpp' || echo '$(srcdir)/'`common/thread/ThreadPool.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_libolacommon_la-ThreadPool.Tpo common/thread/$(DEPDIR)/common_libolacommon_la-ThreadPool.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/ThreadPool.cpp' object='common/thread/common_libolacommon_la-ThreadPool.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_libolacommon_la-ThreadPool.lo `test -f 'common/thread/ThreadPool.cpp' || echo '$(srcdir)/'`common/thread/ThreadPool.cpp common/thread/common_libolacommon_la-Utils.lo: common/thread/Utils.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_libolacommon_la-Utils.lo -MD -MP -MF common/thread/$(DEPDIR)/common_libolacommon_la-Utils.Tpo -c -o common/thread/common_libolacommon_la-Utils.lo `test -f 'common/thread/Utils.cpp' || echo '$(srcdir)/'`common/thread/Utils.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_libolacommon_la-Utils.Tpo common/thread/$(DEPDIR)/common_libolacommon_la-Utils.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/Utils.cpp' object='common/thread/common_libolacommon_la-Utils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_libolacommon_la-Utils.lo `test -f 'common/thread/Utils.cpp' || echo '$(srcdir)/'`common/thread/Utils.cpp common/timecode/common_libolacommon_la-TimeCode.lo: common/timecode/TimeCode.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/timecode/common_libolacommon_la-TimeCode.lo -MD -MP -MF common/timecode/$(DEPDIR)/common_libolacommon_la-TimeCode.Tpo -c -o common/timecode/common_libolacommon_la-TimeCode.lo `test -f 'common/timecode/TimeCode.cpp' || echo '$(srcdir)/'`common/timecode/TimeCode.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/timecode/$(DEPDIR)/common_libolacommon_la-TimeCode.Tpo common/timecode/$(DEPDIR)/common_libolacommon_la-TimeCode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/timecode/TimeCode.cpp' object='common/timecode/common_libolacommon_la-TimeCode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/timecode/common_libolacommon_la-TimeCode.lo `test -f 'common/timecode/TimeCode.cpp' || echo '$(srcdir)/'`common/timecode/TimeCode.cpp common/utils/common_libolacommon_la-ActionQueue.lo: common/utils/ActionQueue.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_libolacommon_la-ActionQueue.lo -MD -MP -MF common/utils/$(DEPDIR)/common_libolacommon_la-ActionQueue.Tpo -c -o common/utils/common_libolacommon_la-ActionQueue.lo `test -f 'common/utils/ActionQueue.cpp' || echo '$(srcdir)/'`common/utils/ActionQueue.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_libolacommon_la-ActionQueue.Tpo common/utils/$(DEPDIR)/common_libolacommon_la-ActionQueue.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/ActionQueue.cpp' object='common/utils/common_libolacommon_la-ActionQueue.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_libolacommon_la-ActionQueue.lo `test -f 'common/utils/ActionQueue.cpp' || echo '$(srcdir)/'`common/utils/ActionQueue.cpp common/utils/common_libolacommon_la-Clock.lo: common/utils/Clock.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_libolacommon_la-Clock.lo -MD -MP -MF common/utils/$(DEPDIR)/common_libolacommon_la-Clock.Tpo -c -o common/utils/common_libolacommon_la-Clock.lo `test -f 'common/utils/Clock.cpp' || echo '$(srcdir)/'`common/utils/Clock.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_libolacommon_la-Clock.Tpo common/utils/$(DEPDIR)/common_libolacommon_la-Clock.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/Clock.cpp' object='common/utils/common_libolacommon_la-Clock.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_libolacommon_la-Clock.lo `test -f 'common/utils/Clock.cpp' || echo '$(srcdir)/'`common/utils/Clock.cpp common/utils/common_libolacommon_la-DmxBuffer.lo: common/utils/DmxBuffer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_libolacommon_la-DmxBuffer.lo -MD -MP -MF common/utils/$(DEPDIR)/common_libolacommon_la-DmxBuffer.Tpo -c -o common/utils/common_libolacommon_la-DmxBuffer.lo `test -f 'common/utils/DmxBuffer.cpp' || echo '$(srcdir)/'`common/utils/DmxBuffer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_libolacommon_la-DmxBuffer.Tpo common/utils/$(DEPDIR)/common_libolacommon_la-DmxBuffer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/DmxBuffer.cpp' object='common/utils/common_libolacommon_la-DmxBuffer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_libolacommon_la-DmxBuffer.lo `test -f 'common/utils/DmxBuffer.cpp' || echo '$(srcdir)/'`common/utils/DmxBuffer.cpp common/utils/common_libolacommon_la-StringUtils.lo: common/utils/StringUtils.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_libolacommon_la-StringUtils.lo -MD -MP -MF common/utils/$(DEPDIR)/common_libolacommon_la-StringUtils.Tpo -c -o common/utils/common_libolacommon_la-StringUtils.lo `test -f 'common/utils/StringUtils.cpp' || echo '$(srcdir)/'`common/utils/StringUtils.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_libolacommon_la-StringUtils.Tpo common/utils/$(DEPDIR)/common_libolacommon_la-StringUtils.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/StringUtils.cpp' object='common/utils/common_libolacommon_la-StringUtils.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_libolacommon_la-StringUtils.lo `test -f 'common/utils/StringUtils.cpp' || echo '$(srcdir)/'`common/utils/StringUtils.cpp common/utils/common_libolacommon_la-TokenBucket.lo: common/utils/TokenBucket.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_libolacommon_la-TokenBucket.lo -MD -MP -MF common/utils/$(DEPDIR)/common_libolacommon_la-TokenBucket.Tpo -c -o common/utils/common_libolacommon_la-TokenBucket.lo `test -f 'common/utils/TokenBucket.cpp' || echo '$(srcdir)/'`common/utils/TokenBucket.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_libolacommon_la-TokenBucket.Tpo common/utils/$(DEPDIR)/common_libolacommon_la-TokenBucket.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/TokenBucket.cpp' object='common/utils/common_libolacommon_la-TokenBucket.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_libolacommon_la-TokenBucket.lo `test -f 'common/utils/TokenBucket.cpp' || echo '$(srcdir)/'`common/utils/TokenBucket.cpp common/utils/common_libolacommon_la-Watchdog.lo: common/utils/Watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_libolacommon_la-Watchdog.lo -MD -MP -MF common/utils/$(DEPDIR)/common_libolacommon_la-Watchdog.Tpo -c -o common/utils/common_libolacommon_la-Watchdog.lo `test -f 'common/utils/Watchdog.cpp' || echo '$(srcdir)/'`common/utils/Watchdog.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_libolacommon_la-Watchdog.Tpo common/utils/$(DEPDIR)/common_libolacommon_la-Watchdog.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/Watchdog.cpp' object='common/utils/common_libolacommon_la-Watchdog.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_libolacommon_la-Watchdog.lo `test -f 'common/utils/Watchdog.cpp' || echo '$(srcdir)/'`common/utils/Watchdog.cpp common/rdm/common_libolacommon_la-Pids.pb.lo: common/rdm/Pids.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_libolacommon_la-Pids.pb.lo -MD -MP -MF common/rdm/$(DEPDIR)/common_libolacommon_la-Pids.pb.Tpo -c -o common/rdm/common_libolacommon_la-Pids.pb.lo `test -f 'common/rdm/Pids.pb.cc' || echo '$(srcdir)/'`common/rdm/Pids.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_libolacommon_la-Pids.pb.Tpo common/rdm/$(DEPDIR)/common_libolacommon_la-Pids.pb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/Pids.pb.cc' object='common/rdm/common_libolacommon_la-Pids.pb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_libolacommon_la-Pids.pb.lo `test -f 'common/rdm/Pids.pb.cc' || echo '$(srcdir)/'`common/rdm/Pids.pb.cc common/rpc/common_libolacommon_la-Rpc.pb.lo: common/rpc/Rpc.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_libolacommon_la-Rpc.pb.lo -MD -MP -MF common/rpc/$(DEPDIR)/common_libolacommon_la-Rpc.pb.Tpo -c -o common/rpc/common_libolacommon_la-Rpc.pb.lo `test -f 'common/rpc/Rpc.pb.cc' || echo '$(srcdir)/'`common/rpc/Rpc.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_libolacommon_la-Rpc.pb.Tpo common/rpc/$(DEPDIR)/common_libolacommon_la-Rpc.pb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/Rpc.pb.cc' object='common/rpc/common_libolacommon_la-Rpc.pb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_libolacommon_la_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_libolacommon_la-Rpc.pb.lo `test -f 'common/rpc/Rpc.pb.cc' || echo '$(srcdir)/'`common/rpc/Rpc.pb.cc common/protocol/common_protocol_libolaproto_la-Ola.pb.lo: common/protocol/Ola.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_protocol_libolaproto_la_CXXFLAGS) $(CXXFLAGS) -MT common/protocol/common_protocol_libolaproto_la-Ola.pb.lo -MD -MP -MF common/protocol/$(DEPDIR)/common_protocol_libolaproto_la-Ola.pb.Tpo -c -o common/protocol/common_protocol_libolaproto_la-Ola.pb.lo `test -f 'common/protocol/Ola.pb.cc' || echo '$(srcdir)/'`common/protocol/Ola.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/protocol/$(DEPDIR)/common_protocol_libolaproto_la-Ola.pb.Tpo common/protocol/$(DEPDIR)/common_protocol_libolaproto_la-Ola.pb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/protocol/Ola.pb.cc' object='common/protocol/common_protocol_libolaproto_la-Ola.pb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_protocol_libolaproto_la_CXXFLAGS) $(CXXFLAGS) -c -o common/protocol/common_protocol_libolaproto_la-Ola.pb.lo `test -f 'common/protocol/Ola.pb.cc' || echo '$(srcdir)/'`common/protocol/Ola.pb.cc common/protocol/common_protocol_libolaproto_la-OlaService.pb.lo: common/protocol/OlaService.pb.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_protocol_libolaproto_la_CXXFLAGS) $(CXXFLAGS) -MT common/protocol/common_protocol_libolaproto_la-OlaService.pb.lo -MD -MP -MF common/protocol/$(DEPDIR)/common_protocol_libolaproto_la-OlaService.pb.Tpo -c -o common/protocol/common_protocol_libolaproto_la-OlaService.pb.lo `test -f 'common/protocol/OlaService.pb.cpp' || echo '$(srcdir)/'`common/protocol/OlaService.pb.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/protocol/$(DEPDIR)/common_protocol_libolaproto_la-OlaService.pb.Tpo common/protocol/$(DEPDIR)/common_protocol_libolaproto_la-OlaService.pb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/protocol/OlaService.pb.cpp' object='common/protocol/common_protocol_libolaproto_la-OlaService.pb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_protocol_libolaproto_la_CXXFLAGS) $(CXXFLAGS) -c -o common/protocol/common_protocol_libolaproto_la-OlaService.pb.lo `test -f 'common/protocol/OlaService.pb.cpp' || echo '$(srcdir)/'`common/protocol/OlaService.pb.cpp examples/examples_libolaconfig_la-OlaConfigurator.lo: examples/OlaConfigurator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_libolaconfig_la_CXXFLAGS) $(CXXFLAGS) -MT examples/examples_libolaconfig_la-OlaConfigurator.lo -MD -MP -MF examples/$(DEPDIR)/examples_libolaconfig_la-OlaConfigurator.Tpo -c -o examples/examples_libolaconfig_la-OlaConfigurator.lo `test -f 'examples/OlaConfigurator.cpp' || echo '$(srcdir)/'`examples/OlaConfigurator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) examples/$(DEPDIR)/examples_libolaconfig_la-OlaConfigurator.Tpo examples/$(DEPDIR)/examples_libolaconfig_la-OlaConfigurator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='examples/OlaConfigurator.cpp' object='examples/examples_libolaconfig_la-OlaConfigurator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_libolaconfig_la_CXXFLAGS) $(CXXFLAGS) -c -o examples/examples_libolaconfig_la-OlaConfigurator.lo `test -f 'examples/OlaConfigurator.cpp' || echo '$(srcdir)/'`examples/OlaConfigurator.cpp libs/acn/libs_acn_libolaacn_la-CID.lo: libs/acn/CID.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolaacn_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolaacn_la-CID.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolaacn_la-CID.Tpo -c -o libs/acn/libs_acn_libolaacn_la-CID.lo `test -f 'libs/acn/CID.cpp' || echo '$(srcdir)/'`libs/acn/CID.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolaacn_la-CID.Tpo libs/acn/$(DEPDIR)/libs_acn_libolaacn_la-CID.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/CID.cpp' object='libs/acn/libs_acn_libolaacn_la-CID.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolaacn_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolaacn_la-CID.lo `test -f 'libs/acn/CID.cpp' || echo '$(srcdir)/'`libs/acn/CID.cpp libs/acn/libs_acn_libolaacn_la-CIDImpl.lo: libs/acn/CIDImpl.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolaacn_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolaacn_la-CIDImpl.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolaacn_la-CIDImpl.Tpo -c -o libs/acn/libs_acn_libolaacn_la-CIDImpl.lo `test -f 'libs/acn/CIDImpl.cpp' || echo '$(srcdir)/'`libs/acn/CIDImpl.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolaacn_la-CIDImpl.Tpo libs/acn/$(DEPDIR)/libs_acn_libolaacn_la-CIDImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/CIDImpl.cpp' object='libs/acn/libs_acn_libolaacn_la-CIDImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolaacn_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolaacn_la-CIDImpl.lo `test -f 'libs/acn/CIDImpl.cpp' || echo '$(srcdir)/'`libs/acn/CIDImpl.cpp libs/acn/libs_acn_libolae131core_la-BaseInflator.lo: libs/acn/BaseInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-BaseInflator.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-BaseInflator.Tpo -c -o libs/acn/libs_acn_libolae131core_la-BaseInflator.lo `test -f 'libs/acn/BaseInflator.cpp' || echo '$(srcdir)/'`libs/acn/BaseInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-BaseInflator.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-BaseInflator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/BaseInflator.cpp' object='libs/acn/libs_acn_libolae131core_la-BaseInflator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-BaseInflator.lo `test -f 'libs/acn/BaseInflator.cpp' || echo '$(srcdir)/'`libs/acn/BaseInflator.cpp libs/acn/libs_acn_libolae131core_la-DMPAddress.lo: libs/acn/DMPAddress.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-DMPAddress.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPAddress.Tpo -c -o libs/acn/libs_acn_libolae131core_la-DMPAddress.lo `test -f 'libs/acn/DMPAddress.cpp' || echo '$(srcdir)/'`libs/acn/DMPAddress.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPAddress.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPAddress.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/DMPAddress.cpp' object='libs/acn/libs_acn_libolae131core_la-DMPAddress.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-DMPAddress.lo `test -f 'libs/acn/DMPAddress.cpp' || echo '$(srcdir)/'`libs/acn/DMPAddress.cpp libs/acn/libs_acn_libolae131core_la-DMPE131Inflator.lo: libs/acn/DMPE131Inflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-DMPE131Inflator.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPE131Inflator.Tpo -c -o libs/acn/libs_acn_libolae131core_la-DMPE131Inflator.lo `test -f 'libs/acn/DMPE131Inflator.cpp' || echo '$(srcdir)/'`libs/acn/DMPE131Inflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPE131Inflator.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPE131Inflator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/DMPE131Inflator.cpp' object='libs/acn/libs_acn_libolae131core_la-DMPE131Inflator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-DMPE131Inflator.lo `test -f 'libs/acn/DMPE131Inflator.cpp' || echo '$(srcdir)/'`libs/acn/DMPE131Inflator.cpp libs/acn/libs_acn_libolae131core_la-DMPInflator.lo: libs/acn/DMPInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-DMPInflator.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPInflator.Tpo -c -o libs/acn/libs_acn_libolae131core_la-DMPInflator.lo `test -f 'libs/acn/DMPInflator.cpp' || echo '$(srcdir)/'`libs/acn/DMPInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPInflator.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPInflator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/DMPInflator.cpp' object='libs/acn/libs_acn_libolae131core_la-DMPInflator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-DMPInflator.lo `test -f 'libs/acn/DMPInflator.cpp' || echo '$(srcdir)/'`libs/acn/DMPInflator.cpp libs/acn/libs_acn_libolae131core_la-DMPPDU.lo: libs/acn/DMPPDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-DMPPDU.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPPDU.Tpo -c -o libs/acn/libs_acn_libolae131core_la-DMPPDU.lo `test -f 'libs/acn/DMPPDU.cpp' || echo '$(srcdir)/'`libs/acn/DMPPDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPPDU.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-DMPPDU.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/DMPPDU.cpp' object='libs/acn/libs_acn_libolae131core_la-DMPPDU.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-DMPPDU.lo `test -f 'libs/acn/DMPPDU.cpp' || echo '$(srcdir)/'`libs/acn/DMPPDU.cpp libs/acn/libs_acn_libolae131core_la-E131DiscoveryInflator.lo: libs/acn/E131DiscoveryInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-E131DiscoveryInflator.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131DiscoveryInflator.Tpo -c -o libs/acn/libs_acn_libolae131core_la-E131DiscoveryInflator.lo `test -f 'libs/acn/E131DiscoveryInflator.cpp' || echo '$(srcdir)/'`libs/acn/E131DiscoveryInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131DiscoveryInflator.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131DiscoveryInflator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E131DiscoveryInflator.cpp' object='libs/acn/libs_acn_libolae131core_la-E131DiscoveryInflator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-E131DiscoveryInflator.lo `test -f 'libs/acn/E131DiscoveryInflator.cpp' || echo '$(srcdir)/'`libs/acn/E131DiscoveryInflator.cpp libs/acn/libs_acn_libolae131core_la-E131Inflator.lo: libs/acn/E131Inflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-E131Inflator.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Inflator.Tpo -c -o libs/acn/libs_acn_libolae131core_la-E131Inflator.lo `test -f 'libs/acn/E131Inflator.cpp' || echo '$(srcdir)/'`libs/acn/E131Inflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Inflator.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Inflator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E131Inflator.cpp' object='libs/acn/libs_acn_libolae131core_la-E131Inflator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-E131Inflator.lo `test -f 'libs/acn/E131Inflator.cpp' || echo '$(srcdir)/'`libs/acn/E131Inflator.cpp libs/acn/libs_acn_libolae131core_la-E131Node.lo: libs/acn/E131Node.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-E131Node.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Node.Tpo -c -o libs/acn/libs_acn_libolae131core_la-E131Node.lo `test -f 'libs/acn/E131Node.cpp' || echo '$(srcdir)/'`libs/acn/E131Node.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Node.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Node.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E131Node.cpp' object='libs/acn/libs_acn_libolae131core_la-E131Node.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-E131Node.lo `test -f 'libs/acn/E131Node.cpp' || echo '$(srcdir)/'`libs/acn/E131Node.cpp libs/acn/libs_acn_libolae131core_la-E131PDU.lo: libs/acn/E131PDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-E131PDU.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131PDU.Tpo -c -o libs/acn/libs_acn_libolae131core_la-E131PDU.lo `test -f 'libs/acn/E131PDU.cpp' || echo '$(srcdir)/'`libs/acn/E131PDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131PDU.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131PDU.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E131PDU.cpp' object='libs/acn/libs_acn_libolae131core_la-E131PDU.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-E131PDU.lo `test -f 'libs/acn/E131PDU.cpp' || echo '$(srcdir)/'`libs/acn/E131PDU.cpp libs/acn/libs_acn_libolae131core_la-E131Sender.lo: libs/acn/E131Sender.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-E131Sender.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Sender.Tpo -c -o libs/acn/libs_acn_libolae131core_la-E131Sender.lo `test -f 'libs/acn/E131Sender.cpp' || echo '$(srcdir)/'`libs/acn/E131Sender.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Sender.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E131Sender.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E131Sender.cpp' object='libs/acn/libs_acn_libolae131core_la-E131Sender.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-E131Sender.lo `test -f 'libs/acn/E131Sender.cpp' || echo '$(srcdir)/'`libs/acn/E131Sender.cpp libs/acn/libs_acn_libolae131core_la-E133Inflator.lo: libs/acn/E133Inflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-E133Inflator.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133Inflator.Tpo -c -o libs/acn/libs_acn_libolae131core_la-E133Inflator.lo `test -f 'libs/acn/E133Inflator.cpp' || echo '$(srcdir)/'`libs/acn/E133Inflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133Inflator.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133Inflator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E133Inflator.cpp' object='libs/acn/libs_acn_libolae131core_la-E133Inflator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-E133Inflator.lo `test -f 'libs/acn/E133Inflator.cpp' || echo '$(srcdir)/'`libs/acn/E133Inflator.cpp libs/acn/libs_acn_libolae131core_la-E133PDU.lo: libs/acn/E133PDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-E133PDU.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133PDU.Tpo -c -o libs/acn/libs_acn_libolae131core_la-E133PDU.lo `test -f 'libs/acn/E133PDU.cpp' || echo '$(srcdir)/'`libs/acn/E133PDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133PDU.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133PDU.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E133PDU.cpp' object='libs/acn/libs_acn_libolae131core_la-E133PDU.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-E133PDU.lo `test -f 'libs/acn/E133PDU.cpp' || echo '$(srcdir)/'`libs/acn/E133PDU.cpp libs/acn/libs_acn_libolae131core_la-E133StatusInflator.lo: libs/acn/E133StatusInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-E133StatusInflator.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133StatusInflator.Tpo -c -o libs/acn/libs_acn_libolae131core_la-E133StatusInflator.lo `test -f 'libs/acn/E133StatusInflator.cpp' || echo '$(srcdir)/'`libs/acn/E133StatusInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133StatusInflator.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133StatusInflator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E133StatusInflator.cpp' object='libs/acn/libs_acn_libolae131core_la-E133StatusInflator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-E133StatusInflator.lo `test -f 'libs/acn/E133StatusInflator.cpp' || echo '$(srcdir)/'`libs/acn/E133StatusInflator.cpp libs/acn/libs_acn_libolae131core_la-E133StatusPDU.lo: libs/acn/E133StatusPDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-E133StatusPDU.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133StatusPDU.Tpo -c -o libs/acn/libs_acn_libolae131core_la-E133StatusPDU.lo `test -f 'libs/acn/E133StatusPDU.cpp' || echo '$(srcdir)/'`libs/acn/E133StatusPDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133StatusPDU.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-E133StatusPDU.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E133StatusPDU.cpp' object='libs/acn/libs_acn_libolae131core_la-E133StatusPDU.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-E133StatusPDU.lo `test -f 'libs/acn/E133StatusPDU.cpp' || echo '$(srcdir)/'`libs/acn/E133StatusPDU.cpp libs/acn/libs_acn_libolae131core_la-PDU.lo: libs/acn/PDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-PDU.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-PDU.Tpo -c -o libs/acn/libs_acn_libolae131core_la-PDU.lo `test -f 'libs/acn/PDU.cpp' || echo '$(srcdir)/'`libs/acn/PDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-PDU.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-PDU.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/PDU.cpp' object='libs/acn/libs_acn_libolae131core_la-PDU.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-PDU.lo `test -f 'libs/acn/PDU.cpp' || echo '$(srcdir)/'`libs/acn/PDU.cpp libs/acn/libs_acn_libolae131core_la-PreamblePacker.lo: libs/acn/PreamblePacker.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-PreamblePacker.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-PreamblePacker.Tpo -c -o libs/acn/libs_acn_libolae131core_la-PreamblePacker.lo `test -f 'libs/acn/PreamblePacker.cpp' || echo '$(srcdir)/'`libs/acn/PreamblePacker.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-PreamblePacker.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-PreamblePacker.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/PreamblePacker.cpp' object='libs/acn/libs_acn_libolae131core_la-PreamblePacker.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-PreamblePacker.lo `test -f 'libs/acn/PreamblePacker.cpp' || echo '$(srcdir)/'`libs/acn/PreamblePacker.cpp libs/acn/libs_acn_libolae131core_la-RDMInflator.lo: libs/acn/RDMInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-RDMInflator.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RDMInflator.Tpo -c -o libs/acn/libs_acn_libolae131core_la-RDMInflator.lo `test -f 'libs/acn/RDMInflator.cpp' || echo '$(srcdir)/'`libs/acn/RDMInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RDMInflator.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RDMInflator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RDMInflator.cpp' object='libs/acn/libs_acn_libolae131core_la-RDMInflator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-RDMInflator.lo `test -f 'libs/acn/RDMInflator.cpp' || echo '$(srcdir)/'`libs/acn/RDMInflator.cpp libs/acn/libs_acn_libolae131core_la-RDMPDU.lo: libs/acn/RDMPDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-RDMPDU.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RDMPDU.Tpo -c -o libs/acn/libs_acn_libolae131core_la-RDMPDU.lo `test -f 'libs/acn/RDMPDU.cpp' || echo '$(srcdir)/'`libs/acn/RDMPDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RDMPDU.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RDMPDU.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RDMPDU.cpp' object='libs/acn/libs_acn_libolae131core_la-RDMPDU.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-RDMPDU.lo `test -f 'libs/acn/RDMPDU.cpp' || echo '$(srcdir)/'`libs/acn/RDMPDU.cpp libs/acn/libs_acn_libolae131core_la-RootInflator.lo: libs/acn/RootInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-RootInflator.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootInflator.Tpo -c -o libs/acn/libs_acn_libolae131core_la-RootInflator.lo `test -f 'libs/acn/RootInflator.cpp' || echo '$(srcdir)/'`libs/acn/RootInflator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootInflator.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootInflator.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RootInflator.cpp' object='libs/acn/libs_acn_libolae131core_la-RootInflator.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-RootInflator.lo `test -f 'libs/acn/RootInflator.cpp' || echo '$(srcdir)/'`libs/acn/RootInflator.cpp libs/acn/libs_acn_libolae131core_la-RootPDU.lo: libs/acn/RootPDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-RootPDU.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootPDU.Tpo -c -o libs/acn/libs_acn_libolae131core_la-RootPDU.lo `test -f 'libs/acn/RootPDU.cpp' || echo '$(srcdir)/'`libs/acn/RootPDU.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootPDU.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootPDU.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RootPDU.cpp' object='libs/acn/libs_acn_libolae131core_la-RootPDU.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-RootPDU.lo `test -f 'libs/acn/RootPDU.cpp' || echo '$(srcdir)/'`libs/acn/RootPDU.cpp libs/acn/libs_acn_libolae131core_la-RootSender.lo: libs/acn/RootSender.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-RootSender.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootSender.Tpo -c -o libs/acn/libs_acn_libolae131core_la-RootSender.lo `test -f 'libs/acn/RootSender.cpp' || echo '$(srcdir)/'`libs/acn/RootSender.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootSender.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-RootSender.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RootSender.cpp' object='libs/acn/libs_acn_libolae131core_la-RootSender.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-RootSender.lo `test -f 'libs/acn/RootSender.cpp' || echo '$(srcdir)/'`libs/acn/RootSender.cpp libs/acn/libs_acn_libolae131core_la-TCPTransport.lo: libs/acn/TCPTransport.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-TCPTransport.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-TCPTransport.Tpo -c -o libs/acn/libs_acn_libolae131core_la-TCPTransport.lo `test -f 'libs/acn/TCPTransport.cpp' || echo '$(srcdir)/'`libs/acn/TCPTransport.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-TCPTransport.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-TCPTransport.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/TCPTransport.cpp' object='libs/acn/libs_acn_libolae131core_la-TCPTransport.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-TCPTransport.lo `test -f 'libs/acn/TCPTransport.cpp' || echo '$(srcdir)/'`libs/acn/TCPTransport.cpp libs/acn/libs_acn_libolae131core_la-UDPTransport.lo: libs/acn/UDPTransport.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_libolae131core_la-UDPTransport.lo -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-UDPTransport.Tpo -c -o libs/acn/libs_acn_libolae131core_la-UDPTransport.lo `test -f 'libs/acn/UDPTransport.cpp' || echo '$(srcdir)/'`libs/acn/UDPTransport.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-UDPTransport.Tpo libs/acn/$(DEPDIR)/libs_acn_libolae131core_la-UDPTransport.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/UDPTransport.cpp' object='libs/acn/libs_acn_libolae131core_la-UDPTransport.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_acn_libolae131core_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_libolae131core_la-UDPTransport.lo `test -f 'libs/acn/UDPTransport.cpp' || echo '$(srcdir)/'`libs/acn/UDPTransport.cpp libs/usb/libs_usb_libolausb_la-HotplugAgent.lo: libs/usb/HotplugAgent.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -MT libs/usb/libs_usb_libolausb_la-HotplugAgent.lo -MD -MP -MF libs/usb/$(DEPDIR)/libs_usb_libolausb_la-HotplugAgent.Tpo -c -o libs/usb/libs_usb_libolausb_la-HotplugAgent.lo `test -f 'libs/usb/HotplugAgent.cpp' || echo '$(srcdir)/'`libs/usb/HotplugAgent.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/usb/$(DEPDIR)/libs_usb_libolausb_la-HotplugAgent.Tpo libs/usb/$(DEPDIR)/libs_usb_libolausb_la-HotplugAgent.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/usb/HotplugAgent.cpp' object='libs/usb/libs_usb_libolausb_la-HotplugAgent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/usb/libs_usb_libolausb_la-HotplugAgent.lo `test -f 'libs/usb/HotplugAgent.cpp' || echo '$(srcdir)/'`libs/usb/HotplugAgent.cpp libs/usb/libs_usb_libolausb_la-JaRuleConstants.lo: libs/usb/JaRuleConstants.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -MT libs/usb/libs_usb_libolausb_la-JaRuleConstants.lo -MD -MP -MF libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleConstants.Tpo -c -o libs/usb/libs_usb_libolausb_la-JaRuleConstants.lo `test -f 'libs/usb/JaRuleConstants.cpp' || echo '$(srcdir)/'`libs/usb/JaRuleConstants.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleConstants.Tpo libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleConstants.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/usb/JaRuleConstants.cpp' object='libs/usb/libs_usb_libolausb_la-JaRuleConstants.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/usb/libs_usb_libolausb_la-JaRuleConstants.lo `test -f 'libs/usb/JaRuleConstants.cpp' || echo '$(srcdir)/'`libs/usb/JaRuleConstants.cpp libs/usb/libs_usb_libolausb_la-JaRulePortHandle.lo: libs/usb/JaRulePortHandle.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -MT libs/usb/libs_usb_libolausb_la-JaRulePortHandle.lo -MD -MP -MF libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRulePortHandle.Tpo -c -o libs/usb/libs_usb_libolausb_la-JaRulePortHandle.lo `test -f 'libs/usb/JaRulePortHandle.cpp' || echo '$(srcdir)/'`libs/usb/JaRulePortHandle.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRulePortHandle.Tpo libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRulePortHandle.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/usb/JaRulePortHandle.cpp' object='libs/usb/libs_usb_libolausb_la-JaRulePortHandle.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/usb/libs_usb_libolausb_la-JaRulePortHandle.lo `test -f 'libs/usb/JaRulePortHandle.cpp' || echo '$(srcdir)/'`libs/usb/JaRulePortHandle.cpp libs/usb/libs_usb_libolausb_la-JaRulePortHandleImpl.lo: libs/usb/JaRulePortHandleImpl.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -MT libs/usb/libs_usb_libolausb_la-JaRulePortHandleImpl.lo -MD -MP -MF libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRulePortHandleImpl.Tpo -c -o libs/usb/libs_usb_libolausb_la-JaRulePortHandleImpl.lo `test -f 'libs/usb/JaRulePortHandleImpl.cpp' || echo '$(srcdir)/'`libs/usb/JaRulePortHandleImpl.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRulePortHandleImpl.Tpo libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRulePortHandleImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/usb/JaRulePortHandleImpl.cpp' object='libs/usb/libs_usb_libolausb_la-JaRulePortHandleImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/usb/libs_usb_libolausb_la-JaRulePortHandleImpl.lo `test -f 'libs/usb/JaRulePortHandleImpl.cpp' || echo '$(srcdir)/'`libs/usb/JaRulePortHandleImpl.cpp libs/usb/libs_usb_libolausb_la-JaRuleWidget.lo: libs/usb/JaRuleWidget.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -MT libs/usb/libs_usb_libolausb_la-JaRuleWidget.lo -MD -MP -MF libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleWidget.Tpo -c -o libs/usb/libs_usb_libolausb_la-JaRuleWidget.lo `test -f 'libs/usb/JaRuleWidget.cpp' || echo '$(srcdir)/'`libs/usb/JaRuleWidget.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleWidget.Tpo libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleWidget.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/usb/JaRuleWidget.cpp' object='libs/usb/libs_usb_libolausb_la-JaRuleWidget.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/usb/libs_usb_libolausb_la-JaRuleWidget.lo `test -f 'libs/usb/JaRuleWidget.cpp' || echo '$(srcdir)/'`libs/usb/JaRuleWidget.cpp libs/usb/libs_usb_libolausb_la-JaRuleWidgetPort.lo: libs/usb/JaRuleWidgetPort.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -MT libs/usb/libs_usb_libolausb_la-JaRuleWidgetPort.lo -MD -MP -MF libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleWidgetPort.Tpo -c -o libs/usb/libs_usb_libolausb_la-JaRuleWidgetPort.lo `test -f 'libs/usb/JaRuleWidgetPort.cpp' || echo '$(srcdir)/'`libs/usb/JaRuleWidgetPort.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleWidgetPort.Tpo libs/usb/$(DEPDIR)/libs_usb_libolausb_la-JaRuleWidgetPort.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/usb/JaRuleWidgetPort.cpp' object='libs/usb/libs_usb_libolausb_la-JaRuleWidgetPort.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/usb/libs_usb_libolausb_la-JaRuleWidgetPort.lo `test -f 'libs/usb/JaRuleWidgetPort.cpp' || echo '$(srcdir)/'`libs/usb/JaRuleWidgetPort.cpp libs/usb/libs_usb_libolausb_la-LibUsbAdaptor.lo: libs/usb/LibUsbAdaptor.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -MT libs/usb/libs_usb_libolausb_la-LibUsbAdaptor.lo -MD -MP -MF libs/usb/$(DEPDIR)/libs_usb_libolausb_la-LibUsbAdaptor.Tpo -c -o libs/usb/libs_usb_libolausb_la-LibUsbAdaptor.lo `test -f 'libs/usb/LibUsbAdaptor.cpp' || echo '$(srcdir)/'`libs/usb/LibUsbAdaptor.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/usb/$(DEPDIR)/libs_usb_libolausb_la-LibUsbAdaptor.Tpo libs/usb/$(DEPDIR)/libs_usb_libolausb_la-LibUsbAdaptor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/usb/LibUsbAdaptor.cpp' object='libs/usb/libs_usb_libolausb_la-LibUsbAdaptor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/usb/libs_usb_libolausb_la-LibUsbAdaptor.lo `test -f 'libs/usb/LibUsbAdaptor.cpp' || echo '$(srcdir)/'`libs/usb/LibUsbAdaptor.cpp libs/usb/libs_usb_libolausb_la-LibUsbThread.lo: libs/usb/LibUsbThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -MT libs/usb/libs_usb_libolausb_la-LibUsbThread.lo -MD -MP -MF libs/usb/$(DEPDIR)/libs_usb_libolausb_la-LibUsbThread.Tpo -c -o libs/usb/libs_usb_libolausb_la-LibUsbThread.lo `test -f 'libs/usb/LibUsbThread.cpp' || echo '$(srcdir)/'`libs/usb/LibUsbThread.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/usb/$(DEPDIR)/libs_usb_libolausb_la-LibUsbThread.Tpo libs/usb/$(DEPDIR)/libs_usb_libolausb_la-LibUsbThread.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/usb/LibUsbThread.cpp' object='libs/usb/libs_usb_libolausb_la-LibUsbThread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/usb/libs_usb_libolausb_la-LibUsbThread.lo `test -f 'libs/usb/LibUsbThread.cpp' || echo '$(srcdir)/'`libs/usb/LibUsbThread.cpp libs/usb/libs_usb_libolausb_la-Types.lo: libs/usb/Types.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -MT libs/usb/libs_usb_libolausb_la-Types.lo -MD -MP -MF libs/usb/$(DEPDIR)/libs_usb_libolausb_la-Types.Tpo -c -o libs/usb/libs_usb_libolausb_la-Types.lo `test -f 'libs/usb/Types.cpp' || echo '$(srcdir)/'`libs/usb/Types.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/usb/$(DEPDIR)/libs_usb_libolausb_la-Types.Tpo libs/usb/$(DEPDIR)/libs_usb_libolausb_la-Types.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/usb/Types.cpp' object='libs/usb/libs_usb_libolausb_la-Types.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_libolausb_la_CXXFLAGS) $(CXXFLAGS) -c -o libs/usb/libs_usb_libolausb_la-Types.lo `test -f 'libs/usb/Types.cpp' || echo '$(srcdir)/'`libs/usb/Types.cpp ola/ola_libola_la-AutoStart.lo: ola/AutoStart.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_libola_la-AutoStart.lo -MD -MP -MF ola/$(DEPDIR)/ola_libola_la-AutoStart.Tpo -c -o ola/ola_libola_la-AutoStart.lo `test -f 'ola/AutoStart.cpp' || echo '$(srcdir)/'`ola/AutoStart.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_libola_la-AutoStart.Tpo ola/$(DEPDIR)/ola_libola_la-AutoStart.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/AutoStart.cpp' object='ola/ola_libola_la-AutoStart.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_libola_la-AutoStart.lo `test -f 'ola/AutoStart.cpp' || echo '$(srcdir)/'`ola/AutoStart.cpp ola/ola_libola_la-ClientRDMAPIShim.lo: ola/ClientRDMAPIShim.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_libola_la-ClientRDMAPIShim.lo -MD -MP -MF ola/$(DEPDIR)/ola_libola_la-ClientRDMAPIShim.Tpo -c -o ola/ola_libola_la-ClientRDMAPIShim.lo `test -f 'ola/ClientRDMAPIShim.cpp' || echo '$(srcdir)/'`ola/ClientRDMAPIShim.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_libola_la-ClientRDMAPIShim.Tpo ola/$(DEPDIR)/ola_libola_la-ClientRDMAPIShim.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/ClientRDMAPIShim.cpp' object='ola/ola_libola_la-ClientRDMAPIShim.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_libola_la-ClientRDMAPIShim.lo `test -f 'ola/ClientRDMAPIShim.cpp' || echo '$(srcdir)/'`ola/ClientRDMAPIShim.cpp ola/ola_libola_la-ClientTypesFactory.lo: ola/ClientTypesFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_libola_la-ClientTypesFactory.lo -MD -MP -MF ola/$(DEPDIR)/ola_libola_la-ClientTypesFactory.Tpo -c -o ola/ola_libola_la-ClientTypesFactory.lo `test -f 'ola/ClientTypesFactory.cpp' || echo '$(srcdir)/'`ola/ClientTypesFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_libola_la-ClientTypesFactory.Tpo ola/$(DEPDIR)/ola_libola_la-ClientTypesFactory.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/ClientTypesFactory.cpp' object='ola/ola_libola_la-ClientTypesFactory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_libola_la-ClientTypesFactory.lo `test -f 'ola/ClientTypesFactory.cpp' || echo '$(srcdir)/'`ola/ClientTypesFactory.cpp ola/ola_libola_la-Module.lo: ola/Module.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_libola_la-Module.lo -MD -MP -MF ola/$(DEPDIR)/ola_libola_la-Module.Tpo -c -o ola/ola_libola_la-Module.lo `test -f 'ola/Module.cpp' || echo '$(srcdir)/'`ola/Module.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_libola_la-Module.Tpo ola/$(DEPDIR)/ola_libola_la-Module.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/Module.cpp' object='ola/ola_libola_la-Module.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_libola_la-Module.lo `test -f 'ola/Module.cpp' || echo '$(srcdir)/'`ola/Module.cpp ola/ola_libola_la-OlaCallbackClient.lo: ola/OlaCallbackClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_libola_la-OlaCallbackClient.lo -MD -MP -MF ola/$(DEPDIR)/ola_libola_la-OlaCallbackClient.Tpo -c -o ola/ola_libola_la-OlaCallbackClient.lo `test -f 'ola/OlaCallbackClient.cpp' || echo '$(srcdir)/'`ola/OlaCallbackClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_libola_la-OlaCallbackClient.Tpo ola/$(DEPDIR)/ola_libola_la-OlaCallbackClient.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/OlaCallbackClient.cpp' object='ola/ola_libola_la-OlaCallbackClient.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_libola_la-OlaCallbackClient.lo `test -f 'ola/OlaCallbackClient.cpp' || echo '$(srcdir)/'`ola/OlaCallbackClient.cpp ola/ola_libola_la-OlaClient.lo: ola/OlaClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_libola_la-OlaClient.lo -MD -MP -MF ola/$(DEPDIR)/ola_libola_la-OlaClient.Tpo -c -o ola/ola_libola_la-OlaClient.lo `test -f 'ola/OlaClient.cpp' || echo '$(srcdir)/'`ola/OlaClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_libola_la-OlaClient.Tpo ola/$(DEPDIR)/ola_libola_la-OlaClient.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/OlaClient.cpp' object='ola/ola_libola_la-OlaClient.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_libola_la-OlaClient.lo `test -f 'ola/OlaClient.cpp' || echo '$(srcdir)/'`ola/OlaClient.cpp ola/ola_libola_la-OlaClientCore.lo: ola/OlaClientCore.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_libola_la-OlaClientCore.lo -MD -MP -MF ola/$(DEPDIR)/ola_libola_la-OlaClientCore.Tpo -c -o ola/ola_libola_la-OlaClientCore.lo `test -f 'ola/OlaClientCore.cpp' || echo '$(srcdir)/'`ola/OlaClientCore.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_libola_la-OlaClientCore.Tpo ola/$(DEPDIR)/ola_libola_la-OlaClientCore.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/OlaClientCore.cpp' object='ola/ola_libola_la-OlaClientCore.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_libola_la-OlaClientCore.lo `test -f 'ola/OlaClientCore.cpp' || echo '$(srcdir)/'`ola/OlaClientCore.cpp ola/ola_libola_la-OlaClientWrapper.lo: ola/OlaClientWrapper.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_libola_la-OlaClientWrapper.lo -MD -MP -MF ola/$(DEPDIR)/ola_libola_la-OlaClientWrapper.Tpo -c -o ola/ola_libola_la-OlaClientWrapper.lo `test -f 'ola/OlaClientWrapper.cpp' || echo '$(srcdir)/'`ola/OlaClientWrapper.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_libola_la-OlaClientWrapper.Tpo ola/$(DEPDIR)/ola_libola_la-OlaClientWrapper.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/OlaClientWrapper.cpp' object='ola/ola_libola_la-OlaClientWrapper.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_libola_la-OlaClientWrapper.lo `test -f 'ola/OlaClientWrapper.cpp' || echo '$(srcdir)/'`ola/OlaClientWrapper.cpp ola/ola_libola_la-StreamingClient.lo: ola/StreamingClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_libola_la-StreamingClient.lo -MD -MP -MF ola/$(DEPDIR)/ola_libola_la-StreamingClient.Tpo -c -o ola/ola_libola_la-StreamingClient.lo `test -f 'ola/StreamingClient.cpp' || echo '$(srcdir)/'`ola/StreamingClient.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_libola_la-StreamingClient.Tpo ola/$(DEPDIR)/ola_libola_la-StreamingClient.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/StreamingClient.cpp' object='ola/ola_libola_la-StreamingClient.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_libola_la_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_libola_la-StreamingClient.lo `test -f 'ola/StreamingClient.cpp' || echo '$(srcdir)/'`ola/StreamingClient.cpp olad/olad_libolaserver_la-ClientBroker.lo: olad/ClientBroker.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-ClientBroker.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-ClientBroker.Tpo -c -o olad/olad_libolaserver_la-ClientBroker.lo `test -f 'olad/ClientBroker.cpp' || echo '$(srcdir)/'`olad/ClientBroker.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-ClientBroker.Tpo olad/$(DEPDIR)/olad_libolaserver_la-ClientBroker.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/ClientBroker.cpp' object='olad/olad_libolaserver_la-ClientBroker.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-ClientBroker.lo `test -f 'olad/ClientBroker.cpp' || echo '$(srcdir)/'`olad/ClientBroker.cpp olad/olad_libolaserver_la-DiscoveryAgent.lo: olad/DiscoveryAgent.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-DiscoveryAgent.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-DiscoveryAgent.Tpo -c -o olad/olad_libolaserver_la-DiscoveryAgent.lo `test -f 'olad/DiscoveryAgent.cpp' || echo '$(srcdir)/'`olad/DiscoveryAgent.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-DiscoveryAgent.Tpo olad/$(DEPDIR)/olad_libolaserver_la-DiscoveryAgent.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/DiscoveryAgent.cpp' object='olad/olad_libolaserver_la-DiscoveryAgent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-DiscoveryAgent.lo `test -f 'olad/DiscoveryAgent.cpp' || echo '$(srcdir)/'`olad/DiscoveryAgent.cpp olad/olad_libolaserver_la-DynamicPluginLoader.lo: olad/DynamicPluginLoader.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-DynamicPluginLoader.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-DynamicPluginLoader.Tpo -c -o olad/olad_libolaserver_la-DynamicPluginLoader.lo `test -f 'olad/DynamicPluginLoader.cpp' || echo '$(srcdir)/'`olad/DynamicPluginLoader.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-DynamicPluginLoader.Tpo olad/$(DEPDIR)/olad_libolaserver_la-DynamicPluginLoader.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/DynamicPluginLoader.cpp' object='olad/olad_libolaserver_la-DynamicPluginLoader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-DynamicPluginLoader.lo `test -f 'olad/DynamicPluginLoader.cpp' || echo '$(srcdir)/'`olad/DynamicPluginLoader.cpp olad/olad_libolaserver_la-OlaServerServiceImpl.lo: olad/OlaServerServiceImpl.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-OlaServerServiceImpl.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-OlaServerServiceImpl.Tpo -c -o olad/olad_libolaserver_la-OlaServerServiceImpl.lo `test -f 'olad/OlaServerServiceImpl.cpp' || echo '$(srcdir)/'`olad/OlaServerServiceImpl.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-OlaServerServiceImpl.Tpo olad/$(DEPDIR)/olad_libolaserver_la-OlaServerServiceImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/OlaServerServiceImpl.cpp' object='olad/olad_libolaserver_la-OlaServerServiceImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-OlaServerServiceImpl.lo `test -f 'olad/OlaServerServiceImpl.cpp' || echo '$(srcdir)/'`olad/OlaServerServiceImpl.cpp olad/olad_libolaserver_la-PluginManager.lo: olad/PluginManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-PluginManager.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-PluginManager.Tpo -c -o olad/olad_libolaserver_la-PluginManager.lo `test -f 'olad/PluginManager.cpp' || echo '$(srcdir)/'`olad/PluginManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-PluginManager.Tpo olad/$(DEPDIR)/olad_libolaserver_la-PluginManager.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/PluginManager.cpp' object='olad/olad_libolaserver_la-PluginManager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-PluginManager.lo `test -f 'olad/PluginManager.cpp' || echo '$(srcdir)/'`olad/PluginManager.cpp olad/olad_libolaserver_la-BonjourDiscoveryAgent.lo: olad/BonjourDiscoveryAgent.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-BonjourDiscoveryAgent.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-BonjourDiscoveryAgent.Tpo -c -o olad/olad_libolaserver_la-BonjourDiscoveryAgent.lo `test -f 'olad/BonjourDiscoveryAgent.cpp' || echo '$(srcdir)/'`olad/BonjourDiscoveryAgent.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-BonjourDiscoveryAgent.Tpo olad/$(DEPDIR)/olad_libolaserver_la-BonjourDiscoveryAgent.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/BonjourDiscoveryAgent.cpp' object='olad/olad_libolaserver_la-BonjourDiscoveryAgent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-BonjourDiscoveryAgent.lo `test -f 'olad/BonjourDiscoveryAgent.cpp' || echo '$(srcdir)/'`olad/BonjourDiscoveryAgent.cpp olad/olad_libolaserver_la-AvahiDiscoveryAgent.lo: olad/AvahiDiscoveryAgent.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-AvahiDiscoveryAgent.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-AvahiDiscoveryAgent.Tpo -c -o olad/olad_libolaserver_la-AvahiDiscoveryAgent.lo `test -f 'olad/AvahiDiscoveryAgent.cpp' || echo '$(srcdir)/'`olad/AvahiDiscoveryAgent.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-AvahiDiscoveryAgent.Tpo olad/$(DEPDIR)/olad_libolaserver_la-AvahiDiscoveryAgent.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/AvahiDiscoveryAgent.cpp' object='olad/olad_libolaserver_la-AvahiDiscoveryAgent.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-AvahiDiscoveryAgent.lo `test -f 'olad/AvahiDiscoveryAgent.cpp' || echo '$(srcdir)/'`olad/AvahiDiscoveryAgent.cpp olad/olad_libolaserver_la-HttpServerActions.lo: olad/HttpServerActions.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-HttpServerActions.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-HttpServerActions.Tpo -c -o olad/olad_libolaserver_la-HttpServerActions.lo `test -f 'olad/HttpServerActions.cpp' || echo '$(srcdir)/'`olad/HttpServerActions.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-HttpServerActions.Tpo olad/$(DEPDIR)/olad_libolaserver_la-HttpServerActions.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/HttpServerActions.cpp' object='olad/olad_libolaserver_la-HttpServerActions.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-HttpServerActions.lo `test -f 'olad/HttpServerActions.cpp' || echo '$(srcdir)/'`olad/HttpServerActions.cpp olad/olad_libolaserver_la-OladHTTPServer.lo: olad/OladHTTPServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-OladHTTPServer.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-OladHTTPServer.Tpo -c -o olad/olad_libolaserver_la-OladHTTPServer.lo `test -f 'olad/OladHTTPServer.cpp' || echo '$(srcdir)/'`olad/OladHTTPServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-OladHTTPServer.Tpo olad/$(DEPDIR)/olad_libolaserver_la-OladHTTPServer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/OladHTTPServer.cpp' object='olad/olad_libolaserver_la-OladHTTPServer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-OladHTTPServer.lo `test -f 'olad/OladHTTPServer.cpp' || echo '$(srcdir)/'`olad/OladHTTPServer.cpp olad/olad_libolaserver_la-RDMHTTPModule.lo: olad/RDMHTTPModule.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-RDMHTTPModule.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-RDMHTTPModule.Tpo -c -o olad/olad_libolaserver_la-RDMHTTPModule.lo `test -f 'olad/RDMHTTPModule.cpp' || echo '$(srcdir)/'`olad/RDMHTTPModule.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-RDMHTTPModule.Tpo olad/$(DEPDIR)/olad_libolaserver_la-RDMHTTPModule.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/RDMHTTPModule.cpp' object='olad/olad_libolaserver_la-RDMHTTPModule.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-RDMHTTPModule.lo `test -f 'olad/RDMHTTPModule.cpp' || echo '$(srcdir)/'`olad/RDMHTTPModule.cpp olad/olad_libolaserver_la-OlaServer.lo: olad/OlaServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-OlaServer.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-OlaServer.Tpo -c -o olad/olad_libolaserver_la-OlaServer.lo `test -f 'olad/OlaServer.cpp' || echo '$(srcdir)/'`olad/OlaServer.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-OlaServer.Tpo olad/$(DEPDIR)/olad_libolaserver_la-OlaServer.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/OlaServer.cpp' object='olad/olad_libolaserver_la-OlaServer.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-OlaServer.lo `test -f 'olad/OlaServer.cpp' || echo '$(srcdir)/'`olad/OlaServer.cpp olad/olad_libolaserver_la-OlaDaemon.lo: olad/OlaDaemon.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_libolaserver_la-OlaDaemon.lo -MD -MP -MF olad/$(DEPDIR)/olad_libolaserver_la-OlaDaemon.Tpo -c -o olad/olad_libolaserver_la-OlaDaemon.lo `test -f 'olad/OlaDaemon.cpp' || echo '$(srcdir)/'`olad/OlaDaemon.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_libolaserver_la-OlaDaemon.Tpo olad/$(DEPDIR)/olad_libolaserver_la-OlaDaemon.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/OlaDaemon.cpp' object='olad/olad_libolaserver_la-OlaDaemon.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_libolaserver_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_libolaserver_la-OlaDaemon.lo `test -f 'olad/OlaDaemon.cpp' || echo '$(srcdir)/'`olad/OlaDaemon.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Client.lo: olad/plugin_api/Client.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Client.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Client.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Client.lo `test -f 'olad/plugin_api/Client.cpp' || echo '$(srcdir)/'`olad/plugin_api/Client.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Client.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Client.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/Client.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Client.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Client.lo `test -f 'olad/plugin_api/Client.cpp' || echo '$(srcdir)/'`olad/plugin_api/Client.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Device.lo: olad/plugin_api/Device.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Device.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Device.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Device.lo `test -f 'olad/plugin_api/Device.cpp' || echo '$(srcdir)/'`olad/plugin_api/Device.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Device.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Device.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/Device.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Device.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Device.lo `test -f 'olad/plugin_api/Device.cpp' || echo '$(srcdir)/'`olad/plugin_api/Device.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DeviceManager.lo: olad/plugin_api/DeviceManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DeviceManager.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-DeviceManager.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DeviceManager.lo `test -f 'olad/plugin_api/DeviceManager.cpp' || echo '$(srcdir)/'`olad/plugin_api/DeviceManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-DeviceManager.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-DeviceManager.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/DeviceManager.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DeviceManager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DeviceManager.lo `test -f 'olad/plugin_api/DeviceManager.cpp' || echo '$(srcdir)/'`olad/plugin_api/DeviceManager.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DmxSource.lo: olad/plugin_api/DmxSource.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DmxSource.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-DmxSource.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DmxSource.lo `test -f 'olad/plugin_api/DmxSource.cpp' || echo '$(srcdir)/'`olad/plugin_api/DmxSource.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-DmxSource.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-DmxSource.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/DmxSource.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DmxSource.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-DmxSource.lo `test -f 'olad/plugin_api/DmxSource.cpp' || echo '$(srcdir)/'`olad/plugin_api/DmxSource.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Plugin.lo: olad/plugin_api/Plugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Plugin.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Plugin.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Plugin.lo `test -f 'olad/plugin_api/Plugin.cpp' || echo '$(srcdir)/'`olad/plugin_api/Plugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Plugin.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Plugin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/Plugin.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Plugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Plugin.lo `test -f 'olad/plugin_api/Plugin.cpp' || echo '$(srcdir)/'`olad/plugin_api/Plugin.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PluginAdaptor.lo: olad/plugin_api/PluginAdaptor.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PluginAdaptor.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PluginAdaptor.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PluginAdaptor.lo `test -f 'olad/plugin_api/PluginAdaptor.cpp' || echo '$(srcdir)/'`olad/plugin_api/PluginAdaptor.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PluginAdaptor.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PluginAdaptor.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/PluginAdaptor.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PluginAdaptor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PluginAdaptor.lo `test -f 'olad/plugin_api/PluginAdaptor.cpp' || echo '$(srcdir)/'`olad/plugin_api/PluginAdaptor.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Port.lo: olad/plugin_api/Port.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Port.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Port.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Port.lo `test -f 'olad/plugin_api/Port.cpp' || echo '$(srcdir)/'`olad/plugin_api/Port.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Port.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Port.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/Port.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Port.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Port.lo `test -f 'olad/plugin_api/Port.cpp' || echo '$(srcdir)/'`olad/plugin_api/Port.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortBroker.lo: olad/plugin_api/PortBroker.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortBroker.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PortBroker.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortBroker.lo `test -f 'olad/plugin_api/PortBroker.cpp' || echo '$(srcdir)/'`olad/plugin_api/PortBroker.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PortBroker.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PortBroker.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/PortBroker.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortBroker.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortBroker.lo `test -f 'olad/plugin_api/PortBroker.cpp' || echo '$(srcdir)/'`olad/plugin_api/PortBroker.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortManager.lo: olad/plugin_api/PortManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortManager.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PortManager.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortManager.lo `test -f 'olad/plugin_api/PortManager.cpp' || echo '$(srcdir)/'`olad/plugin_api/PortManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PortManager.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-PortManager.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/PortManager.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortManager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-PortManager.lo `test -f 'olad/plugin_api/PortManager.cpp' || echo '$(srcdir)/'`olad/plugin_api/PortManager.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Preferences.lo: olad/plugin_api/Preferences.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Preferences.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Preferences.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Preferences.lo `test -f 'olad/plugin_api/Preferences.cpp' || echo '$(srcdir)/'`olad/plugin_api/Preferences.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Preferences.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Preferences.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/Preferences.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Preferences.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Preferences.lo `test -f 'olad/plugin_api/Preferences.cpp' || echo '$(srcdir)/'`olad/plugin_api/Preferences.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Universe.lo: olad/plugin_api/Universe.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Universe.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Universe.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Universe.lo `test -f 'olad/plugin_api/Universe.cpp' || echo '$(srcdir)/'`olad/plugin_api/Universe.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Universe.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-Universe.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/Universe.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Universe.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-Universe.lo `test -f 'olad/plugin_api/Universe.cpp' || echo '$(srcdir)/'`olad/plugin_api/Universe.cpp olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-UniverseStore.lo: olad/plugin_api/UniverseStore.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-UniverseStore.lo -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-UniverseStore.Tpo -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-UniverseStore.lo `test -f 'olad/plugin_api/UniverseStore.cpp' || echo '$(srcdir)/'`olad/plugin_api/UniverseStore.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-UniverseStore.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_libolaserverplugininterface_la-UniverseStore.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/UniverseStore.cpp' object='olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-UniverseStore.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_libolaserverplugininterface_la_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_libolaserverplugininterface_la-UniverseStore.lo `test -f 'olad/plugin_api/UniverseStore.cpp' || echo '$(srcdir)/'`olad/plugin_api/UniverseStore.cpp plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPlugin.lo: plugins/artnet/ArtNetPlugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_libolaartnet_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPlugin.lo -MD -MP -MF plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetPlugin.Tpo -c -o plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPlugin.lo `test -f 'plugins/artnet/ArtNetPlugin.cpp' || echo '$(srcdir)/'`plugins/artnet/ArtNetPlugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetPlugin.Tpo plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetPlugin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/artnet/ArtNetPlugin.cpp' object='plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPlugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_libolaartnet_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPlugin.lo `test -f 'plugins/artnet/ArtNetPlugin.cpp' || echo '$(srcdir)/'`plugins/artnet/ArtNetPlugin.cpp plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetDevice.lo: plugins/artnet/ArtNetDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_libolaartnet_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetDevice.lo -MD -MP -MF plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetDevice.Tpo -c -o plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetDevice.lo `test -f 'plugins/artnet/ArtNetDevice.cpp' || echo '$(srcdir)/'`plugins/artnet/ArtNetDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetDevice.Tpo plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/artnet/ArtNetDevice.cpp' object='plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_libolaartnet_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetDevice.lo `test -f 'plugins/artnet/ArtNetDevice.cpp' || echo '$(srcdir)/'`plugins/artnet/ArtNetDevice.cpp plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPort.lo: plugins/artnet/ArtNetPort.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_libolaartnet_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPort.lo -MD -MP -MF plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetPort.Tpo -c -o plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPort.lo `test -f 'plugins/artnet/ArtNetPort.cpp' || echo '$(srcdir)/'`plugins/artnet/ArtNetPort.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetPort.Tpo plugins/artnet/$(DEPDIR)/plugins_artnet_libolaartnet_la-ArtNetPort.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/artnet/ArtNetPort.cpp' object='plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPort.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_libolaartnet_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/artnet/plugins_artnet_libolaartnet_la-ArtNetPort.lo `test -f 'plugins/artnet/ArtNetPort.cpp' || echo '$(srcdir)/'`plugins/artnet/ArtNetPort.cpp plugins/artnet/messages/plugins_artnet_messages_libolaartnetconf_la-ArtNetConfigMessages.pb.lo: plugins/artnet/messages/ArtNetConfigMessages.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_messages_libolaartnetconf_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/artnet/messages/plugins_artnet_messages_libolaartnetconf_la-ArtNetConfigMessages.pb.lo -MD -MP -MF plugins/artnet/messages/$(DEPDIR)/plugins_artnet_messages_libolaartnetconf_la-ArtNetConfigMessages.pb.Tpo -c -o plugins/artnet/messages/plugins_artnet_messages_libolaartnetconf_la-ArtNetConfigMessages.pb.lo `test -f 'plugins/artnet/messages/ArtNetConfigMessages.pb.cc' || echo '$(srcdir)/'`plugins/artnet/messages/ArtNetConfigMessages.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/artnet/messages/$(DEPDIR)/plugins_artnet_messages_libolaartnetconf_la-ArtNetConfigMessages.pb.Tpo plugins/artnet/messages/$(DEPDIR)/plugins_artnet_messages_libolaartnetconf_la-ArtNetConfigMessages.pb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/artnet/messages/ArtNetConfigMessages.pb.cc' object='plugins/artnet/messages/plugins_artnet_messages_libolaartnetconf_la-ArtNetConfigMessages.pb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_messages_libolaartnetconf_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/artnet/messages/plugins_artnet_messages_libolaartnetconf_la-ArtNetConfigMessages.pb.lo `test -f 'plugins/artnet/messages/ArtNetConfigMessages.pb.cc' || echo '$(srcdir)/'`plugins/artnet/messages/ArtNetConfigMessages.pb.cc plugins/e131/plugins_e131_libolae131_la-E131Device.lo: plugins/e131/E131Device.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_e131_libolae131_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/e131/plugins_e131_libolae131_la-E131Device.lo -MD -MP -MF plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Device.Tpo -c -o plugins/e131/plugins_e131_libolae131_la-E131Device.lo `test -f 'plugins/e131/E131Device.cpp' || echo '$(srcdir)/'`plugins/e131/E131Device.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Device.Tpo plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Device.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/e131/E131Device.cpp' object='plugins/e131/plugins_e131_libolae131_la-E131Device.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_e131_libolae131_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/e131/plugins_e131_libolae131_la-E131Device.lo `test -f 'plugins/e131/E131Device.cpp' || echo '$(srcdir)/'`plugins/e131/E131Device.cpp plugins/e131/plugins_e131_libolae131_la-E131Plugin.lo: plugins/e131/E131Plugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_e131_libolae131_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/e131/plugins_e131_libolae131_la-E131Plugin.lo -MD -MP -MF plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Plugin.Tpo -c -o plugins/e131/plugins_e131_libolae131_la-E131Plugin.lo `test -f 'plugins/e131/E131Plugin.cpp' || echo '$(srcdir)/'`plugins/e131/E131Plugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Plugin.Tpo plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Plugin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/e131/E131Plugin.cpp' object='plugins/e131/plugins_e131_libolae131_la-E131Plugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_e131_libolae131_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/e131/plugins_e131_libolae131_la-E131Plugin.lo `test -f 'plugins/e131/E131Plugin.cpp' || echo '$(srcdir)/'`plugins/e131/E131Plugin.cpp plugins/e131/plugins_e131_libolae131_la-E131Port.lo: plugins/e131/E131Port.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_e131_libolae131_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/e131/plugins_e131_libolae131_la-E131Port.lo -MD -MP -MF plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Port.Tpo -c -o plugins/e131/plugins_e131_libolae131_la-E131Port.lo `test -f 'plugins/e131/E131Port.cpp' || echo '$(srcdir)/'`plugins/e131/E131Port.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Port.Tpo plugins/e131/$(DEPDIR)/plugins_e131_libolae131_la-E131Port.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/e131/E131Port.cpp' object='plugins/e131/plugins_e131_libolae131_la-E131Port.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_e131_libolae131_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/e131/plugins_e131_libolae131_la-E131Port.lo `test -f 'plugins/e131/E131Port.cpp' || echo '$(srcdir)/'`plugins/e131/E131Port.cpp plugins/e131/messages/plugins_e131_messages_libolae131conf_la-E131ConfigMessages.pb.lo: plugins/e131/messages/E131ConfigMessages.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_e131_messages_libolae131conf_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/e131/messages/plugins_e131_messages_libolae131conf_la-E131ConfigMessages.pb.lo -MD -MP -MF plugins/e131/messages/$(DEPDIR)/plugins_e131_messages_libolae131conf_la-E131ConfigMessages.pb.Tpo -c -o plugins/e131/messages/plugins_e131_messages_libolae131conf_la-E131ConfigMessages.pb.lo `test -f 'plugins/e131/messages/E131ConfigMessages.pb.cc' || echo '$(srcdir)/'`plugins/e131/messages/E131ConfigMessages.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/e131/messages/$(DEPDIR)/plugins_e131_messages_libolae131conf_la-E131ConfigMessages.pb.Tpo plugins/e131/messages/$(DEPDIR)/plugins_e131_messages_libolae131conf_la-E131ConfigMessages.pb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/e131/messages/E131ConfigMessages.pb.cc' object='plugins/e131/messages/plugins_e131_messages_libolae131conf_la-E131ConfigMessages.pb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_e131_messages_libolae131conf_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/e131/messages/plugins_e131_messages_libolae131conf_la-E131ConfigMessages.pb.lo `test -f 'plugins/e131/messages/E131ConfigMessages.pb.cc' || echo '$(srcdir)/'`plugins/e131/messages/E131ConfigMessages.pb.cc plugins/osc/plugins_osc_libolaosc_la-OSCDevice.lo: plugins/osc/OSCDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_libolaosc_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/osc/plugins_osc_libolaosc_la-OSCDevice.lo -MD -MP -MF plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCDevice.Tpo -c -o plugins/osc/plugins_osc_libolaosc_la-OSCDevice.lo `test -f 'plugins/osc/OSCDevice.cpp' || echo '$(srcdir)/'`plugins/osc/OSCDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCDevice.Tpo plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/osc/OSCDevice.cpp' object='plugins/osc/plugins_osc_libolaosc_la-OSCDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_libolaosc_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/osc/plugins_osc_libolaosc_la-OSCDevice.lo `test -f 'plugins/osc/OSCDevice.cpp' || echo '$(srcdir)/'`plugins/osc/OSCDevice.cpp plugins/osc/plugins_osc_libolaosc_la-OSCPlugin.lo: plugins/osc/OSCPlugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_libolaosc_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/osc/plugins_osc_libolaosc_la-OSCPlugin.lo -MD -MP -MF plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCPlugin.Tpo -c -o plugins/osc/plugins_osc_libolaosc_la-OSCPlugin.lo `test -f 'plugins/osc/OSCPlugin.cpp' || echo '$(srcdir)/'`plugins/osc/OSCPlugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCPlugin.Tpo plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCPlugin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/osc/OSCPlugin.cpp' object='plugins/osc/plugins_osc_libolaosc_la-OSCPlugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_libolaosc_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/osc/plugins_osc_libolaosc_la-OSCPlugin.lo `test -f 'plugins/osc/OSCPlugin.cpp' || echo '$(srcdir)/'`plugins/osc/OSCPlugin.cpp plugins/osc/plugins_osc_libolaosc_la-OSCPort.lo: plugins/osc/OSCPort.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_libolaosc_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/osc/plugins_osc_libolaosc_la-OSCPort.lo -MD -MP -MF plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCPort.Tpo -c -o plugins/osc/plugins_osc_libolaosc_la-OSCPort.lo `test -f 'plugins/osc/OSCPort.cpp' || echo '$(srcdir)/'`plugins/osc/OSCPort.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCPort.Tpo plugins/osc/$(DEPDIR)/plugins_osc_libolaosc_la-OSCPort.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/osc/OSCPort.cpp' object='plugins/osc/plugins_osc_libolaosc_la-OSCPort.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_libolaosc_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/osc/plugins_osc_libolaosc_la-OSCPort.lo `test -f 'plugins/osc/OSCPort.cpp' || echo '$(srcdir)/'`plugins/osc/OSCPort.cpp plugins/osc/plugins_osc_libolaoscnode_la-OSCAddressTemplate.lo: plugins/osc/OSCAddressTemplate.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_libolaoscnode_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/osc/plugins_osc_libolaoscnode_la-OSCAddressTemplate.lo -MD -MP -MF plugins/osc/$(DEPDIR)/plugins_osc_libolaoscnode_la-OSCAddressTemplate.Tpo -c -o plugins/osc/plugins_osc_libolaoscnode_la-OSCAddressTemplate.lo `test -f 'plugins/osc/OSCAddressTemplate.cpp' || echo '$(srcdir)/'`plugins/osc/OSCAddressTemplate.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/osc/$(DEPDIR)/plugins_osc_libolaoscnode_la-OSCAddressTemplate.Tpo plugins/osc/$(DEPDIR)/plugins_osc_libolaoscnode_la-OSCAddressTemplate.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/osc/OSCAddressTemplate.cpp' object='plugins/osc/plugins_osc_libolaoscnode_la-OSCAddressTemplate.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_libolaoscnode_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/osc/plugins_osc_libolaoscnode_la-OSCAddressTemplate.lo `test -f 'plugins/osc/OSCAddressTemplate.cpp' || echo '$(srcdir)/'`plugins/osc/OSCAddressTemplate.cpp plugins/osc/plugins_osc_libolaoscnode_la-OSCNode.lo: plugins/osc/OSCNode.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_libolaoscnode_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/osc/plugins_osc_libolaoscnode_la-OSCNode.lo -MD -MP -MF plugins/osc/$(DEPDIR)/plugins_osc_libolaoscnode_la-OSCNode.Tpo -c -o plugins/osc/plugins_osc_libolaoscnode_la-OSCNode.lo `test -f 'plugins/osc/OSCNode.cpp' || echo '$(srcdir)/'`plugins/osc/OSCNode.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/osc/$(DEPDIR)/plugins_osc_libolaoscnode_la-OSCNode.Tpo plugins/osc/$(DEPDIR)/plugins_osc_libolaoscnode_la-OSCNode.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/osc/OSCNode.cpp' object='plugins/osc/plugins_osc_libolaoscnode_la-OSCNode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_libolaoscnode_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/osc/plugins_osc_libolaoscnode_la-OSCNode.lo `test -f 'plugins/osc/OSCNode.cpp' || echo '$(srcdir)/'`plugins/osc/OSCNode.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-AsyncPluginImpl.lo: plugins/usbdmx/AsyncPluginImpl.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-AsyncPluginImpl.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-AsyncPluginImpl.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-AsyncPluginImpl.lo `test -f 'plugins/usbdmx/AsyncPluginImpl.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AsyncPluginImpl.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-AsyncPluginImpl.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-AsyncPluginImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/AsyncPluginImpl.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-AsyncPluginImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-AsyncPluginImpl.lo `test -f 'plugins/usbdmx/AsyncPluginImpl.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AsyncPluginImpl.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Device.lo: plugins/usbdmx/DMXCProjectsNodleU1Device.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Device.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Device.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Device.lo `test -f 'plugins/usbdmx/DMXCProjectsNodleU1Device.cpp' || echo '$(srcdir)/'`plugins/usbdmx/DMXCProjectsNodleU1Device.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Device.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Device.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/DMXCProjectsNodleU1Device.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Device.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Device.lo `test -f 'plugins/usbdmx/DMXCProjectsNodleU1Device.cpp' || echo '$(srcdir)/'`plugins/usbdmx/DMXCProjectsNodleU1Device.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Port.lo: plugins/usbdmx/DMXCProjectsNodleU1Port.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Port.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Port.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Port.lo `test -f 'plugins/usbdmx/DMXCProjectsNodleU1Port.cpp' || echo '$(srcdir)/'`plugins/usbdmx/DMXCProjectsNodleU1Port.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Port.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Port.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/DMXCProjectsNodleU1Port.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Port.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-DMXCProjectsNodleU1Port.lo `test -f 'plugins/usbdmx/DMXCProjectsNodleU1Port.cpp' || echo '$(srcdir)/'`plugins/usbdmx/DMXCProjectsNodleU1Port.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericDevice.lo: plugins/usbdmx/GenericDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericDevice.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-GenericDevice.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericDevice.lo `test -f 'plugins/usbdmx/GenericDevice.cpp' || echo '$(srcdir)/'`plugins/usbdmx/GenericDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-GenericDevice.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-GenericDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/GenericDevice.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericDevice.lo `test -f 'plugins/usbdmx/GenericDevice.cpp' || echo '$(srcdir)/'`plugins/usbdmx/GenericDevice.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericOutputPort.lo: plugins/usbdmx/GenericOutputPort.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericOutputPort.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-GenericOutputPort.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericOutputPort.lo `test -f 'plugins/usbdmx/GenericOutputPort.cpp' || echo '$(srcdir)/'`plugins/usbdmx/GenericOutputPort.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-GenericOutputPort.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-GenericOutputPort.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/GenericOutputPort.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericOutputPort.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-GenericOutputPort.lo `test -f 'plugins/usbdmx/GenericOutputPort.cpp' || echo '$(srcdir)/'`plugins/usbdmx/GenericOutputPort.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleDevice.lo: plugins/usbdmx/JaRuleDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleDevice.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-JaRuleDevice.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleDevice.lo `test -f 'plugins/usbdmx/JaRuleDevice.cpp' || echo '$(srcdir)/'`plugins/usbdmx/JaRuleDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-JaRuleDevice.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-JaRuleDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/JaRuleDevice.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleDevice.lo `test -f 'plugins/usbdmx/JaRuleDevice.cpp' || echo '$(srcdir)/'`plugins/usbdmx/JaRuleDevice.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleOutputPort.lo: plugins/usbdmx/JaRuleOutputPort.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleOutputPort.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-JaRuleOutputPort.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleOutputPort.lo `test -f 'plugins/usbdmx/JaRuleOutputPort.cpp' || echo '$(srcdir)/'`plugins/usbdmx/JaRuleOutputPort.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-JaRuleOutputPort.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-JaRuleOutputPort.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/JaRuleOutputPort.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleOutputPort.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-JaRuleOutputPort.lo `test -f 'plugins/usbdmx/JaRuleOutputPort.cpp' || echo '$(srcdir)/'`plugins/usbdmx/JaRuleOutputPort.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-SyncPluginImpl.lo: plugins/usbdmx/SyncPluginImpl.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-SyncPluginImpl.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-SyncPluginImpl.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-SyncPluginImpl.lo `test -f 'plugins/usbdmx/SyncPluginImpl.cpp' || echo '$(srcdir)/'`plugins/usbdmx/SyncPluginImpl.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-SyncPluginImpl.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-SyncPluginImpl.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/SyncPluginImpl.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-SyncPluginImpl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-SyncPluginImpl.lo `test -f 'plugins/usbdmx/SyncPluginImpl.cpp' || echo '$(srcdir)/'`plugins/usbdmx/SyncPluginImpl.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-UsbDmxPlugin.lo: plugins/usbdmx/UsbDmxPlugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-UsbDmxPlugin.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-UsbDmxPlugin.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-UsbDmxPlugin.lo `test -f 'plugins/usbdmx/UsbDmxPlugin.cpp' || echo '$(srcdir)/'`plugins/usbdmx/UsbDmxPlugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-UsbDmxPlugin.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmx_la-UsbDmxPlugin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/UsbDmxPlugin.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-UsbDmxPlugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmx_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmx_la-UsbDmxPlugin.lo `test -f 'plugins/usbdmx/UsbDmxPlugin.cpp' || echo '$(srcdir)/'`plugins/usbdmx/UsbDmxPlugin.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMX.lo: plugins/usbdmx/AnymauDMX.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMX.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMX.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMX.lo `test -f 'plugins/usbdmx/AnymauDMX.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AnymauDMX.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMX.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMX.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/AnymauDMX.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMX.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMX.lo `test -f 'plugins/usbdmx/AnymauDMX.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AnymauDMX.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMXFactory.lo: plugins/usbdmx/AnymauDMXFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMXFactory.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMXFactory.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMXFactory.lo `test -f 'plugins/usbdmx/AnymauDMXFactory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AnymauDMXFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMXFactory.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMXFactory.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/AnymauDMXFactory.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMXFactory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AnymauDMXFactory.lo `test -f 'plugins/usbdmx/AnymauDMXFactory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AnymauDMXFactory.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbReceiver.lo: plugins/usbdmx/AsyncUsbReceiver.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbReceiver.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbReceiver.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbReceiver.lo `test -f 'plugins/usbdmx/AsyncUsbReceiver.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AsyncUsbReceiver.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbReceiver.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbReceiver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/AsyncUsbReceiver.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbReceiver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbReceiver.lo `test -f 'plugins/usbdmx/AsyncUsbReceiver.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AsyncUsbReceiver.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbSender.lo: plugins/usbdmx/AsyncUsbSender.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbSender.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbSender.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbSender.lo `test -f 'plugins/usbdmx/AsyncUsbSender.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AsyncUsbSender.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbSender.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbSender.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/AsyncUsbSender.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbSender.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbSender.lo `test -f 'plugins/usbdmx/AsyncUsbSender.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AsyncUsbSender.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbTransceiverBase.lo: plugins/usbdmx/AsyncUsbTransceiverBase.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbTransceiverBase.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbTransceiverBase.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbTransceiverBase.lo `test -f 'plugins/usbdmx/AsyncUsbTransceiverBase.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AsyncUsbTransceiverBase.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbTransceiverBase.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbTransceiverBase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/AsyncUsbTransceiverBase.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbTransceiverBase.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-AsyncUsbTransceiverBase.lo `test -f 'plugins/usbdmx/AsyncUsbTransceiverBase.cpp' || echo '$(srcdir)/'`plugins/usbdmx/AsyncUsbTransceiverBase.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1.lo: plugins/usbdmx/DMXCProjectsNodleU1.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1.lo `test -f 'plugins/usbdmx/DMXCProjectsNodleU1.cpp' || echo '$(srcdir)/'`plugins/usbdmx/DMXCProjectsNodleU1.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/DMXCProjectsNodleU1.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1.lo `test -f 'plugins/usbdmx/DMXCProjectsNodleU1.cpp' || echo '$(srcdir)/'`plugins/usbdmx/DMXCProjectsNodleU1.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1Factory.lo: plugins/usbdmx/DMXCProjectsNodleU1Factory.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1Factory.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1Factory.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1Factory.lo `test -f 'plugins/usbdmx/DMXCProjectsNodleU1Factory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/DMXCProjectsNodleU1Factory.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1Factory.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1Factory.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/DMXCProjectsNodleU1Factory.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1Factory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-DMXCProjectsNodleU1Factory.lo `test -f 'plugins/usbdmx/DMXCProjectsNodleU1Factory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/DMXCProjectsNodleU1Factory.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EurolitePro.lo: plugins/usbdmx/EurolitePro.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EurolitePro.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-EurolitePro.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EurolitePro.lo `test -f 'plugins/usbdmx/EurolitePro.cpp' || echo '$(srcdir)/'`plugins/usbdmx/EurolitePro.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-EurolitePro.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-EurolitePro.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/EurolitePro.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EurolitePro.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EurolitePro.lo `test -f 'plugins/usbdmx/EurolitePro.cpp' || echo '$(srcdir)/'`plugins/usbdmx/EurolitePro.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EuroliteProFactory.lo: plugins/usbdmx/EuroliteProFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EuroliteProFactory.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-EuroliteProFactory.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EuroliteProFactory.lo `test -f 'plugins/usbdmx/EuroliteProFactory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/EuroliteProFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-EuroliteProFactory.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-EuroliteProFactory.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/EuroliteProFactory.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EuroliteProFactory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-EuroliteProFactory.lo `test -f 'plugins/usbdmx/EuroliteProFactory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/EuroliteProFactory.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Flags.lo: plugins/usbdmx/Flags.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Flags.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-Flags.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Flags.lo `test -f 'plugins/usbdmx/Flags.cpp' || echo '$(srcdir)/'`plugins/usbdmx/Flags.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-Flags.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-Flags.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/Flags.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Flags.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Flags.lo `test -f 'plugins/usbdmx/Flags.cpp' || echo '$(srcdir)/'`plugins/usbdmx/Flags.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-JaRuleFactory.lo: plugins/usbdmx/JaRuleFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-JaRuleFactory.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-JaRuleFactory.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-JaRuleFactory.lo `test -f 'plugins/usbdmx/JaRuleFactory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/JaRuleFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-JaRuleFactory.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-JaRuleFactory.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/JaRuleFactory.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-JaRuleFactory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-JaRuleFactory.lo `test -f 'plugins/usbdmx/JaRuleFactory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/JaRuleFactory.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandy.lo: plugins/usbdmx/ScanlimeFadecandy.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandy.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandy.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandy.lo `test -f 'plugins/usbdmx/ScanlimeFadecandy.cpp' || echo '$(srcdir)/'`plugins/usbdmx/ScanlimeFadecandy.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandy.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandy.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/ScanlimeFadecandy.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandy.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandy.lo `test -f 'plugins/usbdmx/ScanlimeFadecandy.cpp' || echo '$(srcdir)/'`plugins/usbdmx/ScanlimeFadecandy.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandyFactory.lo: plugins/usbdmx/ScanlimeFadecandyFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandyFactory.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandyFactory.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandyFactory.lo `test -f 'plugins/usbdmx/ScanlimeFadecandyFactory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/ScanlimeFadecandyFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandyFactory.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandyFactory.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/ScanlimeFadecandyFactory.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandyFactory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ScanlimeFadecandyFactory.lo `test -f 'plugins/usbdmx/ScanlimeFadecandyFactory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/ScanlimeFadecandyFactory.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Sunlite.lo: plugins/usbdmx/Sunlite.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Sunlite.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-Sunlite.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Sunlite.lo `test -f 'plugins/usbdmx/Sunlite.cpp' || echo '$(srcdir)/'`plugins/usbdmx/Sunlite.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-Sunlite.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-Sunlite.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/Sunlite.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Sunlite.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-Sunlite.lo `test -f 'plugins/usbdmx/Sunlite.cpp' || echo '$(srcdir)/'`plugins/usbdmx/Sunlite.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFactory.lo: plugins/usbdmx/SunliteFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFactory.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SunliteFactory.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFactory.lo `test -f 'plugins/usbdmx/SunliteFactory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/SunliteFactory.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SunliteFactory.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SunliteFactory.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/SunliteFactory.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFactory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFactory.lo `test -f 'plugins/usbdmx/SunliteFactory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/SunliteFactory.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFirmwareLoader.lo: plugins/usbdmx/SunliteFirmwareLoader.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFirmwareLoader.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SunliteFirmwareLoader.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFirmwareLoader.lo `test -f 'plugins/usbdmx/SunliteFirmwareLoader.cpp' || echo '$(srcdir)/'`plugins/usbdmx/SunliteFirmwareLoader.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SunliteFirmwareLoader.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SunliteFirmwareLoader.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/SunliteFirmwareLoader.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFirmwareLoader.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SunliteFirmwareLoader.lo `test -f 'plugins/usbdmx/SunliteFirmwareLoader.cpp' || echo '$(srcdir)/'`plugins/usbdmx/SunliteFirmwareLoader.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SyncronizedWidgetObserver.lo: plugins/usbdmx/SyncronizedWidgetObserver.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SyncronizedWidgetObserver.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SyncronizedWidgetObserver.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SyncronizedWidgetObserver.lo `test -f 'plugins/usbdmx/SyncronizedWidgetObserver.cpp' || echo '$(srcdir)/'`plugins/usbdmx/SyncronizedWidgetObserver.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SyncronizedWidgetObserver.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-SyncronizedWidgetObserver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/SyncronizedWidgetObserver.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SyncronizedWidgetObserver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-SyncronizedWidgetObserver.lo `test -f 'plugins/usbdmx/SyncronizedWidgetObserver.cpp' || echo '$(srcdir)/'`plugins/usbdmx/SyncronizedWidgetObserver.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbReceiver.lo: plugins/usbdmx/ThreadedUsbReceiver.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbReceiver.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbReceiver.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbReceiver.lo `test -f 'plugins/usbdmx/ThreadedUsbReceiver.cpp' || echo '$(srcdir)/'`plugins/usbdmx/ThreadedUsbReceiver.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbReceiver.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbReceiver.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/ThreadedUsbReceiver.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbReceiver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbReceiver.lo `test -f 'plugins/usbdmx/ThreadedUsbReceiver.cpp' || echo '$(srcdir)/'`plugins/usbdmx/ThreadedUsbReceiver.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbSender.lo: plugins/usbdmx/ThreadedUsbSender.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbSender.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbSender.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbSender.lo `test -f 'plugins/usbdmx/ThreadedUsbSender.cpp' || echo '$(srcdir)/'`plugins/usbdmx/ThreadedUsbSender.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbSender.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbSender.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/ThreadedUsbSender.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbSender.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-ThreadedUsbSender.lo `test -f 'plugins/usbdmx/ThreadedUsbSender.cpp' || echo '$(srcdir)/'`plugins/usbdmx/ThreadedUsbSender.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062.lo: plugins/usbdmx/VellemanK8062.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062.lo `test -f 'plugins/usbdmx/VellemanK8062.cpp' || echo '$(srcdir)/'`plugins/usbdmx/VellemanK8062.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/VellemanK8062.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062.lo `test -f 'plugins/usbdmx/VellemanK8062.cpp' || echo '$(srcdir)/'`plugins/usbdmx/VellemanK8062.cpp plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062Factory.lo: plugins/usbdmx/VellemanK8062Factory.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062Factory.lo -MD -MP -MF plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062Factory.Tpo -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062Factory.lo `test -f 'plugins/usbdmx/VellemanK8062Factory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/VellemanK8062Factory.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062Factory.Tpo plugins/usbdmx/$(DEPDIR)/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062Factory.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbdmx/VellemanK8062Factory.cpp' object='plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062Factory.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbdmx_libolausbdmxwidget_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbdmx/plugins_usbdmx_libolausbdmxwidget_la-VellemanK8062Factory.lo `test -f 'plugins/usbdmx/VellemanK8062Factory.cpp' || echo '$(srcdir)/'`plugins/usbdmx/VellemanK8062Factory.cpp plugins/usbpro/plugins_usbpro_libolausbpro_la-ArduinoRGBDevice.lo: plugins/usbpro/ArduinoRGBDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_libolausbpro_la-ArduinoRGBDevice.lo -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-ArduinoRGBDevice.Tpo -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-ArduinoRGBDevice.lo `test -f 'plugins/usbpro/ArduinoRGBDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/ArduinoRGBDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-ArduinoRGBDevice.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-ArduinoRGBDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/ArduinoRGBDevice.cpp' object='plugins/usbpro/plugins_usbpro_libolausbpro_la-ArduinoRGBDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-ArduinoRGBDevice.lo `test -f 'plugins/usbpro/ArduinoRGBDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/ArduinoRGBDevice.cpp plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxTriDevice.lo: plugins/usbpro/DmxTriDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxTriDevice.lo -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-DmxTriDevice.Tpo -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxTriDevice.lo `test -f 'plugins/usbpro/DmxTriDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/DmxTriDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-DmxTriDevice.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-DmxTriDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/DmxTriDevice.cpp' object='plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxTriDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxTriDevice.lo `test -f 'plugins/usbpro/DmxTriDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/DmxTriDevice.cpp plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxterDevice.lo: plugins/usbpro/DmxterDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxterDevice.lo -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-DmxterDevice.Tpo -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxterDevice.lo `test -f 'plugins/usbpro/DmxterDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/DmxterDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-DmxterDevice.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-DmxterDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/DmxterDevice.cpp' object='plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxterDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-DmxterDevice.lo `test -f 'plugins/usbpro/DmxterDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/DmxterDevice.cpp plugins/usbpro/plugins_usbpro_libolausbpro_la-RobeDevice.lo: plugins/usbpro/RobeDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_libolausbpro_la-RobeDevice.lo -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-RobeDevice.Tpo -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-RobeDevice.lo `test -f 'plugins/usbpro/RobeDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/RobeDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-RobeDevice.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-RobeDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/RobeDevice.cpp' object='plugins/usbpro/plugins_usbpro_libolausbpro_la-RobeDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-RobeDevice.lo `test -f 'plugins/usbpro/RobeDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/RobeDevice.cpp plugins/usbpro/plugins_usbpro_libolausbpro_la-UltraDMXProDevice.lo: plugins/usbpro/UltraDMXProDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_libolausbpro_la-UltraDMXProDevice.lo -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UltraDMXProDevice.Tpo -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-UltraDMXProDevice.lo `test -f 'plugins/usbpro/UltraDMXProDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/UltraDMXProDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UltraDMXProDevice.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UltraDMXProDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/UltraDMXProDevice.cpp' object='plugins/usbpro/plugins_usbpro_libolausbpro_la-UltraDMXProDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-UltraDMXProDevice.lo `test -f 'plugins/usbpro/UltraDMXProDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/UltraDMXProDevice.cpp plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbProDevice.lo: plugins/usbpro/UsbProDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbProDevice.lo -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UsbProDevice.Tpo -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbProDevice.lo `test -f 'plugins/usbpro/UsbProDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/UsbProDevice.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UsbProDevice.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UsbProDevice.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/UsbProDevice.cpp' object='plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbProDevice.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbProDevice.lo `test -f 'plugins/usbpro/UsbProDevice.cpp' || echo '$(srcdir)/'`plugins/usbpro/UsbProDevice.cpp plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbSerialPlugin.lo: plugins/usbpro/UsbSerialPlugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbSerialPlugin.lo -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UsbSerialPlugin.Tpo -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbSerialPlugin.lo `test -f 'plugins/usbpro/UsbSerialPlugin.cpp' || echo '$(srcdir)/'`plugins/usbpro/UsbSerialPlugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UsbSerialPlugin.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_libolausbpro_la-UsbSerialPlugin.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/UsbSerialPlugin.cpp' object='plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbSerialPlugin.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_libolausbpro_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_libolausbpro_la-UsbSerialPlugin.lo `test -f 'plugins/usbpro/UsbSerialPlugin.cpp' || echo '$(srcdir)/'`plugins/usbpro/UsbSerialPlugin.cpp plugins/usbpro/messages/plugins_usbpro_messages_libolausbproconf_la-UsbProConfigMessages.pb.lo: plugins/usbpro/messages/UsbProConfigMessages.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_messages_libolausbproconf_la_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/messages/plugins_usbpro_messages_libolausbproconf_la-UsbProConfigMessages.pb.lo -MD -MP -MF plugins/usbpro/messages/$(DEPDIR)/plugins_usbpro_messages_libolausbproconf_la-UsbProConfigMessages.pb.Tpo -c -o plugins/usbpro/messages/plugins_usbpro_messages_libolausbproconf_la-UsbProConfigMessages.pb.lo `test -f 'plugins/usbpro/messages/UsbProConfigMessages.pb.cc' || echo '$(srcdir)/'`plugins/usbpro/messages/UsbProConfigMessages.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/messages/$(DEPDIR)/plugins_usbpro_messages_libolausbproconf_la-UsbProConfigMessages.pb.Tpo plugins/usbpro/messages/$(DEPDIR)/plugins_usbpro_messages_libolausbproconf_la-UsbProConfigMessages.pb.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/messages/UsbProConfigMessages.pb.cc' object='plugins/usbpro/messages/plugins_usbpro_messages_libolausbproconf_la-UsbProConfigMessages.pb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CXX $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_messages_libolausbproconf_la_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/messages/plugins_usbpro_messages_libolausbproconf_la-UsbProConfigMessages.pb.lo `test -f 'plugins/usbpro/messages/UsbProConfigMessages.pb.cc' || echo '$(srcdir)/'`plugins/usbpro/messages/UsbProConfigMessages.pb.cc common/base/common_base_CredentialsTester-CredentialsTest.o: common/base/CredentialsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_CredentialsTester_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_base_CredentialsTester-CredentialsTest.o -MD -MP -MF common/base/$(DEPDIR)/common_base_CredentialsTester-CredentialsTest.Tpo -c -o common/base/common_base_CredentialsTester-CredentialsTest.o `test -f 'common/base/CredentialsTest.cpp' || echo '$(srcdir)/'`common/base/CredentialsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_base_CredentialsTester-CredentialsTest.Tpo common/base/$(DEPDIR)/common_base_CredentialsTester-CredentialsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/CredentialsTest.cpp' object='common/base/common_base_CredentialsTester-CredentialsTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_CredentialsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_base_CredentialsTester-CredentialsTest.o `test -f 'common/base/CredentialsTest.cpp' || echo '$(srcdir)/'`common/base/CredentialsTest.cpp common/base/common_base_CredentialsTester-CredentialsTest.obj: common/base/CredentialsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_CredentialsTester_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_base_CredentialsTester-CredentialsTest.obj -MD -MP -MF common/base/$(DEPDIR)/common_base_CredentialsTester-CredentialsTest.Tpo -c -o common/base/common_base_CredentialsTester-CredentialsTest.obj `if test -f 'common/base/CredentialsTest.cpp'; then $(CYGPATH_W) 'common/base/CredentialsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/base/CredentialsTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_base_CredentialsTester-CredentialsTest.Tpo common/base/$(DEPDIR)/common_base_CredentialsTester-CredentialsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/CredentialsTest.cpp' object='common/base/common_base_CredentialsTester-CredentialsTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_CredentialsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_base_CredentialsTester-CredentialsTest.obj `if test -f 'common/base/CredentialsTest.cpp'; then $(CYGPATH_W) 'common/base/CredentialsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/base/CredentialsTest.cpp'; fi` common/base/common_base_FlagsTester-FlagsTest.o: common/base/FlagsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_FlagsTester_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_base_FlagsTester-FlagsTest.o -MD -MP -MF common/base/$(DEPDIR)/common_base_FlagsTester-FlagsTest.Tpo -c -o common/base/common_base_FlagsTester-FlagsTest.o `test -f 'common/base/FlagsTest.cpp' || echo '$(srcdir)/'`common/base/FlagsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_base_FlagsTester-FlagsTest.Tpo common/base/$(DEPDIR)/common_base_FlagsTester-FlagsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/FlagsTest.cpp' object='common/base/common_base_FlagsTester-FlagsTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_FlagsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_base_FlagsTester-FlagsTest.o `test -f 'common/base/FlagsTest.cpp' || echo '$(srcdir)/'`common/base/FlagsTest.cpp common/base/common_base_FlagsTester-FlagsTest.obj: common/base/FlagsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_FlagsTester_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_base_FlagsTester-FlagsTest.obj -MD -MP -MF common/base/$(DEPDIR)/common_base_FlagsTester-FlagsTest.Tpo -c -o common/base/common_base_FlagsTester-FlagsTest.obj `if test -f 'common/base/FlagsTest.cpp'; then $(CYGPATH_W) 'common/base/FlagsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/base/FlagsTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_base_FlagsTester-FlagsTest.Tpo common/base/$(DEPDIR)/common_base_FlagsTester-FlagsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/FlagsTest.cpp' object='common/base/common_base_FlagsTester-FlagsTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_FlagsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_base_FlagsTester-FlagsTest.obj `if test -f 'common/base/FlagsTest.cpp'; then $(CYGPATH_W) 'common/base/FlagsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/base/FlagsTest.cpp'; fi` common/base/common_base_LoggingTester-LoggingTest.o: common/base/LoggingTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_LoggingTester_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_base_LoggingTester-LoggingTest.o -MD -MP -MF common/base/$(DEPDIR)/common_base_LoggingTester-LoggingTest.Tpo -c -o common/base/common_base_LoggingTester-LoggingTest.o `test -f 'common/base/LoggingTest.cpp' || echo '$(srcdir)/'`common/base/LoggingTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_base_LoggingTester-LoggingTest.Tpo common/base/$(DEPDIR)/common_base_LoggingTester-LoggingTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/LoggingTest.cpp' object='common/base/common_base_LoggingTester-LoggingTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_LoggingTester_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_base_LoggingTester-LoggingTest.o `test -f 'common/base/LoggingTest.cpp' || echo '$(srcdir)/'`common/base/LoggingTest.cpp common/base/common_base_LoggingTester-LoggingTest.obj: common/base/LoggingTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_LoggingTester_CXXFLAGS) $(CXXFLAGS) -MT common/base/common_base_LoggingTester-LoggingTest.obj -MD -MP -MF common/base/$(DEPDIR)/common_base_LoggingTester-LoggingTest.Tpo -c -o common/base/common_base_LoggingTester-LoggingTest.obj `if test -f 'common/base/LoggingTest.cpp'; then $(CYGPATH_W) 'common/base/LoggingTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/base/LoggingTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/base/$(DEPDIR)/common_base_LoggingTester-LoggingTest.Tpo common/base/$(DEPDIR)/common_base_LoggingTester-LoggingTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/base/LoggingTest.cpp' object='common/base/common_base_LoggingTester-LoggingTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_base_LoggingTester_CXXFLAGS) $(CXXFLAGS) -c -o common/base/common_base_LoggingTester-LoggingTest.obj `if test -f 'common/base/LoggingTest.cpp'; then $(CYGPATH_W) 'common/base/LoggingTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/base/LoggingTest.cpp'; fi` common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.o: common/dmx/RunLengthEncoderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_dmx_RunLengthEncoderTester_CXXFLAGS) $(CXXFLAGS) -MT common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.o -MD -MP -MF common/dmx/$(DEPDIR)/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.Tpo -c -o common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.o `test -f 'common/dmx/RunLengthEncoderTest.cpp' || echo '$(srcdir)/'`common/dmx/RunLengthEncoderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/dmx/$(DEPDIR)/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.Tpo common/dmx/$(DEPDIR)/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/dmx/RunLengthEncoderTest.cpp' object='common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_dmx_RunLengthEncoderTester_CXXFLAGS) $(CXXFLAGS) -c -o common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.o `test -f 'common/dmx/RunLengthEncoderTest.cpp' || echo '$(srcdir)/'`common/dmx/RunLengthEncoderTest.cpp common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.obj: common/dmx/RunLengthEncoderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_dmx_RunLengthEncoderTester_CXXFLAGS) $(CXXFLAGS) -MT common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.obj -MD -MP -MF common/dmx/$(DEPDIR)/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.Tpo -c -o common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.obj `if test -f 'common/dmx/RunLengthEncoderTest.cpp'; then $(CYGPATH_W) 'common/dmx/RunLengthEncoderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/dmx/RunLengthEncoderTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/dmx/$(DEPDIR)/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.Tpo common/dmx/$(DEPDIR)/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/dmx/RunLengthEncoderTest.cpp' object='common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_dmx_RunLengthEncoderTester_CXXFLAGS) $(CXXFLAGS) -c -o common/dmx/common_dmx_RunLengthEncoderTester-RunLengthEncoderTest.obj `if test -f 'common/dmx/RunLengthEncoderTest.cpp'; then $(CYGPATH_W) 'common/dmx/RunLengthEncoderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/dmx/RunLengthEncoderTest.cpp'; fi` common/export_map/common_export_map_ExportMapTester-ExportMapTest.o: common/export_map/ExportMapTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_export_map_ExportMapTester_CXXFLAGS) $(CXXFLAGS) -MT common/export_map/common_export_map_ExportMapTester-ExportMapTest.o -MD -MP -MF common/export_map/$(DEPDIR)/common_export_map_ExportMapTester-ExportMapTest.Tpo -c -o common/export_map/common_export_map_ExportMapTester-ExportMapTest.o `test -f 'common/export_map/ExportMapTest.cpp' || echo '$(srcdir)/'`common/export_map/ExportMapTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/export_map/$(DEPDIR)/common_export_map_ExportMapTester-ExportMapTest.Tpo common/export_map/$(DEPDIR)/common_export_map_ExportMapTester-ExportMapTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/export_map/ExportMapTest.cpp' object='common/export_map/common_export_map_ExportMapTester-ExportMapTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_export_map_ExportMapTester_CXXFLAGS) $(CXXFLAGS) -c -o common/export_map/common_export_map_ExportMapTester-ExportMapTest.o `test -f 'common/export_map/ExportMapTest.cpp' || echo '$(srcdir)/'`common/export_map/ExportMapTest.cpp common/export_map/common_export_map_ExportMapTester-ExportMapTest.obj: common/export_map/ExportMapTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_export_map_ExportMapTester_CXXFLAGS) $(CXXFLAGS) -MT common/export_map/common_export_map_ExportMapTester-ExportMapTest.obj -MD -MP -MF common/export_map/$(DEPDIR)/common_export_map_ExportMapTester-ExportMapTest.Tpo -c -o common/export_map/common_export_map_ExportMapTester-ExportMapTest.obj `if test -f 'common/export_map/ExportMapTest.cpp'; then $(CYGPATH_W) 'common/export_map/ExportMapTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/export_map/ExportMapTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/export_map/$(DEPDIR)/common_export_map_ExportMapTester-ExportMapTest.Tpo common/export_map/$(DEPDIR)/common_export_map_ExportMapTester-ExportMapTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/export_map/ExportMapTest.cpp' object='common/export_map/common_export_map_ExportMapTester-ExportMapTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_export_map_ExportMapTester_CXXFLAGS) $(CXXFLAGS) -c -o common/export_map/common_export_map_ExportMapTester-ExportMapTest.obj `if test -f 'common/export_map/ExportMapTest.cpp'; then $(CYGPATH_W) 'common/export_map/ExportMapTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/export_map/ExportMapTest.cpp'; fi` common/file/common_file_UtilTester-UtilTest.o: common/file/UtilTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_file_UtilTester_CXXFLAGS) $(CXXFLAGS) -MT common/file/common_file_UtilTester-UtilTest.o -MD -MP -MF common/file/$(DEPDIR)/common_file_UtilTester-UtilTest.Tpo -c -o common/file/common_file_UtilTester-UtilTest.o `test -f 'common/file/UtilTest.cpp' || echo '$(srcdir)/'`common/file/UtilTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/file/$(DEPDIR)/common_file_UtilTester-UtilTest.Tpo common/file/$(DEPDIR)/common_file_UtilTester-UtilTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/file/UtilTest.cpp' object='common/file/common_file_UtilTester-UtilTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_file_UtilTester_CXXFLAGS) $(CXXFLAGS) -c -o common/file/common_file_UtilTester-UtilTest.o `test -f 'common/file/UtilTest.cpp' || echo '$(srcdir)/'`common/file/UtilTest.cpp common/file/common_file_UtilTester-UtilTest.obj: common/file/UtilTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_file_UtilTester_CXXFLAGS) $(CXXFLAGS) -MT common/file/common_file_UtilTester-UtilTest.obj -MD -MP -MF common/file/$(DEPDIR)/common_file_UtilTester-UtilTest.Tpo -c -o common/file/common_file_UtilTester-UtilTest.obj `if test -f 'common/file/UtilTest.cpp'; then $(CYGPATH_W) 'common/file/UtilTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/file/UtilTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/file/$(DEPDIR)/common_file_UtilTester-UtilTest.Tpo common/file/$(DEPDIR)/common_file_UtilTester-UtilTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/file/UtilTest.cpp' object='common/file/common_file_UtilTester-UtilTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_file_UtilTester_CXXFLAGS) $(CXXFLAGS) -c -o common/file/common_file_UtilTester-UtilTest.obj `if test -f 'common/file/UtilTest.cpp'; then $(CYGPATH_W) 'common/file/UtilTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/file/UtilTest.cpp'; fi` common/io/common_io_DescriptorTester-DescriptorTest.o: common/io/DescriptorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_DescriptorTester-DescriptorTest.o -MD -MP -MF common/io/$(DEPDIR)/common_io_DescriptorTester-DescriptorTest.Tpo -c -o common/io/common_io_DescriptorTester-DescriptorTest.o `test -f 'common/io/DescriptorTest.cpp' || echo '$(srcdir)/'`common/io/DescriptorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_DescriptorTester-DescriptorTest.Tpo common/io/$(DEPDIR)/common_io_DescriptorTester-DescriptorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/DescriptorTest.cpp' object='common/io/common_io_DescriptorTester-DescriptorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_DescriptorTester-DescriptorTest.o `test -f 'common/io/DescriptorTest.cpp' || echo '$(srcdir)/'`common/io/DescriptorTest.cpp common/io/common_io_DescriptorTester-DescriptorTest.obj: common/io/DescriptorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_DescriptorTester-DescriptorTest.obj -MD -MP -MF common/io/$(DEPDIR)/common_io_DescriptorTester-DescriptorTest.Tpo -c -o common/io/common_io_DescriptorTester-DescriptorTest.obj `if test -f 'common/io/DescriptorTest.cpp'; then $(CYGPATH_W) 'common/io/DescriptorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/DescriptorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_DescriptorTester-DescriptorTest.Tpo common/io/$(DEPDIR)/common_io_DescriptorTester-DescriptorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/DescriptorTest.cpp' object='common/io/common_io_DescriptorTester-DescriptorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_DescriptorTester-DescriptorTest.obj `if test -f 'common/io/DescriptorTest.cpp'; then $(CYGPATH_W) 'common/io/DescriptorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/DescriptorTest.cpp'; fi` common/io/common_io_IOQueueTester-IOQueueTest.o: common/io/IOQueueTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_IOQueueTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_IOQueueTester-IOQueueTest.o -MD -MP -MF common/io/$(DEPDIR)/common_io_IOQueueTester-IOQueueTest.Tpo -c -o common/io/common_io_IOQueueTester-IOQueueTest.o `test -f 'common/io/IOQueueTest.cpp' || echo '$(srcdir)/'`common/io/IOQueueTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_IOQueueTester-IOQueueTest.Tpo common/io/$(DEPDIR)/common_io_IOQueueTester-IOQueueTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/IOQueueTest.cpp' object='common/io/common_io_IOQueueTester-IOQueueTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_IOQueueTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_IOQueueTester-IOQueueTest.o `test -f 'common/io/IOQueueTest.cpp' || echo '$(srcdir)/'`common/io/IOQueueTest.cpp common/io/common_io_IOQueueTester-IOQueueTest.obj: common/io/IOQueueTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_IOQueueTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_IOQueueTester-IOQueueTest.obj -MD -MP -MF common/io/$(DEPDIR)/common_io_IOQueueTester-IOQueueTest.Tpo -c -o common/io/common_io_IOQueueTester-IOQueueTest.obj `if test -f 'common/io/IOQueueTest.cpp'; then $(CYGPATH_W) 'common/io/IOQueueTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/IOQueueTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_IOQueueTester-IOQueueTest.Tpo common/io/$(DEPDIR)/common_io_IOQueueTester-IOQueueTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/IOQueueTest.cpp' object='common/io/common_io_IOQueueTester-IOQueueTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_IOQueueTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_IOQueueTester-IOQueueTest.obj `if test -f 'common/io/IOQueueTest.cpp'; then $(CYGPATH_W) 'common/io/IOQueueTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/IOQueueTest.cpp'; fi` common/io/common_io_IOStackTester-IOStackTest.o: common/io/IOStackTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_IOStackTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_IOStackTester-IOStackTest.o -MD -MP -MF common/io/$(DEPDIR)/common_io_IOStackTester-IOStackTest.Tpo -c -o common/io/common_io_IOStackTester-IOStackTest.o `test -f 'common/io/IOStackTest.cpp' || echo '$(srcdir)/'`common/io/IOStackTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_IOStackTester-IOStackTest.Tpo common/io/$(DEPDIR)/common_io_IOStackTester-IOStackTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/IOStackTest.cpp' object='common/io/common_io_IOStackTester-IOStackTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_IOStackTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_IOStackTester-IOStackTest.o `test -f 'common/io/IOStackTest.cpp' || echo '$(srcdir)/'`common/io/IOStackTest.cpp common/io/common_io_IOStackTester-IOStackTest.obj: common/io/IOStackTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_IOStackTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_IOStackTester-IOStackTest.obj -MD -MP -MF common/io/$(DEPDIR)/common_io_IOStackTester-IOStackTest.Tpo -c -o common/io/common_io_IOStackTester-IOStackTest.obj `if test -f 'common/io/IOStackTest.cpp'; then $(CYGPATH_W) 'common/io/IOStackTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/IOStackTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_IOStackTester-IOStackTest.Tpo common/io/$(DEPDIR)/common_io_IOStackTester-IOStackTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/IOStackTest.cpp' object='common/io/common_io_IOStackTester-IOStackTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_IOStackTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_IOStackTester-IOStackTest.obj `if test -f 'common/io/IOStackTest.cpp'; then $(CYGPATH_W) 'common/io/IOStackTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/IOStackTest.cpp'; fi` common/io/common_io_MemoryBlockTester-MemoryBlockTest.o: common/io/MemoryBlockTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_MemoryBlockTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_MemoryBlockTester-MemoryBlockTest.o -MD -MP -MF common/io/$(DEPDIR)/common_io_MemoryBlockTester-MemoryBlockTest.Tpo -c -o common/io/common_io_MemoryBlockTester-MemoryBlockTest.o `test -f 'common/io/MemoryBlockTest.cpp' || echo '$(srcdir)/'`common/io/MemoryBlockTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_MemoryBlockTester-MemoryBlockTest.Tpo common/io/$(DEPDIR)/common_io_MemoryBlockTester-MemoryBlockTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/MemoryBlockTest.cpp' object='common/io/common_io_MemoryBlockTester-MemoryBlockTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_MemoryBlockTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_MemoryBlockTester-MemoryBlockTest.o `test -f 'common/io/MemoryBlockTest.cpp' || echo '$(srcdir)/'`common/io/MemoryBlockTest.cpp common/io/common_io_MemoryBlockTester-MemoryBlockTest.obj: common/io/MemoryBlockTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_MemoryBlockTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_MemoryBlockTester-MemoryBlockTest.obj -MD -MP -MF common/io/$(DEPDIR)/common_io_MemoryBlockTester-MemoryBlockTest.Tpo -c -o common/io/common_io_MemoryBlockTester-MemoryBlockTest.obj `if test -f 'common/io/MemoryBlockTest.cpp'; then $(CYGPATH_W) 'common/io/MemoryBlockTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/MemoryBlockTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_MemoryBlockTester-MemoryBlockTest.Tpo common/io/$(DEPDIR)/common_io_MemoryBlockTester-MemoryBlockTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/MemoryBlockTest.cpp' object='common/io/common_io_MemoryBlockTester-MemoryBlockTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_MemoryBlockTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_MemoryBlockTester-MemoryBlockTest.obj `if test -f 'common/io/MemoryBlockTest.cpp'; then $(CYGPATH_W) 'common/io/MemoryBlockTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/MemoryBlockTest.cpp'; fi` common/io/common_io_SelectServerTester-SelectServerTest.o: common/io/SelectServerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_SelectServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_SelectServerTester-SelectServerTest.o -MD -MP -MF common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerTest.Tpo -c -o common/io/common_io_SelectServerTester-SelectServerTest.o `test -f 'common/io/SelectServerTest.cpp' || echo '$(srcdir)/'`common/io/SelectServerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerTest.Tpo common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/SelectServerTest.cpp' object='common/io/common_io_SelectServerTester-SelectServerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_SelectServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_SelectServerTester-SelectServerTest.o `test -f 'common/io/SelectServerTest.cpp' || echo '$(srcdir)/'`common/io/SelectServerTest.cpp common/io/common_io_SelectServerTester-SelectServerTest.obj: common/io/SelectServerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_SelectServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_SelectServerTester-SelectServerTest.obj -MD -MP -MF common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerTest.Tpo -c -o common/io/common_io_SelectServerTester-SelectServerTest.obj `if test -f 'common/io/SelectServerTest.cpp'; then $(CYGPATH_W) 'common/io/SelectServerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/SelectServerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerTest.Tpo common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/SelectServerTest.cpp' object='common/io/common_io_SelectServerTester-SelectServerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_SelectServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_SelectServerTester-SelectServerTest.obj `if test -f 'common/io/SelectServerTest.cpp'; then $(CYGPATH_W) 'common/io/SelectServerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/SelectServerTest.cpp'; fi` common/io/common_io_SelectServerTester-SelectServerThreadTest.o: common/io/SelectServerThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_SelectServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_SelectServerTester-SelectServerThreadTest.o -MD -MP -MF common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerThreadTest.Tpo -c -o common/io/common_io_SelectServerTester-SelectServerThreadTest.o `test -f 'common/io/SelectServerThreadTest.cpp' || echo '$(srcdir)/'`common/io/SelectServerThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerThreadTest.Tpo common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerThreadTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/SelectServerThreadTest.cpp' object='common/io/common_io_SelectServerTester-SelectServerThreadTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_SelectServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_SelectServerTester-SelectServerThreadTest.o `test -f 'common/io/SelectServerThreadTest.cpp' || echo '$(srcdir)/'`common/io/SelectServerThreadTest.cpp common/io/common_io_SelectServerTester-SelectServerThreadTest.obj: common/io/SelectServerThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_SelectServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_SelectServerTester-SelectServerThreadTest.obj -MD -MP -MF common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerThreadTest.Tpo -c -o common/io/common_io_SelectServerTester-SelectServerThreadTest.obj `if test -f 'common/io/SelectServerThreadTest.cpp'; then $(CYGPATH_W) 'common/io/SelectServerThreadTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/SelectServerThreadTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerThreadTest.Tpo common/io/$(DEPDIR)/common_io_SelectServerTester-SelectServerThreadTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/SelectServerThreadTest.cpp' object='common/io/common_io_SelectServerTester-SelectServerThreadTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_SelectServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_SelectServerTester-SelectServerThreadTest.obj `if test -f 'common/io/SelectServerThreadTest.cpp'; then $(CYGPATH_W) 'common/io/SelectServerThreadTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/SelectServerThreadTest.cpp'; fi` common/io/common_io_StreamTester-InputStreamTest.o: common/io/InputStreamTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_StreamTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_StreamTester-InputStreamTest.o -MD -MP -MF common/io/$(DEPDIR)/common_io_StreamTester-InputStreamTest.Tpo -c -o common/io/common_io_StreamTester-InputStreamTest.o `test -f 'common/io/InputStreamTest.cpp' || echo '$(srcdir)/'`common/io/InputStreamTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_StreamTester-InputStreamTest.Tpo common/io/$(DEPDIR)/common_io_StreamTester-InputStreamTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/InputStreamTest.cpp' object='common/io/common_io_StreamTester-InputStreamTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_StreamTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_StreamTester-InputStreamTest.o `test -f 'common/io/InputStreamTest.cpp' || echo '$(srcdir)/'`common/io/InputStreamTest.cpp common/io/common_io_StreamTester-InputStreamTest.obj: common/io/InputStreamTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_StreamTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_StreamTester-InputStreamTest.obj -MD -MP -MF common/io/$(DEPDIR)/common_io_StreamTester-InputStreamTest.Tpo -c -o common/io/common_io_StreamTester-InputStreamTest.obj `if test -f 'common/io/InputStreamTest.cpp'; then $(CYGPATH_W) 'common/io/InputStreamTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/InputStreamTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_StreamTester-InputStreamTest.Tpo common/io/$(DEPDIR)/common_io_StreamTester-InputStreamTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/InputStreamTest.cpp' object='common/io/common_io_StreamTester-InputStreamTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_StreamTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_StreamTester-InputStreamTest.obj `if test -f 'common/io/InputStreamTest.cpp'; then $(CYGPATH_W) 'common/io/InputStreamTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/InputStreamTest.cpp'; fi` common/io/common_io_StreamTester-OutputStreamTest.o: common/io/OutputStreamTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_StreamTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_StreamTester-OutputStreamTest.o -MD -MP -MF common/io/$(DEPDIR)/common_io_StreamTester-OutputStreamTest.Tpo -c -o common/io/common_io_StreamTester-OutputStreamTest.o `test -f 'common/io/OutputStreamTest.cpp' || echo '$(srcdir)/'`common/io/OutputStreamTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_StreamTester-OutputStreamTest.Tpo common/io/$(DEPDIR)/common_io_StreamTester-OutputStreamTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/OutputStreamTest.cpp' object='common/io/common_io_StreamTester-OutputStreamTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_StreamTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_StreamTester-OutputStreamTest.o `test -f 'common/io/OutputStreamTest.cpp' || echo '$(srcdir)/'`common/io/OutputStreamTest.cpp common/io/common_io_StreamTester-OutputStreamTest.obj: common/io/OutputStreamTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_StreamTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_StreamTester-OutputStreamTest.obj -MD -MP -MF common/io/$(DEPDIR)/common_io_StreamTester-OutputStreamTest.Tpo -c -o common/io/common_io_StreamTester-OutputStreamTest.obj `if test -f 'common/io/OutputStreamTest.cpp'; then $(CYGPATH_W) 'common/io/OutputStreamTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/OutputStreamTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_StreamTester-OutputStreamTest.Tpo common/io/$(DEPDIR)/common_io_StreamTester-OutputStreamTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/OutputStreamTest.cpp' object='common/io/common_io_StreamTester-OutputStreamTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_StreamTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_StreamTester-OutputStreamTest.obj `if test -f 'common/io/OutputStreamTest.cpp'; then $(CYGPATH_W) 'common/io/OutputStreamTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/OutputStreamTest.cpp'; fi` common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.o: common/io/TimeoutManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_TimeoutManagerTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.o -MD -MP -MF common/io/$(DEPDIR)/common_io_TimeoutManagerTester-TimeoutManagerTest.Tpo -c -o common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.o `test -f 'common/io/TimeoutManagerTest.cpp' || echo '$(srcdir)/'`common/io/TimeoutManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_TimeoutManagerTester-TimeoutManagerTest.Tpo common/io/$(DEPDIR)/common_io_TimeoutManagerTester-TimeoutManagerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/TimeoutManagerTest.cpp' object='common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_TimeoutManagerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.o `test -f 'common/io/TimeoutManagerTest.cpp' || echo '$(srcdir)/'`common/io/TimeoutManagerTest.cpp common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.obj: common/io/TimeoutManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_TimeoutManagerTester_CXXFLAGS) $(CXXFLAGS) -MT common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.obj -MD -MP -MF common/io/$(DEPDIR)/common_io_TimeoutManagerTester-TimeoutManagerTest.Tpo -c -o common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.obj `if test -f 'common/io/TimeoutManagerTest.cpp'; then $(CYGPATH_W) 'common/io/TimeoutManagerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/TimeoutManagerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/io/$(DEPDIR)/common_io_TimeoutManagerTester-TimeoutManagerTest.Tpo common/io/$(DEPDIR)/common_io_TimeoutManagerTester-TimeoutManagerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/io/TimeoutManagerTest.cpp' object='common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_io_TimeoutManagerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/io/common_io_TimeoutManagerTester-TimeoutManagerTest.obj `if test -f 'common/io/TimeoutManagerTest.cpp'; then $(CYGPATH_W) 'common/io/TimeoutManagerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/io/TimeoutManagerTest.cpp'; fi` common/messaging/common_messaging_DescriptorTester-DescriptorTest.o: common/messaging/DescriptorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -MT common/messaging/common_messaging_DescriptorTester-DescriptorTest.o -MD -MP -MF common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-DescriptorTest.Tpo -c -o common/messaging/common_messaging_DescriptorTester-DescriptorTest.o `test -f 'common/messaging/DescriptorTest.cpp' || echo '$(srcdir)/'`common/messaging/DescriptorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-DescriptorTest.Tpo common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-DescriptorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/messaging/DescriptorTest.cpp' object='common/messaging/common_messaging_DescriptorTester-DescriptorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/messaging/common_messaging_DescriptorTester-DescriptorTest.o `test -f 'common/messaging/DescriptorTest.cpp' || echo '$(srcdir)/'`common/messaging/DescriptorTest.cpp common/messaging/common_messaging_DescriptorTester-DescriptorTest.obj: common/messaging/DescriptorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -MT common/messaging/common_messaging_DescriptorTester-DescriptorTest.obj -MD -MP -MF common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-DescriptorTest.Tpo -c -o common/messaging/common_messaging_DescriptorTester-DescriptorTest.obj `if test -f 'common/messaging/DescriptorTest.cpp'; then $(CYGPATH_W) 'common/messaging/DescriptorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/messaging/DescriptorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-DescriptorTest.Tpo common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-DescriptorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/messaging/DescriptorTest.cpp' object='common/messaging/common_messaging_DescriptorTester-DescriptorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/messaging/common_messaging_DescriptorTester-DescriptorTest.obj `if test -f 'common/messaging/DescriptorTest.cpp'; then $(CYGPATH_W) 'common/messaging/DescriptorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/messaging/DescriptorTest.cpp'; fi` common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.o: common/messaging/SchemaPrinterTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -MT common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.o -MD -MP -MF common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-SchemaPrinterTest.Tpo -c -o common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.o `test -f 'common/messaging/SchemaPrinterTest.cpp' || echo '$(srcdir)/'`common/messaging/SchemaPrinterTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-SchemaPrinterTest.Tpo common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-SchemaPrinterTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/messaging/SchemaPrinterTest.cpp' object='common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.o `test -f 'common/messaging/SchemaPrinterTest.cpp' || echo '$(srcdir)/'`common/messaging/SchemaPrinterTest.cpp common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.obj: common/messaging/SchemaPrinterTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -MT common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.obj -MD -MP -MF common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-SchemaPrinterTest.Tpo -c -o common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.obj `if test -f 'common/messaging/SchemaPrinterTest.cpp'; then $(CYGPATH_W) 'common/messaging/SchemaPrinterTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/messaging/SchemaPrinterTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-SchemaPrinterTest.Tpo common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-SchemaPrinterTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/messaging/SchemaPrinterTest.cpp' object='common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/messaging/common_messaging_DescriptorTester-SchemaPrinterTest.obj `if test -f 'common/messaging/SchemaPrinterTest.cpp'; then $(CYGPATH_W) 'common/messaging/SchemaPrinterTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/messaging/SchemaPrinterTest.cpp'; fi` common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.o: common/messaging/MessagePrinterTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -MT common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.o -MD -MP -MF common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-MessagePrinterTest.Tpo -c -o common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.o `test -f 'common/messaging/MessagePrinterTest.cpp' || echo '$(srcdir)/'`common/messaging/MessagePrinterTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-MessagePrinterTest.Tpo common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-MessagePrinterTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/messaging/MessagePrinterTest.cpp' object='common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.o `test -f 'common/messaging/MessagePrinterTest.cpp' || echo '$(srcdir)/'`common/messaging/MessagePrinterTest.cpp common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.obj: common/messaging/MessagePrinterTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -MT common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.obj -MD -MP -MF common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-MessagePrinterTest.Tpo -c -o common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.obj `if test -f 'common/messaging/MessagePrinterTest.cpp'; then $(CYGPATH_W) 'common/messaging/MessagePrinterTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/messaging/MessagePrinterTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-MessagePrinterTest.Tpo common/messaging/$(DEPDIR)/common_messaging_DescriptorTester-MessagePrinterTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/messaging/MessagePrinterTest.cpp' object='common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_messaging_DescriptorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/messaging/common_messaging_DescriptorTester-MessagePrinterTest.obj `if test -f 'common/messaging/MessagePrinterTest.cpp'; then $(CYGPATH_W) 'common/messaging/MessagePrinterTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/messaging/MessagePrinterTest.cpp'; fi` common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.o: common/network/HealthCheckedConnectionTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_HealthCheckedConnectionTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.o -MD -MP -MF common/network/$(DEPDIR)/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.Tpo -c -o common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.o `test -f 'common/network/HealthCheckedConnectionTest.cpp' || echo '$(srcdir)/'`common/network/HealthCheckedConnectionTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.Tpo common/network/$(DEPDIR)/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/HealthCheckedConnectionTest.cpp' object='common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_HealthCheckedConnectionTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.o `test -f 'common/network/HealthCheckedConnectionTest.cpp' || echo '$(srcdir)/'`common/network/HealthCheckedConnectionTest.cpp common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.obj: common/network/HealthCheckedConnectionTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_HealthCheckedConnectionTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.obj -MD -MP -MF common/network/$(DEPDIR)/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.Tpo -c -o common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.obj `if test -f 'common/network/HealthCheckedConnectionTest.cpp'; then $(CYGPATH_W) 'common/network/HealthCheckedConnectionTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/HealthCheckedConnectionTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.Tpo common/network/$(DEPDIR)/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/HealthCheckedConnectionTest.cpp' object='common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_HealthCheckedConnectionTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_HealthCheckedConnectionTester-HealthCheckedConnectionTest.obj `if test -f 'common/network/HealthCheckedConnectionTest.cpp'; then $(CYGPATH_W) 'common/network/HealthCheckedConnectionTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/HealthCheckedConnectionTest.cpp'; fi` common/network/common_network_NetworkTester-IPV4AddressTest.o: common/network/IPV4AddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-IPV4AddressTest.o -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-IPV4AddressTest.Tpo -c -o common/network/common_network_NetworkTester-IPV4AddressTest.o `test -f 'common/network/IPV4AddressTest.cpp' || echo '$(srcdir)/'`common/network/IPV4AddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-IPV4AddressTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-IPV4AddressTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/IPV4AddressTest.cpp' object='common/network/common_network_NetworkTester-IPV4AddressTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-IPV4AddressTest.o `test -f 'common/network/IPV4AddressTest.cpp' || echo '$(srcdir)/'`common/network/IPV4AddressTest.cpp common/network/common_network_NetworkTester-IPV4AddressTest.obj: common/network/IPV4AddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-IPV4AddressTest.obj -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-IPV4AddressTest.Tpo -c -o common/network/common_network_NetworkTester-IPV4AddressTest.obj `if test -f 'common/network/IPV4AddressTest.cpp'; then $(CYGPATH_W) 'common/network/IPV4AddressTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/IPV4AddressTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-IPV4AddressTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-IPV4AddressTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/IPV4AddressTest.cpp' object='common/network/common_network_NetworkTester-IPV4AddressTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-IPV4AddressTest.obj `if test -f 'common/network/IPV4AddressTest.cpp'; then $(CYGPATH_W) 'common/network/IPV4AddressTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/IPV4AddressTest.cpp'; fi` common/network/common_network_NetworkTester-InterfacePickerTest.o: common/network/InterfacePickerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-InterfacePickerTest.o -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-InterfacePickerTest.Tpo -c -o common/network/common_network_NetworkTester-InterfacePickerTest.o `test -f 'common/network/InterfacePickerTest.cpp' || echo '$(srcdir)/'`common/network/InterfacePickerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-InterfacePickerTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-InterfacePickerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/InterfacePickerTest.cpp' object='common/network/common_network_NetworkTester-InterfacePickerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-InterfacePickerTest.o `test -f 'common/network/InterfacePickerTest.cpp' || echo '$(srcdir)/'`common/network/InterfacePickerTest.cpp common/network/common_network_NetworkTester-InterfacePickerTest.obj: common/network/InterfacePickerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-InterfacePickerTest.obj -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-InterfacePickerTest.Tpo -c -o common/network/common_network_NetworkTester-InterfacePickerTest.obj `if test -f 'common/network/InterfacePickerTest.cpp'; then $(CYGPATH_W) 'common/network/InterfacePickerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/InterfacePickerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-InterfacePickerTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-InterfacePickerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/InterfacePickerTest.cpp' object='common/network/common_network_NetworkTester-InterfacePickerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-InterfacePickerTest.obj `if test -f 'common/network/InterfacePickerTest.cpp'; then $(CYGPATH_W) 'common/network/InterfacePickerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/InterfacePickerTest.cpp'; fi` common/network/common_network_NetworkTester-InterfaceTest.o: common/network/InterfaceTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-InterfaceTest.o -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-InterfaceTest.Tpo -c -o common/network/common_network_NetworkTester-InterfaceTest.o `test -f 'common/network/InterfaceTest.cpp' || echo '$(srcdir)/'`common/network/InterfaceTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-InterfaceTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-InterfaceTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/InterfaceTest.cpp' object='common/network/common_network_NetworkTester-InterfaceTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-InterfaceTest.o `test -f 'common/network/InterfaceTest.cpp' || echo '$(srcdir)/'`common/network/InterfaceTest.cpp common/network/common_network_NetworkTester-InterfaceTest.obj: common/network/InterfaceTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-InterfaceTest.obj -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-InterfaceTest.Tpo -c -o common/network/common_network_NetworkTester-InterfaceTest.obj `if test -f 'common/network/InterfaceTest.cpp'; then $(CYGPATH_W) 'common/network/InterfaceTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/InterfaceTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-InterfaceTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-InterfaceTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/InterfaceTest.cpp' object='common/network/common_network_NetworkTester-InterfaceTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-InterfaceTest.obj `if test -f 'common/network/InterfaceTest.cpp'; then $(CYGPATH_W) 'common/network/InterfaceTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/InterfaceTest.cpp'; fi` common/network/common_network_NetworkTester-MACAddressTest.o: common/network/MACAddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-MACAddressTest.o -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-MACAddressTest.Tpo -c -o common/network/common_network_NetworkTester-MACAddressTest.o `test -f 'common/network/MACAddressTest.cpp' || echo '$(srcdir)/'`common/network/MACAddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-MACAddressTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-MACAddressTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/MACAddressTest.cpp' object='common/network/common_network_NetworkTester-MACAddressTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-MACAddressTest.o `test -f 'common/network/MACAddressTest.cpp' || echo '$(srcdir)/'`common/network/MACAddressTest.cpp common/network/common_network_NetworkTester-MACAddressTest.obj: common/network/MACAddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-MACAddressTest.obj -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-MACAddressTest.Tpo -c -o common/network/common_network_NetworkTester-MACAddressTest.obj `if test -f 'common/network/MACAddressTest.cpp'; then $(CYGPATH_W) 'common/network/MACAddressTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/MACAddressTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-MACAddressTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-MACAddressTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/MACAddressTest.cpp' object='common/network/common_network_NetworkTester-MACAddressTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-MACAddressTest.obj `if test -f 'common/network/MACAddressTest.cpp'; then $(CYGPATH_W) 'common/network/MACAddressTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/MACAddressTest.cpp'; fi` common/network/common_network_NetworkTester-NetworkUtilsTest.o: common/network/NetworkUtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-NetworkUtilsTest.o -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-NetworkUtilsTest.Tpo -c -o common/network/common_network_NetworkTester-NetworkUtilsTest.o `test -f 'common/network/NetworkUtilsTest.cpp' || echo '$(srcdir)/'`common/network/NetworkUtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-NetworkUtilsTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-NetworkUtilsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/NetworkUtilsTest.cpp' object='common/network/common_network_NetworkTester-NetworkUtilsTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-NetworkUtilsTest.o `test -f 'common/network/NetworkUtilsTest.cpp' || echo '$(srcdir)/'`common/network/NetworkUtilsTest.cpp common/network/common_network_NetworkTester-NetworkUtilsTest.obj: common/network/NetworkUtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-NetworkUtilsTest.obj -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-NetworkUtilsTest.Tpo -c -o common/network/common_network_NetworkTester-NetworkUtilsTest.obj `if test -f 'common/network/NetworkUtilsTest.cpp'; then $(CYGPATH_W) 'common/network/NetworkUtilsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/NetworkUtilsTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-NetworkUtilsTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-NetworkUtilsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/NetworkUtilsTest.cpp' object='common/network/common_network_NetworkTester-NetworkUtilsTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-NetworkUtilsTest.obj `if test -f 'common/network/NetworkUtilsTest.cpp'; then $(CYGPATH_W) 'common/network/NetworkUtilsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/NetworkUtilsTest.cpp'; fi` common/network/common_network_NetworkTester-SocketAddressTest.o: common/network/SocketAddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-SocketAddressTest.o -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-SocketAddressTest.Tpo -c -o common/network/common_network_NetworkTester-SocketAddressTest.o `test -f 'common/network/SocketAddressTest.cpp' || echo '$(srcdir)/'`common/network/SocketAddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-SocketAddressTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-SocketAddressTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/SocketAddressTest.cpp' object='common/network/common_network_NetworkTester-SocketAddressTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-SocketAddressTest.o `test -f 'common/network/SocketAddressTest.cpp' || echo '$(srcdir)/'`common/network/SocketAddressTest.cpp common/network/common_network_NetworkTester-SocketAddressTest.obj: common/network/SocketAddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-SocketAddressTest.obj -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-SocketAddressTest.Tpo -c -o common/network/common_network_NetworkTester-SocketAddressTest.obj `if test -f 'common/network/SocketAddressTest.cpp'; then $(CYGPATH_W) 'common/network/SocketAddressTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/SocketAddressTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-SocketAddressTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-SocketAddressTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/SocketAddressTest.cpp' object='common/network/common_network_NetworkTester-SocketAddressTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-SocketAddressTest.obj `if test -f 'common/network/SocketAddressTest.cpp'; then $(CYGPATH_W) 'common/network/SocketAddressTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/SocketAddressTest.cpp'; fi` common/network/common_network_NetworkTester-SocketTest.o: common/network/SocketTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-SocketTest.o -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-SocketTest.Tpo -c -o common/network/common_network_NetworkTester-SocketTest.o `test -f 'common/network/SocketTest.cpp' || echo '$(srcdir)/'`common/network/SocketTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-SocketTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-SocketTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/SocketTest.cpp' object='common/network/common_network_NetworkTester-SocketTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-SocketTest.o `test -f 'common/network/SocketTest.cpp' || echo '$(srcdir)/'`common/network/SocketTest.cpp common/network/common_network_NetworkTester-SocketTest.obj: common/network/SocketTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_NetworkTester-SocketTest.obj -MD -MP -MF common/network/$(DEPDIR)/common_network_NetworkTester-SocketTest.Tpo -c -o common/network/common_network_NetworkTester-SocketTest.obj `if test -f 'common/network/SocketTest.cpp'; then $(CYGPATH_W) 'common/network/SocketTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/SocketTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_NetworkTester-SocketTest.Tpo common/network/$(DEPDIR)/common_network_NetworkTester-SocketTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/SocketTest.cpp' object='common/network/common_network_NetworkTester-SocketTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_NetworkTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_NetworkTester-SocketTest.obj `if test -f 'common/network/SocketTest.cpp'; then $(CYGPATH_W) 'common/network/SocketTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/SocketTest.cpp'; fi` common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.o: common/network/AdvancedTCPConnectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_TCPConnectorTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.o -MD -MP -MF common/network/$(DEPDIR)/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.Tpo -c -o common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.o `test -f 'common/network/AdvancedTCPConnectorTest.cpp' || echo '$(srcdir)/'`common/network/AdvancedTCPConnectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.Tpo common/network/$(DEPDIR)/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/AdvancedTCPConnectorTest.cpp' object='common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_TCPConnectorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.o `test -f 'common/network/AdvancedTCPConnectorTest.cpp' || echo '$(srcdir)/'`common/network/AdvancedTCPConnectorTest.cpp common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.obj: common/network/AdvancedTCPConnectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_TCPConnectorTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.obj -MD -MP -MF common/network/$(DEPDIR)/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.Tpo -c -o common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.obj `if test -f 'common/network/AdvancedTCPConnectorTest.cpp'; then $(CYGPATH_W) 'common/network/AdvancedTCPConnectorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/AdvancedTCPConnectorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.Tpo common/network/$(DEPDIR)/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/AdvancedTCPConnectorTest.cpp' object='common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_TCPConnectorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_TCPConnectorTester-AdvancedTCPConnectorTest.obj `if test -f 'common/network/AdvancedTCPConnectorTest.cpp'; then $(CYGPATH_W) 'common/network/AdvancedTCPConnectorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/AdvancedTCPConnectorTest.cpp'; fi` common/network/common_network_TCPConnectorTester-TCPConnectorTest.o: common/network/TCPConnectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_TCPConnectorTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_TCPConnectorTester-TCPConnectorTest.o -MD -MP -MF common/network/$(DEPDIR)/common_network_TCPConnectorTester-TCPConnectorTest.Tpo -c -o common/network/common_network_TCPConnectorTester-TCPConnectorTest.o `test -f 'common/network/TCPConnectorTest.cpp' || echo '$(srcdir)/'`common/network/TCPConnectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_TCPConnectorTester-TCPConnectorTest.Tpo common/network/$(DEPDIR)/common_network_TCPConnectorTester-TCPConnectorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/TCPConnectorTest.cpp' object='common/network/common_network_TCPConnectorTester-TCPConnectorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_TCPConnectorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_TCPConnectorTester-TCPConnectorTest.o `test -f 'common/network/TCPConnectorTest.cpp' || echo '$(srcdir)/'`common/network/TCPConnectorTest.cpp common/network/common_network_TCPConnectorTester-TCPConnectorTest.obj: common/network/TCPConnectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_TCPConnectorTester_CXXFLAGS) $(CXXFLAGS) -MT common/network/common_network_TCPConnectorTester-TCPConnectorTest.obj -MD -MP -MF common/network/$(DEPDIR)/common_network_TCPConnectorTester-TCPConnectorTest.Tpo -c -o common/network/common_network_TCPConnectorTester-TCPConnectorTest.obj `if test -f 'common/network/TCPConnectorTest.cpp'; then $(CYGPATH_W) 'common/network/TCPConnectorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/TCPConnectorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/network/$(DEPDIR)/common_network_TCPConnectorTester-TCPConnectorTest.Tpo common/network/$(DEPDIR)/common_network_TCPConnectorTester-TCPConnectorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/network/TCPConnectorTest.cpp' object='common/network/common_network_TCPConnectorTester-TCPConnectorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_network_TCPConnectorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/network/common_network_TCPConnectorTester-TCPConnectorTest.obj `if test -f 'common/network/TCPConnectorTest.cpp'; then $(CYGPATH_W) 'common/network/TCPConnectorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/network/TCPConnectorTest.cpp'; fi` common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.o: common/rdm/DiscoveryAgentTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_DiscoveryAgentTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.Tpo -c -o common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.o `test -f 'common/rdm/DiscoveryAgentTest.cpp' || echo '$(srcdir)/'`common/rdm/DiscoveryAgentTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.Tpo common/rdm/$(DEPDIR)/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/DiscoveryAgentTest.cpp' object='common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_DiscoveryAgentTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.o `test -f 'common/rdm/DiscoveryAgentTest.cpp' || echo '$(srcdir)/'`common/rdm/DiscoveryAgentTest.cpp common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.obj: common/rdm/DiscoveryAgentTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_DiscoveryAgentTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.Tpo -c -o common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.obj `if test -f 'common/rdm/DiscoveryAgentTest.cpp'; then $(CYGPATH_W) 'common/rdm/DiscoveryAgentTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/DiscoveryAgentTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.Tpo common/rdm/$(DEPDIR)/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/DiscoveryAgentTest.cpp' object='common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_DiscoveryAgentTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_DiscoveryAgentTester-DiscoveryAgentTest.obj `if test -f 'common/rdm/DiscoveryAgentTest.cpp'; then $(CYGPATH_W) 'common/rdm/DiscoveryAgentTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/DiscoveryAgentTest.cpp'; fi` common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.o: common/rdm/DescriptorConsistencyCheckerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_PidStoreTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.Tpo -c -o common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.o `test -f 'common/rdm/DescriptorConsistencyCheckerTest.cpp' || echo '$(srcdir)/'`common/rdm/DescriptorConsistencyCheckerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.Tpo common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/DescriptorConsistencyCheckerTest.cpp' object='common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_PidStoreTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.o `test -f 'common/rdm/DescriptorConsistencyCheckerTest.cpp' || echo '$(srcdir)/'`common/rdm/DescriptorConsistencyCheckerTest.cpp common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.obj: common/rdm/DescriptorConsistencyCheckerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_PidStoreTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.Tpo -c -o common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.obj `if test -f 'common/rdm/DescriptorConsistencyCheckerTest.cpp'; then $(CYGPATH_W) 'common/rdm/DescriptorConsistencyCheckerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/DescriptorConsistencyCheckerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.Tpo common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/DescriptorConsistencyCheckerTest.cpp' object='common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_PidStoreTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_PidStoreTester-DescriptorConsistencyCheckerTest.obj `if test -f 'common/rdm/DescriptorConsistencyCheckerTest.cpp'; then $(CYGPATH_W) 'common/rdm/DescriptorConsistencyCheckerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/DescriptorConsistencyCheckerTest.cpp'; fi` common/rdm/common_rdm_PidStoreTester-PidStoreTest.o: common/rdm/PidStoreTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_PidStoreTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_PidStoreTester-PidStoreTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-PidStoreTest.Tpo -c -o common/rdm/common_rdm_PidStoreTester-PidStoreTest.o `test -f 'common/rdm/PidStoreTest.cpp' || echo '$(srcdir)/'`common/rdm/PidStoreTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-PidStoreTest.Tpo common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-PidStoreTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/PidStoreTest.cpp' object='common/rdm/common_rdm_PidStoreTester-PidStoreTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_PidStoreTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_PidStoreTester-PidStoreTest.o `test -f 'common/rdm/PidStoreTest.cpp' || echo '$(srcdir)/'`common/rdm/PidStoreTest.cpp common/rdm/common_rdm_PidStoreTester-PidStoreTest.obj: common/rdm/PidStoreTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_PidStoreTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_PidStoreTester-PidStoreTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-PidStoreTest.Tpo -c -o common/rdm/common_rdm_PidStoreTester-PidStoreTest.obj `if test -f 'common/rdm/PidStoreTest.cpp'; then $(CYGPATH_W) 'common/rdm/PidStoreTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/PidStoreTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-PidStoreTest.Tpo common/rdm/$(DEPDIR)/common_rdm_PidStoreTester-PidStoreTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/PidStoreTest.cpp' object='common/rdm/common_rdm_PidStoreTester-PidStoreTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_PidStoreTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_PidStoreTester-PidStoreTest.obj `if test -f 'common/rdm/PidStoreTest.cpp'; then $(CYGPATH_W) 'common/rdm/PidStoreTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/PidStoreTest.cpp'; fi` common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.o: common/rdm/QueueingRDMControllerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_QueueingRDMControllerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.Tpo -c -o common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.o `test -f 'common/rdm/QueueingRDMControllerTest.cpp' || echo '$(srcdir)/'`common/rdm/QueueingRDMControllerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.Tpo common/rdm/$(DEPDIR)/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/QueueingRDMControllerTest.cpp' object='common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_QueueingRDMControllerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.o `test -f 'common/rdm/QueueingRDMControllerTest.cpp' || echo '$(srcdir)/'`common/rdm/QueueingRDMControllerTest.cpp common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.obj: common/rdm/QueueingRDMControllerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_QueueingRDMControllerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.Tpo -c -o common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.obj `if test -f 'common/rdm/QueueingRDMControllerTest.cpp'; then $(CYGPATH_W) 'common/rdm/QueueingRDMControllerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/QueueingRDMControllerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.Tpo common/rdm/$(DEPDIR)/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/QueueingRDMControllerTest.cpp' object='common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_QueueingRDMControllerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_QueueingRDMControllerTester-QueueingRDMControllerTest.obj `if test -f 'common/rdm/QueueingRDMControllerTest.cpp'; then $(CYGPATH_W) 'common/rdm/QueueingRDMControllerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/QueueingRDMControllerTest.cpp'; fi` common/rdm/common_rdm_RDMAPITester-RDMAPITest.o: common/rdm/RDMAPITest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMAPITester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMAPITester-RDMAPITest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMAPITester-RDMAPITest.Tpo -c -o common/rdm/common_rdm_RDMAPITester-RDMAPITest.o `test -f 'common/rdm/RDMAPITest.cpp' || echo '$(srcdir)/'`common/rdm/RDMAPITest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMAPITester-RDMAPITest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMAPITester-RDMAPITest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMAPITest.cpp' object='common/rdm/common_rdm_RDMAPITester-RDMAPITest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMAPITester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMAPITester-RDMAPITest.o `test -f 'common/rdm/RDMAPITest.cpp' || echo '$(srcdir)/'`common/rdm/RDMAPITest.cpp common/rdm/common_rdm_RDMAPITester-RDMAPITest.obj: common/rdm/RDMAPITest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMAPITester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMAPITester-RDMAPITest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMAPITester-RDMAPITest.Tpo -c -o common/rdm/common_rdm_RDMAPITester-RDMAPITest.obj `if test -f 'common/rdm/RDMAPITest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMAPITest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMAPITest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMAPITester-RDMAPITest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMAPITester-RDMAPITest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMAPITest.cpp' object='common/rdm/common_rdm_RDMAPITester-RDMAPITest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMAPITester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMAPITester-RDMAPITest.obj `if test -f 'common/rdm/RDMAPITest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMAPITest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMAPITest.cpp'; fi` common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.o: common/rdm/RDMCommandSerializerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMCommandSerializerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.Tpo -c -o common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.o `test -f 'common/rdm/RDMCommandSerializerTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMCommandSerializerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMCommandSerializerTest.cpp' object='common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMCommandSerializerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.o `test -f 'common/rdm/RDMCommandSerializerTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMCommandSerializerTest.cpp common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.obj: common/rdm/RDMCommandSerializerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMCommandSerializerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.Tpo -c -o common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.obj `if test -f 'common/rdm/RDMCommandSerializerTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMCommandSerializerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMCommandSerializerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMCommandSerializerTest.cpp' object='common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMCommandSerializerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMCommandSerializerTester-RDMCommandSerializerTest.obj `if test -f 'common/rdm/RDMCommandSerializerTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMCommandSerializerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMCommandSerializerTest.cpp'; fi` common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.o: common/rdm/RDMCommandTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMCommandTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMCommandTester-RDMCommandTest.Tpo -c -o common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.o `test -f 'common/rdm/RDMCommandTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMCommandTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMCommandTester-RDMCommandTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMCommandTester-RDMCommandTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMCommandTest.cpp' object='common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMCommandTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.o `test -f 'common/rdm/RDMCommandTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMCommandTest.cpp common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.obj: common/rdm/RDMCommandTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMCommandTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMCommandTester-RDMCommandTest.Tpo -c -o common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.obj `if test -f 'common/rdm/RDMCommandTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMCommandTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMCommandTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMCommandTester-RDMCommandTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMCommandTester-RDMCommandTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMCommandTest.cpp' object='common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMCommandTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMCommandTester-RDMCommandTest.obj `if test -f 'common/rdm/RDMCommandTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMCommandTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMCommandTest.cpp'; fi` common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.o: common/rdm/RDMFrameTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMFrameTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMFrameTester-RDMFrameTest.Tpo -c -o common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.o `test -f 'common/rdm/RDMFrameTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMFrameTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMFrameTester-RDMFrameTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMFrameTester-RDMFrameTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMFrameTest.cpp' object='common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMFrameTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.o `test -f 'common/rdm/RDMFrameTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMFrameTest.cpp common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.obj: common/rdm/RDMFrameTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMFrameTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMFrameTester-RDMFrameTest.Tpo -c -o common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.obj `if test -f 'common/rdm/RDMFrameTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMFrameTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMFrameTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMFrameTester-RDMFrameTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMFrameTester-RDMFrameTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMFrameTest.cpp' object='common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMFrameTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMFrameTester-RDMFrameTest.obj `if test -f 'common/rdm/RDMFrameTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMFrameTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMFrameTest.cpp'; fi` common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.o: common/rdm/RDMHelperTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMHelperTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMHelperTester-RDMHelperTest.Tpo -c -o common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.o `test -f 'common/rdm/RDMHelperTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMHelperTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMHelperTester-RDMHelperTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMHelperTester-RDMHelperTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMHelperTest.cpp' object='common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMHelperTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.o `test -f 'common/rdm/RDMHelperTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMHelperTest.cpp common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.obj: common/rdm/RDMHelperTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMHelperTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMHelperTester-RDMHelperTest.Tpo -c -o common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.obj `if test -f 'common/rdm/RDMHelperTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMHelperTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMHelperTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMHelperTester-RDMHelperTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMHelperTester-RDMHelperTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMHelperTest.cpp' object='common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMHelperTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMHelperTester-RDMHelperTest.obj `if test -f 'common/rdm/RDMHelperTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMHelperTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMHelperTest.cpp'; fi` common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.o: common/rdm/GroupSizeCalculatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.o `test -f 'common/rdm/GroupSizeCalculatorTest.cpp' || echo '$(srcdir)/'`common/rdm/GroupSizeCalculatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/GroupSizeCalculatorTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.o `test -f 'common/rdm/GroupSizeCalculatorTest.cpp' || echo '$(srcdir)/'`common/rdm/GroupSizeCalculatorTest.cpp common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.obj: common/rdm/GroupSizeCalculatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.obj `if test -f 'common/rdm/GroupSizeCalculatorTest.cpp'; then $(CYGPATH_W) 'common/rdm/GroupSizeCalculatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/GroupSizeCalculatorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/GroupSizeCalculatorTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-GroupSizeCalculatorTest.obj `if test -f 'common/rdm/GroupSizeCalculatorTest.cpp'; then $(CYGPATH_W) 'common/rdm/GroupSizeCalculatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/GroupSizeCalculatorTest.cpp'; fi` common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.o: common/rdm/MessageSerializerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageSerializerTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.o `test -f 'common/rdm/MessageSerializerTest.cpp' || echo '$(srcdir)/'`common/rdm/MessageSerializerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageSerializerTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageSerializerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/MessageSerializerTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.o `test -f 'common/rdm/MessageSerializerTest.cpp' || echo '$(srcdir)/'`common/rdm/MessageSerializerTest.cpp common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.obj: common/rdm/MessageSerializerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageSerializerTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.obj `if test -f 'common/rdm/MessageSerializerTest.cpp'; then $(CYGPATH_W) 'common/rdm/MessageSerializerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/MessageSerializerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageSerializerTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageSerializerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/MessageSerializerTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-MessageSerializerTest.obj `if test -f 'common/rdm/MessageSerializerTest.cpp'; then $(CYGPATH_W) 'common/rdm/MessageSerializerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/MessageSerializerTest.cpp'; fi` common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.o: common/rdm/MessageDeserializerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageDeserializerTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.o `test -f 'common/rdm/MessageDeserializerTest.cpp' || echo '$(srcdir)/'`common/rdm/MessageDeserializerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageDeserializerTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageDeserializerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/MessageDeserializerTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.o `test -f 'common/rdm/MessageDeserializerTest.cpp' || echo '$(srcdir)/'`common/rdm/MessageDeserializerTest.cpp common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.obj: common/rdm/MessageDeserializerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageDeserializerTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.obj `if test -f 'common/rdm/MessageDeserializerTest.cpp'; then $(CYGPATH_W) 'common/rdm/MessageDeserializerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/MessageDeserializerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageDeserializerTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-MessageDeserializerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/MessageDeserializerTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-MessageDeserializerTest.obj `if test -f 'common/rdm/MessageDeserializerTest.cpp'; then $(CYGPATH_W) 'common/rdm/MessageDeserializerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/MessageDeserializerTest.cpp'; fi` common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.o: common/rdm/RDMMessageInterationTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-RDMMessageInterationTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.o `test -f 'common/rdm/RDMMessageInterationTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMMessageInterationTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-RDMMessageInterationTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-RDMMessageInterationTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMMessageInterationTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.o `test -f 'common/rdm/RDMMessageInterationTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMMessageInterationTest.cpp common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.obj: common/rdm/RDMMessageInterationTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-RDMMessageInterationTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.obj `if test -f 'common/rdm/RDMMessageInterationTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMMessageInterationTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMMessageInterationTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-RDMMessageInterationTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-RDMMessageInterationTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMMessageInterationTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-RDMMessageInterationTest.obj `if test -f 'common/rdm/RDMMessageInterationTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMMessageInterationTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMMessageInterationTest.cpp'; fi` common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.o: common/rdm/StringMessageBuilderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-StringMessageBuilderTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.o `test -f 'common/rdm/StringMessageBuilderTest.cpp' || echo '$(srcdir)/'`common/rdm/StringMessageBuilderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-StringMessageBuilderTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-StringMessageBuilderTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/StringMessageBuilderTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.o `test -f 'common/rdm/StringMessageBuilderTest.cpp' || echo '$(srcdir)/'`common/rdm/StringMessageBuilderTest.cpp common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.obj: common/rdm/StringMessageBuilderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-StringMessageBuilderTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.obj `if test -f 'common/rdm/StringMessageBuilderTest.cpp'; then $(CYGPATH_W) 'common/rdm/StringMessageBuilderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/StringMessageBuilderTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-StringMessageBuilderTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-StringMessageBuilderTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/StringMessageBuilderTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-StringMessageBuilderTest.obj `if test -f 'common/rdm/StringMessageBuilderTest.cpp'; then $(CYGPATH_W) 'common/rdm/StringMessageBuilderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/StringMessageBuilderTest.cpp'; fi` common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.o: common/rdm/VariableFieldSizeCalculatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.o `test -f 'common/rdm/VariableFieldSizeCalculatorTest.cpp' || echo '$(srcdir)/'`common/rdm/VariableFieldSizeCalculatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/VariableFieldSizeCalculatorTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.o `test -f 'common/rdm/VariableFieldSizeCalculatorTest.cpp' || echo '$(srcdir)/'`common/rdm/VariableFieldSizeCalculatorTest.cpp common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.obj: common/rdm/VariableFieldSizeCalculatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.Tpo -c -o common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.obj `if test -f 'common/rdm/VariableFieldSizeCalculatorTest.cpp'; then $(CYGPATH_W) 'common/rdm/VariableFieldSizeCalculatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/VariableFieldSizeCalculatorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/VariableFieldSizeCalculatorTest.cpp' object='common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMMessageTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMMessageTester-VariableFieldSizeCalculatorTest.obj `if test -f 'common/rdm/VariableFieldSizeCalculatorTest.cpp'; then $(CYGPATH_W) 'common/rdm/VariableFieldSizeCalculatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/VariableFieldSizeCalculatorTest.cpp'; fi` common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.o: common/rdm/RDMReplyTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMReplyTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMReplyTester-RDMReplyTest.Tpo -c -o common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.o `test -f 'common/rdm/RDMReplyTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMReplyTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMReplyTester-RDMReplyTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMReplyTester-RDMReplyTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMReplyTest.cpp' object='common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMReplyTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.o `test -f 'common/rdm/RDMReplyTest.cpp' || echo '$(srcdir)/'`common/rdm/RDMReplyTest.cpp common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.obj: common/rdm/RDMReplyTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMReplyTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_RDMReplyTester-RDMReplyTest.Tpo -c -o common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.obj `if test -f 'common/rdm/RDMReplyTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMReplyTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMReplyTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_RDMReplyTester-RDMReplyTest.Tpo common/rdm/$(DEPDIR)/common_rdm_RDMReplyTester-RDMReplyTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/RDMReplyTest.cpp' object='common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_RDMReplyTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_RDMReplyTester-RDMReplyTest.obj `if test -f 'common/rdm/RDMReplyTest.cpp'; then $(CYGPATH_W) 'common/rdm/RDMReplyTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/RDMReplyTest.cpp'; fi` common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.o: common/rdm/UIDAllocatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_UIDAllocatorTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_UIDAllocatorTester-UIDAllocatorTest.Tpo -c -o common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.o `test -f 'common/rdm/UIDAllocatorTest.cpp' || echo '$(srcdir)/'`common/rdm/UIDAllocatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_UIDAllocatorTester-UIDAllocatorTest.Tpo common/rdm/$(DEPDIR)/common_rdm_UIDAllocatorTester-UIDAllocatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/UIDAllocatorTest.cpp' object='common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_UIDAllocatorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.o `test -f 'common/rdm/UIDAllocatorTest.cpp' || echo '$(srcdir)/'`common/rdm/UIDAllocatorTest.cpp common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.obj: common/rdm/UIDAllocatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_UIDAllocatorTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_UIDAllocatorTester-UIDAllocatorTest.Tpo -c -o common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.obj `if test -f 'common/rdm/UIDAllocatorTest.cpp'; then $(CYGPATH_W) 'common/rdm/UIDAllocatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/UIDAllocatorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_UIDAllocatorTester-UIDAllocatorTest.Tpo common/rdm/$(DEPDIR)/common_rdm_UIDAllocatorTester-UIDAllocatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/UIDAllocatorTest.cpp' object='common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_UIDAllocatorTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_UIDAllocatorTester-UIDAllocatorTest.obj `if test -f 'common/rdm/UIDAllocatorTest.cpp'; then $(CYGPATH_W) 'common/rdm/UIDAllocatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/UIDAllocatorTest.cpp'; fi` common/rdm/common_rdm_UIDTester-UIDTest.o: common/rdm/UIDTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_UIDTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_UIDTester-UIDTest.o -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_UIDTester-UIDTest.Tpo -c -o common/rdm/common_rdm_UIDTester-UIDTest.o `test -f 'common/rdm/UIDTest.cpp' || echo '$(srcdir)/'`common/rdm/UIDTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_UIDTester-UIDTest.Tpo common/rdm/$(DEPDIR)/common_rdm_UIDTester-UIDTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/UIDTest.cpp' object='common/rdm/common_rdm_UIDTester-UIDTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_UIDTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_UIDTester-UIDTest.o `test -f 'common/rdm/UIDTest.cpp' || echo '$(srcdir)/'`common/rdm/UIDTest.cpp common/rdm/common_rdm_UIDTester-UIDTest.obj: common/rdm/UIDTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_UIDTester_CXXFLAGS) $(CXXFLAGS) -MT common/rdm/common_rdm_UIDTester-UIDTest.obj -MD -MP -MF common/rdm/$(DEPDIR)/common_rdm_UIDTester-UIDTest.Tpo -c -o common/rdm/common_rdm_UIDTester-UIDTest.obj `if test -f 'common/rdm/UIDTest.cpp'; then $(CYGPATH_W) 'common/rdm/UIDTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/UIDTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rdm/$(DEPDIR)/common_rdm_UIDTester-UIDTest.Tpo common/rdm/$(DEPDIR)/common_rdm_UIDTester-UIDTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rdm/UIDTest.cpp' object='common/rdm/common_rdm_UIDTester-UIDTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rdm_UIDTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rdm/common_rdm_UIDTester-UIDTest.obj `if test -f 'common/rdm/UIDTest.cpp'; then $(CYGPATH_W) 'common/rdm/UIDTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rdm/UIDTest.cpp'; fi` common/rpc/common_rpc_RpcServerTester-RpcServerTest.o: common/rpc/RpcServerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcServerTester-RpcServerTest.o -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-RpcServerTest.Tpo -c -o common/rpc/common_rpc_RpcServerTester-RpcServerTest.o `test -f 'common/rpc/RpcServerTest.cpp' || echo '$(srcdir)/'`common/rpc/RpcServerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-RpcServerTest.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-RpcServerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/RpcServerTest.cpp' object='common/rpc/common_rpc_RpcServerTester-RpcServerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcServerTester-RpcServerTest.o `test -f 'common/rpc/RpcServerTest.cpp' || echo '$(srcdir)/'`common/rpc/RpcServerTest.cpp common/rpc/common_rpc_RpcServerTester-RpcServerTest.obj: common/rpc/RpcServerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcServerTester-RpcServerTest.obj -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-RpcServerTest.Tpo -c -o common/rpc/common_rpc_RpcServerTester-RpcServerTest.obj `if test -f 'common/rpc/RpcServerTest.cpp'; then $(CYGPATH_W) 'common/rpc/RpcServerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/RpcServerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-RpcServerTest.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-RpcServerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/RpcServerTest.cpp' object='common/rpc/common_rpc_RpcServerTester-RpcServerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcServerTester-RpcServerTest.obj `if test -f 'common/rpc/RpcServerTest.cpp'; then $(CYGPATH_W) 'common/rpc/RpcServerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/RpcServerTest.cpp'; fi` common/rpc/common_rpc_RpcServerTester-TestService.o: common/rpc/TestService.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcServerTester-TestService.o -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.Tpo -c -o common/rpc/common_rpc_RpcServerTester-TestService.o `test -f 'common/rpc/TestService.cpp' || echo '$(srcdir)/'`common/rpc/TestService.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestService.cpp' object='common/rpc/common_rpc_RpcServerTester-TestService.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcServerTester-TestService.o `test -f 'common/rpc/TestService.cpp' || echo '$(srcdir)/'`common/rpc/TestService.cpp common/rpc/common_rpc_RpcServerTester-TestService.obj: common/rpc/TestService.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcServerTester-TestService.obj -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.Tpo -c -o common/rpc/common_rpc_RpcServerTester-TestService.obj `if test -f 'common/rpc/TestService.cpp'; then $(CYGPATH_W) 'common/rpc/TestService.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestService.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestService.cpp' object='common/rpc/common_rpc_RpcServerTester-TestService.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcServerTester-TestService.obj `if test -f 'common/rpc/TestService.cpp'; then $(CYGPATH_W) 'common/rpc/TestService.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestService.cpp'; fi` common/rpc/common_rpc_RpcServerTester-TestService.pb.o: common/rpc/TestService.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcServerTester-TestService.pb.o -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.pb.Tpo -c -o common/rpc/common_rpc_RpcServerTester-TestService.pb.o `test -f 'common/rpc/TestService.pb.cc' || echo '$(srcdir)/'`common/rpc/TestService.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.pb.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.pb.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestService.pb.cc' object='common/rpc/common_rpc_RpcServerTester-TestService.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcServerTester-TestService.pb.o `test -f 'common/rpc/TestService.pb.cc' || echo '$(srcdir)/'`common/rpc/TestService.pb.cc common/rpc/common_rpc_RpcServerTester-TestService.pb.obj: common/rpc/TestService.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcServerTester-TestService.pb.obj -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.pb.Tpo -c -o common/rpc/common_rpc_RpcServerTester-TestService.pb.obj `if test -f 'common/rpc/TestService.pb.cc'; then $(CYGPATH_W) 'common/rpc/TestService.pb.cc'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestService.pb.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.pb.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestService.pb.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestService.pb.cc' object='common/rpc/common_rpc_RpcServerTester-TestService.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcServerTester-TestService.pb.obj `if test -f 'common/rpc/TestService.pb.cc'; then $(CYGPATH_W) 'common/rpc/TestService.pb.cc'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestService.pb.cc'; fi` common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.o: common/rpc/TestServiceService.pb.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.o -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestServiceService.pb.Tpo -c -o common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.o `test -f 'common/rpc/TestServiceService.pb.cpp' || echo '$(srcdir)/'`common/rpc/TestServiceService.pb.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestServiceService.pb.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestServiceService.pb.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestServiceService.pb.cpp' object='common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.o `test -f 'common/rpc/TestServiceService.pb.cpp' || echo '$(srcdir)/'`common/rpc/TestServiceService.pb.cpp common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.obj: common/rpc/TestServiceService.pb.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.obj -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestServiceService.pb.Tpo -c -o common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.obj `if test -f 'common/rpc/TestServiceService.pb.cpp'; then $(CYGPATH_W) 'common/rpc/TestServiceService.pb.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestServiceService.pb.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestServiceService.pb.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcServerTester-TestServiceService.pb.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestServiceService.pb.cpp' object='common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcServerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcServerTester-TestServiceService.pb.obj `if test -f 'common/rpc/TestServiceService.pb.cpp'; then $(CYGPATH_W) 'common/rpc/TestServiceService.pb.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestServiceService.pb.cpp'; fi` common/rpc/common_rpc_RpcTester-RpcControllerTest.o: common/rpc/RpcControllerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-RpcControllerTest.o -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcControllerTest.Tpo -c -o common/rpc/common_rpc_RpcTester-RpcControllerTest.o `test -f 'common/rpc/RpcControllerTest.cpp' || echo '$(srcdir)/'`common/rpc/RpcControllerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcControllerTest.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcControllerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/RpcControllerTest.cpp' object='common/rpc/common_rpc_RpcTester-RpcControllerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-RpcControllerTest.o `test -f 'common/rpc/RpcControllerTest.cpp' || echo '$(srcdir)/'`common/rpc/RpcControllerTest.cpp common/rpc/common_rpc_RpcTester-RpcControllerTest.obj: common/rpc/RpcControllerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-RpcControllerTest.obj -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcControllerTest.Tpo -c -o common/rpc/common_rpc_RpcTester-RpcControllerTest.obj `if test -f 'common/rpc/RpcControllerTest.cpp'; then $(CYGPATH_W) 'common/rpc/RpcControllerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/RpcControllerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcControllerTest.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcControllerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/RpcControllerTest.cpp' object='common/rpc/common_rpc_RpcTester-RpcControllerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-RpcControllerTest.obj `if test -f 'common/rpc/RpcControllerTest.cpp'; then $(CYGPATH_W) 'common/rpc/RpcControllerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/RpcControllerTest.cpp'; fi` common/rpc/common_rpc_RpcTester-RpcChannelTest.o: common/rpc/RpcChannelTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-RpcChannelTest.o -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcChannelTest.Tpo -c -o common/rpc/common_rpc_RpcTester-RpcChannelTest.o `test -f 'common/rpc/RpcChannelTest.cpp' || echo '$(srcdir)/'`common/rpc/RpcChannelTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcChannelTest.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcChannelTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/RpcChannelTest.cpp' object='common/rpc/common_rpc_RpcTester-RpcChannelTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-RpcChannelTest.o `test -f 'common/rpc/RpcChannelTest.cpp' || echo '$(srcdir)/'`common/rpc/RpcChannelTest.cpp common/rpc/common_rpc_RpcTester-RpcChannelTest.obj: common/rpc/RpcChannelTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-RpcChannelTest.obj -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcChannelTest.Tpo -c -o common/rpc/common_rpc_RpcTester-RpcChannelTest.obj `if test -f 'common/rpc/RpcChannelTest.cpp'; then $(CYGPATH_W) 'common/rpc/RpcChannelTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/RpcChannelTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcChannelTest.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcChannelTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/RpcChannelTest.cpp' object='common/rpc/common_rpc_RpcTester-RpcChannelTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-RpcChannelTest.obj `if test -f 'common/rpc/RpcChannelTest.cpp'; then $(CYGPATH_W) 'common/rpc/RpcChannelTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/RpcChannelTest.cpp'; fi` common/rpc/common_rpc_RpcTester-RpcHeaderTest.o: common/rpc/RpcHeaderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-RpcHeaderTest.o -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcHeaderTest.Tpo -c -o common/rpc/common_rpc_RpcTester-RpcHeaderTest.o `test -f 'common/rpc/RpcHeaderTest.cpp' || echo '$(srcdir)/'`common/rpc/RpcHeaderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcHeaderTest.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcHeaderTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/RpcHeaderTest.cpp' object='common/rpc/common_rpc_RpcTester-RpcHeaderTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-RpcHeaderTest.o `test -f 'common/rpc/RpcHeaderTest.cpp' || echo '$(srcdir)/'`common/rpc/RpcHeaderTest.cpp common/rpc/common_rpc_RpcTester-RpcHeaderTest.obj: common/rpc/RpcHeaderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-RpcHeaderTest.obj -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcHeaderTest.Tpo -c -o common/rpc/common_rpc_RpcTester-RpcHeaderTest.obj `if test -f 'common/rpc/RpcHeaderTest.cpp'; then $(CYGPATH_W) 'common/rpc/RpcHeaderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/RpcHeaderTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcHeaderTest.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-RpcHeaderTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/RpcHeaderTest.cpp' object='common/rpc/common_rpc_RpcTester-RpcHeaderTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-RpcHeaderTest.obj `if test -f 'common/rpc/RpcHeaderTest.cpp'; then $(CYGPATH_W) 'common/rpc/RpcHeaderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/RpcHeaderTest.cpp'; fi` common/rpc/common_rpc_RpcTester-TestService.o: common/rpc/TestService.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-TestService.o -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.Tpo -c -o common/rpc/common_rpc_RpcTester-TestService.o `test -f 'common/rpc/TestService.cpp' || echo '$(srcdir)/'`common/rpc/TestService.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestService.cpp' object='common/rpc/common_rpc_RpcTester-TestService.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-TestService.o `test -f 'common/rpc/TestService.cpp' || echo '$(srcdir)/'`common/rpc/TestService.cpp common/rpc/common_rpc_RpcTester-TestService.obj: common/rpc/TestService.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-TestService.obj -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.Tpo -c -o common/rpc/common_rpc_RpcTester-TestService.obj `if test -f 'common/rpc/TestService.cpp'; then $(CYGPATH_W) 'common/rpc/TestService.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestService.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestService.cpp' object='common/rpc/common_rpc_RpcTester-TestService.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-TestService.obj `if test -f 'common/rpc/TestService.cpp'; then $(CYGPATH_W) 'common/rpc/TestService.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestService.cpp'; fi` common/rpc/common_rpc_RpcTester-TestService.pb.o: common/rpc/TestService.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-TestService.pb.o -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.pb.Tpo -c -o common/rpc/common_rpc_RpcTester-TestService.pb.o `test -f 'common/rpc/TestService.pb.cc' || echo '$(srcdir)/'`common/rpc/TestService.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.pb.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.pb.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestService.pb.cc' object='common/rpc/common_rpc_RpcTester-TestService.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-TestService.pb.o `test -f 'common/rpc/TestService.pb.cc' || echo '$(srcdir)/'`common/rpc/TestService.pb.cc common/rpc/common_rpc_RpcTester-TestService.pb.obj: common/rpc/TestService.pb.cc @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-TestService.pb.obj -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.pb.Tpo -c -o common/rpc/common_rpc_RpcTester-TestService.pb.obj `if test -f 'common/rpc/TestService.pb.cc'; then $(CYGPATH_W) 'common/rpc/TestService.pb.cc'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestService.pb.cc'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.pb.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestService.pb.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestService.pb.cc' object='common/rpc/common_rpc_RpcTester-TestService.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-TestService.pb.obj `if test -f 'common/rpc/TestService.pb.cc'; then $(CYGPATH_W) 'common/rpc/TestService.pb.cc'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestService.pb.cc'; fi` common/rpc/common_rpc_RpcTester-TestServiceService.pb.o: common/rpc/TestServiceService.pb.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-TestServiceService.pb.o -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestServiceService.pb.Tpo -c -o common/rpc/common_rpc_RpcTester-TestServiceService.pb.o `test -f 'common/rpc/TestServiceService.pb.cpp' || echo '$(srcdir)/'`common/rpc/TestServiceService.pb.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestServiceService.pb.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestServiceService.pb.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestServiceService.pb.cpp' object='common/rpc/common_rpc_RpcTester-TestServiceService.pb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-TestServiceService.pb.o `test -f 'common/rpc/TestServiceService.pb.cpp' || echo '$(srcdir)/'`common/rpc/TestServiceService.pb.cpp common/rpc/common_rpc_RpcTester-TestServiceService.pb.obj: common/rpc/TestServiceService.pb.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -MT common/rpc/common_rpc_RpcTester-TestServiceService.pb.obj -MD -MP -MF common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestServiceService.pb.Tpo -c -o common/rpc/common_rpc_RpcTester-TestServiceService.pb.obj `if test -f 'common/rpc/TestServiceService.pb.cpp'; then $(CYGPATH_W) 'common/rpc/TestServiceService.pb.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestServiceService.pb.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestServiceService.pb.Tpo common/rpc/$(DEPDIR)/common_rpc_RpcTester-TestServiceService.pb.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/rpc/TestServiceService.pb.cpp' object='common/rpc/common_rpc_RpcTester-TestServiceService.pb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_rpc_RpcTester_CXXFLAGS) $(CXXFLAGS) -c -o common/rpc/common_rpc_RpcTester-TestServiceService.pb.obj `if test -f 'common/rpc/TestServiceService.pb.cpp'; then $(CYGPATH_W) 'common/rpc/TestServiceService.pb.cpp'; else $(CYGPATH_W) '$(srcdir)/common/rpc/TestServiceService.pb.cpp'; fi` common/strings/common_strings_UtilsTester-UtilsTest.o: common/strings/UtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_strings_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/strings/common_strings_UtilsTester-UtilsTest.o -MD -MP -MF common/strings/$(DEPDIR)/common_strings_UtilsTester-UtilsTest.Tpo -c -o common/strings/common_strings_UtilsTester-UtilsTest.o `test -f 'common/strings/UtilsTest.cpp' || echo '$(srcdir)/'`common/strings/UtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/strings/$(DEPDIR)/common_strings_UtilsTester-UtilsTest.Tpo common/strings/$(DEPDIR)/common_strings_UtilsTester-UtilsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/strings/UtilsTest.cpp' object='common/strings/common_strings_UtilsTester-UtilsTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_strings_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/strings/common_strings_UtilsTester-UtilsTest.o `test -f 'common/strings/UtilsTest.cpp' || echo '$(srcdir)/'`common/strings/UtilsTest.cpp common/strings/common_strings_UtilsTester-UtilsTest.obj: common/strings/UtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_strings_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/strings/common_strings_UtilsTester-UtilsTest.obj -MD -MP -MF common/strings/$(DEPDIR)/common_strings_UtilsTester-UtilsTest.Tpo -c -o common/strings/common_strings_UtilsTester-UtilsTest.obj `if test -f 'common/strings/UtilsTest.cpp'; then $(CYGPATH_W) 'common/strings/UtilsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/strings/UtilsTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/strings/$(DEPDIR)/common_strings_UtilsTester-UtilsTest.Tpo common/strings/$(DEPDIR)/common_strings_UtilsTester-UtilsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/strings/UtilsTest.cpp' object='common/strings/common_strings_UtilsTester-UtilsTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_strings_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/strings/common_strings_UtilsTester-UtilsTest.obj `if test -f 'common/strings/UtilsTest.cpp'; then $(CYGPATH_W) 'common/strings/UtilsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/strings/UtilsTest.cpp'; fi` common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.o: common/thread/ExecutorThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ExecutorThreadTester_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.o -MD -MP -MF common/thread/$(DEPDIR)/common_thread_ExecutorThreadTester-ExecutorThreadTest.Tpo -c -o common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.o `test -f 'common/thread/ExecutorThreadTest.cpp' || echo '$(srcdir)/'`common/thread/ExecutorThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_thread_ExecutorThreadTester-ExecutorThreadTest.Tpo common/thread/$(DEPDIR)/common_thread_ExecutorThreadTester-ExecutorThreadTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/ExecutorThreadTest.cpp' object='common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ExecutorThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.o `test -f 'common/thread/ExecutorThreadTest.cpp' || echo '$(srcdir)/'`common/thread/ExecutorThreadTest.cpp common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.obj: common/thread/ExecutorThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ExecutorThreadTester_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.obj -MD -MP -MF common/thread/$(DEPDIR)/common_thread_ExecutorThreadTester-ExecutorThreadTest.Tpo -c -o common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.obj `if test -f 'common/thread/ExecutorThreadTest.cpp'; then $(CYGPATH_W) 'common/thread/ExecutorThreadTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/thread/ExecutorThreadTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_thread_ExecutorThreadTester-ExecutorThreadTest.Tpo common/thread/$(DEPDIR)/common_thread_ExecutorThreadTester-ExecutorThreadTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/ExecutorThreadTest.cpp' object='common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ExecutorThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_thread_ExecutorThreadTester-ExecutorThreadTest.obj `if test -f 'common/thread/ExecutorThreadTest.cpp'; then $(CYGPATH_W) 'common/thread/ExecutorThreadTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/thread/ExecutorThreadTest.cpp'; fi` common/thread/common_thread_FutureTester-FutureTest.o: common/thread/FutureTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_FutureTester_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_thread_FutureTester-FutureTest.o -MD -MP -MF common/thread/$(DEPDIR)/common_thread_FutureTester-FutureTest.Tpo -c -o common/thread/common_thread_FutureTester-FutureTest.o `test -f 'common/thread/FutureTest.cpp' || echo '$(srcdir)/'`common/thread/FutureTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_thread_FutureTester-FutureTest.Tpo common/thread/$(DEPDIR)/common_thread_FutureTester-FutureTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/FutureTest.cpp' object='common/thread/common_thread_FutureTester-FutureTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_FutureTester_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_thread_FutureTester-FutureTest.o `test -f 'common/thread/FutureTest.cpp' || echo '$(srcdir)/'`common/thread/FutureTest.cpp common/thread/common_thread_FutureTester-FutureTest.obj: common/thread/FutureTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_FutureTester_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_thread_FutureTester-FutureTest.obj -MD -MP -MF common/thread/$(DEPDIR)/common_thread_FutureTester-FutureTest.Tpo -c -o common/thread/common_thread_FutureTester-FutureTest.obj `if test -f 'common/thread/FutureTest.cpp'; then $(CYGPATH_W) 'common/thread/FutureTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/thread/FutureTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_thread_FutureTester-FutureTest.Tpo common/thread/$(DEPDIR)/common_thread_FutureTester-FutureTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/FutureTest.cpp' object='common/thread/common_thread_FutureTester-FutureTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_FutureTester_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_thread_FutureTester-FutureTest.obj `if test -f 'common/thread/FutureTest.cpp'; then $(CYGPATH_W) 'common/thread/FutureTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/thread/FutureTest.cpp'; fi` common/thread/common_thread_ThreadTester-ThreadPoolTest.o: common/thread/ThreadPoolTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ThreadTester_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_thread_ThreadTester-ThreadPoolTest.o -MD -MP -MF common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadPoolTest.Tpo -c -o common/thread/common_thread_ThreadTester-ThreadPoolTest.o `test -f 'common/thread/ThreadPoolTest.cpp' || echo '$(srcdir)/'`common/thread/ThreadPoolTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadPoolTest.Tpo common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadPoolTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/ThreadPoolTest.cpp' object='common/thread/common_thread_ThreadTester-ThreadPoolTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_thread_ThreadTester-ThreadPoolTest.o `test -f 'common/thread/ThreadPoolTest.cpp' || echo '$(srcdir)/'`common/thread/ThreadPoolTest.cpp common/thread/common_thread_ThreadTester-ThreadPoolTest.obj: common/thread/ThreadPoolTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ThreadTester_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_thread_ThreadTester-ThreadPoolTest.obj -MD -MP -MF common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadPoolTest.Tpo -c -o common/thread/common_thread_ThreadTester-ThreadPoolTest.obj `if test -f 'common/thread/ThreadPoolTest.cpp'; then $(CYGPATH_W) 'common/thread/ThreadPoolTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/thread/ThreadPoolTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadPoolTest.Tpo common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadPoolTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/ThreadPoolTest.cpp' object='common/thread/common_thread_ThreadTester-ThreadPoolTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_thread_ThreadTester-ThreadPoolTest.obj `if test -f 'common/thread/ThreadPoolTest.cpp'; then $(CYGPATH_W) 'common/thread/ThreadPoolTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/thread/ThreadPoolTest.cpp'; fi` common/thread/common_thread_ThreadTester-ThreadTest.o: common/thread/ThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ThreadTester_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_thread_ThreadTester-ThreadTest.o -MD -MP -MF common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadTest.Tpo -c -o common/thread/common_thread_ThreadTester-ThreadTest.o `test -f 'common/thread/ThreadTest.cpp' || echo '$(srcdir)/'`common/thread/ThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadTest.Tpo common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/ThreadTest.cpp' object='common/thread/common_thread_ThreadTester-ThreadTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_thread_ThreadTester-ThreadTest.o `test -f 'common/thread/ThreadTest.cpp' || echo '$(srcdir)/'`common/thread/ThreadTest.cpp common/thread/common_thread_ThreadTester-ThreadTest.obj: common/thread/ThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ThreadTester_CXXFLAGS) $(CXXFLAGS) -MT common/thread/common_thread_ThreadTester-ThreadTest.obj -MD -MP -MF common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadTest.Tpo -c -o common/thread/common_thread_ThreadTester-ThreadTest.obj `if test -f 'common/thread/ThreadTest.cpp'; then $(CYGPATH_W) 'common/thread/ThreadTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/thread/ThreadTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadTest.Tpo common/thread/$(DEPDIR)/common_thread_ThreadTester-ThreadTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/thread/ThreadTest.cpp' object='common/thread/common_thread_ThreadTester-ThreadTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_thread_ThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o common/thread/common_thread_ThreadTester-ThreadTest.obj `if test -f 'common/thread/ThreadTest.cpp'; then $(CYGPATH_W) 'common/thread/ThreadTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/thread/ThreadTest.cpp'; fi` common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.o: common/timecode/TimeCodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_timecode_TimeCodeTester_CXXFLAGS) $(CXXFLAGS) -MT common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.o -MD -MP -MF common/timecode/$(DEPDIR)/common_timecode_TimeCodeTester-TimeCodeTest.Tpo -c -o common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.o `test -f 'common/timecode/TimeCodeTest.cpp' || echo '$(srcdir)/'`common/timecode/TimeCodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/timecode/$(DEPDIR)/common_timecode_TimeCodeTester-TimeCodeTest.Tpo common/timecode/$(DEPDIR)/common_timecode_TimeCodeTester-TimeCodeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/timecode/TimeCodeTest.cpp' object='common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_timecode_TimeCodeTester_CXXFLAGS) $(CXXFLAGS) -c -o common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.o `test -f 'common/timecode/TimeCodeTest.cpp' || echo '$(srcdir)/'`common/timecode/TimeCodeTest.cpp common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.obj: common/timecode/TimeCodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_timecode_TimeCodeTester_CXXFLAGS) $(CXXFLAGS) -MT common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.obj -MD -MP -MF common/timecode/$(DEPDIR)/common_timecode_TimeCodeTester-TimeCodeTest.Tpo -c -o common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.obj `if test -f 'common/timecode/TimeCodeTest.cpp'; then $(CYGPATH_W) 'common/timecode/TimeCodeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/timecode/TimeCodeTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/timecode/$(DEPDIR)/common_timecode_TimeCodeTester-TimeCodeTest.Tpo common/timecode/$(DEPDIR)/common_timecode_TimeCodeTester-TimeCodeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/timecode/TimeCodeTest.cpp' object='common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_timecode_TimeCodeTester_CXXFLAGS) $(CXXFLAGS) -c -o common/timecode/common_timecode_TimeCodeTester-TimeCodeTest.obj `if test -f 'common/timecode/TimeCodeTest.cpp'; then $(CYGPATH_W) 'common/timecode/TimeCodeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/timecode/TimeCodeTest.cpp'; fi` common/utils/common_utils_UtilsTester-ActionQueueTest.o: common/utils/ActionQueueTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-ActionQueueTest.o -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-ActionQueueTest.Tpo -c -o common/utils/common_utils_UtilsTester-ActionQueueTest.o `test -f 'common/utils/ActionQueueTest.cpp' || echo '$(srcdir)/'`common/utils/ActionQueueTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-ActionQueueTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-ActionQueueTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/ActionQueueTest.cpp' object='common/utils/common_utils_UtilsTester-ActionQueueTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-ActionQueueTest.o `test -f 'common/utils/ActionQueueTest.cpp' || echo '$(srcdir)/'`common/utils/ActionQueueTest.cpp common/utils/common_utils_UtilsTester-ActionQueueTest.obj: common/utils/ActionQueueTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-ActionQueueTest.obj -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-ActionQueueTest.Tpo -c -o common/utils/common_utils_UtilsTester-ActionQueueTest.obj `if test -f 'common/utils/ActionQueueTest.cpp'; then $(CYGPATH_W) 'common/utils/ActionQueueTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/ActionQueueTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-ActionQueueTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-ActionQueueTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/ActionQueueTest.cpp' object='common/utils/common_utils_UtilsTester-ActionQueueTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-ActionQueueTest.obj `if test -f 'common/utils/ActionQueueTest.cpp'; then $(CYGPATH_W) 'common/utils/ActionQueueTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/ActionQueueTest.cpp'; fi` common/utils/common_utils_UtilsTester-BackoffTest.o: common/utils/BackoffTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-BackoffTest.o -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-BackoffTest.Tpo -c -o common/utils/common_utils_UtilsTester-BackoffTest.o `test -f 'common/utils/BackoffTest.cpp' || echo '$(srcdir)/'`common/utils/BackoffTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-BackoffTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-BackoffTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/BackoffTest.cpp' object='common/utils/common_utils_UtilsTester-BackoffTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-BackoffTest.o `test -f 'common/utils/BackoffTest.cpp' || echo '$(srcdir)/'`common/utils/BackoffTest.cpp common/utils/common_utils_UtilsTester-BackoffTest.obj: common/utils/BackoffTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-BackoffTest.obj -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-BackoffTest.Tpo -c -o common/utils/common_utils_UtilsTester-BackoffTest.obj `if test -f 'common/utils/BackoffTest.cpp'; then $(CYGPATH_W) 'common/utils/BackoffTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/BackoffTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-BackoffTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-BackoffTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/BackoffTest.cpp' object='common/utils/common_utils_UtilsTester-BackoffTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-BackoffTest.obj `if test -f 'common/utils/BackoffTest.cpp'; then $(CYGPATH_W) 'common/utils/BackoffTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/BackoffTest.cpp'; fi` common/utils/common_utils_UtilsTester-CallbackTest.o: common/utils/CallbackTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-CallbackTest.o -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-CallbackTest.Tpo -c -o common/utils/common_utils_UtilsTester-CallbackTest.o `test -f 'common/utils/CallbackTest.cpp' || echo '$(srcdir)/'`common/utils/CallbackTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-CallbackTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-CallbackTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/CallbackTest.cpp' object='common/utils/common_utils_UtilsTester-CallbackTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-CallbackTest.o `test -f 'common/utils/CallbackTest.cpp' || echo '$(srcdir)/'`common/utils/CallbackTest.cpp common/utils/common_utils_UtilsTester-CallbackTest.obj: common/utils/CallbackTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-CallbackTest.obj -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-CallbackTest.Tpo -c -o common/utils/common_utils_UtilsTester-CallbackTest.obj `if test -f 'common/utils/CallbackTest.cpp'; then $(CYGPATH_W) 'common/utils/CallbackTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/CallbackTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-CallbackTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-CallbackTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/CallbackTest.cpp' object='common/utils/common_utils_UtilsTester-CallbackTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-CallbackTest.obj `if test -f 'common/utils/CallbackTest.cpp'; then $(CYGPATH_W) 'common/utils/CallbackTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/CallbackTest.cpp'; fi` common/utils/common_utils_UtilsTester-ClockTest.o: common/utils/ClockTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-ClockTest.o -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-ClockTest.Tpo -c -o common/utils/common_utils_UtilsTester-ClockTest.o `test -f 'common/utils/ClockTest.cpp' || echo '$(srcdir)/'`common/utils/ClockTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-ClockTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-ClockTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/ClockTest.cpp' object='common/utils/common_utils_UtilsTester-ClockTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-ClockTest.o `test -f 'common/utils/ClockTest.cpp' || echo '$(srcdir)/'`common/utils/ClockTest.cpp common/utils/common_utils_UtilsTester-ClockTest.obj: common/utils/ClockTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-ClockTest.obj -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-ClockTest.Tpo -c -o common/utils/common_utils_UtilsTester-ClockTest.obj `if test -f 'common/utils/ClockTest.cpp'; then $(CYGPATH_W) 'common/utils/ClockTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/ClockTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-ClockTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-ClockTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/ClockTest.cpp' object='common/utils/common_utils_UtilsTester-ClockTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-ClockTest.obj `if test -f 'common/utils/ClockTest.cpp'; then $(CYGPATH_W) 'common/utils/ClockTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/ClockTest.cpp'; fi` common/utils/common_utils_UtilsTester-DmxBufferTest.o: common/utils/DmxBufferTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-DmxBufferTest.o -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-DmxBufferTest.Tpo -c -o common/utils/common_utils_UtilsTester-DmxBufferTest.o `test -f 'common/utils/DmxBufferTest.cpp' || echo '$(srcdir)/'`common/utils/DmxBufferTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-DmxBufferTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-DmxBufferTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/DmxBufferTest.cpp' object='common/utils/common_utils_UtilsTester-DmxBufferTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-DmxBufferTest.o `test -f 'common/utils/DmxBufferTest.cpp' || echo '$(srcdir)/'`common/utils/DmxBufferTest.cpp common/utils/common_utils_UtilsTester-DmxBufferTest.obj: common/utils/DmxBufferTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-DmxBufferTest.obj -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-DmxBufferTest.Tpo -c -o common/utils/common_utils_UtilsTester-DmxBufferTest.obj `if test -f 'common/utils/DmxBufferTest.cpp'; then $(CYGPATH_W) 'common/utils/DmxBufferTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/DmxBufferTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-DmxBufferTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-DmxBufferTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/DmxBufferTest.cpp' object='common/utils/common_utils_UtilsTester-DmxBufferTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-DmxBufferTest.obj `if test -f 'common/utils/DmxBufferTest.cpp'; then $(CYGPATH_W) 'common/utils/DmxBufferTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/DmxBufferTest.cpp'; fi` common/utils/common_utils_UtilsTester-MultiCallbackTest.o: common/utils/MultiCallbackTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-MultiCallbackTest.o -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-MultiCallbackTest.Tpo -c -o common/utils/common_utils_UtilsTester-MultiCallbackTest.o `test -f 'common/utils/MultiCallbackTest.cpp' || echo '$(srcdir)/'`common/utils/MultiCallbackTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-MultiCallbackTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-MultiCallbackTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/MultiCallbackTest.cpp' object='common/utils/common_utils_UtilsTester-MultiCallbackTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-MultiCallbackTest.o `test -f 'common/utils/MultiCallbackTest.cpp' || echo '$(srcdir)/'`common/utils/MultiCallbackTest.cpp common/utils/common_utils_UtilsTester-MultiCallbackTest.obj: common/utils/MultiCallbackTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-MultiCallbackTest.obj -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-MultiCallbackTest.Tpo -c -o common/utils/common_utils_UtilsTester-MultiCallbackTest.obj `if test -f 'common/utils/MultiCallbackTest.cpp'; then $(CYGPATH_W) 'common/utils/MultiCallbackTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/MultiCallbackTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-MultiCallbackTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-MultiCallbackTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/MultiCallbackTest.cpp' object='common/utils/common_utils_UtilsTester-MultiCallbackTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-MultiCallbackTest.obj `if test -f 'common/utils/MultiCallbackTest.cpp'; then $(CYGPATH_W) 'common/utils/MultiCallbackTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/MultiCallbackTest.cpp'; fi` common/utils/common_utils_UtilsTester-StringUtilsTest.o: common/utils/StringUtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-StringUtilsTest.o -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-StringUtilsTest.Tpo -c -o common/utils/common_utils_UtilsTester-StringUtilsTest.o `test -f 'common/utils/StringUtilsTest.cpp' || echo '$(srcdir)/'`common/utils/StringUtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-StringUtilsTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-StringUtilsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/StringUtilsTest.cpp' object='common/utils/common_utils_UtilsTester-StringUtilsTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-StringUtilsTest.o `test -f 'common/utils/StringUtilsTest.cpp' || echo '$(srcdir)/'`common/utils/StringUtilsTest.cpp common/utils/common_utils_UtilsTester-StringUtilsTest.obj: common/utils/StringUtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-StringUtilsTest.obj -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-StringUtilsTest.Tpo -c -o common/utils/common_utils_UtilsTester-StringUtilsTest.obj `if test -f 'common/utils/StringUtilsTest.cpp'; then $(CYGPATH_W) 'common/utils/StringUtilsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/StringUtilsTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-StringUtilsTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-StringUtilsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/StringUtilsTest.cpp' object='common/utils/common_utils_UtilsTester-StringUtilsTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-StringUtilsTest.obj `if test -f 'common/utils/StringUtilsTest.cpp'; then $(CYGPATH_W) 'common/utils/StringUtilsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/StringUtilsTest.cpp'; fi` common/utils/common_utils_UtilsTester-TokenBucketTest.o: common/utils/TokenBucketTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-TokenBucketTest.o -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-TokenBucketTest.Tpo -c -o common/utils/common_utils_UtilsTester-TokenBucketTest.o `test -f 'common/utils/TokenBucketTest.cpp' || echo '$(srcdir)/'`common/utils/TokenBucketTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-TokenBucketTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-TokenBucketTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/TokenBucketTest.cpp' object='common/utils/common_utils_UtilsTester-TokenBucketTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-TokenBucketTest.o `test -f 'common/utils/TokenBucketTest.cpp' || echo '$(srcdir)/'`common/utils/TokenBucketTest.cpp common/utils/common_utils_UtilsTester-TokenBucketTest.obj: common/utils/TokenBucketTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-TokenBucketTest.obj -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-TokenBucketTest.Tpo -c -o common/utils/common_utils_UtilsTester-TokenBucketTest.obj `if test -f 'common/utils/TokenBucketTest.cpp'; then $(CYGPATH_W) 'common/utils/TokenBucketTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/TokenBucketTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-TokenBucketTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-TokenBucketTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/TokenBucketTest.cpp' object='common/utils/common_utils_UtilsTester-TokenBucketTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-TokenBucketTest.obj `if test -f 'common/utils/TokenBucketTest.cpp'; then $(CYGPATH_W) 'common/utils/TokenBucketTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/TokenBucketTest.cpp'; fi` common/utils/common_utils_UtilsTester-UtilsTest.o: common/utils/UtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-UtilsTest.o -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-UtilsTest.Tpo -c -o common/utils/common_utils_UtilsTester-UtilsTest.o `test -f 'common/utils/UtilsTest.cpp' || echo '$(srcdir)/'`common/utils/UtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-UtilsTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-UtilsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/UtilsTest.cpp' object='common/utils/common_utils_UtilsTester-UtilsTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-UtilsTest.o `test -f 'common/utils/UtilsTest.cpp' || echo '$(srcdir)/'`common/utils/UtilsTest.cpp common/utils/common_utils_UtilsTester-UtilsTest.obj: common/utils/UtilsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-UtilsTest.obj -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-UtilsTest.Tpo -c -o common/utils/common_utils_UtilsTester-UtilsTest.obj `if test -f 'common/utils/UtilsTest.cpp'; then $(CYGPATH_W) 'common/utils/UtilsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/UtilsTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-UtilsTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-UtilsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/UtilsTest.cpp' object='common/utils/common_utils_UtilsTester-UtilsTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-UtilsTest.obj `if test -f 'common/utils/UtilsTest.cpp'; then $(CYGPATH_W) 'common/utils/UtilsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/UtilsTest.cpp'; fi` common/utils/common_utils_UtilsTester-WatchdogTest.o: common/utils/WatchdogTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-WatchdogTest.o -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-WatchdogTest.Tpo -c -o common/utils/common_utils_UtilsTester-WatchdogTest.o `test -f 'common/utils/WatchdogTest.cpp' || echo '$(srcdir)/'`common/utils/WatchdogTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-WatchdogTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-WatchdogTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/WatchdogTest.cpp' object='common/utils/common_utils_UtilsTester-WatchdogTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-WatchdogTest.o `test -f 'common/utils/WatchdogTest.cpp' || echo '$(srcdir)/'`common/utils/WatchdogTest.cpp common/utils/common_utils_UtilsTester-WatchdogTest.obj: common/utils/WatchdogTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -MT common/utils/common_utils_UtilsTester-WatchdogTest.obj -MD -MP -MF common/utils/$(DEPDIR)/common_utils_UtilsTester-WatchdogTest.Tpo -c -o common/utils/common_utils_UtilsTester-WatchdogTest.obj `if test -f 'common/utils/WatchdogTest.cpp'; then $(CYGPATH_W) 'common/utils/WatchdogTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/WatchdogTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/utils/$(DEPDIR)/common_utils_UtilsTester-WatchdogTest.Tpo common/utils/$(DEPDIR)/common_utils_UtilsTester-WatchdogTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/utils/WatchdogTest.cpp' object='common/utils/common_utils_UtilsTester-WatchdogTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_utils_UtilsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/utils/common_utils_UtilsTester-WatchdogTest.obj `if test -f 'common/utils/WatchdogTest.cpp'; then $(CYGPATH_W) 'common/utils/WatchdogTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/utils/WatchdogTest.cpp'; fi` common/web/common_web_JsonTester-JsonTest.o: common/web/JsonTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_JsonTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_JsonTester-JsonTest.o -MD -MP -MF common/web/$(DEPDIR)/common_web_JsonTester-JsonTest.Tpo -c -o common/web/common_web_JsonTester-JsonTest.o `test -f 'common/web/JsonTest.cpp' || echo '$(srcdir)/'`common/web/JsonTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_JsonTester-JsonTest.Tpo common/web/$(DEPDIR)/common_web_JsonTester-JsonTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/JsonTest.cpp' object='common/web/common_web_JsonTester-JsonTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_JsonTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_JsonTester-JsonTest.o `test -f 'common/web/JsonTest.cpp' || echo '$(srcdir)/'`common/web/JsonTest.cpp common/web/common_web_JsonTester-JsonTest.obj: common/web/JsonTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_JsonTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_JsonTester-JsonTest.obj -MD -MP -MF common/web/$(DEPDIR)/common_web_JsonTester-JsonTest.Tpo -c -o common/web/common_web_JsonTester-JsonTest.obj `if test -f 'common/web/JsonTest.cpp'; then $(CYGPATH_W) 'common/web/JsonTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/JsonTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_JsonTester-JsonTest.Tpo common/web/$(DEPDIR)/common_web_JsonTester-JsonTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/JsonTest.cpp' object='common/web/common_web_JsonTester-JsonTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_JsonTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_JsonTester-JsonTest.obj `if test -f 'common/web/JsonTest.cpp'; then $(CYGPATH_W) 'common/web/JsonTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/JsonTest.cpp'; fi` common/web/common_web_ParserTester-ParserTest.o: common/web/ParserTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_ParserTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_ParserTester-ParserTest.o -MD -MP -MF common/web/$(DEPDIR)/common_web_ParserTester-ParserTest.Tpo -c -o common/web/common_web_ParserTester-ParserTest.o `test -f 'common/web/ParserTest.cpp' || echo '$(srcdir)/'`common/web/ParserTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_ParserTester-ParserTest.Tpo common/web/$(DEPDIR)/common_web_ParserTester-ParserTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/ParserTest.cpp' object='common/web/common_web_ParserTester-ParserTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_ParserTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_ParserTester-ParserTest.o `test -f 'common/web/ParserTest.cpp' || echo '$(srcdir)/'`common/web/ParserTest.cpp common/web/common_web_ParserTester-ParserTest.obj: common/web/ParserTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_ParserTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_ParserTester-ParserTest.obj -MD -MP -MF common/web/$(DEPDIR)/common_web_ParserTester-ParserTest.Tpo -c -o common/web/common_web_ParserTester-ParserTest.obj `if test -f 'common/web/ParserTest.cpp'; then $(CYGPATH_W) 'common/web/ParserTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/ParserTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_ParserTester-ParserTest.Tpo common/web/$(DEPDIR)/common_web_ParserTester-ParserTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/ParserTest.cpp' object='common/web/common_web_ParserTester-ParserTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_ParserTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_ParserTester-ParserTest.obj `if test -f 'common/web/ParserTest.cpp'; then $(CYGPATH_W) 'common/web/ParserTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/ParserTest.cpp'; fi` common/web/common_web_PointerTester-PointerTest.o: common/web/PointerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PointerTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_PointerTester-PointerTest.o -MD -MP -MF common/web/$(DEPDIR)/common_web_PointerTester-PointerTest.Tpo -c -o common/web/common_web_PointerTester-PointerTest.o `test -f 'common/web/PointerTest.cpp' || echo '$(srcdir)/'`common/web/PointerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_PointerTester-PointerTest.Tpo common/web/$(DEPDIR)/common_web_PointerTester-PointerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/PointerTest.cpp' object='common/web/common_web_PointerTester-PointerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PointerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_PointerTester-PointerTest.o `test -f 'common/web/PointerTest.cpp' || echo '$(srcdir)/'`common/web/PointerTest.cpp common/web/common_web_PointerTester-PointerTest.obj: common/web/PointerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PointerTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_PointerTester-PointerTest.obj -MD -MP -MF common/web/$(DEPDIR)/common_web_PointerTester-PointerTest.Tpo -c -o common/web/common_web_PointerTester-PointerTest.obj `if test -f 'common/web/PointerTest.cpp'; then $(CYGPATH_W) 'common/web/PointerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/PointerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_PointerTester-PointerTest.Tpo common/web/$(DEPDIR)/common_web_PointerTester-PointerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/PointerTest.cpp' object='common/web/common_web_PointerTester-PointerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PointerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_PointerTester-PointerTest.obj `if test -f 'common/web/PointerTest.cpp'; then $(CYGPATH_W) 'common/web/PointerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/PointerTest.cpp'; fi` common/web/common_web_PointerTrackerTester-PointerTrackerTest.o: common/web/PointerTrackerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PointerTrackerTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_PointerTrackerTester-PointerTrackerTest.o -MD -MP -MF common/web/$(DEPDIR)/common_web_PointerTrackerTester-PointerTrackerTest.Tpo -c -o common/web/common_web_PointerTrackerTester-PointerTrackerTest.o `test -f 'common/web/PointerTrackerTest.cpp' || echo '$(srcdir)/'`common/web/PointerTrackerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_PointerTrackerTester-PointerTrackerTest.Tpo common/web/$(DEPDIR)/common_web_PointerTrackerTester-PointerTrackerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/PointerTrackerTest.cpp' object='common/web/common_web_PointerTrackerTester-PointerTrackerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PointerTrackerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_PointerTrackerTester-PointerTrackerTest.o `test -f 'common/web/PointerTrackerTest.cpp' || echo '$(srcdir)/'`common/web/PointerTrackerTest.cpp common/web/common_web_PointerTrackerTester-PointerTrackerTest.obj: common/web/PointerTrackerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PointerTrackerTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_PointerTrackerTester-PointerTrackerTest.obj -MD -MP -MF common/web/$(DEPDIR)/common_web_PointerTrackerTester-PointerTrackerTest.Tpo -c -o common/web/common_web_PointerTrackerTester-PointerTrackerTest.obj `if test -f 'common/web/PointerTrackerTest.cpp'; then $(CYGPATH_W) 'common/web/PointerTrackerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/PointerTrackerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_PointerTrackerTester-PointerTrackerTest.Tpo common/web/$(DEPDIR)/common_web_PointerTrackerTester-PointerTrackerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/PointerTrackerTest.cpp' object='common/web/common_web_PointerTrackerTester-PointerTrackerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PointerTrackerTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_PointerTrackerTester-PointerTrackerTest.obj `if test -f 'common/web/PointerTrackerTest.cpp'; then $(CYGPATH_W) 'common/web/PointerTrackerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/PointerTrackerTest.cpp'; fi` common/web/common_web_PtchParserTester-PatchParserTest.o: common/web/PatchParserTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PtchParserTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_PtchParserTester-PatchParserTest.o -MD -MP -MF common/web/$(DEPDIR)/common_web_PtchParserTester-PatchParserTest.Tpo -c -o common/web/common_web_PtchParserTester-PatchParserTest.o `test -f 'common/web/PatchParserTest.cpp' || echo '$(srcdir)/'`common/web/PatchParserTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_PtchParserTester-PatchParserTest.Tpo common/web/$(DEPDIR)/common_web_PtchParserTester-PatchParserTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/PatchParserTest.cpp' object='common/web/common_web_PtchParserTester-PatchParserTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PtchParserTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_PtchParserTester-PatchParserTest.o `test -f 'common/web/PatchParserTest.cpp' || echo '$(srcdir)/'`common/web/PatchParserTest.cpp common/web/common_web_PtchParserTester-PatchParserTest.obj: common/web/PatchParserTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PtchParserTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_PtchParserTester-PatchParserTest.obj -MD -MP -MF common/web/$(DEPDIR)/common_web_PtchParserTester-PatchParserTest.Tpo -c -o common/web/common_web_PtchParserTester-PatchParserTest.obj `if test -f 'common/web/PatchParserTest.cpp'; then $(CYGPATH_W) 'common/web/PatchParserTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/PatchParserTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_PtchParserTester-PatchParserTest.Tpo common/web/$(DEPDIR)/common_web_PtchParserTester-PatchParserTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/PatchParserTest.cpp' object='common/web/common_web_PtchParserTester-PatchParserTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PtchParserTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_PtchParserTester-PatchParserTest.obj `if test -f 'common/web/PatchParserTest.cpp'; then $(CYGPATH_W) 'common/web/PatchParserTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/PatchParserTest.cpp'; fi` common/web/common_web_PtchTester-PatchTest.o: common/web/PatchTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PtchTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_PtchTester-PatchTest.o -MD -MP -MF common/web/$(DEPDIR)/common_web_PtchTester-PatchTest.Tpo -c -o common/web/common_web_PtchTester-PatchTest.o `test -f 'common/web/PatchTest.cpp' || echo '$(srcdir)/'`common/web/PatchTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_PtchTester-PatchTest.Tpo common/web/$(DEPDIR)/common_web_PtchTester-PatchTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/PatchTest.cpp' object='common/web/common_web_PtchTester-PatchTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PtchTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_PtchTester-PatchTest.o `test -f 'common/web/PatchTest.cpp' || echo '$(srcdir)/'`common/web/PatchTest.cpp common/web/common_web_PtchTester-PatchTest.obj: common/web/PatchTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PtchTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_PtchTester-PatchTest.obj -MD -MP -MF common/web/$(DEPDIR)/common_web_PtchTester-PatchTest.Tpo -c -o common/web/common_web_PtchTester-PatchTest.obj `if test -f 'common/web/PatchTest.cpp'; then $(CYGPATH_W) 'common/web/PatchTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/PatchTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_PtchTester-PatchTest.Tpo common/web/$(DEPDIR)/common_web_PtchTester-PatchTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/PatchTest.cpp' object='common/web/common_web_PtchTester-PatchTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_PtchTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_PtchTester-PatchTest.obj `if test -f 'common/web/PatchTest.cpp'; then $(CYGPATH_W) 'common/web/PatchTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/PatchTest.cpp'; fi` common/web/common_web_SchemaParserTester-SchemaParserTest.o: common/web/SchemaParserTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SchemaParserTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_SchemaParserTester-SchemaParserTest.o -MD -MP -MF common/web/$(DEPDIR)/common_web_SchemaParserTester-SchemaParserTest.Tpo -c -o common/web/common_web_SchemaParserTester-SchemaParserTest.o `test -f 'common/web/SchemaParserTest.cpp' || echo '$(srcdir)/'`common/web/SchemaParserTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_SchemaParserTester-SchemaParserTest.Tpo common/web/$(DEPDIR)/common_web_SchemaParserTester-SchemaParserTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/SchemaParserTest.cpp' object='common/web/common_web_SchemaParserTester-SchemaParserTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SchemaParserTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_SchemaParserTester-SchemaParserTest.o `test -f 'common/web/SchemaParserTest.cpp' || echo '$(srcdir)/'`common/web/SchemaParserTest.cpp common/web/common_web_SchemaParserTester-SchemaParserTest.obj: common/web/SchemaParserTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SchemaParserTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_SchemaParserTester-SchemaParserTest.obj -MD -MP -MF common/web/$(DEPDIR)/common_web_SchemaParserTester-SchemaParserTest.Tpo -c -o common/web/common_web_SchemaParserTester-SchemaParserTest.obj `if test -f 'common/web/SchemaParserTest.cpp'; then $(CYGPATH_W) 'common/web/SchemaParserTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/SchemaParserTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_SchemaParserTester-SchemaParserTest.Tpo common/web/$(DEPDIR)/common_web_SchemaParserTester-SchemaParserTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/SchemaParserTest.cpp' object='common/web/common_web_SchemaParserTester-SchemaParserTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SchemaParserTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_SchemaParserTester-SchemaParserTest.obj `if test -f 'common/web/SchemaParserTest.cpp'; then $(CYGPATH_W) 'common/web/SchemaParserTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/SchemaParserTest.cpp'; fi` common/web/common_web_SchemaTester-SchemaTest.o: common/web/SchemaTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SchemaTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_SchemaTester-SchemaTest.o -MD -MP -MF common/web/$(DEPDIR)/common_web_SchemaTester-SchemaTest.Tpo -c -o common/web/common_web_SchemaTester-SchemaTest.o `test -f 'common/web/SchemaTest.cpp' || echo '$(srcdir)/'`common/web/SchemaTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_SchemaTester-SchemaTest.Tpo common/web/$(DEPDIR)/common_web_SchemaTester-SchemaTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/SchemaTest.cpp' object='common/web/common_web_SchemaTester-SchemaTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SchemaTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_SchemaTester-SchemaTest.o `test -f 'common/web/SchemaTest.cpp' || echo '$(srcdir)/'`common/web/SchemaTest.cpp common/web/common_web_SchemaTester-SchemaTest.obj: common/web/SchemaTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SchemaTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_SchemaTester-SchemaTest.obj -MD -MP -MF common/web/$(DEPDIR)/common_web_SchemaTester-SchemaTest.Tpo -c -o common/web/common_web_SchemaTester-SchemaTest.obj `if test -f 'common/web/SchemaTest.cpp'; then $(CYGPATH_W) 'common/web/SchemaTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/SchemaTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_SchemaTester-SchemaTest.Tpo common/web/$(DEPDIR)/common_web_SchemaTester-SchemaTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/SchemaTest.cpp' object='common/web/common_web_SchemaTester-SchemaTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SchemaTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_SchemaTester-SchemaTest.obj `if test -f 'common/web/SchemaTest.cpp'; then $(CYGPATH_W) 'common/web/SchemaTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/SchemaTest.cpp'; fi` common/web/common_web_SectionsTester-SectionsTest.o: common/web/SectionsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SectionsTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_SectionsTester-SectionsTest.o -MD -MP -MF common/web/$(DEPDIR)/common_web_SectionsTester-SectionsTest.Tpo -c -o common/web/common_web_SectionsTester-SectionsTest.o `test -f 'common/web/SectionsTest.cpp' || echo '$(srcdir)/'`common/web/SectionsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_SectionsTester-SectionsTest.Tpo common/web/$(DEPDIR)/common_web_SectionsTester-SectionsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/SectionsTest.cpp' object='common/web/common_web_SectionsTester-SectionsTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SectionsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_SectionsTester-SectionsTest.o `test -f 'common/web/SectionsTest.cpp' || echo '$(srcdir)/'`common/web/SectionsTest.cpp common/web/common_web_SectionsTester-SectionsTest.obj: common/web/SectionsTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SectionsTester_CXXFLAGS) $(CXXFLAGS) -MT common/web/common_web_SectionsTester-SectionsTest.obj -MD -MP -MF common/web/$(DEPDIR)/common_web_SectionsTester-SectionsTest.Tpo -c -o common/web/common_web_SectionsTester-SectionsTest.obj `if test -f 'common/web/SectionsTest.cpp'; then $(CYGPATH_W) 'common/web/SectionsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/SectionsTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) common/web/$(DEPDIR)/common_web_SectionsTester-SectionsTest.Tpo common/web/$(DEPDIR)/common_web_SectionsTester-SectionsTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='common/web/SectionsTest.cpp' object='common/web/common_web_SectionsTester-SectionsTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(common_web_SectionsTester_CXXFLAGS) $(CXXFLAGS) -c -o common/web/common_web_SectionsTester-SectionsTest.obj `if test -f 'common/web/SectionsTest.cpp'; then $(CYGPATH_W) 'common/web/SectionsTest.cpp'; else $(CYGPATH_W) '$(srcdir)/common/web/SectionsTest.cpp'; fi` data/rdm/data_rdm_PidDataTester-PidDataTest.o: data/rdm/PidDataTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(data_rdm_PidDataTester_CXXFLAGS) $(CXXFLAGS) -MT data/rdm/data_rdm_PidDataTester-PidDataTest.o -MD -MP -MF data/rdm/$(DEPDIR)/data_rdm_PidDataTester-PidDataTest.Tpo -c -o data/rdm/data_rdm_PidDataTester-PidDataTest.o `test -f 'data/rdm/PidDataTest.cpp' || echo '$(srcdir)/'`data/rdm/PidDataTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) data/rdm/$(DEPDIR)/data_rdm_PidDataTester-PidDataTest.Tpo data/rdm/$(DEPDIR)/data_rdm_PidDataTester-PidDataTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='data/rdm/PidDataTest.cpp' object='data/rdm/data_rdm_PidDataTester-PidDataTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(data_rdm_PidDataTester_CXXFLAGS) $(CXXFLAGS) -c -o data/rdm/data_rdm_PidDataTester-PidDataTest.o `test -f 'data/rdm/PidDataTest.cpp' || echo '$(srcdir)/'`data/rdm/PidDataTest.cpp data/rdm/data_rdm_PidDataTester-PidDataTest.obj: data/rdm/PidDataTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(data_rdm_PidDataTester_CXXFLAGS) $(CXXFLAGS) -MT data/rdm/data_rdm_PidDataTester-PidDataTest.obj -MD -MP -MF data/rdm/$(DEPDIR)/data_rdm_PidDataTester-PidDataTest.Tpo -c -o data/rdm/data_rdm_PidDataTester-PidDataTest.obj `if test -f 'data/rdm/PidDataTest.cpp'; then $(CYGPATH_W) 'data/rdm/PidDataTest.cpp'; else $(CYGPATH_W) '$(srcdir)/data/rdm/PidDataTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) data/rdm/$(DEPDIR)/data_rdm_PidDataTester-PidDataTest.Tpo data/rdm/$(DEPDIR)/data_rdm_PidDataTester-PidDataTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='data/rdm/PidDataTest.cpp' object='data/rdm/data_rdm_PidDataTester-PidDataTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(data_rdm_PidDataTester_CXXFLAGS) $(CXXFLAGS) -c -o data/rdm/data_rdm_PidDataTester-PidDataTest.obj `if test -f 'data/rdm/PidDataTest.cpp'; then $(CYGPATH_W) 'data/rdm/PidDataTest.cpp'; else $(CYGPATH_W) '$(srcdir)/data/rdm/PidDataTest.cpp'; fi` examples/examples_ola_artnet-ola-artnet.o: examples/ola-artnet.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_artnet_CXXFLAGS) $(CXXFLAGS) -MT examples/examples_ola_artnet-ola-artnet.o -MD -MP -MF examples/$(DEPDIR)/examples_ola_artnet-ola-artnet.Tpo -c -o examples/examples_ola_artnet-ola-artnet.o `test -f 'examples/ola-artnet.cpp' || echo '$(srcdir)/'`examples/ola-artnet.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) examples/$(DEPDIR)/examples_ola_artnet-ola-artnet.Tpo examples/$(DEPDIR)/examples_ola_artnet-ola-artnet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='examples/ola-artnet.cpp' object='examples/examples_ola_artnet-ola-artnet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_artnet_CXXFLAGS) $(CXXFLAGS) -c -o examples/examples_ola_artnet-ola-artnet.o `test -f 'examples/ola-artnet.cpp' || echo '$(srcdir)/'`examples/ola-artnet.cpp examples/examples_ola_artnet-ola-artnet.obj: examples/ola-artnet.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_artnet_CXXFLAGS) $(CXXFLAGS) -MT examples/examples_ola_artnet-ola-artnet.obj -MD -MP -MF examples/$(DEPDIR)/examples_ola_artnet-ola-artnet.Tpo -c -o examples/examples_ola_artnet-ola-artnet.obj `if test -f 'examples/ola-artnet.cpp'; then $(CYGPATH_W) 'examples/ola-artnet.cpp'; else $(CYGPATH_W) '$(srcdir)/examples/ola-artnet.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) examples/$(DEPDIR)/examples_ola_artnet-ola-artnet.Tpo examples/$(DEPDIR)/examples_ola_artnet-ola-artnet.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='examples/ola-artnet.cpp' object='examples/examples_ola_artnet-ola-artnet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_artnet_CXXFLAGS) $(CXXFLAGS) -c -o examples/examples_ola_artnet-ola-artnet.obj `if test -f 'examples/ola-artnet.cpp'; then $(CYGPATH_W) 'examples/ola-artnet.cpp'; else $(CYGPATH_W) '$(srcdir)/examples/ola-artnet.cpp'; fi` examples/examples_ola_e131-ola-e131.o: examples/ola-e131.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_e131_CXXFLAGS) $(CXXFLAGS) -MT examples/examples_ola_e131-ola-e131.o -MD -MP -MF examples/$(DEPDIR)/examples_ola_e131-ola-e131.Tpo -c -o examples/examples_ola_e131-ola-e131.o `test -f 'examples/ola-e131.cpp' || echo '$(srcdir)/'`examples/ola-e131.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) examples/$(DEPDIR)/examples_ola_e131-ola-e131.Tpo examples/$(DEPDIR)/examples_ola_e131-ola-e131.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='examples/ola-e131.cpp' object='examples/examples_ola_e131-ola-e131.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_e131_CXXFLAGS) $(CXXFLAGS) -c -o examples/examples_ola_e131-ola-e131.o `test -f 'examples/ola-e131.cpp' || echo '$(srcdir)/'`examples/ola-e131.cpp examples/examples_ola_e131-ola-e131.obj: examples/ola-e131.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_e131_CXXFLAGS) $(CXXFLAGS) -MT examples/examples_ola_e131-ola-e131.obj -MD -MP -MF examples/$(DEPDIR)/examples_ola_e131-ola-e131.Tpo -c -o examples/examples_ola_e131-ola-e131.obj `if test -f 'examples/ola-e131.cpp'; then $(CYGPATH_W) 'examples/ola-e131.cpp'; else $(CYGPATH_W) '$(srcdir)/examples/ola-e131.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) examples/$(DEPDIR)/examples_ola_e131-ola-e131.Tpo examples/$(DEPDIR)/examples_ola_e131-ola-e131.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='examples/ola-e131.cpp' object='examples/examples_ola_e131-ola-e131.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_e131_CXXFLAGS) $(CXXFLAGS) -c -o examples/examples_ola_e131-ola-e131.obj `if test -f 'examples/ola-e131.cpp'; then $(CYGPATH_W) 'examples/ola-e131.cpp'; else $(CYGPATH_W) '$(srcdir)/examples/ola-e131.cpp'; fi` examples/examples_ola_usbpro-ola-usbpro.o: examples/ola-usbpro.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_usbpro_CXXFLAGS) $(CXXFLAGS) -MT examples/examples_ola_usbpro-ola-usbpro.o -MD -MP -MF examples/$(DEPDIR)/examples_ola_usbpro-ola-usbpro.Tpo -c -o examples/examples_ola_usbpro-ola-usbpro.o `test -f 'examples/ola-usbpro.cpp' || echo '$(srcdir)/'`examples/ola-usbpro.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) examples/$(DEPDIR)/examples_ola_usbpro-ola-usbpro.Tpo examples/$(DEPDIR)/examples_ola_usbpro-ola-usbpro.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='examples/ola-usbpro.cpp' object='examples/examples_ola_usbpro-ola-usbpro.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_usbpro_CXXFLAGS) $(CXXFLAGS) -c -o examples/examples_ola_usbpro-ola-usbpro.o `test -f 'examples/ola-usbpro.cpp' || echo '$(srcdir)/'`examples/ola-usbpro.cpp examples/examples_ola_usbpro-ola-usbpro.obj: examples/ola-usbpro.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_usbpro_CXXFLAGS) $(CXXFLAGS) -MT examples/examples_ola_usbpro-ola-usbpro.obj -MD -MP -MF examples/$(DEPDIR)/examples_ola_usbpro-ola-usbpro.Tpo -c -o examples/examples_ola_usbpro-ola-usbpro.obj `if test -f 'examples/ola-usbpro.cpp'; then $(CYGPATH_W) 'examples/ola-usbpro.cpp'; else $(CYGPATH_W) '$(srcdir)/examples/ola-usbpro.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) examples/$(DEPDIR)/examples_ola_usbpro-ola-usbpro.Tpo examples/$(DEPDIR)/examples_ola_usbpro-ola-usbpro.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='examples/ola-usbpro.cpp' object='examples/examples_ola_usbpro-ola-usbpro.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(examples_ola_usbpro_CXXFLAGS) $(CXXFLAGS) -c -o examples/examples_ola_usbpro-ola-usbpro.obj `if test -f 'examples/ola-usbpro.cpp'; then $(CYGPATH_W) 'examples/ola-usbpro.cpp'; else $(CYGPATH_W) '$(srcdir)/examples/ola-usbpro.cpp'; fi` libs/acn/libs_acn_E131Tester-BaseInflatorTest.o: libs/acn/BaseInflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-BaseInflatorTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-BaseInflatorTest.Tpo -c -o libs/acn/libs_acn_E131Tester-BaseInflatorTest.o `test -f 'libs/acn/BaseInflatorTest.cpp' || echo '$(srcdir)/'`libs/acn/BaseInflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-BaseInflatorTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-BaseInflatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/BaseInflatorTest.cpp' object='libs/acn/libs_acn_E131Tester-BaseInflatorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-BaseInflatorTest.o `test -f 'libs/acn/BaseInflatorTest.cpp' || echo '$(srcdir)/'`libs/acn/BaseInflatorTest.cpp libs/acn/libs_acn_E131Tester-BaseInflatorTest.obj: libs/acn/BaseInflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-BaseInflatorTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-BaseInflatorTest.Tpo -c -o libs/acn/libs_acn_E131Tester-BaseInflatorTest.obj `if test -f 'libs/acn/BaseInflatorTest.cpp'; then $(CYGPATH_W) 'libs/acn/BaseInflatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/BaseInflatorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-BaseInflatorTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-BaseInflatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/BaseInflatorTest.cpp' object='libs/acn/libs_acn_E131Tester-BaseInflatorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-BaseInflatorTest.obj `if test -f 'libs/acn/BaseInflatorTest.cpp'; then $(CYGPATH_W) 'libs/acn/BaseInflatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/BaseInflatorTest.cpp'; fi` libs/acn/libs_acn_E131Tester-CIDTest.o: libs/acn/CIDTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-CIDTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-CIDTest.Tpo -c -o libs/acn/libs_acn_E131Tester-CIDTest.o `test -f 'libs/acn/CIDTest.cpp' || echo '$(srcdir)/'`libs/acn/CIDTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-CIDTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-CIDTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/CIDTest.cpp' object='libs/acn/libs_acn_E131Tester-CIDTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-CIDTest.o `test -f 'libs/acn/CIDTest.cpp' || echo '$(srcdir)/'`libs/acn/CIDTest.cpp libs/acn/libs_acn_E131Tester-CIDTest.obj: libs/acn/CIDTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-CIDTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-CIDTest.Tpo -c -o libs/acn/libs_acn_E131Tester-CIDTest.obj `if test -f 'libs/acn/CIDTest.cpp'; then $(CYGPATH_W) 'libs/acn/CIDTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/CIDTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-CIDTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-CIDTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/CIDTest.cpp' object='libs/acn/libs_acn_E131Tester-CIDTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-CIDTest.obj `if test -f 'libs/acn/CIDTest.cpp'; then $(CYGPATH_W) 'libs/acn/CIDTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/CIDTest.cpp'; fi` libs/acn/libs_acn_E131Tester-DMPAddressTest.o: libs/acn/DMPAddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-DMPAddressTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPAddressTest.Tpo -c -o libs/acn/libs_acn_E131Tester-DMPAddressTest.o `test -f 'libs/acn/DMPAddressTest.cpp' || echo '$(srcdir)/'`libs/acn/DMPAddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPAddressTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPAddressTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/DMPAddressTest.cpp' object='libs/acn/libs_acn_E131Tester-DMPAddressTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-DMPAddressTest.o `test -f 'libs/acn/DMPAddressTest.cpp' || echo '$(srcdir)/'`libs/acn/DMPAddressTest.cpp libs/acn/libs_acn_E131Tester-DMPAddressTest.obj: libs/acn/DMPAddressTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-DMPAddressTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPAddressTest.Tpo -c -o libs/acn/libs_acn_E131Tester-DMPAddressTest.obj `if test -f 'libs/acn/DMPAddressTest.cpp'; then $(CYGPATH_W) 'libs/acn/DMPAddressTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/DMPAddressTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPAddressTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPAddressTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/DMPAddressTest.cpp' object='libs/acn/libs_acn_E131Tester-DMPAddressTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-DMPAddressTest.obj `if test -f 'libs/acn/DMPAddressTest.cpp'; then $(CYGPATH_W) 'libs/acn/DMPAddressTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/DMPAddressTest.cpp'; fi` libs/acn/libs_acn_E131Tester-DMPInflatorTest.o: libs/acn/DMPInflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-DMPInflatorTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPInflatorTest.Tpo -c -o libs/acn/libs_acn_E131Tester-DMPInflatorTest.o `test -f 'libs/acn/DMPInflatorTest.cpp' || echo '$(srcdir)/'`libs/acn/DMPInflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPInflatorTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPInflatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/DMPInflatorTest.cpp' object='libs/acn/libs_acn_E131Tester-DMPInflatorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-DMPInflatorTest.o `test -f 'libs/acn/DMPInflatorTest.cpp' || echo '$(srcdir)/'`libs/acn/DMPInflatorTest.cpp libs/acn/libs_acn_E131Tester-DMPInflatorTest.obj: libs/acn/DMPInflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-DMPInflatorTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPInflatorTest.Tpo -c -o libs/acn/libs_acn_E131Tester-DMPInflatorTest.obj `if test -f 'libs/acn/DMPInflatorTest.cpp'; then $(CYGPATH_W) 'libs/acn/DMPInflatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/DMPInflatorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPInflatorTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPInflatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/DMPInflatorTest.cpp' object='libs/acn/libs_acn_E131Tester-DMPInflatorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-DMPInflatorTest.obj `if test -f 'libs/acn/DMPInflatorTest.cpp'; then $(CYGPATH_W) 'libs/acn/DMPInflatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/DMPInflatorTest.cpp'; fi` libs/acn/libs_acn_E131Tester-DMPPDUTest.o: libs/acn/DMPPDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-DMPPDUTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPPDUTest.Tpo -c -o libs/acn/libs_acn_E131Tester-DMPPDUTest.o `test -f 'libs/acn/DMPPDUTest.cpp' || echo '$(srcdir)/'`libs/acn/DMPPDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPPDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPPDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/DMPPDUTest.cpp' object='libs/acn/libs_acn_E131Tester-DMPPDUTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-DMPPDUTest.o `test -f 'libs/acn/DMPPDUTest.cpp' || echo '$(srcdir)/'`libs/acn/DMPPDUTest.cpp libs/acn/libs_acn_E131Tester-DMPPDUTest.obj: libs/acn/DMPPDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-DMPPDUTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPPDUTest.Tpo -c -o libs/acn/libs_acn_E131Tester-DMPPDUTest.obj `if test -f 'libs/acn/DMPPDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/DMPPDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/DMPPDUTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPPDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-DMPPDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/DMPPDUTest.cpp' object='libs/acn/libs_acn_E131Tester-DMPPDUTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-DMPPDUTest.obj `if test -f 'libs/acn/DMPPDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/DMPPDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/DMPPDUTest.cpp'; fi` libs/acn/libs_acn_E131Tester-E131InflatorTest.o: libs/acn/E131InflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-E131InflatorTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131InflatorTest.Tpo -c -o libs/acn/libs_acn_E131Tester-E131InflatorTest.o `test -f 'libs/acn/E131InflatorTest.cpp' || echo '$(srcdir)/'`libs/acn/E131InflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131InflatorTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131InflatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E131InflatorTest.cpp' object='libs/acn/libs_acn_E131Tester-E131InflatorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-E131InflatorTest.o `test -f 'libs/acn/E131InflatorTest.cpp' || echo '$(srcdir)/'`libs/acn/E131InflatorTest.cpp libs/acn/libs_acn_E131Tester-E131InflatorTest.obj: libs/acn/E131InflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-E131InflatorTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131InflatorTest.Tpo -c -o libs/acn/libs_acn_E131Tester-E131InflatorTest.obj `if test -f 'libs/acn/E131InflatorTest.cpp'; then $(CYGPATH_W) 'libs/acn/E131InflatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/E131InflatorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131InflatorTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131InflatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E131InflatorTest.cpp' object='libs/acn/libs_acn_E131Tester-E131InflatorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-E131InflatorTest.obj `if test -f 'libs/acn/E131InflatorTest.cpp'; then $(CYGPATH_W) 'libs/acn/E131InflatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/E131InflatorTest.cpp'; fi` libs/acn/libs_acn_E131Tester-E131PDUTest.o: libs/acn/E131PDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-E131PDUTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131PDUTest.Tpo -c -o libs/acn/libs_acn_E131Tester-E131PDUTest.o `test -f 'libs/acn/E131PDUTest.cpp' || echo '$(srcdir)/'`libs/acn/E131PDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131PDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131PDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E131PDUTest.cpp' object='libs/acn/libs_acn_E131Tester-E131PDUTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-E131PDUTest.o `test -f 'libs/acn/E131PDUTest.cpp' || echo '$(srcdir)/'`libs/acn/E131PDUTest.cpp libs/acn/libs_acn_E131Tester-E131PDUTest.obj: libs/acn/E131PDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-E131PDUTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131PDUTest.Tpo -c -o libs/acn/libs_acn_E131Tester-E131PDUTest.obj `if test -f 'libs/acn/E131PDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/E131PDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/E131PDUTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131PDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-E131PDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E131PDUTest.cpp' object='libs/acn/libs_acn_E131Tester-E131PDUTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-E131PDUTest.obj `if test -f 'libs/acn/E131PDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/E131PDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/E131PDUTest.cpp'; fi` libs/acn/libs_acn_E131Tester-HeaderSetTest.o: libs/acn/HeaderSetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-HeaderSetTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-HeaderSetTest.Tpo -c -o libs/acn/libs_acn_E131Tester-HeaderSetTest.o `test -f 'libs/acn/HeaderSetTest.cpp' || echo '$(srcdir)/'`libs/acn/HeaderSetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-HeaderSetTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-HeaderSetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/HeaderSetTest.cpp' object='libs/acn/libs_acn_E131Tester-HeaderSetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-HeaderSetTest.o `test -f 'libs/acn/HeaderSetTest.cpp' || echo '$(srcdir)/'`libs/acn/HeaderSetTest.cpp libs/acn/libs_acn_E131Tester-HeaderSetTest.obj: libs/acn/HeaderSetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-HeaderSetTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-HeaderSetTest.Tpo -c -o libs/acn/libs_acn_E131Tester-HeaderSetTest.obj `if test -f 'libs/acn/HeaderSetTest.cpp'; then $(CYGPATH_W) 'libs/acn/HeaderSetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/HeaderSetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-HeaderSetTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-HeaderSetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/HeaderSetTest.cpp' object='libs/acn/libs_acn_E131Tester-HeaderSetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-HeaderSetTest.obj `if test -f 'libs/acn/HeaderSetTest.cpp'; then $(CYGPATH_W) 'libs/acn/HeaderSetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/HeaderSetTest.cpp'; fi` libs/acn/libs_acn_E131Tester-PDUTest.o: libs/acn/PDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-PDUTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-PDUTest.Tpo -c -o libs/acn/libs_acn_E131Tester-PDUTest.o `test -f 'libs/acn/PDUTest.cpp' || echo '$(srcdir)/'`libs/acn/PDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-PDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-PDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/PDUTest.cpp' object='libs/acn/libs_acn_E131Tester-PDUTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-PDUTest.o `test -f 'libs/acn/PDUTest.cpp' || echo '$(srcdir)/'`libs/acn/PDUTest.cpp libs/acn/libs_acn_E131Tester-PDUTest.obj: libs/acn/PDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-PDUTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-PDUTest.Tpo -c -o libs/acn/libs_acn_E131Tester-PDUTest.obj `if test -f 'libs/acn/PDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/PDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/PDUTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-PDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-PDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/PDUTest.cpp' object='libs/acn/libs_acn_E131Tester-PDUTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-PDUTest.obj `if test -f 'libs/acn/PDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/PDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/PDUTest.cpp'; fi` libs/acn/libs_acn_E131Tester-RootInflatorTest.o: libs/acn/RootInflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-RootInflatorTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootInflatorTest.Tpo -c -o libs/acn/libs_acn_E131Tester-RootInflatorTest.o `test -f 'libs/acn/RootInflatorTest.cpp' || echo '$(srcdir)/'`libs/acn/RootInflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootInflatorTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootInflatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RootInflatorTest.cpp' object='libs/acn/libs_acn_E131Tester-RootInflatorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-RootInflatorTest.o `test -f 'libs/acn/RootInflatorTest.cpp' || echo '$(srcdir)/'`libs/acn/RootInflatorTest.cpp libs/acn/libs_acn_E131Tester-RootInflatorTest.obj: libs/acn/RootInflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-RootInflatorTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootInflatorTest.Tpo -c -o libs/acn/libs_acn_E131Tester-RootInflatorTest.obj `if test -f 'libs/acn/RootInflatorTest.cpp'; then $(CYGPATH_W) 'libs/acn/RootInflatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/RootInflatorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootInflatorTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootInflatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RootInflatorTest.cpp' object='libs/acn/libs_acn_E131Tester-RootInflatorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-RootInflatorTest.obj `if test -f 'libs/acn/RootInflatorTest.cpp'; then $(CYGPATH_W) 'libs/acn/RootInflatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/RootInflatorTest.cpp'; fi` libs/acn/libs_acn_E131Tester-RootPDUTest.o: libs/acn/RootPDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-RootPDUTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootPDUTest.Tpo -c -o libs/acn/libs_acn_E131Tester-RootPDUTest.o `test -f 'libs/acn/RootPDUTest.cpp' || echo '$(srcdir)/'`libs/acn/RootPDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootPDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootPDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RootPDUTest.cpp' object='libs/acn/libs_acn_E131Tester-RootPDUTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-RootPDUTest.o `test -f 'libs/acn/RootPDUTest.cpp' || echo '$(srcdir)/'`libs/acn/RootPDUTest.cpp libs/acn/libs_acn_E131Tester-RootPDUTest.obj: libs/acn/RootPDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-RootPDUTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootPDUTest.Tpo -c -o libs/acn/libs_acn_E131Tester-RootPDUTest.obj `if test -f 'libs/acn/RootPDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/RootPDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/RootPDUTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootPDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootPDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RootPDUTest.cpp' object='libs/acn/libs_acn_E131Tester-RootPDUTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-RootPDUTest.obj `if test -f 'libs/acn/RootPDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/RootPDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/RootPDUTest.cpp'; fi` libs/acn/libs_acn_E131Tester-RootSenderTest.o: libs/acn/RootSenderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-RootSenderTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootSenderTest.Tpo -c -o libs/acn/libs_acn_E131Tester-RootSenderTest.o `test -f 'libs/acn/RootSenderTest.cpp' || echo '$(srcdir)/'`libs/acn/RootSenderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootSenderTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootSenderTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RootSenderTest.cpp' object='libs/acn/libs_acn_E131Tester-RootSenderTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-RootSenderTest.o `test -f 'libs/acn/RootSenderTest.cpp' || echo '$(srcdir)/'`libs/acn/RootSenderTest.cpp libs/acn/libs_acn_E131Tester-RootSenderTest.obj: libs/acn/RootSenderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E131Tester-RootSenderTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootSenderTest.Tpo -c -o libs/acn/libs_acn_E131Tester-RootSenderTest.obj `if test -f 'libs/acn/RootSenderTest.cpp'; then $(CYGPATH_W) 'libs/acn/RootSenderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/RootSenderTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootSenderTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E131Tester-RootSenderTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RootSenderTest.cpp' object='libs/acn/libs_acn_E131Tester-RootSenderTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E131Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E131Tester-RootSenderTest.obj `if test -f 'libs/acn/RootSenderTest.cpp'; then $(CYGPATH_W) 'libs/acn/RootSenderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/RootSenderTest.cpp'; fi` libs/acn/libs_acn_E133Tester-E133InflatorTest.o: libs/acn/E133InflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E133Tester-E133InflatorTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133InflatorTest.Tpo -c -o libs/acn/libs_acn_E133Tester-E133InflatorTest.o `test -f 'libs/acn/E133InflatorTest.cpp' || echo '$(srcdir)/'`libs/acn/E133InflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133InflatorTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133InflatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E133InflatorTest.cpp' object='libs/acn/libs_acn_E133Tester-E133InflatorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E133Tester-E133InflatorTest.o `test -f 'libs/acn/E133InflatorTest.cpp' || echo '$(srcdir)/'`libs/acn/E133InflatorTest.cpp libs/acn/libs_acn_E133Tester-E133InflatorTest.obj: libs/acn/E133InflatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E133Tester-E133InflatorTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133InflatorTest.Tpo -c -o libs/acn/libs_acn_E133Tester-E133InflatorTest.obj `if test -f 'libs/acn/E133InflatorTest.cpp'; then $(CYGPATH_W) 'libs/acn/E133InflatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/E133InflatorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133InflatorTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133InflatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E133InflatorTest.cpp' object='libs/acn/libs_acn_E133Tester-E133InflatorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E133Tester-E133InflatorTest.obj `if test -f 'libs/acn/E133InflatorTest.cpp'; then $(CYGPATH_W) 'libs/acn/E133InflatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/E133InflatorTest.cpp'; fi` libs/acn/libs_acn_E133Tester-E133PDUTest.o: libs/acn/E133PDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E133Tester-E133PDUTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133PDUTest.Tpo -c -o libs/acn/libs_acn_E133Tester-E133PDUTest.o `test -f 'libs/acn/E133PDUTest.cpp' || echo '$(srcdir)/'`libs/acn/E133PDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133PDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133PDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E133PDUTest.cpp' object='libs/acn/libs_acn_E133Tester-E133PDUTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E133Tester-E133PDUTest.o `test -f 'libs/acn/E133PDUTest.cpp' || echo '$(srcdir)/'`libs/acn/E133PDUTest.cpp libs/acn/libs_acn_E133Tester-E133PDUTest.obj: libs/acn/E133PDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E133Tester-E133PDUTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133PDUTest.Tpo -c -o libs/acn/libs_acn_E133Tester-E133PDUTest.obj `if test -f 'libs/acn/E133PDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/E133PDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/E133PDUTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133PDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E133Tester-E133PDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/E133PDUTest.cpp' object='libs/acn/libs_acn_E133Tester-E133PDUTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E133Tester-E133PDUTest.obj `if test -f 'libs/acn/E133PDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/E133PDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/E133PDUTest.cpp'; fi` libs/acn/libs_acn_E133Tester-RDMPDUTest.o: libs/acn/RDMPDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E133Tester-RDMPDUTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E133Tester-RDMPDUTest.Tpo -c -o libs/acn/libs_acn_E133Tester-RDMPDUTest.o `test -f 'libs/acn/RDMPDUTest.cpp' || echo '$(srcdir)/'`libs/acn/RDMPDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E133Tester-RDMPDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E133Tester-RDMPDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RDMPDUTest.cpp' object='libs/acn/libs_acn_E133Tester-RDMPDUTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E133Tester-RDMPDUTest.o `test -f 'libs/acn/RDMPDUTest.cpp' || echo '$(srcdir)/'`libs/acn/RDMPDUTest.cpp libs/acn/libs_acn_E133Tester-RDMPDUTest.obj: libs/acn/RDMPDUTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_E133Tester-RDMPDUTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_E133Tester-RDMPDUTest.Tpo -c -o libs/acn/libs_acn_E133Tester-RDMPDUTest.obj `if test -f 'libs/acn/RDMPDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/RDMPDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/RDMPDUTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_E133Tester-RDMPDUTest.Tpo libs/acn/$(DEPDIR)/libs_acn_E133Tester-RDMPDUTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/RDMPDUTest.cpp' object='libs/acn/libs_acn_E133Tester-RDMPDUTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_E133Tester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_E133Tester-RDMPDUTest.obj `if test -f 'libs/acn/RDMPDUTest.cpp'; then $(CYGPATH_W) 'libs/acn/RDMPDUTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/RDMPDUTest.cpp'; fi` libs/acn/libs_acn_TransportTester-TCPTransportTest.o: libs/acn/TCPTransportTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_TransportTester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_TransportTester-TCPTransportTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_TransportTester-TCPTransportTest.Tpo -c -o libs/acn/libs_acn_TransportTester-TCPTransportTest.o `test -f 'libs/acn/TCPTransportTest.cpp' || echo '$(srcdir)/'`libs/acn/TCPTransportTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_TransportTester-TCPTransportTest.Tpo libs/acn/$(DEPDIR)/libs_acn_TransportTester-TCPTransportTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/TCPTransportTest.cpp' object='libs/acn/libs_acn_TransportTester-TCPTransportTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_TransportTester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_TransportTester-TCPTransportTest.o `test -f 'libs/acn/TCPTransportTest.cpp' || echo '$(srcdir)/'`libs/acn/TCPTransportTest.cpp libs/acn/libs_acn_TransportTester-TCPTransportTest.obj: libs/acn/TCPTransportTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_TransportTester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_TransportTester-TCPTransportTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_TransportTester-TCPTransportTest.Tpo -c -o libs/acn/libs_acn_TransportTester-TCPTransportTest.obj `if test -f 'libs/acn/TCPTransportTest.cpp'; then $(CYGPATH_W) 'libs/acn/TCPTransportTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/TCPTransportTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_TransportTester-TCPTransportTest.Tpo libs/acn/$(DEPDIR)/libs_acn_TransportTester-TCPTransportTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/TCPTransportTest.cpp' object='libs/acn/libs_acn_TransportTester-TCPTransportTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_TransportTester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_TransportTester-TCPTransportTest.obj `if test -f 'libs/acn/TCPTransportTest.cpp'; then $(CYGPATH_W) 'libs/acn/TCPTransportTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/TCPTransportTest.cpp'; fi` libs/acn/libs_acn_TransportTester-UDPTransportTest.o: libs/acn/UDPTransportTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_TransportTester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_TransportTester-UDPTransportTest.o -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_TransportTester-UDPTransportTest.Tpo -c -o libs/acn/libs_acn_TransportTester-UDPTransportTest.o `test -f 'libs/acn/UDPTransportTest.cpp' || echo '$(srcdir)/'`libs/acn/UDPTransportTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_TransportTester-UDPTransportTest.Tpo libs/acn/$(DEPDIR)/libs_acn_TransportTester-UDPTransportTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/UDPTransportTest.cpp' object='libs/acn/libs_acn_TransportTester-UDPTransportTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_TransportTester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_TransportTester-UDPTransportTest.o `test -f 'libs/acn/UDPTransportTest.cpp' || echo '$(srcdir)/'`libs/acn/UDPTransportTest.cpp libs/acn/libs_acn_TransportTester-UDPTransportTest.obj: libs/acn/UDPTransportTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_TransportTester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -MT libs/acn/libs_acn_TransportTester-UDPTransportTest.obj -MD -MP -MF libs/acn/$(DEPDIR)/libs_acn_TransportTester-UDPTransportTest.Tpo -c -o libs/acn/libs_acn_TransportTester-UDPTransportTest.obj `if test -f 'libs/acn/UDPTransportTest.cpp'; then $(CYGPATH_W) 'libs/acn/UDPTransportTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/UDPTransportTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/acn/$(DEPDIR)/libs_acn_TransportTester-UDPTransportTest.Tpo libs/acn/$(DEPDIR)/libs_acn_TransportTester-UDPTransportTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/acn/UDPTransportTest.cpp' object='libs/acn/libs_acn_TransportTester-UDPTransportTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libs_acn_TransportTester_CPPFLAGS) $(CPPFLAGS) $(AM_CXXFLAGS) $(CXXFLAGS) -c -o libs/acn/libs_acn_TransportTester-UDPTransportTest.obj `if test -f 'libs/acn/UDPTransportTest.cpp'; then $(CYGPATH_W) 'libs/acn/UDPTransportTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/acn/UDPTransportTest.cpp'; fi` libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.o: libs/usb/LibUsbThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_LibUsbThreadTester_CXXFLAGS) $(CXXFLAGS) -MT libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.o -MD -MP -MF libs/usb/$(DEPDIR)/libs_usb_LibUsbThreadTester-LibUsbThreadTest.Tpo -c -o libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.o `test -f 'libs/usb/LibUsbThreadTest.cpp' || echo '$(srcdir)/'`libs/usb/LibUsbThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/usb/$(DEPDIR)/libs_usb_LibUsbThreadTester-LibUsbThreadTest.Tpo libs/usb/$(DEPDIR)/libs_usb_LibUsbThreadTester-LibUsbThreadTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/usb/LibUsbThreadTest.cpp' object='libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_LibUsbThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.o `test -f 'libs/usb/LibUsbThreadTest.cpp' || echo '$(srcdir)/'`libs/usb/LibUsbThreadTest.cpp libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.obj: libs/usb/LibUsbThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_LibUsbThreadTester_CXXFLAGS) $(CXXFLAGS) -MT libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.obj -MD -MP -MF libs/usb/$(DEPDIR)/libs_usb_LibUsbThreadTester-LibUsbThreadTest.Tpo -c -o libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.obj `if test -f 'libs/usb/LibUsbThreadTest.cpp'; then $(CYGPATH_W) 'libs/usb/LibUsbThreadTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/usb/LibUsbThreadTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) libs/usb/$(DEPDIR)/libs_usb_LibUsbThreadTester-LibUsbThreadTest.Tpo libs/usb/$(DEPDIR)/libs_usb_LibUsbThreadTester-LibUsbThreadTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='libs/usb/LibUsbThreadTest.cpp' object='libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(libs_usb_LibUsbThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o libs/usb/libs_usb_LibUsbThreadTester-LibUsbThreadTest.obj `if test -f 'libs/usb/LibUsbThreadTest.cpp'; then $(CYGPATH_W) 'libs/usb/LibUsbThreadTest.cpp'; else $(CYGPATH_W) '$(srcdir)/libs/usb/LibUsbThreadTest.cpp'; fi` ola/ola_OlaClientTester-OlaClientWrapperTest.o: ola/OlaClientWrapperTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_OlaClientTester_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_OlaClientTester-OlaClientWrapperTest.o -MD -MP -MF ola/$(DEPDIR)/ola_OlaClientTester-OlaClientWrapperTest.Tpo -c -o ola/ola_OlaClientTester-OlaClientWrapperTest.o `test -f 'ola/OlaClientWrapperTest.cpp' || echo '$(srcdir)/'`ola/OlaClientWrapperTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_OlaClientTester-OlaClientWrapperTest.Tpo ola/$(DEPDIR)/ola_OlaClientTester-OlaClientWrapperTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/OlaClientWrapperTest.cpp' object='ola/ola_OlaClientTester-OlaClientWrapperTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_OlaClientTester_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_OlaClientTester-OlaClientWrapperTest.o `test -f 'ola/OlaClientWrapperTest.cpp' || echo '$(srcdir)/'`ola/OlaClientWrapperTest.cpp ola/ola_OlaClientTester-OlaClientWrapperTest.obj: ola/OlaClientWrapperTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_OlaClientTester_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_OlaClientTester-OlaClientWrapperTest.obj -MD -MP -MF ola/$(DEPDIR)/ola_OlaClientTester-OlaClientWrapperTest.Tpo -c -o ola/ola_OlaClientTester-OlaClientWrapperTest.obj `if test -f 'ola/OlaClientWrapperTest.cpp'; then $(CYGPATH_W) 'ola/OlaClientWrapperTest.cpp'; else $(CYGPATH_W) '$(srcdir)/ola/OlaClientWrapperTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_OlaClientTester-OlaClientWrapperTest.Tpo ola/$(DEPDIR)/ola_OlaClientTester-OlaClientWrapperTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/OlaClientWrapperTest.cpp' object='ola/ola_OlaClientTester-OlaClientWrapperTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_OlaClientTester_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_OlaClientTester-OlaClientWrapperTest.obj `if test -f 'ola/OlaClientWrapperTest.cpp'; then $(CYGPATH_W) 'ola/OlaClientWrapperTest.cpp'; else $(CYGPATH_W) '$(srcdir)/ola/OlaClientWrapperTest.cpp'; fi` ola/ola_OlaClientTester-StreamingClientTest.o: ola/StreamingClientTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_OlaClientTester_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_OlaClientTester-StreamingClientTest.o -MD -MP -MF ola/$(DEPDIR)/ola_OlaClientTester-StreamingClientTest.Tpo -c -o ola/ola_OlaClientTester-StreamingClientTest.o `test -f 'ola/StreamingClientTest.cpp' || echo '$(srcdir)/'`ola/StreamingClientTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_OlaClientTester-StreamingClientTest.Tpo ola/$(DEPDIR)/ola_OlaClientTester-StreamingClientTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/StreamingClientTest.cpp' object='ola/ola_OlaClientTester-StreamingClientTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_OlaClientTester_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_OlaClientTester-StreamingClientTest.o `test -f 'ola/StreamingClientTest.cpp' || echo '$(srcdir)/'`ola/StreamingClientTest.cpp ola/ola_OlaClientTester-StreamingClientTest.obj: ola/StreamingClientTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_OlaClientTester_CXXFLAGS) $(CXXFLAGS) -MT ola/ola_OlaClientTester-StreamingClientTest.obj -MD -MP -MF ola/$(DEPDIR)/ola_OlaClientTester-StreamingClientTest.Tpo -c -o ola/ola_OlaClientTester-StreamingClientTest.obj `if test -f 'ola/StreamingClientTest.cpp'; then $(CYGPATH_W) 'ola/StreamingClientTest.cpp'; else $(CYGPATH_W) '$(srcdir)/ola/StreamingClientTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) ola/$(DEPDIR)/ola_OlaClientTester-StreamingClientTest.Tpo ola/$(DEPDIR)/ola_OlaClientTester-StreamingClientTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='ola/StreamingClientTest.cpp' object='ola/ola_OlaClientTester-StreamingClientTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(ola_OlaClientTester_CXXFLAGS) $(CXXFLAGS) -c -o ola/ola_OlaClientTester-StreamingClientTest.obj `if test -f 'ola/StreamingClientTest.cpp'; then $(CYGPATH_W) 'ola/StreamingClientTest.cpp'; else $(CYGPATH_W) '$(srcdir)/ola/StreamingClientTest.cpp'; fi` olad/olad_OlaTester-PluginManagerTest.o: olad/PluginManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_OlaTester_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_OlaTester-PluginManagerTest.o -MD -MP -MF olad/$(DEPDIR)/olad_OlaTester-PluginManagerTest.Tpo -c -o olad/olad_OlaTester-PluginManagerTest.o `test -f 'olad/PluginManagerTest.cpp' || echo '$(srcdir)/'`olad/PluginManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_OlaTester-PluginManagerTest.Tpo olad/$(DEPDIR)/olad_OlaTester-PluginManagerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/PluginManagerTest.cpp' object='olad/olad_OlaTester-PluginManagerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_OlaTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_OlaTester-PluginManagerTest.o `test -f 'olad/PluginManagerTest.cpp' || echo '$(srcdir)/'`olad/PluginManagerTest.cpp olad/olad_OlaTester-PluginManagerTest.obj: olad/PluginManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_OlaTester_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_OlaTester-PluginManagerTest.obj -MD -MP -MF olad/$(DEPDIR)/olad_OlaTester-PluginManagerTest.Tpo -c -o olad/olad_OlaTester-PluginManagerTest.obj `if test -f 'olad/PluginManagerTest.cpp'; then $(CYGPATH_W) 'olad/PluginManagerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/PluginManagerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_OlaTester-PluginManagerTest.Tpo olad/$(DEPDIR)/olad_OlaTester-PluginManagerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/PluginManagerTest.cpp' object='olad/olad_OlaTester-PluginManagerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_OlaTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_OlaTester-PluginManagerTest.obj `if test -f 'olad/PluginManagerTest.cpp'; then $(CYGPATH_W) 'olad/PluginManagerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/PluginManagerTest.cpp'; fi` olad/olad_OlaTester-OlaServerServiceImplTest.o: olad/OlaServerServiceImplTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_OlaTester_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_OlaTester-OlaServerServiceImplTest.o -MD -MP -MF olad/$(DEPDIR)/olad_OlaTester-OlaServerServiceImplTest.Tpo -c -o olad/olad_OlaTester-OlaServerServiceImplTest.o `test -f 'olad/OlaServerServiceImplTest.cpp' || echo '$(srcdir)/'`olad/OlaServerServiceImplTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_OlaTester-OlaServerServiceImplTest.Tpo olad/$(DEPDIR)/olad_OlaTester-OlaServerServiceImplTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/OlaServerServiceImplTest.cpp' object='olad/olad_OlaTester-OlaServerServiceImplTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_OlaTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_OlaTester-OlaServerServiceImplTest.o `test -f 'olad/OlaServerServiceImplTest.cpp' || echo '$(srcdir)/'`olad/OlaServerServiceImplTest.cpp olad/olad_OlaTester-OlaServerServiceImplTest.obj: olad/OlaServerServiceImplTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_OlaTester_CXXFLAGS) $(CXXFLAGS) -MT olad/olad_OlaTester-OlaServerServiceImplTest.obj -MD -MP -MF olad/$(DEPDIR)/olad_OlaTester-OlaServerServiceImplTest.Tpo -c -o olad/olad_OlaTester-OlaServerServiceImplTest.obj `if test -f 'olad/OlaServerServiceImplTest.cpp'; then $(CYGPATH_W) 'olad/OlaServerServiceImplTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/OlaServerServiceImplTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/$(DEPDIR)/olad_OlaTester-OlaServerServiceImplTest.Tpo olad/$(DEPDIR)/olad_OlaTester-OlaServerServiceImplTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/OlaServerServiceImplTest.cpp' object='olad/olad_OlaTester-OlaServerServiceImplTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_OlaTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/olad_OlaTester-OlaServerServiceImplTest.obj `if test -f 'olad/OlaServerServiceImplTest.cpp'; then $(CYGPATH_W) 'olad/OlaServerServiceImplTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/OlaServerServiceImplTest.cpp'; fi` olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.o: olad/plugin_api/ClientTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_ClientTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.o -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_ClientTester-ClientTest.Tpo -c -o olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.o `test -f 'olad/plugin_api/ClientTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/ClientTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_ClientTester-ClientTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_ClientTester-ClientTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/ClientTest.cpp' object='olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_ClientTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.o `test -f 'olad/plugin_api/ClientTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/ClientTest.cpp olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.obj: olad/plugin_api/ClientTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_ClientTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.obj -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_ClientTester-ClientTest.Tpo -c -o olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.obj `if test -f 'olad/plugin_api/ClientTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/ClientTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/ClientTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_ClientTester-ClientTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_ClientTester-ClientTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/ClientTest.cpp' object='olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_ClientTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_ClientTester-ClientTest.obj `if test -f 'olad/plugin_api/ClientTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/ClientTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/ClientTest.cpp'; fi` olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.o: olad/plugin_api/DeviceManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DeviceTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.o -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceManagerTest.Tpo -c -o olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.o `test -f 'olad/plugin_api/DeviceManagerTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/DeviceManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceManagerTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceManagerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/DeviceManagerTest.cpp' object='olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DeviceTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.o `test -f 'olad/plugin_api/DeviceManagerTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/DeviceManagerTest.cpp olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.obj: olad/plugin_api/DeviceManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DeviceTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.obj -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceManagerTest.Tpo -c -o olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.obj `if test -f 'olad/plugin_api/DeviceManagerTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/DeviceManagerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/DeviceManagerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceManagerTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceManagerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/DeviceManagerTest.cpp' object='olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DeviceTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_DeviceTester-DeviceManagerTest.obj `if test -f 'olad/plugin_api/DeviceManagerTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/DeviceManagerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/DeviceManagerTest.cpp'; fi` olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.o: olad/plugin_api/DeviceTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DeviceTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.o -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceTest.Tpo -c -o olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.o `test -f 'olad/plugin_api/DeviceTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/DeviceTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/DeviceTest.cpp' object='olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DeviceTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.o `test -f 'olad/plugin_api/DeviceTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/DeviceTest.cpp olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.obj: olad/plugin_api/DeviceTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DeviceTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.obj -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceTest.Tpo -c -o olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.obj `if test -f 'olad/plugin_api/DeviceTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/DeviceTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/DeviceTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_DeviceTester-DeviceTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/DeviceTest.cpp' object='olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DeviceTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_DeviceTester-DeviceTest.obj `if test -f 'olad/plugin_api/DeviceTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/DeviceTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/DeviceTest.cpp'; fi` olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.o: olad/plugin_api/DmxSourceTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DmxSourceTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.o -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_DmxSourceTester-DmxSourceTest.Tpo -c -o olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.o `test -f 'olad/plugin_api/DmxSourceTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/DmxSourceTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_DmxSourceTester-DmxSourceTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_DmxSourceTester-DmxSourceTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/DmxSourceTest.cpp' object='olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DmxSourceTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.o `test -f 'olad/plugin_api/DmxSourceTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/DmxSourceTest.cpp olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.obj: olad/plugin_api/DmxSourceTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DmxSourceTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.obj -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_DmxSourceTester-DmxSourceTest.Tpo -c -o olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.obj `if test -f 'olad/plugin_api/DmxSourceTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/DmxSourceTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/DmxSourceTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_DmxSourceTester-DmxSourceTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_DmxSourceTester-DmxSourceTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/DmxSourceTest.cpp' object='olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_DmxSourceTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_DmxSourceTester-DmxSourceTest.obj `if test -f 'olad/plugin_api/DmxSourceTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/DmxSourceTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/DmxSourceTest.cpp'; fi` olad/plugin_api/olad_plugin_api_PortTester-PortTest.o: olad/plugin_api/PortTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PortTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_PortTester-PortTest.o -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortTest.Tpo -c -o olad/plugin_api/olad_plugin_api_PortTester-PortTest.o `test -f 'olad/plugin_api/PortTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/PortTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/PortTest.cpp' object='olad/plugin_api/olad_plugin_api_PortTester-PortTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PortTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_PortTester-PortTest.o `test -f 'olad/plugin_api/PortTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/PortTest.cpp olad/plugin_api/olad_plugin_api_PortTester-PortTest.obj: olad/plugin_api/PortTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PortTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_PortTester-PortTest.obj -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortTest.Tpo -c -o olad/plugin_api/olad_plugin_api_PortTester-PortTest.obj `if test -f 'olad/plugin_api/PortTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/PortTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/PortTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/PortTest.cpp' object='olad/plugin_api/olad_plugin_api_PortTester-PortTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PortTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_PortTester-PortTest.obj `if test -f 'olad/plugin_api/PortTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/PortTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/PortTest.cpp'; fi` olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.o: olad/plugin_api/PortManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PortTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.o -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortManagerTest.Tpo -c -o olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.o `test -f 'olad/plugin_api/PortManagerTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/PortManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortManagerTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortManagerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/PortManagerTest.cpp' object='olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PortTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.o `test -f 'olad/plugin_api/PortManagerTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/PortManagerTest.cpp olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.obj: olad/plugin_api/PortManagerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PortTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.obj -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortManagerTest.Tpo -c -o olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.obj `if test -f 'olad/plugin_api/PortManagerTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/PortManagerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/PortManagerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortManagerTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_PortTester-PortManagerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/PortManagerTest.cpp' object='olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PortTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_PortTester-PortManagerTest.obj `if test -f 'olad/plugin_api/PortManagerTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/PortManagerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/PortManagerTest.cpp'; fi` olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.o: olad/plugin_api/PreferencesTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PreferencesTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.o -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_PreferencesTester-PreferencesTest.Tpo -c -o olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.o `test -f 'olad/plugin_api/PreferencesTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/PreferencesTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_PreferencesTester-PreferencesTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_PreferencesTester-PreferencesTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/PreferencesTest.cpp' object='olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PreferencesTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.o `test -f 'olad/plugin_api/PreferencesTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/PreferencesTest.cpp olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.obj: olad/plugin_api/PreferencesTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PreferencesTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.obj -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_PreferencesTester-PreferencesTest.Tpo -c -o olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.obj `if test -f 'olad/plugin_api/PreferencesTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/PreferencesTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/PreferencesTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_PreferencesTester-PreferencesTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_PreferencesTester-PreferencesTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/PreferencesTest.cpp' object='olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_PreferencesTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_PreferencesTester-PreferencesTest.obj `if test -f 'olad/plugin_api/PreferencesTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/PreferencesTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/PreferencesTest.cpp'; fi` olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.o: olad/plugin_api/UniverseTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_UniverseTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.o -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_UniverseTester-UniverseTest.Tpo -c -o olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.o `test -f 'olad/plugin_api/UniverseTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/UniverseTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_UniverseTester-UniverseTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_UniverseTester-UniverseTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/UniverseTest.cpp' object='olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_UniverseTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.o `test -f 'olad/plugin_api/UniverseTest.cpp' || echo '$(srcdir)/'`olad/plugin_api/UniverseTest.cpp olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.obj: olad/plugin_api/UniverseTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_UniverseTester_CXXFLAGS) $(CXXFLAGS) -MT olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.obj -MD -MP -MF olad/plugin_api/$(DEPDIR)/olad_plugin_api_UniverseTester-UniverseTest.Tpo -c -o olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.obj `if test -f 'olad/plugin_api/UniverseTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/UniverseTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/UniverseTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) olad/plugin_api/$(DEPDIR)/olad_plugin_api_UniverseTester-UniverseTest.Tpo olad/plugin_api/$(DEPDIR)/olad_plugin_api_UniverseTester-UniverseTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='olad/plugin_api/UniverseTest.cpp' object='olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(olad_plugin_api_UniverseTester_CXXFLAGS) $(CXXFLAGS) -c -o olad/plugin_api/olad_plugin_api_UniverseTester-UniverseTest.obj `if test -f 'olad/plugin_api/UniverseTest.cpp'; then $(CYGPATH_W) 'olad/plugin_api/UniverseTest.cpp'; else $(CYGPATH_W) '$(srcdir)/olad/plugin_api/UniverseTest.cpp'; fi` plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.o: plugins/artnet/ArtNetNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_ArtNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.o -MD -MP -MF plugins/artnet/$(DEPDIR)/plugins_artnet_ArtNetTester-ArtNetNodeTest.Tpo -c -o plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.o `test -f 'plugins/artnet/ArtNetNodeTest.cpp' || echo '$(srcdir)/'`plugins/artnet/ArtNetNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/artnet/$(DEPDIR)/plugins_artnet_ArtNetTester-ArtNetNodeTest.Tpo plugins/artnet/$(DEPDIR)/plugins_artnet_ArtNetTester-ArtNetNodeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/artnet/ArtNetNodeTest.cpp' object='plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_ArtNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.o `test -f 'plugins/artnet/ArtNetNodeTest.cpp' || echo '$(srcdir)/'`plugins/artnet/ArtNetNodeTest.cpp plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.obj: plugins/artnet/ArtNetNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_ArtNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.obj -MD -MP -MF plugins/artnet/$(DEPDIR)/plugins_artnet_ArtNetTester-ArtNetNodeTest.Tpo -c -o plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.obj `if test -f 'plugins/artnet/ArtNetNodeTest.cpp'; then $(CYGPATH_W) 'plugins/artnet/ArtNetNodeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/artnet/ArtNetNodeTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/artnet/$(DEPDIR)/plugins_artnet_ArtNetTester-ArtNetNodeTest.Tpo plugins/artnet/$(DEPDIR)/plugins_artnet_ArtNetTester-ArtNetNodeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/artnet/ArtNetNodeTest.cpp' object='plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_artnet_ArtNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/artnet/plugins_artnet_ArtNetTester-ArtNetNodeTest.obj `if test -f 'plugins/artnet/ArtNetNodeTest.cpp'; then $(CYGPATH_W) 'plugins/artnet/ArtNetNodeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/artnet/ArtNetNodeTest.cpp'; fi` plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.o: plugins/dummy/DummyPortTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_dummy_DummyPluginTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.o -MD -MP -MF plugins/dummy/$(DEPDIR)/plugins_dummy_DummyPluginTester-DummyPortTest.Tpo -c -o plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.o `test -f 'plugins/dummy/DummyPortTest.cpp' || echo '$(srcdir)/'`plugins/dummy/DummyPortTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/dummy/$(DEPDIR)/plugins_dummy_DummyPluginTester-DummyPortTest.Tpo plugins/dummy/$(DEPDIR)/plugins_dummy_DummyPluginTester-DummyPortTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/dummy/DummyPortTest.cpp' object='plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_dummy_DummyPluginTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.o `test -f 'plugins/dummy/DummyPortTest.cpp' || echo '$(srcdir)/'`plugins/dummy/DummyPortTest.cpp plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.obj: plugins/dummy/DummyPortTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_dummy_DummyPluginTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.obj -MD -MP -MF plugins/dummy/$(DEPDIR)/plugins_dummy_DummyPluginTester-DummyPortTest.Tpo -c -o plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.obj `if test -f 'plugins/dummy/DummyPortTest.cpp'; then $(CYGPATH_W) 'plugins/dummy/DummyPortTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/dummy/DummyPortTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/dummy/$(DEPDIR)/plugins_dummy_DummyPluginTester-DummyPortTest.Tpo plugins/dummy/$(DEPDIR)/plugins_dummy_DummyPluginTester-DummyPortTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/dummy/DummyPortTest.cpp' object='plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_dummy_DummyPluginTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/dummy/plugins_dummy_DummyPluginTester-DummyPortTest.obj `if test -f 'plugins/dummy/DummyPortTest.cpp'; then $(CYGPATH_W) 'plugins/dummy/DummyPortTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/dummy/DummyPortTest.cpp'; fi` plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.o: plugins/espnet/RunLengthDecoderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_espnet_EspNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.o -MD -MP -MF plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoderTest.Tpo -c -o plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.o `test -f 'plugins/espnet/RunLengthDecoderTest.cpp' || echo '$(srcdir)/'`plugins/espnet/RunLengthDecoderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoderTest.Tpo plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoderTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/espnet/RunLengthDecoderTest.cpp' object='plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_espnet_EspNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.o `test -f 'plugins/espnet/RunLengthDecoderTest.cpp' || echo '$(srcdir)/'`plugins/espnet/RunLengthDecoderTest.cpp plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.obj: plugins/espnet/RunLengthDecoderTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_espnet_EspNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.obj -MD -MP -MF plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoderTest.Tpo -c -o plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.obj `if test -f 'plugins/espnet/RunLengthDecoderTest.cpp'; then $(CYGPATH_W) 'plugins/espnet/RunLengthDecoderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/espnet/RunLengthDecoderTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoderTest.Tpo plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoderTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/espnet/RunLengthDecoderTest.cpp' object='plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_espnet_EspNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoderTest.obj `if test -f 'plugins/espnet/RunLengthDecoderTest.cpp'; then $(CYGPATH_W) 'plugins/espnet/RunLengthDecoderTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/espnet/RunLengthDecoderTest.cpp'; fi` plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.o: plugins/espnet/RunLengthDecoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_espnet_EspNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.o -MD -MP -MF plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoder.Tpo -c -o plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.o `test -f 'plugins/espnet/RunLengthDecoder.cpp' || echo '$(srcdir)/'`plugins/espnet/RunLengthDecoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoder.Tpo plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoder.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/espnet/RunLengthDecoder.cpp' object='plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_espnet_EspNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.o `test -f 'plugins/espnet/RunLengthDecoder.cpp' || echo '$(srcdir)/'`plugins/espnet/RunLengthDecoder.cpp plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.obj: plugins/espnet/RunLengthDecoder.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_espnet_EspNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.obj -MD -MP -MF plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoder.Tpo -c -o plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.obj `if test -f 'plugins/espnet/RunLengthDecoder.cpp'; then $(CYGPATH_W) 'plugins/espnet/RunLengthDecoder.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/espnet/RunLengthDecoder.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoder.Tpo plugins/espnet/$(DEPDIR)/plugins_espnet_EspNetTester-RunLengthDecoder.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/espnet/RunLengthDecoder.cpp' object='plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_espnet_EspNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/espnet/plugins_espnet_EspNetTester-RunLengthDecoder.obj `if test -f 'plugins/espnet/RunLengthDecoder.cpp'; then $(CYGPATH_W) 'plugins/espnet/RunLengthDecoder.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/espnet/RunLengthDecoder.cpp'; fi` plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.o: plugins/kinet/KiNetNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_kinet_KiNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.o -MD -MP -MF plugins/kinet/$(DEPDIR)/plugins_kinet_KiNetTester-KiNetNodeTest.Tpo -c -o plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.o `test -f 'plugins/kinet/KiNetNodeTest.cpp' || echo '$(srcdir)/'`plugins/kinet/KiNetNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/kinet/$(DEPDIR)/plugins_kinet_KiNetTester-KiNetNodeTest.Tpo plugins/kinet/$(DEPDIR)/plugins_kinet_KiNetTester-KiNetNodeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/kinet/KiNetNodeTest.cpp' object='plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_kinet_KiNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.o `test -f 'plugins/kinet/KiNetNodeTest.cpp' || echo '$(srcdir)/'`plugins/kinet/KiNetNodeTest.cpp plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.obj: plugins/kinet/KiNetNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_kinet_KiNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.obj -MD -MP -MF plugins/kinet/$(DEPDIR)/plugins_kinet_KiNetTester-KiNetNodeTest.Tpo -c -o plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.obj `if test -f 'plugins/kinet/KiNetNodeTest.cpp'; then $(CYGPATH_W) 'plugins/kinet/KiNetNodeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/kinet/KiNetNodeTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/kinet/$(DEPDIR)/plugins_kinet_KiNetTester-KiNetNodeTest.Tpo plugins/kinet/$(DEPDIR)/plugins_kinet_KiNetTester-KiNetNodeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/kinet/KiNetNodeTest.cpp' object='plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_kinet_KiNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/kinet/plugins_kinet_KiNetTester-KiNetNodeTest.obj `if test -f 'plugins/kinet/KiNetNodeTest.cpp'; then $(CYGPATH_W) 'plugins/kinet/KiNetNodeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/kinet/KiNetNodeTest.cpp'; fi` plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.o: plugins/openpixelcontrol/OPCClientTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_openpixelcontrol_OPCClientTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.o -MD -MP -MF plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.Tpo -c -o plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.o `test -f 'plugins/openpixelcontrol/OPCClientTest.cpp' || echo '$(srcdir)/'`plugins/openpixelcontrol/OPCClientTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.Tpo plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/openpixelcontrol/OPCClientTest.cpp' object='plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_openpixelcontrol_OPCClientTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.o `test -f 'plugins/openpixelcontrol/OPCClientTest.cpp' || echo '$(srcdir)/'`plugins/openpixelcontrol/OPCClientTest.cpp plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.obj: plugins/openpixelcontrol/OPCClientTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_openpixelcontrol_OPCClientTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.obj -MD -MP -MF plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.Tpo -c -o plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.obj `if test -f 'plugins/openpixelcontrol/OPCClientTest.cpp'; then $(CYGPATH_W) 'plugins/openpixelcontrol/OPCClientTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/openpixelcontrol/OPCClientTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.Tpo plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/openpixelcontrol/OPCClientTest.cpp' object='plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_openpixelcontrol_OPCClientTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/openpixelcontrol/plugins_openpixelcontrol_OPCClientTester-OPCClientTest.obj `if test -f 'plugins/openpixelcontrol/OPCClientTest.cpp'; then $(CYGPATH_W) 'plugins/openpixelcontrol/OPCClientTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/openpixelcontrol/OPCClientTest.cpp'; fi` plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.o: plugins/openpixelcontrol/OPCServerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_openpixelcontrol_OPCServerTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.o -MD -MP -MF plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.Tpo -c -o plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.o `test -f 'plugins/openpixelcontrol/OPCServerTest.cpp' || echo '$(srcdir)/'`plugins/openpixelcontrol/OPCServerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.Tpo plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/openpixelcontrol/OPCServerTest.cpp' object='plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_openpixelcontrol_OPCServerTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.o `test -f 'plugins/openpixelcontrol/OPCServerTest.cpp' || echo '$(srcdir)/'`plugins/openpixelcontrol/OPCServerTest.cpp plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.obj: plugins/openpixelcontrol/OPCServerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_openpixelcontrol_OPCServerTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.obj -MD -MP -MF plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.Tpo -c -o plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.obj `if test -f 'plugins/openpixelcontrol/OPCServerTest.cpp'; then $(CYGPATH_W) 'plugins/openpixelcontrol/OPCServerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/openpixelcontrol/OPCServerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.Tpo plugins/openpixelcontrol/$(DEPDIR)/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/openpixelcontrol/OPCServerTest.cpp' object='plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_openpixelcontrol_OPCServerTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/openpixelcontrol/plugins_openpixelcontrol_OPCServerTester-OPCServerTest.obj `if test -f 'plugins/openpixelcontrol/OPCServerTest.cpp'; then $(CYGPATH_W) 'plugins/openpixelcontrol/OPCServerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/openpixelcontrol/OPCServerTest.cpp'; fi` plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.o: plugins/osc/OSCAddressTemplateTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_OSCTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.o -MD -MP -MF plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCAddressTemplateTest.Tpo -c -o plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.o `test -f 'plugins/osc/OSCAddressTemplateTest.cpp' || echo '$(srcdir)/'`plugins/osc/OSCAddressTemplateTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCAddressTemplateTest.Tpo plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCAddressTemplateTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/osc/OSCAddressTemplateTest.cpp' object='plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_OSCTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.o `test -f 'plugins/osc/OSCAddressTemplateTest.cpp' || echo '$(srcdir)/'`plugins/osc/OSCAddressTemplateTest.cpp plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.obj: plugins/osc/OSCAddressTemplateTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_OSCTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.obj -MD -MP -MF plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCAddressTemplateTest.Tpo -c -o plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.obj `if test -f 'plugins/osc/OSCAddressTemplateTest.cpp'; then $(CYGPATH_W) 'plugins/osc/OSCAddressTemplateTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/osc/OSCAddressTemplateTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCAddressTemplateTest.Tpo plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCAddressTemplateTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/osc/OSCAddressTemplateTest.cpp' object='plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_OSCTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/osc/plugins_osc_OSCTester-OSCAddressTemplateTest.obj `if test -f 'plugins/osc/OSCAddressTemplateTest.cpp'; then $(CYGPATH_W) 'plugins/osc/OSCAddressTemplateTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/osc/OSCAddressTemplateTest.cpp'; fi` plugins/osc/plugins_osc_OSCTester-OSCNodeTest.o: plugins/osc/OSCNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_OSCTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/osc/plugins_osc_OSCTester-OSCNodeTest.o -MD -MP -MF plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCNodeTest.Tpo -c -o plugins/osc/plugins_osc_OSCTester-OSCNodeTest.o `test -f 'plugins/osc/OSCNodeTest.cpp' || echo '$(srcdir)/'`plugins/osc/OSCNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCNodeTest.Tpo plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCNodeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/osc/OSCNodeTest.cpp' object='plugins/osc/plugins_osc_OSCTester-OSCNodeTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_OSCTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/osc/plugins_osc_OSCTester-OSCNodeTest.o `test -f 'plugins/osc/OSCNodeTest.cpp' || echo '$(srcdir)/'`plugins/osc/OSCNodeTest.cpp plugins/osc/plugins_osc_OSCTester-OSCNodeTest.obj: plugins/osc/OSCNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_OSCTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/osc/plugins_osc_OSCTester-OSCNodeTest.obj -MD -MP -MF plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCNodeTest.Tpo -c -o plugins/osc/plugins_osc_OSCTester-OSCNodeTest.obj `if test -f 'plugins/osc/OSCNodeTest.cpp'; then $(CYGPATH_W) 'plugins/osc/OSCNodeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/osc/OSCNodeTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCNodeTest.Tpo plugins/osc/$(DEPDIR)/plugins_osc_OSCTester-OSCNodeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/osc/OSCNodeTest.cpp' object='plugins/osc/plugins_osc_OSCTester-OSCNodeTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_osc_OSCTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/osc/plugins_osc_OSCTester-OSCNodeTest.obj `if test -f 'plugins/osc/OSCNodeTest.cpp'; then $(CYGPATH_W) 'plugins/osc/OSCNodeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/osc/OSCNodeTest.cpp'; fi` plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.o: plugins/shownet/ShowNetNode.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_shownet_ShowNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.o -MD -MP -MF plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNode.Tpo -c -o plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.o `test -f 'plugins/shownet/ShowNetNode.cpp' || echo '$(srcdir)/'`plugins/shownet/ShowNetNode.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNode.Tpo plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/shownet/ShowNetNode.cpp' object='plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_shownet_ShowNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.o `test -f 'plugins/shownet/ShowNetNode.cpp' || echo '$(srcdir)/'`plugins/shownet/ShowNetNode.cpp plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.obj: plugins/shownet/ShowNetNode.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_shownet_ShowNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.obj -MD -MP -MF plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNode.Tpo -c -o plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.obj `if test -f 'plugins/shownet/ShowNetNode.cpp'; then $(CYGPATH_W) 'plugins/shownet/ShowNetNode.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/shownet/ShowNetNode.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNode.Tpo plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNode.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/shownet/ShowNetNode.cpp' object='plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_shownet_ShowNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNode.obj `if test -f 'plugins/shownet/ShowNetNode.cpp'; then $(CYGPATH_W) 'plugins/shownet/ShowNetNode.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/shownet/ShowNetNode.cpp'; fi` plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.o: plugins/shownet/ShowNetNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_shownet_ShowNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.o -MD -MP -MF plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNodeTest.Tpo -c -o plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.o `test -f 'plugins/shownet/ShowNetNodeTest.cpp' || echo '$(srcdir)/'`plugins/shownet/ShowNetNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNodeTest.Tpo plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNodeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/shownet/ShowNetNodeTest.cpp' object='plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_shownet_ShowNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.o `test -f 'plugins/shownet/ShowNetNodeTest.cpp' || echo '$(srcdir)/'`plugins/shownet/ShowNetNodeTest.cpp plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.obj: plugins/shownet/ShowNetNodeTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_shownet_ShowNetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.obj -MD -MP -MF plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNodeTest.Tpo -c -o plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.obj `if test -f 'plugins/shownet/ShowNetNodeTest.cpp'; then $(CYGPATH_W) 'plugins/shownet/ShowNetNodeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/shownet/ShowNetNodeTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNodeTest.Tpo plugins/shownet/$(DEPDIR)/plugins_shownet_ShowNetTester-ShowNetNodeTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/shownet/ShowNetNodeTest.cpp' object='plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_shownet_ShowNetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/shownet/plugins_shownet_ShowNetTester-ShowNetNodeTest.obj `if test -f 'plugins/shownet/ShowNetNodeTest.cpp'; then $(CYGPATH_W) 'plugins/shownet/ShowNetNodeTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/shownet/ShowNetNodeTest.cpp'; fi` plugins/spi/plugins_spi_SPITester-SPIBackendTest.o: plugins/spi/SPIBackendTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -MT plugins/spi/plugins_spi_SPITester-SPIBackendTest.o -MD -MP -MF plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIBackendTest.Tpo -c -o plugins/spi/plugins_spi_SPITester-SPIBackendTest.o `test -f 'plugins/spi/SPIBackendTest.cpp' || echo '$(srcdir)/'`plugins/spi/SPIBackendTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIBackendTest.Tpo plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIBackendTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/spi/SPIBackendTest.cpp' object='plugins/spi/plugins_spi_SPITester-SPIBackendTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/spi/plugins_spi_SPITester-SPIBackendTest.o `test -f 'plugins/spi/SPIBackendTest.cpp' || echo '$(srcdir)/'`plugins/spi/SPIBackendTest.cpp plugins/spi/plugins_spi_SPITester-SPIBackendTest.obj: plugins/spi/SPIBackendTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -MT plugins/spi/plugins_spi_SPITester-SPIBackendTest.obj -MD -MP -MF plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIBackendTest.Tpo -c -o plugins/spi/plugins_spi_SPITester-SPIBackendTest.obj `if test -f 'plugins/spi/SPIBackendTest.cpp'; then $(CYGPATH_W) 'plugins/spi/SPIBackendTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/spi/SPIBackendTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIBackendTest.Tpo plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIBackendTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/spi/SPIBackendTest.cpp' object='plugins/spi/plugins_spi_SPITester-SPIBackendTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/spi/plugins_spi_SPITester-SPIBackendTest.obj `if test -f 'plugins/spi/SPIBackendTest.cpp'; then $(CYGPATH_W) 'plugins/spi/SPIBackendTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/spi/SPIBackendTest.cpp'; fi` plugins/spi/plugins_spi_SPITester-SPIOutputTest.o: plugins/spi/SPIOutputTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -MT plugins/spi/plugins_spi_SPITester-SPIOutputTest.o -MD -MP -MF plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIOutputTest.Tpo -c -o plugins/spi/plugins_spi_SPITester-SPIOutputTest.o `test -f 'plugins/spi/SPIOutputTest.cpp' || echo '$(srcdir)/'`plugins/spi/SPIOutputTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIOutputTest.Tpo plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIOutputTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/spi/SPIOutputTest.cpp' object='plugins/spi/plugins_spi_SPITester-SPIOutputTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/spi/plugins_spi_SPITester-SPIOutputTest.o `test -f 'plugins/spi/SPIOutputTest.cpp' || echo '$(srcdir)/'`plugins/spi/SPIOutputTest.cpp plugins/spi/plugins_spi_SPITester-SPIOutputTest.obj: plugins/spi/SPIOutputTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -MT plugins/spi/plugins_spi_SPITester-SPIOutputTest.obj -MD -MP -MF plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIOutputTest.Tpo -c -o plugins/spi/plugins_spi_SPITester-SPIOutputTest.obj `if test -f 'plugins/spi/SPIOutputTest.cpp'; then $(CYGPATH_W) 'plugins/spi/SPIOutputTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/spi/SPIOutputTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIOutputTest.Tpo plugins/spi/$(DEPDIR)/plugins_spi_SPITester-SPIOutputTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/spi/SPIOutputTest.cpp' object='plugins/spi/plugins_spi_SPITester-SPIOutputTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/spi/plugins_spi_SPITester-SPIOutputTest.obj `if test -f 'plugins/spi/SPIOutputTest.cpp'; then $(CYGPATH_W) 'plugins/spi/SPIOutputTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/spi/SPIOutputTest.cpp'; fi` plugins/spi/plugins_spi_SPITester-FakeSPIWriter.o: plugins/spi/FakeSPIWriter.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -MT plugins/spi/plugins_spi_SPITester-FakeSPIWriter.o -MD -MP -MF plugins/spi/$(DEPDIR)/plugins_spi_SPITester-FakeSPIWriter.Tpo -c -o plugins/spi/plugins_spi_SPITester-FakeSPIWriter.o `test -f 'plugins/spi/FakeSPIWriter.cpp' || echo '$(srcdir)/'`plugins/spi/FakeSPIWriter.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/spi/$(DEPDIR)/plugins_spi_SPITester-FakeSPIWriter.Tpo plugins/spi/$(DEPDIR)/plugins_spi_SPITester-FakeSPIWriter.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/spi/FakeSPIWriter.cpp' object='plugins/spi/plugins_spi_SPITester-FakeSPIWriter.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/spi/plugins_spi_SPITester-FakeSPIWriter.o `test -f 'plugins/spi/FakeSPIWriter.cpp' || echo '$(srcdir)/'`plugins/spi/FakeSPIWriter.cpp plugins/spi/plugins_spi_SPITester-FakeSPIWriter.obj: plugins/spi/FakeSPIWriter.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -MT plugins/spi/plugins_spi_SPITester-FakeSPIWriter.obj -MD -MP -MF plugins/spi/$(DEPDIR)/plugins_spi_SPITester-FakeSPIWriter.Tpo -c -o plugins/spi/plugins_spi_SPITester-FakeSPIWriter.obj `if test -f 'plugins/spi/FakeSPIWriter.cpp'; then $(CYGPATH_W) 'plugins/spi/FakeSPIWriter.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/spi/FakeSPIWriter.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/spi/$(DEPDIR)/plugins_spi_SPITester-FakeSPIWriter.Tpo plugins/spi/$(DEPDIR)/plugins_spi_SPITester-FakeSPIWriter.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/spi/FakeSPIWriter.cpp' object='plugins/spi/plugins_spi_SPITester-FakeSPIWriter.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_spi_SPITester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/spi/plugins_spi_SPITester-FakeSPIWriter.obj `if test -f 'plugins/spi/FakeSPIWriter.cpp'; then $(CYGPATH_W) 'plugins/spi/FakeSPIWriter.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/spi/FakeSPIWriter.cpp'; fi` plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.o: plugins/usbpro/ArduinoWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.o `test -f 'plugins/usbpro/ArduinoWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/ArduinoWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/ArduinoWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.o `test -f 'plugins/usbpro/ArduinoWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/ArduinoWidgetTest.cpp plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.obj: plugins/usbpro/ArduinoWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.obj `if test -f 'plugins/usbpro/ArduinoWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/ArduinoWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/ArduinoWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/ArduinoWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-ArduinoWidgetTest.obj `if test -f 'plugins/usbpro/ArduinoWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/ArduinoWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/ArduinoWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.o: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.obj: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.o: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.obj: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_ArduinoWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_ArduinoWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.o: plugins/usbpro/BaseRobeWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.o `test -f 'plugins/usbpro/BaseRobeWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/BaseRobeWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/BaseRobeWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.o `test -f 'plugins/usbpro/BaseRobeWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/BaseRobeWidgetTest.cpp plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.obj: plugins/usbpro/BaseRobeWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.obj `if test -f 'plugins/usbpro/BaseRobeWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/BaseRobeWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/BaseRobeWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/BaseRobeWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-BaseRobeWidgetTest.obj `if test -f 'plugins/usbpro/BaseRobeWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/BaseRobeWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/BaseRobeWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.o: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.obj: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.o: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.obj: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseRobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseRobeWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.o: plugins/usbpro/BaseUsbProWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.o `test -f 'plugins/usbpro/BaseUsbProWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/BaseUsbProWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/BaseUsbProWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.o `test -f 'plugins/usbpro/BaseUsbProWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/BaseUsbProWidgetTest.cpp plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.obj: plugins/usbpro/BaseUsbProWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.obj `if test -f 'plugins/usbpro/BaseUsbProWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/BaseUsbProWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/BaseUsbProWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/BaseUsbProWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-BaseUsbProWidgetTest.obj `if test -f 'plugins/usbpro/BaseUsbProWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/BaseUsbProWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/BaseUsbProWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.o: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.obj: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.o: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.obj: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_BaseUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_BaseUsbProWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.o: plugins/usbpro/DmxTriWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.o `test -f 'plugins/usbpro/DmxTriWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/DmxTriWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/DmxTriWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.o `test -f 'plugins/usbpro/DmxTriWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/DmxTriWidgetTest.cpp plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.obj: plugins/usbpro/DmxTriWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.obj `if test -f 'plugins/usbpro/DmxTriWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/DmxTriWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/DmxTriWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/DmxTriWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-DmxTriWidgetTest.obj `if test -f 'plugins/usbpro/DmxTriWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/DmxTriWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/DmxTriWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.o: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.obj: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.o: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.obj: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxTriWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxTriWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.o: plugins/usbpro/DmxterWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.o `test -f 'plugins/usbpro/DmxterWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/DmxterWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/DmxterWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.o `test -f 'plugins/usbpro/DmxterWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/DmxterWidgetTest.cpp plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.obj: plugins/usbpro/DmxterWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.obj `if test -f 'plugins/usbpro/DmxterWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/DmxterWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/DmxterWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/DmxterWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-DmxterWidgetTest.obj `if test -f 'plugins/usbpro/DmxterWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/DmxterWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/DmxterWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.o: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.obj: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.o: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.obj: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_DmxterWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_DmxterWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_DmxterWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.o: plugins/usbpro/EnttecUsbProWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.o `test -f 'plugins/usbpro/EnttecUsbProWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/EnttecUsbProWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/EnttecUsbProWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.o `test -f 'plugins/usbpro/EnttecUsbProWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/EnttecUsbProWidgetTest.cpp plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.obj: plugins/usbpro/EnttecUsbProWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.obj `if test -f 'plugins/usbpro/EnttecUsbProWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/EnttecUsbProWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/EnttecUsbProWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/EnttecUsbProWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-EnttecUsbProWidgetTest.obj `if test -f 'plugins/usbpro/EnttecUsbProWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/EnttecUsbProWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/EnttecUsbProWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.o: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.obj: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.o: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.obj: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_EnttecUsbProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_EnttecUsbProWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.o: plugins/usbpro/RobeWidgetDetectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.o `test -f 'plugins/usbpro/RobeWidgetDetectorTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/RobeWidgetDetectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/RobeWidgetDetectorTest.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.o `test -f 'plugins/usbpro/RobeWidgetDetectorTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/RobeWidgetDetectorTest.cpp plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.obj: plugins/usbpro/RobeWidgetDetectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.obj `if test -f 'plugins/usbpro/RobeWidgetDetectorTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/RobeWidgetDetectorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/RobeWidgetDetectorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/RobeWidgetDetectorTest.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-RobeWidgetDetectorTest.obj `if test -f 'plugins/usbpro/RobeWidgetDetectorTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/RobeWidgetDetectorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/RobeWidgetDetectorTest.cpp'; fi` plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.o: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.obj: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.o: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.obj: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetDetectorTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.o: plugins/usbpro/RobeWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.o `test -f 'plugins/usbpro/RobeWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/RobeWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/RobeWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.o `test -f 'plugins/usbpro/RobeWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/RobeWidgetTest.cpp plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.obj: plugins/usbpro/RobeWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.obj `if test -f 'plugins/usbpro/RobeWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/RobeWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/RobeWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/RobeWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-RobeWidgetTest.obj `if test -f 'plugins/usbpro/RobeWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/RobeWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/RobeWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.o: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.obj: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.o: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.obj: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_RobeWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_RobeWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_RobeWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.o: plugins/usbpro/UltraDMXProWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.o `test -f 'plugins/usbpro/UltraDMXProWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/UltraDMXProWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/UltraDMXProWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.o `test -f 'plugins/usbpro/UltraDMXProWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/UltraDMXProWidgetTest.cpp plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.obj: plugins/usbpro/UltraDMXProWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.obj `if test -f 'plugins/usbpro/UltraDMXProWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/UltraDMXProWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/UltraDMXProWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/UltraDMXProWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-UltraDMXProWidgetTest.obj `if test -f 'plugins/usbpro/UltraDMXProWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/UltraDMXProWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/UltraDMXProWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.o: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.obj: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.o: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.obj: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UltraDMXProWidgetTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UltraDMXProWidgetTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.o: plugins/usbpro/UsbProWidgetDetectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.Tpo -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.o `test -f 'plugins/usbpro/UsbProWidgetDetectorTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/UsbProWidgetDetectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/UsbProWidgetDetectorTest.cpp' object='plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.o `test -f 'plugins/usbpro/UsbProWidgetDetectorTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/UsbProWidgetDetectorTest.cpp plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.obj: plugins/usbpro/UsbProWidgetDetectorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.Tpo -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.obj `if test -f 'plugins/usbpro/UsbProWidgetDetectorTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/UsbProWidgetDetectorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/UsbProWidgetDetectorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/UsbProWidgetDetectorTest.cpp' object='plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-UsbProWidgetDetectorTest.obj `if test -f 'plugins/usbpro/UsbProWidgetDetectorTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/UsbProWidgetDetectorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/UsbProWidgetDetectorTest.cpp'; fi` plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.o: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.obj: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.o: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.obj: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_UsbProWidgetDetectorTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_UsbProWidgetDetectorTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.o: plugins/usbpro/WidgetDetectorThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.Tpo -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.o `test -f 'plugins/usbpro/WidgetDetectorThreadTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/WidgetDetectorThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/WidgetDetectorThreadTest.cpp' object='plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.o `test -f 'plugins/usbpro/WidgetDetectorThreadTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/WidgetDetectorThreadTest.cpp plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.obj: plugins/usbpro/WidgetDetectorThreadTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.Tpo -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.obj `if test -f 'plugins/usbpro/WidgetDetectorThreadTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/WidgetDetectorThreadTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/WidgetDetectorThreadTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/WidgetDetectorThreadTest.cpp' object='plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-WidgetDetectorThreadTest.obj `if test -f 'plugins/usbpro/WidgetDetectorThreadTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/WidgetDetectorThreadTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/WidgetDetectorThreadTest.cpp'; fi` plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.o: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.o `test -f 'plugins/usbpro/CommonWidgetTest.cpp' || echo '$(srcdir)/'`plugins/usbpro/CommonWidgetTest.cpp plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.obj: plugins/usbpro/CommonWidgetTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.Tpo -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/CommonWidgetTest.cpp' object='plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-CommonWidgetTest.obj `if test -f 'plugins/usbpro/CommonWidgetTest.cpp'; then $(CYGPATH_W) 'plugins/usbpro/CommonWidgetTest.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/CommonWidgetTest.cpp'; fi` plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.o: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.o -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.o `test -f 'plugins/usbpro/MockEndpoint.cpp' || echo '$(srcdir)/'`plugins/usbpro/MockEndpoint.cpp plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.obj: plugins/usbpro/MockEndpoint.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -MT plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.obj -MD -MP -MF plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.Tpo -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.Tpo plugins/usbpro/$(DEPDIR)/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='plugins/usbpro/MockEndpoint.cpp' object='plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(plugins_usbpro_WidgetDetectorThreadTester_CXXFLAGS) $(CXXFLAGS) -c -o plugins/usbpro/plugins_usbpro_WidgetDetectorThreadTester-MockEndpoint.obj `if test -f 'plugins/usbpro/MockEndpoint.cpp'; then $(CYGPATH_W) 'plugins/usbpro/MockEndpoint.cpp'; else $(CYGPATH_W) '$(srcdir)/plugins/usbpro/MockEndpoint.cpp'; fi` protoc/protoc_ola_protoc_plugin-CppFileGenerator.o: protoc/CppFileGenerator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-CppFileGenerator.o -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppFileGenerator.Tpo -c -o protoc/protoc_ola_protoc_plugin-CppFileGenerator.o `test -f 'protoc/CppFileGenerator.cpp' || echo '$(srcdir)/'`protoc/CppFileGenerator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppFileGenerator.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppFileGenerator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/CppFileGenerator.cpp' object='protoc/protoc_ola_protoc_plugin-CppFileGenerator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-CppFileGenerator.o `test -f 'protoc/CppFileGenerator.cpp' || echo '$(srcdir)/'`protoc/CppFileGenerator.cpp protoc/protoc_ola_protoc_plugin-CppFileGenerator.obj: protoc/CppFileGenerator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-CppFileGenerator.obj -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppFileGenerator.Tpo -c -o protoc/protoc_ola_protoc_plugin-CppFileGenerator.obj `if test -f 'protoc/CppFileGenerator.cpp'; then $(CYGPATH_W) 'protoc/CppFileGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/CppFileGenerator.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppFileGenerator.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppFileGenerator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/CppFileGenerator.cpp' object='protoc/protoc_ola_protoc_plugin-CppFileGenerator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-CppFileGenerator.obj `if test -f 'protoc/CppFileGenerator.cpp'; then $(CYGPATH_W) 'protoc/CppFileGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/CppFileGenerator.cpp'; fi` protoc/protoc_ola_protoc_plugin-CppGenerator.o: protoc/CppGenerator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-CppGenerator.o -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppGenerator.Tpo -c -o protoc/protoc_ola_protoc_plugin-CppGenerator.o `test -f 'protoc/CppGenerator.cpp' || echo '$(srcdir)/'`protoc/CppGenerator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppGenerator.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppGenerator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/CppGenerator.cpp' object='protoc/protoc_ola_protoc_plugin-CppGenerator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-CppGenerator.o `test -f 'protoc/CppGenerator.cpp' || echo '$(srcdir)/'`protoc/CppGenerator.cpp protoc/protoc_ola_protoc_plugin-CppGenerator.obj: protoc/CppGenerator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-CppGenerator.obj -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppGenerator.Tpo -c -o protoc/protoc_ola_protoc_plugin-CppGenerator.obj `if test -f 'protoc/CppGenerator.cpp'; then $(CYGPATH_W) 'protoc/CppGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/CppGenerator.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppGenerator.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-CppGenerator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/CppGenerator.cpp' object='protoc/protoc_ola_protoc_plugin-CppGenerator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-CppGenerator.obj `if test -f 'protoc/CppGenerator.cpp'; then $(CYGPATH_W) 'protoc/CppGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/CppGenerator.cpp'; fi` protoc/protoc_ola_protoc_plugin-GeneratorHelpers.o: protoc/GeneratorHelpers.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-GeneratorHelpers.o -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-GeneratorHelpers.Tpo -c -o protoc/protoc_ola_protoc_plugin-GeneratorHelpers.o `test -f 'protoc/GeneratorHelpers.cpp' || echo '$(srcdir)/'`protoc/GeneratorHelpers.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-GeneratorHelpers.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-GeneratorHelpers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/GeneratorHelpers.cpp' object='protoc/protoc_ola_protoc_plugin-GeneratorHelpers.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-GeneratorHelpers.o `test -f 'protoc/GeneratorHelpers.cpp' || echo '$(srcdir)/'`protoc/GeneratorHelpers.cpp protoc/protoc_ola_protoc_plugin-GeneratorHelpers.obj: protoc/GeneratorHelpers.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-GeneratorHelpers.obj -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-GeneratorHelpers.Tpo -c -o protoc/protoc_ola_protoc_plugin-GeneratorHelpers.obj `if test -f 'protoc/GeneratorHelpers.cpp'; then $(CYGPATH_W) 'protoc/GeneratorHelpers.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/GeneratorHelpers.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-GeneratorHelpers.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-GeneratorHelpers.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/GeneratorHelpers.cpp' object='protoc/protoc_ola_protoc_plugin-GeneratorHelpers.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-GeneratorHelpers.obj `if test -f 'protoc/GeneratorHelpers.cpp'; then $(CYGPATH_W) 'protoc/GeneratorHelpers.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/GeneratorHelpers.cpp'; fi` protoc/protoc_ola_protoc_plugin-ServiceGenerator.o: protoc/ServiceGenerator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-ServiceGenerator.o -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ServiceGenerator.Tpo -c -o protoc/protoc_ola_protoc_plugin-ServiceGenerator.o `test -f 'protoc/ServiceGenerator.cpp' || echo '$(srcdir)/'`protoc/ServiceGenerator.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ServiceGenerator.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ServiceGenerator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/ServiceGenerator.cpp' object='protoc/protoc_ola_protoc_plugin-ServiceGenerator.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-ServiceGenerator.o `test -f 'protoc/ServiceGenerator.cpp' || echo '$(srcdir)/'`protoc/ServiceGenerator.cpp protoc/protoc_ola_protoc_plugin-ServiceGenerator.obj: protoc/ServiceGenerator.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-ServiceGenerator.obj -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ServiceGenerator.Tpo -c -o protoc/protoc_ola_protoc_plugin-ServiceGenerator.obj `if test -f 'protoc/ServiceGenerator.cpp'; then $(CYGPATH_W) 'protoc/ServiceGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/ServiceGenerator.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ServiceGenerator.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ServiceGenerator.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/ServiceGenerator.cpp' object='protoc/protoc_ola_protoc_plugin-ServiceGenerator.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-ServiceGenerator.obj `if test -f 'protoc/ServiceGenerator.cpp'; then $(CYGPATH_W) 'protoc/ServiceGenerator.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/ServiceGenerator.cpp'; fi` protoc/protoc_ola_protoc_plugin-StrUtil.o: protoc/StrUtil.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-StrUtil.o -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-StrUtil.Tpo -c -o protoc/protoc_ola_protoc_plugin-StrUtil.o `test -f 'protoc/StrUtil.cpp' || echo '$(srcdir)/'`protoc/StrUtil.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-StrUtil.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-StrUtil.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/StrUtil.cpp' object='protoc/protoc_ola_protoc_plugin-StrUtil.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-StrUtil.o `test -f 'protoc/StrUtil.cpp' || echo '$(srcdir)/'`protoc/StrUtil.cpp protoc/protoc_ola_protoc_plugin-StrUtil.obj: protoc/StrUtil.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-StrUtil.obj -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-StrUtil.Tpo -c -o protoc/protoc_ola_protoc_plugin-StrUtil.obj `if test -f 'protoc/StrUtil.cpp'; then $(CYGPATH_W) 'protoc/StrUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/StrUtil.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-StrUtil.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-StrUtil.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/StrUtil.cpp' object='protoc/protoc_ola_protoc_plugin-StrUtil.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-StrUtil.obj `if test -f 'protoc/StrUtil.cpp'; then $(CYGPATH_W) 'protoc/StrUtil.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/StrUtil.cpp'; fi` protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.o: protoc/ola-protoc-generator-plugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.o -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.Tpo -c -o protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.o `test -f 'protoc/ola-protoc-generator-plugin.cpp' || echo '$(srcdir)/'`protoc/ola-protoc-generator-plugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/ola-protoc-generator-plugin.cpp' object='protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.o `test -f 'protoc/ola-protoc-generator-plugin.cpp' || echo '$(srcdir)/'`protoc/ola-protoc-generator-plugin.cpp protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.obj: protoc/ola-protoc-generator-plugin.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -MT protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.obj -MD -MP -MF protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.Tpo -c -o protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.obj `if test -f 'protoc/ola-protoc-generator-plugin.cpp'; then $(CYGPATH_W) 'protoc/ola-protoc-generator-plugin.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/ola-protoc-generator-plugin.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.Tpo protoc/$(DEPDIR)/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='protoc/ola-protoc-generator-plugin.cpp' object='protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(protoc_ola_protoc_plugin_CXXFLAGS) $(CXXFLAGS) -c -o protoc/protoc_ola_protoc_plugin-ola-protoc-generator-plugin.obj `if test -f 'protoc/ola-protoc-generator-plugin.cpp'; then $(CYGPATH_W) 'protoc/ola-protoc-generator-plugin.cpp'; else $(CYGPATH_W) '$(srcdir)/protoc/ola-protoc-generator-plugin.cpp'; fi` tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.o: tools/ja-rule/USBDeviceManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_CXXFLAGS) $(CXXFLAGS) -MT tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.o -MD -MP -MF tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-USBDeviceManager.Tpo -c -o tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.o `test -f 'tools/ja-rule/USBDeviceManager.cpp' || echo '$(srcdir)/'`tools/ja-rule/USBDeviceManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-USBDeviceManager.Tpo tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-USBDeviceManager.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ja-rule/USBDeviceManager.cpp' object='tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_CXXFLAGS) $(CXXFLAGS) -c -o tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.o `test -f 'tools/ja-rule/USBDeviceManager.cpp' || echo '$(srcdir)/'`tools/ja-rule/USBDeviceManager.cpp tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.obj: tools/ja-rule/USBDeviceManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_CXXFLAGS) $(CXXFLAGS) -MT tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.obj -MD -MP -MF tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-USBDeviceManager.Tpo -c -o tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.obj `if test -f 'tools/ja-rule/USBDeviceManager.cpp'; then $(CYGPATH_W) 'tools/ja-rule/USBDeviceManager.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ja-rule/USBDeviceManager.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-USBDeviceManager.Tpo tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-USBDeviceManager.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ja-rule/USBDeviceManager.cpp' object='tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_CXXFLAGS) $(CXXFLAGS) -c -o tools/ja-rule/tools_ja_rule_ja_rule-USBDeviceManager.obj `if test -f 'tools/ja-rule/USBDeviceManager.cpp'; then $(CYGPATH_W) 'tools/ja-rule/USBDeviceManager.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ja-rule/USBDeviceManager.cpp'; fi` tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.o: tools/ja-rule/ja-rule.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_CXXFLAGS) $(CXXFLAGS) -MT tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.o -MD -MP -MF tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-ja-rule.Tpo -c -o tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.o `test -f 'tools/ja-rule/ja-rule.cpp' || echo '$(srcdir)/'`tools/ja-rule/ja-rule.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-ja-rule.Tpo tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-ja-rule.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ja-rule/ja-rule.cpp' object='tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_CXXFLAGS) $(CXXFLAGS) -c -o tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.o `test -f 'tools/ja-rule/ja-rule.cpp' || echo '$(srcdir)/'`tools/ja-rule/ja-rule.cpp tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.obj: tools/ja-rule/ja-rule.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_CXXFLAGS) $(CXXFLAGS) -MT tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.obj -MD -MP -MF tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-ja-rule.Tpo -c -o tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.obj `if test -f 'tools/ja-rule/ja-rule.cpp'; then $(CYGPATH_W) 'tools/ja-rule/ja-rule.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ja-rule/ja-rule.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-ja-rule.Tpo tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule-ja-rule.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ja-rule/ja-rule.cpp' object='tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_CXXFLAGS) $(CXXFLAGS) -c -o tools/ja-rule/tools_ja_rule_ja_rule-ja-rule.obj `if test -f 'tools/ja-rule/ja-rule.cpp'; then $(CYGPATH_W) 'tools/ja-rule/ja-rule.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ja-rule/ja-rule.cpp'; fi` tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.o: tools/ja-rule/USBDeviceManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_controller_CXXFLAGS) $(CXXFLAGS) -MT tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.o -MD -MP -MF tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-USBDeviceManager.Tpo -c -o tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.o `test -f 'tools/ja-rule/USBDeviceManager.cpp' || echo '$(srcdir)/'`tools/ja-rule/USBDeviceManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-USBDeviceManager.Tpo tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-USBDeviceManager.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ja-rule/USBDeviceManager.cpp' object='tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_controller_CXXFLAGS) $(CXXFLAGS) -c -o tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.o `test -f 'tools/ja-rule/USBDeviceManager.cpp' || echo '$(srcdir)/'`tools/ja-rule/USBDeviceManager.cpp tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.obj: tools/ja-rule/USBDeviceManager.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_controller_CXXFLAGS) $(CXXFLAGS) -MT tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.obj -MD -MP -MF tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-USBDeviceManager.Tpo -c -o tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.obj `if test -f 'tools/ja-rule/USBDeviceManager.cpp'; then $(CYGPATH_W) 'tools/ja-rule/USBDeviceManager.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ja-rule/USBDeviceManager.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-USBDeviceManager.Tpo tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-USBDeviceManager.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ja-rule/USBDeviceManager.cpp' object='tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_controller_CXXFLAGS) $(CXXFLAGS) -c -o tools/ja-rule/tools_ja_rule_ja_rule_controller-USBDeviceManager.obj `if test -f 'tools/ja-rule/USBDeviceManager.cpp'; then $(CYGPATH_W) 'tools/ja-rule/USBDeviceManager.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ja-rule/USBDeviceManager.cpp'; fi` tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.o: tools/ja-rule/ja-rule-controller.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_controller_CXXFLAGS) $(CXXFLAGS) -MT tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.o -MD -MP -MF tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-ja-rule-controller.Tpo -c -o tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.o `test -f 'tools/ja-rule/ja-rule-controller.cpp' || echo '$(srcdir)/'`tools/ja-rule/ja-rule-controller.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-ja-rule-controller.Tpo tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-ja-rule-controller.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ja-rule/ja-rule-controller.cpp' object='tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_controller_CXXFLAGS) $(CXXFLAGS) -c -o tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.o `test -f 'tools/ja-rule/ja-rule-controller.cpp' || echo '$(srcdir)/'`tools/ja-rule/ja-rule-controller.cpp tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.obj: tools/ja-rule/ja-rule-controller.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_controller_CXXFLAGS) $(CXXFLAGS) -MT tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.obj -MD -MP -MF tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-ja-rule-controller.Tpo -c -o tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.obj `if test -f 'tools/ja-rule/ja-rule-controller.cpp'; then $(CYGPATH_W) 'tools/ja-rule/ja-rule-controller.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ja-rule/ja-rule-controller.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-ja-rule-controller.Tpo tools/ja-rule/$(DEPDIR)/tools_ja_rule_ja_rule_controller-ja-rule-controller.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ja-rule/ja-rule-controller.cpp' object='tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ja_rule_ja_rule_controller_CXXFLAGS) $(CXXFLAGS) -c -o tools/ja-rule/tools_ja_rule_ja_rule_controller-ja-rule-controller.obj `if test -f 'tools/ja-rule/ja-rule-controller.cpp'; then $(CYGPATH_W) 'tools/ja-rule/ja-rule-controller.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ja-rule/ja-rule-controller.cpp'; fi` tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.o: tools/ola_trigger/ActionTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.o -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ActionTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.o `test -f 'tools/ola_trigger/ActionTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/ActionTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ActionTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ActionTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/ActionTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.o `test -f 'tools/ola_trigger/ActionTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/ActionTest.cpp tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.obj: tools/ola_trigger/ActionTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.obj -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ActionTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.obj `if test -f 'tools/ola_trigger/ActionTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/ActionTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/ActionTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ActionTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ActionTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/ActionTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-ActionTest.obj `if test -f 'tools/ola_trigger/ActionTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/ActionTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/ActionTest.cpp'; fi` tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.o: tools/ola_trigger/ContextTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.o -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ContextTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.o `test -f 'tools/ola_trigger/ContextTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/ContextTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ContextTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ContextTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/ContextTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.o `test -f 'tools/ola_trigger/ContextTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/ContextTest.cpp tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.obj: tools/ola_trigger/ContextTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.obj -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ContextTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.obj `if test -f 'tools/ola_trigger/ContextTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/ContextTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/ContextTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ContextTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-ContextTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/ContextTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-ContextTest.obj `if test -f 'tools/ola_trigger/ContextTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/ContextTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/ContextTest.cpp'; fi` tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.o: tools/ola_trigger/DMXTriggerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.o -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-DMXTriggerTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.o `test -f 'tools/ola_trigger/DMXTriggerTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/DMXTriggerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-DMXTriggerTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-DMXTriggerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/DMXTriggerTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.o `test -f 'tools/ola_trigger/DMXTriggerTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/DMXTriggerTest.cpp tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.obj: tools/ola_trigger/DMXTriggerTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.obj -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-DMXTriggerTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.obj `if test -f 'tools/ola_trigger/DMXTriggerTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/DMXTriggerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/DMXTriggerTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-DMXTriggerTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-DMXTriggerTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/DMXTriggerTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-DMXTriggerTest.obj `if test -f 'tools/ola_trigger/DMXTriggerTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/DMXTriggerTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/DMXTriggerTest.cpp'; fi` tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.o: tools/ola_trigger/IntervalTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.o -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-IntervalTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.o `test -f 'tools/ola_trigger/IntervalTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/IntervalTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-IntervalTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-IntervalTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/IntervalTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.o `test -f 'tools/ola_trigger/IntervalTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/IntervalTest.cpp tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.obj: tools/ola_trigger/IntervalTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.obj -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-IntervalTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.obj `if test -f 'tools/ola_trigger/IntervalTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/IntervalTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/IntervalTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-IntervalTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-IntervalTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/IntervalTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-IntervalTest.obj `if test -f 'tools/ola_trigger/IntervalTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/IntervalTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/IntervalTest.cpp'; fi` tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.o: tools/ola_trigger/SlotTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.o -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-SlotTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.o `test -f 'tools/ola_trigger/SlotTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/SlotTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-SlotTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-SlotTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/SlotTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.o `test -f 'tools/ola_trigger/SlotTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/SlotTest.cpp tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.obj: tools/ola_trigger/SlotTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.obj -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-SlotTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.obj `if test -f 'tools/ola_trigger/SlotTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/SlotTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/SlotTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-SlotTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-SlotTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/SlotTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-SlotTest.obj `if test -f 'tools/ola_trigger/SlotTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/SlotTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/SlotTest.cpp'; fi` tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.o: tools/ola_trigger/VariableInterpolatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.o -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-VariableInterpolatorTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.o `test -f 'tools/ola_trigger/VariableInterpolatorTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/VariableInterpolatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-VariableInterpolatorTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-VariableInterpolatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/VariableInterpolatorTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.o `test -f 'tools/ola_trigger/VariableInterpolatorTest.cpp' || echo '$(srcdir)/'`tools/ola_trigger/VariableInterpolatorTest.cpp tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.obj: tools/ola_trigger/VariableInterpolatorTest.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.obj -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-VariableInterpolatorTest.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.obj `if test -f 'tools/ola_trigger/VariableInterpolatorTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/VariableInterpolatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/VariableInterpolatorTest.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-VariableInterpolatorTest.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ActionTester-VariableInterpolatorTest.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/VariableInterpolatorTest.cpp' object='tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ActionTester_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ActionTester-VariableInterpolatorTest.obj `if test -f 'tools/ola_trigger/VariableInterpolatorTest.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/VariableInterpolatorTest.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/VariableInterpolatorTest.cpp'; fi` tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.o: tools/ola_trigger/ParserActions.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.o -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ParserActions.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.o `test -f 'tools/ola_trigger/ParserActions.cpp' || echo '$(srcdir)/'`tools/ola_trigger/ParserActions.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ParserActions.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ParserActions.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/ParserActions.cpp' object='tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.o `test -f 'tools/ola_trigger/ParserActions.cpp' || echo '$(srcdir)/'`tools/ola_trigger/ParserActions.cpp tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.obj: tools/ola_trigger/ParserActions.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.obj -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ParserActions.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.obj `if test -f 'tools/ola_trigger/ParserActions.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/ParserActions.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/ParserActions.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ParserActions.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ParserActions.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/ParserActions.cpp' object='tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-ParserActions.obj `if test -f 'tools/ola_trigger/ParserActions.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/ParserActions.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/ParserActions.cpp'; fi` tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.o: tools/ola_trigger/ola-trigger.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.o -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ola-trigger.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.o `test -f 'tools/ola_trigger/ola-trigger.cpp' || echo '$(srcdir)/'`tools/ola_trigger/ola-trigger.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ola-trigger.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ola-trigger.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/ola-trigger.cpp' object='tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.o `test -f 'tools/ola_trigger/ola-trigger.cpp' || echo '$(srcdir)/'`tools/ola_trigger/ola-trigger.cpp tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.obj: tools/ola_trigger/ola-trigger.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.obj -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ola-trigger.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.obj `if test -f 'tools/ola_trigger/ola-trigger.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/ola-trigger.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/ola-trigger.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ola-trigger.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-ola-trigger.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/ola-trigger.cpp' object='tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-ola-trigger.obj `if test -f 'tools/ola_trigger/ola-trigger.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/ola-trigger.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/ola-trigger.cpp'; fi` tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.o: tools/ola_trigger/config.tab.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.o -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-config.tab.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.o `test -f 'tools/ola_trigger/config.tab.cpp' || echo '$(srcdir)/'`tools/ola_trigger/config.tab.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-config.tab.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-config.tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/config.tab.cpp' object='tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.o `test -f 'tools/ola_trigger/config.tab.cpp' || echo '$(srcdir)/'`tools/ola_trigger/config.tab.cpp tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.obj: tools/ola_trigger/config.tab.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.obj -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-config.tab.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.obj `if test -f 'tools/ola_trigger/config.tab.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/config.tab.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/config.tab.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-config.tab.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-config.tab.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/config.tab.cpp' object='tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-config.tab.obj `if test -f 'tools/ola_trigger/config.tab.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/config.tab.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/config.tab.cpp'; fi` tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.o: tools/ola_trigger/lex.yy.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.o -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-lex.yy.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.o `test -f 'tools/ola_trigger/lex.yy.cpp' || echo '$(srcdir)/'`tools/ola_trigger/lex.yy.cpp @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-lex.yy.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-lex.yy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/lex.yy.cpp' object='tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.o `test -f 'tools/ola_trigger/lex.yy.cpp' || echo '$(srcdir)/'`tools/ola_trigger/lex.yy.cpp tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.obj: tools/ola_trigger/lex.yy.cpp @am__fastdepCXX_TRUE@ $(AM_V_CXX)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -MT tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.obj -MD -MP -MF tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-lex.yy.Tpo -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.obj `if test -f 'tools/ola_trigger/lex.yy.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/lex.yy.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/lex.yy.cpp'; fi` @am__fastdepCXX_TRUE@ $(AM_V_at)$(am__mv) tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-lex.yy.Tpo tools/ola_trigger/$(DEPDIR)/tools_ola_trigger_ola_trigger-lex.yy.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='tools/ola_trigger/lex.yy.cpp' object='tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(tools_ola_trigger_ola_trigger_CXXFLAGS) $(CXXFLAGS) -c -o tools/ola_trigger/tools_ola_trigger_ola_trigger-lex.yy.obj `if test -f 'tools/ola_trigger/lex.yy.cpp'; then $(CYGPATH_W) 'tools/ola_trigger/lex.yy.cpp'; else $(CYGPATH_W) '$(srcdir)/tools/ola_trigger/lex.yy.cpp'; fi` .cpp.o: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ $< .cpp.obj: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCXX_TRUE@ $(CXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(CXXCOMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .cpp.lo: @am__fastdepCXX_TRUE@ $(AM_V_CXX)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCXX_TRUE@ $(LTCXXCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCXX_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCXX_FALSE@ $(AM_V_CXX)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCXX_FALSE@ DEPDIR=$(DEPDIR) $(CXXDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCXX_FALSE@ $(AM_V_CXX@am__nodep@)$(LTCXXCOMPILE) -c -o $@ $< mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf common/.libs common/_libs -rm -rf common/base/.libs common/base/_libs -rm -rf common/dmx/.libs common/dmx/_libs -rm -rf common/export_map/.libs common/export_map/_libs -rm -rf common/file/.libs common/file/_libs -rm -rf common/http/.libs common/http/_libs -rm -rf common/io/.libs common/io/_libs -rm -rf common/math/.libs common/math/_libs -rm -rf common/messaging/.libs common/messaging/_libs -rm -rf common/network/.libs common/network/_libs -rm -rf common/protocol/.libs common/protocol/_libs -rm -rf common/rdm/.libs common/rdm/_libs -rm -rf common/rpc/.libs common/rpc/_libs -rm -rf common/strings/.libs common/strings/_libs -rm -rf common/system/.libs common/system/_libs -rm -rf common/testing/.libs common/testing/_libs -rm -rf common/thread/.libs common/thread/_libs -rm -rf common/timecode/.libs common/timecode/_libs -rm -rf common/utils/.libs common/utils/_libs -rm -rf common/web/.libs common/web/_libs -rm -rf data/rdm/.libs data/rdm/_libs -rm -rf doxygen/examples/.libs doxygen/examples/_libs -rm -rf examples/.libs examples/_libs -rm -rf libs/acn/.libs libs/acn/_libs -rm -rf libs/usb/.libs libs/usb/_libs -rm -rf ola/.libs ola/_libs -rm -rf olad/.libs olad/_libs -rm -rf olad/plugin_api/.libs olad/plugin_api/_libs -rm -rf plugins/artnet/.libs plugins/artnet/_libs -rm -rf plugins/artnet/messages/.libs plugins/artnet/messages/_libs -rm -rf plugins/dmx4linux/.libs plugins/dmx4linux/_libs -rm -rf plugins/dummy/.libs plugins/dummy/_libs -rm -rf plugins/e131/.libs plugins/e131/_libs -rm -rf plugins/e131/messages/.libs plugins/e131/messages/_libs -rm -rf plugins/espnet/.libs plugins/espnet/_libs -rm -rf plugins/ftdidmx/.libs plugins/ftdidmx/_libs -rm -rf plugins/gpio/.libs plugins/gpio/_libs -rm -rf plugins/karate/.libs plugins/karate/_libs -rm -rf plugins/kinet/.libs plugins/kinet/_libs -rm -rf plugins/milinst/.libs plugins/milinst/_libs -rm -rf plugins/opendmx/.libs plugins/opendmx/_libs -rm -rf plugins/openpixelcontrol/.libs plugins/openpixelcontrol/_libs -rm -rf plugins/osc/.libs plugins/osc/_libs -rm -rf plugins/pathport/.libs plugins/pathport/_libs -rm -rf plugins/renard/.libs plugins/renard/_libs -rm -rf plugins/sandnet/.libs plugins/sandnet/_libs -rm -rf plugins/shownet/.libs plugins/shownet/_libs -rm -rf plugins/spi/.libs plugins/spi/_libs -rm -rf plugins/stageprofi/.libs plugins/stageprofi/_libs -rm -rf plugins/uartdmx/.libs plugins/uartdmx/_libs -rm -rf plugins/usbdmx/.libs plugins/usbdmx/_libs -rm -rf plugins/usbpro/.libs plugins/usbpro/_libs -rm -rf plugins/usbpro/messages/.libs plugins/usbpro/messages/_libs -rm -rf protoc/.libs protoc/_libs -rm -rf tools/e133/.libs tools/e133/_libs -rm -rf tools/ja-rule/.libs tools/ja-rule/_libs -rm -rf tools/logic/.libs tools/logic/_libs -rm -rf tools/ola_trigger/.libs tools/ola_trigger/_libs -rm -rf tools/rdmpro/.libs tools/rdmpro/_libs -rm -rf tools/usbpro/.libs tools/usbpro/_libs distclean-libtool: -rm -f libtool config.lt install-nodist_pkgpythonPYTHON: $(nodist_pkgpython_PYTHON) @$(NORMAL_INSTALL) @list='$(nodist_pkgpython_PYTHON)'; dlist=; list2=; test -n "$(pkgpythondir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgpythondir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgpythondir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgpythondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgpythondir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ $(am__py_compile) --destdir "$(DESTDIR)" \ --basedir "$(pkgpythondir)" $$dlist; \ else :; fi uninstall-nodist_pkgpythonPYTHON: @$(NORMAL_UNINSTALL) @list='$(nodist_pkgpython_PYTHON)'; test -n "$(pkgpythondir)" || list=; \ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$py_files" || exit 0; \ dir='$(DESTDIR)$(pkgpythondir)'; \ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ echo "$$py_files_pep3147";\ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ st=0; \ for files in \ "$$py_files" \ "$$pyc_files" \ "$$pyo_files" \ "$$pyc_files_pep3147" \ "$$pyo_files_pep3147" \ ; do \ $(am__uninstall_files_from_dir) || st=$$?; \ done; \ exit $$st install-nodist_rdmtestsPYTHON: $(nodist_rdmtests_PYTHON) @$(NORMAL_INSTALL) @list='$(nodist_rdmtests_PYTHON)'; dlist=; list2=; test -n "$(rdmtestsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(rdmtestsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(rdmtestsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rdmtestsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(rdmtestsdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ $(am__py_compile) --destdir "$(DESTDIR)" \ --basedir "$(rdmtestsdir)" $$dlist; \ else :; fi uninstall-nodist_rdmtestsPYTHON: @$(NORMAL_UNINSTALL) @list='$(nodist_rdmtests_PYTHON)'; test -n "$(rdmtestsdir)" || list=; \ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$py_files" || exit 0; \ dir='$(DESTDIR)$(rdmtestsdir)'; \ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ echo "$$py_files_pep3147";\ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ st=0; \ for files in \ "$$py_files" \ "$$pyc_files" \ "$$pyo_files" \ "$$pyc_files_pep3147" \ "$$pyo_files_pep3147" \ ; do \ $(am__uninstall_files_from_dir) || st=$$?; \ done; \ exit $$st install-nodist_rpcpythonPYTHON: $(nodist_rpcpython_PYTHON) @$(NORMAL_INSTALL) @list='$(nodist_rpcpython_PYTHON)'; dlist=; list2=; test -n "$(rpcpythondir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(rpcpythondir)'"; \ $(MKDIR_P) "$(DESTDIR)$(rpcpythondir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rpcpythondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(rpcpythondir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ $(am__py_compile) --destdir "$(DESTDIR)" \ --basedir "$(rpcpythondir)" $$dlist; \ else :; fi uninstall-nodist_rpcpythonPYTHON: @$(NORMAL_UNINSTALL) @list='$(nodist_rpcpython_PYTHON)'; test -n "$(rpcpythondir)" || list=; \ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$py_files" || exit 0; \ dir='$(DESTDIR)$(rpcpythondir)'; \ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ echo "$$py_files_pep3147";\ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ st=0; \ for files in \ "$$py_files" \ "$$pyc_files" \ "$$pyo_files" \ "$$pyc_files_pep3147" \ "$$pyo_files_pep3147" \ ; do \ $(am__uninstall_files_from_dir) || st=$$?; \ done; \ exit $$st install-pkgpythonPYTHON: $(pkgpython_PYTHON) @$(NORMAL_INSTALL) @list='$(pkgpython_PYTHON)'; dlist=; list2=; test -n "$(pkgpythondir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgpythondir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgpythondir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgpythondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgpythondir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ $(am__py_compile) --destdir "$(DESTDIR)" \ --basedir "$(pkgpythondir)" $$dlist; \ else :; fi uninstall-pkgpythonPYTHON: @$(NORMAL_UNINSTALL) @list='$(pkgpython_PYTHON)'; test -n "$(pkgpythondir)" || list=; \ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$py_files" || exit 0; \ dir='$(DESTDIR)$(pkgpythondir)'; \ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ echo "$$py_files_pep3147";\ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ st=0; \ for files in \ "$$py_files" \ "$$pyc_files" \ "$$pyo_files" \ "$$pyc_files_pep3147" \ "$$pyo_files_pep3147" \ ; do \ $(am__uninstall_files_from_dir) || st=$$?; \ done; \ exit $$st install-rdminitPYTHON: $(rdminit_PYTHON) @$(NORMAL_INSTALL) @list='$(rdminit_PYTHON)'; dlist=; list2=; test -n "$(rdminitdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(rdminitdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(rdminitdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rdminitdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(rdminitdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ $(am__py_compile) --destdir "$(DESTDIR)" \ --basedir "$(rdminitdir)" $$dlist; \ else :; fi uninstall-rdminitPYTHON: @$(NORMAL_UNINSTALL) @list='$(rdminit_PYTHON)'; test -n "$(rdminitdir)" || list=; \ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$py_files" || exit 0; \ dir='$(DESTDIR)$(rdminitdir)'; \ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ echo "$$py_files_pep3147";\ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ st=0; \ for files in \ "$$py_files" \ "$$pyc_files" \ "$$pyo_files" \ "$$pyc_files_pep3147" \ "$$pyo_files_pep3147" \ ; do \ $(am__uninstall_files_from_dir) || st=$$?; \ done; \ exit $$st install-rdmtestsPYTHON: $(rdmtests_PYTHON) @$(NORMAL_INSTALL) @list='$(rdmtests_PYTHON)'; dlist=; list2=; test -n "$(rdmtestsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(rdmtestsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(rdmtestsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rdmtestsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(rdmtestsdir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ $(am__py_compile) --destdir "$(DESTDIR)" \ --basedir "$(rdmtestsdir)" $$dlist; \ else :; fi uninstall-rdmtestsPYTHON: @$(NORMAL_UNINSTALL) @list='$(rdmtests_PYTHON)'; test -n "$(rdmtestsdir)" || list=; \ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$py_files" || exit 0; \ dir='$(DESTDIR)$(rdmtestsdir)'; \ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ echo "$$py_files_pep3147";\ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ st=0; \ for files in \ "$$py_files" \ "$$pyc_files" \ "$$pyo_files" \ "$$pyc_files_pep3147" \ "$$pyo_files_pep3147" \ ; do \ $(am__uninstall_files_from_dir) || st=$$?; \ done; \ exit $$st install-rpcpythonPYTHON: $(rpcpython_PYTHON) @$(NORMAL_INSTALL) @list='$(rpcpython_PYTHON)'; dlist=; list2=; test -n "$(rpcpythondir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(rpcpythondir)'"; \ $(MKDIR_P) "$(DESTDIR)$(rpcpythondir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then b=; else b="$(srcdir)/"; fi; \ if test -f $$b$$p; then \ $(am__strip_dir) \ dlist="$$dlist $$f"; \ list2="$$list2 $$b$$p"; \ else :; fi; \ done; \ for file in $$list2; do echo $$file; done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(rpcpythondir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(rpcpythondir)" || exit $$?; \ done || exit $$?; \ if test -n "$$dlist"; then \ $(am__py_compile) --destdir "$(DESTDIR)" \ --basedir "$(rpcpythondir)" $$dlist; \ else :; fi uninstall-rpcpythonPYTHON: @$(NORMAL_UNINSTALL) @list='$(rpcpython_PYTHON)'; test -n "$(rpcpythondir)" || list=; \ py_files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ test -n "$$py_files" || exit 0; \ dir='$(DESTDIR)$(rpcpythondir)'; \ pyc_files=`echo "$$py_files" | sed 's|$$|c|'`; \ pyo_files=`echo "$$py_files" | sed 's|$$|o|'`; \ py_files_pep3147=`echo "$$py_files" | $(am__pep3147_tweak)`; \ echo "$$py_files_pep3147";\ pyc_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|c|'`; \ pyo_files_pep3147=`echo "$$py_files_pep3147" | sed 's|$$|o|'`; \ st=0; \ for files in \ "$$py_files" \ "$$pyc_files" \ "$$pyo_files" \ "$$pyc_files_pep3147" \ "$$pyo_files_pep3147" \ ; do \ $(am__uninstall_files_from_dir) || st=$$?; \ done; \ exit $$st install-man1: $(dist_man_MANS) @$(NORMAL_INSTALL) @list1=''; \ list2='$(dist_man_MANS)'; \ test -n "$(man1dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man1dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man1dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.1[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man1dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man1dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man1dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man1dir)" || exit $$?; }; \ done; } uninstall-man1: @$(NORMAL_UNINSTALL) @list=''; test -n "$(man1dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ l2='$(dist_man_MANS)'; for i in $$l2; do echo "$$i"; done | \ sed -n '/\.1[a-z]*$$/p'; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^1][0-9a-z]*$$,1,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man1dir)'; $(am__uninstall_files_from_dir) install-dist_angularDATA: $(dist_angular_DATA) @$(NORMAL_INSTALL) @list='$(dist_angular_DATA)'; test -n "$(angulardir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(angulardir)'"; \ $(MKDIR_P) "$(DESTDIR)$(angulardir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(angulardir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(angulardir)" || exit $$?; \ done uninstall-dist_angularDATA: @$(NORMAL_UNINSTALL) @list='$(dist_angular_DATA)'; test -n "$(angulardir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(angulardir)'; $(am__uninstall_files_from_dir) install-dist_angularrouteDATA: $(dist_angularroute_DATA) @$(NORMAL_INSTALL) @list='$(dist_angularroute_DATA)'; test -n "$(angularroutedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(angularroutedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(angularroutedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(angularroutedir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(angularroutedir)" || exit $$?; \ done uninstall-dist_angularrouteDATA: @$(NORMAL_UNINSTALL) @list='$(dist_angularroute_DATA)'; test -n "$(angularroutedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(angularroutedir)'; $(am__uninstall_files_from_dir) install-dist_bootcssDATA: $(dist_bootcss_DATA) @$(NORMAL_INSTALL) @list='$(dist_bootcss_DATA)'; test -n "$(bootcssdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bootcssdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bootcssdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bootcssdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(bootcssdir)" || exit $$?; \ done uninstall-dist_bootcssDATA: @$(NORMAL_UNINSTALL) @list='$(dist_bootcss_DATA)'; test -n "$(bootcssdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(bootcssdir)'; $(am__uninstall_files_from_dir) install-dist_bootfontsDATA: $(dist_bootfonts_DATA) @$(NORMAL_INSTALL) @list='$(dist_bootfonts_DATA)'; test -n "$(bootfontsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bootfontsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bootfontsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bootfontsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(bootfontsdir)" || exit $$?; \ done uninstall-dist_bootfontsDATA: @$(NORMAL_UNINSTALL) @list='$(dist_bootfonts_DATA)'; test -n "$(bootfontsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(bootfontsdir)'; $(am__uninstall_files_from_dir) install-dist_bootjsDATA: $(dist_bootjs_DATA) @$(NORMAL_INSTALL) @list='$(dist_bootjs_DATA)'; test -n "$(bootjsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(bootjsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(bootjsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(bootjsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(bootjsdir)" || exit $$?; \ done uninstall-dist_bootjsDATA: @$(NORMAL_UNINSTALL) @list='$(dist_bootjs_DATA)'; test -n "$(bootjsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(bootjsdir)'; $(am__uninstall_files_from_dir) install-dist_cssDATA: $(dist_css_DATA) @$(NORMAL_INSTALL) @list='$(dist_css_DATA)'; test -n "$(cssdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(cssdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(cssdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(cssdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(cssdir)" || exit $$?; \ done uninstall-dist_cssDATA: @$(NORMAL_UNINSTALL) @list='$(dist_css_DATA)'; test -n "$(cssdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(cssdir)'; $(am__uninstall_files_from_dir) install-dist_imgDATA: $(dist_img_DATA) @$(NORMAL_INSTALL) @list='$(dist_img_DATA)'; test -n "$(imgdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(imgdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(imgdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(imgdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(imgdir)" || exit $$?; \ done uninstall-dist_imgDATA: @$(NORMAL_UNINSTALL) @list='$(dist_img_DATA)'; test -n "$(imgdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(imgdir)'; $(am__uninstall_files_from_dir) install-dist_jqueryDATA: $(dist_jquery_DATA) @$(NORMAL_INSTALL) @list='$(dist_jquery_DATA)'; test -n "$(jquerydir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(jquerydir)'"; \ $(MKDIR_P) "$(DESTDIR)$(jquerydir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(jquerydir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(jquerydir)" || exit $$?; \ done uninstall-dist_jqueryDATA: @$(NORMAL_UNINSTALL) @list='$(dist_jquery_DATA)'; test -n "$(jquerydir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(jquerydir)'; $(am__uninstall_files_from_dir) install-dist_jsDATA: $(dist_js_DATA) @$(NORMAL_INSTALL) @list='$(dist_js_DATA)'; test -n "$(jsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(jsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(jsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(jsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(jsdir)" || exit $$?; \ done uninstall-dist_jsDATA: @$(NORMAL_UNINSTALL) @list='$(dist_js_DATA)'; test -n "$(jsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(jsdir)'; $(am__uninstall_files_from_dir) install-dist_newDATA: $(dist_new_DATA) @$(NORMAL_INSTALL) @list='$(dist_new_DATA)'; test -n "$(newdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(newdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(newdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(newdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(newdir)" || exit $$?; \ done uninstall-dist_newDATA: @$(NORMAL_UNINSTALL) @list='$(dist_new_DATA)'; test -n "$(newdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(newdir)'; $(am__uninstall_files_from_dir) install-dist_piddataDATA: $(dist_piddata_DATA) @$(NORMAL_INSTALL) @list='$(dist_piddata_DATA)'; test -n "$(piddatadir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(piddatadir)'"; \ $(MKDIR_P) "$(DESTDIR)$(piddatadir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(piddatadir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(piddatadir)" || exit $$?; \ done uninstall-dist_piddataDATA: @$(NORMAL_UNINSTALL) @list='$(dist_piddata_DATA)'; test -n "$(piddatadir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(piddatadir)'; $(am__uninstall_files_from_dir) install-dist_tools_rdm_testserver_imagesDATA: $(dist_tools_rdm_testserver_images_DATA) @$(NORMAL_INSTALL) @list='$(dist_tools_rdm_testserver_images_DATA)'; test -n "$(tools_rdm_testserver_imagesdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(tools_rdm_testserver_imagesdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(tools_rdm_testserver_imagesdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tools_rdm_testserver_imagesdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(tools_rdm_testserver_imagesdir)" || exit $$?; \ done uninstall-dist_tools_rdm_testserver_imagesDATA: @$(NORMAL_UNINSTALL) @list='$(dist_tools_rdm_testserver_images_DATA)'; test -n "$(tools_rdm_testserver_imagesdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(tools_rdm_testserver_imagesdir)'; $(am__uninstall_files_from_dir) install-dist_tools_rdm_testserver_staticDATA: $(dist_tools_rdm_testserver_static_DATA) @$(NORMAL_INSTALL) @list='$(dist_tools_rdm_testserver_static_DATA)'; test -n "$(tools_rdm_testserver_staticdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(tools_rdm_testserver_staticdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(tools_rdm_testserver_staticdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(tools_rdm_testserver_staticdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(tools_rdm_testserver_staticdir)" || exit $$?; \ done uninstall-dist_tools_rdm_testserver_staticDATA: @$(NORMAL_UNINSTALL) @list='$(dist_tools_rdm_testserver_static_DATA)'; test -n "$(tools_rdm_testserver_staticdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(tools_rdm_testserver_staticdir)'; $(am__uninstall_files_from_dir) install-dist_viewsDATA: $(dist_views_DATA) @$(NORMAL_INSTALL) @list='$(dist_views_DATA)'; test -n "$(viewsdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(viewsdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(viewsdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(viewsdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(viewsdir)" || exit $$?; \ done uninstall-dist_viewsDATA: @$(NORMAL_UNINSTALL) @list='$(dist_views_DATA)'; test -n "$(viewsdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(viewsdir)'; $(am__uninstall_files_from_dir) install-dist_wwwDATA: $(dist_www_DATA) @$(NORMAL_INSTALL) @list='$(dist_www_DATA)'; test -n "$(wwwdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(wwwdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(wwwdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(wwwdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(wwwdir)" || exit $$?; \ done uninstall-dist_wwwDATA: @$(NORMAL_UNINSTALL) @list='$(dist_www_DATA)'; test -n "$(wwwdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(wwwdir)'; $(am__uninstall_files_from_dir) install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-nodist_artnetincludeHEADERS: $(nodist_artnetinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_artnetinclude_HEADERS)'; test -n "$(artnetincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(artnetincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(artnetincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(artnetincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(artnetincludedir)" || exit $$?; \ done uninstall-nodist_artnetincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_artnetinclude_HEADERS)'; test -n "$(artnetincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(artnetincludedir)'; $(am__uninstall_files_from_dir) install-nodist_e131includeHEADERS: $(nodist_e131include_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_e131include_HEADERS)'; test -n "$(e131includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(e131includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(e131includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(e131includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(e131includedir)" || exit $$?; \ done uninstall-nodist_e131includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_e131include_HEADERS)'; test -n "$(e131includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(e131includedir)'; $(am__uninstall_files_from_dir) install-nodist_olabaseincludeHEADERS: $(nodist_olabaseinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_olabaseinclude_HEADERS)'; test -n "$(olabaseincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olabaseincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olabaseincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olabaseincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olabaseincludedir)" || exit $$?; \ done uninstall-nodist_olabaseincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_olabaseinclude_HEADERS)'; test -n "$(olabaseincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olabaseincludedir)'; $(am__uninstall_files_from_dir) install-nodist_olardmincludeHEADERS: $(nodist_olardminclude_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_olardminclude_HEADERS)'; test -n "$(olardmincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olardmincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olardmincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olardmincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olardmincludedir)" || exit $$?; \ done uninstall-nodist_olardmincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_olardminclude_HEADERS)'; test -n "$(olardmincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olardmincludedir)'; $(am__uninstall_files_from_dir) install-nodist_olatimecodeincludeHEADERS: $(nodist_olatimecodeinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_olatimecodeinclude_HEADERS)'; test -n "$(olatimecodeincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olatimecodeincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olatimecodeincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olatimecodeincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olatimecodeincludedir)" || exit $$?; \ done uninstall-nodist_olatimecodeincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_olatimecodeinclude_HEADERS)'; test -n "$(olatimecodeincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olatimecodeincludedir)'; $(am__uninstall_files_from_dir) install-nodist_pkgincludeHEADERS: $(nodist_pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-nodist_pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) install-nodist_usbproincludeHEADERS: $(nodist_usbproinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_usbproinclude_HEADERS)'; test -n "$(usbproincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(usbproincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(usbproincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(usbproincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(usbproincludedir)" || exit $$?; \ done uninstall-nodist_usbproincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_usbproinclude_HEADERS)'; test -n "$(usbproincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(usbproincludedir)'; $(am__uninstall_files_from_dir) install-olaacnincludeHEADERS: $(olaacninclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olaacninclude_HEADERS)'; test -n "$(olaacnincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olaacnincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olaacnincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olaacnincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olaacnincludedir)" || exit $$?; \ done uninstall-olaacnincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olaacninclude_HEADERS)'; test -n "$(olaacnincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olaacnincludedir)'; $(am__uninstall_files_from_dir) install-olabaseincludeHEADERS: $(olabaseinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olabaseinclude_HEADERS)'; test -n "$(olabaseincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olabaseincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olabaseincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olabaseincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olabaseincludedir)" || exit $$?; \ done uninstall-olabaseincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olabaseinclude_HEADERS)'; test -n "$(olabaseincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olabaseincludedir)'; $(am__uninstall_files_from_dir) install-olaclientincludeHEADERS: $(olaclientinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olaclientinclude_HEADERS)'; test -n "$(olaclientincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olaclientincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olaclientincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olaclientincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olaclientincludedir)" || exit $$?; \ done uninstall-olaclientincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olaclientinclude_HEADERS)'; test -n "$(olaclientincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olaclientincludedir)'; $(am__uninstall_files_from_dir) install-oladincludeHEADERS: $(oladinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(oladinclude_HEADERS)'; test -n "$(oladincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(oladincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(oladincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(oladincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(oladincludedir)" || exit $$?; \ done uninstall-oladincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(oladinclude_HEADERS)'; test -n "$(oladincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(oladincludedir)'; $(am__uninstall_files_from_dir) install-oladmxincludeHEADERS: $(oladmxinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(oladmxinclude_HEADERS)'; test -n "$(oladmxincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(oladmxincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(oladmxincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(oladmxincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(oladmxincludedir)" || exit $$?; \ done uninstall-oladmxincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(oladmxinclude_HEADERS)'; test -n "$(oladmxincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(oladmxincludedir)'; $(am__uninstall_files_from_dir) install-olae133includeHEADERS: $(olae133include_HEADERS) @$(NORMAL_INSTALL) @list='$(olae133include_HEADERS)'; test -n "$(olae133includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olae133includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olae133includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olae133includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olae133includedir)" || exit $$?; \ done uninstall-olae133includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olae133include_HEADERS)'; test -n "$(olae133includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olae133includedir)'; $(am__uninstall_files_from_dir) install-olafileincludeHEADERS: $(olafileinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olafileinclude_HEADERS)'; test -n "$(olafileincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olafileincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olafileincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olafileincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olafileincludedir)" || exit $$?; \ done uninstall-olafileincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olafileinclude_HEADERS)'; test -n "$(olafileincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olafileincludedir)'; $(am__uninstall_files_from_dir) install-olahttpincludeHEADERS: $(olahttpinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olahttpinclude_HEADERS)'; test -n "$(olahttpincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olahttpincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olahttpincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olahttpincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olahttpincludedir)" || exit $$?; \ done uninstall-olahttpincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olahttpinclude_HEADERS)'; test -n "$(olahttpincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olahttpincludedir)'; $(am__uninstall_files_from_dir) install-olaioincludeHEADERS: $(olaioinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olaioinclude_HEADERS)'; test -n "$(olaioincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olaioincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olaioincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olaioincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olaioincludedir)" || exit $$?; \ done uninstall-olaioincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olaioinclude_HEADERS)'; test -n "$(olaioincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olaioincludedir)'; $(am__uninstall_files_from_dir) install-olamathincludeHEADERS: $(olamathinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olamathinclude_HEADERS)'; test -n "$(olamathincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olamathincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olamathincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olamathincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olamathincludedir)" || exit $$?; \ done uninstall-olamathincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olamathinclude_HEADERS)'; test -n "$(olamathincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olamathincludedir)'; $(am__uninstall_files_from_dir) install-olamessagingincludeHEADERS: $(olamessaginginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olamessaginginclude_HEADERS)'; test -n "$(olamessagingincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olamessagingincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olamessagingincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olamessagingincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olamessagingincludedir)" || exit $$?; \ done uninstall-olamessagingincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olamessaginginclude_HEADERS)'; test -n "$(olamessagingincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olamessagingincludedir)'; $(am__uninstall_files_from_dir) install-olanetworkincludeHEADERS: $(olanetworkinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olanetworkinclude_HEADERS)'; test -n "$(olanetworkincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olanetworkincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olanetworkincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olanetworkincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olanetworkincludedir)" || exit $$?; \ done uninstall-olanetworkincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olanetworkinclude_HEADERS)'; test -n "$(olanetworkincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olanetworkincludedir)'; $(am__uninstall_files_from_dir) install-olardmincludeHEADERS: $(olardminclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olardminclude_HEADERS)'; test -n "$(olardmincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olardmincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olardmincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olardmincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olardmincludedir)" || exit $$?; \ done uninstall-olardmincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olardminclude_HEADERS)'; test -n "$(olardmincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olardmincludedir)'; $(am__uninstall_files_from_dir) install-olarpcincludeHEADERS: $(olarpcinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olarpcinclude_HEADERS)'; test -n "$(olarpcincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olarpcincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olarpcincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olarpcincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olarpcincludedir)" || exit $$?; \ done uninstall-olarpcincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olarpcinclude_HEADERS)'; test -n "$(olarpcincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olarpcincludedir)'; $(am__uninstall_files_from_dir) install-olastlincludeHEADERS: $(olastlinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olastlinclude_HEADERS)'; test -n "$(olastlincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olastlincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olastlincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olastlincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olastlincludedir)" || exit $$?; \ done uninstall-olastlincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olastlinclude_HEADERS)'; test -n "$(olastlincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olastlincludedir)'; $(am__uninstall_files_from_dir) install-olastringsincludeHEADERS: $(olastringsinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olastringsinclude_HEADERS)'; test -n "$(olastringsincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olastringsincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olastringsincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olastringsincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olastringsincludedir)" || exit $$?; \ done uninstall-olastringsincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olastringsinclude_HEADERS)'; test -n "$(olastringsincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olastringsincludedir)'; $(am__uninstall_files_from_dir) install-olasystemincludeHEADERS: $(olasysteminclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olasysteminclude_HEADERS)'; test -n "$(olasystemincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olasystemincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olasystemincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olasystemincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olasystemincludedir)" || exit $$?; \ done uninstall-olasystemincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olasysteminclude_HEADERS)'; test -n "$(olasystemincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olasystemincludedir)'; $(am__uninstall_files_from_dir) install-olathreadincludeHEADERS: $(olathreadinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olathreadinclude_HEADERS)'; test -n "$(olathreadincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olathreadincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olathreadincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olathreadincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olathreadincludedir)" || exit $$?; \ done uninstall-olathreadincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olathreadinclude_HEADERS)'; test -n "$(olathreadincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olathreadincludedir)'; $(am__uninstall_files_from_dir) install-olatimecodeincludeHEADERS: $(olatimecodeinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olatimecodeinclude_HEADERS)'; test -n "$(olatimecodeincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olatimecodeincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olatimecodeincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olatimecodeincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olatimecodeincludedir)" || exit $$?; \ done uninstall-olatimecodeincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olatimecodeinclude_HEADERS)'; test -n "$(olatimecodeincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olatimecodeincludedir)'; $(am__uninstall_files_from_dir) install-olautilincludeHEADERS: $(olautilinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olautilinclude_HEADERS)'; test -n "$(olautilincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olautilincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olautilincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olautilincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olautilincludedir)" || exit $$?; \ done uninstall-olautilincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olautilinclude_HEADERS)'; test -n "$(olautilincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olautilincludedir)'; $(am__uninstall_files_from_dir) install-olawebincludeHEADERS: $(olawebinclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olawebinclude_HEADERS)'; test -n "$(olawebincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olawebincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olawebincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olawebincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olawebincludedir)" || exit $$?; \ done uninstall-olawebincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olawebinclude_HEADERS)'; test -n "$(olawebincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olawebincludedir)'; $(am__uninstall_files_from_dir) install-olawinincludeHEADERS: $(olawininclude_HEADERS) @$(NORMAL_INSTALL) @list='$(olawininclude_HEADERS)'; test -n "$(olawinincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(olawinincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(olawinincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(olawinincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(olawinincludedir)" || exit $$?; \ done uninstall-olawinincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(olawininclude_HEADERS)'; test -n "$(olawinincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(olawinincludedir)'; $(am__uninstall_files_from_dir) install-pkgincludeHEADERS: $(pkginclude_HEADERS) @$(NORMAL_INSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgincludedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgincludedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(pkgincludedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(pkgincludedir)" || exit $$?; \ done uninstall-pkgincludeHEADERS: @$(NORMAL_UNINSTALL) @list='$(pkginclude_HEADERS)'; test -n "$(pkgincludedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgincludedir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files # Recover from deleted '.trs' file; this should ensure that # "rm -f foo.log; make foo.trs" re-run 'foo.test', and re-create # both 'foo.log' and 'foo.trs'. Break the recipe in two subshells # to avoid problems with "make -n". .log.trs: rm -f $< $@ $(MAKE) $(AM_MAKEFLAGS) $< # Leading 'am--fnord' is there to ensure the list of targets does not # expand to empty, as could happen e.g. with make check TESTS=''. am--fnord $(TEST_LOGS) $(TEST_LOGS:.log=.trs): $(am__force_recheck) am--force-recheck: @: $(TEST_SUITE_LOG): $(TEST_LOGS) @$(am__set_TESTS_bases); \ am__f_ok () { test -f "$$1" && test -r "$$1"; }; \ redo_bases=`for i in $$bases; do \ am__f_ok $$i.trs && am__f_ok $$i.log || echo $$i; \ done`; \ if test -n "$$redo_bases"; then \ redo_logs=`for i in $$redo_bases; do echo $$i.log; done`; \ redo_results=`for i in $$redo_bases; do echo $$i.trs; done`; \ if $(am__make_dryrun); then :; else \ rm -f $$redo_logs && rm -f $$redo_results || exit 1; \ fi; \ fi; \ if test -n "$$am__remaking_logs"; then \ echo "fatal: making $(TEST_SUITE_LOG): possible infinite" \ "recursion detected" >&2; \ elif test -n "$$redo_logs"; then \ am__remaking_logs=yes $(MAKE) $(AM_MAKEFLAGS) $$redo_logs; \ fi; \ if $(am__make_dryrun); then :; else \ st=0; \ errmsg="fatal: making $(TEST_SUITE_LOG): failed to create"; \ for i in $$redo_bases; do \ test -f $$i.trs && test -r $$i.trs \ || { echo "$$errmsg $$i.trs" >&2; st=1; }; \ test -f $$i.log && test -r $$i.log \ || { echo "$$errmsg $$i.log" >&2; st=1; }; \ done; \ test $$st -eq 0 || exit 1; \ fi @$(am__sh_e_setup); $(am__tty_colors); $(am__set_TESTS_bases); \ ws='[ ]'; \ results=`for b in $$bases; do echo $$b.trs; done`; \ test -n "$$results" || results=/dev/null; \ all=` grep "^$$ws*:test-result:" $$results | wc -l`; \ pass=` grep "^$$ws*:test-result:$$ws*PASS" $$results | wc -l`; \ fail=` grep "^$$ws*:test-result:$$ws*FAIL" $$results | wc -l`; \ skip=` grep "^$$ws*:test-result:$$ws*SKIP" $$results | wc -l`; \ xfail=`grep "^$$ws*:test-result:$$ws*XFAIL" $$results | wc -l`; \ xpass=`grep "^$$ws*:test-result:$$ws*XPASS" $$results | wc -l`; \ error=`grep "^$$ws*:test-result:$$ws*ERROR" $$results | wc -l`; \ if test `expr $$fail + $$xpass + $$error` -eq 0; then \ success=true; \ else \ success=false; \ fi; \ br='==================='; br=$$br$$br$$br$$br; \ result_count () \ { \ if test x"$$1" = x"--maybe-color"; then \ maybe_colorize=yes; \ elif test x"$$1" = x"--no-color"; then \ maybe_colorize=no; \ else \ echo "$@: invalid 'result_count' usage" >&2; exit 4; \ fi; \ shift; \ desc=$$1 count=$$2; \ if test $$maybe_colorize = yes && test $$count -gt 0; then \ color_start=$$3 color_end=$$std; \ else \ color_start= color_end=; \ fi; \ echo "$${color_start}# $$desc $$count$${color_end}"; \ }; \ create_testsuite_report () \ { \ result_count $$1 "TOTAL:" $$all "$$brg"; \ result_count $$1 "PASS: " $$pass "$$grn"; \ result_count $$1 "SKIP: " $$skip "$$blu"; \ result_count $$1 "XFAIL:" $$xfail "$$lgn"; \ result_count $$1 "FAIL: " $$fail "$$red"; \ result_count $$1 "XPASS:" $$xpass "$$red"; \ result_count $$1 "ERROR:" $$error "$$mgn"; \ }; \ { \ echo "$(PACKAGE_STRING): $(subdir)/$(TEST_SUITE_LOG)" | \ $(am__rst_title); \ create_testsuite_report --no-color; \ echo; \ echo ".. contents:: :depth: 2"; \ echo; \ for b in $$bases; do echo $$b; done \ | $(am__create_global_log); \ } >$(TEST_SUITE_LOG).tmp || exit 1; \ mv $(TEST_SUITE_LOG).tmp $(TEST_SUITE_LOG); \ if $$success; then \ col="$$grn"; \ else \ col="$$red"; \ test x"$$VERBOSE" = x || cat $(TEST_SUITE_LOG); \ fi; \ echo "$${col}$$br$${std}"; \ echo "$${col}Testsuite summary for $(PACKAGE_STRING)$${std}"; \ echo "$${col}$$br$${std}"; \ create_testsuite_report --maybe-color; \ echo "$$col$$br$$std"; \ if $$success; then :; else \ echo "$${col}See $(subdir)/$(TEST_SUITE_LOG)$${std}"; \ if test -n "$(PACKAGE_BUGREPORT)"; then \ echo "$${col}Please report to $(PACKAGE_BUGREPORT)$${std}"; \ fi; \ echo "$$col$$br$$std"; \ fi; \ $$success || exit 1 check-TESTS: @list='$(RECHECK_LOGS)'; test -z "$$list" || rm -f $$list @list='$(RECHECK_LOGS:.log=.trs)'; test -z "$$list" || rm -f $$list @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ log_list=`for i in $$bases; do echo $$i.log; done`; \ trs_list=`for i in $$bases; do echo $$i.trs; done`; \ log_list=`echo $$log_list`; trs_list=`echo $$trs_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) TEST_LOGS="$$log_list"; \ exit $$?; recheck: all $(check_PROGRAMS) $(check_SCRIPTS) $(dist_check_SCRIPTS) @test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) @set +e; $(am__set_TESTS_bases); \ bases=`for i in $$bases; do echo $$i; done \ | $(am__list_recheck_tests)` || exit 1; \ log_list=`for i in $$bases; do echo $$i.log; done`; \ log_list=`echo $$log_list`; \ $(MAKE) $(AM_MAKEFLAGS) $(TEST_SUITE_LOG) \ am__force_recheck=am--force-recheck \ TEST_LOGS="$$log_list"; \ exit $$? common/base/CredentialsTester.log: common/base/CredentialsTester$(EXEEXT) @p='common/base/CredentialsTester$(EXEEXT)'; \ b='common/base/CredentialsTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/base/FlagsTester.log: common/base/FlagsTester$(EXEEXT) @p='common/base/FlagsTester$(EXEEXT)'; \ b='common/base/FlagsTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/base/LoggingTester.log: common/base/LoggingTester$(EXEEXT) @p='common/base/LoggingTester$(EXEEXT)'; \ b='common/base/LoggingTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/dmx/RunLengthEncoderTester.log: common/dmx/RunLengthEncoderTester$(EXEEXT) @p='common/dmx/RunLengthEncoderTester$(EXEEXT)'; \ b='common/dmx/RunLengthEncoderTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/export_map/ExportMapTester.log: common/export_map/ExportMapTester$(EXEEXT) @p='common/export_map/ExportMapTester$(EXEEXT)'; \ b='common/export_map/ExportMapTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/file/UtilTester.log: common/file/UtilTester$(EXEEXT) @p='common/file/UtilTester$(EXEEXT)'; \ b='common/file/UtilTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/io/DescriptorTester.log: common/io/DescriptorTester$(EXEEXT) @p='common/io/DescriptorTester$(EXEEXT)'; \ b='common/io/DescriptorTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/io/IOQueueTester.log: common/io/IOQueueTester$(EXEEXT) @p='common/io/IOQueueTester$(EXEEXT)'; \ b='common/io/IOQueueTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/io/IOStackTester.log: common/io/IOStackTester$(EXEEXT) @p='common/io/IOStackTester$(EXEEXT)'; \ b='common/io/IOStackTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/io/MemoryBlockTester.log: common/io/MemoryBlockTester$(EXEEXT) @p='common/io/MemoryBlockTester$(EXEEXT)'; \ b='common/io/MemoryBlockTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/io/SelectServerTester.log: common/io/SelectServerTester$(EXEEXT) @p='common/io/SelectServerTester$(EXEEXT)'; \ b='common/io/SelectServerTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/io/StreamTester.log: common/io/StreamTester$(EXEEXT) @p='common/io/StreamTester$(EXEEXT)'; \ b='common/io/StreamTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/io/TimeoutManagerTester.log: common/io/TimeoutManagerTester$(EXEEXT) @p='common/io/TimeoutManagerTester$(EXEEXT)'; \ b='common/io/TimeoutManagerTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/messaging/DescriptorTester.log: common/messaging/DescriptorTester$(EXEEXT) @p='common/messaging/DescriptorTester$(EXEEXT)'; \ b='common/messaging/DescriptorTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/network/HealthCheckedConnectionTester.log: common/network/HealthCheckedConnectionTester$(EXEEXT) @p='common/network/HealthCheckedConnectionTester$(EXEEXT)'; \ b='common/network/HealthCheckedConnectionTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/network/NetworkTester.log: common/network/NetworkTester$(EXEEXT) @p='common/network/NetworkTester$(EXEEXT)'; \ b='common/network/NetworkTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/network/TCPConnectorTester.log: common/network/TCPConnectorTester$(EXEEXT) @p='common/network/TCPConnectorTester$(EXEEXT)'; \ b='common/network/TCPConnectorTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/DiscoveryAgentTester.log: common/rdm/DiscoveryAgentTester$(EXEEXT) @p='common/rdm/DiscoveryAgentTester$(EXEEXT)'; \ b='common/rdm/DiscoveryAgentTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/PidStoreTester.log: common/rdm/PidStoreTester$(EXEEXT) @p='common/rdm/PidStoreTester$(EXEEXT)'; \ b='common/rdm/PidStoreTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/QueueingRDMControllerTester.log: common/rdm/QueueingRDMControllerTester$(EXEEXT) @p='common/rdm/QueueingRDMControllerTester$(EXEEXT)'; \ b='common/rdm/QueueingRDMControllerTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/RDMAPITester.log: common/rdm/RDMAPITester$(EXEEXT) @p='common/rdm/RDMAPITester$(EXEEXT)'; \ b='common/rdm/RDMAPITester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/RDMCommandSerializerTester.log: common/rdm/RDMCommandSerializerTester$(EXEEXT) @p='common/rdm/RDMCommandSerializerTester$(EXEEXT)'; \ b='common/rdm/RDMCommandSerializerTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/RDMCommandTester.log: common/rdm/RDMCommandTester$(EXEEXT) @p='common/rdm/RDMCommandTester$(EXEEXT)'; \ b='common/rdm/RDMCommandTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/RDMFrameTester.log: common/rdm/RDMFrameTester$(EXEEXT) @p='common/rdm/RDMFrameTester$(EXEEXT)'; \ b='common/rdm/RDMFrameTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/RDMHelperTester.log: common/rdm/RDMHelperTester$(EXEEXT) @p='common/rdm/RDMHelperTester$(EXEEXT)'; \ b='common/rdm/RDMHelperTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/RDMMessageTester.log: common/rdm/RDMMessageTester$(EXEEXT) @p='common/rdm/RDMMessageTester$(EXEEXT)'; \ b='common/rdm/RDMMessageTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/RDMReplyTester.log: common/rdm/RDMReplyTester$(EXEEXT) @p='common/rdm/RDMReplyTester$(EXEEXT)'; \ b='common/rdm/RDMReplyTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/UIDAllocatorTester.log: common/rdm/UIDAllocatorTester$(EXEEXT) @p='common/rdm/UIDAllocatorTester$(EXEEXT)'; \ b='common/rdm/UIDAllocatorTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rdm/UIDTester.log: common/rdm/UIDTester$(EXEEXT) @p='common/rdm/UIDTester$(EXEEXT)'; \ b='common/rdm/UIDTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rpc/RpcTester.log: common/rpc/RpcTester$(EXEEXT) @p='common/rpc/RpcTester$(EXEEXT)'; \ b='common/rpc/RpcTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/rpc/RpcServerTester.log: common/rpc/RpcServerTester$(EXEEXT) @p='common/rpc/RpcServerTester$(EXEEXT)'; \ b='common/rpc/RpcServerTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/strings/UtilsTester.log: common/strings/UtilsTester$(EXEEXT) @p='common/strings/UtilsTester$(EXEEXT)'; \ b='common/strings/UtilsTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/thread/ExecutorThreadTester.log: common/thread/ExecutorThreadTester$(EXEEXT) @p='common/thread/ExecutorThreadTester$(EXEEXT)'; \ b='common/thread/ExecutorThreadTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/thread/ThreadTester.log: common/thread/ThreadTester$(EXEEXT) @p='common/thread/ThreadTester$(EXEEXT)'; \ b='common/thread/ThreadTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/thread/FutureTester.log: common/thread/FutureTester$(EXEEXT) @p='common/thread/FutureTester$(EXEEXT)'; \ b='common/thread/FutureTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/timecode/TimeCodeTester.log: common/timecode/TimeCodeTester$(EXEEXT) @p='common/timecode/TimeCodeTester$(EXEEXT)'; \ b='common/timecode/TimeCodeTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/utils/UtilsTester.log: common/utils/UtilsTester$(EXEEXT) @p='common/utils/UtilsTester$(EXEEXT)'; \ b='common/utils/UtilsTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/web/JsonTester.log: common/web/JsonTester$(EXEEXT) @p='common/web/JsonTester$(EXEEXT)'; \ b='common/web/JsonTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/web/ParserTester.log: common/web/ParserTester$(EXEEXT) @p='common/web/ParserTester$(EXEEXT)'; \ b='common/web/ParserTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/web/PtchParserTester.log: common/web/PtchParserTester$(EXEEXT) @p='common/web/PtchParserTester$(EXEEXT)'; \ b='common/web/PtchParserTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/web/PtchTester.log: common/web/PtchTester$(EXEEXT) @p='common/web/PtchTester$(EXEEXT)'; \ b='common/web/PtchTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/web/PointerTester.log: common/web/PointerTester$(EXEEXT) @p='common/web/PointerTester$(EXEEXT)'; \ b='common/web/PointerTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/web/PointerTrackerTester.log: common/web/PointerTrackerTester$(EXEEXT) @p='common/web/PointerTrackerTester$(EXEEXT)'; \ b='common/web/PointerTrackerTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/web/SchemaParserTester.log: common/web/SchemaParserTester$(EXEEXT) @p='common/web/SchemaParserTester$(EXEEXT)'; \ b='common/web/SchemaParserTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/web/SchemaTester.log: common/web/SchemaTester$(EXEEXT) @p='common/web/SchemaTester$(EXEEXT)'; \ b='common/web/SchemaTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) common/web/SectionsTester.log: common/web/SectionsTester$(EXEEXT) @p='common/web/SectionsTester$(EXEEXT)'; \ b='common/web/SectionsTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) data/rdm/PidDataTester.log: data/rdm/PidDataTester$(EXEEXT) @p='data/rdm/PidDataTester$(EXEEXT)'; \ b='data/rdm/PidDataTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) libs/acn/E131Tester.log: libs/acn/E131Tester$(EXEEXT) @p='libs/acn/E131Tester$(EXEEXT)'; \ b='libs/acn/E131Tester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) libs/acn/E133Tester.log: libs/acn/E133Tester$(EXEEXT) @p='libs/acn/E133Tester$(EXEEXT)'; \ b='libs/acn/E133Tester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) libs/acn/TransportTester.log: libs/acn/TransportTester$(EXEEXT) @p='libs/acn/TransportTester$(EXEEXT)'; \ b='libs/acn/TransportTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) libs/usb/LibUsbThreadTester.log: libs/usb/LibUsbThreadTester$(EXEEXT) @p='libs/usb/LibUsbThreadTester$(EXEEXT)'; \ b='libs/usb/LibUsbThreadTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) ola/OlaClientTester.log: ola/OlaClientTester$(EXEEXT) @p='ola/OlaClientTester$(EXEEXT)'; \ b='ola/OlaClientTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) olad/plugin_api/ClientTester.log: olad/plugin_api/ClientTester$(EXEEXT) @p='olad/plugin_api/ClientTester$(EXEEXT)'; \ b='olad/plugin_api/ClientTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) olad/plugin_api/DeviceTester.log: olad/plugin_api/DeviceTester$(EXEEXT) @p='olad/plugin_api/DeviceTester$(EXEEXT)'; \ b='olad/plugin_api/DeviceTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) olad/plugin_api/DmxSourceTester.log: olad/plugin_api/DmxSourceTester$(EXEEXT) @p='olad/plugin_api/DmxSourceTester$(EXEEXT)'; \ b='olad/plugin_api/DmxSourceTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) olad/plugin_api/PortTester.log: olad/plugin_api/PortTester$(EXEEXT) @p='olad/plugin_api/PortTester$(EXEEXT)'; \ b='olad/plugin_api/PortTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) olad/plugin_api/PreferencesTester.log: olad/plugin_api/PreferencesTester$(EXEEXT) @p='olad/plugin_api/PreferencesTester$(EXEEXT)'; \ b='olad/plugin_api/PreferencesTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) olad/plugin_api/UniverseTester.log: olad/plugin_api/UniverseTester$(EXEEXT) @p='olad/plugin_api/UniverseTester$(EXEEXT)'; \ b='olad/plugin_api/UniverseTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/artnet/ArtNetTester.log: plugins/artnet/ArtNetTester$(EXEEXT) @p='plugins/artnet/ArtNetTester$(EXEEXT)'; \ b='plugins/artnet/ArtNetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/dummy/DummyPluginTester.log: plugins/dummy/DummyPluginTester$(EXEEXT) @p='plugins/dummy/DummyPluginTester$(EXEEXT)'; \ b='plugins/dummy/DummyPluginTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/espnet/EspNetTester.log: plugins/espnet/EspNetTester$(EXEEXT) @p='plugins/espnet/EspNetTester$(EXEEXT)'; \ b='plugins/espnet/EspNetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/kinet/KiNetTester.log: plugins/kinet/KiNetTester$(EXEEXT) @p='plugins/kinet/KiNetTester$(EXEEXT)'; \ b='plugins/kinet/KiNetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/openpixelcontrol/OPCClientTester.log: plugins/openpixelcontrol/OPCClientTester$(EXEEXT) @p='plugins/openpixelcontrol/OPCClientTester$(EXEEXT)'; \ b='plugins/openpixelcontrol/OPCClientTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/openpixelcontrol/OPCServerTester.log: plugins/openpixelcontrol/OPCServerTester$(EXEEXT) @p='plugins/openpixelcontrol/OPCServerTester$(EXEEXT)'; \ b='plugins/openpixelcontrol/OPCServerTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/osc/OSCTester.log: plugins/osc/OSCTester$(EXEEXT) @p='plugins/osc/OSCTester$(EXEEXT)'; \ b='plugins/osc/OSCTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/shownet/ShowNetTester.log: plugins/shownet/ShowNetTester$(EXEEXT) @p='plugins/shownet/ShowNetTester$(EXEEXT)'; \ b='plugins/shownet/ShowNetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/spi/SPITester.log: plugins/spi/SPITester$(EXEEXT) @p='plugins/spi/SPITester$(EXEEXT)'; \ b='plugins/spi/SPITester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/usbpro/ArduinoWidgetTester.log: plugins/usbpro/ArduinoWidgetTester$(EXEEXT) @p='plugins/usbpro/ArduinoWidgetTester$(EXEEXT)'; \ b='plugins/usbpro/ArduinoWidgetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/usbpro/BaseRobeWidgetTester.log: plugins/usbpro/BaseRobeWidgetTester$(EXEEXT) @p='plugins/usbpro/BaseRobeWidgetTester$(EXEEXT)'; \ b='plugins/usbpro/BaseRobeWidgetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/usbpro/BaseUsbProWidgetTester.log: plugins/usbpro/BaseUsbProWidgetTester$(EXEEXT) @p='plugins/usbpro/BaseUsbProWidgetTester$(EXEEXT)'; \ b='plugins/usbpro/BaseUsbProWidgetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/usbpro/DmxTriWidgetTester.log: plugins/usbpro/DmxTriWidgetTester$(EXEEXT) @p='plugins/usbpro/DmxTriWidgetTester$(EXEEXT)'; \ b='plugins/usbpro/DmxTriWidgetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/usbpro/DmxterWidgetTester.log: plugins/usbpro/DmxterWidgetTester$(EXEEXT) @p='plugins/usbpro/DmxterWidgetTester$(EXEEXT)'; \ b='plugins/usbpro/DmxterWidgetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/usbpro/EnttecUsbProWidgetTester.log: plugins/usbpro/EnttecUsbProWidgetTester$(EXEEXT) @p='plugins/usbpro/EnttecUsbProWidgetTester$(EXEEXT)'; \ b='plugins/usbpro/EnttecUsbProWidgetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/usbpro/RobeWidgetDetectorTester.log: plugins/usbpro/RobeWidgetDetectorTester$(EXEEXT) @p='plugins/usbpro/RobeWidgetDetectorTester$(EXEEXT)'; \ b='plugins/usbpro/RobeWidgetDetectorTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/usbpro/RobeWidgetTester.log: plugins/usbpro/RobeWidgetTester$(EXEEXT) @p='plugins/usbpro/RobeWidgetTester$(EXEEXT)'; \ b='plugins/usbpro/RobeWidgetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/usbpro/UltraDMXProWidgetTester.log: plugins/usbpro/UltraDMXProWidgetTester$(EXEEXT) @p='plugins/usbpro/UltraDMXProWidgetTester$(EXEEXT)'; \ b='plugins/usbpro/UltraDMXProWidgetTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/usbpro/UsbProWidgetDetectorTester.log: plugins/usbpro/UsbProWidgetDetectorTester$(EXEEXT) @p='plugins/usbpro/UsbProWidgetDetectorTester$(EXEEXT)'; \ b='plugins/usbpro/UsbProWidgetDetectorTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) plugins/usbpro/WidgetDetectorThreadTester.log: plugins/usbpro/WidgetDetectorThreadTester$(EXEEXT) @p='plugins/usbpro/WidgetDetectorThreadTester$(EXEEXT)'; \ b='plugins/usbpro/WidgetDetectorThreadTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) olad/OlaTester.log: olad/OlaTester$(EXEEXT) @p='olad/OlaTester$(EXEEXT)'; \ b='olad/OlaTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tools/ola_trigger/ActionTester.log: tools/ola_trigger/ActionTester$(EXEEXT) @p='tools/ola_trigger/ActionTester$(EXEEXT)'; \ b='tools/ola_trigger/ActionTester'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) data/rdm/PidDataTest.sh.log: data/rdm/PidDataTest.sh @p='data/rdm/PidDataTest.sh'; \ b='data/rdm/PidDataTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) examples/RecorderVerifyTest.sh.log: examples/RecorderVerifyTest.sh @p='examples/RecorderVerifyTest.sh'; \ b='examples/RecorderVerifyTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) python/ola/rpc/SimpleRpcControllerTest.sh.log: python/ola/rpc/SimpleRpcControllerTest.sh @p='python/ola/rpc/SimpleRpcControllerTest.sh'; \ b='python/ola/rpc/SimpleRpcControllerTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) python/ola/ClientWrapperTest.sh.log: python/ola/ClientWrapperTest.sh @p='python/ola/ClientWrapperTest.sh'; \ b='python/ola/ClientWrapperTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) python/ola/OlaClientTest.sh.log: python/ola/OlaClientTest.sh @p='python/ola/OlaClientTest.sh'; \ b='python/ola/OlaClientTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) python/ola/PidStoreTest.sh.log: python/ola/PidStoreTest.sh @p='python/ola/PidStoreTest.sh'; \ b='python/ola/PidStoreTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) python/ola/RDMTest.sh.log: python/ola/RDMTest.sh @p='python/ola/RDMTest.sh'; \ b='python/ola/RDMTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) python/PyCompileTest.sh.log: python/PyCompileTest.sh @p='python/PyCompileTest.sh'; \ b='python/PyCompileTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tools/ola_trigger/FileValidateTest.sh.log: tools/ola_trigger/FileValidateTest.sh @p='tools/ola_trigger/FileValidateTest.sh'; \ b='tools/ola_trigger/FileValidateTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tools/rdm/ExpectedResultsTest.sh.log: tools/rdm/ExpectedResultsTest.sh @p='tools/rdm/ExpectedResultsTest.sh'; \ b='tools/rdm/ExpectedResultsTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tools/rdm/ResponderTestTest.sh.log: tools/rdm/ResponderTestTest.sh @p='tools/rdm/ResponderTestTest.sh'; \ b='tools/rdm/ResponderTestTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tools/rdm/TestHelpersTest.sh.log: tools/rdm/TestHelpersTest.sh @p='tools/rdm/TestHelpersTest.sh'; \ b='tools/rdm/TestHelpersTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tools/rdm/TestRunnerTest.sh.log: tools/rdm/TestRunnerTest.sh @p='tools/rdm/TestRunnerTest.sh'; \ b='tools/rdm/TestRunnerTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) tools/rdm/TestStateTest.sh.log: tools/rdm/TestStateTest.sh @p='tools/rdm/TestStateTest.sh'; \ b='tools/rdm/TestStateTest.sh'; \ $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) .py.log: @p='$<'; \ $(am__set_b); \ $(am__check_pre) $(PY_LOG_DRIVER) --test-name "$$f" \ --log-file $$b.log --trs-file $$b.trs \ $(am__common_driver_flags) $(AM_PY_LOG_DRIVER_FLAGS) $(PY_LOG_DRIVER_FLAGS) -- $(PY_LOG_COMPILE) \ "$$tst" $(AM_TESTS_FD_REDIRECT) @am__EXEEXT_TRUE@.py$(EXEEXT).log: @am__EXEEXT_TRUE@ @p='$<'; \ @am__EXEEXT_TRUE@ $(am__set_b); \ @am__EXEEXT_TRUE@ $(am__check_pre) $(PY_LOG_DRIVER) --test-name "$$f" \ @am__EXEEXT_TRUE@ --log-file $$b.log --trs-file $$b.trs \ @am__EXEEXT_TRUE@ $(am__common_driver_flags) $(AM_PY_LOG_DRIVER_FLAGS) $(PY_LOG_DRIVER_FLAGS) -- $(PY_LOG_COMPILE) \ @am__EXEEXT_TRUE@ "$$tst" $(AM_TESTS_FD_REDIRECT) distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir @echo WARNING: "Support for distribution archives compressed with" \ "legacy program 'compress' is deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir @echo WARNING: "Support for shar distribution archives is" \ "deprecated." >&2 @echo WARNING: "It will be removed altogether in Automake 2.0" >&2 shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_build/sub $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build/sub \ && ../../configure \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ --srcdir=../.. --prefix="$$dc_install_base" \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am $(MAKE) $(AM_MAKEFLAGS) $(check_PROGRAMS) $(check_SCRIPTS) \ $(dist_check_SCRIPTS) $(MAKE) $(AM_MAKEFLAGS) check-TESTS check: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) check-recursive all-am: Makefile $(LTLIBRARIES) $(PROGRAMS) $(SCRIPTS) $(MANS) $(DATA) \ $(HEADERS) config.h install-binPROGRAMS: install-libLTLIBRARIES installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(bindir)" "$(DESTDIR)$(rdmtestsexecdir)" "$(DESTDIR)$(pkgpythondir)" "$(DESTDIR)$(rdmtestsdir)" "$(DESTDIR)$(rpcpythondir)" "$(DESTDIR)$(pkgpythondir)" "$(DESTDIR)$(rdminitdir)" "$(DESTDIR)$(rdmtestsdir)" "$(DESTDIR)$(rpcpythondir)" "$(DESTDIR)$(man1dir)" "$(DESTDIR)$(angulardir)" "$(DESTDIR)$(angularroutedir)" "$(DESTDIR)$(bootcssdir)" "$(DESTDIR)$(bootfontsdir)" "$(DESTDIR)$(bootjsdir)" "$(DESTDIR)$(cssdir)" "$(DESTDIR)$(imgdir)" "$(DESTDIR)$(jquerydir)" "$(DESTDIR)$(jsdir)" "$(DESTDIR)$(newdir)" "$(DESTDIR)$(piddatadir)" "$(DESTDIR)$(tools_rdm_testserver_imagesdir)" "$(DESTDIR)$(tools_rdm_testserver_staticdir)" "$(DESTDIR)$(viewsdir)" "$(DESTDIR)$(wwwdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(artnetincludedir)" "$(DESTDIR)$(e131includedir)" "$(DESTDIR)$(olabaseincludedir)" "$(DESTDIR)$(olardmincludedir)" "$(DESTDIR)$(olatimecodeincludedir)" "$(DESTDIR)$(pkgincludedir)" "$(DESTDIR)$(usbproincludedir)" "$(DESTDIR)$(olaacnincludedir)" "$(DESTDIR)$(olabaseincludedir)" "$(DESTDIR)$(olaclientincludedir)" "$(DESTDIR)$(oladincludedir)" "$(DESTDIR)$(oladmxincludedir)" "$(DESTDIR)$(olae133includedir)" "$(DESTDIR)$(olafileincludedir)" "$(DESTDIR)$(olahttpincludedir)" "$(DESTDIR)$(olaioincludedir)" "$(DESTDIR)$(olamathincludedir)" "$(DESTDIR)$(olamessagingincludedir)" "$(DESTDIR)$(olanetworkincludedir)" "$(DESTDIR)$(olardmincludedir)" "$(DESTDIR)$(olarpcincludedir)" "$(DESTDIR)$(olastlincludedir)" "$(DESTDIR)$(olastringsincludedir)" "$(DESTDIR)$(olasystemincludedir)" "$(DESTDIR)$(olathreadincludedir)" "$(DESTDIR)$(olatimecodeincludedir)" "$(DESTDIR)$(olautilincludedir)" "$(DESTDIR)$(olawebincludedir)" "$(DESTDIR)$(olawinincludedir)" "$(DESTDIR)$(pkgincludedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: $(BUILT_SOURCES) $(MAKE) $(AM_MAKEFLAGS) install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: -test -z "$(TEST_LOGS)" || rm -f $(TEST_LOGS) -test -z "$(TEST_LOGS:.log=.trs)" || rm -f $(TEST_LOGS:.log=.trs) -test -z "$(TEST_SUITE_LOG)" || rm -f $(TEST_SUITE_LOG) clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f common/$(am__dirstamp) -rm -f common/base/$(DEPDIR)/$(am__dirstamp) -rm -f common/base/$(am__dirstamp) -rm -f common/dmx/$(DEPDIR)/$(am__dirstamp) -rm -f common/dmx/$(am__dirstamp) -rm -f common/export_map/$(DEPDIR)/$(am__dirstamp) -rm -f common/export_map/$(am__dirstamp) -rm -f common/file/$(DEPDIR)/$(am__dirstamp) -rm -f common/file/$(am__dirstamp) -rm -f common/http/$(DEPDIR)/$(am__dirstamp) -rm -f common/http/$(am__dirstamp) -rm -f common/io/$(DEPDIR)/$(am__dirstamp) -rm -f common/io/$(am__dirstamp) -rm -f common/math/$(DEPDIR)/$(am__dirstamp) -rm -f common/math/$(am__dirstamp) -rm -f common/messaging/$(DEPDIR)/$(am__dirstamp) -rm -f common/messaging/$(am__dirstamp) -rm -f common/network/$(DEPDIR)/$(am__dirstamp) -rm -f common/network/$(am__dirstamp) -rm -f common/protocol/$(DEPDIR)/$(am__dirstamp) -rm -f common/protocol/$(am__dirstamp) -rm -f common/rdm/$(DEPDIR)/$(am__dirstamp) -rm -f common/rdm/$(am__dirstamp) -rm -f common/rpc/$(DEPDIR)/$(am__dirstamp) -rm -f common/rpc/$(am__dirstamp) -rm -f common/strings/$(DEPDIR)/$(am__dirstamp) -rm -f common/strings/$(am__dirstamp) -rm -f common/system/$(DEPDIR)/$(am__dirstamp) -rm -f common/system/$(am__dirstamp) -rm -f common/testing/$(DEPDIR)/$(am__dirstamp) -rm -f common/testing/$(am__dirstamp) -rm -f common/thread/$(DEPDIR)/$(am__dirstamp) -rm -f common/thread/$(am__dirstamp) -rm -f common/timecode/$(DEPDIR)/$(am__dirstamp) -rm -f common/timecode/$(am__dirstamp) -rm -f common/utils/$(DEPDIR)/$(am__dirstamp) -rm -f common/utils/$(am__dirstamp) -rm -f common/web/$(DEPDIR)/$(am__dirstamp) -rm -f common/web/$(am__dirstamp) -rm -f data/rdm/$(DEPDIR)/$(am__dirstamp) -rm -f data/rdm/$(am__dirstamp) -rm -f doxygen/examples/$(DEPDIR)/$(am__dirstamp) -rm -f doxygen/examples/$(am__dirstamp) -rm -f examples/$(DEPDIR)/$(am__dirstamp) -rm -f examples/$(am__dirstamp) -rm -f libs/acn/$(DEPDIR)/$(am__dirstamp) -rm -f libs/acn/$(am__dirstamp) -rm -f libs/usb/$(DEPDIR)/$(am__dirstamp) -rm -f libs/usb/$(am__dirstamp) -rm -f ola/$(DEPDIR)/$(am__dirstamp) -rm -f ola/$(am__dirstamp) -rm -f olad/$(DEPDIR)/$(am__dirstamp) -rm -f olad/$(am__dirstamp) -rm -f olad/plugin_api/$(DEPDIR)/$(am__dirstamp) -rm -f olad/plugin_api/$(am__dirstamp) -rm -f plugins/artnet/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/artnet/$(am__dirstamp) -rm -f plugins/artnet/messages/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/artnet/messages/$(am__dirstamp) -rm -f plugins/dmx4linux/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/dmx4linux/$(am__dirstamp) -rm -f plugins/dummy/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/dummy/$(am__dirstamp) -rm -f plugins/e131/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/e131/$(am__dirstamp) -rm -f plugins/e131/messages/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/e131/messages/$(am__dirstamp) -rm -f plugins/espnet/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/espnet/$(am__dirstamp) -rm -f plugins/ftdidmx/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/ftdidmx/$(am__dirstamp) -rm -f plugins/gpio/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/gpio/$(am__dirstamp) -rm -f plugins/karate/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/karate/$(am__dirstamp) -rm -f plugins/kinet/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/kinet/$(am__dirstamp) -rm -f plugins/milinst/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/milinst/$(am__dirstamp) -rm -f plugins/opendmx/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/opendmx/$(am__dirstamp) -rm -f plugins/openpixelcontrol/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/openpixelcontrol/$(am__dirstamp) -rm -f plugins/osc/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/osc/$(am__dirstamp) -rm -f plugins/pathport/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/pathport/$(am__dirstamp) -rm -f plugins/renard/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/renard/$(am__dirstamp) -rm -f plugins/sandnet/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/sandnet/$(am__dirstamp) -rm -f plugins/shownet/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/shownet/$(am__dirstamp) -rm -f plugins/spi/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/spi/$(am__dirstamp) -rm -f plugins/stageprofi/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/stageprofi/$(am__dirstamp) -rm -f plugins/uartdmx/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/uartdmx/$(am__dirstamp) -rm -f plugins/usbdmx/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/usbdmx/$(am__dirstamp) -rm -f plugins/usbpro/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/usbpro/$(am__dirstamp) -rm -f plugins/usbpro/messages/$(DEPDIR)/$(am__dirstamp) -rm -f plugins/usbpro/messages/$(am__dirstamp) -rm -f protoc/$(DEPDIR)/$(am__dirstamp) -rm -f protoc/$(am__dirstamp) -rm -f tools/e133/$(DEPDIR)/$(am__dirstamp) -rm -f tools/e133/$(am__dirstamp) -rm -f tools/ja-rule/$(DEPDIR)/$(am__dirstamp) -rm -f tools/ja-rule/$(am__dirstamp) -rm -f tools/logic/$(DEPDIR)/$(am__dirstamp) -rm -f tools/logic/$(am__dirstamp) -rm -f tools/ola_trigger/$(DEPDIR)/$(am__dirstamp) -rm -f tools/ola_trigger/$(am__dirstamp) -rm -f tools/rdmpro/$(DEPDIR)/$(am__dirstamp) -rm -f tools/rdmpro/$(am__dirstamp) -rm -f tools/usbpro/$(DEPDIR)/$(am__dirstamp) -rm -f tools/usbpro/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." -test -z "$(BUILT_SOURCES)" || rm -f $(BUILT_SOURCES) clean: clean-recursive clean-am: clean-binPROGRAMS clean-checkPROGRAMS clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf common/base/$(DEPDIR) common/dmx/$(DEPDIR) common/export_map/$(DEPDIR) common/file/$(DEPDIR) common/http/$(DEPDIR) common/io/$(DEPDIR) common/math/$(DEPDIR) common/messaging/$(DEPDIR) common/network/$(DEPDIR) common/protocol/$(DEPDIR) common/rdm/$(DEPDIR) common/rpc/$(DEPDIR) common/strings/$(DEPDIR) common/system/$(DEPDIR) common/testing/$(DEPDIR) common/thread/$(DEPDIR) common/timecode/$(DEPDIR) common/utils/$(DEPDIR) common/web/$(DEPDIR) data/rdm/$(DEPDIR) doxygen/examples/$(DEPDIR) examples/$(DEPDIR) libs/acn/$(DEPDIR) libs/usb/$(DEPDIR) ola/$(DEPDIR) olad/$(DEPDIR) olad/plugin_api/$(DEPDIR) plugins/artnet/$(DEPDIR) plugins/artnet/messages/$(DEPDIR) plugins/dmx4linux/$(DEPDIR) plugins/dummy/$(DEPDIR) plugins/e131/$(DEPDIR) plugins/e131/messages/$(DEPDIR) plugins/espnet/$(DEPDIR) plugins/ftdidmx/$(DEPDIR) plugins/gpio/$(DEPDIR) plugins/karate/$(DEPDIR) plugins/kinet/$(DEPDIR) plugins/milinst/$(DEPDIR) plugins/opendmx/$(DEPDIR) plugins/openpixelcontrol/$(DEPDIR) plugins/osc/$(DEPDIR) plugins/pathport/$(DEPDIR) plugins/renard/$(DEPDIR) plugins/sandnet/$(DEPDIR) plugins/shownet/$(DEPDIR) plugins/spi/$(DEPDIR) plugins/stageprofi/$(DEPDIR) plugins/uartdmx/$(DEPDIR) plugins/usbdmx/$(DEPDIR) plugins/usbpro/$(DEPDIR) plugins/usbpro/messages/$(DEPDIR) protoc/$(DEPDIR) tools/e133/$(DEPDIR) tools/ja-rule/$(DEPDIR) tools/logic/$(DEPDIR) tools/ola_trigger/$(DEPDIR) tools/rdmpro/$(DEPDIR) tools/usbpro/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-hdr distclean-libtool distclean-tags dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dist_angularDATA \ install-dist_angularrouteDATA install-dist_bootcssDATA \ install-dist_bootfontsDATA install-dist_bootjsDATA \ install-dist_cssDATA install-dist_imgDATA \ install-dist_jqueryDATA install-dist_jsDATA \ install-dist_newDATA install-dist_piddataDATA \ install-dist_tools_rdm_testserver_imagesDATA \ install-dist_tools_rdm_testserver_staticDATA \ install-dist_viewsDATA install-dist_wwwDATA install-man \ install-nodist_artnetincludeHEADERS \ install-nodist_e131includeHEADERS \ install-nodist_olabaseincludeHEADERS \ install-nodist_olardmincludeHEADERS \ install-nodist_olatimecodeincludeHEADERS \ install-nodist_pkgincludeHEADERS \ install-nodist_pkgpythonPYTHON install-nodist_rdmtestsPYTHON \ install-nodist_rpcpythonPYTHON \ install-nodist_usbproincludeHEADERS \ install-olaacnincludeHEADERS install-olabaseincludeHEADERS \ install-olaclientincludeHEADERS install-oladincludeHEADERS \ install-oladmxincludeHEADERS install-olae133includeHEADERS \ install-olafileincludeHEADERS install-olahttpincludeHEADERS \ install-olaioincludeHEADERS install-olamathincludeHEADERS \ install-olamessagingincludeHEADERS \ install-olanetworkincludeHEADERS install-olardmincludeHEADERS \ install-olarpcincludeHEADERS install-olastlincludeHEADERS \ install-olastringsincludeHEADERS \ install-olasystemincludeHEADERS \ install-olathreadincludeHEADERS \ install-olatimecodeincludeHEADERS \ install-olautilincludeHEADERS install-olawebincludeHEADERS \ install-olawinincludeHEADERS install-pkgconfigDATA \ install-pkgincludeHEADERS install-pkgpythonPYTHON \ install-rdminitPYTHON install-rdmtestsPYTHON \ install-rpcpythonPYTHON install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-binPROGRAMS install-dist_rdmtestsexecSCRIPTS \ install-libLTLIBRARIES @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-man1 install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -rf common/base/$(DEPDIR) common/dmx/$(DEPDIR) common/export_map/$(DEPDIR) common/file/$(DEPDIR) common/http/$(DEPDIR) common/io/$(DEPDIR) common/math/$(DEPDIR) common/messaging/$(DEPDIR) common/network/$(DEPDIR) common/protocol/$(DEPDIR) common/rdm/$(DEPDIR) common/rpc/$(DEPDIR) common/strings/$(DEPDIR) common/system/$(DEPDIR) common/testing/$(DEPDIR) common/thread/$(DEPDIR) common/timecode/$(DEPDIR) common/utils/$(DEPDIR) common/web/$(DEPDIR) data/rdm/$(DEPDIR) doxygen/examples/$(DEPDIR) examples/$(DEPDIR) libs/acn/$(DEPDIR) libs/usb/$(DEPDIR) ola/$(DEPDIR) olad/$(DEPDIR) olad/plugin_api/$(DEPDIR) plugins/artnet/$(DEPDIR) plugins/artnet/messages/$(DEPDIR) plugins/dmx4linux/$(DEPDIR) plugins/dummy/$(DEPDIR) plugins/e131/$(DEPDIR) plugins/e131/messages/$(DEPDIR) plugins/espnet/$(DEPDIR) plugins/ftdidmx/$(DEPDIR) plugins/gpio/$(DEPDIR) plugins/karate/$(DEPDIR) plugins/kinet/$(DEPDIR) plugins/milinst/$(DEPDIR) plugins/opendmx/$(DEPDIR) plugins/openpixelcontrol/$(DEPDIR) plugins/osc/$(DEPDIR) plugins/pathport/$(DEPDIR) plugins/renard/$(DEPDIR) plugins/sandnet/$(DEPDIR) plugins/shownet/$(DEPDIR) plugins/spi/$(DEPDIR) plugins/stageprofi/$(DEPDIR) plugins/uartdmx/$(DEPDIR) plugins/usbdmx/$(DEPDIR) plugins/usbpro/$(DEPDIR) plugins/usbpro/messages/$(DEPDIR) protoc/$(DEPDIR) tools/e133/$(DEPDIR) tools/ja-rule/$(DEPDIR) tools/logic/$(DEPDIR) tools/ola_trigger/$(DEPDIR) tools/rdmpro/$(DEPDIR) tools/usbpro/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-binPROGRAMS uninstall-dist_angularDATA \ uninstall-dist_angularrouteDATA uninstall-dist_bootcssDATA \ uninstall-dist_bootfontsDATA uninstall-dist_bootjsDATA \ uninstall-dist_cssDATA uninstall-dist_imgDATA \ uninstall-dist_jqueryDATA uninstall-dist_jsDATA \ uninstall-dist_newDATA uninstall-dist_piddataDATA \ uninstall-dist_rdmtestsexecSCRIPTS \ uninstall-dist_tools_rdm_testserver_imagesDATA \ uninstall-dist_tools_rdm_testserver_staticDATA \ uninstall-dist_viewsDATA uninstall-dist_wwwDATA \ uninstall-libLTLIBRARIES uninstall-man \ uninstall-nodist_artnetincludeHEADERS \ uninstall-nodist_e131includeHEADERS \ uninstall-nodist_olabaseincludeHEADERS \ uninstall-nodist_olardmincludeHEADERS \ uninstall-nodist_olatimecodeincludeHEADERS \ uninstall-nodist_pkgincludeHEADERS \ uninstall-nodist_pkgpythonPYTHON \ uninstall-nodist_rdmtestsPYTHON \ uninstall-nodist_rpcpythonPYTHON \ uninstall-nodist_usbproincludeHEADERS \ uninstall-olaacnincludeHEADERS uninstall-olabaseincludeHEADERS \ uninstall-olaclientincludeHEADERS uninstall-oladincludeHEADERS \ uninstall-oladmxincludeHEADERS uninstall-olae133includeHEADERS \ uninstall-olafileincludeHEADERS \ uninstall-olahttpincludeHEADERS uninstall-olaioincludeHEADERS \ uninstall-olamathincludeHEADERS \ uninstall-olamessagingincludeHEADERS \ uninstall-olanetworkincludeHEADERS \ uninstall-olardmincludeHEADERS uninstall-olarpcincludeHEADERS \ uninstall-olastlincludeHEADERS \ uninstall-olastringsincludeHEADERS \ uninstall-olasystemincludeHEADERS \ uninstall-olathreadincludeHEADERS \ uninstall-olatimecodeincludeHEADERS \ uninstall-olautilincludeHEADERS uninstall-olawebincludeHEADERS \ uninstall-olawinincludeHEADERS uninstall-pkgconfigDATA \ uninstall-pkgincludeHEADERS uninstall-pkgpythonPYTHON \ uninstall-rdminitPYTHON uninstall-rdmtestsPYTHON \ uninstall-rpcpythonPYTHON uninstall-man: uninstall-man1 .MAKE: $(am__recursive_targets) all check check-am install install-am \ install-exec-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-TESTS check-am clean clean-binPROGRAMS \ clean-checkPROGRAMS clean-cscope clean-generic \ clean-libLTLIBRARIES clean-libtool clean-noinstLTLIBRARIES \ clean-noinstPROGRAMS cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-compile \ distclean-generic distclean-hdr distclean-libtool \ distclean-tags distcleancheck distdir distuninstallcheck dvi \ dvi-am html html-am info info-am install install-am \ install-binPROGRAMS install-data install-data-am \ install-dist_angularDATA install-dist_angularrouteDATA \ install-dist_bootcssDATA install-dist_bootfontsDATA \ install-dist_bootjsDATA install-dist_cssDATA \ install-dist_imgDATA install-dist_jqueryDATA \ install-dist_jsDATA install-dist_newDATA \ install-dist_piddataDATA install-dist_rdmtestsexecSCRIPTS \ install-dist_tools_rdm_testserver_imagesDATA \ install-dist_tools_rdm_testserver_staticDATA \ install-dist_viewsDATA install-dist_wwwDATA install-dvi \ install-dvi-am install-exec install-exec-am install-exec-hook \ install-html install-html-am install-info install-info-am \ install-libLTLIBRARIES install-man install-man1 \ install-nodist_artnetincludeHEADERS \ install-nodist_e131includeHEADERS \ install-nodist_olabaseincludeHEADERS \ install-nodist_olardmincludeHEADERS \ install-nodist_olatimecodeincludeHEADERS \ install-nodist_pkgincludeHEADERS \ install-nodist_pkgpythonPYTHON install-nodist_rdmtestsPYTHON \ install-nodist_rpcpythonPYTHON \ install-nodist_usbproincludeHEADERS \ install-olaacnincludeHEADERS install-olabaseincludeHEADERS \ install-olaclientincludeHEADERS install-oladincludeHEADERS \ install-oladmxincludeHEADERS install-olae133includeHEADERS \ install-olafileincludeHEADERS install-olahttpincludeHEADERS \ install-olaioincludeHEADERS install-olamathincludeHEADERS \ install-olamessagingincludeHEADERS \ install-olanetworkincludeHEADERS install-olardmincludeHEADERS \ install-olarpcincludeHEADERS install-olastlincludeHEADERS \ install-olastringsincludeHEADERS \ install-olasystemincludeHEADERS \ install-olathreadincludeHEADERS \ install-olatimecodeincludeHEADERS \ install-olautilincludeHEADERS install-olawebincludeHEADERS \ install-olawinincludeHEADERS install-pdf install-pdf-am \ install-pkgconfigDATA install-pkgincludeHEADERS \ install-pkgpythonPYTHON install-ps install-ps-am \ install-rdminitPYTHON install-rdmtestsPYTHON \ install-rpcpythonPYTHON install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ recheck tags tags-am uninstall uninstall-am \ uninstall-binPROGRAMS uninstall-dist_angularDATA \ uninstall-dist_angularrouteDATA uninstall-dist_bootcssDATA \ uninstall-dist_bootfontsDATA uninstall-dist_bootjsDATA \ uninstall-dist_cssDATA uninstall-dist_imgDATA \ uninstall-dist_jqueryDATA uninstall-dist_jsDATA \ uninstall-dist_newDATA uninstall-dist_piddataDATA \ uninstall-dist_rdmtestsexecSCRIPTS \ uninstall-dist_tools_rdm_testserver_imagesDATA \ uninstall-dist_tools_rdm_testserver_staticDATA \ uninstall-dist_viewsDATA uninstall-dist_wwwDATA \ uninstall-libLTLIBRARIES uninstall-man uninstall-man1 \ uninstall-nodist_artnetincludeHEADERS \ uninstall-nodist_e131includeHEADERS \ uninstall-nodist_olabaseincludeHEADERS \ uninstall-nodist_olardmincludeHEADERS \ uninstall-nodist_olatimecodeincludeHEADERS \ uninstall-nodist_pkgincludeHEADERS \ uninstall-nodist_pkgpythonPYTHON \ uninstall-nodist_rdmtestsPYTHON \ uninstall-nodist_rpcpythonPYTHON \ uninstall-nodist_usbproincludeHEADERS \ uninstall-olaacnincludeHEADERS uninstall-olabaseincludeHEADERS \ uninstall-olaclientincludeHEADERS uninstall-oladincludeHEADERS \ uninstall-oladmxincludeHEADERS uninstall-olae133includeHEADERS \ uninstall-olafileincludeHEADERS \ uninstall-olahttpincludeHEADERS uninstall-olaioincludeHEADERS \ uninstall-olamathincludeHEADERS \ uninstall-olamessagingincludeHEADERS \ uninstall-olanetworkincludeHEADERS \ uninstall-olardmincludeHEADERS uninstall-olarpcincludeHEADERS \ uninstall-olastlincludeHEADERS \ uninstall-olastringsincludeHEADERS \ uninstall-olasystemincludeHEADERS \ uninstall-olathreadincludeHEADERS \ uninstall-olatimecodeincludeHEADERS \ uninstall-olautilincludeHEADERS uninstall-olawebincludeHEADERS \ uninstall-olawinincludeHEADERS uninstall-pkgconfigDATA \ uninstall-pkgincludeHEADERS uninstall-pkgpythonPYTHON \ uninstall-rdminitPYTHON uninstall-rdmtestsPYTHON \ uninstall-rpcpythonPYTHON .PRECIOUS: Makefile @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@@DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ cd @DX_DOCDIR@/latex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(MAKEINDEX_PATH) refman.idx; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ countdown=5; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ refman.log > /dev/null 2>&1 \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ && test $$countdown -gt 0; do \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_LATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ countdown=`expr $$countdown - 1`; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ done; \ @DX_COND_doc_TRUE@@DX_COND_ps_TRUE@ $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@@DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ cd @DX_DOCDIR@/latex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_MAKEINDEX) refman.idx; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ countdown=5; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ refman.log > /dev/null 2>&1 \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ && test $$countdown -gt 0; do \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ $(DX_PDFLATEX) refman.tex; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ countdown=`expr $$countdown - 1`; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ done; \ @DX_COND_doc_TRUE@@DX_COND_pdf_TRUE@ mv refman.pdf ../@PACKAGE@.pdf @DX_COND_doc_TRUE@.PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@.INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag @DX_COND_doc_TRUE@doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) @DX_COND_doc_TRUE@@DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) @DX_COND_doc_TRUE@ rm -rf @DX_DOCDIR@ @DX_COND_doc_TRUE@ $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) @FATAL_WARNINGS_TRUE@@GNU_PLUS_PLUS_11_DEPRECATIONS_TRUE@@USING_WIN32_FALSE@ # We have to use gnu++11 for some reason, so stop it complaining about @FATAL_WARNINGS_TRUE@@GNU_PLUS_PLUS_11_DEPRECATIONS_TRUE@@USING_WIN32_FALSE@ # auto_ptr common/protocol/Ola.pb.cc common/protocol/Ola.pb.h: common/protocol/Makefile.mk common/protocol/Ola.proto $(PROTOC) --cpp_out $(top_builddir)/common/protocol --proto_path $(srcdir)/common/protocol $(srcdir)/common/protocol/Ola.proto common/protocol/OlaService.pb.cpp common/protocol/OlaService.pb.h: common/protocol/Makefile.mk common/protocol/Ola.proto protoc/ola_protoc_plugin$(EXEEXT) $(OLA_PROTOC) --cppservice_out $(top_builddir)/common/protocol --proto_path $(srcdir)/common/protocol $(srcdir)/common/protocol/Ola.proto common/rdm/Pids.pb.cc common/rdm/Pids.pb.h: common/rdm/Makefile.mk common/rdm/Pids.proto $(PROTOC) --cpp_out $(top_builddir)/common/rdm --proto_path $(srcdir)/common/rdm $(srcdir)/common/rdm/Pids.proto common/rpc/Rpc.pb.cc common/rpc/Rpc.pb.h: common/rpc/Makefile.mk common/rpc/Rpc.proto $(PROTOC) --cpp_out $(top_builddir)/common/rpc --proto_path $(srcdir)/common/rpc $(srcdir)/common/rpc/Rpc.proto common/rpc/TestService.pb.cc common/rpc/TestService.pb.h: common/rpc/Makefile.mk common/rpc/TestService.proto $(PROTOC) --cpp_out $(top_builddir)/common/rpc --proto_path $(srcdir)/common/rpc $(srcdir)/common/rpc/TestService.proto common/rpc/TestServiceService.pb.cpp common/rpc/TestServiceService.pb.h: common/rpc/Makefile.mk common/rpc/TestService.proto protoc/ola_protoc_plugin$(EXEEXT) $(OLA_PROTOC) --cppservice_out $(top_builddir)/common/rpc --proto_path $(srcdir)/common/rpc $(srcdir)/common/rpc/TestService.proto data/rdm/PidDataTest.sh: data/rdm/Makefile.mk echo "PYTHONPATH=${top_builddir}/python PIDDATA=${srcdir}/data/rdm $(PYTHON) ${srcdir}/data/rdm/PidDataTest.py; exit \$$?" > data/rdm/PidDataTest.sh chmod +x data/rdm/PidDataTest.sh # Many of the example programs are just symlinks to ola_dev_info @BUILD_EXAMPLES_TRUE@install-exec-hook-examples: @BUILD_EXAMPLES_TRUE@ $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/$(OLA_PATCH_NAME) @BUILD_EXAMPLES_TRUE@ $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_plugin_info @BUILD_EXAMPLES_TRUE@ $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_set_dmx @BUILD_EXAMPLES_TRUE@ $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_set_priority @BUILD_EXAMPLES_TRUE@ $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_uni_info @BUILD_EXAMPLES_TRUE@ $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_uni_merge @BUILD_EXAMPLES_TRUE@ $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_uni_name @BUILD_EXAMPLES_TRUE@ $(LN_S) -f $(bindir)/ola_dev_info $(DESTDIR)$(bindir)/ola_plugin_state @BUILD_EXAMPLES_TRUE@ $(LN_S) -f $(bindir)/ola_rdm_get $(DESTDIR)$(bindir)/ola_rdm_set @BUILD_EXAMPLES_TRUE@examples/RecorderVerifyTest.sh: examples/Makefile.mk @BUILD_EXAMPLES_TRUE@ echo "for FILE in ${srcdir}/examples/testdata/dos_line_endings ${srcdir}/examples/testdata/multiple_unis ${srcdir}/examples/testdata/partial_frames ${srcdir}/examples/testdata/single_uni ${srcdir}/examples/testdata/trailing_timeout; do echo \"Checking \$$FILE\"; ${top_builddir}/examples/ola_recorder${EXEEXT} --verify \$$FILE; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: \$$FILE caused ola_recorder to exit with status \$$STATUS\"; exit \$$STATUS; fi; done; exit 0" > examples/RecorderVerifyTest.sh @BUILD_EXAMPLES_TRUE@ chmod +x examples/RecorderVerifyTest.sh include/ola/rdm/RDMResponseCodes.h: include/ola/rdm/Makefile.mk include/ola/rdm/make_rdm_codes.sh common/protocol/Ola.proto mkdir -p $(top_builddir)/include/ola/rdm sh $(top_srcdir)/include/ola/rdm/make_rdm_codes.sh $(top_srcdir)/common/protocol/Ola.proto > $(top_builddir)/include/ola/rdm/RDMResponseCodes.h include/ola/timecode/TimeCodeEnums.h: include/ola/timecode/Makefile.mk include/ola/timecode/make_timecode.sh common/protocol/Ola.proto mkdir -p $(top_builddir)/include/ola/timecode sh $(top_srcdir)/include/ola/timecode/make_timecode.sh $(top_srcdir)/common/protocol/Ola.proto > $(top_builddir)/include/ola/timecode/TimeCodeEnums.h include/ola/plugin_id.h: include/ola/Makefile.mk include/ola/make_plugin_id.sh common/protocol/Ola.proto mkdir -p $(top_builddir)/include/ola sh $(top_srcdir)/include/ola/make_plugin_id.sh $(top_srcdir)/common/protocol/Ola.proto > $(top_builddir)/include/ola/plugin_id.h @USE_ARTNET_TRUE@plugins/artnet/messages/ArtNetConfigMessages.pb.cc plugins/artnet/messages/ArtNetConfigMessages.pb.h: plugins/artnet/messages/Makefile.mk plugins/artnet/messages/ArtNetConfigMessages.proto @USE_ARTNET_TRUE@ $(PROTOC) --cpp_out $(top_builddir)/plugins/artnet/messages/ --proto_path $(srcdir)/plugins/artnet/messages $(srcdir)/plugins/artnet/messages/ArtNetConfigMessages.proto @USING_WIN32_FALSE@plugins/usbpro/messages/UsbProConfigMessages.pb.cc plugins/usbpro/messages/UsbProConfigMessages.pb.h: plugins/usbpro/messages/Makefile.mk plugins/usbpro/messages/UsbProConfigMessages.proto @USING_WIN32_FALSE@ $(PROTOC) --cpp_out $(top_builddir)/plugins/usbpro/messages/ --proto_path $(srcdir)/plugins/usbpro/messages/ $(srcdir)/plugins/usbpro/messages/UsbProConfigMessages.proto @USE_E131_TRUE@@USING_WIN32_FALSE@plugins/e131/messages/E131ConfigMessages.pb.cc plugins/e131/messages/E131ConfigMessages.pb.h: plugins/e131/messages/Makefile.mk plugins/e131/messages/E131ConfigMessages.proto @USE_E131_TRUE@@USING_WIN32_FALSE@ $(PROTOC) --cpp_out $(top_builddir)/plugins/e131/messages/ --proto_path $(srcdir)/plugins/e131/messages/ $(srcdir)/plugins/e131/messages/E131ConfigMessages.proto # If we're using a different ola_protoc_plugin, we need to provide a rule to # create this file since the generated service configs depend on it. @BUILD_OLA_PROTOC_PLUGIN_FALSE@protoc/ola_protoc_plugin$(EXEEXT): @BUILD_OLA_PROTOC_PLUGIN_FALSE@ touch protoc/ola_protoc_plugin$(EXEEXT) python/ola/rpc/Rpc_pb2.py: common/rpc/Rpc.proto mkdir -p $(top_builddir)/python/ola/rpc $(PROTOC) --python_out $(top_builddir)/python/ola/rpc -I ${top_srcdir}/common/rpc/ ${top_srcdir}/common/rpc/Rpc.proto python/ola/rpc/SimpleRpcControllerTest.sh: python/ola/rpc/Makefile.mk mkdir -p $(top_builddir)/python/ola/rpc echo "PYTHONPATH=${top_builddir}/python $(PYTHON) ${srcdir}/python/ola/rpc/SimpleRpcControllerTest.py; exit \$$?" > $(top_builddir)/python/ola/rpc/SimpleRpcControllerTest.sh chmod +x $(top_builddir)/python/ola/rpc/SimpleRpcControllerTest.sh python/ola/ArtNetConfigMessages_pb2.py: $(artnet_proto) $(PROTOC) --python_out $(top_builddir)/python/ola/ -I $(artnet_path) $(artnet_proto) python/ola/Ola_pb2.py: $(ola_proto) $(PROTOC) --python_out $(top_builddir)/python/ola/ -I $(ola_path) $(ola_proto) python/ola/Pids_pb2.py: $(pids_proto) $(PROTOC) --python_out $(top_builddir)/python/ola/ -I $(pids_path) $(pids_proto) python/ola/UsbProConfigMessages_pb2.py: $(usbpro_proto) $(PROTOC) --python_out $(top_builddir)/python/ola/ -I $(usbpro_path) $(usbpro_proto) python/ola/PidStoreLocation.py: python/ola/Makefile.mk configure.ac echo "location = '${piddatadir}'" > $(top_builddir)/python/ola/PidStoreLocation.py python/ola/Version.py: python/ola/Makefile.mk configure.ac config/ola_version.m4 echo "version = '${VERSION}'" > $(top_builddir)/python/ola/Version.py # TESTS ################################################## python/ola/ClientWrapperTest.sh: python/ola/Makefile.mk mkdir -p $(top_builddir)/python/ola echo "PYTHONPATH=${top_builddir}/python $(PYTHON) ${srcdir}/python/ola/ClientWrapperTest.py; exit \$$?" > $(top_builddir)/python/ola/ClientWrapperTest.sh chmod +x $(top_builddir)/python/ola/ClientWrapperTest.sh python/ola/OlaClientTest.sh: python/ola/Makefile.mk mkdir -p $(top_builddir)/python/ola echo "PYTHONPATH=${top_builddir}/python $(PYTHON) ${srcdir}/python/ola/OlaClientTest.py; exit \$$?" > $(top_builddir)/python/ola/OlaClientTest.sh chmod +x $(top_builddir)/python/ola/OlaClientTest.sh python/ola/PidStoreTest.sh: python/ola/Makefile.mk mkdir -p $(top_builddir)/python/ola echo "PYTHONPATH=${top_builddir}/python TESTDATADIR=$(srcdir)/common/rdm/testdata $(PYTHON) ${srcdir}/python/ola/PidStoreTest.py; exit \$$?" > $(top_builddir)/python/ola/PidStoreTest.sh chmod +x $(top_builddir)/python/ola/PidStoreTest.sh python/ola/RDMTest.sh: python/ola/Makefile.mk mkdir -p $(top_builddir)/python/ola echo "PYTHONPATH=${top_builddir}/python PIDSTOREDIR=$(srcdir)/data/rdm $(PYTHON) ${srcdir}/python/ola/RDMTest.py; exit \$$?" > $(top_builddir)/python/ola/RDMTest.sh chmod +x $(top_builddir)/python/ola/RDMTest.sh python/PyCompileTest.sh: python/Makefile.mk mkdir -p $(top_builddir)/python echo "$(PYTHON) -m compileall $(PYTHON_BUILD_DIRS); exit \$$?" > $(top_builddir)/python/PyCompileTest.sh chmod +x $(top_builddir)/python/PyCompileTest.sh tools/ola_trigger/lex.yy.cpp: tools/ola_trigger/Makefile.mk tools/ola_trigger/config.lex $(LEX) -o$(top_builddir)/tools/ola_trigger/lex.yy.cpp $(srcdir)/tools/ola_trigger/config.lex tools/ola_trigger/config.tab.cpp tools/ola_trigger/config.tab.h: tools/ola_trigger/Makefile.mk tools/ola_trigger/config.ypp $(BISON) --defines=$(top_builddir)/tools/ola_trigger/config.tab.h --output-file=$(top_builddir)/tools/ola_trigger/config.tab.cpp $(srcdir)/tools/ola_trigger/config.ypp tools/ola_trigger/FileValidateTest.sh: tools/ola_trigger/Makefile.mk echo "for FILE in ${srcdir}/tools/ola_trigger/example.conf ${srcdir}/tools/ola_trigger/test_file.conf ${srcdir}/tools/ola_trigger/test_file_falling.conf ${srcdir}/tools/ola_trigger/test_file_rising.conf ${srcdir}/tools/ola_trigger/contrib/mac_volume.conf ${srcdir}/tools/ola_trigger/contrib/mac_itunes.conf ${srcdir}/tools/ola_trigger/contrib/philips_hue_osram_lightify.conf; do echo \"Checking \$$FILE\"; ${top_builddir}/tools/ola_trigger/ola_trigger${EXEEXT} --validate \$$FILE; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: \$$FILE caused ola_trigger to exit with status \$$STATUS\"; exit \$$STATUS; fi; done; exit 0" > $(top_builddir)/tools/ola_trigger/FileValidateTest.sh chmod +x $(top_builddir)/tools/ola_trigger/FileValidateTest.sh tools/rdm/ExpectedResultsTest.sh: tools/rdm/Makefile.mk mkdir -p $(top_builddir)/python/ola echo "PYTHONPATH=${top_builddir}/python $(PYTHON) ${srcdir}/tools/rdm/ExpectedResultsTest.py; exit \$$?" > $(top_builddir)/tools/rdm/ExpectedResultsTest.sh chmod +x $(top_builddir)/tools/rdm/ExpectedResultsTest.sh tools/rdm/ResponderTestTest.sh: tools/rdm/Makefile.mk mkdir -p $(top_builddir)/python/ola/testing touch $(top_builddir)/python/ola/testing/__init__.py # This link is relative within the builddir $(LN_S) -f ../../../tools/rdm $(top_builddir)/python/ola/testing/rdm echo "PYTHONPATH=${top_builddir}/python $(PYTHON) ${srcdir}/tools/rdm/ResponderTestTest.py; exit \$$?" > $(top_builddir)/tools/rdm/ResponderTestTest.sh chmod +x $(top_builddir)/tools/rdm/ResponderTestTest.sh tools/rdm/TestHelpersTest.sh: tools/rdm/Makefile.mk mkdir -p $(top_builddir)/python/ola echo "PYTHONPATH=${top_builddir}/python $(PYTHON) ${srcdir}/tools/rdm/TestHelpersTest.py; exit \$$?" > $(top_builddir)/tools/rdm/TestHelpersTest.sh chmod +x $(top_builddir)/tools/rdm/TestHelpersTest.sh tools/rdm/TestRunnerTest.sh: tools/rdm/Makefile.mk mkdir -p $(top_builddir)/python/ola/testing touch $(top_builddir)/python/ola/testing/__init__.py # This link is relative within the builddir $(LN_S) -f ../../../tools/rdm $(top_builddir)/python/ola/testing/rdm echo "PYTHONPATH=${top_builddir}/python $(PYTHON) ${srcdir}/tools/rdm/TestRunnerTest.py; exit \$$?" > $(top_builddir)/tools/rdm/TestRunnerTest.sh chmod +x $(top_builddir)/tools/rdm/TestRunnerTest.sh tools/rdm/TestStateTest.sh: tools/rdm/Makefile.mk mkdir -p $(top_builddir)/python/ola echo "PYTHONPATH=${top_builddir}/python $(PYTHON) ${srcdir}/tools/rdm/TestStateTest.py; exit \$$?" > $(top_builddir)/tools/rdm/TestStateTest.sh chmod +x $(top_builddir)/tools/rdm/TestStateTest.sh # Create DataLocation.py with the directory of the static files. @INSTALL_RDM_TESTS_TRUE@tools/rdm/DataLocation.py: tools/rdm/Makefile.mk @INSTALL_RDM_TESTS_TRUE@ mkdir -p $(top_builddir)/tools/rdm @INSTALL_RDM_TESTS_TRUE@ echo "location = '${datadir}/ola/rdm-server'" > $(top_builddir)/tools/rdm/DataLocation.py install-exec-hook: $(INSTALL_EXEC_HOOKS) # ----------------------------------------------------------------------------- # This gives us a rather hacky method to build the files normally built during # the build, so they are present for Doxygen to run against builtfiles : Makefile.am $(built_sources) .PHONY : builtfiles # dvi is run from make distcheck. Do nothing. dvi: # ----------------------------------------------------------------------------- # Create a linter target .PHONY : lint lint: flake8 cpplint # flake8 linter .PHONY : flake8 flake8: Makefile.am @FOUND_FLAKE8_TRUE@ flake8 --statistics --count @FOUND_FLAKE8_FALSE@ $(error flake8 not found. Install flake8 and re-run configure.) .PHONY : cpplint cpplint: Makefile.am @FOUND_CPPLINT_TRUE@ cpplint --filter=$(CPP_LINT_FILTER) $(CPP_LINT_FILES) @FOUND_CPPLINT_FALSE@ $(error cpplint not found. Install the forked cpplint (e.g. via pip for the latest version) and re-run configure.) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: ola-0.10.9/common/0000775000175000017500000000000014376533270010661 500000000000000ola-0.10.9/common/system/0000775000175000017500000000000014376533270012205 500000000000000ola-0.10.9/common/system/SystemUtils.cpp0000664000175000017500000000337214376533110015134 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SystemUtils.cpp * System Helper methods. * Copyright (C) 2013 Peter Newman */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include "ola/Logging.h" #include "ola/system/SystemUtils.h" namespace ola { namespace system { bool LoadAverage(load_averages average, double *value) { #ifdef HAVE_GETLOADAVG if (average >= NUMBER_LOAD_AVERAGES) { return false; } double averages[NUMBER_LOAD_AVERAGES]; uint8_t returned; returned = getloadavg(averages, NUMBER_LOAD_AVERAGES); if (returned != NUMBER_LOAD_AVERAGES) { OLA_WARN << "getloadavg only returned " << static_cast(returned) << " values, expecting " << static_cast(NUMBER_LOAD_AVERAGES) << " values"; return false; } else { *value = averages[average]; return true; } #else // No getloadavg, do something else if Windows? OLA_WARN << "getloadavg not supported, can't fetch value"; (void) average; *value = 0; return false; #endif // HAVE_GETLOADAVG } } // namespace system } // namespace ola ola-0.10.9/common/system/Limits.cpp0000664000175000017500000000274614376533110014074 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Limits.cpp * Functions that deal with system limits (rlimits) * Copyright (C) 2014 Simon Newton */ #ifndef _WIN32 #include "ola/system/Limits.h" #include #include #include #include "ola/Logging.h" namespace ola { namespace system { bool GetRLimit(int resource, struct rlimit *lim) { int r = getrlimit(resource, lim); if (r) { OLA_WARN << "getrlimit(" << resource << "): " << strerror(errno); return false; } return true; } bool SetRLimit(int resource, const struct rlimit &lim) { int r = setrlimit(resource, &lim); if (r) { OLA_WARN << "setrlimit(" << resource << "): " << strerror(errno); return false; } return true; } } // namespace system } // namespace ola #endif // _WIN32 ola-0.10.9/common/system/Makefile.mk0000664000175000017500000000024414376533110014164 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += \ common/system/Limits.cpp \ common/system/SystemUtils.cpp ola-0.10.9/common/base/0000775000175000017500000000000014376533271011574 500000000000000ola-0.10.9/common/base/CredentialsTest.cpp0000664000175000017500000001237514376533110015315 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * CredentialsTest.cpp * Test the credentials functions. * Copyright (C) 2012 Simon Newton */ #include #include "ola/base/Credentials.h" #include "ola/Logging.h" #include "ola/testing/TestUtils.h" using ola::SupportsUIDs; using ola::GetEGID; using ola::GetEUID; using ola::GetGID; using ola::GetGroupGID; using ola::GetGroupName; using ola::GetPasswdName; using ola::GetPasswdUID; using ola::GetUID; using ola::GroupEntry; using ola::PasswdEntry; using ola::SetGID; using ola::SetUID; class CredentialsTest: public CppUnit::TestFixture { public: CPPUNIT_TEST_SUITE(CredentialsTest); CPPUNIT_TEST(testGetUIDs); CPPUNIT_TEST(testGetGIDs); CPPUNIT_TEST(testSetUID); CPPUNIT_TEST(testSetGID); CPPUNIT_TEST(testGetPasswd); CPPUNIT_TEST(testGetGroup); CPPUNIT_TEST_SUITE_END(); public: void testGetUIDs(); void testGetGIDs(); void testSetUID(); void testSetGID(); void testGetPasswd(); void testGetGroup(); }; CPPUNIT_TEST_SUITE_REGISTRATION(CredentialsTest); /** * Check we're not running as root. */ void CredentialsTest::testGetUIDs() { if (SupportsUIDs()) { uid_t uid; OLA_ASSERT_TRUE(GetUID(&uid)); OLA_ASSERT_TRUE_MSG(uid, "Don't run the tests as root!"); uid_t euid; OLA_ASSERT_TRUE(GetEUID(&euid)); OLA_ASSERT_TRUE_MSG(euid, "Don't run the tests as suid root!"); } else { // Make sure the Get*UID functions actually return false. uid_t uid; OLA_ASSERT_FALSE(GetUID(&uid)); uid_t euid; OLA_ASSERT_FALSE(GetEUID(&euid)); } } /** * Check we're not running as root. */ void CredentialsTest::testGetGIDs() { if (SupportsUIDs()) { gid_t gid; OLA_ASSERT_TRUE(GetGID(&gid)); OLA_ASSERT_TRUE_MSG(gid, "Don't run the tests as root!"); gid_t egid; OLA_ASSERT_TRUE(GetEGID(&egid)); OLA_ASSERT_TRUE_MSG(egid, "Don't run the tests as sgid root!"); } else { // Make sure the Get*GID functions actually return false. gid_t gid; OLA_ASSERT_FALSE(GetGID(&gid)); gid_t egid; OLA_ASSERT_FALSE(GetEGID(&egid)); } } /** * Check SetUID as much as we can. */ void CredentialsTest::testSetUID() { if (SupportsUIDs()) { uid_t euid; OLA_ASSERT_TRUE(GetEUID(&euid)); if (euid) { OLA_ASSERT_TRUE(SetUID(euid)); OLA_ASSERT_FALSE(SetUID(0)); OLA_ASSERT_FALSE(SetUID(euid + 1)); } } } /** * Check SetGID as much as we can. */ void CredentialsTest::testSetGID() { if (SupportsUIDs()) { gid_t egid; OLA_ASSERT_TRUE(GetEGID(&egid)); if (egid) { OLA_ASSERT_TRUE(SetGID(egid)); OLA_ASSERT_FALSE(SetGID(0)); OLA_ASSERT_FALSE(SetGID(egid + 1)); } } } /** * Check the GetPasswd functions work. */ void CredentialsTest::testGetPasswd() { if (SupportsUIDs()) { uid_t uid; OLA_ASSERT_TRUE(GetUID(&uid)); PasswdEntry passwd_entry; OLA_ASSERT_TRUE(GetPasswdUID(uid, &passwd_entry)); // at the very least we should have a name OLA_ASSERT_FALSE(passwd_entry.pw_name.empty()); OLA_ASSERT_EQ(uid, passwd_entry.pw_uid); // now fetch by name and check it's the same // this could fail. if the accounts were really messed up PasswdEntry passwd_entry2; OLA_ASSERT_TRUE(GetPasswdName(passwd_entry.pw_name, &passwd_entry2)); OLA_ASSERT_EQ(uid, passwd_entry2.pw_uid); } else { // Make sure GetPasswd* actually return false. PasswdEntry unused; OLA_ASSERT_FALSE(GetPasswdUID(0, &unused)); // Check with an account name that likely exists. OLA_ASSERT_FALSE(GetPasswdName("SYSTEM", &unused)); } } /** * Check the GetGroup functions work. */ void CredentialsTest::testGetGroup() { if (SupportsUIDs()) { gid_t gid; OLA_ASSERT_TRUE(GetGID(&gid)); GroupEntry group_entry; // not all systems will be configured with a group entry so this isn't a // failure. bool ok = GetGroupGID(gid, &group_entry); if (ok) { // at the very least we should have a name OLA_ASSERT_FALSE(group_entry.gr_name.empty()); OLA_ASSERT_EQ(gid, group_entry.gr_gid); // now fetch by name and check it's the same // this could fail. if the accounts were really messed up GroupEntry group_entry2; OLA_ASSERT_TRUE(GetGroupName(group_entry.gr_name, &group_entry2)); OLA_ASSERT_EQ(gid, group_entry2.gr_gid); } } else { // Make sure GetPasswd* actually return false. GroupEntry unused; OLA_ASSERT_FALSE(GetGroupGID(0, &unused)); // Check with a group name that might exist. OLA_ASSERT_FALSE(GetGroupName("SYSTEM", &unused)); } } ola-0.10.9/common/base/Logging.cpp0000664000175000017500000001311314376533110013575 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Logging.cpp * The logging functions. See include/ola/Logging.h for details on how to use * these. * Copyright (C) 2005 Simon Newton */ /** * @addtogroup logging * @{ * * @file Logging.cpp * * @} */ #include #ifdef _WIN32 #define VC_EXTRALEAN #define WIN32_LEAN_AND_MEAN #include #include #else #include #endif // _WIN32 #include #include #include #include "ola/Logging.h" #include "ola/base/Flags.h" /**@private*/ DEFINE_s_int8(log_level, l, ola::OLA_LOG_WARN, "Set the logging level 0 .. 4."); /**@private*/ DEFINE_default_bool(syslog, false, "Send to syslog rather than stderr."); namespace ola { using std::ostringstream; using std::string; /** * @cond HIDDEN_SYMBOLS * @brief pointer to a log target */ LogDestination *log_target = NULL; log_level logging_level = OLA_LOG_WARN; /**@endcond*/ /** * @addtogroup logging * @{ */ void SetLogLevel(log_level level) { logging_level = level; } void IncrementLogLevel() { logging_level = (log_level) (logging_level + 1); if (logging_level == OLA_LOG_MAX) logging_level = OLA_LOG_NONE; } bool InitLoggingFromFlags() { log_output output = OLA_LOG_NULL; if (FLAGS_syslog) { output = OLA_LOG_SYSLOG; } else { output = OLA_LOG_STDERR; } log_level log_level = ola::OLA_LOG_WARN; switch (FLAGS_log_level) { case 0: // nothing is written at this level // so this turns logging off log_level = ola::OLA_LOG_NONE; break; case 1: log_level = ola::OLA_LOG_FATAL; break; case 2: log_level = ola::OLA_LOG_WARN; break; case 3: log_level = ola::OLA_LOG_INFO; break; case 4: log_level = ola::OLA_LOG_DEBUG; break; default : break; } return InitLogging(log_level, output); } bool InitLogging(log_level level, log_output output) { LogDestination *destination; if (output == OLA_LOG_SYSLOG) { #ifdef _WIN32 SyslogDestination *syslog_dest = new WindowsSyslogDestination(); #else SyslogDestination *syslog_dest = new UnixSyslogDestination(); #endif // _WIN32 if (!syslog_dest->Init()) { delete syslog_dest; return false; } destination = syslog_dest; } else if (output == OLA_LOG_STDERR) { destination = new StdErrorLogDestination(); } else { destination = NULL; } InitLogging(level, destination); return true; } void InitLogging(log_level level, LogDestination *destination) { SetLogLevel(level); if (log_target) { delete log_target; } log_target = destination; } /**@}*/ /**@cond HIDDEN_SYMBOLS*/ LogLine::LogLine(const char *file, int line, log_level level): m_level(level), m_stream(ostringstream::out) { m_stream << file << ":" << line << ": "; m_prefix_length = m_stream.str().length(); } LogLine::~LogLine() { Write(); } void LogLine::Write() { if (m_stream.str().length() == m_prefix_length) return; if (m_level > logging_level) return; string line = m_stream.str(); if (line.at(line.length() - 1) != '\n') line.append("\n"); if (log_target) log_target->Write(m_level, line); } /**@endcond*/ /** * @addtogroup logging * @{ */ void StdErrorLogDestination::Write(log_level level, const string &log_line) { ssize_t bytes = write(STDERR_FILENO, log_line.c_str(), log_line.size()); (void) bytes; (void) level; } #ifdef _WIN32 bool WindowsSyslogDestination::Init() { m_eventlog = RegisterEventSourceA(NULL, "OLA"); if (!m_eventlog) { printf("Failed to initialize event logging\n"); return false; } return true; } void WindowsSyslogDestination::Write(log_level level, const string &log_line) { WORD pri; const char* strings[1]; strings[0] = log_line.data(); switch (level) { case OLA_LOG_FATAL: pri = EVENTLOG_ERROR_TYPE; break; case OLA_LOG_WARN: pri = EVENTLOG_WARNING_TYPE; break; case OLA_LOG_INFO: pri = EVENTLOG_INFORMATION_TYPE; break; case OLA_LOG_DEBUG: pri = EVENTLOG_INFORMATION_TYPE; break; default: pri = EVENTLOG_INFORMATION_TYPE; } ReportEventA(reinterpret_cast(m_eventlog), pri, (WORD) NULL, (DWORD) NULL, NULL, 1, 0, strings, NULL); } #else bool UnixSyslogDestination::Init() { return true; } void UnixSyslogDestination::Write(log_level level, const string &log_line) { int pri; switch (level) { case OLA_LOG_FATAL: pri = LOG_CRIT; break; case OLA_LOG_WARN: pri = LOG_WARNING; break; case OLA_LOG_INFO: pri = LOG_INFO; break; case OLA_LOG_DEBUG: pri = LOG_DEBUG; break; default : pri = LOG_INFO; } syslog(pri, "%s", log_line.data()); } #endif // _WIN32 } // namespace ola /**@}*/ ola-0.10.9/common/base/Init.cpp0000664000175000017500000002317114376533110013117 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Init.cpp * A grab bag of functions useful for programs. * Copyright (C) 2012 Simon Newton * * Maybe one day this will handle command line parsing as well. Wouldn't that * be nice. */ /** * @addtogroup init * @{ * @file Init.cpp * @} */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef HAVE_EXECINFO_H #include #endif // HAVE_EXECINFO_H #include #include #include #include #ifdef _WIN32 #include #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN #include #else #include #endif // _WIN32 #include #include #include #include #include #include #include #include #include #include #include #include #include #include // Scheduling options. DEFINE_string(scheduler_policy, "", "The thread scheduling policy, one of {fifo, rr}."); DEFINE_uint16(scheduler_priority, 0, "The thread priority, only used if --scheduler-policy is set."); namespace { using std::cout; using std::endl; using std::string; /* * @private * @brief Print a stack trace. */ static void _DumpStackAndExit(int sig) { #ifdef _WIN32 cout << "Received " << sig << endl; #else cout << "Received " << strsignal(sig) << endl; #endif // _WIN32 #ifdef HAVE_EXECINFO_H enum {STACK_SIZE = 64}; void *array[STACK_SIZE]; size_t size = backtrace(array, STACK_SIZE); backtrace_symbols_fd(array, size, STDERR_FILENO); #endif // HAVE_EXECINFO_H exit(ola::EXIT_SOFTWARE); } bool SetThreadScheduling() { string policy_str = FLAGS_scheduler_policy.str(); ola::ToLower(&policy_str); if (policy_str.empty()) { if (FLAGS_scheduler_priority.present()) { OLA_WARN << "Must provide both of --scheduler-policy & " "--scheduler-priority"; return false; } return true; } int policy = 0; if (policy_str == "fifo") { policy = SCHED_FIFO; } else if (policy_str == "rr") { policy = SCHED_RR; } else { OLA_FATAL << "Unknown scheduling policy " << policy_str; return false; } if (!FLAGS_scheduler_priority.present()) { OLA_WARN << "Must provide both of --scheduler-policy & " "--scheduler-priority"; return false; } int requested_priority = FLAGS_scheduler_priority; #ifdef _POSIX_PRIORITY_SCHEDULING int min = sched_get_priority_min(policy); int max = sched_get_priority_max(policy); if (requested_priority < min) { OLA_WARN << "Minimum value for --scheduler-priority is " << min; return false; } if (requested_priority > max) { OLA_WARN << "Maximum value for --scheduler-priority is " << max; return false; } #endif // _POSIX_PRIORITY_SCHEDULING // Set the scheduling parameters. struct sched_param param; param.sched_priority = requested_priority; OLA_INFO << "Scheduling policy is " << ola::thread::PolicyToString(policy) << ", priority " << param.sched_priority; bool ok = ola::thread::SetSchedParam(pthread_self(), policy, param); if (!ok) { return false; } // If RLIMIT_RTTIME is available, set a bound on the length of uninterrupted // CPU time we can consume. #if HAVE_DECL_RLIMIT_RTTIME struct rlimit rlim; if (!ola::system::GetRLimit(RLIMIT_RTTIME, &rlim)) { return false; } // Cap CPU time at 1s. rlim.rlim_cur = 1000000; OLA_DEBUG << "Setting RLIMIT_RTTIME " << rlim.rlim_cur << " / " << rlim.rlim_max; if (!ola::system::SetRLimit(RLIMIT_RTTIME, rlim)) { return false; } if (!ola::InstallSignal(SIGXCPU, _DumpStackAndExit)) { return false; } #endif // HAVE_DECL_RLIMIT_RTTIME return true; } } // namespace namespace ola { /** * @addtogroup init * @{ */ using std::cout; using std::endl; using std::string; bool ServerInit(int argc, char *argv[], ExportMap *export_map) { ClockInit(); ola::math::InitRandom(); if (!InstallSEGVHandler()) { return false; } if (export_map) { InitExportMap(argc, argv, export_map); } return SetThreadScheduling() && NetworkInit(); } bool ServerInit(int *argc, char *argv[], ExportMap *export_map, const string &first_line, const string &description) { // Take a copy of the arguments otherwise the export map is incorrect. int original_argc = *argc; char *original_argv[original_argc]; for (int i = 0; i < original_argc; i++) { original_argv[i] = argv[i]; } SetHelpString(first_line, description); ParseFlags(argc, argv); InitLoggingFromFlags(); return ServerInit(original_argc, original_argv, export_map); } bool AppInit(int *argc, char *argv[], const string &first_line, const string &description) { ClockInit(); ola::math::InitRandom(); SetHelpString(first_line, description); ParseFlags(argc, argv); InitLoggingFromFlags(); if (!InstallSEGVHandler()) { return false; } return SetThreadScheduling() && NetworkInit(); } #ifdef _WIN32 static void NetworkShutdown() { WSACleanup(); } #endif // _WIN32 bool NetworkInit() { #ifdef _WIN32 WSADATA wsa_data; int result = WSAStartup(MAKEWORD(2, 0), &wsa_data); if (result != 0) { OLA_WARN << "WinSock initialization failed with " << result; return false; } else { atexit(NetworkShutdown); return true; } #else return true; #endif // _WIN32 } bool InstallSignal(int sig, void(*fp)(int signo)) { #ifdef _WIN32 if (::signal(sig, fp) == SIG_ERR) { OLA_WARN << "signal(" << sig << ": " << strerror(errno); return false; } #else struct sigaction action; action.sa_handler = fp; sigemptyset(&action.sa_mask); action.sa_flags = 0; if (sigaction(sig, &action, NULL) < 0) { OLA_WARN << "sigaction(" << strsignal(sig) << ": " << strerror(errno); return false; } #endif // _WIN32 return true; } bool InstallSEGVHandler() { #ifndef _WIN32 if (!InstallSignal(SIGBUS, _DumpStackAndExit)) { return false; } #endif // !_WIN32 if (!InstallSignal(SIGSEGV, _DumpStackAndExit)) { return false; } return true; } void InitExportMap(int argc, char* argv[], ExportMap *export_map) { ola::StringVariable *var = export_map->GetStringVar("binary"); var->Set(argv[0]); var = export_map->GetStringVar("cmd-line"); std::ostringstream out; for (int i = 1; i < argc; i++) { out << argv[i] << " "; } var->Set(out.str()); var = export_map->GetStringVar("fd-limit"); #ifdef _WIN32 { std::ostringstream out; out << _getmaxstdio(); var->Set(out.str()); } #else struct rlimit rl; if (getrlimit(RLIMIT_NOFILE, &rl) < 0) { var->Set("undetermined"); } else { std::ostringstream out; out << rl.rlim_cur; var->Set(out.str()); } #endif // _WIN32 } void Daemonise() { #ifndef _WIN32 struct rlimit rl; if (getrlimit(RLIMIT_NOFILE, &rl) < 0) { OLA_FATAL << "Could not determine file limit"; exit(EXIT_OSFILE); } // fork so we're not the process group leader pid_t pid; if ((pid = fork()) < 0) { OLA_FATAL << "Could not fork\n"; exit(EXIT_OSERR); } else if (pid != 0) { exit(EXIT_OK); } // start a new session so we're the session leader and we free ourselves from // the controlling terminal. setsid(); struct sigaction sa; sa.sa_handler = SIG_IGN; sigemptyset(&sa.sa_mask); sa.sa_flags = 0; if (sigaction(SIGHUP, &sa, NULL) < 0) { OLA_FATAL << "Could not install signal\n"; exit(EXIT_OSERR); } // fork to ensure we're not the session leader. if ((pid = fork()) < 0) { OLA_FATAL << "Could not fork\n"; exit(EXIT_OSERR); } else if (pid != 0) { exit(EXIT_OK); } // change the current working directory if (chdir("/") < 0) { OLA_FATAL << "Can't change directory to /"; exit(EXIT_OSERR); } // close all fds int maxfd = sysconf(_SC_OPEN_MAX); if (maxfd == -1) { if (rl.rlim_max == RLIM_INFINITY) { maxfd = 1024; } else { maxfd = rl.rlim_max; } } for (int fd = 0; fd < maxfd; fd++) { close(fd); } // send stdout, in and err to /dev/null int fd0 = open("/dev/null", O_RDWR); int fd1 = dup(0); int fd2 = dup(0); if (fd0 != STDIN_FILENO || fd1 != STDOUT_FILENO || fd2 != STDERR_FILENO) { OLA_FATAL << "Unexpected file descriptors: " << fd0 << ", " << fd1 << ", " << fd2; exit(EXIT_OSERR); } #endif // _WIN32 } void ClockInit() { Clock clock; TimeStamp now_monotonic; TimeStamp now_realtime; #ifndef CLOCK_MONOTONIC OLA_DEBUG << "Monotonic clock unavailable. Falling back to real time clock."; #endif clock.CurrentMonotonicTime(&now_monotonic); clock.CurrentRealTime(&now_realtime); OLA_DEBUG << "Monotonic clock: " << std::setw(18) << now_monotonic; OLA_DEBUG << "Real clock : " << std::setw(18) << now_realtime; } /**@}*/ } // namespace ola ola-0.10.9/common/base/Version.cpp0000664000175000017500000000310414376533110013633 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Version.cpp * Provides version information for all of OLA. * Copyright (C) 2014 Peter Newman */ #include "ola/base/Version.h" #include #include namespace ola { namespace base { using std::string; unsigned int Version::GetMajor() { return OLA_VERSION_MAJOR; } unsigned int Version::GetMinor() { return OLA_VERSION_MINOR; } unsigned int Version::GetRevision() { return OLA_VERSION_REVISION; } string Version::GetVersion() { std::ostringstream str; str << GetMajor() << "." << GetMinor() << "." << GetRevision(); return str.str(); } bool Version::IsAtLeast(unsigned int major, unsigned int minor, unsigned int revision) { return ( GetMajor() >= major && GetMinor() >= minor && GetRevision() >= revision); } } // namespace base } // namespace ola ola-0.10.9/common/base/Flags.cpp0000664000175000017500000002626014376533110013252 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Flags.cpp * Handle command line flags. * Copyright (C) 2013 Simon Newton */ /** * @addtogroup flags * @{ * @file common/base/Flags.cpp * @} */ #include #include #include #include #include #include "ola/base/Array.h" #include "ola/base/Flags.h" #include "ola/base/SysExits.h" #include "ola/base/Version.h" #include "ola/file/Util.h" #include "ola/stl/STLUtils.h" /** * @private * @brief Define the help flag */ DEFINE_s_default_bool(help, h, false, "Display the help message"); DEFINE_s_default_bool(version, v, false, "Display version information"); DEFINE_default_bool(gen_manpage, false, "Generate a man page snippet"); namespace ola { /** * @addtogroup flags * @{ */ using std::cerr; using std::cout; using std::endl; using std::string; using std::vector; /** * The prefix used on inverted bool flags * @examplepara * @code * DEFINE_s_default_bool(noMaster, d, false, "Dummy flag to show NO_PREFIX") * @endcode * * Then if you called your application with that flag: * @code * bash$myapplication -d * @endcode * Then the noMaster flag would be true. */ const char Flag::NO_PREFIX[] = "no-"; void SetHelpString(const string &first_line, const string &description) { GetRegistry()->SetFirstLine(first_line); GetRegistry()->SetDescription(description); } void DisplayUsage() { GetRegistry()->DisplayUsage(); } void DisplayUsageAndExit() { GetRegistry()->DisplayUsage(); exit(ola::EXIT_USAGE); } void DisplayVersion() { GetRegistry()->DisplayVersion(); } void GenManPage() { GetRegistry()->GenManPage(); } void ParseFlags(int *argc, char **argv) { GetRegistry()->ParseFlags(argc, argv); } /** * @} * @cond HIDDEN_SYMBOLS */ static FlagRegistry *registry = NULL; /* * Registered as an atexit function by the FlagRegistry constructor. */ void DeleteFlagRegistry() { FlagRegistry *old_registry = registry; registry = NULL; delete old_registry; } /* * Change the input to s/_/-/g */ void BaseFlag::ReplaceUnderscoreWithHyphen(char *input) { for (char *c = input; *c; c++) { if (*c == '_') *c = '-'; } } /* * Convert a flag name to the canonical representation. */ const char *BaseFlag::NewCanonicalName(const char *name) { unsigned int total_size = strlen(name) + 1; char *output = new char[total_size]; char *o = output; for (const char *i = name; *i; i++, o++) { if (*i == '_') *o = '-'; else *o = *i; } output[total_size - 1] = 0; return output; } /** * @private * Get the global FlagRegistry object. */ FlagRegistry *GetRegistry() { if (!registry) { registry = new FlagRegistry(); atexit(DeleteFlagRegistry); } return registry; } /** * Register a flag. */ void FlagRegistry::RegisterFlag(FlagInterface *flag) { STLInsertOrDie(&m_long_opts, flag->name(), flag); if (flag->short_opt()) { STLInsertOrDie(&m_short_opts, flag->short_opt(), flag); } } /** * @brief Parse the command line flags. This re-arranges argv so that only the * non-flag options remain. */ void FlagRegistry::ParseFlags(int *argc, char **argv) { const string long_option_prefix("--"); const string short_option_prefix("-"); m_argv0 = argv[0]; int c; int option_index = 0; const string short_opts = GetShortOptsString(); FlagMap flags; const struct option *long_options = GetLongOpts(&flags); optind = 0; // reset each time while (1) { c = getopt_long(*argc, argv, short_opts.c_str(), long_options, &option_index); if (c == -1) { break; } else if (c == '?') { exit(EXIT_USAGE); } FlagInterface *flag = STLFindOrNull(flags, c); if (!flag) { cerr << "Missing flag " << c << endl; } else { if (flag->has_arg()) { if (!flag->SetValue(optarg)) { cerr << "Invalid arg value " << optarg << " for flag " << flag->name() << endl; exit(EXIT_USAGE); } } else { if (!flag->SetValue("1")) { cerr << "Failed to set value of 1 for flag " << flag->name() << endl; exit(EXIT_USAGE); } } } } if (FLAGS_help) { DisplayUsage(); exit(EXIT_OK); } if (FLAGS_version) { DisplayVersion(); exit(EXIT_OK); } if (FLAGS_gen_manpage) { GenManPage(); exit(EXIT_OK); } delete[] long_options; // Remove flags so only non-flag arguments remain. for (int i = 0; i < *argc - optind; i++) { argv[1 + i] = argv[optind + i]; } *argc = 1 + *argc - optind; } void FlagRegistry::SetFirstLine(const string &first_line) { m_first_line = first_line; } void FlagRegistry::SetDescription(const string &description) { m_description = description; } /* * @brief Print the usage text to stdout */ void FlagRegistry::DisplayUsage() { cout << "Usage: " << m_argv0 << " " << m_first_line << endl << endl; if (!m_description.empty()) { cout << m_description << endl << endl; } // - comes before a-z which means flags without long options appear first. To // avoid this we keep two lists. vector short_flag_lines, long_flag_lines; LongOpts::const_iterator iter = m_long_opts.begin(); for (; iter != m_long_opts.end(); ++iter) { std::ostringstream str; const FlagInterface *flag = iter->second; if (flag->name() == FLAGS_gen_manpage.name()) { continue; } str << " "; if (flag->short_opt()) { str << "-" << flag->short_opt() << ", "; } str << "--" << flag->name(); if (flag->has_arg()) { str << " <" << flag->arg_type() << ">"; } str << endl << " " << iter->second->help() << endl; if (flag->short_opt()) short_flag_lines.push_back(str.str()); else long_flag_lines.push_back(str.str()); } PrintFlags(&short_flag_lines); PrintFlags(&long_flag_lines); } /* * @brief Print the version text to stdout */ void FlagRegistry::DisplayVersion() { cout << "OLA " << m_argv0 << " version: " << ola::base::Version::GetVersion() << endl; } void FlagRegistry::GenManPage() { char date_str[100]; time_t curtime; curtime = time(NULL); struct tm loctime; #ifdef _WIN32 loctime = *gmtime(&curtime); // NOLINT(runtime/threadsafe_fn) #else gmtime_r(&curtime, &loctime); #endif // _WIN32 strftime(date_str, arraysize(date_str), "%B %Y", &loctime); string exe_name = ola::file::FilenameFromPathOrPath(m_argv0); if (0 != exe_name.compare(m_argv0)) { // Strip lt- off the start if present, in case we're generating the man // page from a libtool wrapper script for the exe ola::StripPrefix(&exe_name, "lt-"); } // Convert newlines to a suitable format for man pages string man_description = m_description; ReplaceAll(&man_description, "\n", "\n.PP\n"); // Guess at a single line synopsis, match ". " so we don't get standards string synopsis = ""; std::size_t pos = man_description.find(". "); if (pos != string::npos) { synopsis = man_description.substr(0, pos + 1); } else { synopsis = man_description; } cout << ".TH " << exe_name << " 1 \"" << date_str << "\"" << endl; cout << ".SH NAME" << endl; cout << exe_name << " \\- " << synopsis << endl; cout << ".SH SYNOPSIS" << endl; cout << ".B " << exe_name << endl; cout << m_first_line << endl; cout << ".SH DESCRIPTION" << endl; cout << ".B " << exe_name << endl; cout << man_description << endl; cout << ".SH OPTIONS" << endl; // - comes before a-z which means flags without long options appear first. To // avoid this we keep two lists. vector short_flag_lines, long_flag_lines; LongOpts::const_iterator iter = m_long_opts.begin(); for (; iter != m_long_opts.end(); ++iter) { const FlagInterface *flag = iter->second; if (flag->name() == FLAGS_gen_manpage.name()) { continue; } std::ostringstream str; if (flag->short_opt()) { str << "-" << flag->short_opt() << ", "; } str << "--" << flag->name(); if (flag->has_arg()) { str << " <" << flag->arg_type() << ">"; } if (flag->short_opt()) { short_flag_lines.push_back( OptionPair(str.str(), iter->second->help())); } else { long_flag_lines.push_back( OptionPair(str.str(), iter->second->help())); } } PrintManPageFlags(&short_flag_lines); PrintManPageFlags(&long_flag_lines); } /** * @brief Generate the short opts string for getopt. See `man 3 getopt` for the * format. */ string FlagRegistry::GetShortOptsString() const { string short_opts; ShortOpts::const_iterator iter = m_short_opts.begin(); for (; iter != m_short_opts.end(); ++iter) { char short_opt = iter->second->short_opt(); if (!short_opt) continue; short_opts.push_back(iter->second->short_opt()); if (iter->second->has_arg()) { short_opts.push_back(':'); } } return short_opts; } /** * @brief Allocate & populate the array of option structs for the call to * getopt_long. The caller is responsible for deleting the array. * * The flag_map is populated with the option identifier (int) to FlagInterface* * mappings. The ownership of the pointers to FlagInterfaces is not transferred * to the caller. */ struct option *FlagRegistry::GetLongOpts(FlagMap *flag_map) { unsigned int flag_count = m_long_opts.size() + 1; struct option *long_options = new struct option[flag_count]; memset(long_options, 0, sizeof(struct option) * flag_count); LongOpts::iterator iter = m_long_opts.begin(); struct option *opt = long_options; int flag_counter = 256; for (; iter != m_long_opts.end(); ++iter) { FlagInterface *flag = iter->second; opt->name = flag->name(); opt->has_arg = flag->has_arg() ? required_argument : no_argument; opt->flag = 0; int flag_option = flag->short_opt() ? flag->short_opt() : flag_counter++; opt->val = flag_option; flag_map->insert(FlagMap::value_type(flag_option, flag)); opt++; } return long_options; } /** * @brief Given a vector of flags lines, sort them and print to stdout. */ void FlagRegistry::PrintFlags(vector *lines) { std::sort(lines->begin(), lines->end()); vector::const_iterator iter = lines->begin(); for (; iter != lines->end(); ++iter) cout << *iter; } void FlagRegistry::PrintManPageFlags(vector *lines) { std::sort(lines->begin(), lines->end()); vector::const_iterator iter = lines->begin(); for (; iter != lines->end(); ++iter) { cout << ".IP \"" << iter->first << "\"" << endl; cout << iter->second << endl; } } /** * @endcond * End Hidden Symbols */ } // namespace ola ola-0.10.9/common/base/SysExits.cpp0000664000175000017500000000633414376533110014011 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SysExits.cpp * Exit codes. * * Some platforms (android) don't provide sysexits.h. To work around this we * define our own exit codes, which use the system values if provided, or * otherwise default values. */ /** * @addtogroup sysexit * @{ * @file SysExits.cpp * @} */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef HAVE_SYSEXITS_H #include #else // Copied from the Berkeley sources. /** * @addtogroup sysexit * @{ */ /** * @name Fallback values * @details These are the values we fall back to in case the os doesn't provide * exit codes * @{ */ #define EX_OK 0 /**< @brief successful termination */ #define EX__BASE 64 /**< @brief base value for error messages */ #define EX_USAGE 64 /**< @brief command line usage error */ #define EX_DATAERR 65 /**< @brief data format error */ #define EX_NOINPUT 66 /**< @brief cannot open input */ #define EX_NOUSER 67 /**< @brief addressee unknown */ #define EX_NOHOST 68 /**< @brief host name unknown */ #define EX_UNAVAILABLE 69 /**< @brief service unavailable */ #define EX_SOFTWARE 70 /**< @brief internal software error */ #define EX_OSERR 71 /**< @brief system error (e.g., can't fork) */ #define EX_OSFILE 72 /**< @brief critical OS file missing */ #define EX_CANTCREAT 73 /**< @brief can't create (user) output file */ #define EX_IOERR 74 /**< @brief input/output error */ #define EX_TEMPFAIL 75 /**< @brief temp failure; user is invited to retry */ #define EX_PROTOCOL 76 /**< @brief remote error in protocol */ #define EX_NOPERM 77 /**< @brief permission denied */ #define EX_CONFIG 78 /**< @brief configuration error */ #define EX__MAX 78 /**< @brief maximum listed value */ /** * @} * @} */ #endif // HAVE_SYSEXITS_H #include "ola/base/SysExits.h" namespace ola { /** * @addtogroup sysexit * @{ */ const int EXIT_OK = EX_OK; const int EXIT__BASE = EX__BASE; const int EXIT_USAGE = EX_USAGE; const int EXIT_DATAERR = EX_DATAERR; const int EXIT_NOINPUT = EX_NOINPUT; const int EXIT_NOUSER = EX_NOUSER; const int EXIT_NOHOST = EX_NOHOST; const int EXIT_UNAVAILABLE = EX_UNAVAILABLE; const int EXIT_SOFTWARE = EX_SOFTWARE; const int EXIT_OSERR = EX_OSERR; const int EXIT_OSFILE = EX_OSFILE; const int EXIT_CANTCREAT = EX_CANTCREAT; const int EXIT_IOERR = EX_IOERR; const int EXIT_TEMPFAIL = EX_TEMPFAIL; const int EXIT_PROTOCOL = EX_PROTOCOL; const int EXIT_NOPERM = EX_NOPERM; const int EXIT_CONFIG = EX_CONFIG; const int EXIT__MAX = EX__MAX; /**@}*/ } // namespace ola ola-0.10.9/common/base/LoggingTest.cpp0000664000175000017500000000737314376533110014450 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * LoggingTest.cpp * Test fixture for the Logging framework * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/testing/TestUtils.h" using std::deque; using std::vector; using std::string; using ola::IncrementLogLevel; using ola::log_level; class LoggingTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(LoggingTest); CPPUNIT_TEST(testLogging); CPPUNIT_TEST_SUITE_END(); public: void testLogging(); }; class MockLogDestination: public ola::LogDestination { public: void AddExpected(log_level level, string log_line); void Write(log_level level, const string &log_line); int LinesRemaining() const { return m_log_lines.size(); } private: deque > m_log_lines; }; CPPUNIT_TEST_SUITE_REGISTRATION(LoggingTest); void MockLogDestination::AddExpected(log_level level, string log_line) { std::pair expected_result(level, log_line); m_log_lines.push_back(expected_result); } /* * Check that what gets written is what we expected */ void MockLogDestination::Write(log_level level, const string &log_line) { vector tokens; ola::StringSplit(log_line, &tokens, ":"); OLA_ASSERT_EQ(tokens.size() , (size_t) 3); OLA_ASSERT_GT(m_log_lines.size(), 0); std::pair expected_result = m_log_lines.at(0); m_log_lines.pop_front(); OLA_ASSERT_EQ(expected_result.first, level); OLA_ASSERT_EQ(expected_result.second, tokens.at(2)); } /* * Check that logging works correctly. */ void LoggingTest::testLogging() { MockLogDestination *destination = new MockLogDestination(); InitLogging(ola::OLA_LOG_DEBUG, destination); destination->AddExpected(ola::OLA_LOG_DEBUG, " debug\n"); OLA_DEBUG << "debug"; destination->AddExpected(ola::OLA_LOG_INFO, " info\n"); OLA_INFO << "info"; destination->AddExpected(ola::OLA_LOG_WARN, " warn\n"); OLA_WARN << "warn"; destination->AddExpected(ola::OLA_LOG_FATAL, " fatal\n"); OLA_FATAL << "fatal"; // Now make sure nothing below WARN is logged ola::SetLogLevel(ola::OLA_LOG_WARN); OLA_DEBUG << "debug"; OLA_INFO << "info"; destination->AddExpected(ola::OLA_LOG_WARN, " warn\n"); OLA_WARN << "warn"; destination->AddExpected(ola::OLA_LOG_FATAL, " fatal\n"); OLA_FATAL << "fatal"; OLA_ASSERT_EQ(destination->LinesRemaining(), 0); // set the log level to INFO IncrementLogLevel(); OLA_DEBUG << "debug"; destination->AddExpected(ola::OLA_LOG_INFO, " info\n"); OLA_INFO << "info"; destination->AddExpected(ola::OLA_LOG_WARN, " warn\n"); OLA_WARN << "warn"; destination->AddExpected(ola::OLA_LOG_FATAL, " fatal\n"); OLA_FATAL << "fatal"; OLA_ASSERT_EQ(destination->LinesRemaining(), 0); IncrementLogLevel(); // this should wrap to NONE IncrementLogLevel(); OLA_DEBUG << "debug"; OLA_INFO << "info"; OLA_WARN << "warn"; OLA_FATAL << "fatal"; OLA_ASSERT_EQ(destination->LinesRemaining(), 0); } ola-0.10.9/common/base/FlagsTest.cpp0000664000175000017500000003141014376533110014103 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * FlagsTest.cpp * Test the flags parsing code. * Copyright (C) 2013 Simon Newton */ #include #include #include "ola/Logging.h" #include "ola/base/Flags.h" #include "ola/testing/TestUtils.h" DEFINE_default_bool(default_false, false, "Default False"); DEFINE_default_bool(default_true, true, "Default True"); DEFINE_bool(default_false_arg, false, "Default False Arg"); DEFINE_bool(default_true_arg, true, "Default True Arg"); DEFINE_int8(f_int8, -10, "Default -10"); DEFINE_uint8(f_uint8, 10, "Default 10"); DEFINE_int16(f_int16, -1000, "Default -1000"); DEFINE_uint16(f_uint16, 1000, "Default 1000"); DEFINE_int32(f_int32, -2000, "Default -2000"); DEFINE_uint32(f_uint32, 2000, "Default 2000"); DEFINE_string(f_str, "foo", "Test String"); // now flags with short options DEFINE_s_default_bool(s_default_false, a, false, "Default False"); DEFINE_s_default_bool(s_default_true, b, true, "Default True"); DEFINE_s_bool(s_default_false_arg, c, false, "Default False Arg"); DEFINE_s_bool(s_default_true_arg, d, true, "Default True Arg"); DEFINE_s_int8(s_int8, e, -10, "Default -10"); DEFINE_s_uint8(s_uint8, f, 10, "Default 10"); DEFINE_s_int16(s_int16, g, -1000, "Default -1000"); // no h, already reserved for help DEFINE_s_uint16(s_uint16, i, 1000, "Default 1000"); DEFINE_s_int32(s_int32, j, -2000, "Default -2000"); DEFINE_s_uint32(s_uint32, k, 2000, "Default 2000"); // no l, already reserved for logging DEFINE_s_string(s_str, m, "bar", "Test String"); using std::string; class FlagsTest: public CppUnit::TestFixture { public: CPPUNIT_TEST_SUITE(FlagsTest); CPPUNIT_TEST(testDefaults); CPPUNIT_TEST(testSetting); CPPUNIT_TEST(testBoolFlags); CPPUNIT_TEST(testIntFlags); CPPUNIT_TEST(testStringFlags); CPPUNIT_TEST(testFinalPresence); CPPUNIT_TEST_SUITE_END(); public: void testDefaults(); void testPresence(bool presence); void testSetting(); void testBoolFlags(); void testIntFlags(); void testStringFlags(); void testFinalPresence(); }; CPPUNIT_TEST_SUITE_REGISTRATION(FlagsTest); /** * Check the defaults are correct. */ void FlagsTest::testDefaults() { OLA_ASSERT_EQ(false, static_cast(FLAGS_default_false)); OLA_ASSERT_EQ(true, static_cast(FLAGS_default_true)); OLA_ASSERT_EQ(false, static_cast(FLAGS_default_false_arg)); OLA_ASSERT_EQ(true, static_cast(FLAGS_default_true_arg)); OLA_ASSERT_EQ(static_cast(-10), static_cast(FLAGS_f_int8)); OLA_ASSERT_EQ(static_cast(10), static_cast(FLAGS_f_uint8)); OLA_ASSERT_EQ(static_cast(-1000), static_cast(FLAGS_f_int16)); OLA_ASSERT_EQ(static_cast(1000), static_cast(FLAGS_f_uint16)); OLA_ASSERT_EQ(static_cast(-2000), static_cast(FLAGS_f_int32)); OLA_ASSERT_EQ(static_cast(2000), static_cast(FLAGS_f_uint32)); OLA_ASSERT_EQ(string("foo"), FLAGS_f_str.str()); OLA_ASSERT_EQ(false, static_cast(FLAGS_s_default_false)); OLA_ASSERT_EQ(true, static_cast(FLAGS_s_default_true)); OLA_ASSERT_EQ(false, static_cast(FLAGS_s_default_false_arg)); OLA_ASSERT_EQ(true, static_cast(FLAGS_s_default_true_arg)); OLA_ASSERT_EQ(static_cast(-10), static_cast(FLAGS_s_int8)); OLA_ASSERT_EQ(static_cast(10), static_cast(FLAGS_s_uint8)); OLA_ASSERT_EQ(static_cast(-1000), static_cast(FLAGS_s_int16)); OLA_ASSERT_EQ(static_cast(1000), static_cast(FLAGS_s_uint16)); OLA_ASSERT_EQ(static_cast(-2000), static_cast(FLAGS_s_int32)); OLA_ASSERT_EQ(static_cast(2000), static_cast(FLAGS_s_uint32)); OLA_ASSERT_EQ(string("bar"), FLAGS_s_str.str()); testPresence(false); } /** * Check the presence state. */ void FlagsTest::testPresence(bool presence) { OLA_ASSERT_EQ(presence, FLAGS_default_false.present()); OLA_ASSERT_EQ(presence, FLAGS_default_true.present()); OLA_ASSERT_EQ(presence, FLAGS_default_false_arg.present()); OLA_ASSERT_EQ(presence, FLAGS_default_true_arg.present()); OLA_ASSERT_EQ(presence, FLAGS_f_int8.present()); OLA_ASSERT_EQ(presence, FLAGS_f_uint8.present()); OLA_ASSERT_EQ(presence, FLAGS_f_int16.present()); OLA_ASSERT_EQ(presence, FLAGS_f_uint16.present()); OLA_ASSERT_EQ(presence, FLAGS_f_int32.present()); OLA_ASSERT_EQ(presence, FLAGS_f_uint32.present()); OLA_ASSERT_EQ(presence, FLAGS_f_str.present()); OLA_ASSERT_EQ(presence, FLAGS_s_default_false.present()); OLA_ASSERT_EQ(presence, FLAGS_s_default_true.present()); OLA_ASSERT_EQ(presence, FLAGS_s_default_false_arg.present()); OLA_ASSERT_EQ(presence, FLAGS_s_default_true_arg.present()); OLA_ASSERT_EQ(presence, FLAGS_s_int8.present()); OLA_ASSERT_EQ(presence, FLAGS_s_uint8.present()); OLA_ASSERT_EQ(presence, FLAGS_s_int16.present()); OLA_ASSERT_EQ(presence, FLAGS_s_uint16.present()); OLA_ASSERT_EQ(presence, FLAGS_s_int32.present()); OLA_ASSERT_EQ(presence, FLAGS_s_uint32.present()); OLA_ASSERT_EQ(presence, FLAGS_s_str.present()); } /** * Check that we can set the flags */ void FlagsTest::testSetting() { OLA_ASSERT_EQ(false, static_cast(FLAGS_default_false)); OLA_ASSERT_EQ(true, static_cast(FLAGS_default_true)); OLA_ASSERT_EQ(false, static_cast(FLAGS_default_false_arg)); OLA_ASSERT_EQ(true, static_cast(FLAGS_default_true_arg)); OLA_ASSERT_EQ(static_cast(-10), static_cast(FLAGS_f_int8)); OLA_ASSERT_EQ(static_cast(10), static_cast(FLAGS_f_uint8)); OLA_ASSERT_EQ(static_cast(-1000), static_cast(FLAGS_f_int16)); OLA_ASSERT_EQ(static_cast(1000), static_cast(FLAGS_f_uint16)); OLA_ASSERT_EQ(static_cast(-2000), static_cast(FLAGS_f_int32)); OLA_ASSERT_EQ(static_cast(2000), static_cast(FLAGS_f_uint32)); OLA_ASSERT_EQ(string("foo"), FLAGS_f_str.str()); FLAGS_default_false = true; FLAGS_default_true = false; FLAGS_default_false_arg = true; FLAGS_default_true_arg = false; FLAGS_f_int8 = -20; FLAGS_f_uint8 = 20; FLAGS_f_int16 = -2000; FLAGS_f_uint16 = 2000; FLAGS_f_int32 = -4000; FLAGS_f_uint32 = 4000; FLAGS_f_str = "hello"; OLA_ASSERT_EQ(true, static_cast(FLAGS_default_false)); OLA_ASSERT_EQ(false, static_cast(FLAGS_default_true)); OLA_ASSERT_EQ(true, static_cast(FLAGS_default_false_arg)); OLA_ASSERT_EQ(false, static_cast(FLAGS_default_true_arg)); OLA_ASSERT_EQ(static_cast(-20), static_cast(FLAGS_f_int8)); OLA_ASSERT_EQ(static_cast(20), static_cast(FLAGS_f_uint8)); OLA_ASSERT_EQ(static_cast(-2000), static_cast(FLAGS_f_int16)); OLA_ASSERT_EQ(static_cast(2000), static_cast(FLAGS_f_uint16)); OLA_ASSERT_EQ(static_cast(-4000), static_cast(FLAGS_f_int32)); OLA_ASSERT_EQ(static_cast(4000), static_cast(FLAGS_f_uint32)); OLA_ASSERT_EQ(string("hello"), FLAGS_f_str.str()); testPresence(false); } /** * Check bool flags */ void FlagsTest::testBoolFlags() { char bin_name[] = "foo"; char opt1[] = "--default-false"; char opt2[] = "--no-default-true"; char opt3[] = "--default-false-arg"; char opt4[] = "true"; char opt5[] = "--default-true-arg"; char opt6[] = "off"; char *argv[] = {bin_name, opt1, opt2, opt3, opt4, opt5, opt6}; int argc = sizeof(argv) / sizeof(argv[0]); ola::ParseFlags(&argc, argv); OLA_ASSERT_EQ(1, argc); OLA_ASSERT_EQ(string(bin_name), string(argv[0])); OLA_ASSERT_EQ(true, static_cast(FLAGS_default_false)); OLA_ASSERT_EQ(false, static_cast(FLAGS_default_true)); OLA_ASSERT_EQ(true, static_cast(FLAGS_default_false_arg)); OLA_ASSERT_EQ(false, static_cast(FLAGS_default_true_arg)); // now try the short option versions char sopt1[] = "-a"; char sopt2[] = "-b"; char sopt3[] = "-con"; char sopt4[] = "-d"; char sopt5[] = "false"; char *argv2[] = {bin_name, sopt1, sopt2, sopt3, sopt4, sopt5}; argc = sizeof(argv2) / sizeof(argv2[0]); ola::ParseFlags(&argc, argv2); OLA_ASSERT_EQ(1, argc); OLA_ASSERT_EQ(string(bin_name), string(argv2[0])); OLA_ASSERT_EQ(true, static_cast(FLAGS_s_default_false)); OLA_ASSERT_EQ(false, static_cast(FLAGS_s_default_true)); OLA_ASSERT_EQ(true, static_cast(FLAGS_s_default_false_arg)); OLA_ASSERT_EQ(false, static_cast(FLAGS_s_default_true_arg)); } /** * Check the int flags */ void FlagsTest::testIntFlags() { char bin_name[] = "foo"; char opt1[] = "--f-int8"; char opt2[] = "-20"; char opt3[] = "--f-uint8"; char opt4[] = "20"; char opt5[] = "--f-int16"; char opt6[] = "-2000"; char opt7[] = "--f-uint16"; char opt8[] = "2000"; char opt9[] = "--f-int32=-4000"; char opt10[] = "--f-uint32=4000"; char *argv[] = {bin_name, opt1, opt2, opt3, opt4, opt5, opt6, opt7, opt8, opt9, opt10}; int argc = sizeof(argv) / sizeof(argv[0]); ola::ParseFlags(&argc, argv); OLA_ASSERT_EQ(1, argc); OLA_ASSERT_EQ(string(bin_name), string(argv[0])); OLA_ASSERT_EQ(static_cast(-20), static_cast(FLAGS_f_int8)); OLA_ASSERT_EQ(static_cast(20), static_cast(FLAGS_f_uint8)); OLA_ASSERT_EQ(static_cast(-2000), static_cast(FLAGS_f_int16)); OLA_ASSERT_EQ(static_cast(2000), static_cast(FLAGS_f_uint16)); OLA_ASSERT_EQ(static_cast(-4000), static_cast(FLAGS_f_int32)); OLA_ASSERT_EQ(static_cast(4000), static_cast(FLAGS_f_uint32)); // now try the short versions char sopt1[] = "-e-20"; char sopt2[] = "-f"; char sopt3[] = "20"; char sopt4[] = "-g"; char sopt5[] = "-2000"; char sopt6[] = "-i"; char sopt7[] = "2000"; char sopt8[] = "-j-4000"; char sopt9[] = "-k4000"; char *argv2[] = {bin_name, sopt1, sopt2, sopt3, sopt4, sopt5, sopt6, sopt7, sopt8, sopt9}; argc = sizeof(argv2) / sizeof(argv[0]); ola::ParseFlags(&argc, argv2); OLA_ASSERT_EQ(1, argc); OLA_ASSERT_EQ(string(bin_name), string(argv[0])); OLA_ASSERT_EQ(static_cast(-20), static_cast(FLAGS_s_int8)); OLA_ASSERT_EQ(static_cast(20), static_cast(FLAGS_s_uint8)); OLA_ASSERT_EQ(static_cast(-2000), static_cast(FLAGS_s_int16)); OLA_ASSERT_EQ(static_cast(2000), static_cast(FLAGS_s_uint16)); OLA_ASSERT_EQ(static_cast(-4000), static_cast(FLAGS_s_int32)); OLA_ASSERT_EQ(static_cast(4000), static_cast(FLAGS_s_uint32)); } /** * Check string flags */ void FlagsTest::testStringFlags() { char bin_name[] = "a.out"; char opt1[] = "--f-str"; char opt2[] = "data"; char opt3[] = "extra arg"; char *argv[] = {bin_name, opt1, opt2, opt3}; int argc = sizeof(argv) / sizeof(argv[0]); ola::ParseFlags(&argc, argv); OLA_ASSERT_EQ(2, argc); OLA_ASSERT_EQ(string(bin_name), string(argv[0])); OLA_ASSERT_EQ(string(opt3), string(argv[1])); OLA_ASSERT_EQ(string(opt2), FLAGS_f_str.str()); // try the --foo=bar version char opt4[] = "--f-str=data2"; char *argv2[] = {bin_name, opt4}; argc = sizeof(argv2) / sizeof(argv[0]); ola::ParseFlags(&argc, argv2); OLA_ASSERT_EQ(1, argc); OLA_ASSERT_EQ(string(bin_name), string(argv[0])); OLA_ASSERT_EQ(string("data2"), FLAGS_f_str.str()); // try the short version char opt5[] = "-m"; char opt6[] = "data3"; char *argv3[] = {bin_name, opt5, opt6}; argc = sizeof(argv3) / sizeof(argv[0]); ola::ParseFlags(&argc, argv3); OLA_ASSERT_EQ(1, argc); OLA_ASSERT_EQ(string(bin_name), string(argv[0])); OLA_ASSERT_EQ(string("data3"), FLAGS_s_str.str()); } /** * Check the final presence state. */ void FlagsTest::testFinalPresence() { testPresence(true); } ola-0.10.9/common/base/Env.cpp0000664000175000017500000000223614376533110012743 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Env.cpp * Get / Set Environment variables. */ #include #include #include "ola/base/Env.h" using std::string; namespace ola { bool GetEnv(const string &var, string *value) { char *v = NULL; #ifdef HAVE_SECURE_GETENV v = secure_getenv(var.c_str()); #else v = getenv(var.c_str()); #endif // HAVE_SECURE_GETENV if (v) { value->assign(v); return true; } return false; } } // namespace ola ola-0.10.9/common/base/Makefile.mk0000664000175000017500000000204014376533110013546 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += \ common/base/Credentials.cpp \ common/base/Env.cpp \ common/base/Flags.cpp \ common/base/Init.cpp \ common/base/Logging.cpp \ common/base/SysExits.cpp \ common/base/Version.cpp # TESTS ################################################## test_programs += common/base/CredentialsTester \ common/base/FlagsTester \ common/base/LoggingTester common_base_CredentialsTester_SOURCES = common/base/CredentialsTest.cpp common_base_CredentialsTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_base_CredentialsTester_LDADD = $(COMMON_TESTING_LIBS) common_base_FlagsTester_SOURCES = common/base/FlagsTest.cpp common_base_FlagsTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_base_FlagsTester_LDADD = $(COMMON_TESTING_LIBS) common_base_LoggingTester_SOURCES = common/base/LoggingTest.cpp common_base_LoggingTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_base_LoggingTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/base/Credentials.cpp0000664000175000017500000001540114376533110014446 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Credentials.cpp * Handle getting and setting a process's credentials. * Copyright (C) 2012 Simon Newton */ /** * @addtogroup cred * @{ * @file Credentials.cpp * @} */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #ifndef _WIN32 #include #include #endif // _WIN32 #include #include #include #include #include namespace ola { using std::string; /** * @addtogroup cred * @{ */ bool SupportsUIDs() { #ifdef _WIN32 return false; #else return true; #endif // _WIN32 } bool GetUID(uid_t* uid) { #ifdef _WIN32 (void) uid; return false; #else if (uid) { *uid = getuid(); return true; } else { return false; } #endif // _WIN32 } bool GetEUID(uid_t* euid) { #ifdef _WIN32 (void) euid; return false; #else if (euid) { *euid = geteuid(); return true; } else { return false; } #endif // _WIN32 } bool GetGID(gid_t* gid) { #ifdef _WIN32 (void) gid; return false; #else if (gid) { *gid = getgid(); return true; } else { return false; } #endif // _WIN32 } bool GetEGID(gid_t* egid) { #ifdef _WIN32 (void) egid; return false; #else if (egid) { *egid = getegid(); return true; } else { return false; } #endif // _WIN32 } bool SetUID(uid_t new_uid) { #ifdef _WIN32 (void) new_uid; return false; #else if (setuid(new_uid)) { OLA_WARN << "setuid(" << new_uid << "): " << strerror(errno); return false; } return true; #endif // _WIN32 } bool SetGID(gid_t new_gid) { #ifdef _WIN32 (void) new_gid; return false; #else if (setgid(new_gid)) { OLA_WARN << "setgid(" << new_gid << "): " << strerror(errno); return false; } return true; #endif // _WIN32 } int GetGroups(int size, gid_t list[]) { #ifdef _WIN32 (void) size; (void) list; return -1; #else return getgroups(size, list); #endif // _WIN32 } bool SetGroups(size_t size, const gid_t *list) { #ifdef _WIN32 (void) size; (void) list; return false; #else if (setgroups(size, list)) { OLA_WARN << "setgroups(): " << strerror(errno); return false; } return true; #endif // _WIN32 } /** * @} */ #ifndef _WIN32 /** @private */ template bool GenericGetPasswdReentrant(F f, arg a, PasswdEntry *passwd) { if (!passwd) return false; struct passwd pwd, *pwd_ptr; unsigned int size = 1024; bool ok = false; char *buffer; while (!ok) { buffer = new char[size]; int ret = f(a, &pwd, buffer, size, &pwd_ptr); switch (ret) { case 0: ok = true; break; case ERANGE: delete[] buffer; size += 1024; break; default: delete[] buffer; return false; } } if (!pwd_ptr) return false; passwd->pw_name = pwd_ptr->pw_name; passwd->pw_uid = pwd_ptr->pw_uid; passwd->pw_gid = pwd_ptr->pw_gid; passwd->pw_dir = pwd_ptr->pw_dir; passwd->pw_shell = pwd_ptr->pw_shell; delete[] buffer; return true; } /* * Some platforms (Android) don't have the _r versions. So we fall back to the * non-thread safe versions. */ /** @private */ template bool GenericGetPasswd(F f, arg a, PasswdEntry *passwd) { if (!passwd) return false; struct passwd *pwd = f(a); if (!pwd) return false; passwd->pw_name = pwd->pw_name; passwd->pw_uid = pwd->pw_uid; passwd->pw_gid = pwd->pw_gid; passwd->pw_dir = pwd->pw_dir; passwd->pw_shell = pwd->pw_shell; return true; } #endif // !_WIN32 bool GetPasswdName(const string &name, PasswdEntry *passwd) { #ifdef _WIN32 (void) name; (void) passwd; return false; #else #ifdef HAVE_GETPWNAM_R return GenericGetPasswdReentrant(getpwnam_r, name.c_str(), passwd); #else return GenericGetPasswd(getpwnam, name.c_str(), passwd); #endif // HAVE_GETPWNAM_R #endif // _WIN32 } bool GetPasswdUID(uid_t uid, PasswdEntry *passwd) { #ifdef _WIN32 (void) uid; (void) passwd; return false; #else #ifdef HAVE_GETPWUID_R return GenericGetPasswdReentrant(getpwuid_r, uid, passwd); #else return GenericGetPasswd(getpwuid, uid, passwd); #endif // HAVE_GETPWUID_R #endif // _WIN32 } #ifndef _WIN32 /** @private */ template bool GenericGetGroupReentrant(F f, arg a, GroupEntry *group_entry) { if (!group_entry) return false; struct group grp, *grp_ptr; unsigned int size = 1024; bool ok = false; char *buffer; while (!ok) { buffer = new char[size]; int ret = f(a, &grp, buffer, size, &grp_ptr); switch (ret) { case 0: ok = true; break; case ERANGE: delete[] buffer; size += 1024; break; default: delete[] buffer; return false; } } if (!grp_ptr) { // not found return false; } group_entry->gr_name = grp_ptr->gr_name; group_entry->gr_gid = grp_ptr->gr_gid; delete[] buffer; return true; } /* * Some platforms (Android) don't have the _r versions. So we fall back to the * non-thread safe versions. */ /** @private */ template bool GenericGetGroup(F f, arg a, GroupEntry *group_entry) { if (!group_entry) return false; struct group *grp_ptr = f(a); if (!grp_ptr) return false; group_entry->gr_name = grp_ptr->gr_name; group_entry->gr_gid = grp_ptr->gr_gid; return true; } #endif // !_WIN32 bool GetGroupName(const string &name, GroupEntry *group_entry) { #ifdef _WIN32 (void) name; (void) group_entry; return false; #else #ifdef HAVE_GETGRNAM_R return GenericGetGroupReentrant(getgrnam_r, name.c_str(), group_entry); #else return GenericGetGroup(getgrnam, name.c_str(), group_entry); #endif // HAVE_GETGRNAM_R #endif // _WIN32 } bool GetGroupGID(gid_t gid, GroupEntry *group_entry) { #ifdef _WIN32 (void) gid; (void) group_entry; return false; #else #ifdef HAVE_GETGRGID_R return GenericGetGroupReentrant(getgrgid_r, gid, group_entry); #else return GenericGetGroup(getgrgid, gid, group_entry); #endif // HAVE_GETGRGID_R #endif // _WIN32 } } // namespace ola ola-0.10.9/common/network/0000775000175000017500000000000014376533271012353 500000000000000ola-0.10.9/common/network/IPV4AddressTest.cpp0000664000175000017500000001342714376533110015666 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * IPV4AddressTest.cpp * Test fixture for the IPV4Address class * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include #include #ifdef _WIN32 #include #ifndef in_addr_t #define in_addr_t uint32_t #endif // !in_addr_t #endif // _WIN32 #include "common/network/NetworkUtilsInternal.h" #include "ola/network/IPV4Address.h" #include "ola/network/NetworkUtils.h" #include "ola/testing/TestUtils.h" using ola::network::IPV4Address; using ola::network::HostToNetwork; using std::auto_ptr; using std::string; using std::vector; class IPAddressTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(IPAddressTest); CPPUNIT_TEST(testIPV4Address); CPPUNIT_TEST(testWildcard); CPPUNIT_TEST(testBroadcast); CPPUNIT_TEST(testLoopback); CPPUNIT_TEST_SUITE_END(); public: void testIPV4Address(); void testWildcard(); void testBroadcast(); void testLoopback(); }; CPPUNIT_TEST_SUITE_REGISTRATION(IPAddressTest); /* * Test the IPV4 Address class works */ void IPAddressTest::testIPV4Address() { IPV4Address wildcard_address; OLA_ASSERT_EQ(string("0.0.0.0"), wildcard_address.ToString()); OLA_ASSERT_EQ(static_cast(0), wildcard_address.AsInt()); OLA_ASSERT_TRUE(wildcard_address.IsWildcard()); IPV4Address address1 = IPV4Address::FromStringOrDie("192.168.1.1"); int ip_as_int = address1.AsInt(); OLA_ASSERT_NE(wildcard_address, address1); OLA_ASSERT_NE(HostToNetwork(0xc0a811), ip_as_int); // Test Get() uint8_t addr[IPV4Address::LENGTH]; address1.Get(addr); OLA_ASSERT_EQ( 0, memcmp(addr, reinterpret_cast(&ip_as_int), sizeof(ip_as_int))); // test copy and assignment IPV4Address address2(address1); OLA_ASSERT_EQ(address1, address2); IPV4Address address3 = address1; OLA_ASSERT_EQ(address1, address3); // test stringification OLA_ASSERT_EQ(string("192.168.1.1"), address1.ToString()); std::ostringstream str; str << address1; OLA_ASSERT_EQ(string("192.168.1.1"), str.str()); // test from string auto_ptr string_address(IPV4Address::FromString("10.0.0.1")); OLA_ASSERT_NOT_NULL(string_address.get()); OLA_ASSERT_EQ(string("10.0.0.1"), string_address->ToString()); auto_ptr string_address2(IPV4Address::FromString("foo")); OLA_ASSERT_NULL(string_address2.get()); // and the second form IPV4Address string_address3; OLA_ASSERT_TRUE(IPV4Address::FromString("172.16.4.1", &string_address3)); OLA_ASSERT_EQ(string("172.16.4.1"), string_address3.ToString()); IPV4Address string_address4; OLA_ASSERT_FALSE(IPV4Address::FromString("", &string_address4)); // make sure sorting works vector addresses; addresses.push_back(address1); addresses.push_back(*string_address); addresses.push_back(string_address3); std::sort(addresses.begin(), addresses.end()); // The comparisons take into account network byte order automagically. OLA_ASSERT_EQ(string("10.0.0.1"), addresses[0].ToString()); OLA_ASSERT_EQ(string("172.16.4.1"), addresses[1].ToString()); OLA_ASSERT_EQ(string("192.168.1.1"), addresses[2].ToString()); uint8_t mask = 255; // UINT8_MAX; OLA_ASSERT_TRUE( IPV4Address::ToCIDRMask(IPV4Address::FromStringOrDie("0.0.0.0"), &mask)); OLA_ASSERT_EQ(0, static_cast(mask)); OLA_ASSERT_TRUE( IPV4Address::ToCIDRMask(IPV4Address::FromStringOrDie("255.0.0.0"), &mask)); OLA_ASSERT_EQ(8, static_cast(mask)); OLA_ASSERT_TRUE( IPV4Address::ToCIDRMask(IPV4Address::FromStringOrDie("255.255.255.0"), &mask)); OLA_ASSERT_EQ(24, static_cast(mask)); OLA_ASSERT_TRUE( IPV4Address::ToCIDRMask(IPV4Address::FromStringOrDie("255.255.255.252"), &mask)); OLA_ASSERT_EQ(30, static_cast(mask)); OLA_ASSERT_TRUE( IPV4Address::ToCIDRMask(IPV4Address::FromStringOrDie("255.255.255.255"), &mask)); OLA_ASSERT_EQ(32, static_cast(mask)); OLA_ASSERT_FALSE( IPV4Address::ToCIDRMask(IPV4Address::FromStringOrDie("255.0.0.255"), &mask)); } /* * Test the wildcard address works. */ void IPAddressTest::testWildcard() { IPV4Address wildcard_address; OLA_ASSERT_EQ(string("0.0.0.0"), wildcard_address.ToString()); OLA_ASSERT_EQ(static_cast(0), wildcard_address.AsInt()); OLA_ASSERT_TRUE(wildcard_address.IsWildcard()); IPV4Address wildcard_address2 = IPV4Address::WildCard(); OLA_ASSERT_EQ(wildcard_address, wildcard_address2); } /* * Test the broadcast address works. */ void IPAddressTest::testBroadcast() { IPV4Address broadcast_address = IPV4Address::Broadcast(); OLA_ASSERT_EQ(string("255.255.255.255"), broadcast_address.ToString()); } /* * Test the loopback address works. */ void IPAddressTest::testLoopback() { IPV4Address loopback_address = IPV4Address::Loopback(); OLA_ASSERT_EQ(string("127.0.0.1"), loopback_address.ToString()); } ola-0.10.9/common/network/SocketAddressTest.cpp0000664000175000017500000001046114376533110016367 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SocketAddressTest.cpp * Test fixture for the SocketAddress class * Copyright (C) 2012 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef HAVE_ARPA_INET_H #include #endif // HAVE_ARPA_INET_H #ifdef HAVE_NETINET_IN_H #include // Required by FreeBSD #endif // HAVE_NETINET_IN_H #include #include #include "ola/network/IPV4Address.h" #include "ola/network/NetworkUtils.h" #include "ola/network/SocketAddress.h" #include "ola/testing/TestUtils.h" using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using std::string; class SocketAddressTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(SocketAddressTest); CPPUNIT_TEST(testIPV4SocketAddress); CPPUNIT_TEST(testIPV4SocketAddressFromString); CPPUNIT_TEST_SUITE_END(); public: void testIPV4SocketAddress(); void testIPV4SocketAddressFromString(); }; CPPUNIT_TEST_SUITE_REGISTRATION(SocketAddressTest); /* * Test the IPV4 SocketAddress class works */ void SocketAddressTest::testIPV4SocketAddress() { IPV4Address ip_address; OLA_ASSERT_TRUE(IPV4Address::FromString("192.168.1.1", &ip_address)); IPV4SocketAddress socket_address(ip_address, 8080); OLA_ASSERT_EQ(ip_address, socket_address.Host()); OLA_ASSERT_EQ(static_cast(8080), socket_address.Port()); struct sockaddr sock_addr; OLA_ASSERT_FALSE(socket_address.ToSockAddr(&sock_addr, 0)); OLA_ASSERT_TRUE(socket_address.ToSockAddr(&sock_addr, sizeof(sock_addr))); OLA_ASSERT_EQ(static_cast(AF_INET), static_cast(sock_addr.sa_family)); struct sockaddr_in *sock_addr_in = reinterpret_cast(&sock_addr); OLA_ASSERT_EQ(ola::network::HostToNetwork(static_cast(8080)), sock_addr_in->sin_port); IPV4Address actual_ip(sock_addr_in->sin_addr.s_addr); OLA_ASSERT_EQ(ip_address, actual_ip); // test comparison operators IPV4SocketAddress socket_address2(ip_address, 8079); IPV4SocketAddress socket_address3(ip_address, 8081); IPV4Address ip_address2; OLA_ASSERT_TRUE(IPV4Address::FromString("182.168.1.2", &ip_address2)); IPV4SocketAddress socket_address4(ip_address2, 8080); OLA_ASSERT_EQ(socket_address, socket_address); OLA_ASSERT_NE(socket_address, socket_address2); OLA_ASSERT_NE(socket_address, socket_address3); OLA_ASSERT_LT(socket_address2, socket_address); OLA_ASSERT_LT(socket_address, socket_address3); OLA_ASSERT_LT(socket_address4, socket_address); OLA_ASSERT_LT(socket_address4, socket_address3); OLA_ASSERT_GT(socket_address, socket_address2); OLA_ASSERT_GT(socket_address3, socket_address); OLA_ASSERT_GT(socket_address, socket_address4); OLA_ASSERT_GT(socket_address3, socket_address4); // test assignment & copy constructor IPV4SocketAddress copy_address(socket_address); socket_address4 = socket_address; OLA_ASSERT_EQ(socket_address, copy_address); OLA_ASSERT_EQ(socket_address, socket_address4); } /** * Test that FromString() works */ void SocketAddressTest::testIPV4SocketAddressFromString() { IPV4SocketAddress socket_address; OLA_ASSERT_TRUE( IPV4SocketAddress::FromString("127.0.0.1:80", &socket_address)); OLA_ASSERT_EQ(string("127.0.0.1"), socket_address.Host().ToString()); OLA_ASSERT_EQ(static_cast(80), socket_address.Port()); OLA_ASSERT_FALSE( IPV4SocketAddress::FromString("127.0.0.1", &socket_address)); OLA_ASSERT_FALSE(IPV4SocketAddress::FromString("foo", &socket_address)); OLA_ASSERT_FALSE(IPV4SocketAddress::FromString(":80", &socket_address)); } ola-0.10.9/common/network/Interface.cpp0000664000175000017500000001324714376533110014676 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Interface.cpp * Represents network interface. * Copyright (C) 2005 Simon Newton */ #ifdef HAVE_SYS_TYPES_H #include // Required by FreeBSD, order is important to OpenBSD #endif // HAVE_SYS_TYPES_H #ifdef HAVE_SYS_SOCKET_H #include // Required by FreeBSD #endif // HAVE_SYS_SOCKET_H #ifdef HAVE_NET_IF_ARP_H #include #endif // HAVE_NET_IF_ARP_H #include #include #include #include #include "ola/StringUtils.h" #include "ola/network/InterfacePicker.h" #include "ola/network/NetworkUtils.h" #ifdef _WIN32 #include "common/network/WindowsInterfacePicker.h" #else #include "common/network/PosixInterfacePicker.h" #endif // _WIN32 namespace ola { namespace network { using std::string; using std::vector; #ifdef ARPHRD_VOID const uint16_t Interface::ARP_VOID_TYPE = ARPHRD_VOID; #else const uint16_t Interface::ARP_VOID_TYPE = 0xffff; #endif // ARPHRD_VOID #ifdef ARPHRD_ETHER const uint16_t Interface::ARP_ETHERNET_TYPE = ARPHRD_ETHER; #else const uint16_t Interface::ARP_ETHERNET_TYPE = 1; #endif // ARPHRD_ETHER Interface::Interface() : loopback(false), index(DEFAULT_INDEX), type(ARP_VOID_TYPE) { } Interface::Interface(const string &name, const IPV4Address &ip_address, const IPV4Address &broadcast_address, const IPV4Address &subnet_mask, const MACAddress &hw_address, bool loopback, int32_t index, uint16_t type) : name(name), ip_address(ip_address), bcast_address(broadcast_address), subnet_mask(subnet_mask), hw_address(hw_address), loopback(loopback), index(index), type(type) { } Interface::Interface(const Interface &other) : name(other.name), ip_address(other.ip_address), bcast_address(other.bcast_address), subnet_mask(other.subnet_mask), hw_address(other.hw_address), loopback(other.loopback), index(other.index), type(other.type) { } Interface& Interface::operator=(const Interface &other) { if (this != &other) { name = other.name; ip_address = other.ip_address; bcast_address = other.bcast_address; subnet_mask = other.subnet_mask; hw_address = other.hw_address; loopback = other.loopback; index = other.index; type = other.type; } return *this; } bool Interface::operator==(const Interface &other) { return (name == other.name && ip_address == other.ip_address && subnet_mask == other.subnet_mask && loopback == other.loopback && index == other.index && type == other.type); } /** * Create a new interface builder */ InterfaceBuilder::InterfaceBuilder() : m_ip_address(0), m_broadcast_address(0), m_subnet_mask(0), m_hw_address(), m_loopback(false), m_index(Interface::DEFAULT_INDEX), m_type(Interface::ARP_VOID_TYPE) { } /** * Set the address of the interface to build. */ bool InterfaceBuilder::SetAddress(const string &ip_address) { return SetAddress(ip_address, &m_ip_address); } /** * Set the broadcast address of the interface to build. */ bool InterfaceBuilder::SetBroadcast(const string &broadcast_address) { return SetAddress(broadcast_address, &m_broadcast_address); } /** * Set the subnet mask of the interface to build. */ bool InterfaceBuilder::SetSubnetMask(const string &mask) { return SetAddress(mask, &m_subnet_mask); } /** * Set the loopback flag. */ void InterfaceBuilder::SetLoopback(bool loopback) { m_loopback = loopback; } /** * Set the index. */ void InterfaceBuilder::SetIndex(int32_t index) { m_index = index; } /** * Set the type. */ void InterfaceBuilder::SetType(uint16_t type) { m_type = type; } /** * Reset the builder object */ void InterfaceBuilder::Reset() { m_name = ""; m_ip_address = IPV4Address(0); m_broadcast_address = IPV4Address(0); m_subnet_mask = IPV4Address(0); m_hw_address = MACAddress(); m_loopback = false; m_index = Interface::DEFAULT_INDEX; m_type = Interface::ARP_VOID_TYPE; } /** * Return a new interface object. * Maybe in the future we should check that the broadcast address, ip address * and netmask are consistent. We could even infer the broadcast_address if it * isn't provided. */ Interface InterfaceBuilder::Construct() { return Interface(m_name, m_ip_address, m_broadcast_address, m_subnet_mask, m_hw_address, m_loopback, m_index, m_type); } /** * Set a IPV4Address object from a string */ bool InterfaceBuilder::SetAddress(const string &str, IPV4Address *target) { IPV4Address tmp_address; if (!IPV4Address::FromString(str, &tmp_address)) return false; *target = tmp_address; return true; } } // namespace network } // namespace ola ola-0.10.9/common/network/HealthCheckedConnectionTest.cpp0000664000175000017500000001732614376533110020334 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * HealthCheckedConnectionTest.cpp * Test fixture for the HealthCheckedConnection class. * Copyright (C) 2012 Simon Newton */ #include #include "ola/Callback.h" #include "ola/Clock.h" #include "ola/Logging.h" #include "ola/io/SelectServer.h" #include "ola/network/HealthCheckedConnection.h" #include "ola/network/Socket.h" #include "ola/testing/TestUtils.h" using ola::MockClock; using ola::NewCallback; using ola::NewSingleCallback; using ola::TimeInterval; using ola::network::HealthCheckedConnection; using ola::io::LoopbackDescriptor; using ola::io::SelectServer; class MockHealthCheckedConnection: public HealthCheckedConnection { public: struct Options { uint8_t end_after; // terminate after this many heartbeats uint8_t send_every; // don't send every N heartbeats bool validate_heartbeat; // check the heartbeat is what we expect bool abort_on_failure; // fail if the channel goes down }; static void InitOptions(Options *options) { options->end_after = 8; options->send_every = 0; options->validate_heartbeat = false; options->abort_on_failure = true; } MockHealthCheckedConnection(ola::io::ConnectedDescriptor *descriptor, SelectServer *scheduler, const ola::TimeInterval timeout_interval, const Options &options, MockClock *clock) : HealthCheckedConnection(scheduler, timeout_interval), m_descriptor(descriptor), m_ss(scheduler), m_options(options), m_next_heartbeat(0), m_expected_heartbeat(0), m_channel_ok(true), m_clock(clock) { } void SendHeartbeat() { if (m_options.send_every == 0 || m_next_heartbeat % m_options.send_every == 0) { m_descriptor->Send(&m_next_heartbeat, sizeof(m_next_heartbeat)); } m_clock->AdvanceTime(0, 180000); m_next_heartbeat++; } void HeartbeatTimeout() { if (m_options.abort_on_failure) CPPUNIT_FAIL("Channel went down"); m_channel_ok = false; m_ss->Terminate(); } void ReadData() { uint8_t data; unsigned int data_read; m_descriptor->Receive(&data, sizeof(data), data_read); if (m_options.validate_heartbeat) OLA_ASSERT_EQ(m_expected_heartbeat++, data); HeartbeatReceived(); if (data >= m_options.end_after) m_ss->Terminate(); } bool ChannelOk() const { return m_channel_ok; } private: ola::io::ConnectedDescriptor *m_descriptor; SelectServer *m_ss; Options m_options; uint8_t m_next_heartbeat; uint8_t m_expected_heartbeat; bool m_channel_ok; MockClock *m_clock; }; class HealthCheckedConnectionTest: public CppUnit::TestFixture { public: HealthCheckedConnectionTest() : CppUnit::TestFixture(), m_ss(NULL, &m_clock), heartbeat_interval(0, 200000) { } CPPUNIT_TEST_SUITE(HealthCheckedConnectionTest); CPPUNIT_TEST(testSimpleChannel); CPPUNIT_TEST(testChannelWithPacketLoss); CPPUNIT_TEST(testChannelWithHeavyPacketLoss); CPPUNIT_TEST(testPauseAndResume); CPPUNIT_TEST_SUITE_END(); public: void setUp(); void tearDown() {} void testSimpleChannel(); void testChannelWithPacketLoss(); void testChannelWithHeavyPacketLoss(); void testPauseAndResume(); void PauseReading(MockHealthCheckedConnection *connection) { connection->PauseTimer(); m_ss.RemoveReadDescriptor(&socket); } void ResumeReading(MockHealthCheckedConnection *connection) { connection->ResumeTimer(); m_ss.AddReadDescriptor(&socket); } private: MockClock m_clock; SelectServer m_ss; LoopbackDescriptor socket; TimeInterval heartbeat_interval; MockHealthCheckedConnection::Options options; }; CPPUNIT_TEST_SUITE_REGISTRATION(HealthCheckedConnectionTest); void HealthCheckedConnectionTest::setUp() { socket.Init(); MockHealthCheckedConnection::InitOptions(&options); } /* * Check that the channel stays up when all heartbeats are received. */ void HealthCheckedConnectionTest::testSimpleChannel() { options.validate_heartbeat = true; MockHealthCheckedConnection connection(&socket, &m_ss, heartbeat_interval, options, &m_clock); socket.SetOnData( NewCallback(&connection, &MockHealthCheckedConnection::ReadData)); connection.Setup(); m_ss.AddReadDescriptor(&socket); connection.Setup(); m_ss.Run(); OLA_ASSERT_TRUE(connection.ChannelOk()); } /** * Check the channel works when every 2nd heartbeat is lost */ void HealthCheckedConnectionTest::testChannelWithPacketLoss() { options.send_every = 2; MockHealthCheckedConnection connection(&socket, &m_ss, heartbeat_interval, options, &m_clock); socket.SetOnData( NewCallback(&connection, &MockHealthCheckedConnection::ReadData)); connection.Setup(); m_ss.AddReadDescriptor(&socket); connection.Setup(); m_ss.Run(); OLA_ASSERT_TRUE(connection.ChannelOk()); } /** * Check the channel works when every 2nd heartbeat is lost */ void HealthCheckedConnectionTest::testChannelWithHeavyPacketLoss() { options.send_every = 3; options.abort_on_failure = false; MockHealthCheckedConnection connection(&socket, &m_ss, heartbeat_interval, options, &m_clock); socket.SetOnData( NewCallback(&connection, &MockHealthCheckedConnection::ReadData)); connection.Setup(); m_ss.AddReadDescriptor(&socket); connection.Setup(); m_ss.Run(); OLA_ASSERT_FALSE(connection.ChannelOk()); } /** * Check pausing doesn't mark the channel as bad. */ void HealthCheckedConnectionTest::testPauseAndResume() { MockHealthCheckedConnection connection(&socket, &m_ss, heartbeat_interval, options, &m_clock); socket.SetOnData( NewCallback(&connection, &MockHealthCheckedConnection::ReadData)); connection.Setup(); m_ss.AddReadDescriptor(&socket); connection.Setup(); m_ss.RegisterSingleTimeout( TimeInterval(1, 0), NewSingleCallback(this, &HealthCheckedConnectionTest::PauseReading, &connection)); m_ss.RegisterSingleTimeout( TimeInterval(3, 0), NewSingleCallback(this, &HealthCheckedConnectionTest::ResumeReading, &connection)); m_ss.Run(); OLA_ASSERT_TRUE(connection.ChannelOk()); } ola-0.10.9/common/network/InterfacePicker.cpp0000664000175000017500000001014314376533110016024 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * InterfacePicker.cpp * Chooses an interface to listen on * Copyright (C) 2005 Simon Newton */ #include #include #include #include "ola/Logging.h" #include "ola/network/InterfacePicker.h" #include "ola/network/NetworkUtils.h" #ifdef _WIN32 #include "common/network/WindowsInterfacePicker.h" #else #include "common/network/PosixInterfacePicker.h" #endif // _WIN32 namespace ola { namespace network { using std::string; using std::vector; /* * Select an interface to use * @param iface, the interface to populate * @param ip_or_name the IP address or interface name of the local interface * we'd prefer to use. * @param options a Options struct configuring ChooseInterface * @return true if we found an interface, false otherwise */ // TODO(Simon): Change these to callback based code to reduce duplication. bool InterfacePicker::ChooseInterface( Interface *iface, const string &ip_or_name, const Options &options) const { bool found = false; vector interfaces = GetInterfaces(options.include_loopback); if (interfaces.empty()) { OLA_INFO << "No interfaces found"; return false; } vector::const_iterator iter; if (!ip_or_name.empty()) { IPV4Address wanted_ip; if (IPV4Address::FromString(ip_or_name, &wanted_ip)) { // search by IP for (iter = interfaces.begin(); iter != interfaces.end(); ++iter) { if (iter->ip_address == wanted_ip) { *iface = *iter; found = true; break; } } } else { // search by interface name for (iter = interfaces.begin(); iter != interfaces.end(); ++iter) { if (iter->name == ip_or_name) { *iface = *iter; found = true; break; } } } } if (!found && options.specific_only) return false; // No match and being fussy if (!found) *iface = interfaces[0]; OLA_DEBUG << "Using interface " << iface->name << " (" << iface->ip_address << ")"; return true; } /* * Select an interface to use by index * @param iface, the interface to populate * @param index the index of the local interface we'd prefer to use. * @param options a Options struct configuring ChooseInterface * @return true if we found an interface, false otherwise */ // TODO(Simon): Change these to callback based code to reduce duplication. bool InterfacePicker::ChooseInterface( Interface *iface, int32_t index, const Options &options) const { bool found = false; vector interfaces = GetInterfaces(options.include_loopback); if (interfaces.empty()) { OLA_INFO << "No interfaces found"; return false; } vector::const_iterator iter; // search by index for (iter = interfaces.begin(); iter != interfaces.end(); ++iter) { if (iter->index == index) { *iface = *iter; found = true; break; } } if (!found && options.specific_only) return false; // No match and being fussy if (!found) *iface = interfaces[0]; OLA_DEBUG << "Using interface " << iface->name << " (" << iface->ip_address << ") with index " << iface->index; return true; } /* * Create the appropriate picker */ InterfacePicker *InterfacePicker::NewPicker() { #ifdef _WIN32 return new WindowsInterfacePicker(); #else return new PosixInterfacePicker(); #endif // _WIN32 } } // namespace network } // namespace ola ola-0.10.9/common/network/Socket.cpp0000664000175000017500000003177014376533110014227 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Socket.cpp * Implementation of the UDP Socket classes * Copyright (C) 2005 Simon Newton */ #include "ola/network/Socket.h" #include #include #include #include #include #include #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef _WIN32 #include #include #include #include #else #include #endif // _WIN32 #ifdef HAVE_SYS_SOCKET_H #include #endif // HAVE_SYS_SOCKET_H #ifdef HAVE_NETINET_IN_H #include #endif // HAVE_NETINET_IN_H #include #include "common/network/SocketHelper.h" #include "ola/Logging.h" #include "ola/network/NetworkUtils.h" #include "ola/network/TCPSocketFactory.h" namespace ola { namespace network { namespace { bool ReceiveFrom(int fd, uint8_t *buffer, ssize_t *data_read, struct sockaddr_in *source, socklen_t *src_size) { *data_read = recvfrom( fd, reinterpret_cast(buffer), *data_read, 0, reinterpret_cast(source), source ? src_size : NULL); if (*data_read < 0) { #ifdef _WIN32 OLA_WARN << "recvfrom fd: " << fd << " failed: " << WSAGetLastError(); #else OLA_WARN << "recvfrom fd: " << fd << " failed: " << strerror(errno); #endif // _WIN32 return false; } return true; } } // namespace // UDPSocket // ------------------------------------------------ bool UDPSocket::Init() { if (m_handle != ola::io::INVALID_DESCRIPTOR) return false; int sd = socket(PF_INET, SOCK_DGRAM, 0); if (sd < 0) { OLA_WARN << "Could not create socket " << strerror(errno); return false; } #ifdef _WIN32 m_handle.m_handle.m_fd = sd; m_handle.m_type = ola::io::SOCKET_DESCRIPTOR; // Set socket to nonblocking to enable WSAEventSelect u_long mode = 1; ioctlsocket(sd, FIONBIO, &mode); #else m_handle = sd; #endif // _WIN32 return true; } bool UDPSocket::Bind(const IPV4SocketAddress &endpoint) { if (m_handle == ola::io::INVALID_DESCRIPTOR) return false; struct sockaddr server_address; if (!endpoint.ToSockAddr(&server_address, sizeof(server_address))) return false; #if HAVE_DECL_SO_REUSEADDR int reuse_addr_flag = 1; int addr_ok = setsockopt(m_handle, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast(&reuse_addr_flag), sizeof(reuse_addr_flag)); if (addr_ok < 0) { OLA_WARN << "can't set SO_REUSEADDR for " << m_handle << ", " << strerror(errno); return false; } #endif // HAVE_DECL_SO_REUSEADDR #if HAVE_DECL_SO_REUSEPORT // turn on REUSEPORT if we can int reuse_port_flag = 1; int ok = setsockopt(m_handle, SOL_SOCKET, SO_REUSEPORT, reinterpret_cast(&reuse_port_flag), sizeof(reuse_port_flag)); if (ok < 0) { OLA_WARN << "can't set SO_REUSEPORT for " << m_handle << ", " << strerror(errno); // This is non fatal, since Linux introduced this option in the 3.9 series. } #endif // HAVE_DECL_SO_REUSEPORT OLA_DEBUG << "Binding to " << endpoint; #ifdef _WIN32 if (bind(m_handle.m_handle.m_fd, &server_address, sizeof(server_address)) == -1) { #else if (bind(m_handle, &server_address, sizeof(server_address)) == -1) { #endif // _WIN32 OLA_WARN << "bind(" << endpoint << "): " << strerror(errno); return false; } m_bound_to_port = true; return true; } bool UDPSocket::GetSocketAddress(IPV4SocketAddress *address) const { #ifdef _WIN32 GenericSocketAddress addr = GetLocalAddress(m_handle.m_handle.m_fd); #else GenericSocketAddress addr = GetLocalAddress(m_handle); #endif // _WIN32 if (!addr.IsValid()) { return false; } *address = addr.V4Addr(); return true; } bool UDPSocket::Close() { if (m_handle == ola::io::INVALID_DESCRIPTOR) return false; #ifdef _WIN32 int fd = m_handle.m_handle.m_fd; #else int fd = m_handle; #endif // _WIN32 m_handle = ola::io::INVALID_DESCRIPTOR; m_bound_to_port = false; #ifdef _WIN32 if (closesocket(fd)) { #else if (close(fd)) { #endif // _WIN32 OLA_WARN << "close() failed, " << strerror(errno); return false; } return true; } ssize_t UDPSocket::SendTo(const uint8_t *buffer, unsigned int size, const IPV4Address &ip, unsigned short port) const { return SendTo(buffer, size, IPV4SocketAddress(ip, port)); } ssize_t UDPSocket::SendTo(const uint8_t *buffer, unsigned int size, const IPV4SocketAddress &dest) const { if (!ValidWriteDescriptor()) return 0; struct sockaddr_in destination; if (!dest.ToSockAddr(reinterpret_cast(&destination), sizeof(destination))) { return 0; } ssize_t bytes_sent = sendto( #ifdef _WIN32 m_handle.m_handle.m_fd, #else m_handle, #endif // _WIN32 reinterpret_cast(buffer), size, 0, reinterpret_cast(&destination), sizeof(struct sockaddr)); if (bytes_sent < 0 || static_cast(bytes_sent) != size) OLA_INFO << "sendto failed: " << dest << " : " << strerror(errno); return bytes_sent; } ssize_t UDPSocket::SendTo(ola::io::IOVecInterface *data, const IPV4Address &ip, unsigned short port) const { return SendTo(data, IPV4SocketAddress(ip, port)); } ssize_t UDPSocket::SendTo(ola::io::IOVecInterface *data, const IPV4SocketAddress &dest) const { if (!ValidWriteDescriptor()) return 0; struct sockaddr_in destination; if (!dest.ToSockAddr(reinterpret_cast(&destination), sizeof(destination))) { return 0; } int io_len; const struct ola::io::IOVec *iov = data->AsIOVec(&io_len); if (iov == NULL) return 0; #ifdef _WIN32 ssize_t bytes_sent = 0; for (int buffer = 0; buffer < io_len; ++buffer) { bytes_sent += SendTo(reinterpret_cast(iov[buffer].iov_base), iov[buffer].iov_len, dest); } #else struct msghdr message; message.msg_name = &destination; message.msg_namelen = sizeof(destination); message.msg_iov = reinterpret_cast(const_cast(iov)); message.msg_iovlen = io_len; message.msg_control = NULL; message.msg_controllen = 0; message.msg_flags = 0; ssize_t bytes_sent = sendmsg(WriteDescriptor(), &message, 0); #endif // _WIN32 data->FreeIOVec(iov); if (bytes_sent < 0) { OLA_INFO << "Failed to send on " << WriteDescriptor() << ": to " << dest << " : " << strerror(errno); } else { data->Pop(bytes_sent); } return bytes_sent; } bool UDPSocket::RecvFrom(uint8_t *buffer, ssize_t *data_read) const { socklen_t length = 0; #ifdef _WIN32 return ReceiveFrom(m_handle.m_handle.m_fd, buffer, data_read, NULL, &length); #else return ReceiveFrom(m_handle, buffer, data_read, NULL, &length); #endif // _WIN32 } bool UDPSocket::RecvFrom( uint8_t *buffer, ssize_t *data_read, IPV4Address &source) const { // NOLINT(runtime/references) struct sockaddr_in src_sockaddr; socklen_t src_size = sizeof(src_sockaddr); #ifdef _WIN32 bool ok = ReceiveFrom(m_handle.m_handle.m_fd, buffer, data_read, &src_sockaddr, &src_size); #else bool ok = ReceiveFrom(m_handle, buffer, data_read, &src_sockaddr, &src_size); #endif // _WIN32 if (ok) source = IPV4Address(src_sockaddr.sin_addr.s_addr); return ok; } bool UDPSocket::RecvFrom(uint8_t *buffer, ssize_t *data_read, IPV4Address &source, // NOLINT(runtime/references) uint16_t &port) const { // NOLINT(runtime/references) struct sockaddr_in src_sockaddr; socklen_t src_size = sizeof(src_sockaddr); #ifdef _WIN32 bool ok = ReceiveFrom(m_handle.m_handle.m_fd, buffer, data_read, &src_sockaddr, &src_size); #else bool ok = ReceiveFrom(m_handle, buffer, data_read, &src_sockaddr, &src_size); #endif // _WIN32 if (ok) { source = IPV4Address(src_sockaddr.sin_addr.s_addr); port = NetworkToHost(src_sockaddr.sin_port); } return ok; } bool UDPSocket::RecvFrom(uint8_t *buffer, ssize_t *data_read, IPV4SocketAddress *source) { struct sockaddr_in src_sockaddr; socklen_t src_size = sizeof(src_sockaddr); #ifdef _WIN32 bool ok = ReceiveFrom(m_handle.m_handle.m_fd, buffer, data_read, &src_sockaddr, &src_size); #else bool ok = ReceiveFrom(m_handle, buffer, data_read, &src_sockaddr, &src_size); #endif // _WIN32 if (ok) { *source = IPV4SocketAddress(IPV4Address(src_sockaddr.sin_addr.s_addr), NetworkToHost(src_sockaddr.sin_port)); } return ok; } bool UDPSocket::EnableBroadcast() { if (m_handle == ola::io::INVALID_DESCRIPTOR) return false; int broadcast_flag = 1; #ifdef _WIN32 int ok = setsockopt(m_handle.m_handle.m_fd, #else int ok = setsockopt(m_handle, #endif // _WIN32 SOL_SOCKET, SO_BROADCAST, reinterpret_cast(&broadcast_flag), sizeof(broadcast_flag)); if (ok == -1) { OLA_WARN << "Failed to enable broadcasting: " << strerror(errno); return false; } return true; } bool UDPSocket::SetMulticastInterface(const IPV4Address &iface) { struct in_addr addr; addr.s_addr = iface.AsInt(); #ifdef _WIN32 int ok = setsockopt(m_handle.m_handle.m_fd, #else int ok = setsockopt(m_handle, #endif // _WIN32 IPPROTO_IP, IP_MULTICAST_IF, reinterpret_cast(&addr), sizeof(addr)); if (ok < 0) { OLA_WARN << "Failed to set outgoing multicast interface to " << iface << ": " << strerror(errno); return false; } return true; } bool UDPSocket::JoinMulticast(const IPV4Address &iface, const IPV4Address &group, bool multicast_loop) { char loop = multicast_loop; struct ip_mreq mreq; mreq.imr_interface.s_addr = iface.AsInt(); mreq.imr_multiaddr.s_addr = group.AsInt(); #ifdef _WIN32 int ok = setsockopt(m_handle.m_handle.m_fd, #else int ok = setsockopt(m_handle, #endif // _WIN32 IPPROTO_IP, IP_ADD_MEMBERSHIP, reinterpret_cast(&mreq), sizeof(mreq)); if (ok < 0) { OLA_WARN << "Failed to join multicast group " << group << ": " << strerror(errno); return false; } if (!multicast_loop) { #ifdef _WIN32 ok = setsockopt(m_handle.m_handle.m_fd, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)); #else ok = setsockopt(m_handle, IPPROTO_IP, IP_MULTICAST_LOOP, &loop, sizeof(loop)); #endif // _WIN32 if (ok < 0) { OLA_WARN << "Failed to disable looping for " << m_handle << ": " << strerror(errno); return false; } } return true; } bool UDPSocket::LeaveMulticast(const IPV4Address &iface, const IPV4Address &group) { struct ip_mreq mreq; mreq.imr_interface.s_addr = iface.AsInt(); mreq.imr_multiaddr.s_addr = group.AsInt(); #ifdef _WIN32 int ok = setsockopt(m_handle.m_handle.m_fd, #else int ok = setsockopt(m_handle, #endif // _WIN32 IPPROTO_IP, IP_DROP_MEMBERSHIP, reinterpret_cast(&mreq), sizeof(mreq)); if (ok < 0) { OLA_WARN << "Failed to leave multicast group " << group << ": " << strerror(errno); return false; } return true; } bool UDPSocket::SetTos(uint8_t tos) { unsigned int value = tos & 0xFC; // zero the ECN fields #ifdef _WIN32 int ok = setsockopt(m_handle.m_handle.m_fd, #else int ok = setsockopt(m_handle, #endif // _WIN32 IPPROTO_IP, IP_TOS, reinterpret_cast(&value), sizeof(value)); if (ok < 0) { OLA_WARN << "Failed to set tos for " << m_handle << ", " << strerror(errno); return false; } return true; } } // namespace network } // namespace ola ola-0.10.9/common/network/SocketHelper.h0000664000175000017500000000223514376533110015026 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SocketHelper.h * Various functions to operate on sockets. * Copyright (C) 2013 Simon Newton */ #ifndef COMMON_NETWORK_SOCKETHELPER_H_ #define COMMON_NETWORK_SOCKETHELPER_H_ #include namespace ola { namespace network { GenericSocketAddress GetLocalAddress(int sd); GenericSocketAddress GetPeerAddress(int sd); } // namespace network } // namespace ola #endif // COMMON_NETWORK_SOCKETHELPER_H_ ola-0.10.9/common/network/InterfacePickerTest.cpp0000664000175000017500000001231614376533110016670 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * InterfacePickerTest.cpp * Test fixture for the InterfacePicker class * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include "common/network/FakeInterfacePicker.h" #include "ola/network/InterfacePicker.h" #include "ola/Logging.h" #include "ola/testing/TestUtils.h" using ola::network::FakeInterfacePicker; using ola::network::IPV4Address; using ola::network::Interface; using ola::network::InterfacePicker; using ola::network::MACAddress; using std::auto_ptr; using std::cout; using std::endl; using std::string; using std::vector; class InterfacePickerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(InterfacePickerTest); CPPUNIT_TEST(testGetInterfaces); CPPUNIT_TEST(testGetLoopbackInterfaces); CPPUNIT_TEST(testChooseInterface); CPPUNIT_TEST_SUITE_END(); public: void testGetInterfaces(); void testGetLoopbackInterfaces(); void testChooseInterface(); }; CPPUNIT_TEST_SUITE_REGISTRATION(InterfacePickerTest); /* * Check that we find at least one candidate interface. */ void InterfacePickerTest::testGetInterfaces() { auto_ptr picker(InterfacePicker::NewPicker()); vector interfaces = picker->GetInterfaces(true); #ifndef _WIN32 // If a Windows box is not on a network, and doesn't have it's loopback, there // may be zero interfaces present so we skip this check OLA_ASSERT_GT(interfaces.size(), 0); #else OLA_WARN << "Windows found " << interfaces.size() << " interfaces"; #endif // _WIN32 vector::iterator iter; cout << endl; for (iter = interfaces.begin(); iter != interfaces.end(); ++iter) { cout << iter->name << endl; cout << " index: " << iter->index << endl; cout << " ip: " << iter->ip_address << endl; cout << " bcast: " << iter->bcast_address << endl; cout << " subnet: " << iter->subnet_mask << endl; cout << " type: " << iter->type << endl; cout << " hw_addr: " << iter->hw_address << endl; cout << endl; cout << "---------------" << endl; } } /* * Check that we find a loopback interface. */ void InterfacePickerTest::testGetLoopbackInterfaces() { auto_ptr picker(InterfacePicker::NewPicker()); vector interfaces = picker->GetInterfaces(true); #ifndef _WIN32 // If a Windows box is not on a network, and doesn't have it's loopback, there // may be zero interfaces present so we skip this check OLA_ASSERT_GT(interfaces.size(), 0); #else OLA_WARN << "Windows found " << interfaces.size() << " interfaces"; #endif // _WIN32 vector::iterator iter; unsigned int loopback_count = 0; for (iter = interfaces.begin(); iter != interfaces.end(); ++iter) { if (iter->loopback) loopback_count++; } #ifndef _WIN32 OLA_ASSERT_GT(loopback_count, 0); #endif // _WIN32 } void InterfacePickerTest::testChooseInterface() { vector interfaces; FakeInterfacePicker picker(interfaces); // no interfaces Interface iface; OLA_ASSERT_FALSE(picker.ChooseInterface(&iface, "")); // no interfaces, by index OLA_ASSERT_FALSE(picker.ChooseInterface(&iface, 0)); // now with one iface that doesn't match Interface iface1; iface1.name = "eth0"; iface1.index = 1; OLA_ASSERT_TRUE(IPV4Address::FromString("10.0.0.1", &iface1.ip_address)); interfaces.push_back(iface1); FakeInterfacePicker picker2(interfaces); OLA_ASSERT_TRUE(picker2.ChooseInterface(&iface, "192.168.1.1")); OLA_ASSERT_TRUE(iface1 == iface); // check that preferred works Interface iface2; iface2.name = "eth1"; iface2.index = 2; OLA_ASSERT_TRUE(IPV4Address::FromString("192.168.1.1", &iface2.ip_address)); interfaces.push_back(iface2); FakeInterfacePicker picker3(interfaces); OLA_ASSERT_TRUE(picker3.ChooseInterface(&iface, "192.168.1.1")); OLA_ASSERT_TRUE(iface2 == iface); // now check for iface name OLA_ASSERT_TRUE(picker3.ChooseInterface(&iface, "eth0")); OLA_ASSERT_TRUE(iface1 == iface); OLA_ASSERT_TRUE(picker3.ChooseInterface(&iface, "eth1")); OLA_ASSERT_TRUE(iface2 == iface); // a invalid address should return the first one OLA_ASSERT_TRUE(picker3.ChooseInterface(&iface, "foo")); OLA_ASSERT_TRUE(iface1 == iface); // now check by iface index OLA_ASSERT_TRUE(picker3.ChooseInterface(&iface, 2)); OLA_ASSERT_TRUE(iface2 == iface); // an invalid index should return the first one OLA_ASSERT_TRUE(picker3.ChooseInterface(&iface, 3)); OLA_ASSERT_TRUE(iface1 == iface); } ola-0.10.9/common/network/WindowsInterfacePicker.h0000664000175000017500000000245214376533110017050 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * WindowsInterfacePicker.h * Choose an interface to listen on * Copyright (C) 2005 Simon Newton */ #ifndef COMMON_NETWORK_WINDOWSINTERFACEPICKER_H_ #define COMMON_NETWORK_WINDOWSINTERFACEPICKER_H_ #include #include "ola/network/InterfacePicker.h" namespace ola { namespace network { /* * The InterfacePicker for windows */ class WindowsInterfacePicker: public InterfacePicker { public: std::vector GetInterfaces(bool include_loopback) const; }; } // namespace network } // namespace ola #endif // COMMON_NETWORK_WINDOWSINTERFACEPICKER_H_ ola-0.10.9/common/network/HealthCheckedConnection.cpp0000664000175000017500000000636214376533110017472 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * HealthCheckedConnection.cpp * Copyright (C) 2012 Simon Newton */ #include "ola/Logging.h" #include "ola/network/HealthCheckedConnection.h" #include "ola/thread/SchedulerInterface.h" namespace ola { namespace network { HealthCheckedConnection::HealthCheckedConnection( ola::thread::SchedulerInterface *scheduler, const ola::TimeInterval timeout_interval) : m_scheduler(scheduler), m_heartbeat_interval(timeout_interval), m_send_timeout_id(ola::thread::INVALID_TIMEOUT), m_receive_timeout_id(ola::thread::INVALID_TIMEOUT) { } HealthCheckedConnection::~HealthCheckedConnection() { if (m_send_timeout_id != ola::thread::INVALID_TIMEOUT) m_scheduler->RemoveTimeout(m_send_timeout_id); if (m_receive_timeout_id != ola::thread::INVALID_TIMEOUT) m_scheduler->RemoveTimeout(m_receive_timeout_id); } bool HealthCheckedConnection::Setup() { // setup the RX timeout ResumeTimer(); // send a heartbeat now and setup the TX timer SendHeartbeat(); HeartbeatSent(); return true; } /** * Reset the send timer */ void HealthCheckedConnection::HeartbeatSent() { if (m_send_timeout_id != ola::thread::INVALID_TIMEOUT) m_scheduler->RemoveTimeout(m_send_timeout_id); m_send_timeout_id = m_scheduler->RegisterRepeatingTimeout( m_heartbeat_interval, NewCallback(this, &HealthCheckedConnection::SendNextHeartbeat)); } /** * Reset the RX timer */ void HealthCheckedConnection::HeartbeatReceived() { m_scheduler->RemoveTimeout(m_receive_timeout_id); UpdateReceiveTimer(); } /** * Pause the receive timer */ void HealthCheckedConnection::PauseTimer() { if (m_receive_timeout_id != ola::thread::INVALID_TIMEOUT) { m_scheduler->RemoveTimeout(m_receive_timeout_id); m_receive_timeout_id = ola::thread::INVALID_TIMEOUT; } } /** * Resume the receive timer */ void HealthCheckedConnection::ResumeTimer() { if (m_receive_timeout_id == ola::thread::INVALID_TIMEOUT) UpdateReceiveTimer(); } bool HealthCheckedConnection::SendNextHeartbeat() { SendHeartbeat(); return true; } void HealthCheckedConnection::UpdateReceiveTimer() { TimeInterval timeout_interval(static_cast( 2.5 * m_heartbeat_interval.AsInt())); m_receive_timeout_id = m_scheduler->RegisterSingleTimeout( timeout_interval, NewSingleCallback( this, &HealthCheckedConnection::InternalHeartbeatTimeout)); } void HealthCheckedConnection::InternalHeartbeatTimeout() { m_receive_timeout_id = ola::thread::INVALID_TIMEOUT; HeartbeatTimeout(); } } // namespace network } // namespace ola ola-0.10.9/common/network/PosixInterfacePicker.cpp0000664000175000017500000002100414376533110017045 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PosixInterfacePicker.cpp * Chooses an interface to listen on * Copyright (C) 2005 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef HAVE_GETIFADDRS #ifdef HAVE_LINUX_IF_PACKET_H #include #include #include #endif // HAVE_LINUX_IF_PACKET_H #endif // HAVE_GETIFADDRS #ifdef HAVE_SYS_TYPES_H #include // Required by OpenBSD #endif // HAVE_SYS_TYPES_H #ifdef HAVE_SYS_SOCKET_H #include // order is important for FreeBSD #endif // HAVE_SYS_SOCKET_H #include #ifdef HAVE_NETINET_IN_H #include // Required by FreeBSD #endif // HAVE_NETINET_IN_H #include #include #ifdef HAVE_SOCKADDR_DL_STRUCT #include #endif // HAVE_SOCKADDR_DL_STRUCT #include #include #include #include #include #include #include "common/network/NetworkUtilsInternal.h" #include "common/network/PosixInterfacePicker.h" #include "ola/Logging.h" #include "ola/network/IPV4Address.h" #include "ola/network/MACAddress.h" #include "ola/network/NetworkUtils.h" #include "ola/network/SocketCloser.h" namespace ola { namespace network { using std::string; using std::vector; /* * Return a vector of interfaces on the system. */ vector PosixInterfacePicker::GetInterfaces( bool include_loopback) const { vector interfaces; #ifdef HAVE_SOCKADDR_DL_STRUCT string last_dl_iface_name; uint8_t hwlen = 0; char *hwaddr = NULL; int32_t index = Interface::DEFAULT_INDEX; uint16_t type = Interface::ARP_VOID_TYPE; #endif // HAVE_SOCKADDR_DL_STRUCT // create socket to get iface config int sd = socket(PF_INET, SOCK_DGRAM, 0); if (sd < 0) { OLA_WARN << "Could not create socket " << strerror(errno); return interfaces; } SocketCloser closer(sd); // use ioctl to get a listing of interfaces char *buffer; // holds the iface data unsigned int lastlen = 0; // the amount of data returned by the last ioctl unsigned int len = INITIAL_IFACE_COUNT; while (true) { struct ifconf ifc; ifc.ifc_len = len * sizeof(struct ifreq); buffer = new char[ifc.ifc_len]; ifc.ifc_buf = buffer; if (ioctl(sd, SIOCGIFCONF, &ifc) < 0) { if (errno != EINVAL || lastlen != 0) { OLA_WARN << "ioctl error " << strerror(errno); delete[] buffer; return interfaces; } } else { if (static_cast(ifc.ifc_len) == lastlen) { lastlen = ifc.ifc_len; break; } lastlen = ifc.ifc_len; } len += IFACE_COUNT_INC; delete[] buffer; } // loop through each iface for (char *ptr = buffer; ptr < buffer + lastlen;) { struct ifreq *iface = (struct ifreq*) ptr; ptr += GetIfReqSize(ptr); #ifdef HAVE_SOCKADDR_DL_STRUCT if (iface->ifr_addr.sa_family == AF_LINK) { struct sockaddr_dl *sdl = (struct sockaddr_dl*) &iface->ifr_addr; last_dl_iface_name.assign(sdl->sdl_data, sdl->sdl_nlen); hwaddr = sdl->sdl_data + sdl->sdl_nlen; hwlen = sdl->sdl_alen; if (sdl->sdl_index != 0) { // According to net/if_dl.h index = sdl->sdl_index; } type = sdl->sdl_type; } #endif // HAVE_SOCKADDR_DL_STRUCT // look for AF_INET interfaces only if (iface->ifr_addr.sa_family != AF_INET) { OLA_DEBUG << "Skipping " << iface->ifr_name << " because it's not af_inet"; continue; } struct ifreq ifrcopy = *iface; if (ioctl(sd, SIOCGIFFLAGS, &ifrcopy) < 0) { OLA_WARN << "ioctl error for " << iface->ifr_name << ": " << strerror(errno); continue; } if (!(ifrcopy.ifr_flags & IFF_UP)) { OLA_DEBUG << "Skipping " << iface->ifr_name << " because it's down"; continue; } Interface interface; interface.name = iface->ifr_name; if (ifrcopy.ifr_flags & IFF_LOOPBACK) { if (include_loopback) { interface.loopback = true; } else { OLA_DEBUG << "Skipping " << iface->ifr_name << " because it's a loopback"; continue; } } #ifdef HAVE_SOCKADDR_DL_STRUCT if (interface.name == last_dl_iface_name) { interface.index = index; interface.type = type; // The only way hwaddr is non-null is if HAVE_SOCKADDR_DL_STRUCT is // defined. if (hwaddr) { if (hwlen == MACAddress::LENGTH) { interface.hw_address = MACAddress(reinterpret_cast(hwaddr)); } else { OLA_WARN << "hwlen was not expected length, so didn't obtain MAC " << "address; got " << static_cast(hwlen) << ", expecting " << MACAddress::LENGTH; } } } #endif // HAVE_SOCKADDR_DL_STRUCT struct sockaddr_in *sin = (struct sockaddr_in *) &iface->ifr_addr; interface.ip_address = IPV4Address(sin->sin_addr.s_addr); // fetch bcast address #ifdef SIOCGIFBRDADDR if (ifrcopy.ifr_flags & IFF_BROADCAST) { if (ioctl(sd, SIOCGIFBRDADDR, &ifrcopy) < 0) { OLA_WARN << "ioctl error " << strerror(errno); } else { sin = (struct sockaddr_in *) &ifrcopy.ifr_broadaddr; interface.bcast_address = IPV4Address(sin->sin_addr.s_addr); } } #endif // SIOCGIFBRDADDR // fetch subnet address #ifdef SIOCGIFNETMASK if (ioctl(sd, SIOCGIFNETMASK, &ifrcopy) < 0) { OLA_WARN << "ioctl error " << strerror(errno); } else { sin = (struct sockaddr_in *) &ifrcopy.ifr_broadaddr; interface.subnet_mask = IPV4Address(sin->sin_addr.s_addr); } #endif // SIOCGIFNETMASK // fetch hardware address #ifdef SIOCGIFHWADDR if (ifrcopy.ifr_flags & SIOCGIFHWADDR) { if (ioctl(sd, SIOCGIFHWADDR, &ifrcopy) < 0) { OLA_WARN << "ioctl error " << strerror(errno); } else { interface.type = ifrcopy.ifr_hwaddr.sa_family; // TODO(Peter): We probably shouldn't do this if it's not ARPHRD_ETHER interface.hw_address = MACAddress( reinterpret_cast(ifrcopy.ifr_hwaddr.sa_data)); } } #endif // SIOCGIFHWADDR // fetch index #ifdef SIOCGIFINDEX if (ifrcopy.ifr_flags & SIOCGIFINDEX) { if (ioctl(sd, SIOCGIFINDEX, &ifrcopy) < 0) { OLA_WARN << "ioctl error " << strerror(errno); } else { #if defined(__FreeBSD__) || defined(__DragonFly__) interface.index = ifrcopy.ifr_index; #else interface.index = ifrcopy.ifr_ifindex; #endif // defined(__FreeBSD__) || defined(__DragonFly__) } } #elif defined(HAVE_IF_NAMETOINDEX) // fetch index on NetBSD and other platforms without SIOCGIFINDEX unsigned int index = if_nametoindex(iface->ifr_name); if (index != 0) { interface.index = index; } #endif // SIOCGIFINDEX /* ok, if that all failed we should prob try and use sysctl to work out the * broadcast and hardware addresses * I'll leave that for another day */ OLA_DEBUG << "Found: " << interface.name << ", " << interface.ip_address << ", " << interface.hw_address; interfaces.push_back(interface); } delete[] buffer; return interfaces; } /* * Return the size of an ifreq structure in a cross platform manner. * @param data a pointer to an ifreq structure * @return the size of the ifreq structure */ unsigned int PosixInterfacePicker::GetIfReqSize(const char *data) const { const struct ifreq *iface = (struct ifreq*) data; unsigned int socket_len = SockAddrLen(iface->ifr_addr); // We can't assume sizeof(ifreq) = IFNAMSIZ + sizeof(sockaddr), this isn't // the case on some 64bit linux systems. if (socket_len > sizeof(struct ifreq) - IFNAMSIZ) { return IFNAMSIZ + socket_len; } else { return sizeof(struct ifreq); } } } // namespace network } // namespace ola ola-0.10.9/common/network/MACAddressTest.cpp0000664000175000017500000001006014376533110015532 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MACAddressTest.cpp * Test fixture for the MACAddress class * Copyright (C) 2013 Peter Newman */ #include #include #include #include #include #include #include "ola/network/MACAddress.h" #include "ola/network/NetworkUtils.h" #include "ola/testing/TestUtils.h" using ola::network::MACAddress; using std::auto_ptr; using std::string; using std::vector; class MACAddressTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(MACAddressTest); CPPUNIT_TEST(testMACAddress); CPPUNIT_TEST(testMACAddressToString); CPPUNIT_TEST_SUITE_END(); public: void testMACAddress(); void testMACAddressToString(); }; CPPUNIT_TEST_SUITE_REGISTRATION(MACAddressTest); /* * Test the MAC Address class works */ void MACAddressTest::testMACAddress() { uint8_t hw_address[ola::network::MACAddress::LENGTH] = { 0x01, 0x23, 0x45, 0x67, 0x89, 0xab}; MACAddress address1; OLA_ASSERT_TRUE(MACAddress::FromString(string("01:23:45:67:89:ab"), &address1)); // Test Get() uint8_t addr[MACAddress::LENGTH]; address1.Get(addr); OLA_ASSERT_EQ(0, memcmp(addr, hw_address, MACAddress::LENGTH)); // test copy and assignment MACAddress address2(address1); OLA_ASSERT_EQ(address1, address2); MACAddress address3 = address1; OLA_ASSERT_EQ(address1, address3); // test stringification OLA_ASSERT_EQ(string("01:23:45:67:89:ab"), address1.ToString()); std::ostringstream str; str << address1; OLA_ASSERT_EQ(string("01:23:45:67:89:ab"), str.str()); // test from string auto_ptr string_address( MACAddress::FromString("fe:dc:ba:98:76:54")); OLA_ASSERT_NOT_NULL(string_address.get()); OLA_ASSERT_EQ(string("fe:dc:ba:98:76:54"), string_address->ToString()); auto_ptr string_address2( MACAddress::FromString("98.76.54.fe.dc.ba")); OLA_ASSERT_NOT_NULL(string_address2.get()); OLA_ASSERT_EQ(string("98:76:54:fe:dc:ba"), string_address2->ToString()); auto_ptr string_address3(MACAddress::FromString("foo")); OLA_ASSERT_NULL(string_address3.get()); // and the second form MACAddress string_address4; OLA_ASSERT_TRUE(MACAddress::FromString("67:89:ab:01:23:45", &string_address4)); OLA_ASSERT_EQ(string("67:89:ab:01:23:45"), string_address4.ToString()); // make sure sorting works vector addresses; addresses.push_back(address1); addresses.push_back(*string_address); addresses.push_back(string_address4); std::sort(addresses.begin(), addresses.end()); OLA_ASSERT_EQ(string("01:23:45:67:89:ab"), addresses[0].ToString()); OLA_ASSERT_EQ(string("67:89:ab:01:23:45"), addresses[1].ToString()); OLA_ASSERT_EQ(string("fe:dc:ba:98:76:54"), addresses[2].ToString()); // Test comparison OLA_ASSERT_TRUE(address1 < string_address4); OLA_ASSERT_TRUE(string_address4 > address1); OLA_ASSERT_TRUE(string_address4 < *string_address); OLA_ASSERT_TRUE(*string_address > string_address4); } /* * Check that MACAddress::ToString works */ void MACAddressTest::testMACAddressToString() { uint8_t hw_address[ola::network::MACAddress::LENGTH] = { 0x0, 0xa, 0xff, 0x10, 0x25, 0x4}; const string mac_address = MACAddress(hw_address).ToString(); OLA_ASSERT_EQ(string("00:0a:ff:10:25:04"), mac_address); } ola-0.10.9/common/network/NetworkUtilsTest.cpp0000664000175000017500000001144114376533110016302 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * NetworkUtilsTest.cpp * Test fixture for the NetworkUtils class * Copyright (C) 2005 Simon Newton */ #include #ifdef _WIN32 #include #endif // _WIN32 #include #include #include "ola/network/NetworkUtils.h" #include "ola/Logging.h" #include "ola/testing/TestUtils.h" using ola::network::FQDN; using ola::network::DomainNameFromFQDN; using ola::network::Hostname; using ola::network::HostnameFromFQDN; using ola::network::HostToLittleEndian; using ola::network::HostToNetwork; using ola::network::IPV4Address; using ola::network::LittleEndianToHost; using ola::network::NameServers; using ola::network::DefaultRoute; using ola::network::NetworkToHost; using std::string; using std::vector; class NetworkUtilsTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(NetworkUtilsTest); CPPUNIT_TEST(testToFromNetwork); CPPUNIT_TEST(testToFromLittleEndian); CPPUNIT_TEST(testNameProcessing); CPPUNIT_TEST(testNameServers); CPPUNIT_TEST(testDefaultRoute); CPPUNIT_TEST_SUITE_END(); public: void setUp(); void tearDown(); void testToFromNetwork(); void testToFromLittleEndian(); void testNameProcessing(); void testNameServers(); void testDefaultRoute(); }; CPPUNIT_TEST_SUITE_REGISTRATION(NetworkUtilsTest); /* * Setup networking subsystem */ void NetworkUtilsTest::setUp() { #if _WIN32 WSADATA wsa_data; int result = WSAStartup(MAKEWORD(2, 0), &wsa_data); OLA_ASSERT_EQ(result, 0); #endif // _WIN32 } /* * Cleanup the networking subsystem */ void NetworkUtilsTest::tearDown() { #ifdef _WIN32 WSACleanup(); #endif // _WIN32 } /* * Check that we can convert to/from network byte order */ void NetworkUtilsTest::testToFromNetwork() { uint8_t v1 = 10; OLA_ASSERT_EQ(v1, HostToNetwork(v1)); OLA_ASSERT_EQ(v1, NetworkToHost(HostToNetwork(v1))); uint16_t v2 = 0x0102; OLA_ASSERT_EQ(v2, NetworkToHost(HostToNetwork(v2))); uint32_t v3 = 0x01020304; OLA_ASSERT_EQ(v3, NetworkToHost(HostToNetwork(v3))); } /* * Check that we can convert to/from little endian order */ void NetworkUtilsTest::testToFromLittleEndian() { uint8_t v1 = 10; OLA_ASSERT_EQ(v1, HostToLittleEndian(v1)); OLA_ASSERT_EQ(v1, LittleEndianToHost(HostToLittleEndian(v1))); uint16_t v2 = 0x0102; OLA_ASSERT_EQ(v2, LittleEndianToHost(HostToLittleEndian(v2))); uint32_t v3 = 0x01020304; OLA_ASSERT_EQ(v3, LittleEndianToHost(HostToLittleEndian(v3))); int8_t v4 = -10; OLA_ASSERT_EQ(v4, HostToLittleEndian(v4)); OLA_ASSERT_EQ(v4, LittleEndianToHost(HostToLittleEndian(v4))); int16_t v5 = -0x0102; OLA_ASSERT_EQ(v5, LittleEndianToHost(HostToLittleEndian(v5))); int32_t v6 = -0x01020304; OLA_ASSERT_EQ(v6, LittleEndianToHost(HostToLittleEndian(v6))); } /* * Check that name processing works */ void NetworkUtilsTest::testNameProcessing() { // HostnameFromFQDN OLA_ASSERT_EQ(string(""), HostnameFromFQDN("")); OLA_ASSERT_EQ(string("foo"), HostnameFromFQDN("foo")); OLA_ASSERT_EQ(string("foo"), HostnameFromFQDN("foo.bar")); OLA_ASSERT_EQ(string("foo"), HostnameFromFQDN("foo.barbaz")); OLA_ASSERT_EQ(string("foo"), HostnameFromFQDN("foo.bar.com")); // DomainNameFromFQDN OLA_ASSERT_EQ(string(""), DomainNameFromFQDN("")); OLA_ASSERT_EQ(string(""), DomainNameFromFQDN("foo")); OLA_ASSERT_EQ(string("bar"), DomainNameFromFQDN("foo.bar")); OLA_ASSERT_EQ(string("barbaz"), DomainNameFromFQDN("foo.barbaz")); OLA_ASSERT_EQ(string("bar.com"), DomainNameFromFQDN("foo.bar.com")); // Check we were able to get the hostname OLA_ASSERT_GT(FQDN().length(), 0); OLA_ASSERT_GT(Hostname().length(), 0); } /* * Check that name server fetching returns true (it may not actually return any) */ void NetworkUtilsTest::testNameServers() { vector name_servers; OLA_ASSERT_TRUE(NameServers(&name_servers)); } /* * Check that default route fetching returns true (it may not actually return * one) */ void NetworkUtilsTest::testDefaultRoute() { int32_t if_index; IPV4Address default_gateway; OLA_ASSERT_TRUE(DefaultRoute(&if_index, &default_gateway)); } ola-0.10.9/common/network/SocketHelper.cpp0000664000175000017500000000413114376533110015356 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SocketHelper.cpp * Various functions to operate on sockets. * Copyright (C) 2013 Simon Newton */ #include #include #ifdef _WIN32 #include #endif // _WIN32 #include #include #include "common/network/SocketHelper.h" namespace ola { namespace network { /** * Wrapper around getsockname(). * The caller should check IsValid() on the GenericSocketAddress before using. */ GenericSocketAddress GetLocalAddress(int sd) { struct sockaddr remote_address; socklen_t length = sizeof(remote_address); int r = getsockname(sd, &remote_address, &length); if (r) { OLA_WARN << "Failed to get peer information for fd: " << sd << ", " << strerror(errno); return GenericSocketAddress(); } return GenericSocketAddress(remote_address); } /** * Wrapper around getpeername(). * The caller should check IsValid() on the GenericSocketAddress before using. */ GenericSocketAddress GetPeerAddress(int sd) { struct sockaddr remote_address; socklen_t length = sizeof(remote_address); int r = getpeername(sd, &remote_address, &length); if (r) { OLA_WARN << "Failed to get peer information for fd: " << sd << ", " << strerror(errno); return GenericSocketAddress(); } return GenericSocketAddress(remote_address); } } // namespace network } // namespace ola ola-0.10.9/common/network/SocketAddress.cpp0000664000175000017500000000720614376533110015532 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SocketAddress.cpp * Represents a sockaddr structure. * Copyright (C) 2012 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef HAVE_ARPA_INET_H #include #endif // HAVE_ARPA_INET_H #ifdef HAVE_NETINET_IN_H #include // Required by FreeBSD #endif // HAVE_NETINET_IN_H #include #include #include #include #include #include #include namespace ola { namespace network { using std::string; string IPV4SocketAddress::ToString() const { std::ostringstream str; str << Host() << ":" << Port(); return str.str(); } /** * Copy this IPV4SocketAddress into a sockaddr. */ bool IPV4SocketAddress::ToSockAddr(struct sockaddr *addr, unsigned int size) const { if (size < sizeof(struct sockaddr_in)) { OLA_FATAL << "Length passed to ToSockAddr is too small."; return false; } struct sockaddr_in *v4_addr = reinterpret_cast(addr); memset(v4_addr, 0, size); v4_addr->sin_family = AF_INET; v4_addr->sin_port = HostToNetwork(m_port); v4_addr->sin_addr.s_addr = m_host.AsInt(); return true; } /** * Extract a IPV4SocketAddress from a string. */ bool IPV4SocketAddress::FromString(const string &input, IPV4SocketAddress *socket_address) { size_t pos = input.find_first_of(":"); if (pos == string::npos) return false; IPV4Address address; if (!IPV4Address::FromString(input.substr(0, pos), &address)) return false; uint16_t port; if (!StringToInt(input.substr(pos + 1), &port)) return false; *socket_address = IPV4SocketAddress(address, port); return true; } IPV4SocketAddress IPV4SocketAddress::FromStringOrDie( const string &address) { IPV4SocketAddress socket_address; assert(FromString(address, &socket_address)); return socket_address; } bool GenericSocketAddress::IsValid() const { return Family() != AF_UNSPEC; } string GenericSocketAddress::ToString() const { switch (Family()) { case AF_INET: return V4Addr().ToString(); case AF_INET6: default: std::ostringstream str; str << "Generic sockaddr of type: " << m_addr.sa_family; return str.str(); } } /** * Convert the sockaddr to a sockaddr_in. * The caller should check that Family() is AF_INET before calling this. */ IPV4SocketAddress GenericSocketAddress::V4Addr() const { if (Family() == AF_INET) { const struct sockaddr_in *v4_addr = reinterpret_cast(&m_addr); return IPV4SocketAddress(IPV4Address(v4_addr->sin_addr.s_addr), NetworkToHost(v4_addr->sin_port)); } else { OLA_FATAL << "Invalid conversion of socket family " << Family(); return IPV4SocketAddress(IPV4Address(), 0); } } } // namespace network } // namespace ola ola-0.10.9/common/network/SocketCloser.cpp0000664000175000017500000000227114376533110015371 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SocketCloser.cpp * Close a socket when the object goes out of scope. * Copyright (C) 2013 Simon Newton */ #include "ola/network/SocketCloser.h" #include #include #ifdef _WIN32 #include #endif // _WIN32 namespace ola { namespace network { SocketCloser::~SocketCloser() { if (m_fd >= 0) { #ifdef _WIN32 closesocket(m_fd); #else close(m_fd); #endif // _WIN32 } } } // namespace network } // namespace ola ola-0.10.9/common/network/AdvancedTCPConnector.cpp0000664000175000017500000001523314376533110016722 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * AdvancedTCPConnector.cpp * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include namespace ola { namespace network { using std::pair; AdvancedTCPConnector::AdvancedTCPConnector( ola::io::SelectServerInterface *ss, TCPSocketFactoryInterface *socket_factory, const ola::TimeInterval &connection_timeout) : m_socket_factory(socket_factory), m_ss(ss), m_connector(ss), m_connection_timeout(connection_timeout) { } AdvancedTCPConnector::~AdvancedTCPConnector() { ConnectionMap::iterator iter = m_connections.begin(); for (; iter != m_connections.end(); ++iter) { AbortConnection(iter->second); delete iter->second; } m_connections.clear(); } void AdvancedTCPConnector::AddEndpoint(const IPV4SocketAddress &endpoint, BackOffPolicy *backoff_policy, bool paused) { IPPortPair key(endpoint.Host(), endpoint.Port()); ConnectionMap::iterator iter = m_connections.find(key); if (iter != m_connections.end()) return; // new ip:port ConnectionInfo *state = new ConnectionInfo; state->state = paused ? PAUSED : DISCONNECTED; state->failed_attempts = 0; state->retry_timeout = ola::thread::INVALID_TIMEOUT; state->connection_id = 0; state->policy = backoff_policy; state->reconnect = true; m_connections[key] = state; if (!paused) AttemptConnection(key, state); } void AdvancedTCPConnector::RemoveEndpoint(const IPV4SocketAddress &endpoint) { IPPortPair key(endpoint.Host(), endpoint.Port()); ConnectionMap::iterator iter = m_connections.find(key); if (iter == m_connections.end()) return; AbortConnection(iter->second); delete iter->second; m_connections.erase(iter); } bool AdvancedTCPConnector::GetEndpointState( const IPV4SocketAddress &endpoint, ConnectionState *connected, unsigned int *failed_attempts) const { IPPortPair key(endpoint.Host(), endpoint.Port()); ConnectionMap::const_iterator iter = m_connections.find(key); if (iter == m_connections.end()) return false; *connected = iter->second->state; *failed_attempts = iter->second->failed_attempts; return true; } void AdvancedTCPConnector::Disconnect(const IPV4SocketAddress &endpoint, bool pause) { IPPortPair key(endpoint.Host(), endpoint.Port()); ConnectionMap::iterator iter = m_connections.find(key); if (iter == m_connections.end()) return; if (iter->second->state != CONNECTED) return; iter->second->failed_attempts = 0; if (pause) { iter->second->state = PAUSED; } else { // schedule a retry as if this endpoint failed once iter->second->state = DISCONNECTED; iter->second->retry_timeout = m_ss->RegisterSingleTimeout( iter->second->policy->BackOffTime(1), ola::NewSingleCallback( this, &AdvancedTCPConnector::RetryTimeout, iter->first)); } } void AdvancedTCPConnector::Resume(const IPV4SocketAddress &endpoint) { IPPortPair key(endpoint.Host(), endpoint.Port()); ConnectionMap::iterator iter = m_connections.find(key); if (iter == m_connections.end()) return; if (iter->second->state == PAUSED) { iter->second->state = DISCONNECTED; AttemptConnection(iter->first, iter->second); } } /** * Schedule the re-try attempt for this connection */ void AdvancedTCPConnector::ScheduleRetry(const IPPortPair &key, ConnectionInfo *info) { info->retry_timeout = m_ss->RegisterSingleTimeout( info->policy->BackOffTime(info->failed_attempts), ola::NewSingleCallback( this, &AdvancedTCPConnector::RetryTimeout, key)); } /** * Called when it's time to retry */ void AdvancedTCPConnector::RetryTimeout(IPPortPair key) { ConnectionMap::iterator iter = m_connections.find(key); if (iter == m_connections.end()) { OLA_FATAL << "Re-connect timer expired but unable to find state entry for " << key.first << ":" << key.second; return; } iter->second->retry_timeout = ola::thread::INVALID_TIMEOUT; AttemptConnection(key, iter->second); } /** * Called by the TCPConnector when a connection is ready or it times out. */ void AdvancedTCPConnector::ConnectionResult(IPPortPair key, int fd, int) { if (fd != -1) { OLA_INFO << "TCP Connection established to " << key.first << ":" << key.second; } ConnectionMap::iterator iter = m_connections.find(key); if (iter == m_connections.end()) { OLA_FATAL << "Unable to find state for " << key.first << ":" << key.second << ", leaking sockets"; return; } ConnectionInfo *info = iter->second; info->connection_id = 0; if (fd != -1) { // ok info->state = CONNECTED; m_socket_factory->NewTCPSocket(fd); } else { // error info->failed_attempts++; if (info->reconnect) { ScheduleRetry(key, info); } } } /** * Initiate a connection to this ip:port pair */ void AdvancedTCPConnector::AttemptConnection(const IPPortPair &key, ConnectionInfo *state) { state->connection_id = m_connector.Connect( IPV4SocketAddress(key.first, key.second), m_connection_timeout, ola::NewSingleCallback(this, &AdvancedTCPConnector::ConnectionResult, key)); } /** * Abort and clean up a pending connection * @param state the ConnectionInfo to cleanup. */ void AdvancedTCPConnector::AbortConnection(ConnectionInfo *state) { if (state->connection_id) { state->reconnect = false; if (!m_connector.Cancel(state->connection_id)) OLA_WARN << "Failed to cancel connection " << state->connection_id; } if (state->retry_timeout != ola::thread::INVALID_TIMEOUT) m_ss->RemoveTimeout(state->retry_timeout); } } // namespace network } // namespace ola ola-0.10.9/common/network/MACAddress.cpp0000664000175000017500000001200714376533110014675 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MACAddress.cpp * A MAC address * Copyright (C) 2013 Peter Newman */ #include "ola/network/MACAddress.h" #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef _WIN32 #include struct ether_addr { unsigned char octet[ola::network::MACAddress::LENGTH]; }; #define ether_addr_octet octet #else #include // required for FreeBSD uchar - doesn't hurt others #ifdef HAVE_NET_ETHERNET_H #include #endif // HAVE_NET_ETHERNET_H // NetBSD and OpenBSD don't have net/ethernet.h #ifdef HAVE_SYS_SOCKET_H #include #endif // HAVE_SYS_SOCKET_H #ifdef HAVE_NET_IF_H #include #endif // HAVE_NET_IF_H #ifdef HAVE_NET_IF_ETHER_H #include #endif // HAVE_NET_IF_ETHER_H #ifdef HAVE_NETINET_IN_H #include #endif // HAVE_NETINET_IN_H #ifdef HAVE_NET_IF_ARP_H #include #endif // HAVE_NET_IF_ARP_H #ifdef HAVE_NETINET_IF_ETHER_H #include #endif // HAVE_NETINET_IF_ETHER_H #endif // _WIN32 #if defined(__FreeBSD__) || defined(__DragonFly__) // In the FreeBSD struct ether_addr, the single field is named octet, instead // of ether_addr_octet. // OS X does this too, but avoids it by adding the following line to its // header, for compatibility with linux and others: // http://www.opensource.apple.com/source/xnu/xnu-1456.1.26/bsd/net/ethernet.h #define ether_addr_octet octet #endif // defined(__FreeBSD__) || defined(__DragonFly__) #include #include #include #include #include #include "ola/network/NetworkUtils.h" #include "ola/StringUtils.h" namespace ola { namespace network { using std::string; using std::vector; MACAddress::MACAddress() { memset(m_address, 0, LENGTH); } MACAddress::MACAddress(const uint8_t *address) { memcpy(m_address, address, LENGTH); } MACAddress::MACAddress(const MACAddress &other) { memcpy(m_address, other.m_address, LENGTH); } MACAddress& MACAddress::operator=(const MACAddress &other) { if (this != &other) { memcpy(m_address, other.m_address, LENGTH); } return *this; } bool MACAddress::operator==(const MACAddress &other) const { return (memcmp(m_address, other.m_address, LENGTH) == 0); } bool MACAddress::operator<(const MACAddress &other) const { return (memcmp(m_address, other.m_address, LENGTH) < 0); } bool MACAddress::operator>(const MACAddress &other) const { return (memcmp(m_address, other.m_address, LENGTH) > 0); } void MACAddress::Get(uint8_t ptr[LENGTH]) const { memcpy(ptr, m_address, LENGTH); } string MACAddress::ToString() const { /** * ether_ntoa_r doesn't exist on Mac, so can't use it; ether_ntoa isn't * thread safe */ std::ostringstream str; for (unsigned int i = 0 ; i < MACAddress::LENGTH; i++) { if (i != 0) str << ":"; str << std::hex << std::setfill('0') << std::setw(2) << static_cast(m_address[i]); } return str.str(); } /** * Convert a string to a ether_addr struct * @param address a string in the form 'nn:nn:nn:nn:nn:nn' or * 'nn.nn.nn.nn.nn.nn' * @param target a pointer to a ether_addr struct * @return true if it worked, false otherwise */ bool StringToEther(const string &address, ether_addr *target) { /** * ether_aton_r doesn't exist on Mac, so can't use it (also it might not * handle dots as well as colons as separators) */ vector tokens; ola::StringSplit(address, &tokens, ":."); if (tokens.size() != MACAddress::LENGTH) { return false; } for (unsigned int i = 0; i < MACAddress::LENGTH; i++) { if (!ola::HexStringToInt(tokens[i], target->ether_addr_octet + i)) { return false; } } return true; } MACAddress* MACAddress::FromString(const string &address) { struct ether_addr addr; if (!StringToEther(address, &addr)) { return NULL; } return new MACAddress(addr.ether_addr_octet); } bool MACAddress::FromString(const string &address, MACAddress *target) { struct ether_addr addr; if (!StringToEther(address, &addr)) { return false; } *target = MACAddress(addr.ether_addr_octet); return true; } MACAddress MACAddress::FromStringOrDie(const string &address) { struct ether_addr addr; assert(StringToEther(address, &addr)); return MACAddress(addr.ether_addr_octet); } } // namespace network } // namespace ola ola-0.10.9/common/network/IPV4Address.cpp0000664000175000017500000001077314376533110015027 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * IPV4Address.cpp * A IPV4 address * Copyright (C) 2011 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef HAVE_WINSOCK2_H #include #ifndef in_addr_t #define in_addr_t uint32_t #endif // !in_addr_t #endif // HAVE_WINSOCK2_H #ifdef HAVE_SYS_SOCKET_H #include // Required by FreeBSD #endif // HAVE_SYS_SOCKET_H #ifdef HAVE_ARPA_INET_H #include #endif // HAVE_ARPA_INET_H #ifdef HAVE_NETINET_IN_H #include // Required by FreeBSD #endif // HAVE_NETINET_IN_H #include #include #include #include #include #include "common/network/NetworkUtilsInternal.h" #include "ola/Logging.h" #include "ola/network/IPV4Address.h" #include "ola/network/NetworkUtils.h" namespace ola { namespace network { using std::string; bool IPV4Address::operator<(const IPV4Address &other) const { // Stored in network byte order, so convert to sort appropriately return NetworkToHost(m_address) < NetworkToHost(other.m_address); } bool IPV4Address::operator>(const IPV4Address &other) const { // Stored in network byte order, so convert to sort appropriately return NetworkToHost(m_address) > NetworkToHost(other.m_address); } bool IPV4StringToAddress(const string &address, struct in_addr *addr) { bool ok; // TODO(Peter): This currently allows some rather quirky values as per // inet_aton, we may want to restrict that in future to match IPV4Validator if (address.empty()) { // Don't bother trying to extract an address if we weren't given one return false; } #ifdef HAVE_INET_PTON ok = (1 == inet_pton(AF_INET, address.data(), addr)); #elif HAVE_INET_ATON ok = (1 == inet_aton(address.data(), addr)); #else in_addr_t ip_addr4 = inet_addr(address.c_str()); ok = (INADDR_NONE != ip_addr4 || address == "255.255.255.255"); addr->s_addr = ip_addr4; #endif // HAVE_INET_PTON if (!ok) { OLA_WARN << "Could not convert address " << address; } return ok; } bool IPV4Address::IsWildcard() const { return m_address == INADDR_ANY; } string IPV4Address::ToString() const { struct in_addr addr; addr.s_addr = m_address; #ifdef HAVE_INET_NTOP char str[INET_ADDRSTRLEN]; if (inet_ntop(AF_INET, &addr, str, INET_ADDRSTRLEN) == NULL) { OLA_WARN << "Failed to convert address to string using inet_ntop, failing " << "back to inet_ntoa"; return inet_ntoa(addr); } return str; #else return inet_ntoa(addr); #endif // HAVE_INET_NTOP } IPV4Address* IPV4Address::FromString(const string &address) { struct in_addr addr; if (!IPV4StringToAddress(address, &addr)) { return NULL; } return new IPV4Address(addr.s_addr); } bool IPV4Address::FromString(const string &address, IPV4Address *target) { struct in_addr addr; if (!IPV4StringToAddress(address, &addr)) { return false; } *target = IPV4Address(addr.s_addr); return true; } IPV4Address IPV4Address::FromStringOrDie(const string &address) { struct in_addr addr; assert(IPV4StringToAddress(address, &addr)); return IPV4Address(addr.s_addr); } bool IPV4Address::ToCIDRMask(IPV4Address address, uint8_t *mask) { uint32_t netmask = NetworkToHost(address.AsInt()); uint8_t bits = 0; bool seen_one = false; for (uint8_t i = 0; i < std::numeric_limits::digits; i++) { if (netmask & 1) { bits++; seen_one = true; } else { if (seen_one) { return false; } } netmask = netmask >> 1; } *mask = bits; return true; } IPV4Address IPV4Address::WildCard() { return IPV4Address(INADDR_ANY); } IPV4Address IPV4Address::Broadcast() { return IPV4Address(INADDR_NONE); } IPV4Address IPV4Address::Loopback() { return IPV4Address(HostToNetwork(0x7f000001)); } } // namespace network } // namespace ola ola-0.10.9/common/network/NetworkUtilsInternal.h0000664000175000017500000000263714376533110016613 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * NetworkUtilsInternal.h * Abstract various network functions. * Copyright (C) 2005 Simon Newton */ #ifndef COMMON_NETWORK_NETWORKUTILSINTERNAL_H_ #define COMMON_NETWORK_NETWORKUTILSINTERNAL_H_ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef HAVE_WINSOCK2_H #define VC_EXTRALEAN #include #endif // HAVE_WINSOCK2_H #ifdef HAVE_ARPA_INET_H #include #endif // HAVE_ARPA_INET_H #include namespace ola { namespace network { /** * Return the length of a sockaddr */ unsigned int SockAddrLen(const struct sockaddr &sa); } // namespace network } // namespace ola #endif // COMMON_NETWORK_NETWORKUTILSINTERNAL_H_ ola-0.10.9/common/network/TCPSocket.cpp0000664000175000017500000001755414376533110014602 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TCPSocket.cpp * Implementation of the TCP Socket classes * Copyright (C) 2005 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include /* FreeBSD needs types.h before tcp.h */ #include #ifndef _WIN32 #include #endif // !_WIN32 #include #include #include #ifdef _WIN32 #include #include #include #else #include #endif // _WIN32 #ifdef HAVE_ARPA_INET_H #include #endif // HAVE_ARPA_INET_H #ifdef HAVE_NETINET_IN_H #include // Required by FreeBSD #endif // HAVE_NETINET_IN_H #include #include "common/network/SocketHelper.h" #include "ola/Logging.h" #include "ola/io/Descriptor.h" #include "ola/network/NetworkUtils.h" #include "ola/network/Socket.h" #include "ola/network/SocketCloser.h" #include "ola/network/TCPSocketFactory.h" namespace ola { namespace network { // TCPSocket // ------------------------------------------------ /** * Get the remote IPAddress and port for this socket */ GenericSocketAddress TCPSocket::GetPeerAddress() const { #ifdef _WIN32 return ola::network::GetPeerAddress(m_handle.m_handle.m_fd); #else return ola::network::GetPeerAddress(m_handle); #endif // _WIN32 } GenericSocketAddress TCPSocket::GetLocalAddress() const { #ifdef _WIN32 return ola::network::GetLocalAddress(m_handle.m_handle.m_fd); #else return ola::network::GetLocalAddress(m_handle); #endif // _WIN32 } TCPSocket::TCPSocket(int sd) { #ifdef _WIN32 m_handle.m_handle.m_fd = sd; m_handle.m_type = ola::io::SOCKET_DESCRIPTOR; #else m_handle = sd; #endif // _WIN32 SetNoSigPipe(m_handle); } /* * Close this TCPSocket */ bool TCPSocket::Close() { if (m_handle != ola::io::INVALID_DESCRIPTOR) { #ifdef _WIN32 closesocket(m_handle.m_handle.m_fd); #else close(m_handle); #endif // _WIN32 m_handle = ola::io::INVALID_DESCRIPTOR; } return true; } /* * Set the TCP_NODELAY option */ bool TCPSocket::SetNoDelay() { int flag = 1; #ifdef _WIN32 int sd = m_handle.m_handle.m_fd; #else int sd = m_handle; #endif // _WIN32 int result = setsockopt(sd, IPPROTO_TCP, TCP_NODELAY, reinterpret_cast(&flag), sizeof(flag)); if (result < 0) { OLA_WARN << "Can't set TCP_NODELAY for " << sd << ", " << strerror(errno); return false; } return true; } /* * Connect * @param ip_address the IP to connect to * @param port the port to connect to * @param blocking whether to block on connect or not */ TCPSocket* TCPSocket::Connect(const SocketAddress &endpoint) { struct sockaddr server_address; if (!endpoint.ToSockAddr(&server_address, sizeof(server_address))) return NULL; int sd = socket(endpoint.Family(), SOCK_STREAM, 0); if (sd < 0) { OLA_WARN << "socket() failed, " << strerror(errno); return NULL; } SocketCloser closer(sd); int r = connect(sd, &server_address, sizeof(server_address)); if (r) { OLA_WARN << "connect(" << endpoint << "): " << strerror(errno); return NULL; } TCPSocket *socket = new TCPSocket(closer.Release()); socket->SetReadNonBlocking(); return socket; } // TCPAcceptingSocket // ------------------------------------------------ /* * Create a new TCPListeningSocket */ TCPAcceptingSocket::TCPAcceptingSocket(TCPSocketFactoryInterface *factory) : ReadFileDescriptor(), m_handle(ola::io::INVALID_DESCRIPTOR), m_factory(factory) { } /** * Clean up */ TCPAcceptingSocket::~TCPAcceptingSocket() { Close(); } /* * Start listening * @param endpoint the SocketAddress to listen on * @param backlog the backlog * @return true if it succeeded, false otherwise */ bool TCPAcceptingSocket::Listen(const SocketAddress &endpoint, int backlog) { struct sockaddr server_address; int reuse_flag = 1; if (m_handle != ola::io::INVALID_DESCRIPTOR) return false; if (!endpoint.ToSockAddr(&server_address, sizeof(server_address))) return false; int sd = socket(endpoint.Family(), SOCK_STREAM, 0); if (sd < 0) { OLA_WARN << "socket() failed: " << strerror(errno); return false; } SocketCloser closer(sd); #ifdef _WIN32 ola::io::DescriptorHandle temp_handle; temp_handle.m_handle.m_fd = sd; temp_handle.m_type = ola::io::SOCKET_DESCRIPTOR; if (!ola::io::ConnectedDescriptor::SetNonBlocking(temp_handle)) { #else if (!ola::io::ConnectedDescriptor::SetNonBlocking(sd)) { #endif // _WIN32 OLA_WARN << "Failed to mark TCP accept socket as non-blocking"; return false; } int ok = setsockopt(sd, SOL_SOCKET, SO_REUSEADDR, reinterpret_cast(&reuse_flag), sizeof(reuse_flag)); if (ok < 0) { OLA_WARN << "can't set reuse for " << sd << ", " << strerror(errno); return false; } if (bind(sd, &server_address, sizeof(server_address)) == -1) { OLA_WARN << "bind to " << endpoint << " failed, " << strerror(errno); return false; } if (listen(sd, backlog)) { OLA_WARN << "listen on " << endpoint << " failed, " << strerror(errno); return false; } #ifdef _WIN32 m_handle.m_handle.m_fd = closer.Release(); m_handle.m_type = ola::io::SOCKET_DESCRIPTOR; #else m_handle = closer.Release(); #endif // _WIN32 return true; } /* * Stop listening & close this socket * @return true if close succeeded, false otherwise */ bool TCPAcceptingSocket::Close() { bool ret = true; if (m_handle != ola::io::INVALID_DESCRIPTOR) { #ifdef _WIN32 if (closesocket(m_handle.m_handle.m_fd)) { #else if (close(m_handle)) { #endif // _WIN32 OLA_WARN << "close() failed " << strerror(errno); ret = false; } } m_handle = ola::io::INVALID_DESCRIPTOR; return ret; } /* * Accept new connections * @return a new connected socket */ void TCPAcceptingSocket::PerformRead() { if (m_handle == ola::io::INVALID_DESCRIPTOR) return; while (1) { struct sockaddr_in cli_address; socklen_t length = sizeof(cli_address); #ifdef _WIN32 int sd = accept(m_handle.m_handle.m_fd, (struct sockaddr*) &cli_address, &length); #else int sd = accept(m_handle, (struct sockaddr*) &cli_address, &length); #endif // _WIN32 if (sd < 0) { #ifdef _WIN32 if (WSAGetLastError() == WSAEWOULDBLOCK) { #else if (errno == EWOULDBLOCK) { #endif // _WIN32 return; } OLA_WARN << "accept() failed, " << strerror(errno); return; } if (m_factory) { // The callback takes ownership of the new socket descriptor // coverity[RESOURCE_LEAK] m_factory->NewTCPSocket(sd); } else { OLA_WARN << "Accepted new TCP Connection but no factory registered"; #ifdef _WIN32 closesocket(sd); #else close(sd); #endif // _WIN32 } } } /** * Get the local IPAddress and port for this socket */ GenericSocketAddress TCPAcceptingSocket::GetLocalAddress() const { #ifdef _WIN32 return ola::network::GetLocalAddress(m_handle.m_handle.m_fd); #else return ola::network::GetLocalAddress(m_handle); #endif // _WIN32 } } // namespace network } // namespace ola ola-0.10.9/common/network/TCPConnector.cpp0000664000175000017500000001710314376533110015272 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TCPConnector.cpp * Copyright (C) 2012 Simon Newton */ #include #ifdef _WIN32 #include #ifndef ETIMEDOUT #define ETIMEDOUT WSAETIMEDOUT #endif // !ETIMEDOUT #endif // _WIN32 #include "ola/Logging.h" #include "ola/network/NetworkUtils.h" #include "ola/network/TCPConnector.h" #include "ola/stl/STLUtils.h" namespace ola { namespace network { /* * A TCP socket waiting to connect. */ class PendingTCPConnection: public ola::io::WriteFileDescriptor { public: PendingTCPConnection(TCPConnector *connector, const IPV4Address &ip, int fd, TCPConnector::TCPConnectCallback *callback); ola::io::DescriptorHandle WriteDescriptor() const { return m_handle; } void PerformWrite(); void Close(); const IPV4Address ip_address; TCPConnector::TCPConnectCallback *callback; ola::thread::timeout_id timeout_id; private: TCPConnector *m_connector; ola::io::DescriptorHandle m_handle; }; PendingTCPConnection::PendingTCPConnection( TCPConnector *connector, const IPV4Address &ip, int fd, TCPConnector::TCPConnectCallback *callback) : WriteFileDescriptor(), ip_address(ip), callback(callback), timeout_id(ola::thread::INVALID_TIMEOUT), m_connector(connector) { #ifdef _WIN32 m_handle.m_handle.m_fd = fd; m_handle.m_type = ola::io::SOCKET_DESCRIPTOR; #else m_handle = fd; #endif // _WIN32 } /* * Close this connection */ void PendingTCPConnection::Close() { #ifdef _WIN32 close(m_handle.m_handle.m_fd); #else close(m_handle); #endif // _WIN32 } /* * Called when the socket becomes writeable */ void PendingTCPConnection::PerformWrite() { m_connector->SocketWritable(this); } void DeleteConnection(PendingTCPConnection *connection) { delete connection; } TCPConnector::TCPConnector(ola::io::SelectServerInterface *ss) : m_ss(ss) { } TCPConnector::~TCPConnector() { CancelAll(); } TCPConnector::TCPConnectionID TCPConnector::Connect( const IPV4SocketAddress &endpoint, const ola::TimeInterval &timeout, TCPConnectCallback *callback) { struct sockaddr server_address; if (!endpoint.ToSockAddr(&server_address, sizeof(server_address))) { callback->Run(-1, 0); return 0; } int sd = socket(endpoint.Family(), SOCK_STREAM, 0); if (sd < 0) { int error = errno; OLA_WARN << "socket() failed, " << strerror(error); callback->Run(-1, error); return 0; } #ifdef _WIN32 ola::io::DescriptorHandle descriptor; descriptor.m_handle.m_fd = sd; descriptor.m_type = ola::io::SOCKET_DESCRIPTOR; #else ola::io::DescriptorHandle descriptor = sd; #endif // _WIN32 ola::io::ConnectedDescriptor::SetNonBlocking(descriptor); int r = connect(sd, &server_address, sizeof(server_address)); if (r) { #ifdef _WIN32 if (WSAGetLastError() != WSAEWOULDBLOCK) { #else if (errno != EINPROGRESS) { #endif // _WIN32 int error = errno; OLA_WARN << "connect() to " << endpoint << " returned, " << strerror(error); close(sd); callback->Run(-1, error); return 0; } } else { // Connect returned immediately // The callback takes ownership of the socket descriptor. callback->Run(sd, 0); // coverity[RESOURCE_LEAK] return 0; } PendingTCPConnection *connection = new PendingTCPConnection( this, endpoint.Host(), sd, callback); m_connections.insert(connection); connection->timeout_id = m_ss->RegisterSingleTimeout( timeout, ola::NewSingleCallback(this, &TCPConnector::TimeoutEvent, connection)); m_ss->AddWriteDescriptor(connection); return connection; } bool TCPConnector::Cancel(TCPConnectionID id) { PendingTCPConnection *connection = const_cast( reinterpret_cast(id)); ConnectionSet::iterator iter = m_connections.find(connection); if (iter == m_connections.end()) return false; if (connection->timeout_id != ola::thread::INVALID_TIMEOUT) { m_ss->RemoveTimeout(connection->timeout_id); connection->timeout_id = ola::thread::INVALID_TIMEOUT; } Timeout(iter); m_connections.erase(iter); return true; } void TCPConnector::CancelAll() { ConnectionSet::iterator iter = m_connections.begin(); for (; iter != m_connections.end(); ++iter) { PendingTCPConnection *connection = *iter; if (connection->timeout_id != ola::thread::INVALID_TIMEOUT) { m_ss->RemoveTimeout(connection->timeout_id); connection->timeout_id = ola::thread::INVALID_TIMEOUT; } Timeout(iter); } m_connections.clear(); } /* * Called when a socket becomes writeable. */ void TCPConnector::SocketWritable(PendingTCPConnection *connection) { // Cancel the timeout m_ss->RemoveTimeout(connection->timeout_id); connection->timeout_id = ola::thread::INVALID_TIMEOUT; m_ss->RemoveWriteDescriptor(connection); // fetch the error code #ifdef _WIN32 int sd = connection->WriteDescriptor().m_handle.m_fd; #else int sd = connection->WriteDescriptor(); #endif // _WIN32 int error = 0; socklen_t len; len = sizeof(error); #ifdef _WIN32 int r = getsockopt(sd, SOL_SOCKET, SO_ERROR, reinterpret_cast(&error), &len); #else int r = getsockopt(sd, SOL_SOCKET, SO_ERROR, &error, &len); #endif // _WIN32 if (r < 0) { error = errno; } ConnectionSet::iterator iter = m_connections.find(connection); if (iter != m_connections.end()) { m_connections.erase(iter); } // we're already within the PendingTCPConnection's call stack here // schedule the deletion to run later m_ss->Execute(ola::NewSingleCallback(DeleteConnection, connection)); if (error) { OLA_WARN << "connect() to " << connection->ip_address << " returned: " << strerror(error); connection->Close(); connection->callback->Run(-1, error); } else { #ifdef _WIN32 connection->callback->Run(connection->WriteDescriptor().m_handle.m_fd, 0); #else connection->callback->Run(connection->WriteDescriptor(), 0); #endif // _WIN32 } } /** * Delete this pending connection */ void TCPConnector::FreePendingConnection(PendingTCPConnection *connection) { delete connection; } void TCPConnector::Timeout(const ConnectionSet::iterator &iter) { PendingTCPConnection *connection = *iter; m_ss->RemoveWriteDescriptor(connection); connection->Close(); TCPConnectCallback *callback = connection->callback; delete connection; callback->Run(-1, ETIMEDOUT); } /** * Called when the connect() times out. */ void TCPConnector::TimeoutEvent(PendingTCPConnection *connection) { ConnectionSet::iterator iter = m_connections.find(connection); if (iter == m_connections.end()) { OLA_FATAL << "Timeout triggered but couldn't find the connection this refers to"; } connection->timeout_id = ola::thread::INVALID_TIMEOUT; Timeout(iter); m_connections.erase(iter); } } // namespace network } // namespace ola ola-0.10.9/common/network/PosixInterfacePicker.h0000664000175000017500000000272214376533110016520 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PosixInterfacePicker.h * Choose an interface to listen on * Copyright (C) 2005 Simon Newton */ #ifndef COMMON_NETWORK_POSIXINTERFACEPICKER_H_ #define COMMON_NETWORK_POSIXINTERFACEPICKER_H_ #include #include "ola/network/InterfacePicker.h" namespace ola { namespace network { /* * The InterfacePicker for posix systems */ class PosixInterfacePicker: public InterfacePicker { public: std::vector GetInterfaces(bool include_loopback) const; private: static const unsigned int INITIAL_IFACE_COUNT = 10; static const unsigned int IFACE_COUNT_INC = 5; unsigned int GetIfReqSize(const char *data) const; }; } // namespace network } // namespace ola #endif // COMMON_NETWORK_POSIXINTERFACEPICKER_H_ ola-0.10.9/common/network/NetworkUtils.cpp0000664000175000017500000004240414376533110015445 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * NetworkUtils.cpp * Abstract various network functions. * Copyright (C) 2005 Simon Newton */ #include "ola/network/NetworkUtils.h" #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef _WIN32 typedef uint32_t in_addr_t; // Iphlpapi.h depends on Winsock2.h #define WIN_32_LEAN_AND_MEAN #include #include #if HAVE_WINERROR_H #include #endif // HAVE_WINERROR_H #else #include #endif // _WIN32 #ifdef HAVE_RESOLV_H #include #endif // HAVE_RESOLV_H #if defined(HAVE_LINUX_NETLINK_H) && defined(HAVE_LINUX_RTNETLINK_H) #define USE_NETLINK_FOR_DEFAULT_ROUTE 1 #include #include #elif defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_NET_ROUTE_H) && \ defined(HAVE_DECL_PF_ROUTE) && defined(HAVE_DECL_NET_RT_DUMP) #define USE_SYSCTL_FOR_DEFAULT_ROUTE 1 #include #ifdef HAVE_SYS_PARAM_H #include #endif // HAVE_SYS_PARAM_H #include #else // TODO(Peter): Do something else if we don't have Netlink/on Windows #endif // defined(HAVE_LINUX_NETLINK_H) && defined(HAVE_LINUX_RTNETLINK_H) #ifdef HAVE_ENDIAN_H #include #endif // HAVE_ENDIAN_H #include #include #include #include #include #include #include #include #include #include #include "common/network/NetworkUtilsInternal.h" #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/math/Random.h" #include "ola/network/Interface.h" #include "ola/network/MACAddress.h" #include "ola/network/SocketCloser.h" namespace ola { namespace network { using std::string; using std::vector; using ola::network::Interface; namespace { inline bool IsBigEndian() { // Some versions of NetBSD have endian.h but not __BIG_ENDIAN #if defined(HAVE_ENDIAN_H) && defined(__BIG_ENDIAN) return BYTE_ORDER == __BIG_ENDIAN; #else #ifdef _WIN32 // Windows currently only runs in little-endian mode, but that might change // on future devices. Since there is no BYTE_ORDER define, we use this // little trick from http://esr.ibiblio.org/?p=5095 return (*(uint16_t*)"\0\xff" < 0x100); // NOLINT(readability/casting) #else return BYTE_ORDER == BIG_ENDIAN; #endif // _WIN32 #endif // defined(HAVE_ENDIAN_H) && defined(__BIG_ENDIAN) } inline uint32_t ByteSwap32(uint32_t value) { return ((value & 0x000000ff) << 24) | ((value & 0x0000ff00) << 8) | ((value & 0x00ff0000) >> 8) | ((value & 0xff000000) >> 24); } inline uint32_t ByteSwap16(uint16_t value) { return ((value & 0xff) << 8) | ((value & 0xff00) >> 8); } } // namespace unsigned int SockAddrLen(const struct sockaddr &sa) { #ifdef HAVE_SOCKADDR_SA_LEN return sa.sa_len; #else switch (sa.sa_family) { case AF_INET: return sizeof(struct sockaddr_in); #ifdef IPV6 case AF_INET6: return sizeof(struct sockaddr_in6); #endif // IPV6 #ifdef HAVE_SOCKADDR_DL_STRUCT case AF_LINK: return sizeof(struct sockaddr_dl); #endif // HAVE_SOCKADDR_DL_STRUCT default: OLA_WARN << "Can't determine size of sockaddr: " << sa.sa_family; return sizeof(struct sockaddr); } #endif // HAVE_SOCKADDR_SA_LEN } uint16_t NetworkToHost(uint16_t value) { return ntohs(value); } uint32_t NetworkToHost(uint32_t value) { return ntohl(value); } int16_t NetworkToHost(int16_t value) { return ntohs(value); } int32_t NetworkToHost(int32_t value) { return ntohl(value); } uint16_t HostToNetwork(uint16_t value) { return htons(value); } int16_t HostToNetwork(int16_t value) { return htons(value); } uint32_t HostToNetwork(uint32_t value) { return htonl(value); } int32_t HostToNetwork(int32_t value) { return htonl(value); } uint16_t HostToLittleEndian(uint16_t value) { if (IsBigEndian()) { return ByteSwap16(value); } else { return value; } } int16_t HostToLittleEndian(int16_t value) { if (IsBigEndian()) { return ByteSwap16(value); } else { return value; } } uint32_t HostToLittleEndian(uint32_t value) { if (IsBigEndian()) { return ByteSwap32(value); } else { return value; } } int32_t HostToLittleEndian(int32_t value) { if (IsBigEndian()) { return ByteSwap32(value); } else { return value; } } uint16_t LittleEndianToHost(uint16_t value) { if (IsBigEndian()) { return ByteSwap16(value); } else { return value; } } int16_t LittleEndianToHost(int16_t value) { if (IsBigEndian()) { return ByteSwap16(value); } else { return value; } } uint32_t LittleEndianToHost(uint32_t value) { if (IsBigEndian()) { return ByteSwap32(value); } else { return value; } } int32_t LittleEndianToHost(int32_t value) { if (IsBigEndian()) { return ByteSwap32(value); } else { return value; } } string HostnameFromFQDN(const string &fqdn) { string::size_type first_dot = fqdn.find_first_of("."); if (first_dot == string::npos) { return fqdn; } return fqdn.substr(0, first_dot); // Don't return the dot itself } string DomainNameFromFQDN(const string &fqdn) { string::size_type first_dot = string::npos; first_dot = fqdn.find_first_of("."); if (first_dot == string::npos) { return ""; } return fqdn.substr(first_dot + 1); // Don't return the dot itself } string DomainName() { return DomainNameFromFQDN(FQDN()); } string FQDN() { #ifdef _POSIX_HOST_NAME_MAX char hostname[_POSIX_HOST_NAME_MAX]; #else char hostname[256]; #endif // _POSIX_HOST_NAME_MAX int ret = gethostname(hostname, sizeof(hostname)); if (ret) { OLA_WARN << "gethostname failed: " << strerror(errno); return ""; } return hostname; } string FullHostname() { return FQDN(); } string Hostname() { return HostnameFromFQDN(FQDN()); } bool NameServers(vector *name_servers) { #if HAVE_DECL_RES_NINIT struct __res_state res; memset(&res, 0, sizeof(struct __res_state)); // Init the resolver info each time so it's always current for the RDM // responders in case we've set it via RDM too if (res_ninit(&res) != 0) { OLA_WARN << "Error getting nameservers via res_ninit"; return false; } for (int32_t i = 0; i < res.nscount; i++) { IPV4Address addr = IPV4Address(res.nsaddr_list[i].sin_addr.s_addr); OLA_DEBUG << "Found Nameserver " << i << ": " << addr; name_servers->push_back(addr); } res_nclose(&res); #elif defined(_WIN32) ULONG size = sizeof(FIXED_INFO); PFIXED_INFO fixed_info = NULL; while (1) { fixed_info = reinterpret_cast(new uint8_t[size]); DWORD result = GetNetworkParams(fixed_info, &size); if (result == ERROR_SUCCESS) { break; } if (result != ERROR_BUFFER_OVERFLOW) { OLA_WARN << "GetNetworkParams failed with: " << GetLastError(); return false; } delete[] fixed_info; } IP_ADDR_STRING* addr = &(fixed_info->DnsServerList); for (; addr; addr = addr->Next) { IPV4Address ipv4addr = IPV4Address(inet_addr(addr->IpAddress.String)); OLA_DEBUG << "Found nameserver: " << ipv4addr; name_servers->push_back(ipv4addr); } delete[] fixed_info; #else // Init the resolver info each time so it's always current for the RDM // responders in case we've set it via RDM too if (res_init() != 0) { OLA_WARN << "Error getting nameservers via res_init"; return false; } for (int32_t i = 0; i < _res.nscount; i++) { IPV4Address addr = IPV4Address(_res.nsaddr_list[i].sin_addr.s_addr); OLA_DEBUG << "Found Nameserver " << i << ": " << addr; name_servers->push_back(addr); } #endif // HAVE_DECL_RES_NINIT return true; } #ifdef USE_SYSCTL_FOR_DEFAULT_ROUTE /** * Try to extract an AF_INET address from a sockaddr. If successful, sa points * to the next sockaddr and true is returned. */ bool ExtractIPV4AddressFromSockAddr(const uint8_t **data, IPV4Address *ip) { const struct sockaddr *sa = reinterpret_cast(*data); if (sa->sa_family != AF_INET) { return false; } *ip = IPV4Address( reinterpret_cast(*data)->sin_addr.s_addr); *data += SockAddrLen(*sa); return true; } /** * Use sysctl() to get the default route */ static bool GetDefaultRouteWithSysctl(int32_t *if_index, IPV4Address *default_gateway) { int mib[] = {CTL_NET, PF_ROUTE, 0, AF_INET, NET_RT_DUMP, 0}; size_t space_required; uint8_t *buffer = NULL; // loop until we know we've read all the data. while (1) { int ret = sysctl(mib, 6, NULL, &space_required, NULL, 0); if (ret < 0) { OLA_WARN << "sysctl({CTL_NET, PF_ROUTE, 0, 0, NET_RT_DUMP, 0}, 6, NULL) " << "failed: " << strerror(errno); return false; } buffer = new uint8_t[space_required]; ret = sysctl(mib, 6, buffer, &space_required, NULL, 0); if (ret < 0) { delete[] buffer; if (errno == ENOMEM) { continue; } else { OLA_WARN << "sysctl({CTL_NET, PF_ROUTE, 0, 0, NET_RT_DUMP, 0}, 6, !NULL)" << " failed: " << strerror(errno); return false; } } else { break; } } const struct rt_msghdr *rtm = NULL; const uint8_t *end = buffer + space_required; for (const uint8_t *next = buffer; next < end; next += rtm->rtm_msglen) { rtm = reinterpret_cast(next); if (rtm->rtm_version != RTM_VERSION) { OLA_WARN << "Old RTM_VERSION, was " << rtm->rtm_version << ", expected " << RTM_VERSION; continue; } const uint8_t *data_start = reinterpret_cast(rtm + 1); IPV4Address dest, gateway, netmask; if (rtm->rtm_flags & RTA_DST) { if (!ExtractIPV4AddressFromSockAddr(&data_start, &dest)) { continue; } } if (rtm->rtm_flags & RTA_GATEWAY) { if (!ExtractIPV4AddressFromSockAddr(&data_start, &gateway)) { continue; } } if (rtm->rtm_flags & RTA_NETMASK) { if (!ExtractIPV4AddressFromSockAddr(&data_start, &netmask)) { continue; } } if (dest.IsWildcard() && netmask.IsWildcard()) { *default_gateway = gateway; *if_index = rtm->rtm_index; delete[] buffer; OLA_INFO << "Default gateway: " << *default_gateway << ", if_index: " << *if_index; return true; } } delete[] buffer; OLA_WARN << "No default route found"; return true; } #elif defined(USE_NETLINK_FOR_DEFAULT_ROUTE) /** * Handle a netlink message. If this message is a routing table message and it * contains the default route, then either: * i) default_gateway is updated with the address of the gateway. * ii) if_index is updated with the interface index for the default route. * @param if_index[out] possibly updated with interface index for the default * route. * @param default_gateway[out] possibly updated with the default gateway. * @param nl_hdr the netlink message. */ void MessageHandler(int32_t *if_index, IPV4Address *default_gateway, const struct nlmsghdr *nl_hdr) { // Unless RTA_DST is provided, an RTA_GATEWAY or RTA_OIF attribute implies // it's the default route. IPV4Address gateway; int32_t index = Interface::DEFAULT_INDEX; bool is_default_route = true; // Loop over the attributes looking for RTA_GATEWAY and/or RTA_DST const rtmsg *rt_msg = reinterpret_cast(NLMSG_DATA(nl_hdr)); if (rt_msg->rtm_family == AF_INET && rt_msg->rtm_table == RT_TABLE_MAIN) { int rt_len = RTM_PAYLOAD(nl_hdr); for (const rtattr* rt_attr = reinterpret_cast( RTM_RTA(rt_msg)); RTA_OK(rt_attr, rt_len); rt_attr = RTA_NEXT(rt_attr, rt_len)) { switch (rt_attr->rta_type) { case RTA_OIF: index = *(reinterpret_cast(RTA_DATA(rt_attr))); break; case RTA_GATEWAY: gateway = IPV4Address( reinterpret_cast(RTA_DATA(rt_attr))->s_addr); break; case RTA_DST: IPV4Address dest( reinterpret_cast(RTA_DATA(rt_attr))->s_addr); is_default_route = dest.IsWildcard(); break; } } } if (is_default_route && (!gateway.IsWildcard() || index != Interface::DEFAULT_INDEX)) { *default_gateway = gateway; *if_index = index; } } typedef ola::Callback1 NetlinkCallback; /** * Read a message from the netlink socket. This continues to read until the * expected sequence number is seend. Returns true if the desired message was * seen, false if there was an error reading from the netlink socket. */ bool ReadNetlinkSocket(int sd, uint8_t *buffer, int bufsize, unsigned int seq, NetlinkCallback *handler) { OLA_DEBUG << "Looking for netlink response with seq: " << seq; while (true) { int len = recv(sd, buffer, bufsize, 0); if (len < 0) { return false; } if (len == static_cast(bufsize)) { OLA_WARN << "Number of bytes fetched == buffer size (" << bufsize << "), Netlink data may be truncated"; } struct nlmsghdr* nl_hdr; for (nl_hdr = reinterpret_cast(buffer); NLMSG_OK(nl_hdr, static_cast(len)); nl_hdr = NLMSG_NEXT(nl_hdr, len)) { OLA_DEBUG << "Read seq " << nl_hdr->nlmsg_seq << ", pid " << nl_hdr->nlmsg_pid << ", type " << nl_hdr->nlmsg_type << ", from netlink socket"; if (static_cast(nl_hdr->nlmsg_seq) != seq) { continue; } if (nl_hdr->nlmsg_type == NLMSG_ERROR) { struct nlmsgerr* err = reinterpret_cast( NLMSG_DATA(nl_hdr)); OLA_WARN << "Netlink returned error: " << err->error; return false; } handler->Run(nl_hdr); if ((nl_hdr->nlmsg_flags & NLM_F_MULTI) == 0 || nl_hdr->nlmsg_type == NLMSG_DONE) { return true; } } } } /** * Get the default route using a netlink socket */ static bool GetDefaultRouteWithNetlink(int32_t *if_index, IPV4Address *default_gateway) { int sd = socket(PF_ROUTE, SOCK_DGRAM, NETLINK_ROUTE); if (sd < 0) { OLA_WARN << "Could not create Netlink socket " << strerror(errno); return false; } SocketCloser closer(sd); int seq = ola::math::Random(0, INT_MAX); const unsigned int BUFSIZE = 8192; uint8_t msg[BUFSIZE]; memset(msg, 0, BUFSIZE); nlmsghdr* nl_msg = reinterpret_cast(msg); nl_msg->nlmsg_len = NLMSG_LENGTH(sizeof(rtmsg)); nl_msg->nlmsg_type = RTM_GETROUTE; nl_msg->nlmsg_flags = NLM_F_DUMP | NLM_F_REQUEST; nl_msg->nlmsg_seq = seq++; nl_msg->nlmsg_pid = 0; if (send(sd, nl_msg, nl_msg->nlmsg_len, 0) < 0) { OLA_WARN << "Could not send data to Netlink " << strerror(errno); return false; } std::auto_ptr cb( ola::NewCallback(MessageHandler, if_index, default_gateway)); if (!ReadNetlinkSocket(sd, msg, BUFSIZE, nl_msg->nlmsg_seq, cb.get())) { return false; } if (default_gateway->IsWildcard() && *if_index == Interface::DEFAULT_INDEX) { OLA_WARN << "No default route found"; } OLA_INFO << "Default gateway: " << *default_gateway << ", if_index: " << *if_index; return true; } #endif // USE_SYSCTL_FOR_DEFAULT_ROUTE bool DefaultRoute(int32_t *if_index, IPV4Address *default_gateway) { *default_gateway = IPV4Address(); *if_index = Interface::DEFAULT_INDEX; #ifdef USE_SYSCTL_FOR_DEFAULT_ROUTE return GetDefaultRouteWithSysctl(if_index, default_gateway); #elif defined(USE_NETLINK_FOR_DEFAULT_ROUTE) return GetDefaultRouteWithNetlink(if_index, default_gateway); #elif defined(_WIN32) ULONG size = 4096; PMIB_IPFORWARDTABLE forward_table = reinterpret_cast(malloc(size)); DWORD result = GetIpForwardTable(forward_table, &size, TRUE); if (result == NO_ERROR) { for (unsigned int i = 0; i < forward_table->dwNumEntries; ++i) { if (forward_table->table[i].dwForwardDest == 0) { *default_gateway = IPV4Address(forward_table->table[i].dwForwardNextHop); *if_index = forward_table->table[i].dwForwardIfIndex; } } free(forward_table); return true; } else { OLA_WARN << "GetIpForwardTable failed with " << GetLastError(); return false; } #else #error "DefaultRoute not implemented for this platform, please report this." // TODO(Peter): Do something else on machines without Netlink // No Netlink, can't do anything return false; #endif // USE_SYSCTL_FOR_DEFAULT_ROUTE } } // namespace network } // namespace ola ola-0.10.9/common/network/FakeInterfacePicker.h0000664000175000017500000000323514376533110016264 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * FakeInterfacePicker.h * A fake interface picker * Copyright (C) 2005 Simon Newton */ #ifndef COMMON_NETWORK_FAKEINTERFACEPICKER_H_ #define COMMON_NETWORK_FAKEINTERFACEPICKER_H_ #include #include "ola/Logging.h" #include "ola/network/InterfacePicker.h" namespace ola { namespace network { /* * The InterfacePicker for dummy systems and testing */ class FakeInterfacePicker: public InterfacePicker { public: explicit FakeInterfacePicker(const std::vector &interfaces) : InterfacePicker(), m_interfaces(interfaces) { } std::vector GetInterfaces(bool include_loopback) const { if (include_loopback) { return m_interfaces; } else { // Todo(Peter): Filter out loopback interfaces return m_interfaces; } } private: const std::vector m_interfaces; }; } // namespace network } // namespace ola #endif // COMMON_NETWORK_FAKEINTERFACEPICKER_H_ ola-0.10.9/common/network/Makefile.mk0000664000175000017500000000455214376533110014337 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += \ common/network/AdvancedTCPConnector.cpp \ common/network/FakeInterfacePicker.h \ common/network/HealthCheckedConnection.cpp \ common/network/IPV4Address.cpp \ common/network/Interface.cpp \ common/network/InterfacePicker.cpp \ common/network/MACAddress.cpp \ common/network/NetworkUtils.cpp \ common/network/NetworkUtilsInternal.h \ common/network/Socket.cpp \ common/network/SocketAddress.cpp \ common/network/SocketCloser.cpp \ common/network/SocketHelper.cpp \ common/network/SocketHelper.h \ common/network/TCPConnector.cpp \ common/network/TCPSocket.cpp common_libolacommon_la_LIBADD += $(RESOLV_LIBS) if USING_WIN32 common_libolacommon_la_SOURCES += \ common/network/WindowsInterfacePicker.h \ common/network/WindowsInterfacePicker.cpp else common_libolacommon_la_SOURCES += \ common/network/PosixInterfacePicker.h \ common/network/PosixInterfacePicker.cpp endif # TESTS ################################################## test_programs += \ common/network/HealthCheckedConnectionTester \ common/network/NetworkTester \ common/network/TCPConnectorTester common_network_HealthCheckedConnectionTester_SOURCES = \ common/network/HealthCheckedConnectionTest.cpp common_network_HealthCheckedConnectionTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_network_HealthCheckedConnectionTester_LDADD = $(COMMON_TESTING_LIBS) common_network_NetworkTester_SOURCES = \ common/network/IPV4AddressTest.cpp \ common/network/InterfacePickerTest.cpp \ common/network/InterfaceTest.cpp \ common/network/MACAddressTest.cpp \ common/network/NetworkUtilsTest.cpp \ common/network/SocketAddressTest.cpp \ common/network/SocketTest.cpp common_network_NetworkTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_network_NetworkTester_LDADD = $(COMMON_TESTING_LIBS) if USING_WIN32 common_network_NetworkTester_LDFLAGS = -no-undefined -liphlpapi -lnetapi32 \ -lcap -lws2_32 -ldpnet -lwsock32 endif common_network_TCPConnectorTester_SOURCES = \ common/network/AdvancedTCPConnectorTest.cpp \ common/network/TCPConnectorTest.cpp common_network_TCPConnectorTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_network_TCPConnectorTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/network/InterfaceTest.cpp0000664000175000017500000001215414376533110015532 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * InterfaceTest.cpp * Test fixture for the Interface & InterfaceBuilder classes. * Copyright (C) 2011 Simon Newton */ #include #include #include "ola/Logging.h" #include "ola/network/Interface.h" #include "ola/network/IPV4Address.h" #include "ola/network/MACAddress.h" #include "ola/network/NetworkUtils.h" #include "ola/testing/TestUtils.h" using ola::network::IPV4Address; using ola::network::Interface; using ola::network::InterfaceBuilder; using ola::network::MACAddress; using std::string; class InterfaceTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(InterfaceTest); CPPUNIT_TEST(testBuilder); CPPUNIT_TEST_SUITE_END(); public: void testBuilder(); }; CPPUNIT_TEST_SUITE_REGISTRATION(InterfaceTest); /* * Check that we find at least one candidate interface. */ void InterfaceTest::testBuilder() { InterfaceBuilder builder; Interface interface = builder.Construct(); OLA_ASSERT_EQ(string(""), interface.name); OLA_ASSERT_EQ(string("0.0.0.0"), interface.ip_address.ToString()); OLA_ASSERT_EQ(string("0.0.0.0"), interface.bcast_address.ToString()); OLA_ASSERT_EQ(string("0.0.0.0"), interface.subnet_mask.ToString()); OLA_ASSERT_EQ(string("00:00:00:00:00:00"), interface.hw_address.ToString()); // set & build an interface (mostly) from strings builder.SetName("eth0"); OLA_ASSERT_TRUE(builder.SetAddress("192.168.1.1")); OLA_ASSERT_TRUE(builder.SetBroadcast("192.168.1.255")); OLA_ASSERT_TRUE(builder.SetSubnetMask("255.255.255.0")); builder.SetHardwareAddress(MACAddress::FromStringOrDie("e4:ff:29:36:74:12")); interface = builder.Construct(); OLA_ASSERT_EQ(string("eth0"), interface.name); OLA_ASSERT_EQ(string("192.168.1.1"), interface.ip_address.ToString()); OLA_ASSERT_EQ(string("192.168.1.255"), interface.bcast_address.ToString()); OLA_ASSERT_EQ(string("255.255.255.0"), interface.subnet_mask.ToString()); OLA_ASSERT_EQ(string("e4:ff:29:36:74:12"), interface.hw_address.ToString()); // check the alternate form of mac address builder.SetHardwareAddress(MACAddress::FromStringOrDie("12.34.56.78.90.ab")); interface = builder.Construct(); OLA_ASSERT_EQ(string("12:34:56:78:90:ab"), interface.hw_address.ToString()); // reset the builder builder.Reset(); interface = builder.Construct(); OLA_ASSERT_EQ(string(""), interface.name); OLA_ASSERT_EQ(string("0.0.0.0"), interface.ip_address.ToString()); OLA_ASSERT_EQ(string("0.0.0.0"), interface.bcast_address.ToString()); OLA_ASSERT_EQ(string("0.0.0.0"), interface.subnet_mask.ToString()); OLA_ASSERT_EQ(string("00:00:00:00:00:00"), interface.hw_address.ToString()); // now check we can't use bad data OLA_ASSERT_FALSE(builder.SetAddress("192.168.1.")); OLA_ASSERT_FALSE(builder.SetBroadcast("192.168.1.255.255")); OLA_ASSERT_FALSE(builder.SetSubnetMask("foobarbaz")); MACAddress addr3, addr4; OLA_ASSERT_FALSE(MACAddress::FromString(string("e4:ff:29:36:74:12:ac"), &addr3)); builder.SetHardwareAddress(addr3); OLA_ASSERT_FALSE(MACAddress::FromString(string("e4:ff:29:36:74:hh"), &addr4)); builder.SetHardwareAddress(addr4); // none of this should have changed. interface = builder.Construct(); OLA_ASSERT_EQ(string(""), interface.name); OLA_ASSERT_EQ(string("0.0.0.0"), interface.ip_address.ToString()); OLA_ASSERT_EQ(string("0.0.0.0"), interface.bcast_address.ToString()); OLA_ASSERT_EQ(string("0.0.0.0"), interface.subnet_mask.ToString()); OLA_ASSERT_EQ(string("00:00:00:00:00:00"), interface.hw_address.ToString()); // now build from IPV4Address and MACAddress objects IPV4Address ip_address, netmask, broadcast_address; IPV4Address::FromString("10.0.0.1", &ip_address); IPV4Address::FromString("10.0.255.255", &netmask); IPV4Address::FromString("10.0.255.255", &broadcast_address); MACAddress mac_address; MACAddress::FromString("ba:98:76:54:32:10", &mac_address); builder.SetName("eth1"); builder.SetAddress(ip_address); builder.SetBroadcast(broadcast_address); builder.SetSubnetMask(netmask); builder.SetHardwareAddress(mac_address); interface = builder.Construct(); OLA_ASSERT_EQ(string("eth1"), interface.name); OLA_ASSERT_EQ(ip_address, interface.ip_address); OLA_ASSERT_EQ(broadcast_address, interface.bcast_address); OLA_ASSERT_EQ(netmask, interface.subnet_mask); OLA_ASSERT_EQ(mac_address, interface.hw_address); } ola-0.10.9/common/network/AdvancedTCPConnectorTest.cpp0000664000175000017500000003202614376533110017561 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * AdvancedTCPConnectorTest.cpp * Test fixture for the TCPConnector class * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include #include "ola/Callback.h" #include "ola/Clock.h" #include "ola/Logging.h" #include "ola/io/SelectServer.h" #include "ola/network/AdvancedTCPConnector.h" #include "ola/network/IPV4Address.h" #include "ola/network/NetworkUtils.h" #include "ola/network/SocketAddress.h" #include "ola/network/Socket.h" #include "ola/network/TCPSocketFactory.h" #include "ola/testing/TestUtils.h" using ola::ExponentialBackoffPolicy; using ola::LinearBackoffPolicy; using ola::TimeInterval; using ola::io::SelectServer; using ola::network::AdvancedTCPConnector; using ola::network::GenericSocketAddress; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::network::TCPAcceptingSocket; using ola::network::TCPSocket; using std::auto_ptr; using std::string; // used to set a timeout which aborts the tests static const int CONNECT_TIMEOUT_IN_MS = 500; static const int ABORT_TIMEOUT_IN_MS = 2000; class AdvancedTCPConnectorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(AdvancedTCPConnectorTest); CPPUNIT_TEST(testConnect); CPPUNIT_TEST(testPause); CPPUNIT_TEST(testBackoff); CPPUNIT_TEST(testEarlyDestruction); CPPUNIT_TEST_SUITE_END(); public: AdvancedTCPConnectorTest() : CppUnit::TestFixture(), m_localhost(IPV4Address::Loopback()), m_server_address(m_localhost, 0) { } void setUp(); void tearDown(); void testConnect(); void testPause(); void testBackoff(); void testEarlyDestruction(); // timing out indicates something went wrong void Timeout() { OLA_FAIL("timeout"); } // Socket close actions void TerminateOnClose() { m_ss->Terminate(); } private: ola::MockClock m_clock; SelectServer *m_ss; auto_ptr m_tcp_socket_factory; IPV4Address m_localhost; IPV4SocketAddress m_server_address; ola::thread::timeout_id m_timeout_id; TCPSocket *m_connected_socket; void ConfirmState(const ola::testing::SourceLine &source_line, const AdvancedTCPConnector &connector, const IPV4SocketAddress &endpoint, AdvancedTCPConnector::ConnectionState state, unsigned int failed_attempts); void SetupListeningSocket(TCPAcceptingSocket *socket); uint16_t ReservePort(); void AcceptedConnection(TCPSocket *socket); void OnConnect(TCPSocket *socket); }; CPPUNIT_TEST_SUITE_REGISTRATION(AdvancedTCPConnectorTest); /* * Setup the select server */ void AdvancedTCPConnectorTest::setUp() { m_tcp_socket_factory.reset(new ola::network::TCPSocketFactory( ola::NewCallback(this, &AdvancedTCPConnectorTest::OnConnect))); m_connected_socket = NULL; m_ss = new SelectServer(NULL, &m_clock); m_timeout_id = m_ss->RegisterSingleTimeout( ABORT_TIMEOUT_IN_MS, ola::NewSingleCallback(this, &AdvancedTCPConnectorTest::Timeout)); OLA_ASSERT_TRUE(m_timeout_id); #if _WIN32 WSADATA wsa_data; int result = WSAStartup(MAKEWORD(2, 0), &wsa_data); OLA_ASSERT_EQ(result, 0); #endif // _WIN32 } /* * Cleanup the select server */ void AdvancedTCPConnectorTest::tearDown() { delete m_ss; #ifdef _WIN32 WSACleanup(); #endif // _WIN32 } /* * Test that a TCP Connect works. */ void AdvancedTCPConnectorTest::testConnect() { ola::network::TCPSocketFactory socket_factory( ola::NewCallback(this, &AdvancedTCPConnectorTest::AcceptedConnection)); TCPAcceptingSocket listening_socket(&socket_factory); SetupListeningSocket(&listening_socket); AdvancedTCPConnector connector( m_ss, m_tcp_socket_factory.get(), TimeInterval(0, CONNECT_TIMEOUT_IN_MS * 1000)); // 5 per attempt, up to a max of 30 LinearBackoffPolicy policy(TimeInterval(5, 0), TimeInterval(30, 0)); connector.AddEndpoint(m_server_address, &policy); OLA_ASSERT_EQ(1u, connector.EndpointCount()); // The socket may be connected immediately depending on the platform. AdvancedTCPConnector::ConnectionState state; unsigned int failed_attempts; connector.GetEndpointState(m_server_address, &state, &failed_attempts); if (state == AdvancedTCPConnector::DISCONNECTED) { m_ss->Run(); } OLA_ASSERT_EQ(1u, connector.EndpointCount()); // confirm the status is correct ConfirmState(OLA_SOURCELINE(), connector, m_server_address, AdvancedTCPConnector::CONNECTED, 0); // check our socket exists OLA_ASSERT_TRUE(m_connected_socket); m_connected_socket->Close(); delete m_connected_socket; connector.Disconnect(m_server_address, true); // state should be updated ConfirmState(OLA_SOURCELINE(), connector, m_server_address, AdvancedTCPConnector::PAUSED, 0); // remove & shutdown connector.RemoveEndpoint(m_server_address); OLA_ASSERT_EQ(0u, connector.EndpointCount()); m_ss->RemoveReadDescriptor(&listening_socket); } /** * Test that pausing a connection works. */ void AdvancedTCPConnectorTest::testPause() { ola::network::TCPSocketFactory socket_factory( ola::NewCallback(this, &AdvancedTCPConnectorTest::AcceptedConnection)); TCPAcceptingSocket listening_socket(&socket_factory); SetupListeningSocket(&listening_socket); AdvancedTCPConnector connector( m_ss, m_tcp_socket_factory.get(), TimeInterval(0, CONNECT_TIMEOUT_IN_MS * 1000)); // 5 per attempt, up to a max of 30 LinearBackoffPolicy policy(TimeInterval(5, 0), TimeInterval(30, 0)); // add endpoint, but make sure it's paused connector.AddEndpoint(m_server_address, &policy, true); OLA_ASSERT_EQ(1u, connector.EndpointCount()); ConfirmState(OLA_SOURCELINE(), connector, m_server_address, AdvancedTCPConnector::PAUSED, 0); m_ss->RunOnce(TimeInterval(0, 500000)); // now unpause connector.Resume(m_server_address); // The socket may be connected immediately depending on the platform. AdvancedTCPConnector::ConnectionState state; unsigned int failed_attempts; connector.GetEndpointState(m_server_address, &state, &failed_attempts); if (state == AdvancedTCPConnector::DISCONNECTED) { m_ss->Run(); } OLA_ASSERT_EQ(1u, connector.EndpointCount()); ConfirmState(OLA_SOURCELINE(), connector, m_server_address, AdvancedTCPConnector::CONNECTED, 0); // check our socket exists OLA_ASSERT_TRUE(m_connected_socket); m_connected_socket->Close(); delete m_connected_socket; connector.Disconnect(m_server_address, true); // state should be updated ConfirmState(OLA_SOURCELINE(), connector, m_server_address, AdvancedTCPConnector::PAUSED, 0); // clean up connector.RemoveEndpoint(m_server_address); OLA_ASSERT_EQ(0u, connector.EndpointCount()); m_ss->RemoveReadDescriptor(&listening_socket); } /** * Test that backoff works. * This is quite brittle and should be fixed at some stage. */ void AdvancedTCPConnectorTest::testBackoff() { uint16_t port = ReservePort(); OLA_ASSERT_NE(0, port); IPV4SocketAddress target(m_localhost, port); // we advance the clock so remove the timeout closure m_ss->RemoveTimeout(m_timeout_id); m_timeout_id = ola::thread::INVALID_TIMEOUT; AdvancedTCPConnector connector( m_ss, m_tcp_socket_factory.get(), TimeInterval(0, CONNECT_TIMEOUT_IN_MS * 1000)); // 5s per attempt, up to a max of 30 LinearBackoffPolicy policy(TimeInterval(5, 0), TimeInterval(30, 0)); connector.AddEndpoint(target, &policy); OLA_ASSERT_EQ(1u, connector.EndpointCount()); // failed_attempts may be 0 or 1, depending on the platform. AdvancedTCPConnector::ConnectionState state; unsigned int failed_attempts; connector.GetEndpointState(target, &state, &failed_attempts); OLA_ASSERT_EQ(AdvancedTCPConnector::DISCONNECTED, state); OLA_ASSERT_TRUE(failed_attempts == 0 || failed_attempts == 1); // the timeout is 500ms, so we advance by 490 and set a 200ms timeout m_clock.AdvanceTime(0, 490000); m_ss->RunOnce(TimeInterval(0, 200000)); // should have one failure at this point ConfirmState(OLA_SOURCELINE(), connector, target, AdvancedTCPConnector::DISCONNECTED, 1); // the next attempt should be in 5 seconds m_clock.AdvanceTime(4, 900000); m_ss->RunOnce(TimeInterval(1, 0)); // wait for the timeout m_clock.AdvanceTime(0, 490000); m_ss->RunOnce(TimeInterval(0, 200000)); ConfirmState(OLA_SOURCELINE(), connector, target, AdvancedTCPConnector::DISCONNECTED, 2); // run once more to clean up m_ss->RunOnce(TimeInterval(0, 10000)); // clean up connector.RemoveEndpoint(target); OLA_ASSERT_EQ(0u, connector.EndpointCount()); } /* * Test that we don't leak memory when the AdvancedTCPConnector is destored * while a connecting is pending. */ void AdvancedTCPConnectorTest::testEarlyDestruction() { uint16_t port = ReservePort(); OLA_ASSERT_NE(0, port); IPV4SocketAddress target(m_localhost, port); // 5 per attempt, up to a max of 30 LinearBackoffPolicy policy(TimeInterval(5, 0), TimeInterval(30, 0)); { AdvancedTCPConnector connector( m_ss, m_tcp_socket_factory.get(), TimeInterval(0, CONNECT_TIMEOUT_IN_MS * 1000)); connector.AddEndpoint(target, &policy); OLA_ASSERT_EQ(1u, connector.EndpointCount()); } } /** * Confirm the state & failed attempts matches what we expected */ void AdvancedTCPConnectorTest::ConfirmState( const ola::testing::SourceLine &source_line, const AdvancedTCPConnector &connector, const IPV4SocketAddress &endpoint, AdvancedTCPConnector::ConnectionState expected_state, unsigned int expected_attempts) { AdvancedTCPConnector::ConnectionState state; unsigned int failed_attempts; ola::testing::_FailIf( source_line, !connector.GetEndpointState(endpoint, &state, &failed_attempts), "Incorrect endpoint state"); ola::testing::_AssertEquals(source_line, expected_state, state, "States differ"); ola::testing::_AssertEquals(source_line, expected_attempts, failed_attempts, "Attempts differ"); } /** * Setup a TCP socket that accepts connections */ void AdvancedTCPConnectorTest::SetupListeningSocket( TCPAcceptingSocket *listening_socket) { IPV4SocketAddress listen_address(m_localhost, 0); OLA_ASSERT_TRUE_MSG(listening_socket->Listen(listen_address), "Failed to listen"); // calling listen a second time should fail OLA_ASSERT_FALSE(listening_socket->Listen(listen_address)); GenericSocketAddress addr = listening_socket->GetLocalAddress(); OLA_ASSERT_TRUE(addr.IsValid()); m_server_address = addr.V4Addr(); OLA_INFO << "listening on " << m_server_address; OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(listening_socket)); } /** * For certain tests we need to ensure there isn't something listening on a TCP * port. The best way I've come up with doing this is to bind to port 0, then * close the socket. REUSE_ADDR means that the port shouldn't be allocated * again for a while. */ uint16_t AdvancedTCPConnectorTest::ReservePort() { TCPAcceptingSocket listening_socket(NULL); IPV4SocketAddress listen_address(m_localhost, 0); OLA_ASSERT_TRUE_MSG(listening_socket.Listen(listen_address), "Failed to listen"); GenericSocketAddress addr = listening_socket.GetLocalAddress(); OLA_ASSERT_TRUE(addr.IsValid()); return addr.V4Addr().Port(); } /* * Accept a new TCP connection. */ void AdvancedTCPConnectorTest::AcceptedConnection(TCPSocket *new_socket) { OLA_ASSERT_NOT_NULL(new_socket); GenericSocketAddress address = new_socket->GetPeerAddress(); OLA_ASSERT_TRUE(address.Family() == AF_INET); OLA_INFO << "Connection from " << address; // terminate the ss when this connection is closed new_socket->SetOnClose( ola::NewSingleCallback(this, &AdvancedTCPConnectorTest::TerminateOnClose)); m_ss->AddReadDescriptor(new_socket, true); } /* * Called when a connection completes or times out. */ void AdvancedTCPConnectorTest::OnConnect(TCPSocket *socket) { OLA_ASSERT_NOT_NULL(socket); GenericSocketAddress address = socket->GetPeerAddress(); OLA_ASSERT_TRUE(address.Family() == AF_INET); OLA_ASSERT_EQ(m_localhost, address.V4Addr().Host()); m_connected_socket = socket; m_ss->Terminate(); } ola-0.10.9/common/network/SocketTest.cpp0000664000175000017500000003544614376533110015073 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SocketTest.cpp * Test fixture for the Socket classes * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/io/Descriptor.h" #include "ola/io/IOQueue.h" #include "ola/io/SelectServer.h" #include "ola/network/IPV4Address.h" #include "ola/network/NetworkUtils.h" #include "ola/network/Socket.h" #include "ola/network/TCPSocketFactory.h" #include "ola/testing/TestUtils.h" using ola::io::ConnectedDescriptor; using ola::io::IOQueue; using ola::io::SelectServer; using ola::network::IPV4Address; using ola::network::GenericSocketAddress; using ola::network::IPV4SocketAddress; using ola::network::TCPAcceptingSocket; using ola::network::TCPSocket; using ola::network::UDPSocket; using std::string; static const unsigned char test_cstring[] = "Foo"; // used to set a timeout which aborts the tests static const int ABORT_TIMEOUT_IN_MS = 1000; class SocketTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(SocketTest); CPPUNIT_TEST(testTCPSocketClientClose); CPPUNIT_TEST(testTCPSocketServerClose); CPPUNIT_TEST(testUDPSocket); CPPUNIT_TEST(testIOQueueUDPSend); CPPUNIT_TEST_SUITE_END(); public: void setUp(); void tearDown(); void testTCPSocketClientClose(); void testTCPSocketServerClose(); void testUDPSocket(); void testIOQueueUDPSend(); // timing out indicates something went wrong void Timeout() { OLA_FAIL("timeout"); m_timeout_closure = NULL; } // Socket data actions void ReceiveAndClose(ConnectedDescriptor *socket); void ReceiveAndTerminate(ConnectedDescriptor *socket); void Receive(ConnectedDescriptor *socket); void ReceiveAndSend(ConnectedDescriptor *socket); void ReceiveSendAndClose(ConnectedDescriptor *socket); void NewConnectionSend(TCPSocket *socket); void NewConnectionSendAndClose(TCPSocket *socket); void UDPReceiveAndTerminate(UDPSocket *socket); void UDPReceiveAndSend(UDPSocket *socket); // Socket close actions void TerminateOnClose() { m_ss->Terminate(); } private: SelectServer *m_ss; ola::SingleUseCallback0 *m_timeout_closure; void SocketClientClose(ConnectedDescriptor *socket, ConnectedDescriptor *socket2); void SocketServerClose(ConnectedDescriptor *socket, ConnectedDescriptor *socket2); }; CPPUNIT_TEST_SUITE_REGISTRATION(SocketTest); /* * Setup the select server */ void SocketTest::setUp() { m_ss = new SelectServer(); m_timeout_closure = ola::NewSingleCallback(this, &SocketTest::Timeout); OLA_ASSERT_TRUE(m_ss->RegisterSingleTimeout(ABORT_TIMEOUT_IN_MS, m_timeout_closure)); #if _WIN32 WSADATA wsa_data; int result = WSAStartup(MAKEWORD(2, 0), &wsa_data); OLA_ASSERT_EQ(result, 0); #endif // _WIN32 } /* * Cleanup the select server */ void SocketTest::tearDown() { delete m_ss; #ifdef _WIN32 WSACleanup(); #endif // _WIN32 } /* * Test TCP sockets work correctly. * The client connects and the server sends some data. The client checks the * data matches and then closes the connection. */ void SocketTest::testTCPSocketClientClose() { IPV4SocketAddress socket_address(IPV4Address::Loopback(), 0); ola::network::TCPSocketFactory socket_factory( ola::NewCallback(this, &SocketTest::NewConnectionSend)); TCPAcceptingSocket socket(&socket_factory); OLA_ASSERT_TRUE_MSG(socket.Listen(socket_address), "Check for another instance of olad running"); OLA_ASSERT_FALSE(socket.Listen(socket_address)); GenericSocketAddress local_address = socket.GetLocalAddress(); OLA_ASSERT_EQ(static_cast(AF_INET), local_address.Family()); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&socket)); TCPSocket *client_socket = TCPSocket::Connect(local_address); OLA_ASSERT_NOT_NULL(client_socket); client_socket->SetOnData(ola::NewCallback( this, &SocketTest::ReceiveAndClose, static_cast(client_socket))); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(client_socket)); m_ss->Run(); m_ss->RemoveReadDescriptor(&socket); m_ss->RemoveReadDescriptor(client_socket); delete client_socket; } /* * Test TCP sockets work correctly. * The client connects and the server then sends some data and closes the * connection. */ void SocketTest::testTCPSocketServerClose() { IPV4SocketAddress socket_address(IPV4Address::Loopback(), 0); ola::network::TCPSocketFactory socket_factory( ola::NewCallback(this, &SocketTest::NewConnectionSendAndClose)); TCPAcceptingSocket socket(&socket_factory); OLA_ASSERT_TRUE_MSG(socket.Listen(socket_address), "Check for another instance of olad running"); OLA_ASSERT_FALSE(socket.Listen(socket_address)); GenericSocketAddress local_address = socket.GetLocalAddress(); OLA_ASSERT_EQ(static_cast(AF_INET), local_address.Family()); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&socket)); // The client socket checks the response and terminates on close TCPSocket *client_socket = TCPSocket::Connect(local_address); OLA_ASSERT_NOT_NULL(client_socket); client_socket->SetOnData(ola::NewCallback( this, &SocketTest::Receive, static_cast(client_socket))); client_socket->SetOnClose( ola::NewSingleCallback(this, &SocketTest::TerminateOnClose)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(client_socket)); m_ss->Run(); m_ss->RemoveReadDescriptor(&socket); m_ss->RemoveReadDescriptor(client_socket); delete client_socket; } /* * Test UDP sockets work correctly. * The client connects and the server sends some data. The client checks the * data matches and then closes the connection. */ void SocketTest::testUDPSocket() { IPV4SocketAddress socket_address(IPV4Address::Loopback(), 0); UDPSocket socket; OLA_ASSERT_TRUE(socket.Init()); OLA_ASSERT_FALSE(socket.Init()); OLA_ASSERT_TRUE(socket.Bind(socket_address)); OLA_ASSERT_FALSE(socket.Bind(socket_address)); IPV4SocketAddress local_address; OLA_ASSERT_TRUE(socket.GetSocketAddress(&local_address)); OLA_ASSERT_EQ(static_cast(AF_INET), local_address.Family()); socket.SetOnData( ola::NewCallback(this, &SocketTest::UDPReceiveAndSend, &socket)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&socket)); UDPSocket client_socket; OLA_ASSERT_TRUE(client_socket.Init()); OLA_ASSERT_FALSE(client_socket.Init()); client_socket.SetOnData( ola::NewCallback( this, &SocketTest::UDPReceiveAndTerminate, static_cast(&client_socket))); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&client_socket)); ssize_t bytes_sent = client_socket.SendTo( static_cast(test_cstring), sizeof(test_cstring), local_address); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), bytes_sent); m_ss->Run(); m_ss->RemoveReadDescriptor(&socket); m_ss->RemoveReadDescriptor(&client_socket); } /* * Test UDP sockets with an IOQueue work correctly. * The client connects and the server sends some data. The client checks the * data matches and then closes the connection. */ void SocketTest::testIOQueueUDPSend() { IPV4SocketAddress socket_address(IPV4Address::Loopback(), 9010); UDPSocket socket; OLA_ASSERT_TRUE(socket.Init()); OLA_ASSERT_FALSE(socket.Init()); OLA_ASSERT_TRUE(socket.Bind(socket_address)); OLA_ASSERT_FALSE(socket.Bind(socket_address)); socket.SetOnData( ola::NewCallback(this, &SocketTest::UDPReceiveAndSend, &socket)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&socket)); UDPSocket client_socket; OLA_ASSERT_TRUE(client_socket.Init()); OLA_ASSERT_FALSE(client_socket.Init()); client_socket.SetOnData( ola::NewCallback( this, &SocketTest::UDPReceiveAndTerminate, static_cast(&client_socket))); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&client_socket)); IOQueue output; output.Write(static_cast(test_cstring), sizeof(test_cstring)); ssize_t bytes_sent = client_socket.SendTo(&output, socket_address); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), bytes_sent); m_ss->Run(); m_ss->RemoveReadDescriptor(&socket); m_ss->RemoveReadDescriptor(&client_socket); } /* * Receive some data and close the socket */ void SocketTest::ReceiveAndClose(ConnectedDescriptor *socket) { Receive(socket); m_ss->RemoveReadDescriptor(socket); socket->Close(); } /* * Receive some data and terminate */ void SocketTest::ReceiveAndTerminate(ConnectedDescriptor *socket) { Receive(socket); m_ss->Terminate(); } /* * Receive some data and check it's what we expected. */ void SocketTest::Receive(ConnectedDescriptor *socket) { // try to read more than what we sent to test non-blocking uint8_t buffer[sizeof(test_cstring) + 10]; unsigned int data_read; OLA_ASSERT_FALSE(socket->Receive(buffer, sizeof(buffer), data_read)); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), data_read); OLA_ASSERT_EQ(0, memcmp(test_cstring, buffer, data_read)); } /* * Receive some data and send it back */ void SocketTest::ReceiveAndSend(ConnectedDescriptor *socket) { uint8_t buffer[sizeof(test_cstring) + 10]; unsigned int data_read; socket->Receive(buffer, sizeof(buffer), data_read); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), data_read); ssize_t bytes_sent = socket->Send(buffer, data_read); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), bytes_sent); } /* * Receive some data, send the same data and close */ void SocketTest::ReceiveSendAndClose(ConnectedDescriptor *socket) { ReceiveAndSend(socket); m_ss->RemoveReadDescriptor(socket); socket->Close(); } /* * Accept a new connection and send some test data */ void SocketTest::NewConnectionSend(TCPSocket *new_socket) { OLA_ASSERT_TRUE(new_socket); GenericSocketAddress address = new_socket->GetPeerAddress(); OLA_ASSERT_TRUE(address.Family() == AF_INET); OLA_INFO << "Connection from " << address; ssize_t bytes_sent = new_socket->Send( static_cast(test_cstring), sizeof(test_cstring)); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), bytes_sent); new_socket->SetOnClose(ola::NewSingleCallback(this, &SocketTest::TerminateOnClose)); m_ss->AddReadDescriptor(new_socket, true); } /* * Accept a new connect, send some data and close */ void SocketTest::NewConnectionSendAndClose(TCPSocket *new_socket) { OLA_ASSERT_NOT_NULL(new_socket); GenericSocketAddress address = new_socket->GetPeerAddress(); OLA_ASSERT_TRUE(address.Family() == AF_INET); OLA_INFO << "Connection from " << address; ssize_t bytes_sent = new_socket->Send( static_cast(test_cstring), sizeof(test_cstring)); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), bytes_sent); new_socket->Close(); delete new_socket; } /* * Receive some data and check it. */ void SocketTest::UDPReceiveAndTerminate(UDPSocket *socket) { IPV4Address expected_address; OLA_ASSERT_TRUE(IPV4Address::FromString("127.0.0.1", &expected_address)); IPV4SocketAddress source; uint8_t buffer[sizeof(test_cstring) + 10]; ssize_t data_read = sizeof(buffer); socket->RecvFrom(buffer, &data_read, &source); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), data_read); OLA_ASSERT_EQ(expected_address, source.Host()); m_ss->Terminate(); } /* * Receive some data and echo it back. */ void SocketTest::UDPReceiveAndSend(UDPSocket *socket) { IPV4Address expected_address; OLA_ASSERT_TRUE(IPV4Address::FromString("127.0.0.1", &expected_address)); IPV4SocketAddress source; uint8_t buffer[sizeof(test_cstring) + 10]; ssize_t data_read = sizeof(buffer); socket->RecvFrom(buffer, &data_read, &source); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), data_read); OLA_ASSERT_EQ(expected_address, source.Host()); ssize_t data_sent = socket->SendTo(buffer, data_read, source); OLA_ASSERT_EQ(data_read, data_sent); } /** * Generic method to test client initiated close */ void SocketTest::SocketClientClose(ConnectedDescriptor *socket, ConnectedDescriptor *socket2) { OLA_ASSERT_NOT_NULL(socket); socket->SetOnData( ola::NewCallback(this, &SocketTest::ReceiveAndClose, static_cast(socket))); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(socket)); OLA_ASSERT_NOT_NULL(socket2); socket2->SetOnData( ola::NewCallback(this, &SocketTest::ReceiveAndSend, static_cast(socket2))); socket2->SetOnClose(ola::NewSingleCallback(this, &SocketTest::TerminateOnClose)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(socket2)); ssize_t bytes_sent = socket->Send( static_cast(test_cstring), sizeof(test_cstring)); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), bytes_sent); m_ss->Run(); m_ss->RemoveReadDescriptor(socket); m_ss->RemoveReadDescriptor(socket2); delete socket2; } /** * Generic method to test server initiated close */ void SocketTest::SocketServerClose(ConnectedDescriptor *socket, ConnectedDescriptor *socket2) { OLA_ASSERT_NOT_NULL(socket); socket->SetOnData(ola::NewCallback( this, &SocketTest::Receive, static_cast(socket))); socket->SetOnClose( ola::NewSingleCallback(this, &SocketTest::TerminateOnClose)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(socket)); OLA_ASSERT_TRUE(socket2); socket2->SetOnData(ola::NewCallback( this, &SocketTest::ReceiveSendAndClose, static_cast(socket2))); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(socket2)); ssize_t bytes_sent = socket->Send( static_cast(test_cstring), sizeof(test_cstring)); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), bytes_sent); m_ss->Run(); m_ss->RemoveReadDescriptor(socket); m_ss->RemoveReadDescriptor(socket2); delete socket2; } ola-0.10.9/common/network/WindowsInterfacePicker.cpp0000664000175000017500000000761414376533110017410 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * WindowsInterfacePicker.cpp * Chooses an interface to listen on * Copyright (C) 2005 Simon Newton */ typedef int socklen_t; #include #include #include #include #include #include "ola/network/IPV4Address.h" #include "common/network/WindowsInterfacePicker.h" #include "ola/Logging.h" namespace ola { namespace network { using std::vector; /* * Return a vector of interfaces on the system. */ vector WindowsInterfacePicker::GetInterfaces( bool include_loopback) const { vector interfaces; PIP_ADAPTER_INFO pAdapter = NULL; PIP_ADAPTER_INFO pAdapterInfo; IP_ADDR_STRING *ipAddress; ULONG ulOutBufLen = sizeof(IP_ADAPTER_INFO); uint32_t net, mask; if (include_loopback) { OLA_WARN << "Loopback interface inclusion requested. Loopback might not " << "exist on Windows"; } while (1) { pAdapterInfo = reinterpret_cast(new uint8_t[ulOutBufLen]); if (!pAdapterInfo) { OLA_WARN << "Error allocating memory needed for GetAdaptersInfo"; return interfaces; } // if ulOutBufLen isn't long enough it will be set to the size of the // buffer required DWORD status = GetAdaptersInfo(pAdapterInfo, &ulOutBufLen); if (status == NO_ERROR) { break; } delete[] pAdapterInfo; if (status != ERROR_BUFFER_OVERFLOW) { OLA_WARN << "GetAdaptersInfo failed with error: " << static_cast(status); return interfaces; } } for (pAdapter = pAdapterInfo; pAdapter && pAdapter < pAdapterInfo + ulOutBufLen; pAdapter = pAdapter->Next) { // Since Vista, wireless interfaces return a different type // See https://msdn.microsoft.com/en-us/library/windows/desktop/aa366062(v=vs.85).aspx if ((pAdapter->Type != MIB_IF_TYPE_ETHERNET) && (pAdapter->Type != IF_TYPE_IEEE80211)) { OLA_INFO << "Skipping " << pAdapter->AdapterName << " (" << pAdapter->Description << ")" << " as it's not MIB_IF_TYPE_ETHERNET" << " or IF_TYPE_IEEE80211, got " << pAdapter->Type << " instead"; continue; } for (ipAddress = &pAdapter->IpAddressList; ipAddress; ipAddress = ipAddress->Next) { net = inet_addr(ipAddress->IpAddress.String); // Windows doesn't seem to have the notion of an interface being 'up' // so we check if this interface has an address assigned. if (net) { Interface iface; iface.name = pAdapter->AdapterName; // IFNAME_SIZE iface.index = pAdapter->Index; uint8_t macaddr[MACAddress::LENGTH]; memcpy(macaddr, pAdapter->Address, MACAddress::LENGTH); iface.hw_address = MACAddress(macaddr); iface.ip_address = IPV4Address(net); mask = inet_addr(ipAddress->IpMask.String); iface.subnet_mask = IPV4Address(mask); iface.bcast_address = IPV4Address((iface.ip_address.AsInt() & mask) | (0xFFFFFFFF ^ mask)); interfaces.push_back(iface); } } } delete[] pAdapterInfo; return interfaces; } } // namespace network } // namespace ola ola-0.10.9/common/network/TCPConnectorTest.cpp0000664000175000017500000002360514376533110016136 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TCPConnectorTest.cpp * Test fixture for the TCPConnector class * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include "ola/Callback.h" #include "ola/Clock.h" #include "ola/Logging.h" #include "ola/io/SelectServer.h" #include "ola/network/IPV4Address.h" #include "ola/network/NetworkUtils.h" #include "ola/network/SocketAddress.h" #include "ola/network/Socket.h" #include "ola/network/TCPConnector.h" #include "ola/network/TCPSocketFactory.h" #include "ola/testing/TestUtils.h" using ola::TimeInterval; using ola::io::ConnectedDescriptor; using ola::network::GenericSocketAddress; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::io::SelectServer; using ola::network::TCPConnector; using ola::network::TCPAcceptingSocket; using ola::network::TCPSocket; using std::auto_ptr; using std::string; // used to set a timeout which aborts the tests static const int CONNECT_TIMEOUT_IN_MS = 500; static const int ABORT_TIMEOUT_IN_MS = 1000; class TCPConnectorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(TCPConnectorTest); CPPUNIT_TEST(testNonBlockingConnect); CPPUNIT_TEST(testNonBlockingConnectFailure); CPPUNIT_TEST(testNonBlockingConnectError); CPPUNIT_TEST(testNonBlockingCancel); CPPUNIT_TEST(testEarlyDestruction); CPPUNIT_TEST_SUITE_END(); public: TCPConnectorTest() : CppUnit::TestFixture(), m_localhost(IPV4Address::Loopback()) { } void setUp(); void tearDown(); void testNonBlockingConnect(); void testNonBlockingConnectFailure(); void testNonBlockingConnectError(); void testNonBlockingCancel(); void testEarlyDestruction(); // timing out indicates something went wrong void Timeout() { m_timeout_closure = NULL; OLA_FAIL("timeout"); } // Socket close actions void TerminateOnClose() { m_ss->Terminate(); } private: SelectServer *m_ss; IPV4Address m_localhost; ola::SingleUseCallback0 *m_timeout_closure; unsigned int m_successful_calls; unsigned int m_failure_calls; void AcceptedConnection(TCPSocket *socket); void OnConnect(int fd, int error); void OnConnectFailure(int fd, int error); uint16_t ReservePort(); }; CPPUNIT_TEST_SUITE_REGISTRATION(TCPConnectorTest); /* * Setup the select server */ void TCPConnectorTest::setUp() { m_ss = new SelectServer(); m_timeout_closure = ola::NewSingleCallback(this, &TCPConnectorTest::Timeout); m_successful_calls = 0; m_failure_calls = 0; OLA_ASSERT_TRUE(m_ss->RegisterSingleTimeout(ABORT_TIMEOUT_IN_MS, m_timeout_closure)); #if _WIN32 WSADATA wsa_data; int result = WSAStartup(MAKEWORD(2, 0), &wsa_data); OLA_ASSERT_EQ(result, 0); #endif // _WIN32 } /* * Cleanup the select server */ void TCPConnectorTest::tearDown() { delete m_ss; #ifdef _WIN32 WSACleanup(); #endif // _WIN32 } /* * Test non-blocking TCP connects work correctly. */ void TCPConnectorTest::testNonBlockingConnect() { ola::network::TCPSocketFactory socket_factory( ola::NewCallback(this, &TCPConnectorTest::AcceptedConnection)); TCPAcceptingSocket listening_socket(&socket_factory); IPV4SocketAddress listen_address(m_localhost, 0); OLA_ASSERT_TRUE_MSG(listening_socket.Listen(listen_address), "Failed to listen"); GenericSocketAddress addr = listening_socket.GetLocalAddress(); OLA_ASSERT_TRUE(addr.IsValid()); // calling listen a second time should fail OLA_ASSERT_FALSE(listening_socket.Listen(listen_address)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&listening_socket)); // Attempt a non-blocking connect TCPConnector connector(m_ss); TimeInterval connect_timeout(0, CONNECT_TIMEOUT_IN_MS * 1000); TCPConnector::TCPConnectionID id = connector.Connect( addr.V4Addr(), connect_timeout, ola::NewSingleCallback(this, &TCPConnectorTest::OnConnect)); if (id) { OLA_ASSERT_EQ(1u, connector.ConnectionsPending()); m_ss->Run(); OLA_ASSERT_EQ(0u, connector.ConnectionsPending()); } OLA_ASSERT_EQ(1u, m_successful_calls); OLA_ASSERT_EQ(0u, m_failure_calls); m_ss->RemoveReadDescriptor(&listening_socket); } /* * Test a non-blocking TCP connect fails. */ void TCPConnectorTest::testNonBlockingConnectFailure() { uint16_t port = ReservePort(); OLA_ASSERT_NE(0, port); IPV4SocketAddress target(m_localhost, port); // attempt a non-blocking connect, hopefully nothing is running on port 9010 TCPConnector connector(m_ss); TimeInterval connect_timeout(0, CONNECT_TIMEOUT_IN_MS * 1000); TCPConnector::TCPConnectionID id = connector.Connect( target, connect_timeout, ola::NewSingleCallback(this, &TCPConnectorTest::OnConnectFailure)); // On platforms where connect() doesn't return EINPROGRESS, it's hard to // actually test this without knowing a non-local address. if (id) { m_ss->Run(); OLA_ASSERT_EQ(0u, connector.ConnectionsPending()); } OLA_ASSERT_EQ(0u, m_successful_calls); OLA_ASSERT_EQ(1u, m_failure_calls); } /* * Test a non-blocking TCP connect for an invalid port. */ void TCPConnectorTest::testNonBlockingConnectError() { IPV4Address bcast_address; OLA_ASSERT_TRUE(IPV4Address::FromString("255.255.255.255", &bcast_address)); TCPConnector connector(m_ss); TimeInterval connect_timeout(0, CONNECT_TIMEOUT_IN_MS * 1000); TCPConnector::TCPConnectionID id = connector.Connect( IPV4SocketAddress(bcast_address, 0), connect_timeout, ola::NewSingleCallback(this, &TCPConnectorTest::OnConnectFailure)); OLA_ASSERT_FALSE(id); OLA_ASSERT_EQ(0u, connector.ConnectionsPending()); OLA_ASSERT_EQ(0u, m_successful_calls); OLA_ASSERT_EQ(1u, m_failure_calls); } /* * Test that cancelling a connect works. */ void TCPConnectorTest::testNonBlockingCancel() { uint16_t port = ReservePort(); OLA_ASSERT_NE(0, port); IPV4SocketAddress target(m_localhost, port); TCPConnector connector(m_ss); TimeInterval connect_timeout(0, CONNECT_TIMEOUT_IN_MS * 1000); TCPConnector::TCPConnectionID id = connector.Connect( target, connect_timeout, ola::NewSingleCallback(this, &TCPConnectorTest::OnConnectFailure)); // On platforms where connect() doesn't return EINPROGRESS, it's hard to // actually test this without knowing a non-local address. if (id) { OLA_ASSERT_EQ(1u, connector.ConnectionsPending()); OLA_ASSERT_TRUE(connector.Cancel(id)); OLA_ASSERT_EQ(0u, connector.ConnectionsPending()); } OLA_ASSERT_EQ(0u, m_successful_calls); OLA_ASSERT_EQ(1u, m_failure_calls); } /* * Test that we can destroy the Connector and everything will work. */ void TCPConnectorTest::testEarlyDestruction() { uint16_t port = ReservePort(); OLA_ASSERT_NE(0, port); IPV4SocketAddress target(m_localhost, port); // attempt a non-blocking connect. TimeInterval connect_timeout(0, CONNECT_TIMEOUT_IN_MS * 1000); { TCPConnector connector(m_ss); TCPConnector::TCPConnectionID id = connector.Connect( target, connect_timeout, ola::NewSingleCallback(this, &TCPConnectorTest::OnConnectFailure)); if (id != 0) { // The callback hasn't run yet. OLA_ASSERT_EQ(1u, connector.ConnectionsPending()); m_ss->RunOnce(TimeInterval(1, 0)); } OLA_ASSERT_EQ(0u, m_successful_calls); OLA_ASSERT_EQ(1u, m_failure_calls); } } /* * Accept a new TCP connection. */ void TCPConnectorTest::AcceptedConnection(TCPSocket *new_socket) { OLA_ASSERT_NOT_NULL(new_socket); GenericSocketAddress address = new_socket->GetPeerAddress(); OLA_ASSERT_TRUE(address.Family() == AF_INET); OLA_INFO << "Connection from " << address; // terminate the ss when this connection is closed new_socket->SetOnClose( ola::NewSingleCallback(this, &TCPConnectorTest::TerminateOnClose)); m_ss->AddReadDescriptor(new_socket, true); } /** * Called when a connection completes or times out. */ void TCPConnectorTest::OnConnect(int fd, int error) { if (error) { std::ostringstream str; str << "Failed to connect: " << strerror(error); OLA_ASSERT_EQ_MSG(0, error, str.str()); m_ss->Terminate(); } else { OLA_ASSERT_TRUE(fd >= 0); #ifdef _WIN32 closesocket(fd); #else close(fd); #endif // _WIN32 } m_successful_calls++; } /** * Called when a connection completes or times out. */ void TCPConnectorTest::OnConnectFailure(int fd, int error) { // The error could be one of many things, right now we just check it's non-0 OLA_ASSERT_NE(0, error); OLA_ASSERT_EQ(-1, fd); m_ss->Terminate(); m_failure_calls++; } /** * For certain tests we need to ensure there isn't something listening on a TCP * port. The best way I've come up with doing this is to bind to port 0, then * close the socket. REUSE_ADDR means that the port shouldn't be allocated * again for a while. */ uint16_t TCPConnectorTest::ReservePort() { TCPAcceptingSocket listening_socket(NULL); IPV4SocketAddress listen_address(m_localhost, 0); OLA_ASSERT_TRUE_MSG(listening_socket.Listen(listen_address), "Failed to listen"); GenericSocketAddress addr = listening_socket.GetLocalAddress(); OLA_ASSERT_TRUE(addr.IsValid()); return addr.V4Addr().Port(); } ola-0.10.9/common/strings/0000775000175000017500000000000014376533271012353 500000000000000ola-0.10.9/common/strings/UtilsTest.cpp0000664000175000017500000000434614376533110014736 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * UtilsTest.cpp * Unittest for strings Util functions. * Copyright (C) 2014 Simon Newton */ #include #include #include "ola/base/Array.h" #include "ola/strings/Utils.h" #include "ola/testing/TestUtils.h" using ola::strings::CopyToFixedLengthBuffer; using std::string; class UtilsTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(UtilsTest); CPPUNIT_TEST(testCopyToFixedLengthBuffer); CPPUNIT_TEST_SUITE_END(); public: void testCopyToFixedLengthBuffer(); }; CPPUNIT_TEST_SUITE_REGISTRATION(UtilsTest); /* * Test the CopyToFixedLengthBuffer function */ void UtilsTest::testCopyToFixedLengthBuffer() { char buffer[6]; const string short_input("foo"); const string input("foobar"); const string oversized_input("foobarbaz"); const char short_output[] = {'f', 'o', 'o', 0, 0, 0}; CopyToFixedLengthBuffer(short_input, buffer, arraysize(buffer)); OLA_ASSERT_DATA_EQUALS(short_output, arraysize(short_output), buffer, arraysize(buffer)); const char output[] = {'f', 'o', 'o', 'b', 'a', 'r'}; CopyToFixedLengthBuffer(input, buffer, arraysize(buffer)); OLA_ASSERT_DATA_EQUALS(output, arraysize(output), buffer, arraysize(buffer)); const char oversized_output[] = {'f', 'o', 'o', 'b', 'a', 'r'}; CopyToFixedLengthBuffer(oversized_input, buffer, arraysize(buffer)); OLA_ASSERT_DATA_EQUALS(oversized_output, arraysize(oversized_output), buffer, arraysize(buffer)); } ola-0.10.9/common/strings/Utils.cpp0000664000175000017500000000236614376533110014076 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Utils.cpp * Miscellaneous string functions. * Copyright (C) 2014 Simon Newton */ #include "ola/strings/Utils.h" #include #include namespace ola { namespace strings { using std::string; void CopyToFixedLengthBuffer(const std::string &input, char *buffer, unsigned int size) { // buffer may not be NULL terminated. // coverity[BUFFER_SIZE_WARNING] strncpy(buffer, input.c_str(), size); } } // namespace strings } // namespace ola ola-0.10.9/common/strings/Format.cpp0000664000175000017500000000410614376533110014220 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Format.cpp * Formatting functions for basic types. * Copyright (C) 2005 Simon Newton */ #include "ola/strings/Format.h" #include #include #include namespace ola { namespace strings { using std::endl; using std::ostringstream; using std::string; string IntToString(int i) { ostringstream str; str << i; return str.str(); } string IntToString(unsigned int i) { ostringstream str; str << i; return str.str(); } void FormatData(std::ostream *out, const uint8_t *data, unsigned int length, unsigned int indent, unsigned int byte_per_line) { ostringstream raw, ascii; raw << std::hex; for (unsigned int i = 0; i != length; i++) { raw << std::setfill('0') << std::setw(2) << static_cast(data[i]) << " "; if (isprint(data[i])) { ascii << data[i]; } else { ascii << "."; } if (i % byte_per_line == byte_per_line - 1) { *out << string(indent, ' ') << raw.str() << " " << ascii.str() << endl; raw.str(""); ascii.str(""); } } if (length % byte_per_line != 0) { // pad if needed raw << string(3 * (byte_per_line - (length % byte_per_line)), ' '); *out << string(indent, ' ') << raw.str() << " " << ascii.str() << endl; } } } // namespace strings } // namespace ola ola-0.10.9/common/strings/Makefile.mk0000664000175000017500000000070714376533110014335 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += \ common/strings/Format.cpp \ common/strings/Utils.cpp # TESTS ################################################ test_programs += common/strings/UtilsTester common_strings_UtilsTester_SOURCES = \ common/strings/UtilsTest.cpp common_strings_UtilsTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_strings_UtilsTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/timecode/0000775000175000017500000000000014376533271012453 500000000000000ola-0.10.9/common/timecode/TimeCode.cpp0000664000175000017500000000537414376533110014571 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TimeCode.cpp * The TimeCode class * Copyright (C) 2011 Simon Newton */ #include #include #include #include "ola/Logging.h" #include "ola/timecode/TimeCode.h" #include "ola/timecode/TimeCodeEnums.h" namespace ola { namespace timecode { using std::setw; using std::setfill; using std::string; TimeCode::TimeCode(const TimeCode &other) : m_type(other.m_type), m_hours(other.m_hours), m_minutes(other.m_minutes), m_seconds(other.m_seconds), m_frames(other.m_frames) { } TimeCode& TimeCode::operator=(const TimeCode &other) { m_type = other.m_type; m_hours = other.m_hours; m_minutes = other.m_minutes; m_seconds = other.m_seconds; m_frames = other.m_frames; return *this; } /** * Returns true if this timecode value is consistent, given the time */ bool TimeCode::IsValid() const { if (m_hours > MAX_HOURS || m_minutes > MAX_MINUTES || m_seconds > MAX_SECONDS) return false; switch (m_type) { case TIMECODE_FILM: return m_frames < 24; case TIMECODE_EBU: return m_frames < 25; case TIMECODE_DF: return m_frames < 30; case TIMECODE_SMPTE: return m_frames < 30; } return false; } string TimeCode::AsString() const { std::ostringstream str; str << setw(2) << setfill('0') << static_cast(m_hours) << ":" << setw(2) << setfill('0') << static_cast(m_minutes) << ":" << setw(2) << setfill('0') << static_cast(m_seconds) << ":" << setw(2) << setfill('0') << static_cast(m_frames); return str.str(); } std::ostream& operator<<(std::ostream &out, const TimeCode &t) { return out << t.AsString(); } bool TimeCode::operator==(const TimeCode &other) const { return (m_type == other.m_type && m_hours == other.m_hours && m_minutes == other.m_minutes && m_seconds == other.m_seconds && m_frames == other.m_frames); } bool TimeCode::operator!=(const TimeCode &other) const { return !(*this == other); } } // namespace timecode } // namespace ola ola-0.10.9/common/timecode/TimeCodeTest.cpp0000664000175000017500000000534614376533110015430 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TimeCodeTest.cpp * Test fixture for the TimeCode classes * Copyright (C) 2011 Simon Newton */ #include #include #include "ola/timecode/TimeCode.h" #include "ola/timecode/TimeCodeEnums.h" #include "ola/testing/TestUtils.h" using ola::timecode::TimeCode; using std::ostringstream; using std::string; using ola::timecode::TIMECODE_FILM; using ola::timecode::TIMECODE_EBU; using ola::timecode::TIMECODE_DF; using ola::timecode::TIMECODE_SMPTE; class TimeCodeTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(TimeCodeTest); CPPUNIT_TEST(testTimeCode); CPPUNIT_TEST(testIsValid); CPPUNIT_TEST_SUITE_END(); public: void testTimeCode(); void testIsValid(); }; CPPUNIT_TEST_SUITE_REGISTRATION(TimeCodeTest); /* * Test the TimeCodes work. */ void TimeCodeTest::testTimeCode() { ostringstream str1; TimeCode t1(TIMECODE_FILM, 0, 0, 0, 0); OLA_ASSERT_EQ(TIMECODE_FILM, t1.Type()); OLA_ASSERT_EQ(static_cast(0), t1.Hours()); OLA_ASSERT_EQ(static_cast(0), t1.Minutes()); OLA_ASSERT_EQ(static_cast(0), t1.Seconds()); OLA_ASSERT_EQ(static_cast(0), t1.Frames()); OLA_ASSERT_EQ(string("00:00:00:00"), t1.AsString()); str1 << t1; OLA_ASSERT_EQ(string("00:00:00:00"), str1.str()); OLA_ASSERT_TRUE(t1.IsValid()); ostringstream str3; TimeCode t2(t1); OLA_ASSERT_EQ(t1, t2); TimeCode t3(TIMECODE_SMPTE, 10, 9, 12, 14); OLA_ASSERT_EQ(string("10:09:12:14"), t3.AsString()); str3 << t3; OLA_ASSERT_EQ(string("10:09:12:14"), str3.str()); OLA_ASSERT_TRUE(t3.IsValid()); OLA_ASSERT_NE(t1, t3); t3 = t1; OLA_ASSERT_EQ(t1, t3); } /** * test invalid codes */ void TimeCodeTest::testIsValid() { TimeCode t1(TIMECODE_FILM, 0, 0, 0, 24); OLA_ASSERT_FALSE(t1.IsValid()); TimeCode t2(TIMECODE_EBU, 0, 0, 0, 25); OLA_ASSERT_FALSE(t2.IsValid()); TimeCode t3(TIMECODE_DF, 0, 0, 0, 30); OLA_ASSERT_FALSE(t3.IsValid()); TimeCode t4(TIMECODE_SMPTE, 0, 0, 0, 30); OLA_ASSERT_FALSE(t4.IsValid()); } ola-0.10.9/common/timecode/Makefile.mk0000664000175000017500000000067414376533110014440 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += \ common/timecode/TimeCode.cpp # TESTS ################################################## test_programs += common/timecode/TimeCodeTester common_timecode_TimeCodeTester_SOURCES = common/timecode/TimeCodeTest.cpp common_timecode_TimeCodeTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_timecode_TimeCodeTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/dmx/0000775000175000017500000000000014376533271011452 500000000000000ola-0.10.9/common/dmx/RunLengthEncoderTest.cpp0000664000175000017500000001245714376533110016145 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RunLengthEncoderTest.cpp * Test fixture for the RunLengthEncoder class * Copyright (C) 2005 Simon Newton */ #include #include #include #include "ola/Constants.h" #include "ola/DmxBuffer.h" #include "ola/dmx/RunLengthEncoder.h" #include "ola/testing/TestUtils.h" using ola::dmx::RunLengthEncoder; using ola::DmxBuffer; class RunLengthEncoderTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RunLengthEncoderTest); CPPUNIT_TEST(testEncode); CPPUNIT_TEST(testEncode2); CPPUNIT_TEST_SUITE_END(); public: void testEncode(); void testEncode2(); void testEncodeDecode(); void setUp(); void tearDown(); private: RunLengthEncoder m_encoder; uint8_t *m_dst; void checkEncode(const DmxBuffer &buffer, unsigned int dst_size, bool is_incomplete, const uint8_t *expected_data, unsigned int expected_length); void checkEncodeDecode(const uint8_t *data, unsigned int data_size); }; CPPUNIT_TEST_SUITE_REGISTRATION(RunLengthEncoderTest); /* * allocate a scratch pad */ void RunLengthEncoderTest::setUp() { m_dst = new uint8_t[ola::DMX_UNIVERSE_SIZE]; } /* * clean up */ void RunLengthEncoderTest::tearDown() { delete[] m_dst; } /* * Check that for a given buffer and dst buffer size, we get the expected data */ void RunLengthEncoderTest::checkEncode(const DmxBuffer &buffer, unsigned int dst_size, bool is_complete, const uint8_t *expected_data, unsigned int expected_length) { memset(m_dst, 0, ola::DMX_UNIVERSE_SIZE); OLA_ASSERT_EQ(is_complete, m_encoder.Encode(buffer, m_dst, &dst_size)); OLA_ASSERT_EQ(expected_length, dst_size); OLA_ASSERT_EQ(0, memcmp(expected_data, m_dst, dst_size)); } /* * Check that encoding works. */ void RunLengthEncoderTest::testEncode() { const uint8_t TEST_DATA[] = {1, 2, 2, 3, 0, 0, 0, 1, 3, 3, 3, 1, 2}; const uint8_t EXPECTED_DATA[] = {4, 1, 2, 2, 3, 0x83, 0, 1, 1, 0x83, 3, 2, 1, 2}; const uint8_t EXPECTED_DATA2[] = {3, 1, 2, 2}; const uint8_t EXPECTED_DATA3[] = {4, 1, 2, 2, 3, 0x83, 0, 1, 1, 0x83, 3, 1, 1}; DmxBuffer buffer(TEST_DATA, sizeof(TEST_DATA)); checkEncode(buffer, ola::DMX_UNIVERSE_SIZE, true, EXPECTED_DATA, sizeof(EXPECTED_DATA)); checkEncode(buffer, 4, false, EXPECTED_DATA2, sizeof(EXPECTED_DATA2)); checkEncode(buffer, 5, false, EXPECTED_DATA, 5); checkEncode(buffer, 6, false, EXPECTED_DATA, 5); checkEncode(buffer, 7, false, EXPECTED_DATA, 7); checkEncode(buffer, 8, false, EXPECTED_DATA, 7); checkEncode(buffer, 9, false, EXPECTED_DATA, 9); checkEncode(buffer, 10, false, EXPECTED_DATA, 9); checkEncode(buffer, 11, false, EXPECTED_DATA, 11); checkEncode(buffer, 12, false, EXPECTED_DATA, 11); checkEncode(buffer, 13, false, EXPECTED_DATA3, sizeof(EXPECTED_DATA3)); } /* * Check that encoding works. */ void RunLengthEncoderTest::testEncode2() { const uint8_t TEST_DATA[] = {0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; const uint8_t EXPECTED_DATA[] = {0x8A, 0}; DmxBuffer buffer(TEST_DATA, sizeof(TEST_DATA)); checkEncode(buffer, ola::DMX_UNIVERSE_SIZE, true, EXPECTED_DATA, sizeof(EXPECTED_DATA)); checkEncode(buffer, 2, true, EXPECTED_DATA, sizeof(EXPECTED_DATA)); checkEncode(buffer, 1, false, EXPECTED_DATA, 0); checkEncode(buffer, 0, false, EXPECTED_DATA, 0); } /* * Call Encode then Decode and check the results */ void RunLengthEncoderTest::checkEncodeDecode(const uint8_t *data, unsigned int data_size) { DmxBuffer src(data, data_size); DmxBuffer dst; unsigned int dst_size = ola::DMX_UNIVERSE_SIZE; memset(m_dst, 0, dst_size); OLA_ASSERT_TRUE(m_encoder.Encode(src, m_dst, &dst_size)); OLA_ASSERT_TRUE(m_encoder.Decode(0, m_dst, dst_size, &dst)); OLA_ASSERT_TRUE(src == dst); OLA_ASSERT_EQ(dst.Size(), data_size); OLA_ASSERT_NE(0, memcmp(data, dst.GetRaw(), dst.Size())); } /* * Check that an Encode/Decode pair works */ void RunLengthEncoderTest::testEncodeDecode() { const uint8_t TEST_DATA[] = {1, 2, 2, 3, 0, 0, 0, 1, 3, 3, 3, 1, 2}; const uint8_t TEST_DATA2[] = {0, 0, 0, 0, 6, 5, 4, 3, 3, 3}; const uint8_t TEST_DATA3[] = {0, 0, 0}; checkEncodeDecode(TEST_DATA, sizeof(TEST_DATA)); checkEncodeDecode(TEST_DATA2, sizeof(TEST_DATA2)); checkEncodeDecode(TEST_DATA3, sizeof(TEST_DATA3)); } ola-0.10.9/common/dmx/RunLengthEncoder.cpp0000664000175000017500000000724314376533110015302 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RunLengthEncoder.cpp * The Run Length Encoder * Copyright (C) 2005 Simon Newton */ #include #include namespace ola { namespace dmx { bool RunLengthEncoder::Encode(const DmxBuffer &src, uint8_t *data, unsigned int *data_size) { unsigned int src_size = src.Size(); unsigned int dst_size = *data_size; unsigned int &dst_index = *data_size; dst_index = 0; unsigned int i; for (i = 0; i < src_size && dst_index < dst_size;) { // j points to the first non-repeating value unsigned int j = i + 1; while (j < src_size && src.Get(i) == src.Get(j) && j - i < 0x7f) { j++; } // if the number of repeats is more than 2 // don't encode only two repeats, if (j - i > 2) { // if room left in dst buffer if (dst_size - dst_index > 1) { data[dst_index++] = (REPEAT_FLAG | (j - i)); data[dst_index++] = src.Get(i); } else { // else return what we have done so far return false; } i = j; } else { // this value doesn't repeat more than twice // find out where the next repeat starts // postcondition: j is one more than the last value we want to send for (j = i + 1; j < src_size - 2 && j - i < 0x7f; j++) { // at the end of the array if (j == src_size - 2) { j = src_size; break; } // if we're found a repeat of 3 or more stop here if (src.Get(j) == src.Get(j+1) && src.Get(j) == src.Get(j+2)) break; } if (j >= src_size - 2) j = src_size; // if we have enough room left for all the values if (dst_index + j - i < dst_size) { data[dst_index++] = j - i; memcpy(&data[dst_index], src.GetRaw() + i, j-i); dst_index += j - i; i = j; // see how much data we can get in } else if (dst_size - dst_index > 1) { unsigned int l = dst_size - dst_index -1; data[dst_index++] = l; memcpy(&data[dst_index], src.GetRaw() + i, l); dst_index += l; return false; } else { return false; } } } if (i < src_size) return false; else return true; } bool RunLengthEncoder::Decode(unsigned int start_channel, const uint8_t *src_data, unsigned int length, DmxBuffer *dst) { int destination_index = start_channel; for (unsigned int i = 0; i < length;) { unsigned int segment_length = src_data[i] & (~REPEAT_FLAG); if (src_data[i] & REPEAT_FLAG) { i++; dst->SetRangeToValue(destination_index, src_data[i++], segment_length); } else { i++; dst->SetRange(destination_index, src_data + i, segment_length); i += segment_length; } destination_index += segment_length; } return true; } } // namespace dmx } // namespace ola ola-0.10.9/common/dmx/Makefile.mk0000664000175000017500000000070714376533110013434 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += common/dmx/RunLengthEncoder.cpp # TESTS ################################################## test_programs += common/dmx/RunLengthEncoderTester common_dmx_RunLengthEncoderTester_SOURCES = common/dmx/RunLengthEncoderTest.cpp common_dmx_RunLengthEncoderTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_dmx_RunLengthEncoderTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/export_map/0000775000175000017500000000000014376533271013040 500000000000000ola-0.10.9/common/export_map/ExportMap.cpp0000664000175000017500000000775514376533110015411 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ExportMap.cpp * Exported Variables * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include "ola/ExportMap.h" #include "ola/StringUtils.h" #include "ola/stl/STLUtils.h" namespace ola { using std::map; using std::ostringstream; using std::string; using std::vector; ExportMap::~ExportMap() { STLDeleteValues(&m_bool_variables); STLDeleteValues(&m_counter_variables); STLDeleteValues(&m_int_map_variables); STLDeleteValues(&m_int_variables); STLDeleteValues(&m_str_map_variables); STLDeleteValues(&m_string_variables); STLDeleteValues(&m_uint_map_variables); } BoolVariable *ExportMap::GetBoolVar(const string &name) { return GetVar(&m_bool_variables, name); } IntegerVariable *ExportMap::GetIntegerVar(const string &name) { return GetVar(&m_int_variables, name); } CounterVariable *ExportMap::GetCounterVar(const string &name) { return GetVar(&m_counter_variables, name); } StringVariable *ExportMap::GetStringVar(const string &name) { return GetVar(&m_string_variables, name); } /* * Lookup or create a string map variable * @param name the name of the variable * @param label the label to use for the map (optional) * @return a MapVariable */ StringMap *ExportMap::GetStringMapVar(const string &name, const string &label) { return GetMapVar(&m_str_map_variables, name, label); } /* * Lookup or create an int map variable * @param name the name of the variable * @param label the label to use for the map (optional) * @return a MapVariable */ IntMap *ExportMap::GetIntMapVar(const string &name, const string &label) { return GetMapVar(&m_int_map_variables, name, label); } /* * Lookup or create an unsigned int map variable * @param name the name of the variable * @param label the label to use for the map (optional) * @return a MapVariable */ UIntMap *ExportMap::GetUIntMapVar(const string &name, const string &label) { return GetMapVar(&m_uint_map_variables, name, label); } /* * Return a list of all variables. * @return a vector of all variables. */ vector ExportMap::AllVariables() const { vector variables; STLValues(m_bool_variables, &variables); STLValues(m_counter_variables, &variables); STLValues(m_int_map_variables, &variables); STLValues(m_int_variables, &variables); STLValues(m_str_map_variables, &variables); STLValues(m_string_variables, &variables); STLValues(m_uint_map_variables, &variables); sort(variables.begin(), variables.end(), VariableLessThan()); return variables; } template Type *ExportMap::GetVar(map *var_map, const string &name) { typename map::iterator iter; iter = var_map->find(name); if (iter == var_map->end()) { Type *var = new Type(name); (*var_map)[name] = var; return var; } return iter->second; } template Type *ExportMap::GetMapVar(map *var_map, const string &name, const string &label) { typename map::iterator iter; iter = var_map->find(name); if (iter == var_map->end()) { Type *var = new Type(name, label); (*var_map)[name] = var; return var; } return iter->second; } } // namespace ola ola-0.10.9/common/export_map/ExportMapTest.cpp0000664000175000017500000001516314376533110016241 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ExportMapTest.cpp * Test fixture for the ExportMap and Variable classes * Copyright (C) 2005 Simon Newton */ #include #include #include #include "ola/ExportMap.h" #include "ola/testing/TestUtils.h" using ola::BaseVariable; using ola::BoolVariable; using ola::CounterVariable; using ola::ExportMap; using ola::IntMap; using ola::IntegerVariable; using ola::StringMap; using ola::StringVariable; using std::string; using std::vector; class ExportMapTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ExportMapTest); CPPUNIT_TEST(testIntegerVariable); CPPUNIT_TEST(testCounterVariable); CPPUNIT_TEST(testStringVariable); CPPUNIT_TEST(testBoolVariable); CPPUNIT_TEST(testStringMapVariable); CPPUNIT_TEST(testIntMapVariable); CPPUNIT_TEST(testExportMap); CPPUNIT_TEST_SUITE_END(); public: void testIntegerVariable(); void testCounterVariable(); void testStringVariable(); void testBoolVariable(); void testStringMapVariable(); void testIntMapVariable(); void testExportMap(); }; CPPUNIT_TEST_SUITE_REGISTRATION(ExportMapTest); /* * Check that the IntegerVariable works correctly. */ void ExportMapTest::testIntegerVariable() { string name = "foo"; IntegerVariable var(name); OLA_ASSERT_EQ(var.Name(), name); OLA_ASSERT_EQ(var.Value(), string("0")); OLA_ASSERT_EQ(var.Get(), 0); var++; OLA_ASSERT_EQ(var.Get(), 1); OLA_ASSERT_EQ(var.Value(), string("1")); var--; OLA_ASSERT_EQ(var.Get(), 0); OLA_ASSERT_EQ(var.Value(), string("0")); var.Set(100); OLA_ASSERT_EQ(var.Get(), 100); OLA_ASSERT_EQ(var.Value(), string("100")); } /* * Check that the CounterVariable works correctly. */ void ExportMapTest::testCounterVariable() { string name = "foo"; CounterVariable var(name); OLA_ASSERT_EQ(var.Name(), name); OLA_ASSERT_EQ(var.Value(), string("0")); OLA_ASSERT_EQ((unsigned int) 0, var.Get()); var++; OLA_ASSERT_EQ((unsigned int) 1, var.Get()); OLA_ASSERT_EQ(var.Value(), string("1")); var += 10; OLA_ASSERT_EQ((unsigned int) 11, var.Get()); OLA_ASSERT_EQ(var.Value(), string("11")); var += 100; OLA_ASSERT_EQ((unsigned int) 111, var.Get()); OLA_ASSERT_EQ(var.Value(), string("111")); } /* * Check that the StringVariable works correctly. */ void ExportMapTest::testStringVariable() { string name = "foo"; StringVariable var(name); OLA_ASSERT_EQ(var.Name(), name); OLA_ASSERT_EQ(var.Value(), string("")); OLA_ASSERT_EQ(var.Get(), string("")); var.Set("bar"); OLA_ASSERT_EQ(var.Value(), string("bar")); OLA_ASSERT_EQ(var.Get(), string("bar")); } /* * Check that the BoolVariable works correctly. */ void ExportMapTest::testBoolVariable() { string name = "foo"; BoolVariable var(name); OLA_ASSERT_EQ(name, var.Name()); OLA_ASSERT_EQ(false, var.Get()); OLA_ASSERT_EQ(string("0"), var.Value()); var.Set(true); OLA_ASSERT_EQ(string("1"), var.Value()); OLA_ASSERT_EQ(true, var.Get()); } /* * Check that the StringMap works correctly. */ void ExportMapTest::testStringMapVariable() { string name = "foo"; string label = "count"; StringMap var(name, label); OLA_ASSERT_EQ(var.Name(), name); OLA_ASSERT_EQ(var.Label(), label); OLA_ASSERT_EQ(var.Value(), string("map:count")); string key1 = "key1"; string value1 = "value1"; var[key1] = value1; OLA_ASSERT_EQ(value1, var[key1]); OLA_ASSERT_EQ(var.Value(), string("map:count key1:\"value1\"")); string key2 = "key2"; string value2 = "value 2"; var[key2] = value2; OLA_ASSERT_EQ(value2, var[key2]); OLA_ASSERT_EQ(var.Value(), string("map:count key1:\"value1\" key2:\"value 2\"")); var.Remove(key1); OLA_ASSERT_EQ(string(""), var[key1]); var.Remove(key1); OLA_ASSERT_EQ(var.Value(), string("map:count key2:\"value 2\"")); var[key2] = "foo\""; OLA_ASSERT_EQ(var.Value(), string("map:count key2:\"foo\\\"\"")); } /* * Check that the IntMap works correctly. */ void ExportMapTest::testIntMapVariable() { string name = "foo"; string label = "count"; IntMap var(name, label); OLA_ASSERT_EQ(var.Name(), name); OLA_ASSERT_EQ(var.Label(), label); OLA_ASSERT_EQ(var.Value(), string("map:count")); string key1 = "key1"; var[key1] = 100; OLA_ASSERT_EQ(100, var[key1]); OLA_ASSERT_EQ(var.Value(), string("map:count key1:100")); string key2 = "key2"; var[key2] = 99; OLA_ASSERT_EQ(99, var[key2]); OLA_ASSERT_EQ(var.Value(), string("map:count key1:100 key2:99")); var.Remove(key1); OLA_ASSERT_EQ(0, var[key1]); var.Remove(key1); OLA_ASSERT_EQ(var.Value(), string("map:count key2:99")); var.Remove(key2); // check references work string key3 = "key3"; int &var1 = var[key3]; OLA_ASSERT_EQ(0, var1); var1++; OLA_ASSERT_EQ(1, var[key3]); OLA_ASSERT_EQ(var.Value(), string("map:count key3:1")); var.Remove(key3); // check increments work var.Increment(key1); OLA_ASSERT_EQ(var.Value(), string("map:count key1:1")); } /* * Check the export map works correctly. */ void ExportMapTest::testExportMap() { ExportMap map; string bool_var_name = "bool_var"; string int_var_name = "int_var"; string str_var_name = "str_var"; string map_var_name = "map_var"; string map_var_label = "label"; BoolVariable *bool_var = map.GetBoolVar(bool_var_name); IntegerVariable *int_var = map.GetIntegerVar(int_var_name); StringVariable *str_var = map.GetStringVar(str_var_name); StringMap *map_var = map.GetStringMapVar(map_var_name, map_var_label); OLA_ASSERT_EQ(bool_var->Name(), bool_var_name); OLA_ASSERT_EQ(int_var->Name(), int_var_name); OLA_ASSERT_EQ(str_var->Name(), str_var_name); OLA_ASSERT_EQ(map_var->Name(), map_var_name); OLA_ASSERT_EQ(map_var->Label(), map_var_label); map_var = map.GetStringMapVar(map_var_name); OLA_ASSERT_EQ(map_var->Name(), map_var_name); OLA_ASSERT_EQ(map_var->Label(), map_var_label); vector variables = map.AllVariables(); OLA_ASSERT_EQ(variables.size(), (size_t) 4); } ola-0.10.9/common/export_map/Makefile.mk0000664000175000017500000000071514376533110015021 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += \ common/export_map/ExportMap.cpp # TESTS ################################################## test_programs += common/export_map/ExportMapTester common_export_map_ExportMapTester_SOURCES = common/export_map/ExportMapTest.cpp common_export_map_ExportMapTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_export_map_ExportMapTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/messaging/0000775000175000017500000000000014376533271012637 500000000000000ola-0.10.9/common/messaging/SchemaPrinterTest.cpp0000664000175000017500000002031714376533110016662 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaPrinterTest.cpp * Test fixture for the SchemaPrinter class. * Copyright (C) 2011 Simon Newton */ #include #include #include #include "ola/messaging/Descriptor.h" #include "ola/messaging/SchemaPrinter.h" #include "ola/testing/TestUtils.h" using std::string; using std::vector; using ola::messaging::BoolFieldDescriptor; using ola::messaging::IPV4FieldDescriptor; using ola::messaging::MACFieldDescriptor; using ola::messaging::Descriptor; using ola::messaging::FieldDescriptor; using ola::messaging::FieldDescriptorGroup; using ola::messaging::SchemaPrinter; using ola::messaging::StringFieldDescriptor; using ola::messaging::UInt16FieldDescriptor; using ola::messaging::UInt32FieldDescriptor; using ola::messaging::UInt8FieldDescriptor; using ola::messaging::Int16FieldDescriptor; using ola::messaging::Int32FieldDescriptor; using ola::messaging::Int8FieldDescriptor; using ola::messaging::UIDFieldDescriptor; class SchemaPrinterTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(SchemaPrinterTest); CPPUNIT_TEST(testPrinter); CPPUNIT_TEST(testGroupPrinter); CPPUNIT_TEST(testLabels); CPPUNIT_TEST(testIntervalsAndLabels); CPPUNIT_TEST(testIntervalTypes); CPPUNIT_TEST_SUITE_END(); public: SchemaPrinterTest() {} void testPrinter(); void testGroupPrinter(); void testLabels(); void testIntervalsAndLabels(); void testIntervalTypes(); private: template string GenerateIntervalString(int_type min, int_type max); }; CPPUNIT_TEST_SUITE_REGISTRATION(SchemaPrinterTest); /* * Test the SchemaPrinter */ void SchemaPrinterTest::testPrinter() { // setup some fields BoolFieldDescriptor *bool_descriptor = new BoolFieldDescriptor("On/Off"); StringFieldDescriptor *string_descriptor = new StringFieldDescriptor( "Name", 0, 32); UInt8FieldDescriptor *uint8_descriptor = new UInt8FieldDescriptor( "Count", false, 10); IPV4FieldDescriptor *ipv4_descriptor = new IPV4FieldDescriptor( "Address"); MACFieldDescriptor *mac_descriptor = new MACFieldDescriptor( "MAC Address"); UIDFieldDescriptor *uid_descriptor = new UIDFieldDescriptor("Device"); // try a simple print first vector fields; fields.push_back(bool_descriptor); fields.push_back(string_descriptor); fields.push_back(uint8_descriptor); fields.push_back(ipv4_descriptor); fields.push_back(mac_descriptor); fields.push_back(uid_descriptor); Descriptor test_descriptor("Test Descriptor", fields); SchemaPrinter printer(false, false); test_descriptor.Accept(&printer); string expected = ( "On/Off: bool\nName: string [0, 32]\nCount: uint8\n" "Address: IPv4 address\nMAC Address: MAC\nDevice: UID\n"); OLA_ASSERT_EQ(expected, printer.AsString()); } void SchemaPrinterTest::testGroupPrinter() { BoolFieldDescriptor *bool_descriptor = new BoolFieldDescriptor("On/Off"); StringFieldDescriptor *string_descriptor = new StringFieldDescriptor( "Name", 0, 32); StringFieldDescriptor *string_descriptor2 = new StringFieldDescriptor( "Device", 0, 32); UInt8FieldDescriptor *uint8_descriptor = new UInt8FieldDescriptor( "Count", false, 10); UInt32FieldDescriptor *uint32_descriptor = new UInt32FieldDescriptor("Id"); vector fields; fields.push_back(bool_descriptor); fields.push_back(string_descriptor); fields.push_back(uint8_descriptor); // now do a descriptor which contains a GroupDescriptor FieldDescriptorGroup *group_descriptor = new FieldDescriptorGroup( "Group 1", fields, 0, 2); vector fields2; fields2.push_back(string_descriptor2); fields2.push_back(uint32_descriptor); fields2.push_back(group_descriptor); Descriptor test_descriptor("Test Descriptor2", fields2); SchemaPrinter printer(false, false); test_descriptor.Accept(&printer); string expected = "Device: string [0, 32]\nId: uint32\nGroup 1 {\n" " On/Off: bool\n Name: string [0, 32]\n Count: uint8\n}\n"; OLA_ASSERT_EQ(expected, printer.AsString()); } void SchemaPrinterTest::testLabels() { UInt16FieldDescriptor::IntervalVector intervals; intervals.push_back(UInt16FieldDescriptor::Interval(12, 12)); intervals.push_back(UInt16FieldDescriptor::Interval(13, 13)); UInt16FieldDescriptor::LabeledValues labels; labels["dozen"] = 12; labels["bakers_dozen"] = 13; UInt16FieldDescriptor *uint16_descriptor = new UInt16FieldDescriptor( "Count", intervals, labels); vector fields; fields.push_back(uint16_descriptor); Descriptor test_descriptor("Test Descriptor", fields); SchemaPrinter interval_printer(true, false); test_descriptor.Accept(&interval_printer); string expected = "Count: uint16: 12, 13\n"; OLA_ASSERT_EQ(expected, interval_printer.AsString()); } void SchemaPrinterTest::testIntervalsAndLabels() { UInt16FieldDescriptor::IntervalVector intervals; intervals.push_back(UInt16FieldDescriptor::Interval(2, 8)); intervals.push_back(UInt16FieldDescriptor::Interval(12, 14)); UInt16FieldDescriptor::LabeledValues labels; labels["dozen"] = 12; labels["bakers_dozen"] = 13; UInt16FieldDescriptor *uint16_descriptor = new UInt16FieldDescriptor( "Count", intervals, labels); vector fields; fields.push_back(uint16_descriptor); Descriptor test_descriptor("Test Descriptor", fields); SchemaPrinter interval_printer(true, false); test_descriptor.Accept(&interval_printer); string expected = "Count: uint16: (2, 8), (12, 14)\n"; OLA_ASSERT_EQ(expected, interval_printer.AsString()); SchemaPrinter label_printer(false, true); test_descriptor.Accept(&label_printer); string expected2 = "Count: uint16\n bakers_dozen: 13\n dozen: 12\n"; OLA_ASSERT_EQ(expected2, label_printer.AsString()); SchemaPrinter interval_label_printer(true, true); test_descriptor.Accept(&interval_label_printer); string expected3 = ( "Count: uint16: (2, 8), (12, 14)\n bakers_dozen: 13\n dozen: 12\n"); OLA_ASSERT_EQ(expected3, interval_label_printer.AsString()); } template string SchemaPrinterTest::GenerateIntervalString(int_type min, int_type max) { typename field_descriptor_class::IntervalVector intervals; intervals.push_back(typename field_descriptor_class::Interval(min, max)); typename field_descriptor_class::LabeledValues labels; vector fields; fields.push_back(new field_descriptor_class("Count", intervals, labels)); Descriptor test_descriptor("Test Descriptor", fields); SchemaPrinter interval_printer(true, false); test_descriptor.Accept(&interval_printer); return interval_printer.AsString(); } void SchemaPrinterTest::testIntervalTypes() { OLA_ASSERT_EQ(string("Count: uint8: (2, 8)\n"), GenerateIntervalString(2, 8)); OLA_ASSERT_EQ(string("Count: uint16: (2, 8256)\n"), GenerateIntervalString(2, 8256)); OLA_ASSERT_EQ( string("Count: uint32: (2, 82560)\n"), GenerateIntervalString(2, 82560)); OLA_ASSERT_EQ(string("Count: int8: (-2, 8)\n"), GenerateIntervalString(-2, 8)); OLA_ASSERT_EQ( string("Count: int16: (-300, 8256)\n"), GenerateIntervalString(-300, 8256)); OLA_ASSERT_EQ( string("Count: int32: (-70000, 82560)\n"), GenerateIntervalString(-70000, 82560)); } ola-0.10.9/common/messaging/DescriptorTest.cpp0000664000175000017500000003425014376533110016235 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DescriptorTest.cpp * Test fixture for the Descriptor classes * Copyright (C) 2011 Simon Newton */ #include #include #include #include "ola/messaging/Descriptor.h" #include "ola/testing/TestUtils.h" using std::string; using std::vector; using ola::messaging::BoolFieldDescriptor; using ola::messaging::FieldDescriptor; using ola::messaging::FieldDescriptorGroup; using ola::messaging::IPV4FieldDescriptor; using ola::messaging::StringFieldDescriptor; using ola::messaging::UIDFieldDescriptor; using ola::messaging::UInt16FieldDescriptor; using ola::messaging::UInt32FieldDescriptor; using ola::messaging::UInt8FieldDescriptor; class DescriptorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DescriptorTest); CPPUNIT_TEST(testFieldDescriptors); CPPUNIT_TEST(testFieldDescriptorGroup); CPPUNIT_TEST(testIntervalsAndLabels); CPPUNIT_TEST_SUITE_END(); public: DescriptorTest() {} void testFieldDescriptors(); void testFieldDescriptorGroup(); void testIntervalsAndLabels(); }; CPPUNIT_TEST_SUITE_REGISTRATION(DescriptorTest); /* * Test the FieldDescriptors */ void DescriptorTest::testFieldDescriptors() { // bool BoolFieldDescriptor bool_descriptor("bool"); OLA_ASSERT_EQ(string("bool"), bool_descriptor.Name()); OLA_ASSERT_TRUE(bool_descriptor.FixedSize()); OLA_ASSERT_TRUE(bool_descriptor.LimitedSize()); OLA_ASSERT_EQ(1u, bool_descriptor.MaxSize()); // IPv4 address IPV4FieldDescriptor ipv4_descriptor("ipv4"); OLA_ASSERT_EQ(string("ipv4"), ipv4_descriptor.Name()); OLA_ASSERT_TRUE(ipv4_descriptor.FixedSize()); OLA_ASSERT_TRUE(ipv4_descriptor.LimitedSize()); OLA_ASSERT_EQ(4u, ipv4_descriptor.MaxSize()); // UID UIDFieldDescriptor uid_descriptor("uid"); OLA_ASSERT_EQ(string("uid"), uid_descriptor.Name()); OLA_ASSERT_TRUE(uid_descriptor.FixedSize()); OLA_ASSERT_TRUE(uid_descriptor.LimitedSize()); OLA_ASSERT_EQ(6u, uid_descriptor.MaxSize()); // string StringFieldDescriptor string_descriptor("string", 10, 32); OLA_ASSERT_EQ(string("string"), string_descriptor.Name()); OLA_ASSERT_EQ(10u, string_descriptor.MinSize()); OLA_ASSERT_EQ(32u, string_descriptor.MaxSize()); OLA_ASSERT_FALSE(string_descriptor.FixedSize()); OLA_ASSERT_TRUE(string_descriptor.LimitedSize()); // uint8_t UInt8FieldDescriptor uint8_descriptor("uint8", false, 10); OLA_ASSERT_EQ(string("uint8"), uint8_descriptor.Name()); OLA_ASSERT_EQ(1u, uint8_descriptor.MaxSize()); OLA_ASSERT_FALSE(uint8_descriptor.IsLittleEndian()); OLA_ASSERT_EQ(static_cast(10), uint8_descriptor.Multiplier()); OLA_ASSERT_TRUE(uint8_descriptor.FixedSize()); OLA_ASSERT_TRUE(uint8_descriptor.LimitedSize()); UInt8FieldDescriptor uint8_descriptor2("uint8", true, -1); OLA_ASSERT_EQ(string("uint8"), uint8_descriptor2.Name()); OLA_ASSERT_EQ(1u, uint8_descriptor2.MaxSize()); OLA_ASSERT_TRUE(uint8_descriptor2.IsLittleEndian()); OLA_ASSERT_EQ(static_cast(-1), uint8_descriptor2.Multiplier()); OLA_ASSERT_TRUE(uint8_descriptor2.FixedSize()); OLA_ASSERT_TRUE(uint8_descriptor2.LimitedSize()); // uint16_t UInt16FieldDescriptor uint16_descriptor("uint16", false, 10); OLA_ASSERT_EQ(string("uint16"), uint16_descriptor.Name()); OLA_ASSERT_EQ(2u, uint16_descriptor.MaxSize()); OLA_ASSERT_FALSE(uint16_descriptor.IsLittleEndian()); OLA_ASSERT_EQ(static_cast(10), uint16_descriptor.Multiplier()); OLA_ASSERT_TRUE(uint16_descriptor.FixedSize()); OLA_ASSERT_TRUE(uint16_descriptor.LimitedSize()); UInt16FieldDescriptor uint16_descriptor2("uint16", true, -1); OLA_ASSERT_EQ(string("uint16"), uint16_descriptor2.Name()); OLA_ASSERT_EQ(2u, uint16_descriptor2.MaxSize()); OLA_ASSERT_TRUE(uint16_descriptor2.IsLittleEndian()); OLA_ASSERT_EQ(static_cast(-1), uint16_descriptor2.Multiplier()); OLA_ASSERT_TRUE(uint16_descriptor2.FixedSize()); OLA_ASSERT_TRUE(uint16_descriptor2.LimitedSize()); // uint32_t UInt32FieldDescriptor uint32_descriptor("uint32", false, 10); OLA_ASSERT_EQ(string("uint32"), uint32_descriptor.Name()); OLA_ASSERT_EQ(4u, uint32_descriptor.MaxSize()); OLA_ASSERT_FALSE(uint32_descriptor.IsLittleEndian()); OLA_ASSERT_EQ(static_cast(10), uint32_descriptor.Multiplier()); OLA_ASSERT_TRUE(uint32_descriptor.FixedSize()); OLA_ASSERT_TRUE(uint32_descriptor.LimitedSize()); UInt32FieldDescriptor uint32_descriptor2("uint32", true, -1); OLA_ASSERT_EQ(string("uint32"), uint32_descriptor2.Name()); OLA_ASSERT_EQ(4u, uint32_descriptor2.MaxSize()); OLA_ASSERT_TRUE(uint32_descriptor2.IsLittleEndian()); OLA_ASSERT_EQ(static_cast(-1), uint32_descriptor2.Multiplier()); OLA_ASSERT_TRUE(uint32_descriptor2.FixedSize()); OLA_ASSERT_TRUE(uint32_descriptor2.LimitedSize()); } /** * Check FieldDescriptorGroup */ void DescriptorTest::testFieldDescriptorGroup() { // first try a group where the fields are all a fixed size BoolFieldDescriptor *bool_descriptor = new BoolFieldDescriptor("bool"); UInt8FieldDescriptor *uint8_descriptor = new UInt8FieldDescriptor( "uint8", false, 10); // group with a variable number of repeats vector fields; fields.push_back(bool_descriptor); fields.push_back(uint8_descriptor); FieldDescriptorGroup group_descriptor("group", fields, 0, 3); OLA_ASSERT_FALSE(group_descriptor.FixedSize()); OLA_ASSERT_TRUE(group_descriptor.LimitedSize()); OLA_ASSERT_EQ(6u, group_descriptor.MaxSize()); OLA_ASSERT_EQ(2u, group_descriptor.FieldCount()); OLA_ASSERT_TRUE(group_descriptor.FixedBlockSize()); OLA_ASSERT_EQ(2u, group_descriptor.BlockSize()); OLA_ASSERT_EQ(2u, group_descriptor.MaxBlockSize()); OLA_ASSERT_EQ(static_cast(0), group_descriptor.MinBlocks()); OLA_ASSERT_EQ(static_cast(3), group_descriptor.MaxBlocks()); OLA_ASSERT_FALSE(group_descriptor.FixedBlockCount()); OLA_ASSERT_EQ(static_cast(bool_descriptor), group_descriptor.GetField(0)); OLA_ASSERT_EQ(static_cast(uint8_descriptor), group_descriptor.GetField(1)); // A group with a fixed number of repeats and fixed size fields BoolFieldDescriptor *bool_descriptor2 = new BoolFieldDescriptor("bool"); UInt8FieldDescriptor *uint8_descriptor2 = new UInt8FieldDescriptor( "uint8", false, 10); UInt16FieldDescriptor *uint16_descriptor2 = new UInt16FieldDescriptor( "uint16", false, 10); vector fields2; fields2.push_back(bool_descriptor2); fields2.push_back(uint8_descriptor2); fields2.push_back(uint16_descriptor2); FieldDescriptorGroup group_descriptor2("group", fields2, 2, 2); OLA_ASSERT_TRUE(group_descriptor2.FixedSize()); OLA_ASSERT_TRUE(group_descriptor2.LimitedSize()); OLA_ASSERT_EQ(8u, group_descriptor2.MaxSize()); OLA_ASSERT_EQ(3u, group_descriptor2.FieldCount()); OLA_ASSERT_TRUE(group_descriptor2.FixedBlockSize()); OLA_ASSERT_EQ(4u, group_descriptor2.BlockSize()); OLA_ASSERT_EQ(4u, group_descriptor2.MaxBlockSize()); OLA_ASSERT_EQ(static_cast(2), group_descriptor2.MinBlocks()); OLA_ASSERT_EQ(static_cast(2), group_descriptor2.MaxBlocks()); OLA_ASSERT_TRUE(group_descriptor2.FixedBlockCount()); OLA_ASSERT_EQ(static_cast(bool_descriptor2), group_descriptor2.GetField(0)); OLA_ASSERT_EQ(static_cast(uint8_descriptor2), group_descriptor2.GetField(1)); OLA_ASSERT_EQ(static_cast(uint16_descriptor2), group_descriptor2.GetField(2)); // now check a group with variable sized fields BoolFieldDescriptor *bool_descriptor3 = new BoolFieldDescriptor("bool"); StringFieldDescriptor *string_descriptor2 = new StringFieldDescriptor("string", 0, 32); vector fields3; fields3.push_back(bool_descriptor3); fields3.push_back(string_descriptor2); FieldDescriptorGroup group_descriptor3("group", fields3, 0, 2); OLA_ASSERT_FALSE(group_descriptor3.FixedSize()); OLA_ASSERT_TRUE(group_descriptor3.LimitedSize()); OLA_ASSERT_EQ(66u, group_descriptor3.MaxSize()); OLA_ASSERT_EQ(2u, group_descriptor3.FieldCount()); OLA_ASSERT_FALSE(group_descriptor3.FixedBlockSize()); OLA_ASSERT_EQ(0u, group_descriptor3.BlockSize()); OLA_ASSERT_EQ(33u, group_descriptor3.MaxBlockSize()); OLA_ASSERT_EQ(static_cast(0), group_descriptor3.MinBlocks()); OLA_ASSERT_EQ(static_cast(2), group_descriptor3.MaxBlocks()); OLA_ASSERT_FALSE(group_descriptor3.FixedBlockCount()); OLA_ASSERT_EQ(static_cast(bool_descriptor3), group_descriptor3.GetField(0)); OLA_ASSERT_EQ(static_cast(string_descriptor2), group_descriptor3.GetField(1)); // now check a group with variable sized fields but a fixed block count BoolFieldDescriptor *bool_descriptor4 = new BoolFieldDescriptor("bool"); StringFieldDescriptor *string_descriptor3 = new StringFieldDescriptor("string", 0, 32); vector fields4; fields4.push_back(bool_descriptor4); fields4.push_back(string_descriptor3); FieldDescriptorGroup group_descriptor4("group", fields4, 2, 2); OLA_ASSERT_FALSE(group_descriptor4.FixedSize()); OLA_ASSERT_TRUE(group_descriptor4.LimitedSize()); OLA_ASSERT_EQ(66u, group_descriptor4.MaxSize()); OLA_ASSERT_EQ(2u, group_descriptor4.FieldCount()); OLA_ASSERT_FALSE(group_descriptor4.FixedBlockSize()); OLA_ASSERT_EQ(0u, group_descriptor4.BlockSize()); OLA_ASSERT_EQ(33u, group_descriptor4.MaxBlockSize()); OLA_ASSERT_EQ(static_cast(2), group_descriptor4.MinBlocks()); OLA_ASSERT_EQ(static_cast(2), group_descriptor4.MaxBlocks()); OLA_ASSERT_TRUE(group_descriptor4.FixedBlockCount()); OLA_ASSERT_EQ(static_cast(bool_descriptor4), group_descriptor4.GetField(0)); OLA_ASSERT_EQ(static_cast(string_descriptor3), group_descriptor4.GetField(1)); // now check a group with an unlimited block count BoolFieldDescriptor *bool_descriptor5 = new BoolFieldDescriptor("bool"); vector fields5; fields5.push_back(bool_descriptor5); FieldDescriptorGroup group_descriptor5( "group", fields5, 0, FieldDescriptorGroup::UNLIMITED_BLOCKS); OLA_ASSERT_FALSE(group_descriptor5.FixedSize()); OLA_ASSERT_FALSE(group_descriptor5.LimitedSize()); OLA_ASSERT_EQ(0u, group_descriptor5.MaxSize()); OLA_ASSERT_EQ(1u, group_descriptor5.FieldCount()); OLA_ASSERT_TRUE(group_descriptor5.FixedBlockSize()); OLA_ASSERT_EQ(1u, group_descriptor5.BlockSize()); OLA_ASSERT_EQ(1u, group_descriptor5.MaxBlockSize()); OLA_ASSERT_EQ(static_cast(0), group_descriptor5.MinBlocks()); OLA_ASSERT_EQ( static_cast(FieldDescriptorGroup::UNLIMITED_BLOCKS), group_descriptor5.MaxBlocks()); OLA_ASSERT_FALSE(group_descriptor5.FixedBlockCount()); OLA_ASSERT_EQ(static_cast(bool_descriptor5), group_descriptor5.GetField(0)); } /** * Check that intervals and labels work */ void DescriptorTest::testIntervalsAndLabels() { UInt16FieldDescriptor::IntervalVector intervals; intervals.push_back(UInt16FieldDescriptor::Interval(2, 8)); intervals.push_back(UInt16FieldDescriptor::Interval(12, 14)); UInt16FieldDescriptor::LabeledValues labels; labels["dozen"] = 12; labels["bakers_dozen"] = 13; UInt16FieldDescriptor uint16_descriptor("uint16", intervals, labels); // check IsValid() OLA_ASSERT_FALSE(uint16_descriptor.IsValid(0)); OLA_ASSERT_FALSE(uint16_descriptor.IsValid(1)); OLA_ASSERT_TRUE(uint16_descriptor.IsValid(2)); OLA_ASSERT_TRUE(uint16_descriptor.IsValid(8)); OLA_ASSERT_FALSE(uint16_descriptor.IsValid(9)); OLA_ASSERT_FALSE(uint16_descriptor.IsValid(11)); OLA_ASSERT_TRUE(uint16_descriptor.IsValid(12)); OLA_ASSERT_TRUE(uint16_descriptor.IsValid(13)); OLA_ASSERT_TRUE(uint16_descriptor.IsValid(14)); OLA_ASSERT_FALSE(uint16_descriptor.IsValid(15)); OLA_ASSERT_FALSE(uint16_descriptor.IsValid(255)); OLA_ASSERT_FALSE(uint16_descriptor.IsValid(65535)); // check LookupLabel() uint16_t value; OLA_ASSERT_FALSE(uint16_descriptor.LookupLabel("one", &value)); OLA_ASSERT_TRUE(uint16_descriptor.LookupLabel("dozen", &value)); OLA_ASSERT_EQ(static_cast(12), value); OLA_ASSERT_TRUE(uint16_descriptor.LookupLabel("bakers_dozen", &value)); OLA_ASSERT_EQ(static_cast(13), value); OLA_ASSERT_FALSE(uint16_descriptor.LookupLabel("twenty", &value)); // check LookupValue OLA_ASSERT_EQ(string(""), uint16_descriptor.LookupValue(0)); OLA_ASSERT_EQ(string("dozen"), uint16_descriptor.LookupValue(12)); OLA_ASSERT_EQ(string("bakers_dozen"), uint16_descriptor.LookupValue(13)); // a Descriptor with no labels or intervals UInt16FieldDescriptor::IntervalVector intervals2; UInt16FieldDescriptor::LabeledValues labels2; UInt16FieldDescriptor uint16_descriptor2("uint16", intervals2, labels2); OLA_ASSERT_TRUE(uint16_descriptor2.IsValid(0)); OLA_ASSERT_TRUE(uint16_descriptor2.IsValid(255)); OLA_ASSERT_TRUE(uint16_descriptor2.IsValid(65535)); } ola-0.10.9/common/messaging/Message.cpp0000664000175000017500000000345214376533110014643 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Message.cpp * Holds the metadata (schema) for a Message. * Copyright (C) 2011 Simon Newton */ #include #include namespace ola { namespace messaging { using std::vector; Message::~Message() { vector::const_iterator iter = m_fields.begin(); for (; iter != m_fields.end(); ++iter) delete *iter; } void Message::Accept(MessageVisitor *visitor) const { vector::const_iterator iter = m_fields.begin(); for (; iter != m_fields.end(); ++iter) (*iter)->Accept(visitor); } GroupMessageField::~GroupMessageField() { vector::const_iterator iter = m_fields.begin(); for (; iter != m_fields.end(); ++iter) delete *iter; } void GroupMessageField::Accept(MessageVisitor *visitor) const { visitor->Visit(this); vector::const_iterator iter = m_fields.begin(); for (; iter != m_fields.end(); ++iter) (*iter)->Accept(visitor); visitor->PostVisit(this); } } // namespace messaging } // namespace ola ola-0.10.9/common/messaging/MessagePrinterTest.cpp0000664000175000017500000001462514376533110017053 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MessagePrinterTest.cpp * Test fixture for the MessagePrinter class. * Copyright (C) 2011 Simon Newton */ #include #include #include #include "ola/messaging/Descriptor.h" #include "ola/messaging/Message.h" #include "ola/messaging/MessagePrinter.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/UID.h" #include "ola/testing/TestUtils.h" using std::string; using std::vector; using ola::rdm::UID; using ola::messaging::BoolFieldDescriptor; using ola::messaging::BoolMessageField; using ola::messaging::FieldDescriptor; using ola::messaging::FieldDescriptorGroup; using ola::messaging::GroupMessageField; using ola::messaging::IPV4FieldDescriptor; using ola::messaging::GenericMessagePrinter; using ola::messaging::IPV4MessageField; using ola::messaging::Int16FieldDescriptor; using ola::messaging::Int16MessageField; using ola::messaging::Int8FieldDescriptor; using ola::messaging::Int8MessageField; using ola::messaging::Message; using ola::messaging::MessageFieldInterface; using ola::messaging::StringFieldDescriptor; using ola::messaging::StringMessageField; using ola::messaging::UIDFieldDescriptor; using ola::messaging::UIDMessageField; using ola::messaging::UInt32FieldDescriptor; using ola::messaging::UInt32MessageField; using ola::messaging::UInt8FieldDescriptor; using ola::messaging::UInt8MessageField; class GenericMessagePrinterTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(GenericMessagePrinterTest); CPPUNIT_TEST(testSimplePrinter); CPPUNIT_TEST(testLabeledPrinter); CPPUNIT_TEST(testNestedPrinter); CPPUNIT_TEST_SUITE_END(); public: GenericMessagePrinterTest() {} void testSimplePrinter(); void testLabeledPrinter(); void testNestedPrinter(); private: GenericMessagePrinter m_printer; }; CPPUNIT_TEST_SUITE_REGISTRATION(GenericMessagePrinterTest); /* * Test the MessagePrinter */ void GenericMessagePrinterTest::testSimplePrinter() { // setup some fields BoolFieldDescriptor bool_descriptor("On/Off"); IPV4FieldDescriptor ipv4_descriptor("ip"); UIDFieldDescriptor uid_descriptor("uid"); StringFieldDescriptor string_descriptor("Name", 0, 32); UInt32FieldDescriptor uint32_descriptor("Id"); UInt8FieldDescriptor uint8_descriptor("Count", false, -3); Int8FieldDescriptor int8_descriptor("Delta", false, 1); Int16FieldDescriptor int16_descriptor("Rate", false, -1); // try a simple print first vector fields; fields.push_back(new BoolMessageField(&bool_descriptor, false)); fields.push_back( new IPV4MessageField(&ipv4_descriptor, ola::network::HostToNetwork(0x0a000001))); fields.push_back(new UIDMessageField(&uid_descriptor, UID(0x7a70, 1))); fields.push_back(new StringMessageField(&string_descriptor, "foobar")); fields.push_back(new UInt32MessageField(&uint32_descriptor, 42)); fields.push_back(new UInt8MessageField(&uint8_descriptor, 4)); fields.push_back(new Int8MessageField(&int8_descriptor, 10)); fields.push_back(new Int16MessageField(&int16_descriptor, 10)); Message message(fields); string expected = ( "On/Off: false\nip: 10.0.0.1\nuid: 7a70:00000001\nName: foobar\nId: 42\n" "Count: 4 x 10 ^ -3\nDelta: 10 x 10 ^ 1\nRate: 10 x 10 ^ -1\n"); OLA_ASSERT_EQ(expected, m_printer.AsString(&message)); } /** * Check that labels are added */ void GenericMessagePrinterTest::testLabeledPrinter() { UInt8FieldDescriptor::IntervalVector intervals; intervals.push_back(UInt8FieldDescriptor::Interval(0, 2)); UInt8FieldDescriptor::LabeledValues labels; labels["off"] = 0; labels["on"] = 1; labels["auto"] = 2; UInt8FieldDescriptor uint8_descriptor("State", intervals, labels); vector fields; fields.push_back(new UInt8MessageField(&uint8_descriptor, 0)); fields.push_back(new UInt8MessageField(&uint8_descriptor, 1)); fields.push_back(new UInt8MessageField(&uint8_descriptor, 2)); Message message(fields); string expected = "State: off\nState: on\nState: auto\n"; OLA_ASSERT_EQ(expected, m_printer.AsString(&message)); } void GenericMessagePrinterTest::testNestedPrinter() { // this holds some information on people StringFieldDescriptor *string_descriptor = new StringFieldDescriptor( "Name", 0, 32); BoolFieldDescriptor *bool_descriptor = new BoolFieldDescriptor("Female"); UInt8FieldDescriptor *uint8_descriptor = new UInt8FieldDescriptor("Age"); vector person_fields; person_fields.push_back(string_descriptor); person_fields.push_back(bool_descriptor); person_fields.push_back(uint8_descriptor); FieldDescriptorGroup group_descriptor("Person", person_fields, 0, 10); // setup the first person vector person1; person1.push_back(new StringMessageField(string_descriptor, "Lisa")); person1.push_back(new BoolMessageField(bool_descriptor, true)); person1.push_back(new UInt8MessageField(uint8_descriptor, 21)); // setup the second person vector person2; person2.push_back(new StringMessageField(string_descriptor, "Simon")); person2.push_back(new BoolMessageField(bool_descriptor, false)); person2.push_back(new UInt8MessageField(uint8_descriptor, 26)); vector messages; messages.push_back(new GroupMessageField(&group_descriptor, person1)); messages.push_back(new GroupMessageField(&group_descriptor, person2)); Message message(messages); string expected = ( "Person {\n Name: Lisa\n Female: true\n Age: 21\n}\n" "Person {\n Name: Simon\n Female: false\n Age: 26\n}\n"); OLA_ASSERT_EQ(expected, m_printer.AsString(&message)); } ola-0.10.9/common/messaging/Descriptor.cpp0000664000175000017500000000572314376533110015400 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Descriptor.cpp * Holds the metadata (schema) for a Message. * Copyright (C) 2011 Simon Newton */ #include #include namespace ola { namespace messaging { using std::vector; const int16_t FieldDescriptorGroup::UNLIMITED_BLOCKS = -1; FieldDescriptorGroup::~FieldDescriptorGroup() { vector::const_iterator iter = m_fields.begin(); for (; iter != m_fields.end(); ++iter) delete *iter; } bool FieldDescriptorGroup::LimitedSize() const { if (m_max_blocks == UNLIMITED_BLOCKS) return false; PopulateIfRequired(); return m_limited_size; } bool FieldDescriptorGroup::FixedBlockSize() const { PopulateIfRequired(); return m_fixed_size; } unsigned int FieldDescriptorGroup::BlockSize() const { PopulateIfRequired(); return m_block_size; } unsigned int FieldDescriptorGroup::MaxBlockSize() const { PopulateIfRequired(); return m_max_block_size; } unsigned int FieldDescriptorGroup::MaxSize() const { if (!LimitedSize()) return 0; return MaxBlockSize() * m_max_blocks; } void FieldDescriptorGroup::Accept(FieldDescriptorVisitor *visitor) const { visitor->Visit(this); vector::const_iterator iter = m_fields.begin(); if (visitor->Descend()) { for (; iter != m_fields.end(); ++iter) (*iter)->Accept(visitor); } visitor->PostVisit(this); } /** * We cache all the information that requires iterating over the fields * This method populates the cache if required. */ void FieldDescriptorGroup::PopulateIfRequired() const { if (m_populated) return; unsigned int size = 0; vector::const_iterator iter = m_fields.begin(); for (; iter != m_fields.end(); ++iter) { if (!(*iter)->LimitedSize()) m_limited_size = false; if (!(*iter)->FixedSize()) m_fixed_size = false; size += (*iter)->MaxSize(); } m_populated = true; m_block_size = m_fixed_size ? size : 0; m_max_block_size = m_limited_size ? size : 0; } void Descriptor::Accept(FieldDescriptorVisitor *visitor) const { vector::const_iterator iter = m_fields.begin(); for (; iter != m_fields.end(); ++iter) (*iter)->Accept(visitor); } } // namespace messaging } // namespace ola ola-0.10.9/common/messaging/MessagePrinter.cpp0000664000175000017500000001310714376533110016205 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MessagePrinter.cpp * Prints the test representation of a Message. * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include namespace ola { namespace messaging { using std::string; using std::endl; /** * Build the string representation of a message object */ string MessagePrinter::AsString(const Message *message) { m_str.str(""); message->Accept(this); PostStringHook(); return m_str.str(); } void GenericMessagePrinter::Visit(const BoolMessageField *message) { Stream() << string(m_indent, ' ') << TransformLabel(message->GetDescriptor()->Name()) << ": " << (message->Value() ? "true" : "false") << endl; } void GenericMessagePrinter::Visit(const IPV4MessageField *message) { Stream() << string(m_indent, ' ') << TransformLabel(message->GetDescriptor()->Name()) << ": " << message->Value() << endl; } void GenericMessagePrinter::Visit(const MACMessageField *message) { Stream() << string(m_indent, ' ') << TransformLabel(message->GetDescriptor()->Name()) << ": " << message->Value().ToString() << endl; } void GenericMessagePrinter::Visit(const UIDMessageField *message) { Stream() << string(m_indent, ' ') << TransformLabel(message->GetDescriptor()->Name()) << ": " << message->Value().ToString() << endl; } void GenericMessagePrinter::Visit(const StringMessageField *message) { Stream() << string(m_indent, ' ') << TransformLabel(message->GetDescriptor()->Name()) << ": " << EncodeString(message->Value()) << endl; } void GenericMessagePrinter::Visit(const BasicMessageField *message) { const UInt8FieldDescriptor *descriptor = message->GetDescriptor(); AppendUInt(descriptor->Name(), message->Value(), descriptor->LookupValue(message->Value()), descriptor->Multiplier()); } void GenericMessagePrinter::Visit(const BasicMessageField *message) { const UInt16FieldDescriptor *descriptor = message->GetDescriptor(); AppendUInt(descriptor->Name(), message->Value(), descriptor->LookupValue(message->Value()), descriptor->Multiplier()); } void GenericMessagePrinter::Visit(const BasicMessageField *message) { const UInt32FieldDescriptor *descriptor = message->GetDescriptor(); AppendUInt(descriptor->Name(), message->Value(), descriptor->LookupValue(message->Value()), descriptor->Multiplier()); } void GenericMessagePrinter::Visit(const BasicMessageField *message) { const Int8FieldDescriptor *descriptor = message->GetDescriptor(); AppendInt(descriptor->Name(), message->Value(), descriptor->LookupValue(message->Value()), descriptor->Multiplier()); } void GenericMessagePrinter::Visit(const BasicMessageField *message) { const Int16FieldDescriptor *descriptor = message->GetDescriptor(); AppendInt(descriptor->Name(), message->Value(), descriptor->LookupValue(message->Value()), descriptor->Multiplier()); } void GenericMessagePrinter::Visit(const BasicMessageField *message) { const Int32FieldDescriptor *descriptor = message->GetDescriptor(); AppendInt(descriptor->Name(), message->Value(), descriptor->LookupValue(message->Value()), descriptor->Multiplier()); } void GenericMessagePrinter::Visit(const GroupMessageField *message) { Stream() << string(m_indent, ' ') << TransformLabel(message->GetDescriptor()->Name()) << " {" << endl; m_indent += m_indent_size; } void GenericMessagePrinter::PostVisit(const GroupMessageField *message) { m_indent -= m_indent_size; Stream() << string(m_indent, ' ') << "}" << endl; (void) message; } void GenericMessagePrinter::AppendUInt(const string &name, unsigned int value, const string &label, int8_t multiplier) { Stream() << string(m_indent, ' ') << TransformLabel(name) << ": "; if (label.empty()) { Stream() << value; AppendMultiplier(multiplier); } else { Stream() << label; } Stream() << endl; } void GenericMessagePrinter::AppendInt(const string &name, int value, const string &label, int8_t multiplier) { Stream() << string(m_indent, ' ') << TransformLabel(name) << ": "; if (label.empty()) { Stream() << value; AppendMultiplier(multiplier); } else { Stream() << label; } Stream() << endl; } void GenericMessagePrinter::AppendMultiplier(int8_t multiplier) { if (multiplier) Stream() << " x 10 ^ " << static_cast(multiplier); } } // namespace messaging } // namespace ola ola-0.10.9/common/messaging/SchemaPrinter.cpp0000664000175000017500000000726514376533110016031 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaPrinter.cpp * Prints the text representation of a schema. * Copyright (C) 2011 Simon Newton */ #include #include #include #include namespace ola { namespace messaging { using std::string; using std::endl; void SchemaPrinter::Visit(const BoolFieldDescriptor *descriptor) { m_str << string(m_indent, ' ') << descriptor->Name() << ": bool" << endl; } void SchemaPrinter::Visit(const IPV4FieldDescriptor *descriptor) { m_str << string(m_indent, ' ') << descriptor->Name() << ": IPv4 address" << endl; } void SchemaPrinter::Visit(const MACFieldDescriptor *descriptor) { m_str << string(m_indent, ' ') << descriptor->Name() << ": MAC" << endl; } void SchemaPrinter::Visit(const UIDFieldDescriptor *descriptor) { m_str << string(m_indent, ' ') << descriptor->Name() << ": UID" << endl; } void SchemaPrinter::Visit(const StringFieldDescriptor *descriptor) { m_str << string(m_indent, ' ') << descriptor->Name() << ": string [" << descriptor->MinSize() << ", " << descriptor->MaxSize() << "]" << endl; } void SchemaPrinter::Visit(const UInt8FieldDescriptor *descriptor) { AppendHeading(descriptor->Name(), "uint8"); MaybeAppendIntervals(descriptor->Intervals()); MaybeAppendLabels(descriptor->Labels()); m_str << endl; } void SchemaPrinter::Visit(const UInt16FieldDescriptor *descriptor) { AppendHeading(descriptor->Name(), "uint16"); MaybeAppendIntervals(descriptor->Intervals()); MaybeAppendLabels(descriptor->Labels()); m_str << endl; } void SchemaPrinter::Visit(const UInt32FieldDescriptor *descriptor) { AppendHeading(descriptor->Name(), "uint32"); MaybeAppendIntervals(descriptor->Intervals()); MaybeAppendLabels(descriptor->Labels()); m_str << endl; } void SchemaPrinter::Visit(const Int8FieldDescriptor *descriptor) { AppendHeading(descriptor->Name(), "int8"); MaybeAppendIntervals(descriptor->Intervals()); MaybeAppendLabels(descriptor->Labels()); m_str << endl; } void SchemaPrinter::Visit(const Int16FieldDescriptor *descriptor) { AppendHeading(descriptor->Name(), "int16"); MaybeAppendIntervals(descriptor->Intervals()); MaybeAppendLabels(descriptor->Labels()); m_str << endl; } void SchemaPrinter::Visit(const Int32FieldDescriptor *descriptor) { AppendHeading(descriptor->Name(), "int32"); MaybeAppendIntervals(descriptor->Intervals()); MaybeAppendLabels(descriptor->Labels()); m_str << endl; } void SchemaPrinter::Visit(const FieldDescriptorGroup *descriptor) { m_str << string(m_indent, ' ') << descriptor->Name() << " {" << endl; m_indent += m_indent_size; } void SchemaPrinter::PostVisit(const FieldDescriptorGroup *descriptor) { m_indent -= m_indent_size; m_str << string(m_indent, ' ') << "}" << endl; (void) descriptor; } void SchemaPrinter::AppendHeading(const string &name, const string &type) { m_str << string(m_indent, ' ') << name << ": " << type; } } // namespace messaging } // namespace ola ola-0.10.9/common/messaging/Makefile.mk0000664000175000017500000000124514376533110014617 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += \ common/messaging/Descriptor.cpp \ common/messaging/Message.cpp \ common/messaging/MessagePrinter.cpp \ common/messaging/SchemaPrinter.cpp # TESTS ################################################## test_programs += common/messaging/DescriptorTester common_messaging_DescriptorTester_SOURCES = \ common/messaging/DescriptorTest.cpp \ common/messaging/SchemaPrinterTest.cpp \ common/messaging/MessagePrinterTest.cpp common_messaging_DescriptorTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_messaging_DescriptorTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/io/0000775000175000017500000000000014376533271011271 500000000000000ola-0.10.9/common/io/WindowsPoller.cpp0000664000175000017500000006053414376533110014525 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * WindowsPoller.cpp * A Poller for the Windows platform * Copyright (C) 2014 Lukas Erlinghagen */ #include "common/io/WindowsPoller.h" #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN #include #if HAVE_WINERROR_H #include #endif // HAVE_WINERROR_H #include #include #include #include #include #include "ola/Clock.h" #include "ola/Logging.h" #include "ola/base/Macro.h" #include "ola/io/Descriptor.h" #include "ola/stl/STLUtils.h" using std::map; using std::pair; using std::vector; namespace ola { namespace io { ////////////////////////////////////////////////////////////////////////////// static const int FLAG_READ = 1; static const int FLAG_WRITE = 2; class WindowsPollerDescriptor { public: WindowsPollerDescriptor() : read_descriptor(NULL), write_descriptor(NULL), connected_descriptor(NULL), delete_connected_on_close(false), type(GENERIC_DESCRIPTOR), flags(0) { } ReadFileDescriptor *read_descriptor; WriteFileDescriptor *write_descriptor; ConnectedDescriptor *connected_descriptor; bool delete_connected_on_close; DescriptorType type; int flags; }; ////////////////////////////////////////////////////////////////////////////// class EventHolder { public: EventHolder() : event(CreateEvent(NULL, FALSE, FALSE, NULL)) { } ~EventHolder() { CloseHandle(event); } operator HANDLE() { return event; } private: HANDLE event; }; ////////////////////////////////////////////////////////////////////////////// WindowsPoller::WindowsPoller(ExportMap *export_map, Clock *clock) : m_export_map(export_map), m_loop_iterations(NULL), m_loop_time(NULL), m_clock(clock) { if (m_export_map) { m_loop_time = m_export_map->GetCounterVar(K_LOOP_TIME); m_loop_iterations = m_export_map->GetCounterVar(K_LOOP_COUNT); } } WindowsPoller::~WindowsPoller() { { DescriptorMap::iterator iter = m_descriptor_map.begin(); for (; iter != m_descriptor_map.end(); ++iter) { if (iter->second->delete_connected_on_close) { delete iter->second->connected_descriptor; } delete iter->second; } } OrphanedDescriptors::iterator iter = m_orphaned_descriptors.begin(); for (; iter != m_orphaned_descriptors.end(); ++iter) { if ((*iter)->delete_connected_on_close) { delete (*iter)->connected_descriptor; } delete *iter; } } bool WindowsPoller::AddReadDescriptor(ReadFileDescriptor *descriptor) { if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "AddReadDescriptor called with invalid descriptor"; return false; } pair result = LookupOrCreateDescriptor( ToHandle(descriptor->ReadDescriptor())); if (result.first->flags & FLAG_READ) { OLA_WARN << "Descriptor " << descriptor->ReadDescriptor() << " already in read set"; return false; } result.first->flags |= FLAG_READ; result.first->read_descriptor = descriptor; result.first->type = descriptor->ReadDescriptor().m_type; return result.second ? true : false; } bool WindowsPoller::AddReadDescriptor(ConnectedDescriptor *descriptor, bool delete_on_close) { if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "AddReadDescriptor called with invalid descriptor"; return false; } pair result = LookupOrCreateDescriptor( ToHandle(descriptor->ReadDescriptor())); if (result.first->flags & FLAG_READ) { OLA_WARN << "Descriptor " << descriptor->ReadDescriptor() << " already in read set"; return false; } result.first->flags |= FLAG_READ; result.first->connected_descriptor = descriptor; result.first->type = descriptor->ReadDescriptor().m_type; result.first->delete_connected_on_close = delete_on_close; return (result.second)? true : false; } bool WindowsPoller::RemoveReadDescriptor(ReadFileDescriptor *descriptor) { return RemoveDescriptor(descriptor->ReadDescriptor(), FLAG_READ, true); } bool WindowsPoller::RemoveReadDescriptor(ConnectedDescriptor *descriptor) { return RemoveDescriptor(descriptor->ReadDescriptor(), FLAG_READ, true); } bool WindowsPoller::AddWriteDescriptor(WriteFileDescriptor *descriptor) { if (!descriptor->ValidWriteDescriptor()) { OLA_WARN << "AddWriteDescriptor called with invalid descriptor"; return false; } if ((descriptor->WriteDescriptor().m_type != SOCKET_DESCRIPTOR) && (descriptor->WriteDescriptor().m_type != PIPE_DESCRIPTOR)) { OLA_WARN << "Cannot add descriptor " << descriptor << " for writing."; return false; } pair result = LookupOrCreateDescriptor( ToHandle(descriptor->WriteDescriptor())); if (result.first->flags & FLAG_WRITE) { OLA_WARN << "Descriptor " << descriptor->WriteDescriptor() << " already in write set"; return false; } result.first->flags |= FLAG_WRITE; result.first->write_descriptor = descriptor; result.first->type = descriptor->WriteDescriptor().m_type; return (result.second)? true : false; } bool WindowsPoller::RemoveWriteDescriptor(WriteFileDescriptor *descriptor) { return RemoveDescriptor(descriptor->WriteDescriptor(), FLAG_WRITE, true); } ////////////////////////////////////////////////////////////////////////////// class PollData { public: PollData(HANDLE event, HANDLE handle, bool read) : event(event), handle(handle), buffer(NULL), size(0), overlapped(NULL), read(read) { } ~PollData() { if (buffer) { delete[] buffer; buffer = NULL; } if (overlapped) { delete overlapped; overlapped = NULL; } } bool AllocBuffer(DWORD size) { if (buffer) { OLA_WARN << "Buffer already allocated"; return false; } buffer = new char[size]; this->size = size; return true; } bool CreateOverlapped() { if (overlapped) { OLA_WARN << "Overlapped already allocated"; return false; } overlapped = new OVERLAPPED; memset(overlapped, 0, sizeof(*overlapped)); overlapped->hEvent = event; return true; } HANDLE event; HANDLE handle; char* buffer; DWORD size; OVERLAPPED* overlapped; bool read; }; void CancelIOs(vector* data) { vector::iterator iter = data->begin(); for (; iter != data->end(); ++iter) { PollData* poll_data = *iter; if (poll_data->overlapped) { CancelIo(poll_data->handle); } } } bool WindowsPoller::Poll(TimeoutManager *timeout_manager, const TimeInterval &poll_interval) { TimeInterval sleep_interval = poll_interval; TimeStamp now; m_clock->CurrentMonotonicTime(&now); TimeInterval next_event_in = timeout_manager->ExecuteTimeouts(&now); if (!next_event_in.IsZero()) { sleep_interval = std::min(next_event_in, sleep_interval); } // take care of stats accounting if (m_wake_up_time.IsSet()) { TimeInterval loop_time = now - m_wake_up_time; OLA_DEBUG << "ss process time was " << loop_time.ToString(); if (m_loop_time) (*m_loop_time) += loop_time.AsInt(); if (m_loop_iterations) (*m_loop_iterations)++; } int ms_to_sleep = sleep_interval.InMilliSeconds(); // Prepare events vector events; vector data; vector event_holders; DescriptorMap::iterator next, iter = m_descriptor_map.begin(); bool success = true; // We're not using a for loop here since we might call RemoveDescriptor(), // thereby invalidating the 'iter' iterator. while (iter != m_descriptor_map.end()) { next = iter; ++next; WindowsPollerDescriptor* descriptor = iter->second; PollData* poll_data = NULL; DWORD result = 0; DescriptorHandle descriptor_handle; EventHolder* event_holder; switch (descriptor->type) { case PIPE_DESCRIPTOR: if (descriptor->connected_descriptor) { descriptor_handle = descriptor->connected_descriptor->ReadDescriptor(); event_holder = new EventHolder(); poll_data = new PollData(*event_holder, ToHandle(descriptor_handle), true); poll_data->AllocBuffer(ASYNC_DATA_BUFFER_SIZE); poll_data->CreateOverlapped(); success = ReadFile(poll_data->handle, poll_data->buffer, poll_data->size, &(poll_data->size), poll_data->overlapped); result = GetLastError(); if (success || result == ERROR_IO_PENDING) { data.push_back(poll_data); events.push_back(poll_data->event); event_holders.push_back(event_holder); } else if (!success && (result != ERROR_IO_PENDING)) { if (result == ERROR_BROKEN_PIPE) { OLA_DEBUG << "Broken pipe: " << ToHandle(descriptor_handle); // Pipe was closed, so close the descriptor ConnectedDescriptor::OnCloseCallback *on_close = descriptor->connected_descriptor->TransferOnClose(); if (on_close) on_close->Run(); if (descriptor->connected_descriptor) { if (descriptor->delete_connected_on_close) { if (RemoveReadDescriptor(descriptor->connected_descriptor) && m_export_map) { (*m_export_map->GetIntegerVar( K_CONNECTED_DESCRIPTORS_VAR))--; } delete descriptor->connected_descriptor; descriptor->connected_descriptor = NULL; } } delete poll_data; delete event_holder; } else { OLA_WARN << "ReadFile failed with " << result << " for " << ToHandle(descriptor_handle); delete poll_data; delete event_holder; } } } if (descriptor->write_descriptor) { descriptor_handle = descriptor->write_descriptor->WriteDescriptor(); event_holder = new EventHolder(); poll_data = new PollData(*event_holder, ToHandle(descriptor_handle), false); poll_data->AllocBuffer(1); poll_data->CreateOverlapped(); success = WriteFile(poll_data->handle, poll_data->buffer, poll_data->size, &(poll_data->size), poll_data->overlapped); result = GetLastError(); if (success || (result == ERROR_IO_PENDING)) { data.push_back(poll_data); events.push_back(poll_data->event); event_holders.push_back(event_holder); } else if (result == ERROR_BROKEN_PIPE) { OLA_DEBUG << "Broken pipe: " << ToHandle(descriptor_handle); // Pipe was closed, so close the descriptor descriptor->write_descriptor = NULL; delete poll_data; delete event_holder; } else { OLA_WARN << "WriteFile failed with " << result << " for " << ToHandle(descriptor_handle); delete poll_data; delete event_holder; } } break; case SOCKET_DESCRIPTOR: if (descriptor->connected_descriptor || descriptor->read_descriptor) { // select() for readable events if (descriptor->connected_descriptor) { descriptor_handle = descriptor->connected_descriptor->ReadDescriptor(); } else { descriptor_handle = descriptor->read_descriptor->ReadDescriptor(); } event_holder = new EventHolder(); poll_data = new PollData(*event_holder, ToHandle(descriptor_handle), true); if (WSAEventSelect(ToFD(descriptor_handle), *event_holder, FD_READ | FD_CLOSE | FD_ACCEPT) != 0) { OLA_WARN << "WSAEventSelect failed with " << WSAGetLastError(); delete poll_data; delete event_holder; } else { data.push_back(poll_data); events.push_back(poll_data->event); event_holders.push_back(event_holder); } } if (descriptor->write_descriptor) { // select() for writeable events descriptor_handle = descriptor->write_descriptor->WriteDescriptor(); event_holder = new EventHolder(); poll_data = new PollData(*event_holder, ToHandle(descriptor_handle), false); if (WSAEventSelect(ToFD(descriptor_handle), *event_holder, FD_WRITE | FD_CLOSE | FD_CONNECT) != 0) { OLA_WARN << "WSAEventSelect failed with " << WSAGetLastError(); delete poll_data; delete event_holder; } else { data.push_back(poll_data); events.push_back(poll_data->event); event_holders.push_back(event_holder); } } break; default: OLA_WARN << "Descriptor type not implemented: " << descriptor->type; break; } iter = next; } bool return_value = true; // Wait for events or timeout if (events.size() > 0) { DWORD result = WaitForMultipleObjectsEx(events.size(), events.data(), FALSE, ms_to_sleep, TRUE); CancelIOs(&data); if (result == WAIT_TIMEOUT) { m_clock->CurrentMonotonicTime(&m_wake_up_time); timeout_manager->ExecuteTimeouts(&m_wake_up_time); // We can't return here since any of the cancelled IO calls still might // have succeeded. } else if (result == WAIT_FAILED) { OLA_WARN << "WaitForMultipleObjectsEx failed with " << GetLastError(); return_value = false; // We can't return here since any of the cancelled IO calls still might // have succeeded. } else if ((result >= WAIT_OBJECT_0) && (result < (WAIT_OBJECT_0 + events.size()))) { do { DWORD index = result - WAIT_OBJECT_0; PollData* poll_data = data[index]; HandleWakeup(poll_data); events.erase(events.begin() + index); data.erase(data.begin() + index); event_holders.erase(event_holders.begin() + index); result = WaitForMultipleObjectsEx(events.size(), events.data(), FALSE, 0, TRUE); } while ((result >= WAIT_OBJECT_0) && (result < (WAIT_OBJECT_0 + events.size()))); } else { OLA_WARN << "Unhandled return value from WaitForMultipleObjectsEx: " << result; } } else { Sleep(ms_to_sleep); CancelIOs(&data); } m_clock->CurrentMonotonicTime(&m_wake_up_time); timeout_manager->ExecuteTimeouts(&m_wake_up_time); FinalCheckIOs(data); // Loop through all descriptors again and look for any with pending data DescriptorMap::iterator map_iter = m_descriptor_map.begin(); for (; map_iter != m_descriptor_map.end(); ++map_iter) { WindowsPollerDescriptor* descriptor = map_iter->second; if (!descriptor->connected_descriptor) { continue; } if (descriptor->type != PIPE_DESCRIPTOR) { continue; } DescriptorHandle handle = descriptor->connected_descriptor->ReadDescriptor(); if (*handle.m_async_data_size > 0) { descriptor->connected_descriptor->PerformRead(); } } STLDeleteElements(&m_orphaned_descriptors); STLDeleteElements(&data); STLDeleteElements(&event_holders); m_clock->CurrentMonotonicTime(&m_wake_up_time); timeout_manager->ExecuteTimeouts(&m_wake_up_time); return return_value; } ////////////////////////////////////////////////////////////////////////////// std::pair WindowsPoller::LookupOrCreateDescriptor(void* handle) { pair result = m_descriptor_map.insert( DescriptorMap::value_type(handle, NULL)); bool new_descriptor = result.second; if (new_descriptor) { result.first->second = new WindowsPollerDescriptor(); OLA_DEBUG << "Created WindowsPollerDescriptor " << result.first->second << " for handle " << handle; } return std::make_pair(result.first->second, new_descriptor); } bool WindowsPoller::RemoveDescriptor(const DescriptorHandle &handle, int flag, bool warn_on_missing) { if (!handle.IsValid()) { OLA_WARN << "Attempt to remove an invalid file descriptor"; return false; } WindowsPollerDescriptor *descriptor = STLFindOrNull(m_descriptor_map, ToHandle(handle)); if (!descriptor) { if (warn_on_missing) { OLA_WARN << "Couldn't find WindowsPollerDescriptor for " << handle; } return false; } if (flag & FLAG_READ) { descriptor->connected_descriptor = NULL; descriptor->read_descriptor = NULL; } else if (flag & FLAG_WRITE) { descriptor->write_descriptor = NULL; } descriptor->flags &= ~flag; if (descriptor->flags == 0) { m_orphaned_descriptors.push_back( STLLookupAndRemovePtr(&m_descriptor_map, ToHandle(handle))); } return true; } void WindowsPoller::HandleWakeup(PollData* data) { DescriptorMap::iterator iter = m_descriptor_map.find(data->handle); if (iter == m_descriptor_map.end()) { OLA_WARN << "Descriptor not found for handle " << data->handle; return; } WindowsPollerDescriptor* descriptor = iter->second; switch (descriptor->type) { case PIPE_DESCRIPTOR: { if (!data->overlapped) { OLA_WARN << "No overlapped entry for pipe descriptor"; return; } if (data->read && descriptor->connected_descriptor) { if (!descriptor->connected_descriptor->ValidReadDescriptor()) { RemoveDescriptor(descriptor->connected_descriptor->ReadDescriptor(), FLAG_READ, false); return; } DescriptorHandle handle = descriptor->connected_descriptor->ReadDescriptor(); DWORD bytes_transferred = 0; if (!GetOverlappedResult(data->handle, data->overlapped, &bytes_transferred, TRUE)) { if (GetLastError() != ERROR_OPERATION_ABORTED) { OLA_WARN << "GetOverlappedResult failed with " << GetLastError(); return; } } uint32_t to_copy = std::min(static_cast(bytes_transferred), (ASYNC_DATA_BUFFER_SIZE - *handle.m_async_data_size)); if (to_copy < bytes_transferred) { OLA_WARN << "Pipe descriptor has lost data"; } memcpy(&(handle.m_async_data[*handle.m_async_data_size]), data->buffer, to_copy); *handle.m_async_data_size += to_copy; if (*handle.m_async_data_size > 0) { descriptor->connected_descriptor->PerformRead(); } } else if (!data->read && descriptor->write_descriptor) { OLA_WARN << "Write wakeup"; if (!descriptor->write_descriptor->ValidWriteDescriptor()) { RemoveDescriptor(descriptor->write_descriptor->WriteDescriptor(), FLAG_WRITE, false); return; } descriptor->write_descriptor->PerformWrite(); } else { OLA_WARN << "Overlapped wakeup with data mismatch"; } } break; case SOCKET_DESCRIPTOR: { WSANETWORKEVENTS events; if (WSAEnumNetworkEvents(reinterpret_cast(data->handle), data->event, & events) != 0) { OLA_WARN << "WSAEnumNetworkEvents failed with " << WSAGetLastError(); } else { if (events.lNetworkEvents & (FD_READ | FD_ACCEPT)) { if (descriptor->connected_descriptor) { descriptor->connected_descriptor->PerformRead(); } else if (descriptor->read_descriptor) { descriptor->read_descriptor->PerformRead(); } else { OLA_WARN << "No read descriptor for socket with read event"; } } if (events.lNetworkEvents & (FD_WRITE | FD_CONNECT)) { if (descriptor->write_descriptor) { descriptor->write_descriptor->PerformWrite(); } else { OLA_WARN << "No write descriptor for socket with write event"; } } if (events.lNetworkEvents & FD_CLOSE) { if (descriptor->connected_descriptor) { ConnectedDescriptor::OnCloseCallback *on_close = descriptor->connected_descriptor->TransferOnClose(); if (on_close) on_close->Run(); if (descriptor->delete_connected_on_close) { if (RemoveReadDescriptor(descriptor->connected_descriptor) && m_export_map) { (*m_export_map->GetIntegerVar(K_CONNECTED_DESCRIPTORS_VAR))--; } delete descriptor->connected_descriptor; descriptor->connected_descriptor = NULL; } } else { OLA_WARN << "Close event for " << descriptor << " but no connected descriptor found"; } } } } break; default: OLA_WARN << "Unhandled descriptor type"; break; } } void WindowsPoller::FinalCheckIOs(vector data) { vector::iterator iter = data.begin(); for (; iter != data.end(); ++iter) { PollData* poll_data = *iter; if (!poll_data->overlapped) { // No overlapped input for this descriptor, skip it continue; } DWORD bytes_transferred = 0; if (!GetOverlappedResult(poll_data->handle, poll_data->overlapped, &bytes_transferred, TRUE)) { if (GetLastError() != ERROR_OPERATION_ABORTED) { OLA_WARN << "GetOverlappedResult failed with " << GetLastError(); return; } } if (bytes_transferred > 0) { DescriptorMap::iterator iter = m_descriptor_map.find(poll_data->handle); if (iter == m_descriptor_map.end()) { OLA_WARN << "Descriptor not found for handle " << poll_data->handle; return; } WindowsPollerDescriptor* descriptor = iter->second; DescriptorHandle handle = descriptor->connected_descriptor->ReadDescriptor(); uint32_t to_copy = std::min(static_cast(bytes_transferred), (ASYNC_DATA_BUFFER_SIZE - *handle.m_async_data_size)); if (to_copy < bytes_transferred) { OLA_WARN << "Pipe descriptor has lost data"; } memcpy(&(handle.m_async_data[*handle.m_async_data_size]), poll_data->buffer, to_copy); *handle.m_async_data_size += to_copy; descriptor->connected_descriptor->PerformRead(); } } } } // namespace io } // namespace ola ola-0.10.9/common/io/IOStackTest.cpp0000664000175000017500000001424514376533110014050 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * IOStackTest.cpp * Test fixture for the IOStack class. * Copyright (C) 2013 Simon Newton */ #include #include #include #include #include "ola/Logging.h" #include "ola/io/IOStack.h" #include "ola/io/IOQueue.h" #include "ola/io/MemoryBlockPool.h" #include "ola/testing/TestUtils.h" using ola::io::IOStack; using ola::io::IOQueue; using ola::io::IOVec; using ola::io::MemoryBlockPool; using std::string; class IOStackTest: public CppUnit::TestFixture { public: CPPUNIT_TEST_SUITE(IOStackTest); CPPUNIT_TEST(testBasicWrite); CPPUNIT_TEST(testBlockOverflow); CPPUNIT_TEST(testIOVec); CPPUNIT_TEST(testAppendToQueue); CPPUNIT_TEST(testBlockReuse); CPPUNIT_TEST_SUITE_END(); public: void testBasicWrite(); void testBlockOverflow(); void testIOVec(); void testAppendToQueue(); void testBlockReuse(); private: unsigned int SumLengthOfIOVec(const struct IOVec *iov, int iocnt); }; CPPUNIT_TEST_SUITE_REGISTRATION(IOStackTest); /** * Sum up the length of data in a IOVec */ unsigned int IOStackTest::SumLengthOfIOVec(const struct IOVec *iov, int iocnt) { unsigned int sum = 0; for (int i = 0; i < iocnt; iov++, i++) sum += iov->iov_len; return sum; } /* * Check that basic prepending works. */ void IOStackTest::testBasicWrite() { IOStack stack; OLA_ASSERT_EQ(0u, stack.Size()); OLA_ASSERT_TRUE(stack.Empty()); uint8_t data1[] = {0, 1}; uint8_t data2[] = {2}; uint8_t data3[] = {3, 4}; stack.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(2u, stack.Size()); stack.Write(data2, sizeof(data2)); OLA_ASSERT_EQ(3u, stack.Size()); stack.Write(data3, sizeof(data3)); OLA_ASSERT_EQ(5u, stack.Size()); std::ostringstream str; stack.Dump(&str); OLA_ASSERT_EQ( string("03 04 02 00 01 .....\n"), str.str()); unsigned int data_size = stack.Size(); uint8_t output[data_size]; OLA_ASSERT_EQ(data_size, stack.Read(output, data_size)); const uint8_t expected_data[] = {3, 4, 2, 0, 1}; OLA_ASSERT_DATA_EQUALS(expected_data, sizeof(expected_data), output, data_size); } /* * Check that overflowing blocks works */ void IOStackTest::testBlockOverflow() { // block size of 4 MemoryBlockPool pool(4); IOStack stack(&pool); uint8_t data1[] = {0, 1, 2, 3, 4}; uint8_t data2[] = {5, 6, 7, 8, 9}; uint8_t data3[] = {0xa, 0xb, 0xc, 0xd, 0xe}; stack.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(5u, stack.Size()); stack.Write(data2, sizeof(data2)); OLA_ASSERT_EQ(10u, stack.Size()); stack.Write(data3, sizeof(data3)); OLA_ASSERT_EQ(15u, stack.Size()); unsigned int data_size = stack.Size(); uint8_t output[data_size]; OLA_ASSERT_EQ(data_size, stack.Read(output, data_size)); const uint8_t expected_data[] = {0xa, 0xb, 0xc, 0xd, 0xe, 5, 6, 7, 8, 9, 0, 1, 2, 3, 4}; OLA_ASSERT_DATA_EQUALS(expected_data, sizeof(expected_data), output, data_size); } /** * Test getting / setting IOVec work. */ void IOStackTest::testIOVec() { MemoryBlockPool pool(4); IOStack stack(&pool); uint8_t data1[] = {5, 6, 7, 8}; uint8_t data2[] = {0, 1, 2, 3, 4}; stack.Write(data1, sizeof(data1)); stack.Write(data2, sizeof(data2)); OLA_ASSERT_EQ(9u, stack.Size()); OLA_ASSERT_FALSE(stack.Empty()); int iocnt; const struct IOVec *vector = stack.AsIOVec(&iocnt); OLA_ASSERT_EQ(9u, SumLengthOfIOVec(vector, iocnt)); OLA_ASSERT_EQ(3, iocnt); stack.FreeIOVec(vector); } /** * Test appending IOStacks to an IOQueue works. */ void IOStackTest::testAppendToQueue() { MemoryBlockPool pool(4); IOStack stack(&pool); uint8_t data1[] = {2, 1, 0}; uint8_t data2[] = {6, 5, 4, 3}; stack.Write(data1, sizeof(data1)); stack.Write(data2, sizeof(data2)); OLA_ASSERT_EQ(7u, stack.Size()); IOQueue queue(&pool); stack.MoveToIOQueue(&queue); OLA_ASSERT_TRUE(stack.Empty()); OLA_ASSERT_EQ(7u, queue.Size()); uint8_t expected_data[] = {6, 5, 4, 3, 2, 1, 0}; uint8_t tmp_data[100]; unsigned int queue_size = queue.Peek(tmp_data, sizeof(tmp_data)); OLA_ASSERT_EQ(7u, queue_size); OLA_ASSERT_DATA_EQUALS(tmp_data, queue_size, expected_data, sizeof(expected_data)); // now add a second stack uint8_t data3[] = {0xb, 0xa}; uint8_t data4[] = {0xf, 0xe, 0xd, 0xc}; stack.Write(data3, sizeof(data3)); stack.Write(data4, sizeof(data4)); OLA_ASSERT_EQ(6u, stack.Size()); stack.MoveToIOQueue(&queue); OLA_ASSERT_TRUE(stack.Empty()); OLA_ASSERT_EQ(13u, queue.Size()); uint8_t expected_data2[] = {6, 5, 4, 3, 2, 1, 0, 0xf, 0xe, 0xd, 0xc, 0xb, 0xa}; queue_size = queue.Peek(tmp_data, sizeof(tmp_data)); OLA_ASSERT_EQ(13u, queue_size); OLA_ASSERT_DATA_EQUALS(tmp_data, queue_size, expected_data2, sizeof(expected_data2)); OLA_ASSERT_EQ(4u, pool.BlocksAllocated()); } /** * Confirm we re-use blocks */ void IOStackTest::testBlockReuse() { MemoryBlockPool pool(4); { IOStack stack(&pool); uint8_t data1[] = {6, 5, 3, 3, 2, 1, 0}; stack.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(7u, stack.Size()); } { IOStack stack(&pool); uint8_t data1[] = {0xf, 0xe, 0xd, 0xc, 0xb, 0xa}; stack.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(6u, stack.Size()); } OLA_ASSERT_EQ(2u, pool.BlocksAllocated()); pool.Purge(); OLA_ASSERT_EQ(0u, pool.BlocksAllocated()); } ola-0.10.9/common/io/ExtendedSerial.cpp0000664000175000017500000000726214376533110014614 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ExtendedSerial.cpp * The DMX through a UART plugin for ola * Copyright (C) 2011 Rui Barreiros * Copyright (C) 2014 Richard Ash */ #include "ola/io/ExtendedSerial.h" #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #ifdef HAVE_STROPTS_H // this provides ioctl() definition without conflicting with asm/termios.h #include #else // otherwise use the sys/ioctl.h version for newer Linux which has dropped the // stropts.h version // N.B. This will pull in the kernel definition of struct termios, which may // conflict with the libc version, so we wouldn't be able to use both in the // same file #ifdef HAVE_SYS_IOCTL_H #include #endif // HAVE_SYS_IOCTL_H #ifdef HAVE_ASM_TERMBITS_H #include #endif // HAVE_ASM_TERMBITS_H #endif // HAVE_STROPTS_H #if defined(HAVE_STROPTS_H) && defined(HAVE_ASM_TERMIOS_H) // use this non-standard termios for custom baud rates // // On newer Linux, this duplicates winsize and termio as they're also defined // in bits/ioctl-types.h, so only include this header if we also have the // stropts.h sourced version of ioctl() // // On mips architectures, sets some cpp macros which cause // (included by , used by ) to not define // ERANGE, EDOM, or EILSEQ, causing a spectacular compile failure there. // // Explicitly include now to avoid the issue. #include #include #endif // HAVE_ASM_TERMIOS_H #include namespace ola { namespace io { bool LinuxHelper::SetDmxBaud(int fd) { #if (defined(HAVE_STROPTS_H) || \ (defined(HAVE_SYS_IOCTL_H) && defined(HAVE_ASM_TERMBITS_H))) && \ defined(HAVE_TERMIOS2) static const int rate = 250000; struct termios2 tio; // linux-specific terminal stuff if (ioctl(fd, TCGETS2, &tio) < 0) { OLA_INFO << "Failed to get current serial port settings"; return false; } tio.c_cflag &= ~CBAUD; tio.c_cflag |= BOTHER; tio.c_ispeed = rate; tio.c_ospeed = rate; // set custom speed directly if (ioctl(fd, TCSETS2, &tio) < 0) { OLA_INFO << "Failed to update serial port settings"; return false; } if (LogLevel() >= OLA_LOG_INFO) { if (ioctl(fd, TCGETS2, &tio) < 0) { OLA_INFO << "Error getting altered settings from port"; } else { OLA_INFO << "Port speeds for " << fd << " are " << tio.c_ispeed << " in and " << tio.c_ospeed << " out"; } } return true; #else OLA_INFO << "Failed to set baud rate, due to missing " #if !defined(HAVE_STROPTS_H) << "stropts.h or " #endif #if !(defined(HAVE_SYS_IOCTL_H) && defined(HAVE_ASM_TERMBITS_H)) << "sys/ioctl.h or asm/termbits.h or " #endif << "termios2"; return false; (void) fd; #endif // (defined(HAVE_STROPTS_H) || // (defined(HAVE_SYS_IOCTL_H) && defined(HAVE_ASM_TERMBITS_H))) && // defined(HAVE_TERMIOS2) } } // namespace io } // namespace ola ola-0.10.9/common/io/SelectServer.cpp0000664000175000017500000002507114376533110014320 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SelectServer.cpp * Implementation of the SelectServer class * Copyright (C) 2005 Simon Newton */ #include "ola/io/SelectServer.h" #ifdef _WIN32 #include #else #include #endif // _WIN32 #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include #include #ifdef _WIN32 #include "common/io/WindowsPoller.h" #else #include "ola/base/Flags.h" #include "common/io/SelectPoller.h" #endif // _WIN32 #include "ola/io/Descriptor.h" #include "ola/Logging.h" #include "ola/network/Socket.h" #include "ola/stl/STLUtils.h" #ifdef HAVE_EPOLL #include "common/io/EPoller.h" DEFINE_default_bool(use_epoll, true, "Disable the use of epoll(), revert to select()"); #endif // HAVE_EPOLL #ifdef HAVE_KQUEUE #include "common/io/KQueuePoller.h" DEFINE_default_bool(use_kqueue, false, "Use kqueue() rather than select()"); #endif // HAVE_KQUEUE namespace ola { namespace io { using ola::Callback0; using ola::ExportMap; using ola::thread::timeout_id; using std::max; const TimeStamp SelectServer::empty_time; SelectServer::SelectServer(ExportMap *export_map, Clock *clock) : m_export_map(export_map), m_terminate(false), m_is_running(false), m_poll_interval(POLL_INTERVAL_SECOND, POLL_INTERVAL_USECOND), m_clock(clock), m_free_clock(false) { Options options; Init(options); } SelectServer::SelectServer(const Options &options) : m_export_map(options.export_map), m_terminate(false), m_is_running(false), m_poll_interval(POLL_INTERVAL_SECOND, POLL_INTERVAL_USECOND), m_clock(options.clock), m_free_clock(false) { Init(options); } SelectServer::~SelectServer() { DrainCallbacks(); STLDeleteElements(&m_loop_callbacks); if (m_free_clock) { delete m_clock; } } const TimeStamp *SelectServer::WakeUpTime() const { if (m_poller.get()) { return m_poller->WakeUpTime(); } else { return &empty_time; } } void SelectServer::Terminate() { if (m_is_running) { Execute(NewSingleCallback(this, &SelectServer::SetTerminate)); } } void SelectServer::SetDefaultInterval(const TimeInterval &poll_interval) { m_poll_interval = poll_interval; } void SelectServer::Run() { if (m_is_running) { OLA_FATAL << "SelectServer::Run() called recursively"; return; } m_is_running = true; m_terminate = false; while (!m_terminate) { // false indicates an error in CheckForEvents(); if (!CheckForEvents(m_poll_interval)) { break; } } m_is_running = false; } void SelectServer::RunOnce() { RunOnce(TimeInterval(0, 0)); } void SelectServer::RunOnce(const TimeInterval &block_interval) { m_is_running = true; CheckForEvents(block_interval); m_is_running = false; } bool SelectServer::AddReadDescriptor(ReadFileDescriptor *descriptor) { bool added = m_poller->AddReadDescriptor(descriptor); if (added && m_export_map) { (*m_export_map->GetIntegerVar(PollerInterface::K_READ_DESCRIPTOR_VAR))++; } return added; } bool SelectServer::AddReadDescriptor(ConnectedDescriptor *descriptor, bool delete_on_close) { bool added = m_poller->AddReadDescriptor(descriptor, delete_on_close); if (added && m_export_map) { (*m_export_map->GetIntegerVar( PollerInterface::K_CONNECTED_DESCRIPTORS_VAR))++; } return added; } void SelectServer::RemoveReadDescriptor(ReadFileDescriptor *descriptor) { if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "Removing an invalid file descriptor: " << descriptor; return; } bool removed = m_poller->RemoveReadDescriptor(descriptor); if (removed && m_export_map) { (*m_export_map->GetIntegerVar( PollerInterface::K_READ_DESCRIPTOR_VAR))--; } } void SelectServer::RemoveReadDescriptor(ConnectedDescriptor *descriptor) { if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "Removing an invalid file descriptor: " << descriptor; return; } bool removed = m_poller->RemoveReadDescriptor(descriptor); if (removed && m_export_map) { (*m_export_map->GetIntegerVar( PollerInterface::K_CONNECTED_DESCRIPTORS_VAR))--; } } bool SelectServer::AddWriteDescriptor(WriteFileDescriptor *descriptor) { bool added = m_poller->AddWriteDescriptor(descriptor); if (added && m_export_map) { (*m_export_map->GetIntegerVar(PollerInterface::K_WRITE_DESCRIPTOR_VAR))++; } return added; } void SelectServer::RemoveWriteDescriptor(WriteFileDescriptor *descriptor) { if (!descriptor->ValidWriteDescriptor()) { OLA_WARN << "Removing a closed descriptor"; return; } bool removed = m_poller->RemoveWriteDescriptor(descriptor); if (removed && m_export_map) { (*m_export_map->GetIntegerVar(PollerInterface::K_WRITE_DESCRIPTOR_VAR))--; } } timeout_id SelectServer::RegisterRepeatingTimeout( unsigned int ms, ola::Callback0 *callback) { return m_timeout_manager->RegisterRepeatingTimeout( TimeInterval(ms / 1000, ms % 1000 * 1000), callback); } timeout_id SelectServer::RegisterRepeatingTimeout( const TimeInterval &interval, ola::Callback0 *callback) { return m_timeout_manager->RegisterRepeatingTimeout(interval, callback); } timeout_id SelectServer::RegisterSingleTimeout( unsigned int ms, ola::SingleUseCallback0 *callback) { return m_timeout_manager->RegisterSingleTimeout( TimeInterval(ms / 1000, ms % 1000 * 1000), callback); } timeout_id SelectServer::RegisterSingleTimeout( const TimeInterval &interval, ola::SingleUseCallback0 *callback) { return m_timeout_manager->RegisterSingleTimeout(interval, callback); } void SelectServer::RemoveTimeout(timeout_id id) { return m_timeout_manager->CancelTimeout(id); } void SelectServer::RunInLoop(Callback0 *callback) { m_loop_callbacks.insert(callback); } void SelectServer::Execute(ola::BaseCallback0 *callback) { { ola::thread::MutexLocker locker(&m_incoming_mutex); m_incoming_callbacks.push_back(callback); } // kick select(), we do this even if we're in the same thread as select() is // called. If we don't do this there is a race condition because a callback // may be added just prior to select(). Without this kick, select() will // sleep for the poll_interval before executing the callback. uint8_t wake_up = 'a'; m_incoming_descriptor.Send(&wake_up, sizeof(wake_up)); } void SelectServer::DrainCallbacks() { Callbacks callbacks_to_run; while (true) { { ola::thread::MutexLocker locker(&m_incoming_mutex); if (m_incoming_callbacks.empty()) { return; } callbacks_to_run.swap(m_incoming_callbacks); } RunCallbacks(&callbacks_to_run); } } void SelectServer::Init(const Options &options) { if (!m_clock) { m_clock = new Clock; m_free_clock = true; } if (m_export_map) { m_export_map->GetIntegerVar(PollerInterface::K_READ_DESCRIPTOR_VAR); m_export_map->GetIntegerVar(PollerInterface::K_WRITE_DESCRIPTOR_VAR); m_export_map->GetIntegerVar(PollerInterface::K_CONNECTED_DESCRIPTORS_VAR); } m_timeout_manager.reset(new TimeoutManager(m_export_map, m_clock)); #ifdef _WIN32 m_poller.reset(new WindowsPoller(m_export_map, m_clock)); (void) options; #else #ifdef HAVE_EPOLL if (FLAGS_use_epoll && !options.force_select) { m_poller.reset(new EPoller(m_export_map, m_clock)); } if (m_export_map) { m_export_map->GetBoolVar("using-epoll")->Set(FLAGS_use_epoll); } #endif // HAVE_EPOLL #ifdef HAVE_KQUEUE bool using_kqueue = false; if (FLAGS_use_kqueue && !m_poller.get() && !options.force_select) { m_poller.reset(new KQueuePoller(m_export_map, m_clock)); using_kqueue = true; } if (m_export_map) { m_export_map->GetBoolVar("using-kqueue")->Set(using_kqueue); } #endif // HAVE_KQUEUE // Default to the SelectPoller if (!m_poller.get()) { m_poller.reset(new SelectPoller(m_export_map, m_clock)); } #endif // _WIN32 // TODO(simon): this should really be in an Init() method that returns a // bool. if (!m_incoming_descriptor.Init()) { OLA_FATAL << "Failed to init LoopbackDescriptor, Execute() won't work!"; } m_incoming_descriptor.SetOnData( ola::NewCallback(this, &SelectServer::DrainAndExecute)); AddReadDescriptor(&m_incoming_descriptor); } /* * One iteration of the event loop. * @return false on error, true on success. */ bool SelectServer::CheckForEvents(const TimeInterval &poll_interval) { LoopClosureSet::iterator loop_iter; for (loop_iter = m_loop_callbacks.begin(); loop_iter != m_loop_callbacks.end(); ++loop_iter) { (*loop_iter)->Run(); } TimeInterval default_poll_interval = poll_interval; // if we've been told to terminate, make this very short. if (m_terminate) { default_poll_interval = std::min( default_poll_interval, TimeInterval(0, 1000)); } return m_poller->Poll(m_timeout_manager.get(), default_poll_interval); } void SelectServer::DrainAndExecute() { while (m_incoming_descriptor.DataRemaining()) { // try to get everything in one read uint8_t message[100]; unsigned int size; m_incoming_descriptor.Receive(reinterpret_cast(&message), sizeof(message), size); } // We can't hold the mutex while we execute the callback, so instead we swap // out the vector under a lock, release the lock and then run all the // callbacks. Callbacks callbacks_to_run; { thread::MutexLocker lock(&m_incoming_mutex); callbacks_to_run.swap(m_incoming_callbacks); } RunCallbacks(&callbacks_to_run); } void SelectServer::RunCallbacks(Callbacks *callbacks) { Callbacks::iterator iter = callbacks->begin(); for (; iter != callbacks->end(); ++iter) { if (*iter) { (*iter)->Run(); } } callbacks->clear(); } } // namespace io } // namespace ola ola-0.10.9/common/io/EPoller.cpp0000664000175000017500000003210114376533110013244 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * EPoller.cpp * A Poller which uses epoll() * Copyright (C) 2013 Simon Newton */ #include "common/io/EPoller.h" #include #include #include #include #include #include #include #include "ola/Clock.h" #include "ola/Logging.h" #include "ola/base/Macro.h" #include "ola/io/Descriptor.h" #include "ola/stl/STLUtils.h" namespace ola { namespace io { using std::pair; /* * Represents a FD */ class EPollData { public: EPollData() : events(0), read_descriptor(NULL), write_descriptor(NULL), connected_descriptor(NULL), delete_connected_on_close(false) { } void Reset() { events = 0; read_descriptor = NULL; write_descriptor = NULL; connected_descriptor = NULL; delete_connected_on_close = false; } uint32_t events; ReadFileDescriptor *read_descriptor; WriteFileDescriptor *write_descriptor; ConnectedDescriptor *connected_descriptor; bool delete_connected_on_close; }; namespace { /* * Add the fd to the epoll_fd. * descriptor is the user data to associated with the event */ bool AddEvent(int epoll_fd, int fd, EPollData *descriptor) { epoll_event event; event.events = descriptor->events; event.data.ptr = descriptor; OLA_DEBUG << "EPOLL_CTL_ADD " << fd << ", events " << std::hex << event.events << ", descriptor: " << descriptor; int r = epoll_ctl(epoll_fd, EPOLL_CTL_ADD, fd, &event); if (r) { OLA_WARN << "EPOLL_CTL_ADD " << fd << " failed: " << strerror(errno); return false; } return true; } /* * Update the fd in the epoll event set * descriptor is the user data to associated with the event */ bool UpdateEvent(int epoll_fd, int fd, EPollData *descriptor) { epoll_event event; event.events = descriptor->events; event.data.ptr = descriptor; OLA_DEBUG << "EPOLL_CTL_MOD " << fd << ", events " << std::hex << event.events << ", descriptor: " << descriptor; int r = epoll_ctl(epoll_fd, EPOLL_CTL_MOD, fd, &event); if (r) { OLA_WARN << "EPOLL_CTL_MOD " << fd << " failed: " << strerror(errno); return false; } return true; } /* * Remove the fd from the epoll fd */ bool RemoveEvent(int epoll_fd, int fd) { epoll_event event; OLA_DEBUG << "EPOLL_CTL_DEL " << fd; int r = epoll_ctl(epoll_fd, EPOLL_CTL_DEL, fd, &event); if (r) { OLA_WARN << "EPOLL_CTL_DEL " << fd << " failed: " << strerror(errno); return false; } return true; } } // namespace /** * @brief The maximum number of events to return in one epoll cycle */ const int EPoller::MAX_EVENTS = 10; /** * @brief the EPOLL flags used for read descriptors. */ const int EPoller::READ_FLAGS = EPOLLIN | EPOLLRDHUP; /** * @brief The number of pre-allocated EPollData to have. */ const unsigned int EPoller::MAX_FREE_DESCRIPTORS = 10; EPoller::EPoller(ExportMap *export_map, Clock* clock) : m_export_map(export_map), m_loop_iterations(NULL), m_loop_time(NULL), m_epoll_fd(INVALID_DESCRIPTOR), m_clock(clock) { if (m_export_map) { m_loop_time = m_export_map->GetCounterVar(K_LOOP_TIME); m_loop_iterations = m_export_map->GetCounterVar(K_LOOP_COUNT); } m_epoll_fd = epoll_create1(EPOLL_CLOEXEC); if (m_epoll_fd < 0) { OLA_FATAL << "Failed to create new epoll instance"; } } EPoller::~EPoller() { if (m_epoll_fd != INVALID_DESCRIPTOR) { close(m_epoll_fd); } { DescriptorMap::iterator iter = m_descriptor_map.begin(); for (; iter != m_descriptor_map.end(); ++iter) { if (iter->second->delete_connected_on_close) { delete iter->second->connected_descriptor; } delete iter->second; } } DescriptorList::iterator iter = m_orphaned_descriptors.begin(); for (; iter != m_orphaned_descriptors.end(); ++iter) { if ((*iter)->delete_connected_on_close) { delete (*iter)->connected_descriptor; } delete *iter; } STLDeleteElements(&m_free_descriptors); } bool EPoller::AddReadDescriptor(ReadFileDescriptor *descriptor) { if (m_epoll_fd == INVALID_DESCRIPTOR) { return false; } if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "AddReadDescriptor called with invalid descriptor"; return false; } pair result = LookupOrCreateDescriptor( descriptor->ReadDescriptor()); if (result.first->events & READ_FLAGS) { OLA_WARN << "Descriptor " << descriptor->ReadDescriptor() << " already in read set"; return false; } result.first->events |= READ_FLAGS; result.first->read_descriptor = descriptor; if (result.second) { return AddEvent(m_epoll_fd, descriptor->ReadDescriptor(), result.first); } else { return UpdateEvent(m_epoll_fd, descriptor->ReadDescriptor(), result.first); } } bool EPoller::AddReadDescriptor(ConnectedDescriptor *descriptor, bool delete_on_close) { if (m_epoll_fd == INVALID_DESCRIPTOR) { return false; } if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "AddReadDescriptor called with invalid descriptor"; return false; } pair result = LookupOrCreateDescriptor( descriptor->ReadDescriptor()); if (result.first->events & READ_FLAGS) { OLA_WARN << "Descriptor " << descriptor->ReadDescriptor() << " already in read set"; return false; } result.first->events |= READ_FLAGS; result.first->connected_descriptor = descriptor; result.first->delete_connected_on_close = delete_on_close; if (result.second) { return AddEvent(m_epoll_fd, descriptor->ReadDescriptor(), result.first); } else { return UpdateEvent(m_epoll_fd, descriptor->ReadDescriptor(), result.first); } } bool EPoller::RemoveReadDescriptor(ReadFileDescriptor *descriptor) { return RemoveDescriptor(descriptor->ReadDescriptor(), READ_FLAGS, true); } bool EPoller::RemoveReadDescriptor(ConnectedDescriptor *descriptor) { return RemoveDescriptor(descriptor->ReadDescriptor(), READ_FLAGS, true); } bool EPoller::AddWriteDescriptor(WriteFileDescriptor *descriptor) { if (m_epoll_fd == INVALID_DESCRIPTOR) { return false; } if (!descriptor->ValidWriteDescriptor()) { OLA_WARN << "AddWriteDescriptor called with invalid descriptor"; return false; } pair result = LookupOrCreateDescriptor( descriptor->WriteDescriptor()); if (result.first->events & EPOLLOUT) { OLA_WARN << "Descriptor " << descriptor->WriteDescriptor() << " already in write set"; return false; } result.first->events |= EPOLLOUT; result.first->write_descriptor = descriptor; if (result.second) { return AddEvent(m_epoll_fd, descriptor->WriteDescriptor(), result.first); } else { return UpdateEvent(m_epoll_fd, descriptor->WriteDescriptor(), result.first); } } bool EPoller::RemoveWriteDescriptor(WriteFileDescriptor *descriptor) { return RemoveDescriptor(descriptor->WriteDescriptor(), EPOLLOUT, true); } bool EPoller::Poll(TimeoutManager *timeout_manager, const TimeInterval &poll_interval) { if (m_epoll_fd == INVALID_DESCRIPTOR) { return false; } epoll_event events[MAX_EVENTS]; TimeInterval sleep_interval = poll_interval; TimeStamp now; m_clock->CurrentMonotonicTime(&now); TimeInterval next_event_in = timeout_manager->ExecuteTimeouts(&now); if (!next_event_in.IsZero()) { sleep_interval = std::min(next_event_in, sleep_interval); } // take care of stats accounting if (m_wake_up_time.IsSet()) { TimeInterval loop_time = now - m_wake_up_time; OLA_DEBUG << "ss process time was " << loop_time.ToString(); if (m_loop_time) (*m_loop_time) += loop_time.AsInt(); if (m_loop_iterations) (*m_loop_iterations)++; } int ms_to_sleep = sleep_interval.InMilliSeconds(); // If we haven't been asked to wait as part of the poll interval, then don't // wait in the epoll to allow for fast streaming int ready = epoll_wait(m_epoll_fd, reinterpret_cast(&events), MAX_EVENTS, ms_to_sleep ? ms_to_sleep : 0); if (ready == 0) { m_clock->CurrentMonotonicTime(&m_wake_up_time); timeout_manager->ExecuteTimeouts(&m_wake_up_time); return true; } else if (ready == -1) { if (errno == EINTR) return true; OLA_WARN << "epoll() error, " << strerror(errno); return false; } m_clock->CurrentMonotonicTime(&m_wake_up_time); for (int i = 0; i < ready; i++) { EPollData *descriptor = reinterpret_cast( events[i].data.ptr); CheckDescriptor(&events[i], descriptor); } // Now that we're out of the callback phase, clean up descriptors that were // removed. DescriptorList::iterator iter = m_orphaned_descriptors.begin(); for (; iter != m_orphaned_descriptors.end(); ++iter) { if (m_free_descriptors.size() == MAX_FREE_DESCRIPTORS) { delete *iter; } else { (*iter)->Reset(); m_free_descriptors.push_back(*iter); } } m_orphaned_descriptors.clear(); m_clock->CurrentMonotonicTime(&m_wake_up_time); timeout_manager->ExecuteTimeouts(&m_wake_up_time); return true; } /* * Check all the registered descriptors: * - Execute the callback for descriptors with data * - Execute OnClose if a remote end closed the connection */ void EPoller::CheckDescriptor(struct epoll_event *event, EPollData *epoll_data) { if (event->events & (EPOLLHUP | EPOLLRDHUP)) { if (epoll_data->read_descriptor) { epoll_data->read_descriptor->PerformRead(); } else if (epoll_data->write_descriptor) { epoll_data->write_descriptor->PerformWrite(); } else if (epoll_data->connected_descriptor) { ConnectedDescriptor::OnCloseCallback *on_close = epoll_data->connected_descriptor->TransferOnClose(); if (on_close) on_close->Run(); // At this point the descriptor may be sitting in the orphan list if the // OnClose handler called into RemoveReadDescriptor() if (epoll_data->delete_connected_on_close && epoll_data->connected_descriptor) { bool removed = RemoveDescriptor( epoll_data->connected_descriptor->ReadDescriptor(), READ_FLAGS, false); if (removed && m_export_map) { (*m_export_map->GetIntegerVar(K_CONNECTED_DESCRIPTORS_VAR))--; } delete epoll_data->connected_descriptor; epoll_data->connected_descriptor = NULL; } } else { OLA_FATAL << "HUP event for " << epoll_data << " but no write or connected descriptor found!"; } event->events = 0; } if (event->events & EPOLLIN) { if (epoll_data->read_descriptor) { epoll_data->read_descriptor->PerformRead(); } else if (epoll_data->connected_descriptor) { epoll_data->connected_descriptor->PerformRead(); } } if (event->events & EPOLLOUT) { // epoll_data->write_descriptor may be null here if this descriptor was // removed between when kevent returned and now. if (epoll_data->write_descriptor) { epoll_data->write_descriptor->PerformWrite(); } } } std::pair EPoller::LookupOrCreateDescriptor(int fd) { pair result = m_descriptor_map.insert( DescriptorMap::value_type(fd, NULL)); bool new_descriptor = result.second; if (new_descriptor) { if (m_free_descriptors.empty()) { result.first->second = new EPollData(); } else { result.first->second = m_free_descriptors.back(); m_free_descriptors.pop_back(); } } return std::make_pair(result.first->second, new_descriptor); } bool EPoller::RemoveDescriptor(int fd, int event, bool warn_on_missing) { if (fd == INVALID_DESCRIPTOR) { OLA_WARN << "Attempt to remove an invalid file descriptor"; return false; } EPollData *epoll_data = STLFindOrNull(m_descriptor_map, fd); if (!epoll_data) { if (warn_on_missing) { OLA_WARN << "Couldn't find EPollData for " << fd; } return false; } epoll_data->events &= (~event); if (event & EPOLLOUT) { epoll_data->write_descriptor = NULL; } else if (event & EPOLLIN) { epoll_data->read_descriptor = NULL; epoll_data->connected_descriptor = NULL; } if (epoll_data->events == 0) { RemoveEvent(m_epoll_fd, fd); m_orphaned_descriptors.push_back( STLLookupAndRemovePtr(&m_descriptor_map, fd)); } else { return UpdateEvent(m_epoll_fd, fd, epoll_data); } return true; } } // namespace io } // namespace ola ola-0.10.9/common/io/TimeoutManagerTest.cpp0000664000175000017500000001736514376533110015502 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TimeoutManagerTest.cpp * Test fixture for the TimeoutManager class. * Copyright (C) 2013 Simon Newton */ #include #include #include "common/io/TimeoutManager.h" #include "ola/Callback.h" #include "ola/Clock.h" #include "ola/ExportMap.h" #include "ola/Logging.h" #include "ola/testing/TestUtils.h" using ola::ExportMap; using ola::MockClock; using ola::NewSingleCallback; using ola::NewCallback; using ola::TimeInterval; using ola::TimeStamp; using ola::io::TimeoutManager; using ola::thread::timeout_id; class TimeoutManagerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(TimeoutManagerTest); CPPUNIT_TEST(testSingleTimeouts); CPPUNIT_TEST(testRepeatingTimeouts); CPPUNIT_TEST(testAbortedRepeatingTimeouts); CPPUNIT_TEST(testPendingEventShutdown); CPPUNIT_TEST_SUITE_END(); public: void testSingleTimeouts(); void testRepeatingTimeouts(); void testAbortedRepeatingTimeouts(); void testPendingEventShutdown(); void HandleEvent(unsigned int event_id) { m_event_counters[event_id]++; } bool HandleRepeatingEvent(unsigned int event_id) { m_event_counters[event_id]++; return true; } // returns false after the second event. bool HandleAbortedEvent(unsigned int event_id) { m_event_counters[event_id]++; return m_event_counters[event_id] < 2; } unsigned int GetEventCounter(unsigned int event_id) { return m_event_counters[event_id]; } private: ExportMap m_map; std::map m_event_counters; }; CPPUNIT_TEST_SUITE_REGISTRATION(TimeoutManagerTest); /* * Check RegisterSingleTimeout works. */ void TimeoutManagerTest::testSingleTimeouts() { MockClock clock; TimeoutManager timeout_manager(&m_map, &clock); OLA_ASSERT_FALSE(timeout_manager.EventsPending()); TimeInterval timeout_interval(1, 0); timeout_id id1 = timeout_manager.RegisterSingleTimeout( timeout_interval, NewSingleCallback(this, &TimeoutManagerTest::HandleEvent, 1u)); OLA_ASSERT_NE(id1, ola::thread::INVALID_TIMEOUT); TimeStamp last_checked_time; clock.AdvanceTime(0, 1); // Small offset to work around timer precision clock.CurrentMonotonicTime(&last_checked_time); TimeInterval next = timeout_manager.ExecuteTimeouts(&last_checked_time); OLA_ASSERT_EQ(0u, GetEventCounter(1)); OLA_ASSERT_LT(next, timeout_interval); clock.AdvanceTime(0, 500000); clock.CurrentMonotonicTime(&last_checked_time); next = timeout_manager.ExecuteTimeouts(&last_checked_time); OLA_ASSERT_EQ(0u, GetEventCounter(1)); OLA_ASSERT_LT(next, TimeInterval(0, 500000)); clock.AdvanceTime(0, 500000); clock.CurrentMonotonicTime(&last_checked_time); next = timeout_manager.ExecuteTimeouts(&last_checked_time); OLA_ASSERT_TRUE(next.IsZero()); OLA_ASSERT_EQ(1u, GetEventCounter(1)); OLA_ASSERT_FALSE(timeout_manager.EventsPending()); // now add another timeout and then remove it timeout_id id2 = timeout_manager.RegisterSingleTimeout( timeout_interval, NewSingleCallback(this, &TimeoutManagerTest::HandleEvent, 2u)); OLA_ASSERT_NE(id2, ola::thread::INVALID_TIMEOUT); OLA_ASSERT_TRUE(timeout_manager.EventsPending()); OLA_ASSERT_EQ(0u, GetEventCounter(2)); timeout_manager.CancelTimeout(id2); clock.AdvanceTime(1, 0); clock.CurrentMonotonicTime(&last_checked_time); next = timeout_manager.ExecuteTimeouts(&last_checked_time); OLA_ASSERT_FALSE(timeout_manager.EventsPending()); OLA_ASSERT_EQ(0u, GetEventCounter(2)); } /* * Check RegisterRepeatingTimeout works. */ void TimeoutManagerTest::testRepeatingTimeouts() { MockClock clock; TimeoutManager timeout_manager(&m_map, &clock); OLA_ASSERT_FALSE(timeout_manager.EventsPending()); TimeInterval timeout_interval(1, 0); timeout_id id1 = timeout_manager.RegisterRepeatingTimeout( timeout_interval, NewCallback(this, &TimeoutManagerTest::HandleRepeatingEvent, 1u)); OLA_ASSERT_NE(id1, ola::thread::INVALID_TIMEOUT); TimeStamp last_checked_time; clock.AdvanceTime(0, 1); // Small offset to work around timer precision clock.CurrentMonotonicTime(&last_checked_time); TimeInterval next = timeout_manager.ExecuteTimeouts(&last_checked_time); OLA_ASSERT_EQ(0u, GetEventCounter(1)); OLA_ASSERT_LT(next, timeout_interval); clock.AdvanceTime(0, 500000); clock.CurrentMonotonicTime(&last_checked_time); next = timeout_manager.ExecuteTimeouts(&last_checked_time); OLA_ASSERT_EQ(0u, GetEventCounter(1)); OLA_ASSERT_LT(next, TimeInterval(0, 500000)); clock.AdvanceTime(0, 500000); clock.CurrentMonotonicTime(&last_checked_time); next = timeout_manager.ExecuteTimeouts(&last_checked_time); OLA_ASSERT_LTE(next, timeout_interval); OLA_ASSERT_EQ(1u, GetEventCounter(1)); OLA_ASSERT_TRUE(timeout_manager.EventsPending()); // fire the event again clock.AdvanceTime(1, 0); clock.CurrentMonotonicTime(&last_checked_time); next = timeout_manager.ExecuteTimeouts(&last_checked_time); OLA_ASSERT_LTE(next, timeout_interval); OLA_ASSERT_EQ(2u, GetEventCounter(1)); // cancel the event timeout_manager.CancelTimeout(id1); clock.AdvanceTime(1, 0); clock.CurrentMonotonicTime(&last_checked_time); next = timeout_manager.ExecuteTimeouts(&last_checked_time); OLA_ASSERT_TRUE(next.IsZero()); OLA_ASSERT_EQ(2u, GetEventCounter(1)); } /* * Check returning false from a repeating timeout cancels the timeout. */ void TimeoutManagerTest::testAbortedRepeatingTimeouts() { MockClock clock; TimeoutManager timeout_manager(&m_map, &clock); OLA_ASSERT_FALSE(timeout_manager.EventsPending()); TimeInterval timeout_interval(1, 0); timeout_id id1 = timeout_manager.RegisterRepeatingTimeout( timeout_interval, NewCallback(this, &TimeoutManagerTest::HandleAbortedEvent, 1u)); OLA_ASSERT_NE(id1, ola::thread::INVALID_TIMEOUT); TimeStamp last_checked_time; clock.AdvanceTime(0, 1); // Small offset to work around timer precision clock.AdvanceTime(1, 0); clock.CurrentMonotonicTime(&last_checked_time); timeout_manager.ExecuteTimeouts(&last_checked_time); OLA_ASSERT_EQ(1u, GetEventCounter(1)); clock.AdvanceTime(1, 0); clock.CurrentMonotonicTime(&last_checked_time); timeout_manager.ExecuteTimeouts(&last_checked_time); OLA_ASSERT_EQ(2u, GetEventCounter(1)); OLA_ASSERT_FALSE(timeout_manager.EventsPending()); } /* * Check we don't leak if there are events pending when the manager is * destroyed. */ void TimeoutManagerTest::testPendingEventShutdown() { MockClock clock; TimeoutManager timeout_manager(&m_map, &clock); OLA_ASSERT_FALSE(timeout_manager.EventsPending()); TimeInterval timeout_interval(1, 0); timeout_id id1 = timeout_manager.RegisterSingleTimeout( timeout_interval, NewSingleCallback(this, &TimeoutManagerTest::HandleEvent, 1u)); OLA_ASSERT_NE(id1, ola::thread::INVALID_TIMEOUT); timeout_id id2 = timeout_manager.RegisterRepeatingTimeout( timeout_interval, NewCallback(this, &TimeoutManagerTest::HandleRepeatingEvent, 1u)); OLA_ASSERT_NE(id2, ola::thread::INVALID_TIMEOUT); OLA_ASSERT_TRUE(timeout_manager.EventsPending()); } ola-0.10.9/common/io/SelectPoller.cpp0000664000175000017500000003161314376533110014306 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SelectPoller.cpp * A Poller which uses select() * Copyright (C) 2013 Simon Newton */ #ifdef _WIN32 // Pull in fd_set and related definitions. #include #endif // _WIN32 #include "common/io/SelectPoller.h" #include #include #include #include #include #include #include #include "ola/Clock.h" #include "ola/Logging.h" #include "ola/base/Macro.h" #include "ola/io/Descriptor.h" #include "ola/stl/STLUtils.h" namespace ola { namespace io { using std::pair; using std::map; using std::string; /** * @brief Insert a descriptor into one of the descriptor maps. * @param descriptor_map the descriptor_map to insert into. * @param fd the FD to use as the key * @param value the value to associate with the key * @param type the name of the map, used for logging if the fd already exists * in the map. * @returns true if the descriptor was inserted, false if it was already in the * map. * * There are three possibilities: * - The fd does not already exist in the map * - The fd exists and the value is NULL. * - The fd exists and is not NULL. */ template bool InsertIntoDescriptorMap(map *descriptor_map, int fd, T *value, const string &type) { typedef map MapType; pair p = descriptor_map->insert( typename MapType::value_type(fd, value)); if (!p.second) { // already in map if (p.first->second == NULL) { p.first->second = value; } else { OLA_WARN << "FD " << fd << " was already in the " << type << " descriptor map: " << p.first->second << " : " << value; return false; } } return true; } /** * @brief Remove a FD from a descriptor map by setting the value to NULL. * @returns true if the FD was removed from the map, false if it didn't exist * in the map. */ template bool RemoveFromDescriptorMap(map *descriptor_map, int fd) { T **ptr = STLFind(descriptor_map, fd); if (ptr) { *ptr = NULL; return true; } return false; } SelectPoller::SelectPoller(ExportMap *export_map, Clock* clock) : m_export_map(export_map), m_loop_iterations(NULL), m_loop_time(NULL), m_clock(clock) { if (m_export_map) { m_loop_time = m_export_map->GetCounterVar(K_LOOP_TIME); m_loop_iterations = m_export_map->GetCounterVar(K_LOOP_COUNT); } } SelectPoller::~SelectPoller() { ConnectedDescriptorMap::iterator iter = m_connected_read_descriptors.begin(); for (; iter != m_connected_read_descriptors.end(); ++iter) { if (iter->second) { if (iter->second->delete_on_close) { delete iter->second->descriptor; } delete iter->second; } } m_read_descriptors.clear(); m_connected_read_descriptors.clear(); m_write_descriptors.clear(); } bool SelectPoller::AddReadDescriptor(class ReadFileDescriptor *descriptor) { if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "AddReadDescriptor called with invalid descriptor"; return false; } return InsertIntoDescriptorMap(&m_read_descriptors, descriptor->ReadDescriptor(), descriptor, "read"); } bool SelectPoller::AddReadDescriptor(class ConnectedDescriptor *descriptor, bool delete_on_close) { if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "AddReadDescriptor called with invalid descriptor"; return false; } connected_descriptor_t *cd = new connected_descriptor_t(); cd->descriptor = descriptor; cd->delete_on_close = delete_on_close; bool ok = InsertIntoDescriptorMap(&m_connected_read_descriptors, descriptor->ReadDescriptor(), cd, "connected"); if (!ok) { delete cd; } return ok; } bool SelectPoller::RemoveReadDescriptor(class ReadFileDescriptor *descriptor) { if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "Removing an invalid ReadDescriptor"; return false; } return RemoveFromDescriptorMap(&m_read_descriptors, descriptor->ReadDescriptor()); } bool SelectPoller::RemoveReadDescriptor(class ConnectedDescriptor *descriptor) { if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "Removing an invalid ConnectedDescriptor"; return false; } connected_descriptor_t **ptr = STLFind( &m_connected_read_descriptors, descriptor->ReadDescriptor()); if (ptr && *ptr) { delete *ptr; *ptr = NULL; return true; } return false; } bool SelectPoller::AddWriteDescriptor(class WriteFileDescriptor *descriptor) { if (!descriptor->ValidWriteDescriptor()) { OLA_WARN << "AddWriteDescriptor called with invalid descriptor"; return false; } return InsertIntoDescriptorMap(&m_write_descriptors, descriptor->WriteDescriptor(), descriptor, "write"); } bool SelectPoller::RemoveWriteDescriptor( class WriteFileDescriptor *descriptor) { if (!descriptor->ValidWriteDescriptor()) { OLA_WARN << "Removing an invalid WriteDescriptor"; return false; } return RemoveFromDescriptorMap(&m_write_descriptors, descriptor->WriteDescriptor()); } bool SelectPoller::Poll(TimeoutManager *timeout_manager, const TimeInterval &poll_interval) { int maxsd; fd_set r_fds, w_fds; TimeStamp now; TimeInterval sleep_interval = poll_interval; struct timeval tv; maxsd = 0; FD_ZERO(&r_fds); FD_ZERO(&w_fds); m_clock->CurrentMonotonicTime(&now); TimeInterval next_event_in = timeout_manager->ExecuteTimeouts(&now); if (!next_event_in.IsZero()) { sleep_interval = std::min(next_event_in, sleep_interval); } // Adding descriptors should be the last thing we do, they may have changed // due to timeouts above. bool closed_descriptors = AddDescriptorsToSet(&r_fds, &w_fds, &maxsd); // If there are closed descriptors, set the timeout to something // very small (1ms). This ensures we at least make a pass through the // descriptors. if (closed_descriptors) { sleep_interval = std::min(sleep_interval, TimeInterval(0, 1000)); } // take care of stats accounting if (m_wake_up_time.IsSet()) { TimeInterval loop_time = now - m_wake_up_time; OLA_DEBUG << "ss process time was " << loop_time.ToString(); if (m_loop_time) (*m_loop_time) += loop_time.AsInt(); if (m_loop_iterations) (*m_loop_iterations)++; } sleep_interval.AsTimeval(&tv); switch (select(maxsd + 1, &r_fds, &w_fds, NULL, &tv)) { case 0: // timeout m_clock->CurrentMonotonicTime(&m_wake_up_time); timeout_manager->ExecuteTimeouts(&m_wake_up_time); if (closed_descriptors) { // there were closed descriptors before the select() we need to deal // with them. FD_ZERO(&r_fds); FD_ZERO(&w_fds); CheckDescriptors(&r_fds, &w_fds); } return true; case -1: if (errno == EINTR) return true; OLA_WARN << "select() error, " << strerror(errno); return false; default: m_clock->CurrentMonotonicTime(&m_wake_up_time); CheckDescriptors(&r_fds, &w_fds); m_clock->CurrentMonotonicTime(&m_wake_up_time); timeout_manager->ExecuteTimeouts(&m_wake_up_time); } return true; } /* * Add all the descriptors to the FD_SET. * @returns true if there are descriptors that have been closed. * * This also takes care of removing any entries from the maps where the value * is NULL. This is safe because we don't execute any callbacks from within * this method. */ bool SelectPoller::AddDescriptorsToSet(fd_set *r_set, fd_set *w_set, int *max_sd) { bool closed_descriptors = false; ReadDescriptorMap::iterator iter = m_read_descriptors.begin(); while (iter != m_read_descriptors.end()) { ReadDescriptorMap::iterator this_iter = iter; iter++; ReadFileDescriptor *descriptor = this_iter->second; if (!descriptor) { // This one was removed. m_read_descriptors.erase(this_iter); continue; } if (descriptor->ValidReadDescriptor()) { *max_sd = std::max(*max_sd, descriptor->ReadDescriptor()); FD_SET(descriptor->ReadDescriptor(), r_set); } else { // The descriptor was probably closed without removing it from the select // server if (m_export_map) { (*m_export_map->GetIntegerVar(K_READ_DESCRIPTOR_VAR))--; } m_read_descriptors.erase(this_iter); OLA_WARN << "Removed a inactive descriptor from the select server"; } } ConnectedDescriptorMap::iterator con_iter = m_connected_read_descriptors.begin(); while (con_iter != m_connected_read_descriptors.end()) { ConnectedDescriptorMap::iterator this_iter = con_iter; con_iter++; if (!this_iter->second) { // This one was removed. m_connected_read_descriptors.erase(this_iter); continue; } if (this_iter->second->descriptor->ValidReadDescriptor()) { *max_sd = std::max( *max_sd, this_iter->second->descriptor->ReadDescriptor()); FD_SET(this_iter->second->descriptor->ReadDescriptor(), r_set); } else { closed_descriptors = true; } } WriteDescriptorMap::iterator write_iter = m_write_descriptors.begin(); while (write_iter != m_write_descriptors.end()) { WriteDescriptorMap::iterator this_iter = write_iter; write_iter++; WriteFileDescriptor *descriptor = this_iter->second; if (!descriptor) { // This one was removed. m_write_descriptors.erase(this_iter); continue; } if (descriptor->ValidWriteDescriptor()) { *max_sd = std::max(*max_sd, descriptor->WriteDescriptor()); FD_SET(descriptor->WriteDescriptor(), w_set); } else { // The descriptor was probably closed without removing it from the select // server if (m_export_map) { (*m_export_map->GetIntegerVar(K_WRITE_DESCRIPTOR_VAR))--; } m_write_descriptors.erase(this_iter); OLA_WARN << "Removed a disconnected descriptor from the select server"; } } return closed_descriptors; } /* * Check all the registered descriptors: * - Execute the callback for descriptors with data * - Execute OnClose if a remote end closed the connection */ void SelectPoller::CheckDescriptors(fd_set *r_set, fd_set *w_set) { // Remember the add / remove methods above may be called during // PerformRead(), PerformWrite() or the on close handler. Our iterators are // safe because we only ever call erase from within AddDescriptorsToSet(), // which isn't called from any of the Add / Remove methods. ReadDescriptorMap::iterator iter = m_read_descriptors.begin(); for (; iter != m_read_descriptors.end(); ++iter) { if (iter->second && FD_ISSET(iter->second->ReadDescriptor(), r_set)) { iter->second->PerformRead(); } } ConnectedDescriptorMap::iterator con_iter = m_connected_read_descriptors.begin(); for (; con_iter != m_connected_read_descriptors.end(); ++con_iter) { if (!con_iter->second) { continue; } connected_descriptor_t *cd = con_iter->second; ConnectedDescriptor *descriptor = cd->descriptor; bool closed = false; if (!descriptor->ValidReadDescriptor()) { closed = true; } else if (FD_ISSET(descriptor->ReadDescriptor(), r_set)) { if (descriptor->IsClosed()) { closed = true; } else { descriptor->PerformRead(); } } if (closed) { ConnectedDescriptor::OnCloseCallback *on_close = descriptor->TransferOnClose(); bool delete_on_close = cd->delete_on_close; delete con_iter->second; con_iter->second = NULL; if (m_export_map) { (*m_export_map->GetIntegerVar(K_CONNECTED_DESCRIPTORS_VAR))--; } if (on_close) on_close->Run(); if (delete_on_close) delete descriptor; } } // Check the write sockets. These may have changed since the start of the // method due to running callbacks. WriteDescriptorMap::iterator write_iter = m_write_descriptors.begin(); for (; write_iter != m_write_descriptors.end(); write_iter++) { if (write_iter->second && FD_ISSET(write_iter->second->WriteDescriptor(), w_set)) { write_iter->second->PerformWrite(); } } } } // namespace io } // namespace ola ola-0.10.9/common/io/NonBlockingSender.cpp0000664000175000017500000000534414376533110015257 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * NonBlockingSender.cpp * Copyright (C) 2013 Simon Newton */ #include "ola/Callback.h" #include "ola/io/IOQueue.h" #include "ola/io/IOStack.h" #include "ola/io/NonBlockingSender.h" namespace ola { namespace io { const unsigned int NonBlockingSender::DEFAULT_MAX_BUFFER_SIZE = 1024; NonBlockingSender::NonBlockingSender(ola::io::ConnectedDescriptor *descriptor, ola::io::SelectServerInterface *ss, ola::io::MemoryBlockPool *memory_pool, unsigned int max_buffer_size) : m_descriptor(descriptor), m_ss(ss), m_output_buffer(memory_pool), m_associated(false), m_max_buffer_size(max_buffer_size) { m_descriptor->SetOnWritable( ola::NewCallback(this, &NonBlockingSender::PerformWrite)); } NonBlockingSender::~NonBlockingSender() { if (m_associated) { m_ss->RemoveWriteDescriptor(m_descriptor); } m_descriptor->SetOnWritable(NULL); } bool NonBlockingSender::LimitReached() const { return m_output_buffer.Size() >= m_max_buffer_size; } bool NonBlockingSender::SendMessage(ola::io::IOStack *stack) { if (LimitReached()) { return false; } stack->MoveToIOQueue(&m_output_buffer); AssociateIfRequired(); return true; } bool NonBlockingSender::SendMessage(IOQueue *queue) { if (LimitReached()) { return false; } m_output_buffer.AppendMove(queue); AssociateIfRequired(); return true; } /* * Called when the descriptor is writeable, this does the actual write() call. */ void NonBlockingSender::PerformWrite() { m_descriptor->Send(&m_output_buffer); if (m_output_buffer.Empty() && m_associated) { m_ss->RemoveWriteDescriptor(m_descriptor); m_associated = false; } } /* * Associate our descriptor with the SelectServer if we have data to send. */ void NonBlockingSender::AssociateIfRequired() { if (m_output_buffer.Empty()) { return; } m_ss->AddWriteDescriptor(m_descriptor); m_associated = true; } } // namespace io } // namespace ola ola-0.10.9/common/io/SelectServerTest.cpp0000664000175000017500000005130514376533110015157 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SelectServerTest.cpp * Test fixture for the SelectServer. * Copyright (C) 2005 Simon Newton * * This tries to test many of the tricky reentrancy cases of a SelectServer. * Because the add / remove descriptor methods can be called from within * callbacks, it's important that the SelectServer remain reentrant. This in * turn means implementations of PollerInterface also need to be reentrant. */ #ifdef _WIN32 #include #endif // _WIN32 #include #include #include #include "common/io/PollerInterface.h" #include "ola/Callback.h" #include "ola/Clock.h" #include "ola/ExportMap.h" #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/io/SelectServer.h" #include "ola/network/Socket.h" #include "ola/testing/TestUtils.h" using ola::ExportMap; using ola::IntegerVariable; using ola::NewCallback; using ola::NewSingleCallback; using ola::TimeStamp; using ola::io::ConnectedDescriptor; using ola::io::LoopbackDescriptor; using ola::io::PollerInterface; using ola::io::SelectServer; using ola::io::UnixSocket; using ola::io::WriteFileDescriptor; using ola::network::UDPSocket; using std::auto_ptr; using std::set; /* * For some of the tests we need precise control over the timing. * So we mock a clock out here. */ class CustomMockClock: public ola::Clock { public: explicit CustomMockClock(TimeStamp *timestamp) : m_timestamp(timestamp) { } void CurrentMonotonicTime(TimeStamp *timestamp) const { *timestamp = *m_timestamp; } private: TimeStamp *m_timestamp; }; class SelectServerTest: public CppUnit::TestFixture { typedef set Descriptors; CPPUNIT_TEST_SUITE(SelectServerTest); CPPUNIT_TEST(testAddInvalidDescriptor); CPPUNIT_TEST(testDoubleAddAndRemove); CPPUNIT_TEST(testAddRemoveReadDescriptor); CPPUNIT_TEST(testRemoteEndClose); CPPUNIT_TEST(testRemoteEndCloseWithDelete); CPPUNIT_TEST(testRemoteEndCloseWithRemoveAndDelete); CPPUNIT_TEST(testRemoveWriteWhenOtherReadable); CPPUNIT_TEST(testRemoveWriteWhenReadable); CPPUNIT_TEST(testRemoveOthersWhenReadable); CPPUNIT_TEST(testRemoveOthersWhenWriteable); #ifndef _WIN32 CPPUNIT_TEST(testReadWriteInteraction); #endif // !_WIN32 CPPUNIT_TEST(testShutdownWithActiveDescriptors); CPPUNIT_TEST(testTimeout); CPPUNIT_TEST(testOffByOneTimeout); CPPUNIT_TEST(testLoopCallbacks); CPPUNIT_TEST_SUITE_END(); public: void setUp(); void tearDown(); void testAddInvalidDescriptor(); void testDoubleAddAndRemove(); void testAddRemoveReadDescriptor(); void testRemoteEndClose(); void testRemoteEndCloseWithDelete(); void testRemoteEndCloseWithRemoveAndDelete(); void testRemoveWriteWhenOtherReadable(); void testRemoveWriteWhenReadable(); void testRemoveOthersWhenReadable(); void testRemoveOthersWhenWriteable(); void testReadWriteInteraction(); void testShutdownWithActiveDescriptors(); void testTimeout(); void testOffByOneTimeout(); void testLoopCallbacks(); void FatalTimeout() { OLA_FAIL("Fatal Timeout"); } void Terminate() { OLA_DEBUG << "Terminate called"; if (m_ss) { m_ss->Terminate(); } } void SingleIncrementTimeout() { OLA_DEBUG << "Single increment timeout called"; m_timeout_counter++; OLA_DEBUG << "Timeout counter is now " << m_timeout_counter; } void ReentrantTimeout(SelectServer *ss) { OLA_DEBUG << "Re-entrant timeout called, adding two single increment " "timeouts"; ss->RegisterSingleTimeout( 0, ola::NewSingleCallback(this, &SelectServerTest::SingleIncrementTimeout)); ss->RegisterSingleTimeout( 5, ola::NewSingleCallback(this, &SelectServerTest::SingleIncrementTimeout)); } void NullHandler() {} bool IncrementTimeout() { if (m_ss && m_ss->IsRunning()) m_timeout_counter++; return true; } void ReadDataAndRemove(ConnectedDescriptor *descriptor) { uint8_t data[10]; unsigned int size; descriptor->Receive(data, arraysize(data), size); if (m_ss) { m_ss->RemoveReadDescriptor(descriptor); m_ss->RemoveWriteDescriptor(descriptor); m_ss->Terminate(); delete descriptor; } } void RemoveAndDeleteDescriptors(Descriptors read_descriptors, Descriptors write_descriptors, Descriptors delete_descriptors) { Descriptors::iterator iter; for (iter = read_descriptors.begin(); iter != read_descriptors.end(); ++iter) { m_ss->RemoveReadDescriptor(*iter); } for (iter = write_descriptors.begin(); iter != write_descriptors.end(); ++iter) { m_ss->RemoveWriteDescriptor(*iter); } for (iter = delete_descriptors.begin(); iter != delete_descriptors.end(); ++iter) { delete *iter; } m_ss->Terminate(); } void IncrementLoopCounter() { m_loop_counter++; } private: unsigned int m_timeout_counter; unsigned int m_loop_counter; ExportMap m_map; IntegerVariable *connected_read_descriptor_count; IntegerVariable *read_descriptor_count; IntegerVariable *write_descriptor_count; SelectServer *m_ss; }; CPPUNIT_TEST_SUITE_REGISTRATION(SelectServerTest); void SelectServerTest::setUp() { connected_read_descriptor_count = m_map.GetIntegerVar( PollerInterface::K_CONNECTED_DESCRIPTORS_VAR); read_descriptor_count = m_map.GetIntegerVar( PollerInterface::K_READ_DESCRIPTOR_VAR); write_descriptor_count = m_map.GetIntegerVar( PollerInterface::K_WRITE_DESCRIPTOR_VAR); m_ss = new SelectServer(&m_map); m_timeout_counter = 0; m_loop_counter = 0; #if _WIN32 WSADATA wsa_data; int result = WSAStartup(MAKEWORD(2, 0), &wsa_data); OLA_ASSERT_EQ(result, 0); #endif // _WIN32 } void SelectServerTest::tearDown() { delete m_ss; #ifdef _WIN32 WSACleanup(); #endif // _WIN32 } /* * Confirm we can't add invalid descriptors to the SelectServer */ void SelectServerTest::testAddInvalidDescriptor() { OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); // internal socket OLA_ASSERT_EQ(0, read_descriptor_count->Get()); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); // Adding and removing a uninitialized socket should fail LoopbackDescriptor bad_socket; OLA_ASSERT_FALSE(m_ss->AddReadDescriptor(&bad_socket)); OLA_ASSERT_FALSE(m_ss->AddWriteDescriptor(&bad_socket)); m_ss->RemoveReadDescriptor(&bad_socket); m_ss->RemoveWriteDescriptor(&bad_socket); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); } /* * Confirm we can't add the same descriptor twice. */ void SelectServerTest::testDoubleAddAndRemove() { OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); // internal socket OLA_ASSERT_EQ(0, read_descriptor_count->Get()); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); LoopbackDescriptor loopback; loopback.Init(); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&loopback)); OLA_ASSERT_EQ(2, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); OLA_ASSERT_TRUE(m_ss->AddWriteDescriptor(&loopback)); OLA_ASSERT_EQ(2, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); OLA_ASSERT_EQ(1, write_descriptor_count->Get()); m_ss->RemoveReadDescriptor(&loopback); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); OLA_ASSERT_EQ(1, write_descriptor_count->Get()); m_ss->RemoveWriteDescriptor(&loopback); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); // Trying to remove a second time shouldn't crash m_ss->RemoveReadDescriptor(&loopback); m_ss->RemoveWriteDescriptor(&loopback); } /* * Check AddReadDescriptor/RemoveReadDescriptor works correctly and that the * export map is updated. */ void SelectServerTest::testAddRemoveReadDescriptor() { OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); LoopbackDescriptor loopback; loopback.Init(); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&loopback)); OLA_ASSERT_EQ(2, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); // Add a udp socket UDPSocket udp_socket; OLA_ASSERT_TRUE(udp_socket.Init()); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&udp_socket)); OLA_ASSERT_EQ(2, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(1, read_descriptor_count->Get()); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); // Check remove works m_ss->RemoveReadDescriptor(&loopback); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(1, read_descriptor_count->Get()); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); m_ss->RemoveReadDescriptor(&udp_socket); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); } /* * Confirm we correctly detect the remote end closing the connection. */ void SelectServerTest::testRemoteEndClose() { Descriptors read_set, write_set, delete_set; LoopbackDescriptor loopback; loopback.Init(); read_set.insert(&loopback); loopback.SetOnClose(NewSingleCallback( this, &SelectServerTest::RemoveAndDeleteDescriptors, read_set, write_set, delete_set)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&loopback)); OLA_ASSERT_EQ(2, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); // now the Write end closes loopback.CloseClient(); m_ss->Run(); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); } /* * Confirm we correctly detect the remote end closing the connection. * This uses the delete_on_close option. */ void SelectServerTest::testRemoteEndCloseWithDelete() { // Ownership is transferred to the SelectServer. LoopbackDescriptor *loopback = new LoopbackDescriptor(); loopback->Init(); loopback->SetOnClose(NewSingleCallback( this, &SelectServerTest::Terminate)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(loopback, true)); OLA_ASSERT_EQ(2, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); // Now the Write end closes loopback->CloseClient(); m_ss->Run(); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); } /* * Check the delete_on_close feature handles the case where the descriptor * being closed is removed from the on_close handler. */ void SelectServerTest::testRemoteEndCloseWithRemoveAndDelete() { Descriptors read_set, write_set, delete_set; LoopbackDescriptor *loopback = new LoopbackDescriptor(); loopback->Init(); read_set.insert(loopback); loopback->SetOnClose(NewSingleCallback( this, &SelectServerTest::RemoveAndDeleteDescriptors, read_set, write_set, delete_set)); // Ownership is transferred. OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(loopback, true)); OLA_ASSERT_EQ(2, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); // Close the write end of the descriptor. loopback->CloseClient(); m_ss->Run(); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); } /* * Check that RemoveWriteDescriptor is reentrant. * We use the Execute() method to close a write descriptor during the same * cycle in which it becomes writeable. See * https://github.com/OpenLightingProject/ola/pull/429 for details. */ void SelectServerTest::testRemoveWriteWhenOtherReadable() { Descriptors read_set, write_set, delete_set; LoopbackDescriptor *loopback = new LoopbackDescriptor(); loopback->Init(); loopback->SetOnWritable(NewCallback(this, &SelectServerTest::NullHandler)); write_set.insert(loopback); delete_set.insert(loopback); OLA_ASSERT_TRUE(m_ss->AddWriteDescriptor(loopback)); OLA_ASSERT_EQ(1, write_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); m_ss->Execute(NewSingleCallback( this, &SelectServerTest::RemoveAndDeleteDescriptors, read_set, write_set, delete_set)); m_ss->Run(); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); } /* * Check that RemoveWriteDescriptor is reentrant. * Similar to the case above, but this removes & deletes the descriptor from * within the OnRead callback of the same descriptor. */ void SelectServerTest::testRemoveWriteWhenReadable() { // Ownership is transferred to the SelectServer. LoopbackDescriptor *loopback = new LoopbackDescriptor(); loopback->Init(); loopback->SetOnData(NewCallback( this, &SelectServerTest::ReadDataAndRemove, static_cast(loopback))); loopback->SetOnWritable(NewCallback(this, &SelectServerTest::NullHandler)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(loopback)); OLA_ASSERT_TRUE(m_ss->AddWriteDescriptor(loopback)); OLA_ASSERT_EQ(2, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(1, write_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); // Send some data to make this descriptor readable. uint8_t data[] = {'a'}; loopback->Send(data, arraysize(data)); m_ss->Run(); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); } /* * Check that we don't invalid iterators by removing descriptors during an * on_read callback. */ void SelectServerTest::testRemoveOthersWhenReadable() { Descriptors read_set, write_set, delete_set; LoopbackDescriptor loopback1, loopback2, loopback3; loopback1.Init(); loopback2.Init(); loopback3.Init(); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&loopback1)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&loopback2)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&loopback3)); read_set.insert(&loopback1); read_set.insert(&loopback2); read_set.insert(&loopback3); loopback2.SetOnClose(NewSingleCallback( this, &SelectServerTest::RemoveAndDeleteDescriptors, read_set, write_set, delete_set)); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); OLA_ASSERT_EQ(4, connected_read_descriptor_count->Get()); loopback2.CloseClient(); m_ss->Run(); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); } /* * Check that we don't invalid iterators by removing descriptors during an * on_Write callback. */ void SelectServerTest::testRemoveOthersWhenWriteable() { Descriptors read_set, write_set, delete_set; LoopbackDescriptor loopback1, loopback2, loopback3; loopback1.Init(); loopback2.Init(); loopback3.Init(); OLA_ASSERT_TRUE(m_ss->AddWriteDescriptor(&loopback1)); OLA_ASSERT_TRUE(m_ss->AddWriteDescriptor(&loopback2)); OLA_ASSERT_TRUE(m_ss->AddWriteDescriptor(&loopback3)); write_set.insert(&loopback1); write_set.insert(&loopback2); write_set.insert(&loopback3); loopback1.SetOnWritable(NewCallback( this, &SelectServerTest::NullHandler)); loopback2.SetOnWritable(NewCallback( this, &SelectServerTest::RemoveAndDeleteDescriptors, read_set, write_set, delete_set)); loopback3.SetOnWritable(NewCallback( this, &SelectServerTest::NullHandler)); OLA_ASSERT_EQ(3, write_descriptor_count->Get()); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); m_ss->Run(); OLA_ASSERT_EQ(0, write_descriptor_count->Get()); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); } /* * Test the interaction between read and write descriptor. */ void SelectServerTest::testReadWriteInteraction() { UnixSocket socket; socket.Init(); socket.SetOnClose(NewSingleCallback(this, &SelectServerTest::Terminate)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&socket)); OLA_ASSERT_TRUE(m_ss->AddWriteDescriptor(&socket)); m_ss->RemoveWriteDescriptor(&socket); // now the Write end closes auto_ptr other_end(socket.OppositeEnd()); other_end->CloseClient(); m_ss->RegisterSingleTimeout( 100, ola::NewSingleCallback(this, &SelectServerTest::FatalTimeout)); m_ss->Run(); m_ss->RemoveReadDescriptor(&socket); OLA_ASSERT_EQ(1, connected_read_descriptor_count->Get()); OLA_ASSERT_EQ(0, read_descriptor_count->Get()); } /* * Confirm we don't leak memory when the SelectServer is destroyed without all * the descriptors being removed. */ void SelectServerTest::testShutdownWithActiveDescriptors() { LoopbackDescriptor loopback; loopback.Init(); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&loopback)); OLA_ASSERT_TRUE(m_ss->AddWriteDescriptor(&loopback)); } /* * Timeout tests */ void SelectServerTest::testTimeout() { // Check a single timeout m_ss->RegisterSingleTimeout( 10, ola::NewSingleCallback(this, &SelectServerTest::SingleIncrementTimeout)); m_ss->RegisterSingleTimeout( 20, ola::NewSingleCallback(this, &SelectServerTest::Terminate)); m_ss->Run(); OLA_ASSERT_EQ(1u, m_timeout_counter); // Now check a timeout that adds another timeout OLA_DEBUG << "Checking re-entrant timeouts"; m_timeout_counter = 0; OLA_DEBUG << "Timeout counter is now " << m_timeout_counter; m_ss->RegisterSingleTimeout( 10, ola::NewSingleCallback(this, &SelectServerTest::ReentrantTimeout, m_ss)); // The terminate timeout is 40ms to allow the check to pass on Win XP. See // https://github.com/OpenLightingProject/ola/pull/626 for more info m_ss->RegisterSingleTimeout( 40, ola::NewSingleCallback(this, &SelectServerTest::Terminate)); OLA_DEBUG << "Timeout counter is now " << m_timeout_counter; m_ss->Run(); OLA_DEBUG << "Timeout counter is now " << m_timeout_counter; OLA_ASSERT_EQ(2u, m_timeout_counter); // Check repeating timeouts // Some systems (VMs in particular) can't do 10ms resolution so we go for // larger numbers here. m_timeout_counter = 0; m_ss->RegisterRepeatingTimeout( 100, ola::NewCallback(this, &SelectServerTest::IncrementTimeout)); m_ss->RegisterSingleTimeout( 980, ola::NewSingleCallback(this, &SelectServerTest::Terminate)); m_ss->Run(); // This seems to go as low as 7 std::ostringstream str; str << "Timeout counter was " << m_timeout_counter; OLA_ASSERT_TRUE_MSG(m_timeout_counter >= 5 && m_timeout_counter <= 9, str.str()); // Confirm timeouts are removed correctly ola::thread::timeout_id timeout1 = m_ss->RegisterSingleTimeout( 10, ola::NewSingleCallback(this, &SelectServerTest::FatalTimeout)); m_ss->RegisterSingleTimeout( 20, ola::NewSingleCallback(this, &SelectServerTest::Terminate)); m_ss->RemoveTimeout(timeout1); m_ss->Run(); } /* * Test that timeouts aren't skipped. */ void SelectServerTest::testOffByOneTimeout() { TimeStamp now; ola::Clock actual_clock; actual_clock.CurrentMonotonicTime(&now); CustomMockClock clock(&now); SelectServer ss(NULL, &clock); ss.RegisterSingleTimeout( 10, ola::NewSingleCallback(this, &SelectServerTest::SingleIncrementTimeout)); now += ola::TimeInterval(0, 10000); ss.m_timeout_manager->ExecuteTimeouts(&now); OLA_ASSERT_EQ(m_timeout_counter, 1u); } /* * Check that the loop closures are called. */ void SelectServerTest::testLoopCallbacks() { m_ss->SetDefaultInterval(ola::TimeInterval(0, 100000)); // poll every 100ms m_ss->RunInLoop( ola::NewCallback(this, &SelectServerTest::IncrementLoopCounter)); m_ss->RegisterSingleTimeout( 500, ola::NewSingleCallback(this, &SelectServerTest::Terminate)); m_ss->Run(); // we should have at least 5 calls to IncrementLoopCounter OLA_ASSERT_TRUE(m_loop_counter >= 5); } ola-0.10.9/common/io/KQueuePoller.cpp0000664000175000017500000003214014376533110014262 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * KQueuePoller.cpp * A Poller which uses kqueue / kevent * Copyright (C) 2014 Simon Newton */ #include "common/io/KQueuePoller.h" #include #include #include #include #include #include #include #include "ola/Clock.h" #include "ola/Logging.h" #include "ola/base/Macro.h" #include "ola/io/Descriptor.h" #include "ola/stl/STLUtils.h" namespace ola { namespace io { using std::pair; /* * Represents a FD */ class KQueueData { public: KQueueData() : enable_read(false), enable_write(false), delete_connected_on_close(false), connected_close_in_progress(false), read_descriptor(NULL), write_descriptor(NULL), connected_descriptor(NULL) { } void Reset() { enable_read = false; enable_write = false; delete_connected_on_close = false; // True if this is a ConnectedDescriptor and it's in the process of being // closed connected_close_in_progress = false; read_descriptor = NULL; write_descriptor = NULL; connected_descriptor = NULL; } uint8_t enable_read : 1; uint8_t enable_write : 1; uint8_t delete_connected_on_close : 1; uint8_t connected_close_in_progress : 1; ReadFileDescriptor *read_descriptor; WriteFileDescriptor *write_descriptor; ConnectedDescriptor *connected_descriptor; }; /** * @brief The maximum number of events to return in one epoll cycle */ const int KQueuePoller::MAX_EVENTS = 10; /** * @brief The number of pre-allocated KQueueData to have. */ const unsigned int KQueuePoller::MAX_FREE_DESCRIPTORS = 10; KQueuePoller::KQueuePoller(ExportMap *export_map, Clock* clock) : m_export_map(export_map), m_loop_iterations(NULL), m_loop_time(NULL), m_kqueue_fd(INVALID_DESCRIPTOR), m_next_change_entry(0), m_clock(clock) { if (m_export_map) { m_loop_time = m_export_map->GetCounterVar(K_LOOP_TIME); m_loop_iterations = m_export_map->GetCounterVar(K_LOOP_COUNT); } m_kqueue_fd = kqueue(); if (m_kqueue_fd < 0) { OLA_FATAL << "Failed to create new kqueue"; } } KQueuePoller::~KQueuePoller() { if (m_kqueue_fd != INVALID_DESCRIPTOR) { close(m_kqueue_fd); } { DescriptorMap::iterator iter = m_descriptor_map.begin(); for (; iter != m_descriptor_map.end(); ++iter) { if (iter->second->delete_connected_on_close) { delete iter->second->connected_descriptor; } delete iter->second; } } DescriptorList::iterator iter = m_orphaned_descriptors.begin(); for (; iter != m_orphaned_descriptors.end(); ++iter) { if ((*iter)->delete_connected_on_close) { delete (*iter)->connected_descriptor; } delete *iter; } STLDeleteElements(&m_free_descriptors); } bool KQueuePoller::AddReadDescriptor(ReadFileDescriptor *descriptor) { if (m_kqueue_fd == INVALID_DESCRIPTOR) { return false; } if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "AddReadDescriptor called with invalid descriptor"; return false; } pair result = LookupOrCreateDescriptor( descriptor->ReadDescriptor()); KQueueData *kqueue_data = result.first; if (kqueue_data->enable_read) { OLA_WARN << "Descriptor " << descriptor->ReadDescriptor() << " already in read set"; return false; } kqueue_data->enable_read = true; kqueue_data->read_descriptor = descriptor; return ApplyChange(descriptor->ReadDescriptor(), EVFILT_READ, EV_ADD, kqueue_data, false); } bool KQueuePoller::AddReadDescriptor(ConnectedDescriptor *descriptor, bool delete_on_close) { if (m_kqueue_fd == INVALID_DESCRIPTOR) { return false; } if (!descriptor->ValidReadDescriptor()) { OLA_WARN << "AddReadDescriptor called with invalid descriptor"; return false; } pair result = LookupOrCreateDescriptor( descriptor->ReadDescriptor()); KQueueData *kqueue_data = result.first; if (kqueue_data->enable_read) { OLA_WARN << "Descriptor " << descriptor->ReadDescriptor() << " already in read set"; return false; } kqueue_data->enable_read = true; kqueue_data->connected_descriptor = descriptor; kqueue_data->delete_connected_on_close = delete_on_close; return ApplyChange(descriptor->ReadDescriptor(), EVFILT_READ, EV_ADD, kqueue_data, false); } bool KQueuePoller::RemoveReadDescriptor(ReadFileDescriptor *descriptor) { return RemoveDescriptor(descriptor->ReadDescriptor(), EVFILT_READ); } bool KQueuePoller::RemoveReadDescriptor(ConnectedDescriptor *descriptor) { return RemoveDescriptor(descriptor->ReadDescriptor(), EVFILT_READ); } bool KQueuePoller::AddWriteDescriptor(WriteFileDescriptor *descriptor) { if (m_kqueue_fd == INVALID_DESCRIPTOR) { return false; } if (!descriptor->ValidWriteDescriptor()) { OLA_WARN << "AddWriteDescriptor called with invalid descriptor"; return false; } pair result = LookupOrCreateDescriptor( descriptor->WriteDescriptor()); KQueueData *kqueue_data = result.first; if (kqueue_data->enable_write) { OLA_WARN << "Descriptor " << descriptor->WriteDescriptor() << " already in write set"; return false; } kqueue_data->enable_write = true; kqueue_data->write_descriptor = descriptor; return ApplyChange(descriptor->WriteDescriptor(), EVFILT_WRITE, EV_ADD, kqueue_data, false); } bool KQueuePoller::RemoveWriteDescriptor(WriteFileDescriptor *descriptor) { return RemoveDescriptor(descriptor->WriteDescriptor(), EVFILT_WRITE); } bool KQueuePoller::Poll(TimeoutManager *timeout_manager, const TimeInterval &poll_interval) { if (m_kqueue_fd == INVALID_DESCRIPTOR) { return false; } struct kevent events[MAX_EVENTS]; TimeInterval sleep_interval = poll_interval; TimeStamp now; m_clock->CurrentMonotonicTime(&now); TimeInterval next_event_in = timeout_manager->ExecuteTimeouts(&now); if (!next_event_in.IsZero()) { sleep_interval = std::min(next_event_in, sleep_interval); } // take care of stats accounting if (m_wake_up_time.IsSet()) { TimeInterval loop_time = now - m_wake_up_time; OLA_DEBUG << "ss process time was " << loop_time.ToString(); if (m_loop_time) (*m_loop_time) += loop_time.AsInt(); if (m_loop_iterations) (*m_loop_iterations)++; } struct timespec sleep_time; sleep_time.tv_sec = sleep_interval.Seconds(); sleep_time.tv_nsec = sleep_interval.MicroSeconds() * 1000; int ready = kevent( m_kqueue_fd, reinterpret_cast(m_change_set), m_next_change_entry, events, MAX_EVENTS, &sleep_time); m_next_change_entry = 0; if (ready == 0) { m_clock->CurrentMonotonicTime(&m_wake_up_time); timeout_manager->ExecuteTimeouts(&m_wake_up_time); return true; } else if (ready == -1) { if (errno == EINTR) return true; OLA_WARN << "kqueue() error, " << strerror(errno); return false; } m_clock->CurrentMonotonicTime(&m_wake_up_time); for (int i = 0; i < ready; i++) { if (events[i].flags & EV_ERROR) { OLA_WARN << "Error from kqueue on fd: " << events[i].ident << ": " << strerror(events[i].data); } else { CheckDescriptor(&events[i]); } } // Now that we're out of the callback phase, clean up descriptors that were // removed. DescriptorList::iterator iter = m_orphaned_descriptors.begin(); for (; iter != m_orphaned_descriptors.end(); ++iter) { if (m_free_descriptors.size() == MAX_FREE_DESCRIPTORS) { delete *iter; } else { (*iter)->Reset(); m_free_descriptors.push_back(*iter); } } m_orphaned_descriptors.clear(); m_clock->CurrentMonotonicTime(&m_wake_up_time); timeout_manager->ExecuteTimeouts(&m_wake_up_time); return true; } /* * Check all the registered descriptors: * - Execute the callback for descriptors with data * - Execute OnClose if a remote end closed the connection */ void KQueuePoller::CheckDescriptor(struct kevent *event) { KQueueData *kqueue_data = reinterpret_cast( event->udata); if (event->filter == EVFILT_READ) { if (kqueue_data->read_descriptor) { kqueue_data->read_descriptor->PerformRead(); } else if (kqueue_data->connected_descriptor) { ConnectedDescriptor *connected_descriptor = kqueue_data->connected_descriptor; if (event->data) { connected_descriptor->PerformRead(); } else if (event->flags & EV_EOF) { // The remote end closed the descriptor. // According to man kevent, closing the descriptor removes it from the // list of kevents. We don't want to queue up a EV_DELETE for the FD // because the FD number may be reused in short order. // So instead we set connected_close_in_progress which is a signal to // RemoveDescriptor not to create an EV_DELETE event if // RemoveReadDescriptor() is called. kqueue_data->connected_close_in_progress = true; ConnectedDescriptor::OnCloseCallback *on_close = connected_descriptor->TransferOnClose(); if (on_close) on_close->Run(); // At this point the descriptor may be sitting in the orphan list // if the OnClose handler called into RemoveReadDescriptor() if (kqueue_data->delete_connected_on_close) { delete connected_descriptor; // Remove from m_descriptor_map if it's still there kqueue_data = STLLookupAndRemovePtr(&m_descriptor_map, event->ident); if (kqueue_data) { m_orphaned_descriptors.push_back(kqueue_data); if (m_export_map) { (*m_export_map->GetIntegerVar(K_CONNECTED_DESCRIPTORS_VAR))--; } } } } } } if (event->filter == EVFILT_WRITE) { // kqueue_data->write_descriptor may be null here if this descriptor was // removed between when kevent returned and now. if (kqueue_data->write_descriptor) { kqueue_data->write_descriptor->PerformWrite(); } } } std::pair KQueuePoller::LookupOrCreateDescriptor( int fd) { pair result = m_descriptor_map.insert( DescriptorMap::value_type(fd, NULL)); bool new_descriptor = result.second; if (new_descriptor) { if (m_free_descriptors.empty()) { result.first->second = new KQueueData(); } else { result.first->second = m_free_descriptors.back(); m_free_descriptors.pop_back(); } } return std::make_pair(result.first->second, new_descriptor); } bool KQueuePoller::ApplyChange(int fd, int16_t filter, uint16_t flags, KQueueData *descriptor, bool apply_immediately) { #ifdef __NetBSD__ EV_SET(&m_change_set[m_next_change_entry++], fd, filter, flags, 0, 0, reinterpret_cast(descriptor)); #else EV_SET(&m_change_set[m_next_change_entry++], fd, filter, flags, 0, 0, descriptor); #endif // __NetBSD__ if (m_next_change_entry == CHANGE_SET_SIZE || apply_immediately) { int r = kevent(m_kqueue_fd, m_change_set, m_next_change_entry, NULL, 0, NULL); if (r < 0) { OLA_WARN << "Failed to apply kqueue changes: " << strerror(errno); } m_next_change_entry = 0; } return true; } bool KQueuePoller::RemoveDescriptor(int fd, int16_t filter) { if (fd == INVALID_DESCRIPTOR) { OLA_WARN << "Attempt to remove an invalid file descriptor"; return false; } KQueueData *kqueue_data = STLFindOrNull(m_descriptor_map, fd); if (!kqueue_data) { OLA_WARN << "Couldn't find KQueueData for fd " << fd; return false; } bool remove_from_kevent = true; if (filter == EVFILT_READ) { kqueue_data->enable_read = false; kqueue_data->read_descriptor = NULL; if (kqueue_data->connected_descriptor) { remove_from_kevent = !kqueue_data->connected_close_in_progress; kqueue_data->connected_descriptor = NULL; } } else if (filter == EVFILT_WRITE) { kqueue_data->enable_write = false; kqueue_data->write_descriptor = NULL; } else { OLA_WARN << "Unknown kqueue filter: " << filter; } if (remove_from_kevent) { ApplyChange(fd, filter, EV_DELETE, NULL, true); } if (!kqueue_data->enable_read && !kqueue_data->enable_write) { m_orphaned_descriptors.push_back( STLLookupAndRemovePtr(&m_descriptor_map, fd)); } return true; } } // namespace io } // namespace ola ola-0.10.9/common/io/DescriptorTest.cpp0000664000175000017500000002221514376533110014665 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DescriptorTest.cpp * Test fixture for the Descriptor classes * Copyright (C) 2005 Simon Newton */ #include #include #include #include #ifdef _WIN32 #include #endif // _WIN32 #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/io/Descriptor.h" #include "ola/io/SelectServer.h" #include "ola/testing/TestUtils.h" using std::string; using ola::io::ConnectedDescriptor; using ola::io::LoopbackDescriptor; using ola::io::PipeDescriptor; #ifndef _WIN32 using ola::io::UnixSocket; #endif // !_WIN32 using ola::io::SelectServer; static const unsigned char test_cstring[] = "Foo"; // used to set a timeout which aborts the tests static const int ABORT_TIMEOUT_IN_MS = 1000; class DescriptorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DescriptorTest); CPPUNIT_TEST(testLoopbackDescriptor); CPPUNIT_TEST(testPipeDescriptorClientClose); CPPUNIT_TEST(testPipeDescriptorServerClose); #ifndef _WIN32 CPPUNIT_TEST(testUnixSocketClientClose); CPPUNIT_TEST(testUnixSocketServerClose); #endif // !_WIN32 CPPUNIT_TEST_SUITE_END(); public: void setUp(); void tearDown(); void testLoopbackDescriptor(); void testPipeDescriptorClientClose(); void testPipeDescriptorServerClose(); #ifndef _WIN32 void testUnixSocketClientClose(); void testUnixSocketServerClose(); #endif // !_WIN32 // timing out indicates something went wrong void Timeout() { OLA_ASSERT_TRUE(false); m_timeout_closure = NULL; } // Socket data actions void ReceiveAndClose(ConnectedDescriptor *socket); void ReceiveAndTerminate(ConnectedDescriptor *socket); void Receive(ConnectedDescriptor *socket); void ReceiveAndSend(ConnectedDescriptor *socket); void ReceiveSendAndClose(ConnectedDescriptor *socket); // Socket close actions void TerminateOnClose() { m_ss->Terminate(); } private: SelectServer *m_ss; ola::SingleUseCallback0 *m_timeout_closure; void SocketClientClose(ConnectedDescriptor *socket, ConnectedDescriptor *socket2); void SocketServerClose(ConnectedDescriptor *socket, ConnectedDescriptor *socket2); }; CPPUNIT_TEST_SUITE_REGISTRATION(DescriptorTest); /* * Setup the select server */ void DescriptorTest::setUp() { m_ss = new SelectServer(); m_timeout_closure = ola::NewSingleCallback(this, &DescriptorTest::Timeout); OLA_ASSERT_TRUE(m_ss->RegisterSingleTimeout(ABORT_TIMEOUT_IN_MS, m_timeout_closure)); #if _WIN32 WSADATA wsa_data; int result = WSAStartup(MAKEWORD(2, 0), &wsa_data); OLA_ASSERT_EQ(result, 0); #endif // _WIN32 } /* * Cleanup the select server */ void DescriptorTest::tearDown() { delete m_ss; #ifdef _WIN32 WSACleanup(); #endif // _WIN32 } /* * Test a loopback socket works correctly */ void DescriptorTest::testLoopbackDescriptor() { LoopbackDescriptor socket; OLA_ASSERT_TRUE(socket.Init()); OLA_ASSERT_FALSE(socket.Init()); socket.SetOnData(ola::NewCallback(this, &DescriptorTest::ReceiveAndTerminate, static_cast(&socket))); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(&socket)); ssize_t bytes_sent = socket.Send( static_cast(test_cstring), sizeof(test_cstring)); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), bytes_sent); m_ss->Run(); m_ss->RemoveReadDescriptor(&socket); } /* * Test a pipe socket works correctly. * The client sends some data and expects the same data to be returned. The * client then closes the connection. */ void DescriptorTest::testPipeDescriptorClientClose() { PipeDescriptor socket; OLA_ASSERT_TRUE(socket.Init()); OLA_ASSERT_FALSE(socket.Init()); SocketClientClose(&socket, socket.OppositeEnd()); } /* * Test a pipe socket works correctly. * The client sends some data. The server echos the data and closes the * connection. */ void DescriptorTest::testPipeDescriptorServerClose() { PipeDescriptor socket; OLA_ASSERT_TRUE(socket.Init()); OLA_ASSERT_FALSE(socket.Init()); SocketServerClose(&socket, socket.OppositeEnd()); } #ifndef _WIN32 /* * Test a unix socket works correctly. * The client sends some data and expects the same data to be returned. The * client then closes the connection. */ void DescriptorTest::testUnixSocketClientClose() { UnixSocket socket; OLA_ASSERT_TRUE(socket.Init()); OLA_ASSERT_FALSE(socket.Init()); SocketClientClose(&socket, socket.OppositeEnd()); } /* * Test a unix socket works correctly. * The client sends some data. The server echos the data and closes the * connection. */ void DescriptorTest::testUnixSocketServerClose() { UnixSocket socket; OLA_ASSERT_TRUE(socket.Init()); OLA_ASSERT_FALSE(socket.Init()); SocketServerClose(&socket, socket.OppositeEnd()); } #endif // !_WIN32 /* * Receive some data and close the socket */ void DescriptorTest::ReceiveAndClose(ConnectedDescriptor *socket) { Receive(socket); m_ss->RemoveReadDescriptor(socket); socket->Close(); } /* * Receive some data and terminate */ void DescriptorTest::ReceiveAndTerminate(ConnectedDescriptor *socket) { Receive(socket); m_ss->Terminate(); } /* * Receive some data and check it's what we expected. */ void DescriptorTest::Receive(ConnectedDescriptor *socket) { // try to read more than what we sent to test non-blocking uint8_t buffer[sizeof(test_cstring) + 10]; unsigned int data_read; OLA_ASSERT_FALSE(socket->Receive(buffer, sizeof(buffer), data_read)); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), data_read); OLA_ASSERT_FALSE(memcmp(test_cstring, buffer, data_read)); } /* * Receive some data and send it back */ void DescriptorTest::ReceiveAndSend(ConnectedDescriptor *socket) { uint8_t buffer[sizeof(test_cstring) + 10]; unsigned int data_read; OLA_ASSERT_EQ(0, socket->Receive(buffer, sizeof(buffer), data_read)); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), data_read); ssize_t bytes_sent = socket->Send(buffer, data_read); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), bytes_sent); } /* * Receive some data, send the same data and close */ void DescriptorTest::ReceiveSendAndClose(ConnectedDescriptor *socket) { ReceiveAndSend(socket); m_ss->RemoveReadDescriptor(socket); socket->Close(); } /** * Generic method to test client initiated close */ void DescriptorTest::SocketClientClose(ConnectedDescriptor *socket, ConnectedDescriptor *socket2) { OLA_ASSERT_TRUE(socket); socket->SetOnData( ola::NewCallback(this, &DescriptorTest::ReceiveAndClose, static_cast(socket))); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(socket)); OLA_ASSERT_TRUE(socket2); socket2->SetOnData( ola::NewCallback(this, &DescriptorTest::ReceiveAndSend, static_cast(socket2))); socket2->SetOnClose( ola::NewSingleCallback(this, &DescriptorTest::TerminateOnClose)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(socket2)); ssize_t bytes_sent = socket->Send( static_cast(test_cstring), sizeof(test_cstring)); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), bytes_sent); m_ss->Run(); m_ss->RemoveReadDescriptor(socket); m_ss->RemoveReadDescriptor(socket2); delete socket2; } /** * Generic method to test server initiated close */ void DescriptorTest::SocketServerClose(ConnectedDescriptor *socket, ConnectedDescriptor *socket2) { OLA_ASSERT_TRUE(socket); socket->SetOnData(ola::NewCallback( this, &DescriptorTest::Receive, static_cast(socket))); socket->SetOnClose( ola::NewSingleCallback(this, &DescriptorTest::TerminateOnClose)); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(socket)); OLA_ASSERT_TRUE(socket2); socket2->SetOnData(ola::NewCallback( this, &DescriptorTest::ReceiveSendAndClose, static_cast(socket2))); OLA_ASSERT_TRUE(m_ss->AddReadDescriptor(socket2)); ssize_t bytes_sent = socket->Send( static_cast(test_cstring), sizeof(test_cstring)); OLA_ASSERT_EQ(static_cast(sizeof(test_cstring)), bytes_sent); m_ss->Run(); m_ss->RemoveReadDescriptor(socket); m_ss->RemoveReadDescriptor(socket2); delete socket2; } ola-0.10.9/common/io/TimeoutManager.cpp0000664000175000017500000000664414376533110014640 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TimeoutManager.cpp * Manages timeout events. * Copyright (C) 2013 Simon Newton */ #include #include #include #include "ola/Logging.h" #include "common/io/TimeoutManager.h" namespace ola { namespace io { // Tracks the # of timer functions registered const char TimeoutManager::K_TIMER_VAR[] = "ss-timers"; using ola::Callback0; using ola::ExportMap; using ola::thread::INVALID_TIMEOUT; using ola::thread::timeout_id; TimeoutManager::TimeoutManager(ExportMap *export_map, Clock *clock) : m_export_map(export_map), m_clock(clock) { if (m_export_map) { m_export_map->GetIntegerVar(K_TIMER_VAR); } } TimeoutManager::~TimeoutManager() { m_removed_timeouts.clear(); while (!m_events.empty()) { delete m_events.top(); m_events.pop(); } } timeout_id TimeoutManager::RegisterRepeatingTimeout( const TimeInterval &interval, ola::Callback0 *closure) { if (!closure) return INVALID_TIMEOUT; if (m_export_map) (*m_export_map->GetIntegerVar(K_TIMER_VAR))++; Event *event = new RepeatingEvent(interval, m_clock, closure); m_events.push(event); return event; } timeout_id TimeoutManager::RegisterSingleTimeout( const TimeInterval &interval, ola::SingleUseCallback0 *closure) { if (!closure) return INVALID_TIMEOUT; if (m_export_map) (*m_export_map->GetIntegerVar(K_TIMER_VAR))++; Event *event = new SingleEvent(interval, m_clock, closure); m_events.push(event); return event; } void TimeoutManager::CancelTimeout(timeout_id id) { // TODO(simon): just mark the timeouts as cancelled rather than using a // remove set. if (id == INVALID_TIMEOUT) return; if (!m_removed_timeouts.insert(id).second) OLA_WARN << "timeout " << id << " already in remove set"; } TimeInterval TimeoutManager::ExecuteTimeouts(TimeStamp *now) { Event *e; if (m_events.empty()) return TimeInterval(); // make sure we only try to access m_events.top() if m_events isn't empty while (!m_events.empty() && ((e = m_events.top())->NextTime() <= *now)) { m_events.pop(); // if this was removed, skip it if (m_removed_timeouts.erase(e)) { delete e; if (m_export_map) (*m_export_map->GetIntegerVar(K_TIMER_VAR))--; continue; } if (e->Trigger()) { // true implies we need to run this again e->UpdateTime(*now); m_events.push(e); } else { delete e; if (m_export_map) (*m_export_map->GetIntegerVar(K_TIMER_VAR))--; } m_clock->CurrentMonotonicTime(now); } if (m_events.empty()) return TimeInterval(); else return m_events.top()->NextTime() - *now; } } // namespace io } // namespace ola ola-0.10.9/common/io/EPoller.h0000664000175000017500000000650714376533110012724 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * EPoller.h * A Poller which uses epoll() * Copyright (C) 2013 Simon Newton */ #ifndef COMMON_IO_EPOLLER_H_ #define COMMON_IO_EPOLLER_H_ #include #include #include #include #include #include #include #include #include #include #include "common/io/PollerInterface.h" #include "common/io/TimeoutManager.h" namespace ola { namespace io { class EPollData; /** * @class EPoller * @brief An implementation of PollerInterface that uses epoll(). * * epoll() is more efficient than select() but only newer Linux systems support * it. */ class EPoller : public PollerInterface { public : /** * @brief Create a new EPoller. * @param export_map the ExportMap to use * @param clock the Clock to use */ EPoller(ExportMap *export_map, Clock *clock); ~EPoller(); bool AddReadDescriptor(class ReadFileDescriptor *descriptor); bool AddReadDescriptor(class ConnectedDescriptor *descriptor, bool delete_on_close); bool RemoveReadDescriptor(class ReadFileDescriptor *descriptor); bool RemoveReadDescriptor(class ConnectedDescriptor *descriptor); bool AddWriteDescriptor(class WriteFileDescriptor *descriptor); bool RemoveWriteDescriptor(class WriteFileDescriptor *descriptor); const TimeStamp *WakeUpTime() const { return &m_wake_up_time; } bool Poll(TimeoutManager *timeout_manager, const TimeInterval &poll_interval); private: typedef std::map DescriptorMap; typedef std::vector DescriptorList; DescriptorMap m_descriptor_map; // EPoller is re-enterant. Remove may be called while we hold a pointer to an // EPollData. To avoid deleting data out from underneath ourselves, we // instead move the removed descriptors to this list and then clean them up // outside the callback loop. DescriptorList m_orphaned_descriptors; // A list of pre-allocated descriptors we can use. DescriptorList m_free_descriptors; ExportMap *m_export_map; CounterVariable *m_loop_iterations; CounterVariable *m_loop_time; int m_epoll_fd; Clock *m_clock; TimeStamp m_wake_up_time; std::pair LookupOrCreateDescriptor(int fd); bool RemoveDescriptor(int fd, int event, bool warn_on_missing); void CheckDescriptor(struct epoll_event *event, EPollData *descriptor); static const int MAX_EVENTS; static const int READ_FLAGS; static const unsigned int MAX_FREE_DESCRIPTORS; DISALLOW_COPY_AND_ASSIGN(EPoller); }; } // namespace io } // namespace ola #endif // COMMON_IO_EPOLLER_H_ ola-0.10.9/common/io/TimeoutManager.h0000664000175000017500000001244514376533110014301 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TimeoutManager.h * Manages timeout events. * Copyright (C) 2013 Simon Newton */ #ifndef COMMON_IO_TIMEOUTMANAGER_H_ #define COMMON_IO_TIMEOUTMANAGER_H_ #include #include #include #include "ola/Callback.h" #include "ola/Clock.h" #include "ola/ExportMap.h" #include "ola/base/Macro.h" #include "ola/thread/SchedulerInterface.h" namespace ola { namespace io { /** * @class TimeoutManager * @brief Manages timer events. * * The TimeoutManager allows Callbacks to trigger at some point in the future. * Callbacks can be invoked once, or periodically. */ class TimeoutManager { public : /** * @brief Create a new TimeoutManager. * @param export_map an ExportMap to update * @param clock the Clock to use. */ TimeoutManager(ola::ExportMap *export_map, Clock *clock); ~TimeoutManager(); /** * @brief Register a repeating timeout. * Returning false from the Callback will cancel this timer. * @param interval the delay before the closure will be run. * @param closure the closure to invoke when the event triggers. Ownership is * given up to the select server - make sure nothing else uses this Callback. * @returns the identifier for this timeout, this can be used to remove it * later. */ ola::thread::timeout_id RegisterRepeatingTimeout( const ola::TimeInterval &interval, ola::Callback0 *closure); /** * @brief Register a single use timeout function. * @param interval the delay between function calls * @param closure the Callback to invoke when the event triggers * @returns the identifier for this timeout, this can be used to remove it * later. */ ola::thread::timeout_id RegisterSingleTimeout( const ola::TimeInterval &interval, ola::SingleUseCallback0 *closure); /** * @brief Cancel a timeout. * @param id the id of the timeout */ void CancelTimeout(ola::thread::timeout_id id); /** * @brief Check if there are any events in the queue. * Events remain in the queue even if they have been cancelled. * @returns true if there are events pending, false otherwise. */ bool EventsPending() const { return !m_events.empty(); } /** * @brief Execute any expired timeouts. * @param[in,out] now the current time, set to the last time events were * checked. * @returns the time until the next event. */ TimeInterval ExecuteTimeouts(TimeStamp *now); static const char K_TIMER_VAR[]; private : class Event { public: explicit Event(const TimeInterval &interval, const Clock *clock) : m_interval(interval) { TimeStamp now; clock->CurrentMonotonicTime(&now); m_next = now + m_interval; } virtual ~Event() {} virtual bool Trigger() = 0; void UpdateTime(const TimeStamp &now) { m_next = now + m_interval; } TimeStamp NextTime() const { return m_next; } private: TimeInterval m_interval; TimeStamp m_next; }; // An event that only happens once class SingleEvent: public Event { public: SingleEvent(const TimeInterval &interval, const Clock *clock, ola::BaseCallback0 *closure): Event(interval, clock), m_closure(closure) { } virtual ~SingleEvent() { if (m_closure) delete m_closure; } bool Trigger() { if (m_closure) { m_closure->Run(); // it's deleted itself at this point m_closure = NULL; } return false; } private: ola::BaseCallback0 *m_closure; }; /* * An event that occurs more than once. The closure can return false to * indicate that it should not be called again. */ class RepeatingEvent: public Event { public: RepeatingEvent(const TimeInterval &interval, const Clock *clock, ola::BaseCallback0 *closure): Event(interval, clock), m_closure(closure) { } ~RepeatingEvent() { delete m_closure; } bool Trigger() { if (!m_closure) return false; return m_closure->Run(); } private: ola::BaseCallback0 *m_closure; }; struct ltevent { bool operator()(Event *e1, Event *e2) const { return e1->NextTime() > e2->NextTime(); } }; typedef std::priority_queue, ltevent> event_queue_t; ola::ExportMap *m_export_map; Clock *m_clock; event_queue_t m_events; std::set m_removed_timeouts; DISALLOW_COPY_AND_ASSIGN(TimeoutManager); }; } // namespace io } // namespace ola #endif // COMMON_IO_TIMEOUTMANAGER_H_ ola-0.10.9/common/io/SelectPoller.h0000664000175000017500000000564414376533110013760 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SelectPoller.h * A Poller which uses select() * Copyright (C) 2013 Simon Newton */ #ifndef COMMON_IO_SELECTPOLLER_H_ #define COMMON_IO_SELECTPOLLER_H_ #include #include #include #include #include #include #include "common/io/PollerInterface.h" #include "common/io/TimeoutManager.h" namespace ola { namespace io { /** * @class SelectPoller * @brief An implementation of PollerInterface that uses select(). * */ class SelectPoller : public PollerInterface { public : /** * @brief Create a new SelectPoller. * @param export_map the ExportMap to use * @param clock the Clock to use */ SelectPoller(ExportMap *export_map, Clock *clock); ~SelectPoller(); bool AddReadDescriptor(class ReadFileDescriptor *descriptor); bool AddReadDescriptor(class ConnectedDescriptor *descriptor, bool delete_on_close); bool RemoveReadDescriptor(class ReadFileDescriptor *descriptor); bool RemoveReadDescriptor(class ConnectedDescriptor *descriptor); bool AddWriteDescriptor(class WriteFileDescriptor *descriptor); bool RemoveWriteDescriptor(class WriteFileDescriptor *descriptor); const TimeStamp *WakeUpTime() const { return &m_wake_up_time; } bool Poll(TimeoutManager *timeout_manager, const TimeInterval &poll_interval); private: typedef struct { ConnectedDescriptor *descriptor; bool delete_on_close; } connected_descriptor_t; typedef std::map ReadDescriptorMap; typedef std::map WriteDescriptorMap; typedef std::map ConnectedDescriptorMap; ExportMap *m_export_map; CounterVariable *m_loop_iterations; CounterVariable *m_loop_time; Clock *m_clock; TimeStamp m_wake_up_time; ReadDescriptorMap m_read_descriptors; WriteDescriptorMap m_write_descriptors; ConnectedDescriptorMap m_connected_read_descriptors; void CheckDescriptors(fd_set *r_set, fd_set *w_set); bool AddDescriptorsToSet(fd_set *r_set, fd_set *w_set, int *max_sd); DISALLOW_COPY_AND_ASSIGN(SelectPoller); }; } // namespace io } // namespace ola #endif // COMMON_IO_SELECTPOLLER_H_ ola-0.10.9/common/io/Descriptor.cpp0000664000175000017500000004420614376533110014031 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Descriptor.cpp * Implementation of the Descriptor classes * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef _WIN32 #include #include #else #include #include #include #endif // _WIN32 #include #include #include "ola/Logging.h" #include "ola/base/Macro.h" #include "ola/io/Descriptor.h" namespace ola { namespace io { #ifndef _WIN32 // Check binary compatibility between IOVec and iovec STATIC_ASSERT(sizeof(struct iovec) == sizeof(struct IOVec)); #endif // _WIN32 #ifdef _WIN32 // DescriptorHandle // ------------------------------------------------ DescriptorHandle::DescriptorHandle(): m_type(GENERIC_DESCRIPTOR), m_event(NULL), m_async_data(NULL), m_async_data_size(NULL) { m_handle.m_fd = -1; } DescriptorHandle::~DescriptorHandle() { } void* ToHandle(const DescriptorHandle &handle) { return handle.m_handle.m_handle; } bool DescriptorHandle::AllocAsyncBuffer() { if (m_async_data || m_async_data_size) { OLA_WARN << "Async data already allocated"; return false; } try { m_async_data = new uint8_t[ASYNC_DATA_BUFFER_SIZE]; m_async_data_size = new uint32_t; *m_async_data_size = 0; } catch (std::exception& ex) { OLA_WARN << ex.what(); } return (m_async_data && m_async_data_size); } void DescriptorHandle::FreeAsyncBuffer() { if (m_async_data) { delete[] m_async_data; m_async_data = NULL; } if (m_async_data_size) { delete m_async_data_size; m_async_data_size = NULL; } } bool DescriptorHandle::IsValid() const { return (m_handle.m_fd != -1); } bool operator!=(const DescriptorHandle &lhs, const DescriptorHandle &rhs) { return !(lhs == rhs); } bool operator==(const DescriptorHandle &lhs, const DescriptorHandle &rhs) { return ((lhs.m_handle.m_fd == rhs.m_handle.m_fd) && (lhs.m_type == rhs.m_type)); } bool operator<(const DescriptorHandle &lhs, const DescriptorHandle &rhs) { return (lhs.m_handle.m_fd < rhs.m_handle.m_fd); } std::ostream& operator<<(std::ostream &stream, const DescriptorHandle &data) { stream << data.m_handle.m_fd; return stream; } #endif // _WIN32 int ToFD(const DescriptorHandle &handle) { #ifdef _WIN32 switch (handle.m_type) { case SOCKET_DESCRIPTOR: return handle.m_handle.m_fd; default: return -1; } #else return handle; #endif // _WIN32 } /** * Helper function to create a anonymous pipe * @param handle_pair a 2 element array which is updated with the handles * @return true if successful, false otherwise. */ bool CreatePipe(DescriptorHandle handle_pair[2]) { #ifdef _WIN32 HANDLE read_handle = NULL; HANDLE write_handle = NULL; static unsigned int pipe_name_counter = 0; std::ostringstream pipe_name; pipe_name << "\\\\.\\Pipe\\OpenLightingArchitecture."; pipe_name.setf(std::ios::hex, std::ios::basefield); pipe_name.setf(std::ios::showbase); pipe_name.width(8); pipe_name << GetCurrentProcessId() << "."; pipe_name.width(8); pipe_name << pipe_name_counter++; SECURITY_ATTRIBUTES security_attributes; // Set the bInheritHandle flag so pipe handles are inherited. security_attributes.nLength = sizeof(SECURITY_ATTRIBUTES); security_attributes.bInheritHandle = TRUE; security_attributes.lpSecurityDescriptor = NULL; read_handle = CreateNamedPipeA( pipe_name.str().c_str(), PIPE_ACCESS_INBOUND | FILE_FLAG_OVERLAPPED, PIPE_TYPE_BYTE | PIPE_WAIT, 1, 4096, 4096, 0, &security_attributes); if (read_handle == INVALID_HANDLE_VALUE) { OLA_WARN << "Could not create read end of pipe: %d" << GetLastError(); return false; } write_handle = CreateFileA( pipe_name.str().c_str(), GENERIC_WRITE, 0, &security_attributes, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL | FILE_FLAG_OVERLAPPED, NULL); if (write_handle == INVALID_HANDLE_VALUE) { OLA_WARN << "Could not create write end of pipe: %d" << GetLastError(); CloseHandle(read_handle); return false; } handle_pair[0].m_handle.m_handle = read_handle; handle_pair[0].m_type = PIPE_DESCRIPTOR; handle_pair[1].m_handle.m_handle = write_handle; handle_pair[1].m_type = PIPE_DESCRIPTOR; if (!handle_pair[0].AllocAsyncBuffer() || !handle_pair[1].AllocAsyncBuffer()) return false; #else if (pipe(handle_pair) < 0) { OLA_WARN << "pipe() failed, " << strerror(errno); return false; } #endif // _WIN32 return true; } // BidirectionalFileDescriptor // ------------------------------------------------ void BidirectionalFileDescriptor::PerformRead() { if (m_on_read) m_on_read->Run(); else OLA_FATAL << "FileDescriptor " << ReadDescriptor() << " is ready but no handler attached, this is bad!"; } void BidirectionalFileDescriptor::PerformWrite() { if (m_on_write) m_on_write->Run(); else OLA_FATAL << "FileDescriptor " << WriteDescriptor() << " is ready but no write handler attached, this is bad!"; } // UnmanagedFileDescriptor // ------------------------------------------------ UnmanagedFileDescriptor::UnmanagedFileDescriptor(int fd) : BidirectionalFileDescriptor() { #ifdef _WIN32 m_handle.m_handle.m_fd = fd; m_handle.m_type = GENERIC_DESCRIPTOR; #else m_handle = fd; #endif // _WIN32 } // ConnectedDescriptor // ------------------------------------------------ bool ConnectedDescriptor::SetNonBlocking(DescriptorHandle fd) { if (fd == INVALID_DESCRIPTOR) return false; #ifdef _WIN32 bool success = true; if (fd.m_type == SOCKET_DESCRIPTOR) { u_long mode = 1; success = (ioctlsocket(ToFD(fd), FIONBIO, &mode) != SOCKET_ERROR); } #else int val = fcntl(fd, F_GETFL, 0); bool success = fcntl(fd, F_SETFL, val | O_NONBLOCK) == 0; #endif // _WIN32 if (!success) { OLA_WARN << "failed to set " << fd << " non-blocking: " << strerror(errno); return false; } return true; } bool ConnectedDescriptor::SetNoSigPipe(DescriptorHandle fd) { if (!IsSocket()) return true; #if HAVE_DECL_SO_NOSIGPIPE int sig_pipe_flag = 1; int ok = setsockopt(fd, SOL_SOCKET, SO_NOSIGPIPE, &sig_pipe_flag, sizeof(sig_pipe_flag)); if (ok == -1) { OLA_INFO << "Failed to disable SIGPIPE on " << fd << ": " << strerror(errno); return false; } #else (void) fd; #endif // HAVE_DECL_SO_NOSIGPIPE return true; } int ConnectedDescriptor::DataRemaining() const { if (!ValidReadDescriptor()) return 0; int unread = 0; #ifdef _WIN32 bool failed = false; if (ReadDescriptor().m_type == PIPE_DESCRIPTOR) { return ReadDescriptor().m_async_data_size ? *ReadDescriptor().m_async_data_size : 0; } else if (ReadDescriptor().m_type == SOCKET_DESCRIPTOR) { u_long unrd; failed = ioctlsocket(ToFD(ReadDescriptor()), FIONREAD, &unrd) < 0; unread = unrd; } else { OLA_WARN << "DataRemaining() called on unsupported descriptor type"; failed = true; } #else bool failed = ioctl(ReadDescriptor(), FIONREAD, &unread) < 0; #endif // _WIN32 if (failed) { OLA_WARN << "ioctl error for " << ReadDescriptor() << ", " << strerror(errno); return 0; } return unread; } ssize_t ConnectedDescriptor::Send(const uint8_t *buffer, unsigned int size) { if (!ValidWriteDescriptor()) return 0; ssize_t bytes_sent; #ifdef _WIN32 if (WriteDescriptor().m_type == PIPE_DESCRIPTOR) { DWORD bytes_written = 0; if (!WriteFile(ToHandle(WriteDescriptor()), buffer, size, &bytes_written, NULL)) { OLA_WARN << "WriteFile() failed with " << GetLastError(); bytes_sent = -1; } else { bytes_sent = bytes_written; } } else if (WriteDescriptor().m_type == SOCKET_DESCRIPTOR) { bytes_sent = send(ToFD(WriteDescriptor()), reinterpret_cast(buffer), size, 0); } else { OLA_WARN << "Send() called on unsupported descriptor type"; return 0; } #else // BSD Sockets #if HAVE_DECL_MSG_NOSIGNAL if (IsSocket()) { bytes_sent = send(WriteDescriptor(), buffer, size, MSG_NOSIGNAL); } else { #endif // HAVE_DECL_MSG_NOSIGNAL bytes_sent = write(WriteDescriptor(), buffer, size); #if HAVE_DECL_MSG_NOSIGNAL } #endif // HAVE_DECL_MSG_NOSIGNAL #endif // _WIN32 if (bytes_sent < 0 || static_cast(bytes_sent) != size) { OLA_INFO << "Failed to send on " << WriteDescriptor() << ": " << strerror(errno); } return bytes_sent; } ssize_t ConnectedDescriptor::Send(IOQueue *ioqueue) { if (!ValidWriteDescriptor()) return 0; int iocnt; const struct IOVec *iov = ioqueue->AsIOVec(&iocnt); ssize_t bytes_sent = 0; #ifdef _WIN32 /* There is no scatter/gather functionality for generic descriptors on * Windows, so this is implemented as a write loop. Derived classes should * re-implement Send() using scatter/gather I/O where available. */ int bytes_written = 0; for (int io = 0; io < iocnt; ++io) { bytes_written = Send(reinterpret_cast(iov[io].iov_base), iov[io].iov_len); if (bytes_written == 0) { OLA_INFO << "Failed to send on " << WriteDescriptor() << ": " << strerror(errno); bytes_sent = -1; break; } bytes_sent += bytes_written; } #else #if HAVE_DECL_MSG_NOSIGNAL if (IsSocket()) { struct msghdr message; memset(&message, 0, sizeof(message)); message.msg_name = NULL; message.msg_namelen = 0; message.msg_iov = reinterpret_cast(const_cast(iov)); message.msg_iovlen = iocnt; bytes_sent = sendmsg(WriteDescriptor(), &message, MSG_NOSIGNAL); } else { #else { #endif // HAVE_DECL_MSG_NOSIGNAL bytes_sent = writev(WriteDescriptor(), reinterpret_cast(iov), iocnt); } #endif // _WIN32 ioqueue->FreeIOVec(iov); if (bytes_sent < 0) { OLA_INFO << "Failed to send on " << WriteDescriptor() << ": " << strerror(errno); } else { ioqueue->Pop(bytes_sent); } return bytes_sent; } int ConnectedDescriptor::Receive( uint8_t *buffer, unsigned int size, unsigned int &data_read) { // NOLINT(runtime/references) int ret; uint8_t *data = buffer; data_read = 0; if (!ValidReadDescriptor()) return -1; while (data_read < size) { #ifdef _WIN32 if (ReadDescriptor().m_type == PIPE_DESCRIPTOR) { if (!ReadDescriptor().m_async_data_size) { OLA_WARN << "No async data buffer for descriptor " << ReadDescriptor(); return -1; } // Check if data was read by the async ReadFile() call DWORD async_data_size = *ReadDescriptor().m_async_data_size; if (async_data_size > 0) { DWORD size_to_copy = std::min(static_cast(size), async_data_size); memcpy(buffer, ReadDescriptor().m_async_data, size_to_copy); data_read = size_to_copy; if (async_data_size > size) { memmove(ReadDescriptor().m_async_data, &(ReadDescriptor().m_async_data[size_to_copy]), async_data_size - size_to_copy); } *ReadDescriptor().m_async_data_size -= size_to_copy; } return 0; } else if (ReadDescriptor().m_type == SOCKET_DESCRIPTOR) { ret = recv(ToFD(ReadDescriptor()), reinterpret_cast(data), size - data_read, 0); if (ret < 0) { if (WSAGetLastError() == WSAEWOULDBLOCK) { return 0; } else if (WSAGetLastError() != WSAEINTR) { OLA_WARN << "read failed, " << WSAGetLastError(); return -1; } } else if (ret == 0) { return 0; } data_read += ret; data += data_read; } else { OLA_WARN << "Descriptor type not implemented for reading: " << ReadDescriptor().m_type; return -1; } } #else if ((ret = read(ReadDescriptor(), data, size - data_read)) < 0) { if (errno == EAGAIN) return 0; if (errno != EINTR) { OLA_WARN << "read failed, " << strerror(errno); return -1; } } else if (ret == 0) { return 0; } data_read += ret; data += data_read; } #endif // _WIN32 return 0; } bool ConnectedDescriptor::IsClosed() const { return DataRemaining() == 0; } // LoopbackDescriptor // ------------------------------------------------ LoopbackDescriptor::LoopbackDescriptor() { m_handle_pair[0] = INVALID_DESCRIPTOR; m_handle_pair[1] = INVALID_DESCRIPTOR; } bool LoopbackDescriptor::Init() { if (m_handle_pair[0] != INVALID_DESCRIPTOR || m_handle_pair[1] != INVALID_DESCRIPTOR) return false; if (!CreatePipe(m_handle_pair)) return false; SetReadNonBlocking(); SetNoSigPipe(WriteDescriptor()); return true; } bool LoopbackDescriptor::Close() { if (m_handle_pair[0] != INVALID_DESCRIPTOR) { #ifdef _WIN32 CloseHandle(ToHandle(m_handle_pair[0])); #else close(m_handle_pair[0]); #endif // _WIN32 } if (m_handle_pair[1] != INVALID_DESCRIPTOR) { #ifdef _WIN32 CloseHandle(ToHandle(m_handle_pair[1])); #else close(m_handle_pair[1]); #endif // _WIN32 } m_handle_pair[0] = INVALID_DESCRIPTOR; m_handle_pair[1] = INVALID_DESCRIPTOR; return true; } bool LoopbackDescriptor::CloseClient() { if (m_handle_pair[1] != INVALID_DESCRIPTOR) { #ifdef _WIN32 CloseHandle(ToHandle(m_handle_pair[1])); #else close(m_handle_pair[1]); #endif // _WIN32 } m_handle_pair[1] = INVALID_DESCRIPTOR; return true; } // PipeDescriptor // ------------------------------------------------ PipeDescriptor::PipeDescriptor(): m_other_end(NULL) { m_in_pair[0] = m_in_pair[1] = INVALID_DESCRIPTOR; m_out_pair[0] = m_out_pair[1] = INVALID_DESCRIPTOR; } bool PipeDescriptor::Init() { if (m_in_pair[0] != INVALID_DESCRIPTOR || m_out_pair[1] != INVALID_DESCRIPTOR) return false; if (!CreatePipe(m_in_pair)) { return false; } if (!CreatePipe(m_out_pair)) { #ifdef _WIN32 CloseHandle(ToHandle(m_in_pair[0])); CloseHandle(ToHandle(m_in_pair[1])); #else close(m_in_pair[0]); close(m_in_pair[1]); #endif // _WIN32 m_in_pair[0] = m_in_pair[1] = INVALID_DESCRIPTOR; return false; } SetReadNonBlocking(); SetNoSigPipe(WriteDescriptor()); return true; } PipeDescriptor *PipeDescriptor::OppositeEnd() { if (m_in_pair[0] == INVALID_DESCRIPTOR || m_out_pair[1] == INVALID_DESCRIPTOR) return NULL; if (!m_other_end) { m_other_end = new PipeDescriptor(m_out_pair, m_in_pair, this); m_other_end->SetReadNonBlocking(); } return m_other_end; } bool PipeDescriptor::Close() { if (m_in_pair[0] != INVALID_DESCRIPTOR) { #ifdef _WIN32 CloseHandle(ToHandle(m_in_pair[0])); #else close(m_in_pair[0]); #endif // _WIN32 } if (m_out_pair[1] != INVALID_DESCRIPTOR) { #ifdef _WIN32 CloseHandle(ToHandle(m_out_pair[1])); #else close(m_out_pair[1]); #endif // _WIN32 } m_in_pair[0] = INVALID_DESCRIPTOR; m_out_pair[1] = INVALID_DESCRIPTOR; return true; } bool PipeDescriptor::CloseClient() { if (m_out_pair[1] != INVALID_DESCRIPTOR) { #ifdef _WIN32 CloseHandle(ToHandle(m_out_pair[1])); #else close(m_out_pair[1]); #endif // _WIN32 } m_out_pair[1] = INVALID_DESCRIPTOR; return true; } PipeDescriptor::PipeDescriptor(DescriptorHandle in_pair[2], DescriptorHandle out_pair[2], PipeDescriptor *other_end) { m_in_pair[0] = in_pair[0]; m_in_pair[1] = in_pair[1]; m_out_pair[0] = out_pair[0]; m_out_pair[1] = out_pair[1]; m_other_end = other_end; } // UnixSocket // ------------------------------------------------ bool UnixSocket::Init() { #ifdef _WIN32 return false; #else int pair[2]; if ((m_handle != INVALID_DESCRIPTOR) || m_other_end) return false; if (socketpair(AF_UNIX, SOCK_STREAM, 0, pair)) { OLA_WARN << "socketpair() failed, " << strerror(errno); return false; } m_handle = pair[0]; SetReadNonBlocking(); SetNoSigPipe(WriteDescriptor()); m_other_end = new UnixSocket(pair[1], this); m_other_end->SetReadNonBlocking(); return true; #endif // _WIN32 } UnixSocket *UnixSocket::OppositeEnd() { return m_other_end; } /* * Close this UnixSocket */ bool UnixSocket::Close() { #ifdef _WIN32 return true; #else if (m_handle != INVALID_DESCRIPTOR) { close(m_handle); } m_handle = INVALID_DESCRIPTOR; return true; #endif // _WIN32 } bool UnixSocket::CloseClient() { #ifndef _WIN32 if (m_handle != INVALID_DESCRIPTOR) shutdown(m_handle, SHUT_WR); #endif // !_WIN32 m_handle = INVALID_DESCRIPTOR; return true; } UnixSocket::UnixSocket(int socket, UnixSocket *other_end) { #ifdef _WIN32 m_handle.m_handle.m_fd = socket; #else m_handle = socket; #endif // _WIN32 m_other_end = other_end; } // DeviceDescriptor // ------------------------------------------------ DeviceDescriptor::DeviceDescriptor(int fd) { #ifdef _WIN32 m_handle.m_handle.m_fd = fd; m_handle.m_type = GENERIC_DESCRIPTOR; #else m_handle = fd; #endif // _WIN32 } bool DeviceDescriptor::Close() { if (m_handle == INVALID_DESCRIPTOR) return true; #ifdef _WIN32 int ret = close(m_handle.m_handle.m_fd); #else int ret = close(m_handle); #endif // _WIN32 m_handle = INVALID_DESCRIPTOR; return ret == 0; } } // namespace io } // namespace ola ola-0.10.9/common/io/OutputStreamTest.cpp0000664000175000017500000000543714376533110015232 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * OutputStreamTest.cpp * Test fixture for the OutputStream class. * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include "ola/Logging.h" #include "ola/io/BigEndianStream.h" #include "ola/io/IOQueue.h" #include "ola/network/NetworkUtils.h" #include "ola/testing/TestUtils.h" using ola::io::IOQueue; using ola::io::BigEndianOutputStream; using ola::network::HostToNetwork; using std::auto_ptr; using std::string; class OutputStreamTest: public CppUnit::TestFixture { public: CPPUNIT_TEST_SUITE(OutputStreamTest); CPPUNIT_TEST(testBasicWrite); CPPUNIT_TEST(testWritePrimatives); CPPUNIT_TEST_SUITE_END(); public: void testBasicWrite(); void testWritePrimatives(); private: IOQueue m_buffer; unsigned int SumLengthOfIOVec(const struct IOVec *iov, int iocnt); }; CPPUNIT_TEST_SUITE_REGISTRATION(OutputStreamTest); /* * Check that basic appending works. */ void OutputStreamTest::testBasicWrite() { BigEndianOutputStream stream(&m_buffer); OLA_ASSERT_EQ(0u, m_buffer.Size()); uint8_t data1[] = {0, 1, 2, 3, 4}; stream.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(5u, m_buffer.Size()); m_buffer.Pop(1); OLA_ASSERT_EQ(4u, m_buffer.Size()); m_buffer.Pop(4); OLA_ASSERT_EQ(0u, m_buffer.Size()); } /* * Check that the << operators work */ void OutputStreamTest::testWritePrimatives() { BigEndianOutputStream stream(&m_buffer); OLA_ASSERT_EQ(0u, m_buffer.Size()); stream << 4; OLA_ASSERT_EQ(4u, m_buffer.Size()); stream << (1u << 31); OLA_ASSERT_EQ(8u, m_buffer.Size()); stream << static_cast(10) << static_cast(2400); OLA_ASSERT_EQ(11u, m_buffer.Size()); // confirm this matches what we expect const unsigned int DATA_SIZE = 20; uint8_t *output_data = new uint8_t[DATA_SIZE]; uint8_t data1[] = {0, 0, 0, 4, 0x80, 0, 0, 0, 0xa, 0x9, 0x60}; unsigned int output_size = m_buffer.Peek(output_data, m_buffer.Size()); OLA_ASSERT_DATA_EQUALS(data1, sizeof(data1), output_data, output_size); delete[] output_data; } ola-0.10.9/common/io/InputStreamTest.cpp0000664000175000017500000000442414376533110015024 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * InputStreamTest.cpp * Test fixture for the InputStream classes. * Copyright (C) 2012 Simon Newton */ #include #include "ola/Logging.h" #include "ola/io/MemoryBuffer.h" #include "ola/io/BigEndianStream.h" #include "ola/testing/TestUtils.h" using ola::io::BigEndianInputStream; using ola::io::MemoryBuffer; class InputStreamTest: public CppUnit::TestFixture { public: CPPUNIT_TEST_SUITE(InputStreamTest); CPPUNIT_TEST(testRead); CPPUNIT_TEST_SUITE_END(); public: void testRead(); }; CPPUNIT_TEST_SUITE_REGISTRATION(InputStreamTest); /* * Confirm that reading works. */ void InputStreamTest::testRead() { uint8_t data[] = { 0x80, 0x81, 0x80, 0x00, 0x83, 0x01, 0x87, 0x65, 0x43, 0x21, 0x12, 0x34, 0x56, 0x78, }; MemoryBuffer buffer(data, sizeof(data)); BigEndianInputStream stream(&buffer); int8_t int8; OLA_ASSERT_TRUE(stream >> int8); OLA_ASSERT_EQ(static_cast(-128), int8); uint8_t uint8; OLA_ASSERT_TRUE(stream >> uint8); OLA_ASSERT_EQ(static_cast(129), uint8); int16_t int16; OLA_ASSERT_TRUE(stream >> int16); OLA_ASSERT_EQ(static_cast(-32768), int16); uint16_t uint16; OLA_ASSERT_TRUE(stream >> uint16); OLA_ASSERT_EQ(static_cast(33537), uint16); int32_t int32; OLA_ASSERT_TRUE(stream >> int32); OLA_ASSERT_EQ(static_cast(-2023406815), int32); uint32_t uint32; OLA_ASSERT_TRUE(stream >> uint32); OLA_ASSERT_EQ(static_cast(305419896), uint32); OLA_ASSERT_FALSE(stream >> uint16); } ola-0.10.9/common/io/IOQueue.cpp0000664000175000017500000001454014376533110013225 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * IOQueue.cpp * A non-contigous memory buffer * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include #include #include #include #include #include namespace ola { namespace io { using std::min; using std::string; /** * @brief IOQueue. */ IOQueue::IOQueue() : m_pool(new MemoryBlockPool()), m_delete_pool(true) { } IOQueue::IOQueue(MemoryBlockPool *block_pool) : m_pool(block_pool), m_delete_pool(false) { } /** * Clean up */ IOQueue::~IOQueue() { Clear(); if (m_delete_pool) delete m_pool; } /** * Return the amount of data in the buffer */ unsigned int IOQueue::Size() const { if (m_blocks.empty()) return 0; unsigned int size = 0; BlockVector::const_iterator iter = m_blocks.begin(); for (; iter != m_blocks.end(); ++iter) size += (*iter)->Size(); return size; } /** * Append (length) bytes of data to the buffer */ void IOQueue::Write(const uint8_t *data, unsigned int length) { unsigned int bytes_written = 0; if (m_blocks.empty()) { AppendBlock(); } while (true) { bytes_written += m_blocks.back()->Append(data + bytes_written, length - bytes_written); if (bytes_written == length) { return; } AppendBlock(); } } /** * Read up to n bytes into the memory location data and shrink the IOQueue by * the amount read. */ unsigned int IOQueue::Read(uint8_t *data, unsigned int n) { unsigned int bytes_read = 0; BlockVector::iterator iter = m_blocks.begin(); while (iter != m_blocks.end() && bytes_read != n) { MemoryBlock *block = *iter; unsigned int bytes_copied = block->Copy(data + bytes_read, n - bytes_read); block->PopFront(bytes_copied); bytes_read += bytes_copied; if (block->Empty()) { m_pool->Release(block); iter = m_blocks.erase(iter); } else { iter++; } } return bytes_read; } /** * Read up to n bytes into the string output. */ unsigned int IOQueue::Read(string *output, unsigned int n) { unsigned int bytes_remaining = n; BlockVector::iterator iter = m_blocks.begin(); while (iter != m_blocks.end() && bytes_remaining) { MemoryBlock *block = *iter; unsigned int bytes_to_copy = std::min(block->Size(), bytes_remaining); output->append(reinterpret_cast(block->Data()), bytes_to_copy); bytes_remaining -= bytes_to_copy; if (block->Empty()) { m_pool->Release(block); iter = m_blocks.erase(iter); } else { iter++; } } return n - bytes_remaining; } /** * Copy the first n bytes into the region pointed to by data */ unsigned int IOQueue::Peek(uint8_t *data, unsigned int n) const { unsigned int bytes_read = 0; BlockVector::const_iterator iter = m_blocks.begin(); while (iter != m_blocks.end() && bytes_read != n) { bytes_read += (*iter)->Copy(data + bytes_read, n - bytes_read); iter++; } return bytes_read; } /** * Remove the first n bytes from the buffer */ void IOQueue::Pop(unsigned int n) { unsigned int bytes_popped = 0; BlockVector::iterator iter = m_blocks.begin(); while (iter != m_blocks.end() && bytes_popped != n) { MemoryBlock *block = *iter; bytes_popped += block->PopFront(n - bytes_popped); if (block->Empty()) { m_pool->Release(block); iter = m_blocks.erase(iter); } else { iter++; } } } /** * Return this IOQueue as an array of IOVec structures. * Note: The IOVec array points at internal memory structures. This array is * invalidated when any non-const methods are called (Append, Pop etc.) * * Is the IOQueue is empty, this will return NULL and set iocnt to 0. * * Use FreeIOVec() to release the IOVec array. */ const struct IOVec *IOQueue::AsIOVec(int *iocnt) const { if (m_blocks.empty()) { *iocnt = 0; return NULL; } int max_number_of_blocks = m_blocks.size(); int number_of_blocks = 0; struct IOVec *vector = new struct IOVec[max_number_of_blocks]; struct IOVec *ptr = vector; BlockVector::const_iterator iter = m_blocks.begin(); for (; iter != m_blocks.end(); ++iter, ++ptr, number_of_blocks++) { ptr->iov_base = (*iter)->Data(); ptr->iov_len = (*iter)->Size(); } *iocnt = number_of_blocks; return vector; } /** * Append an MemoryBlock to this queue. This may leave a hole in the last block * before this method was called, but that's unavoidable without copying (which * we don't want to do). */ void IOQueue::AppendBlock(class MemoryBlock *block) { m_blocks.push_back(block); } void IOQueue::AppendMove(IOQueue *other) { BlockVector::const_iterator iter = other->m_blocks.begin(); for (; iter != other->m_blocks.end(); ++iter) { m_blocks.push_back(*iter); } other->m_blocks.clear(); } /** * Remove all data from the IOQueue. */ void IOQueue::Clear() { BlockVector::iterator iter = m_blocks.begin(); for (; iter != m_blocks.end(); ++iter) m_pool->Release(*iter); m_blocks.clear(); } void IOQueue::Purge() { m_pool->Purge(); } /** * Dump this IOQueue as a human readable string */ void IOQueue::Dump(std::ostream *output) { // For now just alloc memory for the entire thing unsigned int length = Size(); uint8_t *tmp = new uint8_t[length]; length = Peek(tmp, length); ola::FormatData(output, tmp, length); delete[] tmp; } /** * Append another block. */ void IOQueue::AppendBlock() { MemoryBlock *block = m_pool->Allocate(); if (!block) { OLA_FATAL << "Failed to allocate block, we're out of memory!"; } m_blocks.push_back(block); } } // namespace io } // namespace ola ola-0.10.9/common/io/SelectServerThreadTest.cpp0000664000175000017500000000621614376533110016310 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SelectServerThreadTest.cpp * Test fixture for the SelectServer class that ensures Execute works * correctly. * Copyright (C) 2011 Simon Newton */ #include #include "ola/testing/TestUtils.h" #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/io/SelectServer.h" #include "ola/network/Socket.h" // On MinGW, Thread.h pulls in pthread.h which pulls in Windows.h, which needs // to be after WinSock2.h, hence this order #include "ola/thread/Thread.h" using ola::io::SelectServer; using ola::network::UDPSocket; using ola::thread::ThreadId; class TestThread: public ola::thread::Thread { public: TestThread(SelectServer *ss, ThreadId ss_thread_id) : m_ss(ss), m_ss_thread_id(ss_thread_id), m_callback_executed(false) { } void *Run() { m_ss->Execute( ola::NewSingleCallback(this, &TestThread::TestCallback)); return NULL; } void TestCallback() { OLA_ASSERT_TRUE( pthread_equal(m_ss_thread_id, ola::thread::Thread::Self())); m_callback_executed = true; m_ss->Terminate(); } bool CallbackRun() const { return m_callback_executed; } private: SelectServer *m_ss; ThreadId m_ss_thread_id; bool m_callback_executed; }; class SelectServerThreadTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(SelectServerThreadTest); CPPUNIT_TEST(testSameThreadCallback); CPPUNIT_TEST(testDifferentThreadCallback); CPPUNIT_TEST_SUITE_END(); public: void testSameThreadCallback(); void testDifferentThreadCallback(); private: SelectServer m_ss; }; CPPUNIT_TEST_SUITE_REGISTRATION(SelectServerThreadTest); /** * Check that a callback from the SelectServer thread executes. */ void SelectServerThreadTest::testSameThreadCallback() { TestThread test_thread(&m_ss, ola::thread::Thread::Self()); m_ss.Execute( ola::NewSingleCallback(&test_thread, &TestThread::TestCallback)); OLA_ASSERT_FALSE(test_thread.CallbackRun()); m_ss.Run(); OLA_ASSERT_TRUE(test_thread.CallbackRun()); } /* * Check that a callback from a different thread is executed in the * SelectServer thread. */ void SelectServerThreadTest::testDifferentThreadCallback() { TestThread test_thread(&m_ss, ola::thread::Thread::Self()); test_thread.Start(); OLA_ASSERT_FALSE(test_thread.CallbackRun()); m_ss.Run(); test_thread.Join(); OLA_ASSERT_TRUE(test_thread.CallbackRun()); } ola-0.10.9/common/io/MemoryBlockTest.cpp0000664000175000017500000000752714376533110015003 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MemoryBlockTest.cpp * Test fixture for the IOQueue class. * Copyright (C) 2012 Simon Newton */ #include #include #include #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/io/MemoryBlock.h" #include "ola/testing/TestUtils.h" using ola::io::MemoryBlock; class MemoryBlockTest: public CppUnit::TestFixture { public: CPPUNIT_TEST_SUITE(MemoryBlockTest); CPPUNIT_TEST(testAppend); CPPUNIT_TEST(testPrepend); CPPUNIT_TEST_SUITE_END(); public: void testAppend(); void testPrepend(); }; CPPUNIT_TEST_SUITE_REGISTRATION(MemoryBlockTest); /* * Check that basic appending works. */ void MemoryBlockTest::testAppend() { unsigned int size = 100; uint8_t *data = new uint8_t[size]; MemoryBlock block(data, size); OLA_ASSERT_EQ(0u, block.Size()); OLA_ASSERT_EQ(size, block.Capacity()); OLA_ASSERT_EQ(size, block.Remaining()); OLA_ASSERT_TRUE(block.Empty()); OLA_ASSERT_EQ(data, block.Data()); // append 4 bytes const uint8_t data1[] = {1, 2, 3, 4}; block.Append(data1, arraysize(data1)); OLA_ASSERT_EQ(static_cast(arraysize(data1)), block.Size()); OLA_ASSERT_EQ(size - static_cast(arraysize(data1)), block.Remaining()); OLA_ASSERT_FALSE(block.Empty()); OLA_ASSERT_DATA_EQUALS(data1, arraysize(data1), block.Data(), block.Size()); // pop 1 byte OLA_ASSERT_EQ(1u, block.PopFront(1)); OLA_ASSERT_EQ(3u, block.Size()); // popping doesn't change the location of the data in the memory block. OLA_ASSERT_EQ(96u, block.Remaining()); OLA_ASSERT_FALSE(block.Empty()); OLA_ASSERT_DATA_EQUALS(data1 + 1, arraysize(data1) - 1, block.Data(), block.Size()); // try to pop more data than exists OLA_ASSERT_EQ(3u, block.PopFront(5)); OLA_ASSERT_EQ(0u, block.Size()); // now that all data is removed, the block should reset OLA_ASSERT_EQ(100u, block.Remaining()); OLA_ASSERT_TRUE(block.Empty()); } /* * Check that basic prepending works. */ void MemoryBlockTest::testPrepend() { unsigned int size = 100; uint8_t *data = new uint8_t[size]; MemoryBlock block(data, size); // by default the insertion point is at the beginning const uint8_t data1[] = {1, 2, 3, 4}; OLA_ASSERT_EQ(0u, block.Prepend(data1, arraysize(data1))); // seek block.SeekBack(); OLA_ASSERT_EQ(4u, block.Prepend(data1, arraysize(data1))); OLA_ASSERT_EQ(4u, block.Size()); OLA_ASSERT_EQ(0u, block.Remaining()); OLA_ASSERT_FALSE(block.Empty()); OLA_ASSERT_DATA_EQUALS(data1, arraysize(data1), block.Data(), block.Size()); // pop OLA_ASSERT_EQ(1u, block.PopFront(1)); OLA_ASSERT_EQ(3u, block.Size()); // popping doesn't change the location of the data in the memory block. OLA_ASSERT_EQ(0u, block.Remaining()); OLA_ASSERT_FALSE(block.Empty()); OLA_ASSERT_DATA_EQUALS(data1 + 1, arraysize(data1) - 1, block.Data(), block.Size()); // try to pop more data than exists OLA_ASSERT_EQ(3u, block.PopFront(5)); OLA_ASSERT_EQ(0u, block.Size()); // now that all data is removed, the block should reset OLA_ASSERT_EQ(100u, block.Remaining()); } ola-0.10.9/common/io/IOQueueTest.cpp0000664000175000017500000002162114376533110014063 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * IOQueueTest.cpp * Test fixture for the IOQueue class. * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include "ola/Logging.h" #include "ola/io/IOQueue.h" #include "ola/io/MemoryBlockPool.h" #include "ola/testing/TestUtils.h" using ola::io::IOQueue; using ola::io::IOVec; using ola::io::MemoryBlockPool; using std::auto_ptr; using std::string; class IOQueueTest: public CppUnit::TestFixture { public: CPPUNIT_TEST_SUITE(IOQueueTest); CPPUNIT_TEST(testBasicWrite); CPPUNIT_TEST(testBlockOverflow); CPPUNIT_TEST(testPop); CPPUNIT_TEST(testPeek); CPPUNIT_TEST(testIOVec); CPPUNIT_TEST(testDump); CPPUNIT_TEST(testStringRead); CPPUNIT_TEST_SUITE_END(); public: void setUp(); void tearDown() {} void testBasicWrite(); void testBlockOverflow(); void testPop(); void testPeek(); void testIOVec(); void testDump(); void testStringRead(); private: auto_ptr m_buffer; unsigned int SumLengthOfIOVec(const struct IOVec *iov, int iocnt); }; CPPUNIT_TEST_SUITE_REGISTRATION(IOQueueTest); void IOQueueTest::setUp() { m_buffer.reset(new IOQueue()); } /** * Sum up the length of data in a IOVec */ unsigned int IOQueueTest::SumLengthOfIOVec(const struct IOVec *iov, int iocnt) { unsigned int sum = 0; for (int i = 0; i < iocnt; iov++, i++) sum += iov->iov_len; return sum; } /* * Check that basic appending works. */ void IOQueueTest::testBasicWrite() { OLA_ASSERT_EQ(0u, m_buffer->Size()); uint8_t data1[] = {0, 1, 2, 3, 4}; m_buffer->Write(data1, sizeof(data1)); OLA_ASSERT_EQ(5u, m_buffer->Size()); m_buffer->Pop(1); OLA_ASSERT_EQ(4u, m_buffer->Size()); m_buffer->Pop(4); OLA_ASSERT_EQ(0u, m_buffer->Size()); } /* * Check that overflowing blocks works */ void IOQueueTest::testBlockOverflow() { // block size of 4 MemoryBlockPool pool(4); IOQueue queue(&pool); uint8_t data1[] = {0, 1, 2, 3, 4}; uint8_t data2[] = {5, 6, 7, 8, 9}; uint8_t data3[] = {0xa, 0xb, 0xc, 0xd, 0xe}; queue.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(5u, queue.Size()); queue.Write(data2, sizeof(data2)); OLA_ASSERT_EQ(10u, queue.Size()); queue.Write(data3, sizeof(data3)); OLA_ASSERT_EQ(15u, queue.Size()); queue.Pop(9); OLA_ASSERT_EQ(6u, queue.Size()); // append some more data queue.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(11u, queue.Size()); queue.Write(data2, sizeof(data2)); OLA_ASSERT_EQ(16u, queue.Size()); } /** * Test that Pop behaves */ void IOQueueTest::testPop() { uint8_t data1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; m_buffer->Write(data1, sizeof(data1)); OLA_ASSERT_EQ(9u, m_buffer->Size()); OLA_ASSERT_FALSE(m_buffer->Empty()); m_buffer->Pop(9); OLA_ASSERT_EQ(0u, m_buffer->Size()); OLA_ASSERT_TRUE(m_buffer->Empty()); // try to pop off more data m_buffer->Pop(1); OLA_ASSERT_EQ(0u, m_buffer->Size()); OLA_ASSERT_TRUE(m_buffer->Empty()); // add the data back, then try to pop off more than we have m_buffer->Write(data1, sizeof(data1)); OLA_ASSERT_EQ(9u, m_buffer->Size()); OLA_ASSERT_FALSE(m_buffer->Empty()); m_buffer->Pop(10); OLA_ASSERT_EQ(0u, m_buffer->Size()); OLA_ASSERT_TRUE(m_buffer->Empty()); // one more time m_buffer->Write(data1, sizeof(data1)); OLA_ASSERT_EQ(9u, m_buffer->Size()); // Now try a buffer with smaller blocks MemoryBlockPool pool(4); IOQueue queue(&pool); queue.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(9u, queue.Size()); // pop the same amount as the first block size queue.Pop(4); OLA_ASSERT_EQ(5u, queue.Size()); OLA_ASSERT_FALSE(queue.Empty()); // now pop more than the buffer size queue.Pop(6); OLA_ASSERT_EQ(0u, queue.Size()); OLA_ASSERT_TRUE(queue.Empty()); // test the block boundary uint8_t *output_data = new uint8_t[4]; m_buffer.reset(new IOQueue(&pool)); queue.Write(data1, 4); OLA_ASSERT_EQ(4u, queue.Size()); unsigned int output_size = queue.Peek(output_data, 4); OLA_ASSERT_DATA_EQUALS(data1, 4, output_data, output_size); queue.Pop(4); OLA_ASSERT_TRUE(queue.Empty()); // now add some more data queue.Write(data1 + 4, 4); OLA_ASSERT_EQ(4u, queue.Size()); output_size = queue.Peek(output_data, 4); OLA_ASSERT_DATA_EQUALS(data1 + 4, 4, output_data, output_size); queue.Pop(4); OLA_ASSERT_TRUE(queue.Empty()); delete[] output_data; } /** * Test that Peek behaves */ void IOQueueTest::testPeek() { uint8_t data1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; m_buffer->Write(data1, sizeof(data1)); OLA_ASSERT_EQ(9u, m_buffer->Size()); OLA_ASSERT_FALSE(m_buffer->Empty()); const unsigned int DATA_SIZE = 20; uint8_t *output_data = new uint8_t[DATA_SIZE]; // peek at the first four bytes unsigned int output_size = m_buffer->Peek(output_data, 4); OLA_ASSERT_DATA_EQUALS(data1, 4, output_data, output_size); OLA_ASSERT_EQ(9u, m_buffer->Size()); // peek at the first 9 bytes output_size = m_buffer->Peek(output_data, 9); OLA_ASSERT_DATA_EQUALS(data1, 9, output_data, output_size); OLA_ASSERT_EQ(9u, m_buffer->Size()); // peek at more bytes that exist in the buffer output_size = m_buffer->Peek(output_data, DATA_SIZE); OLA_ASSERT_EQ(9u, output_size); OLA_ASSERT_DATA_EQUALS(data1, sizeof(data1), output_data, output_size); OLA_ASSERT_EQ(9u, m_buffer->Size()); // Now try a buffer with smaller blocks MemoryBlockPool pool(4); IOQueue queue(&pool); queue.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(9u, queue.Size()); // peek at he same amount as the first block size output_size = queue.Peek(output_data, 4); OLA_ASSERT_DATA_EQUALS(data1, 4, output_data, output_size); OLA_ASSERT_EQ(9u, queue.Size()); OLA_ASSERT_FALSE(queue.Empty()); // peek at data from more than one block output_size = queue.Peek(output_data, 6); OLA_ASSERT_DATA_EQUALS(data1, 6, output_data, output_size); OLA_ASSERT_EQ(9u, queue.Size()); OLA_ASSERT_FALSE(queue.Empty()); // peek at data on the two block boundary output_size = queue.Peek(output_data, 8); OLA_ASSERT_DATA_EQUALS(data1, 8, output_data, output_size); OLA_ASSERT_EQ(9u, queue.Size()); OLA_ASSERT_FALSE(queue.Empty()); // peek at all the data output_size = queue.Peek(output_data, 9); OLA_ASSERT_DATA_EQUALS(data1, 9, output_data, output_size); OLA_ASSERT_EQ(9u, queue.Size()); OLA_ASSERT_FALSE(queue.Empty()); // peek at more data than what exists output_size = queue.Peek(output_data, DATA_SIZE); OLA_ASSERT_EQ(9u, output_size); OLA_ASSERT_DATA_EQUALS(data1, 9, output_data, output_size); OLA_ASSERT_EQ(9u, queue.Size()); OLA_ASSERT_FALSE(queue.Empty()); delete[] output_data; } /** * Test getting / setting IOVec work. */ void IOQueueTest::testIOVec() { uint8_t data1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; m_buffer->Write(data1, sizeof(data1)); OLA_ASSERT_EQ(9u, m_buffer->Size()); OLA_ASSERT_FALSE(m_buffer->Empty()); int iocnt; const struct IOVec *vector = m_buffer->AsIOVec(&iocnt); OLA_ASSERT_EQ(9u, SumLengthOfIOVec(vector, iocnt)); OLA_ASSERT_EQ(1, iocnt); m_buffer->FreeIOVec(vector); // try a smaller block size MemoryBlockPool pool(4); IOQueue queue(&pool); m_buffer.reset(new IOQueue(&pool)); queue.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(9u, queue.Size()); vector = queue.AsIOVec(&iocnt); OLA_ASSERT_EQ(3, iocnt); OLA_ASSERT_EQ(9u, SumLengthOfIOVec(vector, iocnt)); queue.FreeIOVec(vector); } /** * Test dumping to a ostream works */ void IOQueueTest::testDump() { MemoryBlockPool pool(4); IOQueue queue(&pool); uint8_t data1[] = {0, 1, 2, 3, 4, 5, 6, 7, 8}; queue.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(9u, queue.Size()); std::ostringstream str; queue.Dump(&str); OLA_ASSERT_EQ( string("00 01 02 03 04 05 06 07 ........\n" "08 .\n"), str.str()); } /** * Test reading to a string works. */ void IOQueueTest::testStringRead() { MemoryBlockPool pool(4); IOQueue queue(&pool); uint8_t data1[] = {'a', 'b', 'c', 'd', '1', '2', '3', '4', ' '}; queue.Write(data1, sizeof(data1)); OLA_ASSERT_EQ(9u, queue.Size()); string output; OLA_ASSERT_EQ(9u, queue.Read(&output, 9u)); OLA_ASSERT_EQ(string("abcd1234 "), output); } ola-0.10.9/common/io/StdinHandler.cpp0000664000175000017500000000410014376533110014257 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * StdinHandler.cpp * Enables reading input from stdin one character at a time. Useful if you want * to create a simple interactive interface for programs. * Copyright (C) 2012 Simon Newton */ #ifndef _WIN32 #include #endif // _WIN32 #include #include #include namespace ola { namespace io { StdinHandler::StdinHandler(SelectServerInterface *ss, InputCallback *callback) #ifdef _WIN32 : m_stdin_descriptor(0), #else : m_stdin_descriptor(STDIN_FILENO), #endif // _WIN32 m_ss(ss), m_callback(callback) { m_stdin_descriptor.SetOnData( ola::NewCallback(this, &StdinHandler::HandleData)); // turn off buffering #ifdef _WIN32 setbuf(stdin, NULL); #else tcgetattr(STDIN_FILENO, &m_old_tc); termios new_tc = m_old_tc; new_tc.c_lflag &= static_cast(~ICANON & ~ECHO); tcsetattr(STDIN_FILENO, TCSANOW, &new_tc); #endif // _WIN32 // Add to the SelectServer m_ss->AddReadDescriptor(&m_stdin_descriptor); } StdinHandler::~StdinHandler() { m_ss->RemoveReadDescriptor(&m_stdin_descriptor); #ifndef _WIN32 tcsetattr(STDIN_FILENO, TCSANOW, &m_old_tc); #endif // !_WIN32 } void StdinHandler::HandleData() { int c = getchar(); if (m_callback.get()) { m_callback->Run(c); } } } // namespace io } // namespace ola ola-0.10.9/common/io/IOUtils.cpp0000664000175000017500000000307114376533110013236 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * IOUtils.cpp * I/O Helper methods. * Copyright (C) 2013 Simon Newton */ #include "ola/io/IOUtils.h" #include #include #include #include #include #include "ola/Logging.h" namespace ola { namespace io { using std::string; bool Open(const string &path, int oflag, int *fd) { *fd = open(path.c_str(), oflag); if (*fd < 0) { OLA_WARN << "open(" << path << "): " << strerror(errno); return false; } return true; } bool TryOpen(const string &path, int oflag, int *fd) { *fd = open(path.c_str(), oflag); if (*fd < 0) { OLA_INFO << "open(" << path << "): " << strerror(errno); } return *fd >= 0; } bool FileExists(const std::string &file_name) { struct stat file_stat; return 0 == stat(file_name.c_str(), &file_stat); } } // namespace io } // namespace ola ola-0.10.9/common/io/PollerInterface.cpp0000664000175000017500000000324014376533110014762 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PollerInterface.cpp * A poller provides the select loop. * Copyright (C) 2013 Simon Newton */ #include "common/io/PollerInterface.h" #include namespace ola { namespace io { /** * @brief The number of descriptors registered for read events. */ const char PollerInterface::K_READ_DESCRIPTOR_VAR[] = "ss-read-descriptors"; /** * @brief The number of descriptors registered for write events. */ const char PollerInterface::K_WRITE_DESCRIPTOR_VAR[] = "ss-write-descriptor"; /** * @brief The number of connected descriptors registered for read events. */ const char PollerInterface::K_CONNECTED_DESCRIPTORS_VAR[] = "ss-connected-descriptors"; /** * @brief The time spent in the event loop. */ const char PollerInterface::K_LOOP_TIME[] = "ss-loop-time"; /** * @brief The number of iterations through the event loop. */ const char PollerInterface::K_LOOP_COUNT[] = "ss-loop-count"; } // namespace io } // namespace ola ola-0.10.9/common/io/WindowsPoller.h0000664000175000017500000000575614376533110014177 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * WindowsPoller.h * A Poller for the Windows platform * Copyright (C) 2014 Lukas Erlinghagen */ #ifndef COMMON_IO_WINDOWSPOLLER_H_ #define COMMON_IO_WINDOWSPOLLER_H_ #include #include #include #include #define WIN32_LEAN_AND_MEAN #include #include #include #include #include "common/io/PollerInterface.h" #include "common/io/TimeoutManager.h" namespace ola { namespace io { /** * @class WindowsPoller * @brief An implementation of PollerInterface for Windows. */ class WindowsPoller : public PollerInterface { public : /** * @brief Create a new WindowsPoller. * @param export_map the ExportMap to use * @param clock the Clock to use */ WindowsPoller(ExportMap *export_map, Clock *clock); ~WindowsPoller(); bool AddReadDescriptor(class ReadFileDescriptor *descriptor); bool AddReadDescriptor(class ConnectedDescriptor *descriptor, bool delete_on_close); bool RemoveReadDescriptor(class ReadFileDescriptor *descriptor); bool RemoveReadDescriptor(class ConnectedDescriptor *descriptor); bool AddWriteDescriptor(class WriteFileDescriptor *descriptor); bool RemoveWriteDescriptor(class WriteFileDescriptor *descriptor); const TimeStamp *WakeUpTime() const { return &m_wake_up_time; } bool Poll(TimeoutManager *timeout_manager, const TimeInterval &poll_interval); private: typedef std::map DescriptorMap; typedef std::vector OrphanedDescriptors; ExportMap *m_export_map; CounterVariable *m_loop_iterations; CounterVariable *m_loop_time; Clock *m_clock; TimeStamp m_wake_up_time; DescriptorMap m_descriptor_map; OrphanedDescriptors m_orphaned_descriptors; std::pair LookupOrCreateDescriptor(void* handle); bool RemoveDescriptor(const DescriptorHandle &handle, int flag, bool warn_on_missing); void HandleWakeup(class PollData* data); void FinalCheckIOs(std::vector data); DISALLOW_COPY_AND_ASSIGN(WindowsPoller); }; } // namespace io } // namespace ola #endif // COMMON_IO_WINDOWSPOLLER_H_ ola-0.10.9/common/io/Makefile.mk0000664000175000017500000000527314376533110013256 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += \ common/io/Descriptor.cpp \ common/io/ExtendedSerial.cpp \ common/io/EPoller.h \ common/io/IOQueue.cpp \ common/io/IOStack.cpp \ common/io/IOUtils.cpp \ common/io/NonBlockingSender.cpp \ common/io/PollerInterface.cpp \ common/io/PollerInterface.h \ common/io/SelectServer.cpp \ common/io/Serial.cpp \ common/io/StdinHandler.cpp \ common/io/TimeoutManager.cpp \ common/io/TimeoutManager.h if USING_WIN32 common_libolacommon_la_SOURCES += \ common/io/WindowsPoller.cpp \ common/io/WindowsPoller.h else common_libolacommon_la_SOURCES += \ common/io/SelectPoller.cpp \ common/io/SelectPoller.h endif if HAVE_EPOLL common_libolacommon_la_SOURCES += \ common/io/EPoller.h \ common/io/EPoller.cpp endif if HAVE_KQUEUE common_libolacommon_la_SOURCES += \ common/io/KQueuePoller.h \ common/io/KQueuePoller.cpp endif # TESTS ################################################## test_programs += \ common/io/DescriptorTester \ common/io/IOQueueTester \ common/io/IOStackTester \ common/io/MemoryBlockTester \ common/io/SelectServerTester \ common/io/StreamTester \ common/io/TimeoutManagerTester common_io_IOQueueTester_SOURCES = common/io/IOQueueTest.cpp common_io_IOQueueTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_IOQueueTester_LDADD = $(COMMON_TESTING_LIBS) common_io_IOStackTester_SOURCES = common/io/IOStackTest.cpp common_io_IOStackTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_IOStackTester_LDADD = $(COMMON_TESTING_LIBS) common_io_DescriptorTester_SOURCES = common/io/DescriptorTest.cpp common_io_DescriptorTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_DescriptorTester_LDADD = $(COMMON_TESTING_LIBS) common_io_MemoryBlockTester_SOURCES = common/io/MemoryBlockTest.cpp common_io_MemoryBlockTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_MemoryBlockTester_LDADD = $(COMMON_TESTING_LIBS) common_io_SelectServerTester_SOURCES = common/io/SelectServerTest.cpp \ common/io/SelectServerThreadTest.cpp common_io_SelectServerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_SelectServerTester_LDADD = $(COMMON_TESTING_LIBS) common_io_TimeoutManagerTester_SOURCES = common/io/TimeoutManagerTest.cpp common_io_TimeoutManagerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_TimeoutManagerTester_LDADD = $(COMMON_TESTING_LIBS) common_io_StreamTester_SOURCES = common/io/InputStreamTest.cpp \ common/io/OutputStreamTest.cpp common_io_StreamTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_io_StreamTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/io/PollerInterface.h0000664000175000017500000001406014376533110014431 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PollerInterface.h * A poller provides the select loop. * Copyright (C) 2013 Simon Newton */ #ifndef COMMON_IO_POLLERINTERFACE_H_ #define COMMON_IO_POLLERINTERFACE_H_ #include #include #include "common/io/TimeoutManager.h" namespace ola { namespace io { /** * @class PollerInterface * @brief The interface for the Poller classes. * * This forms the basis for the low level event management. The SelectServer * will add / remove descriptors as required and then call Poll() with a * timeout. The Poll() method is responsible for checking for timeouts (via the * TimeoutManager) and then blocking until the descriptors are ready or a * timeout event occurs. This blocking is done with select(), poll(), * epoll() or kevent(), depending on the implementation. * * Once the blocking wait returns. any ready descriptors should the appropriate * method called: ola::io::ReadFileDescriptor::PerformRead(), * ola::io::WriteFileDescriptor::PerformWrite() or the callback set in * ola::io::ConnectedDescriptor::SetOnClose(). Once all * descriptors and any new timeouts have been handled, Poll() returns. * * @warning * It's absolutely critical that implementations of PollerInterface be * reentrant. Calling any of the read / write / close actions may in turn add / * remove descriptors, including the descriptor the method was itself called * on. There are tests in SelectServerTest.cpp to exercise some of these cases * but implementors need to be careful. * * @warning * For example, if Poll() iterates over a set of Descriptors and calls * PerformRead() when appropriate, the RemoveReadDescriptor() method can not * simply call erase on the set, since doing so would invalidate the * iterator held in Poll(). The solution is to either use a data structure that * does not invalidate iterators on erase or use a double-lookup and set the * pointer to NULL to indicate erasure. * * @warning * It's also important to realize that after a RemoveReadDescriptor() or * RemoveWriteDescriptor() is called, neither the FD number nor the pointer to * the Destructor can be used again as a unique identifier. This is because * either may be reused immediately following the call to remove. */ class PollerInterface { public : /** * @brief Destructor */ virtual ~PollerInterface() {} /** * @brief Register a ReadFileDescriptor for read events. * @param descriptor the ReadFileDescriptor to register. The OnData() method * will be called when there is data available for reading. * @returns true if the descriptor was registered, false otherwise. */ virtual bool AddReadDescriptor(ReadFileDescriptor *descriptor) = 0; /** * @brief Register a ConnectedDescriptor for read events. * @param descriptor the ConnectedDescriptor to register. The OnData() method * will be called when there is data available for reading. Additionally, * OnClose() will be called if the other end closes the connection. * @param delete_on_close controls whether the descriptor is deleted when * it's closed. * @returns true if the descriptor was registered, false otherwise. */ virtual bool AddReadDescriptor(ConnectedDescriptor *descriptor, bool delete_on_close) = 0; /** * @brief Unregister a ReadFileDescriptor for read events. * @param descriptor the ReadFileDescriptor to unregister. * @returns true if unregistered successfully, false otherwise. * * @pre descriptor->ReadFileDescriptor() is valid. */ virtual bool RemoveReadDescriptor(ReadFileDescriptor *descriptor) = 0; /** * @brief Unregister a ConnectedDescriptor for read events. * @param descriptor the ConnectedDescriptor to unregister. * @returns true if unregistered successfully, false otherwise. * * @pre descriptor->ReadFileDescriptor() is valid. */ virtual bool RemoveReadDescriptor(ConnectedDescriptor *descriptor) = 0; /** * @brief Register a WriteFileDescriptor to receive ready-to-write events. * @param descriptor the WriteFileDescriptor to register. The PerformWrite() * method will be called when the descriptor is ready for writing. * @returns true if the descriptor was registered, false otherwise. */ virtual bool AddWriteDescriptor(WriteFileDescriptor *descriptor) = 0; /** * @brief Unregister a WriteFileDescriptor for write events. * @param descriptor the WriteFileDescriptor to unregister. * @returns true if unregistered successfully, false otherwise. * * @pre descriptor->WriteFileDescriptor() is valid. */ virtual bool RemoveWriteDescriptor(WriteFileDescriptor *descriptor) = 0; virtual const TimeStamp *WakeUpTime() const = 0; /** * @brief Poll the Descriptors for events and execute any callbacks. * @param timeout_manager the TimeoutManager to use for timer events. * @param poll_interval the maximum time to block for. * @returns false if any errors occurred, true if events were handled. */ virtual bool Poll(TimeoutManager *timeout_manager, const TimeInterval &poll_interval) = 0; static const char K_READ_DESCRIPTOR_VAR[]; static const char K_WRITE_DESCRIPTOR_VAR[]; static const char K_CONNECTED_DESCRIPTORS_VAR[]; protected: static const char K_LOOP_TIME[]; static const char K_LOOP_COUNT[]; }; } // namespace io } // namespace ola #endif // COMMON_IO_POLLERINTERFACE_H_ ola-0.10.9/common/io/KQueuePoller.h0000664000175000017500000000707314376533110013736 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * KQueuePoller.h * A Poller which uses kqueue / kevent * Copyright (C) 2014 Simon Newton */ #ifndef COMMON_IO_KQUEUEPOLLER_H_ #define COMMON_IO_KQUEUEPOLLER_H_ #include #include #include #include #include #include #include #include #include #include #include "common/io/PollerInterface.h" #include "common/io/TimeoutManager.h" namespace ola { namespace io { class KQueueData; /** * @class KQueuePoller * @brief An implementation of PollerInterface that uses kevent / kqueue. * * kevent is more efficient than select() but only BSD-style systems support * it. */ class KQueuePoller : public PollerInterface { public : /** * @brief Create a new KQueuePoller. * @param export_map the ExportMap to use * @param clock the Clock to use */ KQueuePoller(ExportMap *export_map, Clock *clock); ~KQueuePoller(); bool AddReadDescriptor(class ReadFileDescriptor *descriptor); bool AddReadDescriptor(class ConnectedDescriptor *descriptor, bool delete_on_close); bool RemoveReadDescriptor(class ReadFileDescriptor *descriptor); bool RemoveReadDescriptor(class ConnectedDescriptor *descriptor); bool AddWriteDescriptor(class WriteFileDescriptor *descriptor); bool RemoveWriteDescriptor(class WriteFileDescriptor *descriptor); const TimeStamp *WakeUpTime() const { return &m_wake_up_time; } bool Poll(TimeoutManager *timeout_manager, const TimeInterval &poll_interval); private: enum { CHANGE_SET_SIZE = 10 }; typedef std::map DescriptorMap; typedef std::vector DescriptorList; DescriptorMap m_descriptor_map; // KQueuePoller is re-enterant. Remove may be called while we hold a pointer // to an KQueueData. To avoid deleting data out from underneath // ourselves, we instead move the removed descriptors to this list and then // clean them up outside the callback loop. DescriptorList m_orphaned_descriptors; // A list of pre-allocated descriptors we can use. DescriptorList m_free_descriptors; ExportMap *m_export_map; CounterVariable *m_loop_iterations; CounterVariable *m_loop_time; int m_kqueue_fd; struct kevent m_change_set[CHANGE_SET_SIZE]; unsigned int m_next_change_entry; Clock *m_clock; TimeStamp m_wake_up_time; void CheckDescriptor(struct kevent *event); std::pair LookupOrCreateDescriptor(int fd); bool ApplyChange(int fd, int16_t filter, uint16_t flags, KQueueData *kqueue_data, bool apply_immediately); bool RemoveDescriptor(int fd, int16_t filter); static const int MAX_EVENTS; static const unsigned int MAX_FREE_DESCRIPTORS; DISALLOW_COPY_AND_ASSIGN(KQueuePoller); }; } // namespace io } // namespace ola #endif // COMMON_IO_KQUEUEPOLLER_H_ ola-0.10.9/common/io/IOStack.cpp0000664000175000017500000001442014376533110013203 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * IOStack.cpp * A non-contigous memory buffer * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include namespace ola { namespace io { using std::min; using std::string; /** * IOStack. */ IOStack::IOStack() : m_pool(new MemoryBlockPool()), m_delete_pool(true) { } IOStack::IOStack(MemoryBlockPool *block_pool) : m_pool(block_pool), m_delete_pool(false) { } /** * Clean up */ IOStack::~IOStack() { // Return all the blocks to the pool. BlockVector::iterator iter = m_blocks.begin(); for (; iter != m_blocks.end(); ++iter) m_pool->Release(*iter); if (m_delete_pool) delete m_pool; } /** * Return the amount of data in the buffer */ unsigned int IOStack::Size() const { if (m_blocks.empty()) return 0; unsigned int size = 0; BlockVector::const_iterator iter = m_blocks.begin(); for (; iter != m_blocks.end(); ++iter) size += (*iter)->Size(); return size; } /** * Append (length) bytes of data to the front of the buffer. */ void IOStack::Write(const uint8_t *data, unsigned int length) { if (m_blocks.empty()) { PrependBlock(); } unsigned int bytes_written = 0; while (true) { bytes_written += m_blocks.front()->Prepend(data, length - bytes_written); if (bytes_written == length) { return; } PrependBlock(); } } /** * Read up to n bytes into the memory location data and shrink the IOQueue by * the amount read. */ unsigned int IOStack::Read(uint8_t *data, unsigned int length) { unsigned int bytes_read = 0; BlockVector::iterator iter = m_blocks.begin(); while (iter != m_blocks.end() && bytes_read != length) { MemoryBlock *block = *iter; unsigned int bytes_copied = block->Copy(data + bytes_read, length - bytes_read); block->PopFront(bytes_copied); bytes_read += bytes_copied; if (block->Empty()) { m_pool->Release(block); iter = m_blocks.erase(iter); } else { iter++; } } return bytes_read; } /** * Read up to n bytes into the string output. */ unsigned int IOStack::Read(string *output, unsigned int length) { unsigned int bytes_remaining = length; BlockVector::iterator iter = m_blocks.begin(); while (iter != m_blocks.end() && bytes_remaining) { MemoryBlock *block = *iter; unsigned int bytes_to_copy = std::min(block->Size(), bytes_remaining); output->append(reinterpret_cast(block->Data()), bytes_to_copy); bytes_remaining -= bytes_to_copy; if (block->Empty()) { m_pool->Release(block); iter = m_blocks.erase(iter); } else { iter++; } } return length - bytes_remaining; } /** * Return this IOStack as an array of IOVec structures. * Note: The IOVec array points at internal memory structures. This array is * invalidated when any non-const methods are called (Append, Pop etc.) * * Is the IOStack is empty, this will return NULL and set iocnt to 0. * * Use FreeIOVec() to release the IOVec array. */ const struct IOVec *IOStack::AsIOVec(int *iocnt) const { if (m_blocks.empty()) { *iocnt = 0; return NULL; } int max_number_of_blocks = m_blocks.size(); int number_of_blocks = 0; struct IOVec *vector = new struct IOVec[max_number_of_blocks]; struct IOVec *ptr = vector; BlockVector::const_iterator iter = m_blocks.begin(); for (; iter != m_blocks.end(); ++iter, ++ptr, number_of_blocks++) { ptr->iov_base = (*iter)->Data(); ptr->iov_len = (*iter)->Size(); } *iocnt = number_of_blocks; return vector; } /** * Remove bytes from the stack */ void IOStack::Pop(unsigned int bytes_to_remove) { unsigned int bytes_removed = 0; BlockVector::iterator iter = m_blocks.begin(); while (iter != m_blocks.end() && bytes_removed != bytes_to_remove) { MemoryBlock *block = *iter; bytes_removed += block->PopFront(bytes_to_remove - bytes_removed); if (block->Empty()) { m_pool->Release(block); iter = m_blocks.erase(iter); } else { iter++; } } } /** * Append the memory blocks in this stack to the IOQueue. This transfers * ownership of the MemoryBlocks to the queue, so the IOQueue and IOStack * should have the same MemoryBlockPool (or at the very least, the same * implementation). */ void IOStack::MoveToIOQueue(IOQueue *queue) { BlockVector::const_iterator iter = m_blocks.begin(); for (; iter != m_blocks.end(); ++iter) { queue->AppendBlock(*iter); } m_blocks.clear(); } void IOStack::Purge() { m_pool->Purge(); } /** * Dump this IOStack as a human readable string */ void IOStack::Dump(std::ostream *output) { unsigned int length = 0; BlockVector::const_iterator iter = m_blocks.begin(); for (; iter != m_blocks.end(); ++iter) { length += (*iter)->Size(); } // For now just alloc memory for the entire thing uint8_t *tmp = new uint8_t[length]; unsigned int offset = 0; for (iter = m_blocks.begin(); iter != m_blocks.end(); ++iter) { offset += (*iter)->Copy(tmp + offset, length - offset); } ola::FormatData(output, tmp, offset); delete[] tmp; } /** * Append another block. */ void IOStack::PrependBlock() { MemoryBlock *block = m_pool->Allocate(); if (!block) { OLA_FATAL << "Failed to allocate block, we're out of memory!"; } else { block->SeekBack(); // put the block into prepend mode m_blocks.push_front(block); } } } // namespace io } // namespace ola ola-0.10.9/common/io/Serial.cpp0000664000175000017500000001542114376533110013127 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Serial.cpp * Serial I/O Helper methods. * Copyright (C) 2014 Peter Newman */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include #ifdef _WIN32 #define VC_EXTRALEAN #define WIN32_LEAN_AND_MEAN #include #include #else #include #endif // _WIN32 #include #include #include #include #include #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/file/Util.h" #include "ola/io/IOUtils.h" #include "ola/io/Serial.h" #include "ola/StringUtils.h" namespace ola { namespace io { using std::vector; using std::string; namespace { string GetLockFile(const string &path) { const string base_name = ola::file::FilenameFromPath(path); return ola::file::JoinPaths(UUCP_LOCK_DIR, "LCK.." + base_name); } bool GetPidFromFile(const string &lock_file, pid_t *pid) { int fd = open(lock_file.c_str(), O_RDONLY); if (fd < 0) { if (errno == ENOENT) { // If it doesn't exist we're ok, any other error should be treated as if // a lock exists. *pid = 0; return true; } OLA_INFO << "Failed to open " << lock_file << ": " << strerror(errno); return false; } char buffer[100]; int r = read(fd, buffer, arraysize(buffer)); close(fd); if (r < 0) { OLA_INFO << "Failed to read PID from " << lock_file << ": " << strerror(errno); return false; } if (!StringToInt(string(buffer, r), pid)) { OLA_DEBUG << "Failed to convert contents of " << lock_file; return false; } return true; } bool ProcessExists(pid_t pid) { #ifdef _WIN32 // TODO(Peter): Implement this (void) pid; OLA_WARN << "Not implemented yet"; return false; #else errno = 0; if (0 == kill(pid, 0)) { return true; } return errno != ESRCH; #endif // _WIN32 } bool RemoveLockFile(const string &lock_file) { if (unlink(lock_file.c_str())) { OLA_WARN << "Failed to remove UUCP lock file: " << lock_file; return false; } return true; } } // namespace bool UIntToSpeedT(uint32_t value, speed_t *output) { switch (value) { case BAUD_RATE_9600: *output = B9600; return true; case BAUD_RATE_19200: *output = B19200; return true; case BAUD_RATE_38400: *output = B38400; return true; case BAUD_RATE_57600: *output = B57600; return true; case BAUD_RATE_115200: *output = B115200; return true; case BAUD_RATE_230400: *output = B230400; return true; } return false; } bool AcquireUUCPLockAndOpen(const std::string &path, int oflag, int *fd) { // This is rather tricky since there is no real convention for LCK files. // If it was only a single process doing the locking we could use fnctl as // described in 55.6 of the Linux Programming Interface book. // First, check if the path exists, there's no point trying to open it if not if (!FileExists(path)) { OLA_INFO << "Device " << path << " doesn't exist, so there's no point " "trying to acquire a lock"; return false; } // Second, clean up a stale lockfile. const string lock_file = GetLockFile(path); OLA_DEBUG << "Checking for " << lock_file; pid_t locked_pid; if (!GetPidFromFile(lock_file, &locked_pid)) { OLA_INFO << "Failed to get PID from " << lock_file; return false; } if (locked_pid) { // This will return false even if we have the lock, this is what we want // since different plugins may try to open the same serial port - see issue // #888. if (ProcessExists(locked_pid)) { OLA_INFO << "Device " << path << " locked by PID " << locked_pid << " and process exists, failed to acquire lock"; return false; } // There is a race between the read & the unlink here. I'm not convinced it // can be solved. if (!RemoveLockFile(lock_file)) { OLA_INFO << "Device " << path << " was locked by PID " << locked_pid << " which is no longer active, however failed to remove stale " << "lock file"; return false; } } pid_t our_pid = getpid(); // Now try to open the file in O_EXCL mode. If we fail, someone else already // took the lock. int lock_fd = open(lock_file.c_str(), O_RDWR | O_CREAT | O_EXCL, S_IRUSR | S_IWUSR #ifndef _WIN32 | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH #endif // !_WIN32 ); // NOLINT(whitespace/parens) if (lock_fd < 0) { OLA_INFO << "Failed to open " << lock_file << " in exclusive mode: " << strerror(errno); return false; } OLA_INFO << "Acquired " << lock_file; // write our pid to the file std::stringstream str; str << std::setw(10) << our_pid << std::endl; const string pid_file_contents = str.str(); size_t r = write(lock_fd, pid_file_contents.c_str(), pid_file_contents.size()); close(lock_fd); if (r != pid_file_contents.size()) { OLA_WARN << "Failed to write complete LCK file: " << lock_file; RemoveLockFile(lock_file); return false; } // Now try to open the serial device. if (!TryOpen(path, oflag, fd)) { OLA_DEBUG << "Failed to open device " << path << " despite having the " << "lock file"; RemoveLockFile(lock_file); return false; } #if HAVE_SYS_IOCTL_H // As a final safety mechanism, use ioctl(TIOCEXCL) if available to prevent // further opens. if (ioctl(*fd, TIOCEXCL) == -1) { OLA_WARN << "TIOCEXCL " << path << " failed: " << strerror(errno); close(*fd); RemoveLockFile(lock_file); return false; } #endif // HAVE_SYS_IOCTL_H return true; } void ReleaseUUCPLock(const std::string &path) { const string lock_file = GetLockFile(path); pid_t locked_pid; if (!GetPidFromFile(lock_file, &locked_pid)) { return; } pid_t our_pid = getpid(); if (our_pid == locked_pid) { if (RemoveLockFile(lock_file)) { OLA_INFO << "Released " << lock_file; } } } } // namespace io } // namespace ola ola-0.10.9/common/rpc/0000775000175000017500000000000014376533271011446 500000000000000ola-0.10.9/common/rpc/TestService.proto0000664000175000017500000000243314376533110014705 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TestService.proto * Defines a simple service for testing the RpcChannel * Copyright (C) 2005 Simon Newton */ package ola.rpc; option cc_generic_services = false; option py_generic_services = true; message EchoRequest { required string data = 1; optional int64 session_ptr = 2; } message EchoReply { required string data = 1; } message STREAMING_NO_RESPONSE { } service TestService { rpc Echo (EchoRequest) returns (EchoReply); rpc FailedEcho (EchoRequest) returns (EchoReply); rpc Stream (EchoRequest) returns (STREAMING_NO_RESPONSE); } ola-0.10.9/common/rpc/RpcChannel.h0000664000175000017500000001445014376533110013550 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcChannel.h * The RPC Channel * Copyright (C) 2005 Simon Newton */ #ifndef COMMON_RPC_RPCCHANNEL_H_ #define COMMON_RPC_RPCCHANNEL_H_ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include #include #include "ola/ExportMap.h" #include HASH_MAP_H namespace ola { namespace rpc { class RpcMessage; class RpcService; /** * @brief The RPC channel used to communicate between the client and the * server. * This implementation runs over a ConnectedDescriptor which means it can be * used over TCP or pipes. */ class RpcChannel { public : /** * @brief The callback to run when the channel is closed. * * When run, the callback is passed the RpcSession associated with this * channel. */ typedef SingleUseCallback1 CloseCallback; /** * @brief Create a new RpcChannel. * @param service the Service to use to handle incoming requests. Ownership * is not transferred. * @param descriptor the descriptor to use for reading/writing data. The * caller is responsible for registering the descriptor with the * SelectServer. Ownership of the descriptor is not transferred. * @param export_map the ExportMap to use for stats */ RpcChannel(RpcService *service, ola::io::ConnectedDescriptor *descriptor, ExportMap *export_map = NULL); /** * @brief Destructor */ ~RpcChannel(); /** * @brief Set the Service to use to handle incoming requests. * @param service the new Service to use, ownership is not transferred. */ void SetService(RpcService *service) { m_service = service; } /** * @brief Check if there are any pending RPCs on the channel. * Pending RPCs are those where a request has been sent, but no reply has * been received. * @returns true if there is one or more pending RPCs. */ bool PendingRPCs() const { return !m_requests.empty(); } /** * @brief Called when new data arrives on the descriptor. */ void DescriptorReady(); /** * @brief Set the Callback to be run when the channel fails. * The callback will be invoked if the descriptor is closed, or if writes * to the descriptor fail. * @param callback the callback to run when the channel fails. * * @note * The callback will be run from the call stack of the RpcChannel * object. This means you can't delete the RpcChannel object from * within the called, you'll need to queue it up and delete it later. */ void SetChannelCloseHandler(CloseCallback *callback); /** * @brief Invoke an RPC method on this channel. */ void CallMethod(const google::protobuf::MethodDescriptor *method, class RpcController *controller, const google::protobuf::Message *request, google::protobuf::Message *response, SingleUseCallback0 *done); /** * @brief Invoked by the RPC completion handler when the server side * response is ready. * @param request the OutstandingRequest that is now complete. */ void RequestComplete(class OutstandingRequest *request); /** * @brief Return the RpcSession associated with this channel. * @returns the RpcSession associated with this channel. */ RpcSession *Session(); /** * @brief the RPC protocol version. */ static const unsigned int PROTOCOL_VERSION = 1; private: typedef HASH_NAMESPACE::HASH_MAP_CLASS ResponseMap; std::auto_ptr m_session; RpcService *m_service; // service to dispatch requests to std::auto_ptr m_on_close; // the descriptor to read/write to. class ola::io::ConnectedDescriptor *m_descriptor; SequenceNumber m_sequence; uint8_t *m_buffer; // buffer for incoming msgs unsigned int m_buffer_size; // size of the buffer unsigned int m_expected_size; // the total size of the current msg unsigned int m_current_size; // the amount of data read for the current msg HASH_NAMESPACE::HASH_MAP_CLASS m_requests; ResponseMap m_responses; ExportMap *m_export_map; UIntMap *m_recv_type_map; bool SendMsg(RpcMessage *msg); int AllocateMsgBuffer(unsigned int size); int ReadHeader(unsigned int *version, unsigned int *size) const; bool HandleNewMsg(uint8_t *buffer, unsigned int size); void HandleRequest(RpcMessage *msg); void HandleStreamRequest(RpcMessage *msg); // server end void SendRequestFailed(class OutstandingRequest *request); void SendNotImplemented(int msg_id); void DeleteOutstandingRequest(class OutstandingRequest *request); // client end void HandleResponse(RpcMessage *msg); void HandleFailedResponse(RpcMessage *msg); void HandleCanceledResponse(RpcMessage *msg); void HandleNotImplemented(RpcMessage *msg); void HandleChannelClose(); static const char K_RPC_RECEIVED_TYPE_VAR[]; static const char K_RPC_RECEIVED_VAR[]; static const char K_RPC_SENT_ERROR_VAR[]; static const char K_RPC_SENT_VAR[]; static const char *K_RPC_VARIABLES[]; static const char STREAMING_NO_RESPONSE[]; static const unsigned int INITIAL_BUFFER_SIZE = 1 << 11; // 2k static const unsigned int MAX_BUFFER_SIZE = 1 << 20; // 1M }; } // namespace rpc } // namespace ola #endif // COMMON_RPC_RPCCHANNEL_H_ ola-0.10.9/common/rpc/RpcChannelTest.cpp0000664000175000017500000000736514376533110014752 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcChannelTest.cpp * Test fixture for the RpcChannel class * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include "common/rpc/RpcChannel.h" #include "common/rpc/RpcController.h" #include "common/rpc/TestService.h" #include "common/rpc/TestService.pb.h" #include "common/rpc/TestServiceService.pb.h" #include "ola/Callback.h" #include "ola/io/SelectServer.h" #include "ola/network/Socket.h" #include "ola/testing/TestUtils.h" using ola::NewSingleCallback; using ola::io::LoopbackDescriptor; using ola::io::SelectServer; using ola::rpc::EchoReply; using ola::rpc::EchoRequest; using ola::rpc::RpcChannel; using ola::rpc::RpcController; using ola::rpc::STREAMING_NO_RESPONSE; using ola::rpc::RpcController; using ola::rpc::TestService; using ola::rpc::TestService_Stub; using std::auto_ptr; using std::string; class RpcChannelTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RpcChannelTest); CPPUNIT_TEST(testEcho); CPPUNIT_TEST(testFailedEcho); CPPUNIT_TEST(testStreamRequest); CPPUNIT_TEST_SUITE_END(); public: void setUp(); void tearDown(); void testEcho(); void testFailedEcho(); void testStreamRequest(); void EchoComplete(); void FailedEchoComplete(); private: RpcController m_controller; EchoRequest m_request; EchoReply m_reply; SelectServer m_ss; auto_ptr m_service; auto_ptr m_channel; auto_ptr m_stub; auto_ptr m_socket; }; CPPUNIT_TEST_SUITE_REGISTRATION(RpcChannelTest); void RpcChannelTest::setUp() { m_socket.reset(new LoopbackDescriptor()); m_socket->Init(); m_service.reset(new TestServiceImpl(&m_ss)); m_channel.reset(new RpcChannel(m_service.get(), m_socket.get())); m_ss.AddReadDescriptor(m_socket.get()); m_stub.reset(new TestService_Stub(m_channel.get())); } void RpcChannelTest::tearDown() { m_ss.RemoveReadDescriptor(m_socket.get()); } void RpcChannelTest::EchoComplete() { m_ss.Terminate(); OLA_ASSERT_FALSE(m_controller.Failed()); OLA_ASSERT_EQ(m_reply.data(), m_request.data()); } void RpcChannelTest::FailedEchoComplete() { m_ss.Terminate(); OLA_ASSERT_TRUE(m_controller.Failed()); } /* * Check that we can call the echo method in the TestServiceImpl. */ void RpcChannelTest::testEcho() { m_request.set_data("foo"); m_request.set_session_ptr(0); m_stub->Echo(&m_controller, &m_request, &m_reply, NewSingleCallback(this, &RpcChannelTest::EchoComplete)); m_ss.Run(); } /* * Check that method that fail return correctly */ void RpcChannelTest::testFailedEcho() { m_request.set_data("foo"); m_stub->FailedEcho( &m_controller, &m_request, &m_reply, NewSingleCallback(this, &RpcChannelTest::FailedEchoComplete)); m_ss.Run(); } /* * Check stream requests work */ void RpcChannelTest::testStreamRequest() { m_request.set_data("foo"); m_stub->Stream(NULL, &m_request, NULL, NULL); m_ss.Run(); } ola-0.10.9/common/rpc/RpcSession.h0000664000175000017500000000516114376533110013622 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcSession.h * The RPC Session object. * Copyright (C) 2014 Simon Newton */ #ifndef COMMON_RPC_RPCSESSION_H_ #define COMMON_RPC_RPCSESSION_H_ namespace ola { namespace rpc { class RpcChannel; /** * @brief Represents the RPC session between a client and server. * * The RPCSession object contains information about the session an RPC is part * of. For each RPC method on the server side, the RPCSession can be accessed * via the RpcController::Session() method. * * Sessions can have arbitrary user data associated with them, similar to a * cookie in an HTTP request. The user data is usually set in the call to * RpcSessionHandlerInterface::NewClient() but can be set or modified in any of * the RPC calls themselves. * * Since the RPCSession object doesn't take ownership of the user data, its * should be deleted in the call to * RpcSessionHandlerInterface::ClientRemoved(). */ class RpcSession { public: /** * @brief Create a new session object. * @param channel the RpcChannel that the session is using. Ownership is not * transferred. */ explicit RpcSession(RpcChannel *channel) : m_channel(channel), m_data(NULL) { } /** * @brief Returns the underlying RPCChannel * @returns The RPCChannel that corresponds to this session. */ RpcChannel *Channel() { return m_channel; } /** * @brief Associate user data with this session. * @param ptr Opaque user data to associate with this session. Ownership is * not transferred. */ void SetData(void *ptr) { m_data = ptr; } /** * @brief Retrieve the user data associated with this session. * @returns The user data associated with the session. */ void *GetData() const { return m_data; } // TODO(simon): return the RpcPeer here as well. private: RpcChannel *m_channel; void *m_data; }; } // namespace rpc } // namespace ola #endif // COMMON_RPC_RPCSESSION_H_ ola-0.10.9/common/rpc/RpcController.h0000664000175000017500000000524414376533110014324 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcController.h * The RpcController. * Copyright (C) 2005 Simon Newton */ #ifndef COMMON_RPC_RPCCONTROLLER_H_ #define COMMON_RPC_RPCCONTROLLER_H_ #include #include namespace ola { namespace rpc { class RpcSession; /** * @brief A RpcController object is passed every time an RPC is invoked and is * used to indicate the success or failure of the RPC. * * On the client side, the controller can is used once the callback completes to * check the outcome of the RPC with Failed(). If the RPC failed, a description * of the error is available by calling ErrorText(). * * On the server side, the server can fail the RPC by calling SetFailed(...). */ class RpcController { public: /** * @brief Create a new RpcController * @param session the RpcSession to use. Ownership is not transferred. */ explicit RpcController(RpcSession *session = NULL); ~RpcController() {} /** * @brief Reset the state of this controller. Does not affect the session. */ void Reset(); /** * @brief Check if the RPC call this controller was associated with failed. * @returns true if the RPC failed, false if the RPC succeeded. */ bool Failed() const { return m_failed; } /** * @brief Return the error string if the RPC failed. * @returns the error text, or the empty string if the RPC succeeded. */ std::string ErrorText() const { return m_error_text; } /** * @brief Mark this RPC as failed. * @param reason the string to return in ErrorText(). */ void SetFailed(const std::string &reason); /** * @brief Get the session information for this RPC. * * Unless specifically provided, the session be NULL on the client side. * @returns the RpcSession object, ownership is not transferred. */ RpcSession *Session(); private: RpcSession *m_session; bool m_failed; std::string m_error_text; }; } // namespace rpc } // namespace ola #endif // COMMON_RPC_RPCCONTROLLER_H_ ola-0.10.9/common/rpc/RpcHeader.h0000664000175000017500000000346614376533110013375 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcHeader.h * The header for the RPC messages. * Copyright (C) 2005 Simon Newton */ #ifndef COMMON_RPC_RPCHEADER_H_ #define COMMON_RPC_RPCHEADER_H_ #include namespace ola { namespace rpc { class RpcHeader { /* * The first 4 bytes are the header which contains the RPC protocol version * (this is separate from the protobuf version) and the size of the protobuf. */ public: /** * Encode a header */ static void EncodeHeader(uint32_t *header, unsigned int version, unsigned int size) { *header = (version << 28) & VERSION_MASK; *header |= size & SIZE_MASK; } /** * Decode a header */ static void DecodeHeader(uint32_t header, unsigned int *version, unsigned int *size) { *version = (header & VERSION_MASK) >> 28; *size = header & SIZE_MASK; } private: static const unsigned int VERSION_MASK = 0xf0000000; static const unsigned int SIZE_MASK = 0x0fffffff; }; } // namespace rpc } // namespace ola #endif // COMMON_RPC_RPCHEADER_H_ ola-0.10.9/common/rpc/RpcController.cpp0000664000175000017500000000252214376533110014653 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcController.cpp * The RpcController. * Copyright (C) 2005 Simon Newton */ #include "common/rpc/RpcController.h" #include #include "common/rpc/RpcSession.h" namespace ola { namespace rpc { RpcController::RpcController(RpcSession *session) : m_session(session), m_failed(false), m_error_text("") { } void RpcController::Reset() { m_failed = false; m_error_text = ""; } void RpcController::SetFailed(const std::string &reason) { m_failed = true; m_error_text = reason; } RpcSession *RpcController::Session() { return m_session; } } // namespace rpc } // namespace ola ola-0.10.9/common/rpc/RpcServer.cpp0000664000175000017500000001241014376533110013773 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcServer.cpp * A generic RPC server. * Copyright (C) 2014 Simon Newton */ #include "common/rpc/RpcServer.h" #include #include #include #include #include #include "common/rpc/RpcChannel.h" #include "common/rpc/RpcSession.h" namespace ola { namespace rpc { using std::auto_ptr; using ola::io::ConnectedDescriptor; using ola::network::GenericSocketAddress; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::network::TCPAcceptingSocket; using ola::network::TCPSocket; namespace { void CleanupChannel(RpcChannel *channel, ConnectedDescriptor *descriptor) { delete channel; delete descriptor; } } // namespace const char RpcServer::K_CLIENT_VAR[] = "clients-connected"; const char RpcServer::K_RPC_PORT_VAR[] = "rpc-port"; RpcServer::RpcServer(ola::io::SelectServerInterface *ss, RpcService *service, RpcSessionHandlerInterface *session_handler, const Options &options) : m_ss(ss), m_service(service), m_session_handler(session_handler), m_options(options), m_tcp_socket_factory( ola::NewCallback(this, &RpcServer::NewTCPConnection)) { if (m_options.export_map) { m_options.export_map->GetIntegerVar(K_CLIENT_VAR); } } RpcServer::~RpcServer() { // Take a copy since calling the close handler will cause the socket to be // removed from m_connected_sockets ClientDescriptors sockets = m_connected_sockets; ClientDescriptors::const_iterator iter = sockets.begin(); for (; iter != sockets.end(); ++iter) { (*iter)->TransferOnClose()->Run(); } if (!sockets.empty()) { m_ss->DrainCallbacks(); } if (m_accepting_socket.get() && m_accepting_socket->ValidReadDescriptor()) { m_ss->RemoveReadDescriptor(m_accepting_socket.get()); } } bool RpcServer::Init() { if (m_accepting_socket.get()) { return false; } auto_ptr accepting_socket; if (m_options.listen_socket) { accepting_socket.reset(m_options.listen_socket); accepting_socket->SetFactory(&m_tcp_socket_factory); } else { accepting_socket.reset( new TCPAcceptingSocket(&m_tcp_socket_factory)); if (!accepting_socket->Listen( IPV4SocketAddress(IPV4Address::Loopback(), m_options.listen_port))) { OLA_FATAL << "Could not listen on the RPC port " << m_options.listen_port << ", you probably have another instance running."; return false; } if (m_options.export_map) { m_options.export_map->GetIntegerVar(K_RPC_PORT_VAR)->Set( m_options.listen_port); } } if (!m_ss->AddReadDescriptor(accepting_socket.get())) { OLA_WARN << "Failed to add RPC socket to SelectServer"; return false; } m_accepting_socket.reset(accepting_socket.release()); return true; } GenericSocketAddress RpcServer::ListenAddress() { if (m_accepting_socket.get()) { return m_accepting_socket->GetLocalAddress(); } return GenericSocketAddress(); } bool RpcServer::AddClient(ConnectedDescriptor *descriptor) { // If RpcChannel had a pointer to the SelectServer to use, we could hand off // ownership of the socket here. RpcChannel *channel = new RpcChannel(m_service, descriptor, m_options.export_map); if (m_session_handler) { m_session_handler->NewClient(channel->Session()); } channel->SetChannelCloseHandler( NewSingleCallback(this, &RpcServer::ChannelClosed, descriptor)); if (m_options.export_map) { (*m_options.export_map->GetIntegerVar(K_CLIENT_VAR))++; } m_ss->AddReadDescriptor(descriptor); m_connected_sockets.insert(descriptor); return true; } void RpcServer::NewTCPConnection(TCPSocket *socket) { if (!socket) return; socket->SetNoDelay(); AddClient(socket); } void RpcServer::ChannelClosed(ConnectedDescriptor *descriptor, RpcSession *session) { if (m_session_handler) { m_session_handler->ClientRemoved(session); } if (m_options.export_map) { (*m_options.export_map->GetIntegerVar(K_CLIENT_VAR))--; } m_ss->RemoveReadDescriptor(descriptor); m_connected_sockets.erase(descriptor); // We're in the call stack of both the descriptor and the channel here. // We schedule deletion during the next run of the event loop to break out of // the stack. m_ss->Execute( NewSingleCallback(CleanupChannel, session->Channel(), descriptor)); } } // namespace rpc } // namespace ola ola-0.10.9/common/rpc/RpcService.h0000664000175000017500000000403514376533110013576 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcService.h * Interface for the RpcService. * Copyright (C) 2013 Simon Newton * * All Services generated by the ola protoc plugin inherit from this one. */ #ifndef COMMON_RPC_RPCSERVICE_H_ #define COMMON_RPC_RPCSERVICE_H_ #include #include #include "ola/Callback.h" namespace ola { namespace rpc { class RpcController; class RpcService { public: typedef SingleUseCallback0 CompletionCallback; RpcService() {} virtual ~RpcService() {} // Return the descriptor for this service. virtual const google::protobuf::ServiceDescriptor* GetDescriptor() = 0; // Invoke a method. virtual void CallMethod(const google::protobuf::MethodDescriptor *method, RpcController *controller, const google::protobuf::Message *request, google::protobuf::Message *response, CompletionCallback *done) = 0; virtual const google::protobuf::Message& GetRequestPrototype( const google::protobuf::MethodDescriptor *method) const = 0; virtual const google::protobuf::Message& GetResponsePrototype( const google::protobuf::MethodDescriptor *method) const = 0; }; } // namespace rpc } // namespace ola #endif // COMMON_RPC_RPCSERVICE_H_ ola-0.10.9/common/rpc/RpcPeer.h0000664000175000017500000000375014376533110013074 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcPeer.h * Represents the peer of an RpcChannel. * Copyright (C) 2013 Simon Newton */ #ifndef COMMON_RPC_RPCPEER_H_ #define COMMON_RPC_RPCPEER_H_ #include #include #include namespace ola { namespace rpc { class RpcPeer { public: explicit RpcPeer(const ola::network::GenericSocketAddress &socket_addr) : m_socket_addr(socket_addr) { } const ola::network::GenericSocketAddress& SocketAddress() const { return m_socket_addr; } /** * @brief Assignment operator */ RpcPeer& operator=(const RpcPeer& other) { if (this != &other) { m_socket_addr = other.m_socket_addr; } return *this; } /** * @brief Convert a peer to a human readable string. * @returns a string representation of the peer. */ std::string ToString() const { return m_socket_addr.ToString(); } /** * @brief A helper function to write an RpcPeer to an ostream. * @param out the ostream * @param peer the RpcPeer to write. */ friend ostream& operator<<(ostream &out, const RpcPeer &peer) { return out << peer.ToString(); } private: ola::network::GenericSocketAddress m_socket_addr; }; } // namespace rpc } // namespace ola #endif // COMMON_RPC_RPCPEER_H_ ola-0.10.9/common/rpc/TestService.cpp0000664000175000017500000001074514376533110014331 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TestService.cpp * The client and server implementation for the simple echo service. * Copyright (C) 2014 Simon Newton */ #include "common/rpc/TestService.h" #include #include #include "common/rpc/RpcController.h" #include "common/rpc/RpcSession.h" #include "common/rpc/TestServiceService.pb.h" #include "ola/io/SelectServer.h" #include "ola/testing/TestUtils.h" #include "common/rpc/RpcChannel.h" using ola::NewSingleCallback; using ola::io::SelectServer; using ola::rpc::EchoReply; using ola::rpc::EchoRequest; using ola::rpc::RpcChannel; using ola::rpc::RpcController; using ola::rpc::STREAMING_NO_RESPONSE; using ola::rpc::TestService_Stub; using ola::network::TCPSocket; using ola::network::GenericSocketAddress; using std::string; const char TestClient::kTestData[] = "foo"; void TestServiceImpl::Echo(OLA_UNUSED RpcController* controller, OLA_UNUSED const EchoRequest* request, EchoReply* response, CompletionCallback* done) { OLA_ASSERT_TRUE(request->has_session_ptr()); uintptr_t expected_ptr = request->session_ptr(); OLA_ASSERT_EQ(expected_ptr, reinterpret_cast(controller->Session()->GetData())); response->set_data(request->data()); done->Run(); } void TestServiceImpl::FailedEcho(RpcController* controller, OLA_UNUSED const EchoRequest* request, OLA_UNUSED EchoReply* response, CompletionCallback* done) { controller->SetFailed("Error"); done->Run(); } void TestServiceImpl::Stream(RpcController* controller, const ::ola::rpc::EchoRequest* request, STREAMING_NO_RESPONSE* response, CompletionCallback* done) { OLA_ASSERT_NOT_NULL(controller); OLA_ASSERT_FALSE(response); OLA_ASSERT_FALSE(done); OLA_ASSERT_TRUE(request); OLA_ASSERT_EQ(string(TestClient::kTestData), request->data()); m_ss->Terminate(); } TestClient::TestClient(SelectServer *ss, const GenericSocketAddress &server_addr) : m_ss(ss), m_server_addr(server_addr) { } TestClient::~TestClient() { m_ss->RemoveReadDescriptor(m_socket.get()); } bool TestClient::Init() { m_socket.reset(TCPSocket::Connect(m_server_addr)); OLA_ASSERT_NOT_NULL(m_socket.get()); m_channel.reset(new RpcChannel(NULL, m_socket.get())); m_stub.reset(new TestService_Stub(m_channel.get())); m_ss->AddReadDescriptor(m_socket.get()); return true; } void TestClient::CallEcho(void *session_ptr) { EchoRequest request; EchoReply reply; RpcController controller; request.set_data(kTestData); request.set_session_ptr(reinterpret_cast(session_ptr)); m_stub->Echo( &controller, &request, &reply, NewSingleCallback(this, &TestClient::EchoComplete, &controller, &reply)); m_ss->Run(); } void TestClient::CallFailedEcho() { EchoRequest request; EchoReply reply; RpcController controller; request.set_data(kTestData); m_stub->FailedEcho( &controller, &request, &reply, NewSingleCallback(this, &TestClient::FailedEchoComplete, &controller, &reply)); m_ss->Run(); } void TestClient::StreamMessage() { EchoRequest request; request.set_data(kTestData); m_stub->Stream(NULL, &request, NULL, NULL); m_ss->Run(); } void TestClient::EchoComplete(RpcController *controller, EchoReply *reply) { OLA_ASSERT_FALSE(controller->Failed()); OLA_ASSERT_EQ(string(kTestData), reply->data()); m_ss->Terminate(); } void TestClient::FailedEchoComplete(RpcController *controller, OLA_UNUSED EchoReply *reply) { OLA_ASSERT_TRUE(controller->Failed()); m_ss->Terminate(); } ola-0.10.9/common/rpc/RpcControllerTest.cpp0000664000175000017500000000340014376533110015507 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcControllerTest.cpp * Test fixture for the RpcController class * Copyright (C) 2005 Simon Newton */ #include #include #include #include "common/rpc/RpcController.h" #include "ola/testing/TestUtils.h" #include "ola/Callback.h" using std::string; using ola::rpc::RpcController; using ola::rpc::RpcController; class RpcControllerTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RpcControllerTest); CPPUNIT_TEST(testFailed); CPPUNIT_TEST_SUITE_END(); public: void testFailed(); private: void Callback(); bool m_callback_run; }; CPPUNIT_TEST_SUITE_REGISTRATION(RpcControllerTest); void RpcControllerTest::testFailed() { RpcController controller; string failure = "Failed"; controller.SetFailed(failure); OLA_ASSERT_TRUE(controller.Failed()); OLA_ASSERT_EQ(controller.ErrorText(), failure); controller.Reset(); OLA_ASSERT_FALSE(controller.Failed()); } void RpcControllerTest::Callback() { m_callback_run = true; } ola-0.10.9/common/rpc/TestService.h0000664000175000017500000000540514376533110013773 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TestService.h * The client and server implementation for the simple echo service. * Copyright (C) 2014 Simon Newton */ #ifndef COMMON_RPC_TESTSERVICE_H_ #define COMMON_RPC_TESTSERVICE_H_ #include #include "common/rpc/RpcController.h" #include "common/rpc/TestServiceService.pb.h" #include "ola/network/TCPSocket.h" #include "ola/io/SelectServer.h" #include "common/rpc/RpcChannel.h" class TestServiceImpl: public ola::rpc::TestService { public: explicit TestServiceImpl(ola::io::SelectServer *ss) : m_ss(ss) {} ~TestServiceImpl() {} void Echo(ola::rpc::RpcController* controller, const ola::rpc::EchoRequest* request, ola::rpc::EchoReply* response, CompletionCallback* done); void FailedEcho(ola::rpc::RpcController* controller, const ola::rpc::EchoRequest* request, ola::rpc::EchoReply* response, CompletionCallback* done); void Stream(ola::rpc::RpcController* controller, const ola::rpc::EchoRequest* request, ola::rpc::STREAMING_NO_RESPONSE* response, CompletionCallback* done); private: ola::io::SelectServer *m_ss; }; class TestClient { public: TestClient(ola::io::SelectServer *ss, const ola::network::GenericSocketAddress &server_addr); ~TestClient(); bool Init(); // These block until the transaction completes. void CallEcho(void *session_ptr); void CallFailedEcho(); void StreamMessage(); // Completion handlers. void EchoComplete(ola::rpc::RpcController *controller, ola::rpc::EchoReply *reply); void FailedEchoComplete(ola::rpc::RpcController *controller, ola::rpc::EchoReply *reply); static const char kTestData[]; private: ola::io::SelectServer *m_ss; const ola::network::GenericSocketAddress m_server_addr; std::auto_ptr m_socket; std::auto_ptr m_stub; std::auto_ptr m_channel; }; #endif // COMMON_RPC_TESTSERVICE_H_ ola-0.10.9/common/rpc/RpcServer.h0000664000175000017500000001005214376533110013440 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcServer.h * A generic RPC server. * Copyright (C) 2014 Simon Newton */ #ifndef COMMON_RPC_RPCSERVER_H_ #define COMMON_RPC_RPCSERVER_H_ #include #include #include #include #include namespace ola { class ExportMap; namespace rpc { /** * @brief An RPC server. * * The RPCServer starts listening on 127.0.0.0:[listen_port] for new client * connections. After accepting a new client connection it calls * RpcSessionHandlerInterface::NewClient() on the session_handler. For each RPC * it then invokes the correct method from the RpcService object. * * Finally when each client disconnects, it calls * RpcSessionHandlerInterface::ClientRemoved() on the session_handler. */ class RpcServer { public: /** * @brief Options for the RpcServer. */ struct Options { public: /** * @brief The TCP port to listen on. * * If listen_socket is passed, this option is ignored. */ uint16_t listen_port; class ExportMap *export_map; ///< The export map to use for stats. /** * @brief The listening TCP socket to wait for clients on. * * The socket should be in listening mode, i.e. have had * TCPAcceptingSocket::Listen() called. * * Ownership of the socket is transferred to the RpcServer. * This overrides the listen_port option. */ ola::network::TCPAcceptingSocket *listen_socket; Options() : listen_port(0), export_map(NULL), listen_socket(NULL) { } }; /** * @brief Create a new RpcServer. * @param ss The SelectServer to use. * @param service The RPCService to expose. * @param session_handler the RpcSessionHandlerInterface to use for client * connect / disconnect notifications. * @param options Options for the RpcServer. */ RpcServer(ola::io::SelectServerInterface *ss, class RpcService *service, class RpcSessionHandlerInterface *session_handler, const Options &options); ~RpcServer(); /** * @brief Initialize the RpcServer. * @returns true if initialization succeeded, false if it failed. */ bool Init(); /** * @brief Return the address this RpcServer is listening on. * @returns The SocketAddress this RpcServer is listening on. */ ola::network::GenericSocketAddress ListenAddress(); /** * @brief Manually attach a new client on the given descriptor * @param descriptor The ConnectedDescriptor that the client is using. * Ownership of the descriptor is transferred. */ bool AddClient(ola::io::ConnectedDescriptor *descriptor); private: typedef std::set ClientDescriptors; ola::io::SelectServerInterface *m_ss; RpcService *m_service; class RpcSessionHandlerInterface *m_session_handler; const Options m_options; ola::network::TCPSocketFactory m_tcp_socket_factory; std::auto_ptr m_accepting_socket; ClientDescriptors m_connected_sockets; void NewTCPConnection(ola::network::TCPSocket *socket); void ChannelClosed(ola::io::ConnectedDescriptor *socket, class RpcSession *session); static const char K_CLIENT_VAR[]; static const char K_RPC_PORT_VAR[]; }; } // namespace rpc } // namespace ola #endif // COMMON_RPC_RPCSERVER_H_ ola-0.10.9/common/rpc/RpcHeaderTest.cpp0000664000175000017500000000351714376533110014565 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcHeaderTest.cpp * Test fixture for the RpcHeader class * Copyright (C) 2005 Simon Newton */ #include #include #include "common/rpc/RpcChannel.h" #include "common/rpc/RpcHeader.h" #include "ola/testing/TestUtils.h" using ola::rpc::RpcChannel; using ola::rpc::RpcHeader; class RpcHeaderTest : public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RpcHeaderTest); CPPUNIT_TEST(testHeaderEncoding); CPPUNIT_TEST_SUITE_END(); public: void testHeaderEncoding(); }; CPPUNIT_TEST_SUITE_REGISTRATION(RpcHeaderTest); void RpcHeaderTest::testHeaderEncoding() { /* * Test we can encode and decode headers correctly. */ uint32_t header; unsigned int size, version, o_size, o_version; size = 0; version = 0; RpcHeader::EncodeHeader(&header, version, size); RpcHeader::DecodeHeader(header, &o_version, &o_size); OLA_ASSERT_EQ(version, o_version); version = RpcChannel::PROTOCOL_VERSION; size = 24; RpcHeader::EncodeHeader(&header, version, size); RpcHeader::DecodeHeader(header, &o_version, &o_size); OLA_ASSERT_EQ(version, o_version); } ola-0.10.9/common/rpc/RpcServerTest.cpp0000664000175000017500000000512614376533110014641 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcServerTest.cpp * Test fixture for the RpcServer class * Copyright (C) 2014 Simon Newton */ #include #include "common/rpc/RpcServer.h" #include "common/rpc/RpcSession.h" #include "common/rpc/TestService.h" #include "common/rpc/TestServiceService.pb.h" #include "ola/io/SelectServer.h" #include "ola/rpc/RpcSessionHandler.h" #include "ola/testing/TestUtils.h" using ola::io::SelectServer; using ola::rpc::RpcSession; using ola::rpc::RpcServer; using std::auto_ptr; class RpcServerTest: public CppUnit::TestFixture, public ola::rpc::RpcSessionHandlerInterface { CPPUNIT_TEST_SUITE(RpcServerTest); CPPUNIT_TEST(testEcho); CPPUNIT_TEST(testFailedEcho); CPPUNIT_TEST(testStreamRequest); CPPUNIT_TEST_SUITE_END(); public: void testEcho(); void testFailedEcho(); void testStreamRequest(); void setUp(); void NewClient(RpcSession *session); void ClientRemoved(RpcSession *session); private: SelectServer m_ss; auto_ptr m_service; auto_ptr m_server; auto_ptr m_client; uint8_t ptr_data; }; CPPUNIT_TEST_SUITE_REGISTRATION(RpcServerTest); void RpcServerTest::setUp() { m_service.reset(new TestServiceImpl(&m_ss)); m_server.reset(new RpcServer( &m_ss, m_service.get(), this, RpcServer::Options())); OLA_ASSERT_TRUE(m_server->Init()); m_client.reset(new TestClient(&m_ss, m_server->ListenAddress())); OLA_ASSERT_TRUE(m_client->Init()); } void RpcServerTest::NewClient(RpcSession *session) { session->SetData(&ptr_data); } void RpcServerTest::ClientRemoved(RpcSession *session) { OLA_ASSERT_EQ(reinterpret_cast(&ptr_data), session->GetData()); } void RpcServerTest::testEcho() { m_client->CallEcho(&ptr_data); } void RpcServerTest::testFailedEcho() { m_client->CallFailedEcho(); } void RpcServerTest::testStreamRequest() { m_client->StreamMessage(); } ola-0.10.9/common/rpc/Makefile.mk0000664000175000017500000000524614376533110013433 00000000000000built_sources += \ common/rpc/Rpc.pb.cc \ common/rpc/Rpc.pb.h \ common/rpc/TestService.pb.cc \ common/rpc/TestService.pb.h \ common/rpc/TestServiceService.pb.cpp \ common/rpc/TestServiceService.pb.h # LIBRARIES ################################################## common_libolacommon_la_SOURCES += \ common/rpc/RpcChannel.cpp \ common/rpc/RpcChannel.h \ common/rpc/RpcSession.h \ common/rpc/RpcController.cpp \ common/rpc/RpcController.h \ common/rpc/RpcHeader.h \ common/rpc/RpcPeer.h \ common/rpc/RpcServer.cpp \ common/rpc/RpcServer.h \ common/rpc/RpcService.h nodist_common_libolacommon_la_SOURCES += common/rpc/Rpc.pb.cc common_libolacommon_la_LIBADD += $(libprotobuf_LIBS) EXTRA_DIST += \ common/rpc/Rpc.proto \ common/rpc/TestService.proto common/rpc/Rpc.pb.cc common/rpc/Rpc.pb.h: common/rpc/Makefile.mk common/rpc/Rpc.proto $(PROTOC) --cpp_out $(top_builddir)/common/rpc --proto_path $(srcdir)/common/rpc $(srcdir)/common/rpc/Rpc.proto common/rpc/TestService.pb.cc common/rpc/TestService.pb.h: common/rpc/Makefile.mk common/rpc/TestService.proto $(PROTOC) --cpp_out $(top_builddir)/common/rpc --proto_path $(srcdir)/common/rpc $(srcdir)/common/rpc/TestService.proto common/rpc/TestServiceService.pb.cpp common/rpc/TestServiceService.pb.h: common/rpc/Makefile.mk common/rpc/TestService.proto protoc/ola_protoc_plugin$(EXEEXT) $(OLA_PROTOC) --cppservice_out $(top_builddir)/common/rpc --proto_path $(srcdir)/common/rpc $(srcdir)/common/rpc/TestService.proto # TESTS ################################################## test_programs += common/rpc/RpcTester common/rpc/RpcServerTester common_rpc_TEST_SOURCES = \ common/rpc/TestService.h \ common/rpc/TestService.cpp common_rpc_RpcTester_SOURCES = \ common/rpc/RpcControllerTest.cpp \ common/rpc/RpcChannelTest.cpp \ common/rpc/RpcHeaderTest.cpp \ $(common_rpc_TEST_SOURCES) nodist_common_rpc_RpcTester_SOURCES = \ common/rpc/TestService.pb.cc \ common/rpc/TestServiceService.pb.cpp # required, otherwise we get build errors common_rpc_RpcTester_CXXFLAGS = $(COMMON_TESTING_FLAGS_ONLY_WARNINGS) common_rpc_RpcTester_LDADD = $(COMMON_TESTING_LIBS) \ $(libprotobuf_LIBS) common_rpc_RpcServerTester_SOURCES = \ common/rpc/RpcServerTest.cpp \ $(common_rpc_TEST_SOURCES) nodist_common_rpc_RpcServerTester_SOURCES = \ common/rpc/TestService.pb.cc \ common/rpc/TestServiceService.pb.cpp # required, otherwise we get build errors common_rpc_RpcServerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS_ONLY_WARNINGS) common_rpc_RpcServerTester_LDADD = $(COMMON_TESTING_LIBS) \ $(libprotobuf_LIBS) ola-0.10.9/common/rpc/RpcChannel.cpp0000664000175000017500000004127414376533110014107 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RpcChannel.cpp * Interface for the UDP RPC Channel * Copyright (C) 2005 Simon Newton */ #include "common/rpc/RpcChannel.h" #include #include #include #include #include #include #include "common/rpc/Rpc.pb.h" #include "common/rpc/RpcSession.h" #include "common/rpc/RpcController.h" #include "common/rpc/RpcHeader.h" #include "common/rpc/RpcService.h" #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/stl/STLUtils.h" namespace ola { namespace rpc { using google::protobuf::Message; using google::protobuf::MethodDescriptor; using google::protobuf::ServiceDescriptor; using std::auto_ptr; using std::string; const char RpcChannel::K_RPC_RECEIVED_TYPE_VAR[] = "rpc-received-type"; const char RpcChannel::K_RPC_RECEIVED_VAR[] = "rpc-received"; const char RpcChannel::K_RPC_SENT_ERROR_VAR[] = "rpc-send-errors"; const char RpcChannel::K_RPC_SENT_VAR[] = "rpc-sent"; const char RpcChannel::STREAMING_NO_RESPONSE[] = "STREAMING_NO_RESPONSE"; const char *RpcChannel::K_RPC_VARIABLES[] = { K_RPC_RECEIVED_VAR, K_RPC_SENT_ERROR_VAR, K_RPC_SENT_VAR, }; class OutstandingRequest { /* * These are requests on the server end that haven't completed yet. */ public: OutstandingRequest(int id, RpcSession *session, google::protobuf::Message *response) : id(id), controller(new RpcController(session)), response(response) { } ~OutstandingRequest() { if (controller) { delete controller; } if (response) { delete response; } } int id; RpcController *controller; google::protobuf::Message *response; }; class OutstandingResponse { /* * These are Requests on the client end that haven't completed yet. */ public: OutstandingResponse(int id, RpcController *controller, SingleUseCallback0 *callback, Message *reply) : id(id), controller(controller), callback(callback), reply(reply) { } int id; RpcController *controller; SingleUseCallback0 *callback; Message *reply; }; RpcChannel::RpcChannel( RpcService *service, ola::io::ConnectedDescriptor *descriptor, ExportMap *export_map) : m_session(new RpcSession(this)), m_service(service), m_descriptor(descriptor), m_buffer(NULL), m_buffer_size(0), m_expected_size(0), m_current_size(0), m_export_map(export_map), m_recv_type_map(NULL) { if (descriptor) { descriptor->SetOnData( ola::NewCallback(this, &RpcChannel::DescriptorReady)); descriptor->SetOnClose( ola::NewSingleCallback(this, &RpcChannel::HandleChannelClose)); } if (m_export_map) { for (unsigned int i = 0; i < arraysize(K_RPC_VARIABLES); ++i) { m_export_map->GetCounterVar(string(K_RPC_VARIABLES[i])); } m_recv_type_map = m_export_map->GetUIntMapVar(K_RPC_RECEIVED_TYPE_VAR, "type"); } } RpcChannel::~RpcChannel() { free(m_buffer); } void RpcChannel::DescriptorReady() { if (!m_expected_size) { // this is a new msg unsigned int version; if (ReadHeader(&version, &m_expected_size) < 0) return; if (!m_expected_size) return; if (version != PROTOCOL_VERSION) { OLA_WARN << "protocol mismatch " << version << " != " << PROTOCOL_VERSION; return; } if (m_expected_size > MAX_BUFFER_SIZE) { OLA_WARN << "Incoming message size " << m_expected_size << " is larger than MAX_BUFFER_SIZE: " << MAX_BUFFER_SIZE; m_descriptor->Close(); return; } m_current_size = 0; m_buffer_size = AllocateMsgBuffer(m_expected_size); if (m_buffer_size < m_expected_size) { OLA_WARN << "buffer size to small " << m_buffer_size << " < " << m_expected_size; return; } } if (!m_descriptor) { return; } unsigned int data_read; if (m_descriptor->Receive(m_buffer + m_current_size, m_expected_size - m_current_size, data_read) < 0) { OLA_WARN << "something went wrong in descriptor recv\n"; return; } m_current_size += data_read; if (m_current_size == m_expected_size) { // we've got all of this message so parse it. if (!HandleNewMsg(m_buffer, m_expected_size)) { // this probably means we've messed the framing up, close the channel OLA_WARN << "Errors detected on RPC channel, closing"; m_descriptor->Close(); } m_expected_size = 0; } return; } void RpcChannel::SetChannelCloseHandler(CloseCallback *callback) { m_on_close.reset(callback); } void RpcChannel::CallMethod(const MethodDescriptor *method, RpcController *controller, const Message *request, Message *reply, SingleUseCallback0 *done) { // TODO(simonn): reduce the number of copies here string output; RpcMessage message; bool is_streaming = false; // Streaming methods are those with a reply set to STREAMING_NO_RESPONSE and // no controller, request or closure provided if (method->output_type()->name() == STREAMING_NO_RESPONSE) { if (controller || reply || done) { OLA_FATAL << "Calling streaming method " << method->name() << " but a controller, reply or closure in non-NULL"; return; } is_streaming = true; } message.set_type(is_streaming ? STREAM_REQUEST : REQUEST); message.set_id(m_sequence.Next()); message.set_name(method->name()); request->SerializeToString(&output); message.set_buffer(output); bool r = SendMsg(&message); if (is_streaming) return; if (!r) { // Send failed, call the handler now. controller->SetFailed("Failed to send request"); done->Run(); return; } OutstandingResponse *response = new OutstandingResponse( message.id(), controller, done, reply); auto_ptr old_response( STLReplacePtr(&m_responses, message.id(), response)); if (old_response.get()) { // fail any outstanding response with the same id OLA_WARN << "response " << old_response->id << " already pending, failing " << "now"; response->controller->SetFailed("Duplicate request found"); response->callback->Run(); } } void RpcChannel::RequestComplete(OutstandingRequest *request) { string output; RpcMessage message; if (request->controller->Failed()) { SendRequestFailed(request); return; } message.set_type(RESPONSE); message.set_id(request->id); request->response->SerializeToString(&output); message.set_buffer(output); SendMsg(&message); DeleteOutstandingRequest(request); } RpcSession *RpcChannel::Session() { return m_session.get(); } // private //----------------------------------------------------------------------------- /* * Write an RpcMessage to the write descriptor. */ bool RpcChannel::SendMsg(RpcMessage *msg) { if (!(m_descriptor && m_descriptor->ValidReadDescriptor())) { OLA_WARN << "RPC descriptor closed, not sending messages"; return false; } uint32_t header; // reserve the first 4 bytes for the header string output(sizeof(header), 0); msg->AppendToString(&output); int length = output.size(); RpcHeader::EncodeHeader(&header, PROTOCOL_VERSION, length - sizeof(header)); output.replace( 0, sizeof(header), reinterpret_cast(&header), sizeof(header)); ssize_t ret = m_descriptor->Send( reinterpret_cast(output.data()), length); if (ret != length) { OLA_WARN << "Failed to send full RPC message, closing channel"; if (m_export_map) { (*m_export_map->GetCounterVar(K_RPC_SENT_ERROR_VAR))++; } // At this point there is no point using the descriptor since framing has // probably been messed up. // TODO(simon): consider if it's worth leaving the descriptor open for // reading. m_descriptor = NULL; HandleChannelClose(); return false; } if (m_export_map) { (*m_export_map->GetCounterVar(K_RPC_SENT_VAR))++; } return true; } /* * Allocate an incoming message buffer * @param size the size of the new buffer to allocate * @returns the size of the new buffer */ int RpcChannel::AllocateMsgBuffer(unsigned int size) { unsigned int requested_size = size; uint8_t *new_buffer; if (size < m_buffer_size) return size; if (m_buffer_size == 0 && size < INITIAL_BUFFER_SIZE) requested_size = INITIAL_BUFFER_SIZE; if (requested_size > MAX_BUFFER_SIZE) { OLA_WARN << "Incoming message size " << requested_size << " is larger than MAX_BUFFER_SIZE: " << MAX_BUFFER_SIZE; return m_buffer_size; } new_buffer = static_cast(realloc(m_buffer, requested_size)); if (!new_buffer) return m_buffer_size; m_buffer = new_buffer; m_buffer_size = requested_size; return requested_size; } /* * Read 4 bytes and decode the header fields. * @returns: -1 if there is no data is available, version and size are 0 */ int RpcChannel::ReadHeader(unsigned int *version, unsigned int *size) const { uint32_t header; unsigned int data_read = 0; *version = *size = 0; if (m_descriptor->Receive(reinterpret_cast(&header), sizeof(header), data_read)) { OLA_WARN << "read header error: " << strerror(errno); return -1; } if (!data_read) return 0; RpcHeader::DecodeHeader(header, version, size); return 0; } /* * Parse a new message and handle it. */ bool RpcChannel::HandleNewMsg(uint8_t *data, unsigned int size) { RpcMessage msg; if (!msg.ParseFromArray(data, size)) { OLA_WARN << "Failed to parse RPC"; return false; } if (m_export_map) (*m_export_map->GetCounterVar(K_RPC_RECEIVED_VAR))++; switch (msg.type()) { case REQUEST: if (m_recv_type_map) (*m_recv_type_map)["request"]++; HandleRequest(&msg); break; case RESPONSE: if (m_recv_type_map) (*m_recv_type_map)["response"]++; HandleResponse(&msg); break; case RESPONSE_CANCEL: if (m_recv_type_map) (*m_recv_type_map)["cancelled"]++; HandleCanceledResponse(&msg); break; case RESPONSE_FAILED: if (m_recv_type_map) (*m_recv_type_map)["failed"]++; HandleFailedResponse(&msg); break; case RESPONSE_NOT_IMPLEMENTED: if (m_recv_type_map) (*m_recv_type_map)["not-implemented"]++; HandleNotImplemented(&msg); break; case STREAM_REQUEST: if (m_recv_type_map) (*m_recv_type_map)["stream_request"]++; HandleStreamRequest(&msg); break; default: OLA_WARN << "not sure of msg type " << msg.type(); break; } return true; } /* * Handle a new RPC method call. */ void RpcChannel::HandleRequest(RpcMessage *msg) { if (!m_service) { OLA_WARN << "no service registered"; return; } const ServiceDescriptor *service = m_service->GetDescriptor(); if (!service) { OLA_WARN << "failed to get service descriptor"; return; } const MethodDescriptor *method = service->FindMethodByName(msg->name()); if (!method) { OLA_WARN << "failed to get method descriptor"; SendNotImplemented(msg->id()); return; } Message* request_pb = m_service->GetRequestPrototype(method).New(); Message* response_pb = m_service->GetResponsePrototype(method).New(); if (!request_pb || !response_pb) { OLA_WARN << "failed to get request or response objects"; return; } if (!request_pb->ParseFromString(msg->buffer())) { OLA_WARN << "parsing of request pb failed"; return; } OutstandingRequest *request = new OutstandingRequest( msg->id(), m_session.get(), response_pb); if (m_requests.find(msg->id()) != m_requests.end()) { OLA_WARN << "dup sequence number for request " << msg->id(); SendRequestFailed(m_requests[msg->id()]); } m_requests[msg->id()] = request; SingleUseCallback0 *callback = NewSingleCallback( this, &RpcChannel::RequestComplete, request); m_service->CallMethod(method, request->controller, request_pb, response_pb, callback); delete request_pb; } /* * Handle a streaming RPC call. This doesn't return any response to the client. */ void RpcChannel::HandleStreamRequest(RpcMessage *msg) { if (!m_service) { OLA_WARN << "no service registered"; return; } const ServiceDescriptor *service = m_service->GetDescriptor(); if (!service) { OLA_WARN << "failed to get service descriptor"; return; } const MethodDescriptor *method = service->FindMethodByName(msg->name()); if (!method) { OLA_WARN << "failed to get method descriptor"; SendNotImplemented(msg->id()); return; } if (method->output_type()->name() != STREAMING_NO_RESPONSE) { OLA_WARN << "Streaming request received for " << method->name() << ", but the output type isn't STREAMING_NO_RESPONSE"; return; } Message* request_pb = m_service->GetRequestPrototype(method).New(); if (!request_pb) { OLA_WARN << "failed to get request or response objects"; return; } if (!request_pb->ParseFromString(msg->buffer())) { OLA_WARN << "parsing of request pb failed"; return; } RpcController controller(m_session.get()); m_service->CallMethod(method, &controller, request_pb, NULL, NULL); delete request_pb; } // server side /* * Notify the caller that the request failed. */ void RpcChannel::SendRequestFailed(OutstandingRequest *request) { RpcMessage message; message.set_type(RESPONSE_FAILED); message.set_id(request->id); message.set_buffer(request->controller->ErrorText()); SendMsg(&message); DeleteOutstandingRequest(request); } /* * Sent if we get a request for a non-existent method. */ void RpcChannel::SendNotImplemented(int msg_id) { RpcMessage message; message.set_type(RESPONSE_NOT_IMPLEMENTED); message.set_id(msg_id); SendMsg(&message); } /* * Cleanup an outstanding request after the response has been returned */ void RpcChannel::DeleteOutstandingRequest(OutstandingRequest *request) { STLRemoveAndDelete(&m_requests, request->id); } // client side methods /* * Handle a RPC response by invoking the callback. */ void RpcChannel::HandleResponse(RpcMessage *msg) { auto_ptr response( STLLookupAndRemovePtr(&m_responses, msg->id())); if (response.get()) { if (!response->reply->ParseFromString(msg->buffer())) { OLA_WARN << "Failed to parse response proto for " << response->reply->GetTypeName(); } response->callback->Run(); } } /* * Handle a RPC response by invoking the callback. */ void RpcChannel::HandleFailedResponse(RpcMessage *msg) { auto_ptr response( STLLookupAndRemovePtr(&m_responses, msg->id())); if (response.get()) { response->controller->SetFailed(msg->buffer()); response->callback->Run(); } } /* * Handle a RPC response by invoking the callback. */ void RpcChannel::HandleCanceledResponse(RpcMessage *msg) { OLA_INFO << "Received a canceled response"; auto_ptr response( STLLookupAndRemovePtr(&m_responses, msg->id())); if (response.get()) { response->controller->SetFailed(msg->buffer()); response->callback->Run(); } } /* * Handle a NOT_IMPLEMENTED by invoking the callback. */ void RpcChannel::HandleNotImplemented(RpcMessage *msg) { OLA_INFO << "Received a non-implemented response"; auto_ptr response( STLLookupAndRemovePtr(&m_responses, msg->id())); if (response.get()) { response->controller->SetFailed("Not Implemented"); response->callback->Run(); } } /* * Invoke the Channel close handler/ */ void RpcChannel::HandleChannelClose() { if (m_on_close.get()) { m_on_close.release()->Run(m_session.get()); } } } // namespace rpc } // namespace ola ola-0.10.9/common/rpc/Rpc.proto0000664000175000017500000000272214376533110013172 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Rpc.proto * Defines the protocol buffers used in the underlying RPC implementation. * Copyright (C) 2005 Simon Newton */ /* * Based on, but not guaranteed to be the same as the specification here: * http://protorpc.likbilen.com/Protorpcdocprotobuf.html */ package ola.rpc; enum Type { REQUEST = 1; RESPONSE = 2; RESPONSE_CANCEL = 3; RESPONSE_FAILED = 4; RESPONSE_NOT_IMPLEMENTED = 5; DISCONNECT = 6; DESCRIPTOR_REQUEST = 7; // not implemented DESCRIPTOR_RESPONSE = 8; // not implemented REQUEST_CANCEL = 9; STREAM_REQUEST = 10; // a request that we don't expect a response for }; message RpcMessage { required Type type = 1; optional uint32 id = 2; optional string name = 3; optional bytes buffer = 4; } ola-0.10.9/common/math/0000775000175000017500000000000014376533270011612 500000000000000ola-0.10.9/common/math/Random.cpp0000664000175000017500000000402214376533110013445 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Random.cpp * Random number generator * Copyright (C) 2012 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #ifdef HAVE_RANDOM #include #endif // HAVE_RANDOM #include "ola/Clock.h" #include "ola/math/Random.h" namespace ola { namespace math { #ifdef HAVE_RANDOM std::default_random_engine generator_; #endif // HAVE_RANDOM void InitRandom() { Clock clock; TimeStamp now; // The clock type here should not matter because only the microseconds field // is being used to seed the random number generator. clock.CurrentRealTime(&now); uint64_t seed = (static_cast(now.MicroSeconds()) << 32) + static_cast(getpid()); #ifdef HAVE_RANDOM generator_.seed(seed); #elif defined(_WIN32) srand(seed); #else srandom(seed); #endif // HAVE_RANDOM } int Random(int lower, int upper) { #ifdef HAVE_RANDOM std::uniform_int_distribution distribution(lower, upper); return distribution(generator_); #elif defined(_WIN32) return (lower + (rand() % (upper - lower + 1))); // NOLINT(runtime/threadsafe_fn) #else return (lower + (random() % (upper - lower + 1))); #endif // HAVE_RANDOM } } // namespace math } // namespace ola ola-0.10.9/common/math/Makefile.mk0000664000175000017500000000017014376533110013567 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += common/math/Random.cpp ola-0.10.9/common/testing/0000775000175000017500000000000014376533270012336 500000000000000ola-0.10.9/common/testing/TestUtils.cpp0000664000175000017500000000612114376533110014713 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TestUtils.cpp * Functions used for unit testing. * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include "ola/testing/TestUtils.h" #include "ola/Logging.h" namespace ola { namespace testing { using std::string; /* * Assert that two blocks of data match. * @param source_line the file name and line number of this assert * @param expected pointer to the expected data * @param expected_length the length of the expected data * @param actual point to the actual data * @param actual_length length of the actual data */ void ASSERT_DATA_EQUALS(const SourceLine &source_line, const uint8_t *expected, unsigned int expected_length, const uint8_t *actual, unsigned int actual_length) { _AssertEquals(source_line, expected_length, actual_length, "Data lengths differ"); bool data_matches = (0 == memcmp(expected, actual, expected_length)); if (!data_matches) { std::ostringstream str; for (unsigned int i = 0; i < expected_length; ++i) { str.str(""); str << std::dec << i << ": 0x" << std::hex << static_cast(expected[i]); str << ((expected[i] == actual[i]) ? " == " : " != "); str << "0x" << static_cast(actual[i]) << " ("; str << ((expected[i] >= '!' && expected[i] <= '~') ? static_cast(expected[i]) : ' '); str << ((expected[i] == actual[i]) ? " == " : " != "); str << ((actual[i] >= '!' && actual[i] <= '~') ? static_cast(actual[i]) : ' '); str << ")"; if (expected[i] != actual[i]) { str << " ## MISMATCH"; } OLA_INFO << str.str(); } } CPPUNIT_NS::Asserter::failIf(!data_matches, "Data differs", source_line); } void ASSERT_DATA_EQUALS(const SourceLine &source_line, const char *expected, unsigned int expected_length, const char *actual, unsigned int actual_length) { ASSERT_DATA_EQUALS(source_line, reinterpret_cast(expected), expected_length, reinterpret_cast(actual), actual_length); } } // namespace testing } // namespace ola ola-0.10.9/common/testing/MockUDPSocket.cpp0000664000175000017500000002231114376533110015365 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MockUDPSocket.cpp * This implements the UDPSocketInterface in a way that we can use it for * testing. * Copyright (C) 2010 Simon Newton */ #include #include #include #include #include #include #include #include "ola/Logging.h" #include "ola/network/IPV4Address.h" #include "ola/network/NetworkUtils.h" #include "ola/testing/MockUDPSocket.h" #include "ola/testing/TestUtils.h" namespace ola { namespace testing { using ola::io::IOQueue; using ola::io::IOVec; using ola::io::IOVecInterface; using ola::network::HostToNetwork; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; MockUDPSocket::MockUDPSocket() : ola::network::UDPSocketInterface(), m_init_called(false), m_dummy_handle(ola::io::INVALID_DESCRIPTOR), m_bound_to_port(false), m_broadcast_set(false), m_port(0), m_tos(0), m_discard_mode(false) { } bool MockUDPSocket::Init() { if (m_dummy_handle == ola::io::INVALID_DESCRIPTOR) { #ifdef _WIN32 m_dummy_handle.m_handle.m_fd = socket(PF_INET, SOCK_DGRAM, 0); if (m_dummy_handle.m_handle.m_fd < 0) { #else m_dummy_handle = socket(PF_INET, SOCK_DGRAM, 0); if (m_dummy_handle < 0) { #endif // _WIN32 OLA_WARN << "Could not create socket " << strerror(errno); return false; } } m_init_called = true; return true; } bool MockUDPSocket::Bind(const ola::network::IPV4SocketAddress &endpoint) { m_bound_to_port = true; m_port = endpoint.Port(); return true; } bool MockUDPSocket::GetSocketAddress(IPV4SocketAddress *address) const { // Return a dummy address *address = IPV4SocketAddress(IPV4Address::Loopback(), 0); return true; } bool MockUDPSocket::Close() { m_bound_to_port = false; if (m_dummy_handle != ola::io::INVALID_DESCRIPTOR) { #ifdef _WIN32 closesocket(m_dummy_handle.m_handle.m_fd); #else close(m_dummy_handle); #endif // _WIN32 } return true; } ssize_t MockUDPSocket::SendTo(const uint8_t *buffer, unsigned int size, const ola::network::IPV4Address &ip_address, unsigned short port) const { if (m_discard_mode) { return size; } OLA_ASSERT_FALSE(m_expected_calls.empty()); expected_call call = m_expected_calls.front(); OLA_ASSERT_DATA_EQUALS(call.data, call.size, buffer, size); OLA_ASSERT_EQ(call.address, ip_address); OLA_ASSERT_EQ(call.port, port); if (call.free_data) { delete[] call.data; } m_expected_calls.pop(); return size; } ssize_t MockUDPSocket::SendTo(IOVecInterface *data, const ola::network::IPV4Address &ip_address, unsigned short port) const { // This incurs a copy but it's only testing code. int io_len; const struct IOVec *iov = data->AsIOVec(&io_len); if (iov == NULL) { return 0; } unsigned int data_size = 0; for (int i = 0; i < io_len; i++) { data_size += iov[i].iov_len; } uint8_t *raw_data = new uint8_t[data_size]; unsigned int offset = 0; for (int i = 0; i < io_len; i++) { memcpy(raw_data + offset, iov[i].iov_base, iov[i].iov_len); offset += iov[i].iov_len; } data->Pop(data_size); data->FreeIOVec(iov); ssize_t data_sent = SendTo(raw_data, data_size, ip_address, port); delete[] raw_data; return data_sent; } bool MockUDPSocket::RecvFrom(uint8_t *buffer, ssize_t *data_read) const { IPV4Address address; uint16_t port; return RecvFrom(buffer, data_read, address, port); } bool MockUDPSocket::RecvFrom( uint8_t *buffer, ssize_t *data_read, ola::network::IPV4Address &source) const { // NOLINT(runtime/references) uint16_t port; return RecvFrom(buffer, data_read, source, port); } bool MockUDPSocket::RecvFrom( uint8_t *buffer, ssize_t *data_read, ola::network::IPV4Address &source, // NOLINT(runtime/references) uint16_t &port) const { // NOLINT(runtime/references) OLA_ASSERT_FALSE(m_received_data.empty()); const received_data &new_data = m_received_data.front(); OLA_ASSERT_TRUE(static_cast(*data_read) >= new_data.size); unsigned int size = std::min(new_data.size, static_cast(*data_read)); memcpy(buffer, new_data.data, size); *data_read = new_data.size; source = new_data.address; port = new_data.port; if (new_data.free_data) { delete[] new_data.data; } m_received_data.pop(); return true; } bool MockUDPSocket::RecvFrom( uint8_t *buffer, ssize_t *data_read, ola::network::IPV4SocketAddress *source) { IPV4Address source_ip; uint16_t port; bool ok = RecvFrom(buffer, data_read, source_ip, port); if (ok) { *source = IPV4SocketAddress(source_ip, port); } return ok; } bool MockUDPSocket::EnableBroadcast() { m_broadcast_set = true; return true; } bool MockUDPSocket::SetMulticastInterface(const IPV4Address &iface) { OLA_ASSERT_EQ(m_interface, iface); return true; } bool MockUDPSocket::JoinMulticast(const IPV4Address &iface, OLA_UNUSED const IPV4Address &group, OLA_UNUSED bool loop) { OLA_ASSERT_EQ(m_interface, iface); return true; } bool MockUDPSocket::LeaveMulticast(const IPV4Address &iface, OLA_UNUSED const IPV4Address &group) { OLA_ASSERT_EQ(m_interface, iface); return true; } bool MockUDPSocket::SetTos(uint8_t tos) { m_tos = tos; return true; } void MockUDPSocket::AddExpectedData(const uint8_t *data, unsigned int size, const IPV4Address &ip, uint16_t port) { expected_call call = {data, size, ip, port, false}; m_expected_calls.push(call); } void MockUDPSocket::AddExpectedData(IOQueue *ioqueue, const IPV4SocketAddress &dest) { unsigned int size; uint8_t *data = IOQueueToBuffer(ioqueue, &size); expected_call call = {data, size, dest.Host(), dest.Port(), true}; m_expected_calls.push(call); } /** * Ownership of the data is not transferred. */ void MockUDPSocket::InjectData(const uint8_t *data, unsigned int size, const IPV4Address &ip, uint16_t port) { expected_call call = {data, size, ip, port, false}; m_received_data.push(call); PerformRead(); } /** * Ownership of the data is not transferred. */ void MockUDPSocket::InjectData(const uint8_t *data, unsigned int size, const IPV4SocketAddress &source) { InjectData(data, size, source.Host(), source.Port()); } /** * Inject the data in an IOQueue into the socket. This acts as if the data was * received on the UDP socket. * @param ioqueue the data to inject * @param source the socket address where this fake data came from */ void MockUDPSocket::InjectData(IOQueue *ioqueue, const IPV4SocketAddress &source) { unsigned int data_size; // This incurs a copy, but this is just testing code so it doesn't matter. uint8_t *data = IOQueueToBuffer(ioqueue, &data_size); expected_call call = {data, data_size, source.Host(), source.Port(), true}; m_received_data.push(call); PerformRead(); } void MockUDPSocket::Verify() { // if an exception is outstanding, don't both to check if we have consumed // all calls. This avoids raising a second exception which calls terminate. if (!std::uncaught_exception()) { std::ostringstream msg; msg << m_expected_calls.size() << " packets remain on the MockUDPSocket"; OLA_ASSERT_TRUE_MSG(m_expected_calls.empty(), msg.str()); } } bool MockUDPSocket::CheckNetworkParamsMatch(bool init_called, bool bound_to_port, uint16_t port, bool broadcast_set) { return (init_called == m_init_called && bound_to_port == m_bound_to_port && port == m_port && broadcast_set == m_broadcast_set); } void MockUDPSocket::SetInterface(const IPV4Address &iface) { m_interface = iface; } uint8_t* MockUDPSocket::IOQueueToBuffer(IOQueue *ioqueue, unsigned int *size) const { *size = ioqueue->Size(); uint8_t *data = new uint8_t[*size]; *size = ioqueue->Read(data, *size); return data; } } // namespace testing } // namespace ola ola-0.10.9/common/testing/GenericTester.cpp0000664000175000017500000000420614376533110015520 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * GenericTester.cpp * Run the tests. * Copyright (C) 2012 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include "ola/base/Env.h" #include "ola/base/Flags.h" #include "ola/base/Init.h" #include "ola/Logging.h" #include "ola/StringUtils.h" using std::string; #ifdef HAVE_EPOLL DECLARE_bool(use_epoll); #endif // HAVE_EPOLL #ifdef HAVE_KQUEUE DECLARE_bool(use_kqueue); #endif // HAVE_KQUEUE DECLARE_uint8(log_level); bool GetBoolEnvVar(const string &var_name) { string var; bool result = false; ola::GetEnv(var_name, &var) && ola::StringToBool(var, &result); return result; } int main(int argc, char* argv[]) { // Default to INFO since it's tests. FLAGS_log_level = ola::OLA_LOG_INFO; #ifdef HAVE_EPOLL FLAGS_use_epoll = GetBoolEnvVar("OLA_USE_EPOLL"); #endif // HAVE_EPOLL #ifdef HAVE_KQUEUE FLAGS_use_kqueue = GetBoolEnvVar("OLA_USE_KQUEUE"); #endif // HAVE_KQUEUE ola::AppInit(&argc, argv, "[options]", ""); CppUnit::Test *suite = CppUnit::TestFactoryRegistry::getRegistry().makeTest(); CppUnit::TextUi::TestRunner runner; runner.addTest(suite); runner.setOutputter( new CppUnit::CompilerOutputter(&runner.result(), std::cerr)); bool wasSuccessful = runner.run(); return wasSuccessful ? 0 : 1; } ola-0.10.9/common/testing/Makefile.mk0000664000175000017500000000057514376533110014324 00000000000000# LIBRARIES ################################################## if BUILD_TESTS noinst_LTLIBRARIES += common/testing/libolatesting.la \ common/testing/libtestmain.la common_testing_libolatesting_la_SOURCES = \ common/testing/MockUDPSocket.cpp \ common/testing/TestUtils.cpp common_testing_libtestmain_la_SOURCES = common/testing/GenericTester.cpp endif ola-0.10.9/common/utils/0000775000175000017500000000000014376533271012022 500000000000000ola-0.10.9/common/utils/BackoffTest.cpp0000664000175000017500000000663414376533110014642 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * BackoffTest.cpp * Test fixture for the TCPConnector class * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include #include "ola/Callback.h" #include "ola/Clock.h" #include "ola/util/Backoff.h" #include "ola/testing/TestUtils.h" using ola::BackoffGenerator; using ola::ExponentialBackoffPolicy; using ola::LinearBackoffPolicy; using ola::TimeInterval; class BackoffTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(BackoffTest); CPPUNIT_TEST(testLinearBackoffPolicy); CPPUNIT_TEST(testExponentialBackoffPolicy); CPPUNIT_TEST(testBackoffGenerator); CPPUNIT_TEST_SUITE_END(); public: void testLinearBackoffPolicy(); void testExponentialBackoffPolicy(); void testBackoffGenerator(); }; CPPUNIT_TEST_SUITE_REGISTRATION(BackoffTest); /** * Test the linear backoff policy. */ void BackoffTest::testLinearBackoffPolicy() { // 5 per attempt, up to a max of 30 LinearBackoffPolicy policy(TimeInterval(5, 0), TimeInterval(30, 0)); OLA_ASSERT_EQ(TimeInterval(5, 0), policy.BackOffTime(1)); OLA_ASSERT_EQ(TimeInterval(10, 0), policy.BackOffTime(2)); OLA_ASSERT_EQ(TimeInterval(15, 0), policy.BackOffTime(3)); OLA_ASSERT_EQ(TimeInterval(30, 0), policy.BackOffTime(6)); OLA_ASSERT_EQ(TimeInterval(30, 0), policy.BackOffTime(7)); } /** * Test the exponential backoff policy. */ void BackoffTest::testExponentialBackoffPolicy() { // start with 10s, up to 170s. ExponentialBackoffPolicy policy(TimeInterval(10, 0), TimeInterval(170, 0)); OLA_ASSERT_EQ(TimeInterval(10, 0), policy.BackOffTime(1)); OLA_ASSERT_EQ(TimeInterval(20, 0), policy.BackOffTime(2)); OLA_ASSERT_EQ(TimeInterval(40, 0), policy.BackOffTime(3)); OLA_ASSERT_EQ(TimeInterval(80, 0), policy.BackOffTime(4)); OLA_ASSERT_EQ(TimeInterval(160, 0), policy.BackOffTime(5)); OLA_ASSERT_EQ(TimeInterval(170, 0), policy.BackOffTime(6)); OLA_ASSERT_EQ(TimeInterval(170, 0), policy.BackOffTime(7)); } /** * Test the BackoffGenerator */ void BackoffTest::testBackoffGenerator() { BackoffGenerator generator( new LinearBackoffPolicy(TimeInterval(5, 0), TimeInterval(30, 0))); OLA_ASSERT_EQ(TimeInterval(5, 0), generator.Next()); OLA_ASSERT_EQ(TimeInterval(10, 0), generator.Next()); OLA_ASSERT_EQ(TimeInterval(15, 0), generator.Next()); OLA_ASSERT_EQ(TimeInterval(20, 0), generator.Next()); OLA_ASSERT_EQ(TimeInterval(25, 0), generator.Next()); OLA_ASSERT_EQ(TimeInterval(30, 0), generator.Next()); generator.Reset(); OLA_ASSERT_EQ(TimeInterval(5, 0), generator.Next()); OLA_ASSERT_EQ(TimeInterval(10, 0), generator.Next()); OLA_ASSERT_EQ(TimeInterval(15, 0), generator.Next()); } ola-0.10.9/common/utils/ActionQueueTest.cpp0000664000175000017500000000756614376533110015536 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ActionQueueTest.cpp * Test fixture for the ActionQueue class * Copyright (C) 2010 Simon Newton */ #include #include "ola/ActionQueue.h" #include "ola/Callback.h" #include "ola/testing/TestUtils.h" using ola::Action; using ola::ActionQueue; using ola::SingleUseCallback0; class ActionQueueTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ActionQueueTest); CPPUNIT_TEST(testEmptyQueue); CPPUNIT_TEST(testSimpleQueue); CPPUNIT_TEST(testFailedQueue); CPPUNIT_TEST_SUITE_END(); public: void setUp(); void CommandsComplete(ActionQueue *queue); void testEmptyQueue(); void testSimpleQueue(); void testFailedQueue(); private: ActionQueue *m_received_queue; }; /* * A basic test action */ class MockAction: public Action { public: explicit MockAction(bool fatal = false, bool fail = false): Action(), m_fatal(fatal), m_failed(fail), m_executed(false) {} bool IsFatal() const { return m_fatal; } bool Failed() const { return m_failed; } bool Executed() const { return m_executed; } void Perform(SingleUseCallback0 *on_done); private: bool m_fatal; bool m_failed; bool m_executed; }; void MockAction::Perform(SingleUseCallback0 *on_done) { m_executed = true; on_done->Run(); } CPPUNIT_TEST_SUITE_REGISTRATION(ActionQueueTest); void ActionQueueTest::setUp() { m_received_queue = NULL; } void ActionQueueTest::CommandsComplete(ActionQueue *queue) { m_received_queue = queue; } /* * Check that an empty queue works. */ void ActionQueueTest::testEmptyQueue() { ActionQueue queue( NewSingleCallback(this, &ActionQueueTest::CommandsComplete)); queue.NextAction(); OLA_ASSERT_EQ(&queue, m_received_queue); OLA_ASSERT_TRUE(queue.WasSuccessful()); // try calling next item to make sure nothing happens queue.NextAction(); } /* * Test that a simple queue works */ void ActionQueueTest::testSimpleQueue() { ActionQueue queue( NewSingleCallback(this, &ActionQueueTest::CommandsComplete)); MockAction *action1 = new MockAction(); queue.AddAction(action1); MockAction *action2 = new MockAction(); queue.AddAction(action2); queue.NextAction(); OLA_ASSERT_EQ(&queue, m_received_queue); OLA_ASSERT_TRUE(queue.WasSuccessful()); OLA_ASSERT_TRUE(action1->Executed()); OLA_ASSERT_TRUE(action2->Executed()); // try calling next item to make sure nothing happens queue.NextAction(); } /* * Test that a simple queue works */ void ActionQueueTest::testFailedQueue() { ActionQueue queue( NewSingleCallback(this, &ActionQueueTest::CommandsComplete)); MockAction *action1 = new MockAction(false, true); queue.AddAction(action1); MockAction *action2 = new MockAction(true, true); queue.AddAction(action2); MockAction *action3 = new MockAction(); queue.AddAction(action3); queue.NextAction(); OLA_ASSERT_EQ(&queue, m_received_queue); OLA_ASSERT_FALSE(queue.WasSuccessful()); OLA_ASSERT_TRUE(action1->Executed()); OLA_ASSERT_TRUE(action2->Executed()); OLA_ASSERT_FALSE(action3->Executed()); // try calling next item to make sure nothing happens queue.NextAction(); } ola-0.10.9/common/utils/Watchdog.cpp0000664000175000017500000000322414376533110014177 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Watchdog.cpp * Copyright (C) 2015 Simon Newton */ #include "ola/util/Watchdog.h" namespace ola { using ola::thread::MutexLocker; Watchdog::Watchdog(unsigned int cycle_limit, Callback0 *reset_callback) : m_limit(cycle_limit), m_callback(reset_callback), m_enabled(false), m_count(0), m_fired(false) { } void Watchdog::Enable() { MutexLocker lock(&m_mu); m_count = 0; m_fired = false; m_enabled = true; } void Watchdog::Disable() { MutexLocker lock(&m_mu); m_enabled = false; m_fired = false; } void Watchdog::Kick() { MutexLocker lock(&m_mu); m_count = 0; } void Watchdog::Clock() { bool run_callback = false; { MutexLocker lock(&m_mu); if (!m_enabled) { return; } m_count++; if (m_count >= m_limit && !m_fired) { m_fired = true; run_callback = true; } } if (run_callback) { m_callback->Run(); } } } // namespace ola ola-0.10.9/common/utils/UtilsTest.cpp0000664000175000017500000000474414376533110014407 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * UtilsTest.cpp * Unittest for util functions. * Copyright (C) 2013 Peter Newman */ #include #include "ola/util/Utils.h" #include "ola/testing/TestUtils.h" using ola::utils::SplitUInt16; using ola::utils::JoinUInt8; class UtilsTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(UtilsTest); CPPUNIT_TEST(testSplitUInt16); CPPUNIT_TEST(testJoinUInt8); CPPUNIT_TEST_SUITE_END(); public: void testSplitUInt16(); void testJoinUInt8(); }; CPPUNIT_TEST_SUITE_REGISTRATION(UtilsTest); /* * Test the SplitUInt16 function */ void UtilsTest::testSplitUInt16() { uint16_t input = 0xabcd; uint8_t high = 0x00; uint8_t low = 0x00; SplitUInt16(input, &high, &low); OLA_ASSERT_EQ(high, static_cast(0xab)); OLA_ASSERT_EQ(low, static_cast(0xcd)); input = 0x0000; SplitUInt16(input, &high, &low); OLA_ASSERT_EQ(high, static_cast(0x00)); OLA_ASSERT_EQ(low, static_cast(0x00)); input = 0xffff; SplitUInt16(input, &high, &low); OLA_ASSERT_EQ(high, static_cast(0xff)); OLA_ASSERT_EQ(low, static_cast(0xff)); input = 0x0001; SplitUInt16(input, &high, &low); OLA_ASSERT_EQ(high, static_cast(0x00)); OLA_ASSERT_EQ(low, static_cast(0x01)); } /* * Test the JoinUInt8 function */ void UtilsTest::testJoinUInt8() { uint8_t high = 0xab; uint8_t low = 0xcd; OLA_ASSERT_EQ(JoinUInt8(high, low), static_cast(0xabcd)); high = 0x00; low = 0x00; OLA_ASSERT_EQ(JoinUInt8(high, low), static_cast(0x0000)); high = 0xff; low = 0xff; OLA_ASSERT_EQ(JoinUInt8(high, low), static_cast(0xffff)); high = 0x00; low = 0x01; OLA_ASSERT_EQ(JoinUInt8(high, low), static_cast(0x0001)); } ola-0.10.9/common/utils/DmxBufferTest.cpp0000664000175000017500000004270614376533110015171 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DmxBufferTest.cpp * Unittest for the DmxBuffer * Copyright (C) 2005 Simon Newton */ #include #include #include #include "ola/Constants.h" #include "ola/DmxBuffer.h" #include "ola/testing/TestUtils.h" using std::ostringstream; using std::string; using ola::DmxBuffer; class DmxBufferTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DmxBufferTest); CPPUNIT_TEST(testBlackout); CPPUNIT_TEST(testGetSet); CPPUNIT_TEST(testStringGetSet); CPPUNIT_TEST(testAssign); CPPUNIT_TEST(testCopy); CPPUNIT_TEST(testMerge); CPPUNIT_TEST(testStringToDmx); CPPUNIT_TEST(testCopyOnWrite); CPPUNIT_TEST(testSetRange); CPPUNIT_TEST(testSetRangeToValue); CPPUNIT_TEST(testSetChannel); CPPUNIT_TEST(testToString); CPPUNIT_TEST_SUITE_END(); public: void testBlackout(); void testGetSet(); void testAssign(); void testStringGetSet(); void testCopy(); void testMerge(); void testStringToDmx(); void testCopyOnWrite(); void testSetRange(); void testSetRangeToValue(); void testSetChannel(); void testToString(); private: static const uint8_t TEST_DATA[]; static const uint8_t TEST_DATA2[]; static const uint8_t TEST_DATA3[]; static const uint8_t MERGE_RESULT[]; static const uint8_t MERGE_RESULT2[]; void runStringToDmx(const string &input, const DmxBuffer &expected); }; const uint8_t DmxBufferTest::TEST_DATA[] = {1, 2, 3, 4, 5}; const uint8_t DmxBufferTest::TEST_DATA2[] = {9, 8, 7, 6, 5, 4, 3, 2, 1}; const uint8_t DmxBufferTest::TEST_DATA3[] = {10, 11, 12}; const uint8_t DmxBufferTest::MERGE_RESULT[] = {10, 11, 12, 4, 5}; const uint8_t DmxBufferTest::MERGE_RESULT2[] = {10, 11, 12, 6, 5, 4, 3, 2, 1}; CPPUNIT_TEST_SUITE_REGISTRATION(DmxBufferTest); /* * Test that Blackout() works */ void DmxBufferTest::testBlackout() { DmxBuffer buffer; OLA_ASSERT_TRUE(buffer.Blackout()); uint8_t *result = new uint8_t[ola::DMX_UNIVERSE_SIZE]; uint8_t *zero = new uint8_t[ola::DMX_UNIVERSE_SIZE]; unsigned int result_length = ola::DMX_UNIVERSE_SIZE; memset(zero, 0, ola::DMX_UNIVERSE_SIZE); buffer.Get(result, &result_length); OLA_ASSERT_EQ((unsigned int) ola::DMX_UNIVERSE_SIZE, result_length); OLA_ASSERT_EQ(0, memcmp(zero, result, result_length)); delete[] result; delete[] zero; buffer.Reset(); OLA_ASSERT_EQ(0u, buffer.Size()); } /* * Check that Get/Set works correctly */ void DmxBufferTest::testGetSet() { unsigned int fudge_factor = 10; unsigned int result_length = sizeof(TEST_DATA2) + fudge_factor; uint8_t *result = new uint8_t[result_length]; unsigned int size = result_length; DmxBuffer buffer; string str_result; OLA_ASSERT_EQ((uint8_t) 0, buffer.Get(0)); OLA_ASSERT_EQ((uint8_t) 0, buffer.Get(1)); OLA_ASSERT_FALSE(buffer.Set(NULL, sizeof(TEST_DATA))); OLA_ASSERT_TRUE(buffer.Set(TEST_DATA, sizeof(TEST_DATA))); OLA_ASSERT_EQ((uint8_t) 1, buffer.Get(0)); OLA_ASSERT_EQ((uint8_t) 2, buffer.Get(1)); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA), buffer.Size()); buffer.Get(result, &size); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA), size); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, result, size)); str_result = buffer.Get(); OLA_ASSERT_EQ((size_t) sizeof(TEST_DATA), str_result.length()); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, str_result.data(), str_result.length())); size = result_length; OLA_ASSERT_TRUE(buffer.Set(TEST_DATA2, sizeof(TEST_DATA2))); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA2), buffer.Size()); buffer.Get(result, &size); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA2), size); OLA_ASSERT_EQ(0, memcmp(TEST_DATA2, result, size)); str_result = buffer.Get(); OLA_ASSERT_EQ((size_t) sizeof(TEST_DATA2), str_result.length()); OLA_ASSERT_EQ(0, memcmp(TEST_DATA2, str_result.data(), str_result.length())); // now check that Set() with another buffer works DmxBuffer buffer2; buffer2.Set(buffer); str_result = buffer2.Get(); OLA_ASSERT_EQ((size_t) sizeof(TEST_DATA2), str_result.length()); OLA_ASSERT_EQ(0, memcmp(TEST_DATA2, str_result.data(), str_result.length())); delete[] result; } /* * Check that the string set/get methods work */ void DmxBufferTest::testStringGetSet() { const string data = "abcdefg"; DmxBuffer buffer; uint8_t *result = new uint8_t[data.length()]; unsigned int size = data.length(); // Check that setting works OLA_ASSERT_TRUE(buffer.Set(data)); OLA_ASSERT_EQ(data.length(), (size_t) buffer.Size()); OLA_ASSERT_EQ(data, buffer.Get()); buffer.Get(result, &size); OLA_ASSERT_EQ(data.length(), (size_t) size); OLA_ASSERT_EQ(0, memcmp(data.data(), result, size)); // Check the string constructor DmxBuffer string_buffer(data); OLA_ASSERT_TRUE(buffer == string_buffer); // Set with an empty string string data2; size = data.length(); OLA_ASSERT_TRUE(buffer.Set(data2)); OLA_ASSERT_EQ(data2.length(), (size_t) buffer.Size()); OLA_ASSERT_EQ(data2, buffer.Get()); buffer.Get(result, &size); OLA_ASSERT_EQ(data2.length(), (size_t) size); OLA_ASSERT_EQ(0, memcmp(data2.data(), result, size)); delete[] result; } /* * Check the copy and assignment operators work */ void DmxBufferTest::testAssign() { unsigned int fudge_factor = 10; unsigned int result_length = sizeof(TEST_DATA) + fudge_factor; uint8_t *result = new uint8_t[result_length]; DmxBuffer buffer(TEST_DATA, sizeof(TEST_DATA)); DmxBuffer assignment_buffer(TEST_DATA3, sizeof(TEST_DATA3)); DmxBuffer assignment_buffer2; // assigning to ourself does nothing // Clang 7 onwards complain about this, the *& suppresses that warning buffer = *&buffer; // validate the data hasn't changed unsigned int size = result_length; buffer.Get(result, &size); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA), buffer.Size()); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA), size); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, result, size)); // assigning to a previously init'ed buffer size = result_length; assignment_buffer = buffer; assignment_buffer.Get(result, &size); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA), assignment_buffer.Size()); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA), size); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, result, size)); OLA_ASSERT_TRUE(assignment_buffer == buffer); // assigning to a non-init'ed buffer assignment_buffer2 = buffer; size = result_length; assignment_buffer2.Get(result, &result_length); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA), assignment_buffer2.Size()); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA), result_length); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, result, result_length)); OLA_ASSERT_TRUE(assignment_buffer2 == buffer); // now try assigning an uninitialized buffer DmxBuffer uninitialized_buffer; DmxBuffer assignment_buffer3; assignment_buffer3 = uninitialized_buffer; OLA_ASSERT_EQ(0u, assignment_buffer3.Size()); size = result_length; assignment_buffer3.Get(result, &result_length); OLA_ASSERT_EQ(0u, result_length); OLA_ASSERT_TRUE(assignment_buffer3 == uninitialized_buffer); // Check two buffers differ OLA_ASSERT_TRUE(assignment_buffer3 != assignment_buffer2); OLA_ASSERT_TRUE(buffer != assignment_buffer3); delete[] result; } /* * Check that the copy constructor works */ void DmxBufferTest::testCopy() { DmxBuffer buffer(TEST_DATA2, sizeof(TEST_DATA2)); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA2), buffer.Size()); DmxBuffer copy_buffer(buffer); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA2), copy_buffer.Size()); OLA_ASSERT_TRUE(copy_buffer == buffer); unsigned int result_length = sizeof(TEST_DATA2); uint8_t *result = new uint8_t[result_length]; copy_buffer.Get(result, &result_length); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA2), result_length); OLA_ASSERT_EQ(0, memcmp(TEST_DATA2, result, result_length)); delete[] result; } /* * Check that HTP Merging works */ void DmxBufferTest::testMerge() { DmxBuffer buffer1(TEST_DATA, sizeof(TEST_DATA)); DmxBuffer buffer2(TEST_DATA3, sizeof(TEST_DATA3)); DmxBuffer merge_result(MERGE_RESULT, sizeof(MERGE_RESULT)); const DmxBuffer test_buffer(buffer1); const DmxBuffer test_buffer2(buffer2); DmxBuffer uninitialized_buffer, uninitialized_buffer2; // merge into an empty buffer OLA_ASSERT_TRUE(uninitialized_buffer.HTPMerge(buffer2)); OLA_ASSERT_EQ((unsigned int) sizeof(TEST_DATA3), buffer2.Size()); OLA_ASSERT_TRUE(test_buffer2 == uninitialized_buffer); // merge from an empty buffer OLA_ASSERT_TRUE(buffer2.HTPMerge(uninitialized_buffer2)); OLA_ASSERT_TRUE(buffer2 == test_buffer2); // merge two buffers (longer into shorter) buffer2 = test_buffer2; OLA_ASSERT_TRUE(buffer2.HTPMerge(buffer1)); OLA_ASSERT_TRUE(buffer2 == merge_result); // merge shorter into longer buffer2 = test_buffer2; OLA_ASSERT_TRUE(buffer1.HTPMerge(buffer2)); OLA_ASSERT_TRUE(buffer1 == merge_result); } /* * Run the StringToDmxTest * @param input the string to parse * @param expected the expected result */ void DmxBufferTest::runStringToDmx(const string &input, const DmxBuffer &expected) { DmxBuffer buffer; OLA_ASSERT_TRUE(buffer.SetFromString(input)); OLA_ASSERT_TRUE(expected == buffer); } /* * Test the StringToDmx function */ void DmxBufferTest::testStringToDmx() { string input = "1,2,3,4"; uint8_t expected1[] = {1, 2, 3, 4}; runStringToDmx(input, DmxBuffer(expected1, sizeof(expected1))); input = "a,b,c,d"; uint8_t expected2[] = {0, 0, 0, 0}; runStringToDmx(input, DmxBuffer(expected2, sizeof(expected2))); input = "a,b,c,"; uint8_t expected3[] = {0, 0, 0, 0}; runStringToDmx(input, DmxBuffer(expected3, sizeof(expected3))); input = "255,,,"; uint8_t expected4[] = {255, 0, 0, 0}; runStringToDmx(input, DmxBuffer(expected4, sizeof(expected4))); input = "255,,,10"; uint8_t expected5[] = {255, 0, 0, 10}; runStringToDmx(input, DmxBuffer(expected5, sizeof(expected5))); input = " 266,,,10 "; uint8_t expected6[] = {10, 0, 0, 10}; runStringToDmx(input, DmxBuffer(expected6, sizeof(expected6))); input = ""; uint8_t expected7[] = {}; runStringToDmx(input, DmxBuffer(expected7, sizeof(expected7))); } /* * Check that we make a copy of the buffers before writing */ void DmxBufferTest::testCopyOnWrite() { string initial_data; initial_data.append((const char*) TEST_DATA2, sizeof(TEST_DATA2)); // these are used for comparisons and don't change const DmxBuffer buffer3(TEST_DATA3, sizeof(TEST_DATA3)); const DmxBuffer merge_result(MERGE_RESULT2, sizeof(MERGE_RESULT2)); DmxBuffer src_buffer(initial_data); DmxBuffer dest_buffer(src_buffer); // Check HTPMerge dest_buffer.HTPMerge(buffer3); OLA_ASSERT_EQ(initial_data, src_buffer.Get()); OLA_ASSERT_TRUE(merge_result == dest_buffer); dest_buffer = src_buffer; // Check the other way src_buffer.HTPMerge(buffer3); OLA_ASSERT_TRUE(merge_result == src_buffer); OLA_ASSERT_TRUE(initial_data == dest_buffer.Get()); src_buffer = dest_buffer; // Check Set works dest_buffer.Set(TEST_DATA3, sizeof(TEST_DATA3)); OLA_ASSERT_EQ(initial_data, src_buffer.Get()); OLA_ASSERT_TRUE(buffer3 == dest_buffer); dest_buffer = src_buffer; // Check it works the other way OLA_ASSERT_TRUE(initial_data == src_buffer.Get()); OLA_ASSERT_TRUE(initial_data == dest_buffer.Get()); src_buffer.Set(TEST_DATA3, sizeof(TEST_DATA3)); OLA_ASSERT_TRUE(buffer3 == src_buffer); OLA_ASSERT_TRUE(initial_data == dest_buffer.Get()); src_buffer = dest_buffer; // Check that SetFromString works dest_buffer = src_buffer; dest_buffer.SetFromString("10,11,12"); OLA_ASSERT_EQ(initial_data, src_buffer.Get()); OLA_ASSERT_TRUE(buffer3 == dest_buffer); dest_buffer = src_buffer; // Check it works the other way OLA_ASSERT_EQ(initial_data, src_buffer.Get()); OLA_ASSERT_EQ(initial_data, dest_buffer.Get()); src_buffer.SetFromString("10,11,12"); OLA_ASSERT_TRUE(buffer3 == src_buffer); OLA_ASSERT_EQ(initial_data, dest_buffer.Get()); src_buffer = dest_buffer; // Check the SetChannel() method, this should force a copy. dest_buffer.SetChannel(0, 244); string expected_change = initial_data; expected_change[0] = (uint8_t) 244; OLA_ASSERT_EQ(initial_data, src_buffer.Get()); OLA_ASSERT_EQ(expected_change, dest_buffer.Get()); dest_buffer = src_buffer; // Check it works the other way OLA_ASSERT_EQ(initial_data, src_buffer.Get()); OLA_ASSERT_EQ(initial_data, dest_buffer.Get()); src_buffer.SetChannel(0, 234); expected_change[0] = (uint8_t) 234; OLA_ASSERT_EQ(expected_change, src_buffer.Get()); OLA_ASSERT_EQ(initial_data, dest_buffer.Get()); src_buffer.Set(initial_data); } /* * Check that SetRange works. */ void DmxBufferTest::testSetRange() { unsigned int data_size = sizeof(TEST_DATA); DmxBuffer buffer; OLA_ASSERT_FALSE(buffer.SetRange(0, NULL, data_size)); OLA_ASSERT_FALSE(buffer.SetRange(600, TEST_DATA, data_size)); // Setting an uninitialized buffer calls blackout first OLA_ASSERT_TRUE(buffer.SetRange(0, TEST_DATA, data_size)); OLA_ASSERT_EQ((unsigned int) ola::DMX_UNIVERSE_SIZE, buffer.Size()); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, buffer.GetRaw(), data_size)); // try overrunning the buffer OLA_ASSERT_TRUE(buffer.SetRange(ola::DMX_UNIVERSE_SIZE - 2, TEST_DATA, data_size)); OLA_ASSERT_EQ((unsigned int) ola::DMX_UNIVERSE_SIZE, buffer.Size()); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, buffer.GetRaw() + ola::DMX_UNIVERSE_SIZE - 2, 2)); // reset the buffer so that the valid data is 0, and try again buffer.Reset(); OLA_ASSERT_TRUE(buffer.SetRange(0, TEST_DATA, data_size)); OLA_ASSERT_EQ((unsigned int) data_size, buffer.Size()); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, buffer.GetRaw(), data_size)); // setting past the end of the valid data should fail OLA_ASSERT_FALSE(buffer.SetRange(50, TEST_DATA, data_size)); OLA_ASSERT_EQ((unsigned int) data_size, buffer.Size()); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, buffer.GetRaw(), buffer.Size())); // overwrite part of the valid data unsigned int offset = 2; OLA_ASSERT_TRUE(buffer.SetRange(offset, TEST_DATA, data_size)); OLA_ASSERT_EQ((unsigned int) data_size + offset, buffer.Size()); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, buffer.GetRaw(), offset)); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, buffer.GetRaw() + offset, buffer.Size() - offset)); // now try writing 1 channel past the valid data buffer.Reset(); OLA_ASSERT_TRUE(buffer.SetRange(0, TEST_DATA, data_size)); OLA_ASSERT_TRUE(buffer.SetRange(data_size, TEST_DATA, data_size)); OLA_ASSERT_EQ((unsigned int) data_size * 2, buffer.Size()); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, buffer.GetRaw(), data_size)); OLA_ASSERT_EQ(0, memcmp(TEST_DATA, buffer.GetRaw() + data_size, data_size)); } /* * Check that SetRangeToValue works */ void DmxBufferTest::testSetRangeToValue() { const uint8_t RANGE_DATA[] = {50, 50, 50, 50, 50}; DmxBuffer buffer; OLA_ASSERT_FALSE(buffer.SetRangeToValue(600, 50, 2)); unsigned int range_size = 5; OLA_ASSERT_TRUE(buffer.SetRangeToValue(0, 50, range_size)); OLA_ASSERT_EQ((unsigned int) ola::DMX_UNIVERSE_SIZE, buffer.Size()); OLA_ASSERT_EQ(0, memcmp(RANGE_DATA, buffer.GetRaw(), range_size)); // setting outside the value range should fail buffer.Reset(); OLA_ASSERT_FALSE(buffer.SetRange(10, TEST_DATA, range_size)); } /* * Check that SetChannel works */ void DmxBufferTest::testSetChannel() { DmxBuffer buffer; buffer.SetChannel(1, 10); buffer.SetChannel(10, 50); uint8_t expected[ola::DMX_UNIVERSE_SIZE]; memset(expected, 0, ola::DMX_UNIVERSE_SIZE); expected[1] = 10; expected[10] = 50; OLA_ASSERT_EQ((unsigned int) ola::DMX_UNIVERSE_SIZE, buffer.Size()); OLA_ASSERT_EQ(0, memcmp(expected, buffer.GetRaw(), buffer.Size())); // Check we can't set values greater than the buffer size buffer.SetChannel(999, 50); OLA_ASSERT_EQ((unsigned int) ola::DMX_UNIVERSE_SIZE, buffer.Size()); OLA_ASSERT_EQ(0, memcmp(expected, buffer.GetRaw(), buffer.Size())); // Check we can't set values outside the current valida data range unsigned int slice_size = 20; buffer.Set(expected, slice_size); buffer.SetChannel(30, 90); buffer.SetChannel(200, 10); OLA_ASSERT_EQ(slice_size, buffer.Size()); OLA_ASSERT_EQ(0, memcmp(expected, buffer.GetRaw(), buffer.Size())); } /* * Test ToString() */ void DmxBufferTest::testToString() { DmxBuffer buffer; OLA_ASSERT_EQ(string(""), buffer.ToString()); buffer.SetFromString("1,2,3,4"); OLA_ASSERT_EQ(string("1,2,3,4"), buffer.ToString()); buffer.SetRangeToValue(0, 255, 5); OLA_ASSERT_EQ(string("255,255,255,255,255"), buffer.ToString()); buffer.SetFromString("1,2,3,4"); ostringstream str; str << buffer; OLA_ASSERT_EQ(string("1,2,3,4"), str.str()); } ola-0.10.9/common/utils/WatchdogTest.cpp0000664000175000017500000000435314376533110015043 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * WatchdogTest.cpp * Unittest for the Watchdog. * Copyright (C) 2015 Simon Newton */ #include #include "ola/util/Watchdog.h" #include "ola/testing/TestUtils.h" class WatchdogTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(WatchdogTest); CPPUNIT_TEST(testWatchdog); CPPUNIT_TEST_SUITE_END(); public: WatchdogTest(): m_timeouts(0) {} void testWatchdog(); private: unsigned int m_timeouts; void Timeout() { m_timeouts++; } }; CPPUNIT_TEST_SUITE_REGISTRATION(WatchdogTest); void WatchdogTest::testWatchdog() { m_timeouts = 0; ola::Watchdog watchdog(4, ola::NewCallback(this, &WatchdogTest::Timeout)); // Not enabled yet for (unsigned int i = 0; i < 10; i++) { watchdog.Clock(); } OLA_ASSERT_EQ(0u, m_timeouts); watchdog.Enable(); // Test with regular kicks. for (unsigned int i = 0; i < 10; i++) { watchdog.Clock(); if (i % 2) { watchdog.Kick(); } } OLA_ASSERT_EQ(0u, m_timeouts); // test with non kicks for (unsigned int i = 0; i < 10; i++) { watchdog.Clock(); } OLA_ASSERT_EQ(1u, m_timeouts); // Disable and re-enable. watchdog.Disable(); watchdog.Enable(); for (unsigned int i = 0; i < 3; i++) { watchdog.Clock(); } OLA_ASSERT_EQ(1u, m_timeouts); // Disable triggers a reset of the count watchdog.Disable(); watchdog.Enable(); watchdog.Clock(); watchdog.Clock(); OLA_ASSERT_EQ(1u, m_timeouts); watchdog.Clock(); watchdog.Clock(); OLA_ASSERT_EQ(2u, m_timeouts); } ola-0.10.9/common/utils/TokenBucketTest.cpp0000664000175000017500000000656214376533110015525 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TokenBucketTest.cpp * Test fixture for the TokenBucket class * Copyright (C) 2010 Simon Newton */ #include #include "ola/Clock.h" #include "olad/TokenBucket.h" #include "ola/Logging.h" #include "ola/testing/TestUtils.h" using ola::Clock; using ola::TimeInterval; using ola::TimeStamp; using ola::TokenBucket; class TokenBucketTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(TokenBucketTest); CPPUNIT_TEST(testTokenBucket); CPPUNIT_TEST(testTokenBucketTwo); CPPUNIT_TEST_SUITE_END(); public: void testTokenBucket(); void testTokenBucketTwo(); }; CPPUNIT_TEST_SUITE_REGISTRATION(TokenBucketTest); /* * Check that the Token Bucket works */ void TokenBucketTest::testTokenBucket() { TimeStamp now; Clock clock; TimeInterval ten_ms(10000); TimeInterval one_hundred_ms(100000); TimeInterval one_second(1000000); clock.CurrentMonotonicTime(&now); TokenBucket bucket(0, 10, 10, now); // one every 100ms OLA_ASSERT_EQ(0u, bucket.Count(now)); now += one_hundred_ms; OLA_ASSERT_EQ(1u, bucket.Count(now)); now += ten_ms; OLA_ASSERT_EQ(1u, bucket.Count(now)); now += ten_ms; OLA_ASSERT_EQ(1u, bucket.Count(now)); now += one_hundred_ms; OLA_ASSERT_EQ(2u, bucket.Count(now)); OLA_ASSERT_TRUE(bucket.GetToken(now)); OLA_ASSERT_TRUE(bucket.GetToken(now)); OLA_ASSERT_FALSE(bucket.GetToken(now)); OLA_ASSERT_EQ(0u, bucket.Count(now)); now += one_second; OLA_ASSERT_EQ(10u, bucket.Count(now)); } void TokenBucketTest::testTokenBucketTwo() { TimeStamp now; Clock clock; TimeInterval ten_ms(10000); TimeInterval one_hundred_ms(100000); TimeInterval one_second(1000000); TimeInterval five_minutes(5 * 60 * 1000000); clock.CurrentMonotonicTime(&now); TokenBucket bucket(0, 40, 40, now); // one every 25ms OLA_ASSERT_EQ(0u, bucket.Count(now)); now += one_hundred_ms; OLA_ASSERT_EQ(4u, bucket.Count(now)); now += ten_ms; OLA_ASSERT_EQ(4u, bucket.Count(now)); now += ten_ms; OLA_ASSERT_EQ(4u, bucket.Count(now)); now += ten_ms; OLA_ASSERT_EQ(5u, bucket.Count(now)); now += ten_ms; OLA_ASSERT_EQ(5u, bucket.Count(now)); now += one_hundred_ms; OLA_ASSERT_EQ(9u, bucket.Count(now)); now += ten_ms; OLA_ASSERT_EQ(10u, bucket.Count(now)); now += one_second; OLA_ASSERT_EQ(40u, bucket.Count(now)); // now try a very long duration now += five_minutes; OLA_ASSERT_EQ(40u, bucket.Count(now)); // take 10 tokens from the bucket for (unsigned int i = 0; i < 10; i++) { OLA_ASSERT_TRUE(bucket.GetToken(now)); } OLA_ASSERT_EQ(30u, bucket.Count(now)); // add a bit of time now += ten_ms; OLA_ASSERT_EQ(30u, bucket.Count(now)); } ola-0.10.9/common/utils/Clock.cpp0000664000175000017500000002031014376533110013465 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Clock.cpp * Provides the TimeInterval and TimeStamp classes. * Copyright (C) 2005 Simon Newton * * The struct timeval can represent both absolute time and time intervals. * We define our own wrapper classes that: * - hide some of the platform differences, like the fact windows doesn't * provide timersub. * - Reduces bugs by using the compiler to check if the value was supposed * to be an interval or absolute time. For example, passing an absolute * time instead of an Interval to RegisterTimeout would be bad. */ #include #include #include #include #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include namespace ola { using std::string; BaseTimeVal::BaseTimeVal(int32_t sec, int32_t usec) { m_tv.tv_sec = sec; m_tv.tv_usec = usec; } BaseTimeVal& BaseTimeVal::operator=(const BaseTimeVal& other) { if (this != &other) { m_tv = other.m_tv; } return *this; } BaseTimeVal& BaseTimeVal::operator=(const struct timeval &tv) { m_tv = tv; return *this; } BaseTimeVal& BaseTimeVal::operator=(const struct timespec &ts) { Set(ts); return *this; } bool BaseTimeVal::operator==(const BaseTimeVal &other) const { return timercmp(&m_tv, &other.m_tv, ==); } bool BaseTimeVal::operator!=(const BaseTimeVal &other) const { return !(*this == other); } bool BaseTimeVal::operator>(const BaseTimeVal &other) const { return timercmp(&m_tv, &other.m_tv, >); } bool BaseTimeVal::operator>=(const BaseTimeVal &other) const { return timercmp(&m_tv, &other.m_tv, >=); } bool BaseTimeVal::operator<(const BaseTimeVal &other) const { return timercmp(&m_tv, &other.m_tv, <); } bool BaseTimeVal::operator<=(const BaseTimeVal &other) const { return timercmp(&m_tv, &other.m_tv, <=); } BaseTimeVal& BaseTimeVal::operator+=(const BaseTimeVal& other) { if (this != &other) { TimerAdd(m_tv, other.m_tv, &m_tv); } return *this; } BaseTimeVal &BaseTimeVal::operator-=(const BaseTimeVal &other) { if (this != &other) { TimerSub(m_tv, other.m_tv, &m_tv); } return *this; } const BaseTimeVal BaseTimeVal::operator+(const BaseTimeVal &interval) const { BaseTimeVal result = *this; result += interval; return result; } const BaseTimeVal BaseTimeVal::operator-(const BaseTimeVal &other) const { BaseTimeVal result; TimerSub(m_tv, other.m_tv, &result.m_tv); return result; } BaseTimeVal BaseTimeVal::operator*(unsigned int i) const { int64_t as_int = (*this).AsInt(); as_int *= i; return BaseTimeVal(as_int); } bool BaseTimeVal::IsSet() const { return timerisset(&m_tv); } void BaseTimeVal::AsTimeval(struct timeval *tv) const { *tv = m_tv; } int64_t BaseTimeVal::InMilliSeconds() const { return (m_tv.tv_sec * static_cast(ONE_THOUSAND) + m_tv.tv_usec / ONE_THOUSAND); } int64_t BaseTimeVal::AsInt() const { return (m_tv.tv_sec * static_cast(USEC_IN_SECONDS) + m_tv.tv_usec); } string BaseTimeVal::ToString() const { std::ostringstream str; str << m_tv.tv_sec << "." << std::setfill('0') << std::setw(6) << m_tv.tv_usec; return str.str(); } void BaseTimeVal::TimerAdd(const struct timeval &tv1, const struct timeval &tv2, struct timeval *result) const { result->tv_sec = tv1.tv_sec + tv2.tv_sec; result->tv_usec = tv1.tv_usec + tv2.tv_usec; if (result->tv_usec >= USEC_IN_SECONDS) { result->tv_sec++; result->tv_usec -= USEC_IN_SECONDS; } } void BaseTimeVal::TimerSub(const struct timeval &tv1, const struct timeval &tv2, struct timeval *result) const { result->tv_sec = tv1.tv_sec - tv2.tv_sec; result->tv_usec = tv1.tv_usec - tv2.tv_usec; if (result->tv_usec < 0) { result->tv_sec--; result->tv_usec += USEC_IN_SECONDS; } } void BaseTimeVal::Set(int64_t interval_useconds) { #ifdef HAVE_TIME_T m_tv.tv_sec = static_cast( interval_useconds / USEC_IN_SECONDS); #else m_tv.tv_sec = interval_useconds / USEC_IN_SECONDS; #endif // HAVE_TIME_T #ifdef HAVE_SUSECONDS_T m_tv.tv_usec = static_cast(interval_useconds % USEC_IN_SECONDS); #else m_tv.tv_usec = interval_useconds % USEC_IN_SECONDS; #endif // HAVE_SUSECONDS_T } void BaseTimeVal::Set(const struct timespec& ts) { m_tv.tv_sec = ts.tv_sec; m_tv.tv_usec = ts.tv_nsec / ONE_THOUSAND; } TimeInterval& TimeInterval::operator=(const TimeInterval& other) { if (this != &other) { m_interval = other.m_interval; } return *this; } bool TimeInterval::operator==(const TimeInterval &other) const { return m_interval == other.m_interval; } bool TimeInterval::operator!=(const TimeInterval &other) const { return m_interval != other.m_interval; } bool TimeInterval::operator>(const TimeInterval &other) const { return m_interval > other.m_interval; } bool TimeInterval::operator>=(const TimeInterval &other) const { return m_interval >= other.m_interval; } bool TimeInterval::operator<(const TimeInterval &other) const { return m_interval < other.m_interval; } bool TimeInterval::operator<=(const TimeInterval &other) const { return m_interval <= other.m_interval; } TimeInterval& TimeInterval::operator+=(const TimeInterval& other) { if (this != &other) { m_interval += other.m_interval; } return *this; } TimeInterval TimeInterval::operator*(unsigned int i) const { return TimeInterval(m_interval * i); } TimeStamp& TimeStamp::operator=(const TimeStamp& other) { if (this != &other) { m_tv = other.m_tv; } return *this; } TimeStamp& TimeStamp::operator=(const struct timeval &tv) { m_tv = tv; return *this; } TimeStamp& TimeStamp::operator=(const struct timespec &ts) { m_tv = ts; return *this; } TimeStamp &TimeStamp::operator+=(const TimeInterval &interval) { m_tv += interval.m_interval; return *this; } TimeStamp &TimeStamp::operator-=(const TimeInterval &interval) { m_tv -= interval.m_interval; return *this; } const TimeStamp TimeStamp::operator+(const TimeInterval &interval) const { return TimeStamp(m_tv + interval.m_interval); } const TimeInterval TimeStamp::operator-(const TimeStamp &other) const { return TimeInterval(m_tv - other.m_tv); } const TimeStamp TimeStamp::operator-(const TimeInterval &interval) const { return TimeStamp(m_tv - interval.m_interval); } void Clock::CurrentMonotonicTime(TimeStamp *timestamp) const { #ifdef CLOCK_MONOTONIC struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); *timestamp = ts; #else CurrentRealTime(timestamp); #endif } void Clock::CurrentRealTime(TimeStamp *timestamp) const { struct timeval tv; gettimeofday(&tv, NULL); *timestamp = tv; } void Clock::CurrentTime(TimeStamp *timestamp) const { CurrentRealTime(timestamp); } void MockClock::AdvanceTime(const TimeInterval &interval) { m_offset += interval; } void MockClock::AdvanceTime(int32_t sec, int32_t usec) { TimeInterval interval(sec, usec); m_offset += interval; } void MockClock::CurrentMonotonicTime(TimeStamp* timestamp) const { #ifdef CLOCK_MONOTONIC struct timespec ts; clock_gettime(CLOCK_MONOTONIC, &ts); *timestamp = ts; *timestamp += m_offset; #else OLA_DEBUG << "Monotonic clock unavailable. Falling back to CurrentRealTime."; CurrentRealTime(timestamp); #endif } void MockClock::CurrentRealTime(TimeStamp* timestamp) const { struct timeval tv; gettimeofday(&tv, NULL); *timestamp = tv; *timestamp += m_offset; } void MockClock::CurrentTime(TimeStamp* timestamp) const { CurrentMonotonicTime(timestamp); } } // namespace ola ola-0.10.9/common/utils/ClockTest.cpp0000664000175000017500000002116414376533110014335 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ClockTest.cpp * Unittest for String functions. * Copyright (C) 2005 Simon Newton */ #include #include #include #ifdef _WIN32 #define WIN32_LEAN_AND_MEAN #define VC_EXTRALEAN #include #endif // _WIN32 #include "ola/Clock.h" #include "ola/testing/TestUtils.h" class ClockTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ClockTest); CPPUNIT_TEST(testTimeStamp); CPPUNIT_TEST(testTimeInterval); CPPUNIT_TEST(testTimeIntervalMultiplication); CPPUNIT_TEST(testClockMonotonic); CPPUNIT_TEST(testClockRealTime); CPPUNIT_TEST(testClockCurrentTime); CPPUNIT_TEST(testMockClockMonotonic); CPPUNIT_TEST(testMockClockRealTime); CPPUNIT_TEST(testMockClockCurrentTime); CPPUNIT_TEST_SUITE_END(); public: void testTimeStamp(); void testTimeInterval(); void testTimeIntervalMultiplication(); void testClockMonotonic(); void testClockRealTime(); void testClockCurrentTime(); void testMockClockMonotonic(); void testMockClockRealTime(); void testMockClockCurrentTime(); }; CPPUNIT_TEST_SUITE_REGISTRATION(ClockTest); using ola::Clock; using ola::MockClock; using ola::TimeStamp; using ola::TimeInterval; using std::string; /* * Test the TimeStamp class */ void ClockTest::testTimeStamp() { Clock clock; TimeStamp timestamp, timestamp2; OLA_ASSERT_FALSE(timestamp.IsSet()); OLA_ASSERT_FALSE(timestamp2.IsSet()); // test assignment & copy constructor clock.CurrentMonotonicTime(×tamp); OLA_ASSERT_TRUE(timestamp.IsSet()); timestamp2 = timestamp; OLA_ASSERT_TRUE(timestamp2.IsSet()); TimeStamp timestamp3(timestamp); OLA_ASSERT_TRUE(timestamp3.IsSet()); OLA_ASSERT_EQ(timestamp, timestamp2); OLA_ASSERT_EQ(timestamp, timestamp3); // test timespec assignment TimeStamp timestamp4; struct timespec ts1; const time_t test_secs = 1604140280; const int test_nsecs = 42000; ts1.tv_sec = test_secs; ts1.tv_nsec = test_nsecs; timestamp4 = ts1; OLA_ASSERT_TRUE(timestamp4.IsSet()); OLA_ASSERT_EQ(test_secs, timestamp4.Seconds()); OLA_ASSERT_EQ(test_nsecs/1000, timestamp4.MicroSeconds()); // test timeval assignment TimeStamp timestamp5; struct timeval tv1; tv1.tv_sec = test_secs; tv1.tv_usec = test_nsecs/1000; timestamp5 = tv1; OLA_ASSERT_TRUE(timestamp5.IsSet()); OLA_ASSERT_EQ(test_secs, timestamp5.Seconds()); OLA_ASSERT_EQ(test_nsecs/1000, timestamp5.MicroSeconds()); // test timespec copy constructor TimeStamp timestamp6(ts1); OLA_ASSERT_TRUE(timestamp6.IsSet()); OLA_ASSERT_EQ(test_secs, timestamp6.Seconds()); OLA_ASSERT_EQ(test_nsecs/1000, timestamp6.MicroSeconds()); // test timeval copy constructor TimeStamp timestamp7(tv1); OLA_ASSERT_TRUE(timestamp7.IsSet()); OLA_ASSERT_EQ(test_secs, timestamp7.Seconds()); OLA_ASSERT_EQ(test_nsecs/1000, timestamp7.MicroSeconds()); // test equalities // Windows only seems to have ms resolution, to make the tests pass we need // to sleep here; XP only has 16ms resolution, so sleep a bit longer usleep(20000); clock.CurrentMonotonicTime(×tamp3); OLA_ASSERT_NE(timestamp3, timestamp); OLA_ASSERT_GT(timestamp3, timestamp); OLA_ASSERT_LT(timestamp, timestamp3); // test intervals TimeInterval interval = timestamp3 - timestamp; // test subtraction / addition timestamp2 = timestamp + interval; OLA_ASSERT_EQ(timestamp2, timestamp3); timestamp2 -= interval; OLA_ASSERT_EQ(timestamp, timestamp2); // test toString and AsInt TimeInterval one_point_five_seconds(1500000); OLA_ASSERT_EQ(string("1.500000"), one_point_five_seconds.ToString()); OLA_ASSERT_EQ(static_cast(1500000), one_point_five_seconds.AsInt()); OLA_ASSERT_EQ(static_cast(1500), one_point_five_seconds.InMilliSeconds()); } /* * test time intervals */ void ClockTest::testTimeInterval() { // test intervals TimeInterval interval(500000); // 0.5s TimeInterval interval2 = interval; TimeInterval interval3(interval); OLA_ASSERT_EQ(interval, interval2); OLA_ASSERT_EQ(interval, interval3); TimeInterval interval4(1, 500000); // 1.5s OLA_ASSERT_NE(interval, interval4); OLA_ASSERT_LT(interval, interval4); TimeInterval interval5(1, 600000); // 1.6s OLA_ASSERT_NE(interval4, interval5); OLA_ASSERT_LT(interval4, interval5); } /* * Test multiplication of TimeIntervals. */ void ClockTest::testTimeIntervalMultiplication() { TimeInterval half_second(500000); // 0.5s TimeInterval zero_seconds = half_second * 0; OLA_ASSERT_EQ((int64_t) 0, zero_seconds.InMilliSeconds()); TimeInterval another_half_second = half_second * 1; OLA_ASSERT_EQ((int64_t) 500, another_half_second.InMilliSeconds()); TimeInterval two_seconds = half_second * 4; OLA_ASSERT_EQ((int64_t) 2000, two_seconds.InMilliSeconds()); TimeInterval twenty_seconds = half_second * 40; OLA_ASSERT_EQ((int64_t) 20000, twenty_seconds.InMilliSeconds()); } /** * @brief Test the monotonic clock */ void ClockTest::testClockMonotonic() { Clock clock; TimeStamp first; clock.CurrentMonotonicTime(&first); #ifdef _WIN32 Sleep(1000); #else sleep(1); #endif // _WIN32 TimeStamp second; clock.CurrentMonotonicTime(&second); OLA_ASSERT_LT(first, second); } /** * @brief Test the real time clock */ void ClockTest::testClockRealTime() { Clock clock; TimeStamp first; clock.CurrentRealTime(&first); #ifdef _WIN32 Sleep(1000); #else sleep(1); #endif // _WIN32 TimeStamp second; clock.CurrentRealTime(&second); OLA_ASSERT_LT(first, second); } /** * @brief Test the CurrentTime wrapper method */ void ClockTest::testClockCurrentTime() { Clock clock; TimeStamp first; clock.CurrentTime(&first); #ifdef _WIN32 Sleep(1000); #else sleep(1); #endif // _WIN32 TimeStamp second; clock.CurrentTime(&second); OLA_ASSERT_LT(first, second); } /** * @brief Test the mock monotonic clock */ void ClockTest::testMockClockMonotonic() { MockClock clock; TimeStamp first; clock.CurrentMonotonicTime(&first); TimeInterval one_second(1, 0); clock.AdvanceTime(one_second); TimeStamp second; clock.CurrentMonotonicTime(&second); OLA_ASSERT_LT(first, second); OLA_ASSERT_TRUE_MSG( one_second <= (second - first), "This test should not have failed. Was the time changed?"); TimeInterval ten_point_five_seconds(10, 500000); clock.AdvanceTime(10, 500000); TimeStamp third; clock.CurrentMonotonicTime(&third); OLA_ASSERT_LT(second, third); OLA_ASSERT_TRUE_MSG( ten_point_five_seconds <= (third - second), "This test should not have failed. Was the time changed?"); } /** * @brief Test the mock real time clock * */ void ClockTest::testMockClockRealTime() { MockClock clock; TimeStamp first; clock.CurrentRealTime(&first); TimeInterval one_second(1, 0); clock.AdvanceTime(one_second); TimeStamp second; clock.CurrentRealTime(&second); OLA_ASSERT_LT(first, second); OLA_ASSERT_TRUE_MSG( one_second <= (second - first), "This test should not have failed. Was the time changed?"); TimeInterval ten_point_five_seconds(10, 500000); clock.AdvanceTime(10, 500000); TimeStamp third; clock.CurrentRealTime(&third); OLA_ASSERT_LT(second, third); OLA_ASSERT_TRUE_MSG( ten_point_five_seconds <= (third - second), "This test should not have failed. Was the time changed?"); } /** * @brief Test the mock CurrentTime wrapper method */ void ClockTest::testMockClockCurrentTime() { MockClock clock; TimeStamp first; clock.CurrentTime(&first); TimeInterval one_second(1, 0); clock.AdvanceTime(one_second); TimeStamp second; clock.CurrentTime(&second); OLA_ASSERT_LT(first, second); OLA_ASSERT_TRUE(one_second <= (second - first)); TimeInterval ten_point_five_seconds(10, 500000); clock.AdvanceTime(10, 500000); TimeStamp third; clock.CurrentTime(&third); OLA_ASSERT_LT(second, third); OLA_ASSERT_TRUE(ten_point_five_seconds <= (third - second)); } ola-0.10.9/common/utils/ActionQueue.cpp0000664000175000017500000000407214376533110014663 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ActionQueue.cpp * The Action Queue class. * Copyright (C) 2005 Simon Newton */ #include #include "ola/ActionQueue.h" #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/stl/STLUtils.h" namespace ola { using std::vector; ActionQueue::~ActionQueue() { STLDeleteElements(&m_actions); } void ActionQueue::AddAction(Action *action) { m_actions.push_back(action); } /* * Check the state of the current action, and if necessary run the next action. */ void ActionQueue::NextAction() { if (!m_success) return; if (m_action_index >= 0 && m_action_index < static_cast(m_actions.size())) { if (m_actions[m_action_index]->IsFatal() && m_actions[m_action_index]->Failed()) { // abort the chain here m_success = false; m_on_complete->Run(this); return; } } if (m_action_index >= static_cast(m_actions.size())) { OLA_WARN << "Action queue already finished!"; } else if (m_action_index == static_cast(m_actions.size()) - 1) { m_action_index++; m_on_complete->Run(this); } else { m_action_index++; m_actions[m_action_index]->Perform( NewSingleCallback(this, &ActionQueue::NextAction)); } } Action *ActionQueue::GetAction(unsigned int i) { if (i >= ActionCount()) return NULL; return m_actions[i]; } } // namespace ola ola-0.10.9/common/utils/MultiCallbackTest.cpp0000664000175000017500000000565114376533110016014 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MultiCallbackTest.cpp * Unittest for MultiCallback class * Copyright (C) 2011 Simon Newton */ #include #include #include "ola/Callback.h" #include "ola/MultiCallback.h" #include "ola/testing/TestUtils.h" using std::string; class MultiCallbackTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(MultiCallbackTest); CPPUNIT_TEST(testMultiCallback); CPPUNIT_TEST(testZeroLimit); CPPUNIT_TEST(testSingleLimit); CPPUNIT_TEST_SUITE_END(); public: void testMultiCallback(); void testZeroLimit(); void testSingleLimit(); void CallbackMethod() { m_callback_count++; } void setUp() { m_callback_count = 0; } private: int m_callback_count; }; CPPUNIT_TEST_SUITE_REGISTRATION(MultiCallbackTest); using ola::BaseCallback0; using ola::NewSingleCallback; using ola::NewMultiCallback; /** * Test the MultiCallback class. */ void MultiCallbackTest::testMultiCallback() { BaseCallback0 *callback = NewSingleCallback( this, &MultiCallbackTest::CallbackMethod); OLA_ASSERT_EQ(0, m_callback_count); BaseCallback0 *multi_callback = NewMultiCallback(3, callback); OLA_ASSERT_EQ(0, m_callback_count); multi_callback->Run(); OLA_ASSERT_EQ(0, m_callback_count); multi_callback->Run(); OLA_ASSERT_EQ(0, m_callback_count); multi_callback->Run(); OLA_ASSERT_EQ(1, m_callback_count); } /** * Test the MultiCallback works with a 0 limit */ void MultiCallbackTest::testZeroLimit() { BaseCallback0 *callback = NewSingleCallback( this, &MultiCallbackTest::CallbackMethod); OLA_ASSERT_EQ(0, m_callback_count); BaseCallback0 *multi_callback = NewMultiCallback(0, callback); OLA_ASSERT_EQ(1, m_callback_count); (void) multi_callback; } /** * Test the MultiCallback works with a single limit */ void MultiCallbackTest::testSingleLimit() { BaseCallback0 *callback = NewSingleCallback( this, &MultiCallbackTest::CallbackMethod); OLA_ASSERT_EQ(0, m_callback_count); BaseCallback0 *multi_callback = NewMultiCallback(1, callback); OLA_ASSERT_EQ(0, m_callback_count); multi_callback->Run(); OLA_ASSERT_EQ(1, m_callback_count); } ola-0.10.9/common/utils/TokenBucket.cpp0000664000175000017500000000317414376533110014661 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TokenBucket.cpp * Token Bucket implementation. * Copyright (C) 2010 Simon Newton */ #include #include "olad/TokenBucket.h" namespace ola { /* * Check if we have enough tokens for an operation. Assuming there is enough * tokens, the count is decremented by one. * @param now the current time * @returns true if there is enough tokens, false otherwise */ bool TokenBucket::GetToken(const TimeStamp &now) { Count(now); if (m_count > 0) { m_count--; return true; } return false; } /* * Get the number of tokens in the bucket */ unsigned int TokenBucket::Count(const TimeStamp &now) { int64_t delta = (now - m_last).AsInt(); uint64_t tokens = delta * m_rate / USEC_IN_SECONDS; m_count = std::min(static_cast(m_max), m_count + tokens); if (tokens) m_last += ola::TimeInterval(tokens * USEC_IN_SECONDS / m_rate); return m_count; } } // namespace ola ola-0.10.9/common/utils/StringUtils.cpp0000664000175000017500000002764114376533110014737 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * StringUtils.cpp * Random String functions. * Copyright (C) 2005 Simon Newton */ #define __STDC_LIMIT_MACROS // for UINT8_MAX & friends #include #include #include #include #include #include #include #include #include #include #include "ola/StringUtils.h" #include "ola/base/Macro.h" namespace ola { using std::endl; using std::ostringstream; using std::string; using std::vector; void StringSplit(const string &input, vector *tokens, const string &delimiters) { string::size_type start_offset = 0; string::size_type end_offset = 0; while (1) { end_offset = input.find_first_of(delimiters, start_offset); if (end_offset == string::npos) { tokens->push_back( input.substr(start_offset, input.size() - start_offset)); return; } tokens->push_back(input.substr(start_offset, end_offset - start_offset)); start_offset = (end_offset + 1 > input.size()) ? string::npos : (end_offset + 1); } } void StringTrim(string *input) { string characters_to_trim = " \n\r\t"; string::size_type start = input->find_first_not_of(characters_to_trim); string::size_type end = input->find_last_not_of(characters_to_trim); if (start == string::npos) { input->clear(); } else { *input = input->substr(start, end - start + 1); } } void ShortenString(string *input) { size_t index = input->find(static_cast(0)); if (index != string::npos) { input->erase(index); } } bool StringBeginsWith(const string &s, const string &prefix) { if (s.length() >= prefix.length()) { return (0 == s.compare(0, prefix.length(), prefix)); } else { return false; } } bool StringEndsWith(const string &s, const string &suffix) { if (s.length() >= suffix.length()) { return 0 == s.compare(s.length() - suffix.length(), suffix.length(), suffix); } else { return false; } } bool StripPrefix(string *s, const string &prefix) { if (StringBeginsWith(*s, prefix)) { *s = s->substr(prefix.length()); return true; } else { return false; } } bool StripSuffix(string *s, const string &suffix) { if (StringEndsWith(*s, suffix)) { *s = s->substr(0, s->length() - suffix.length()); return true; } else { return false; } } string IntToHexString(unsigned int i, unsigned int width) { strings::_ToHex v = strings::_ToHex( i, static_cast(width), true); ostringstream str; str << v; return str.str(); } bool StringToBool(const string &value, bool *output) { string lc_value(value); ToLower(&lc_value); if ((lc_value == "true") || (lc_value == "t") || (lc_value == "1")) { *output = true; return true; } else if ((lc_value == "false") || (lc_value == "f") || (lc_value == "0")) { *output = false; return true; } return false; } bool StringToBoolTolerant(const string &value, bool *output) { if (StringToBool(value, output)) { return true; } else { string lc_value(value); ToLower(&lc_value); if ((lc_value == "on") || (lc_value == "enable") || (lc_value == "enabled")) { *output = true; return true; } else if ((lc_value == "off") || (lc_value == "disable") || (lc_value == "disabled")) { *output = false; return true; } } return false; } bool StringToInt(const string &value, unsigned int *output, bool strict) { if (value.empty()) { return false; } char *end_ptr; errno = 0; long long l = strtoll(value.data(), &end_ptr, 10); // NOLINT(runtime/int) if (l < 0 || (l == 0 && errno != 0)) { return false; } if (value == end_ptr) { return false; } if (strict && *end_ptr != 0) { return false; } if (l > static_cast(UINT32_MAX)) { // NOLINT(runtime/int) return false; } *output = static_cast(l); return true; } bool StringToInt(const string &value, uint16_t *output, bool strict) { unsigned int v; if (!StringToInt(value, &v, strict)) { return false; } if (v > UINT16_MAX) { return false; } *output = static_cast(v); return true; } bool StringToInt(const string &value, uint8_t *output, bool strict) { unsigned int v; if (!StringToInt(value, &v, strict)) { return false; } if (v > UINT8_MAX) { return false; } *output = static_cast(v); return true; } bool StringToInt(const string &value, int *output, bool strict) { if (value.empty()) { return false; } char *end_ptr; errno = 0; long long l = strtoll(value.data(), &end_ptr, 10); // NOLINT(runtime/int) if (l == 0 && errno != 0) { return false; } if (value == end_ptr) { return false; } if (strict && *end_ptr != 0) { return false; } if (l < INT32_MIN || l > INT32_MAX) { return false; } *output = static_cast(l); return true; } bool StringToInt(const string &value, int16_t *output, bool strict) { int v; if (!StringToInt(value, &v, strict)) { return false; } if (v < INT16_MIN || v > INT16_MAX) { return false; } *output = static_cast(v); return true; } bool StringToInt(const string &value, int8_t *output, bool strict) { int v; if (!StringToInt(value, &v, strict)) { return false; } if (v < INT8_MIN || v > INT8_MAX) { return false; } *output = static_cast(v); return true; } void Escape(string *original) { for (string::iterator iter = original->begin(); iter != original->end(); ++iter) { switch (*iter) { case '"': iter = original->insert(iter, '\\'); iter++; break; case '\\': iter = original->insert(iter, '\\'); iter++; break; case '/': iter = original->insert(iter, '\\'); iter++; break; case '\b': *iter = 'b'; iter = original->insert(iter, '\\'); iter++; break; case '\f': *iter = 'f'; iter = original->insert(iter, '\\'); iter++; break; case '\n': *iter = 'n'; iter = original->insert(iter, '\\'); iter++; break; case '\r': *iter = 'r'; iter = original->insert(iter, '\\'); iter++; break; case '\t': *iter = 't'; iter = original->insert(iter, '\\'); iter++; break; default: break; } } } string EscapeString(const string &original) { string result = original; Escape(&result); return result; } string EncodeString(const string &original) { ostringstream encoded; for (string::const_iterator iter = original.begin(); iter != original.end(); ++iter) { if (isprint(*iter)) { encoded << *iter; } else { encoded << "\\x" << ola::strings::ToHex(static_cast(*iter), false); } } return encoded.str(); } void ReplaceAll(string *original, const string &find, const string &replace) { if (original->empty() || find.empty()) { return; // No text or nothing to find, so nothing to do } size_t start = 0; while ((start = original->find(find, start)) != string::npos) { original->replace(start, find.length(), replace); // Move to the end of the replaced section start += ((replace.length() > find.length()) ? replace.length() : 0); } } bool HexStringToInt(const string &value, uint8_t *output) { uint32_t temp; if (!HexStringToInt(value, &temp)) { return false; } if (temp > UINT8_MAX) { return false; } *output = static_cast(temp); return true; } bool HexStringToInt(const string &value, uint16_t *output) { uint32_t temp; if (!HexStringToInt(value, &temp)) { return false; } if (temp > UINT16_MAX) { return false; } *output = static_cast(temp); return true; } bool HexStringToInt(const string &value, uint32_t *output) { if (value.empty()) { return false; } size_t found = value.find_first_not_of("ABCDEFabcdef0123456789"); if (found != string::npos) { return false; } *output = strtoul(value.data(), NULL, 16); return true; } bool HexStringToInt(const string &value, int8_t *output) { int32_t temp; if (!HexStringToInt(value, &temp)) { return false; } if (temp < 0 || temp > static_cast(UINT8_MAX)) { return false; } *output = static_cast(temp); return true; } bool HexStringToInt(const string &value, int16_t *output) { int32_t temp; if (!HexStringToInt(value, &temp)) { return false; } if (temp < 0 || temp > static_cast(UINT16_MAX)) { return false; } *output = static_cast(temp); return true; } bool HexStringToInt(const string &value, int32_t *output) { if (value.empty()) { return false; } size_t found = value.find_first_not_of("ABCDEFabcdef0123456789"); if (found != string::npos) { return false; } *output = strtoll(value.data(), NULL, 16); return true; } void ToLower(string *s) { std::transform(s->begin(), s->end(), s->begin(), std::ptr_fun(std::tolower)); } void ToUpper(string *s) { std::transform(s->begin(), s->end(), s->begin(), std::ptr_fun(std::toupper)); } void CapitalizeLabel(string *s) { bool capitalize = true; for (string::iterator iter = s->begin(); iter != s->end(); ++iter) { switch (*iter) { case '-': // fall through, also convert to space then capitalize next character OLA_FALLTHROUGH case '_': *iter = ' '; // fall through, also convert to space then capitalize next character OLA_FALLTHROUGH case ' ': capitalize = true; break; default: if (capitalize && islower(*iter)) { *iter = toupper(*iter); } capitalize = false; } } } void CustomCapitalizeLabel(string *s) { // Remember to update the Doxygen in include/ola/StringUtils.h too static const char* const transforms[] = { "dhcp", "dmx", "dns", "ip", "ipv4", // Should really be IPv4 probably, but better than nothing "ipv6", // Should really be IPv6 probably, but better than nothing "led", "mdmx", // City Theatrical, should really be mDMX, but better than nothing "rdm", "uid", NULL }; const size_t size = s->size(); const char* const *transform = transforms; while (*transform) { size_t last_match = 0; const string ancronym(*transform); const size_t ancronym_size = ancronym.size(); while (true) { size_t match_position = s->find(ancronym, last_match); if (match_position == string::npos) { break; } last_match = match_position + 1; size_t end_position = match_position + ancronym_size; if ((match_position == 0 || ispunct(s->at(match_position - 1))) && (end_position == size || ispunct(s->at(end_position)))) { while (match_position < end_position) { s->at(match_position) = toupper(s->at(match_position)); match_position++; } } } transform++; } CapitalizeLabel(s); } void CapitalizeFirst(string *s) { string::iterator iter = s->begin(); if (islower(*iter)) { *iter = toupper(*iter); } } } // namespace ola ola-0.10.9/common/utils/Makefile.mk0000664000175000017500000000162214376533110014001 00000000000000# LIBRARIES ################################################ common_libolacommon_la_SOURCES += \ common/utils/ActionQueue.cpp \ common/utils/Clock.cpp \ common/utils/DmxBuffer.cpp \ common/utils/StringUtils.cpp \ common/utils/TokenBucket.cpp \ common/utils/Watchdog.cpp # TESTS ################################################ test_programs += common/utils/UtilsTester common_utils_UtilsTester_SOURCES = \ common/utils/ActionQueueTest.cpp \ common/utils/BackoffTest.cpp \ common/utils/CallbackTest.cpp \ common/utils/ClockTest.cpp \ common/utils/DmxBufferTest.cpp \ common/utils/MultiCallbackTest.cpp \ common/utils/StringUtilsTest.cpp \ common/utils/TokenBucketTest.cpp \ common/utils/UtilsTest.cpp \ common/utils/WatchdogTest.cpp common_utils_UtilsTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_utils_UtilsTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/utils/CallbackTest.cpp0000664000175000017500000004060514376533110014777 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * CallbackTest.cpp * Unittest for the autogen'ed Callback code * Copyright (C) 2005 Simon Newton */ #include #include #include "ola/Callback.h" #include "ola/testing/TestUtils.h" using std::string; class CallbackTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(CallbackTest); CPPUNIT_TEST(testFunctionCallbacks); CPPUNIT_TEST(testMethodCallbacks); CPPUNIT_TEST(testFunctionCallbacks1); CPPUNIT_TEST(testMethodCallbacks1); CPPUNIT_TEST(testMethodCallbacks2); CPPUNIT_TEST_SUITE_END(); public: void testFunctionCallbacks(); void testMethodCallbacks(); void testFunctionCallbacks1(); void testMethodCallbacks1(); void testMethodCallbacks2(); void testMethodCallbacks4(); void Method0() {} bool BoolMethod0() { return true; } void Method1(unsigned int i) { OLA_ASSERT_EQ(TEST_INT_VALUE, i); } bool BoolMethod1(unsigned int i) { OLA_ASSERT_EQ(TEST_INT_VALUE, i); return true; } void Method2(unsigned int i, int j) { OLA_ASSERT_EQ(TEST_INT_VALUE, i); OLA_ASSERT_EQ(TEST_INT_VALUE2, j); } bool BoolMethod2(unsigned int i, int j) { OLA_ASSERT_EQ(TEST_INT_VALUE, i); OLA_ASSERT_EQ(TEST_INT_VALUE2, j); return true; } void Method3(unsigned int i, int j, char c) { OLA_ASSERT_EQ(TEST_INT_VALUE, i); OLA_ASSERT_EQ(TEST_INT_VALUE2, j); OLA_ASSERT_EQ(TEST_CHAR_VALUE, c); } bool BoolMethod3(unsigned int i, int j, char c) { OLA_ASSERT_EQ(TEST_INT_VALUE, i); OLA_ASSERT_EQ(TEST_INT_VALUE2, j); OLA_ASSERT_EQ(TEST_CHAR_VALUE, c); return true; } void Method4(unsigned int i, int j, char c, const string &s) { OLA_ASSERT_EQ(TEST_INT_VALUE, i); OLA_ASSERT_EQ(TEST_INT_VALUE2, j); OLA_ASSERT_EQ(TEST_CHAR_VALUE, c); OLA_ASSERT_EQ(string(TEST_STRING_VALUE), s); } bool BoolMethod4(unsigned int i, int j, char c, const string &s) { OLA_ASSERT_EQ(TEST_INT_VALUE, i); OLA_ASSERT_EQ(TEST_INT_VALUE2, j); OLA_ASSERT_EQ(TEST_CHAR_VALUE, c); OLA_ASSERT_EQ(string(TEST_STRING_VALUE), s); return true; } static const unsigned int TEST_INT_VALUE; static const int TEST_INT_VALUE2; static const char TEST_CHAR_VALUE; static const char TEST_STRING_VALUE[]; }; const unsigned int CallbackTest::TEST_INT_VALUE = 42; const int CallbackTest::TEST_INT_VALUE2 = 53; const char CallbackTest::TEST_CHAR_VALUE = 'c'; const char CallbackTest::TEST_STRING_VALUE[] = "foo"; CPPUNIT_TEST_SUITE_REGISTRATION(CallbackTest); using ola::BaseCallback1; using ola::BaseCallback2; using ola::BaseCallback4; using ola::Callback0; using ola::NewCallback; using ola::NewCallback; using ola::NewSingleCallback; using ola::NewSingleCallback; using ola::SingleUseCallback0; // Functions used for testing void Function0() {} bool BoolFunction0() { return true; } void Function1(unsigned int i) { OLA_ASSERT_EQ(CallbackTest::TEST_INT_VALUE, i); } bool BoolFunction1(unsigned int i) { OLA_ASSERT_EQ(CallbackTest::TEST_INT_VALUE, i); return true; } void Function2(unsigned int i, int j) { OLA_ASSERT_EQ(CallbackTest::TEST_INT_VALUE, i); OLA_ASSERT_EQ(CallbackTest::TEST_INT_VALUE2, j); } bool BoolFunction2(unsigned int i, int j) { OLA_ASSERT_EQ(CallbackTest::TEST_INT_VALUE, i); OLA_ASSERT_EQ(CallbackTest::TEST_INT_VALUE2, j); return true; } /* * Test the Function Callbacks class */ void CallbackTest::testFunctionCallbacks() { // no arg, void return closures SingleUseCallback0 *c1 = NewSingleCallback(&Function0); c1->Run(); Callback0 *c2 = NewCallback(&Function0); c2->Run(); c2->Run(); delete c2; // no arg, bool closures SingleUseCallback0 *c3 = NewSingleCallback(&BoolFunction0); OLA_ASSERT_TRUE(c3->Run()); Callback0 *c4 = NewCallback(&BoolFunction0); OLA_ASSERT_TRUE(c4->Run()); OLA_ASSERT_TRUE(c4->Run()); delete c4; // one arg, void return SingleUseCallback0 *c5 = NewSingleCallback( &Function1, TEST_INT_VALUE); c5->Run(); Callback0 *c6 = NewCallback(&Function1, TEST_INT_VALUE); c6->Run(); c6->Run(); delete c6; // one arg, bool closures SingleUseCallback0 *c7 = NewSingleCallback( &BoolFunction1, TEST_INT_VALUE); OLA_ASSERT_TRUE(c7->Run()); Callback0 *c8 = NewCallback(&BoolFunction1, TEST_INT_VALUE); OLA_ASSERT_TRUE(c8->Run()); OLA_ASSERT_TRUE(c8->Run()); delete c8; } /* * Test the Method Callbacks */ void CallbackTest::testMethodCallbacks() { // no arg, void return closures SingleUseCallback0 *c1 = NewSingleCallback(this, &CallbackTest::Method0); c1->Run(); Callback0 *c2 = NewCallback(this, &CallbackTest::Method0); c2->Run(); c2->Run(); delete c2; // no arg, bool closures SingleUseCallback0 *c3 = NewSingleCallback(this, &CallbackTest::BoolMethod0); OLA_ASSERT_TRUE(c3->Run()); Callback0 *c4 = NewCallback(this, &CallbackTest::BoolMethod0); OLA_ASSERT_TRUE(c4->Run()); OLA_ASSERT_TRUE(c4->Run()); delete c4; // one arg, void return SingleUseCallback0 *c5 = NewSingleCallback( this, &CallbackTest::Method1, TEST_INT_VALUE); c5->Run(); Callback0 *c6 = NewCallback(this, &CallbackTest::Method1, TEST_INT_VALUE); c6->Run(); c6->Run(); delete c6; // one arg, bool closures SingleUseCallback0 *c7 = NewSingleCallback( this, &CallbackTest::BoolMethod1, TEST_INT_VALUE); OLA_ASSERT_TRUE(c7->Run()); Callback0 *c8 = NewCallback(this, &CallbackTest::BoolMethod1, TEST_INT_VALUE); OLA_ASSERT_TRUE(c8->Run()); OLA_ASSERT_TRUE(c8->Run()); delete c8; // two arg, void return SingleUseCallback0 *c9 = NewSingleCallback( this, &CallbackTest::Method2, TEST_INT_VALUE, TEST_INT_VALUE2); c9->Run(); Callback0 *c10 = NewCallback(this, &CallbackTest::Method2, TEST_INT_VALUE, TEST_INT_VALUE2); c10->Run(); c10->Run(); delete c10; // two arg, bool closures SingleUseCallback0 *c11 = NewSingleCallback( this, &CallbackTest::BoolMethod2, TEST_INT_VALUE, TEST_INT_VALUE2); OLA_ASSERT_TRUE(c11->Run()); Callback0 *c12 = NewCallback(this, &CallbackTest::BoolMethod2, TEST_INT_VALUE, TEST_INT_VALUE2); OLA_ASSERT_TRUE(c12->Run()); OLA_ASSERT_TRUE(c12->Run()); delete c12; // three arg, void return SingleUseCallback0 *c13 = NewSingleCallback( this, &CallbackTest::Method3, TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE); c13->Run(); Callback0 *c14 = NewCallback(this, &CallbackTest::Method3, TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE); c14->Run(); c14->Run(); delete c14; // three arg, bool closures SingleUseCallback0 *c15 = NewSingleCallback( this, &CallbackTest::BoolMethod3, TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE); OLA_ASSERT_TRUE(c15->Run()); Callback0 *c16 = NewCallback(this, &CallbackTest::BoolMethod3, TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE); OLA_ASSERT_TRUE(c16->Run()); OLA_ASSERT_TRUE(c16->Run()); delete c16; } /* * Test the single argument function closures */ void CallbackTest::testFunctionCallbacks1() { // single arg, void return closures BaseCallback1 *c1 = NewSingleCallback(&Function1); c1->Run(TEST_INT_VALUE); BaseCallback1 *c2 = NewCallback(&Function1); c2->Run(TEST_INT_VALUE); c2->Run(TEST_INT_VALUE); delete c2; // test a function that returns bool BaseCallback1 *c3 = NewSingleCallback(&BoolFunction1); OLA_ASSERT_TRUE(c3->Run(TEST_INT_VALUE)); BaseCallback1 *c4 = NewCallback(&BoolFunction1); OLA_ASSERT_TRUE(c4->Run(TEST_INT_VALUE)); OLA_ASSERT_TRUE(c4->Run(TEST_INT_VALUE)); delete c4; // single arg, void return closures BaseCallback1 *c6 = NewSingleCallback( &Function2, TEST_INT_VALUE); c6->Run(TEST_INT_VALUE2); BaseCallback1 *c7 = NewCallback( &Function2, TEST_INT_VALUE); c7->Run(TEST_INT_VALUE2); c7->Run(TEST_INT_VALUE2); delete c7; } /* * Test the Method Callbacks */ void CallbackTest::testMethodCallbacks1() { // test 1 arg callbacks that return unsigned ints BaseCallback1 *c1 = NewSingleCallback( this, &CallbackTest::Method1); c1->Run(TEST_INT_VALUE); BaseCallback1 *c2 = NewCallback(this, &CallbackTest::Method1); c2->Run(TEST_INT_VALUE); c2->Run(TEST_INT_VALUE); delete c2; // test 1 arg callbacks that return bools BaseCallback1 *c3 = NewSingleCallback( this, &CallbackTest::BoolMethod1); OLA_ASSERT_TRUE(c3->Run(TEST_INT_VALUE)); BaseCallback1 *c4 = NewCallback( this, &CallbackTest::BoolMethod1); OLA_ASSERT_TRUE(c4->Run(TEST_INT_VALUE)); OLA_ASSERT_TRUE(c4->Run(TEST_INT_VALUE)); delete c4; // test 1 arg initial, 1 arg deferred callbacks that return ints BaseCallback1 *c5 = NewSingleCallback( this, &CallbackTest::Method2, TEST_INT_VALUE); c5->Run(TEST_INT_VALUE2); BaseCallback1 *c6 = NewCallback( this, &CallbackTest::Method2, TEST_INT_VALUE); c6->Run(TEST_INT_VALUE2); c6->Run(TEST_INT_VALUE2); delete c6; // test 1 arg initial, 1 arg deferred callbacks that return bools BaseCallback1 *c7 = NewSingleCallback( this, &CallbackTest::BoolMethod2, TEST_INT_VALUE); OLA_ASSERT_TRUE(c7->Run(TEST_INT_VALUE2)); BaseCallback1 *c8 = NewCallback( this, &CallbackTest::BoolMethod2, TEST_INT_VALUE); OLA_ASSERT_TRUE(c8->Run(TEST_INT_VALUE2)); OLA_ASSERT_TRUE(c8->Run(TEST_INT_VALUE2)); delete c8; // test 2 arg initial, 1 arg deferred callbacks that return ints BaseCallback1 *c9 = NewSingleCallback( this, &CallbackTest::Method3, TEST_INT_VALUE, TEST_INT_VALUE2); c9->Run(TEST_CHAR_VALUE); BaseCallback1 *c10 = NewCallback( this, &CallbackTest::Method3, TEST_INT_VALUE, TEST_INT_VALUE2); c10->Run(TEST_CHAR_VALUE); c10->Run(TEST_CHAR_VALUE); delete c10; // test 2 arg initial, 1 arg deferred callbacks that return bools BaseCallback1 *c11 = NewSingleCallback( this, &CallbackTest::BoolMethod3, TEST_INT_VALUE, TEST_INT_VALUE2); OLA_ASSERT_TRUE(c11->Run(TEST_CHAR_VALUE)); BaseCallback1 *c12 = NewCallback( this, &CallbackTest::BoolMethod3, TEST_INT_VALUE, TEST_INT_VALUE2); OLA_ASSERT_TRUE(c12->Run(TEST_CHAR_VALUE)); OLA_ASSERT_TRUE(c12->Run(TEST_CHAR_VALUE)); delete c12; // test 3 arg initial, 1 arg deferred callbacks that return ints BaseCallback1 *c13 = NewSingleCallback( this, &CallbackTest::Method4, TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE); c13->Run(TEST_STRING_VALUE); BaseCallback1 *c14 = NewCallback( this, &CallbackTest::Method4, TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE); c14->Run(TEST_STRING_VALUE); c14->Run(TEST_STRING_VALUE); delete c14; // test 3 arg initial, 1 arg deferred callbacks that return bools BaseCallback1 *c15 = NewSingleCallback( this, &CallbackTest::BoolMethod4, TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE); OLA_ASSERT_TRUE(c15->Run(TEST_STRING_VALUE)); BaseCallback1 *c16 = NewCallback( this, &CallbackTest::BoolMethod4, TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE); OLA_ASSERT_TRUE(c16->Run(TEST_STRING_VALUE)); OLA_ASSERT_TRUE(c16->Run(TEST_STRING_VALUE)); delete c16; } /* * Test the Method Callbacks */ void CallbackTest::testMethodCallbacks2() { // test 2 arg callbacks that return void BaseCallback2 *c1 = NewSingleCallback( this, &CallbackTest::Method2); c1->Run(TEST_INT_VALUE, TEST_INT_VALUE2); BaseCallback2 *c2 = NewCallback( this, &CallbackTest::Method2); c2->Run(TEST_INT_VALUE, TEST_INT_VALUE2); c2->Run(TEST_INT_VALUE, TEST_INT_VALUE2); delete c2; // test 2 arg callbacks that return bools BaseCallback2 *c3 = NewSingleCallback( this, &CallbackTest::BoolMethod2); OLA_ASSERT_TRUE(c3->Run(TEST_INT_VALUE, TEST_INT_VALUE2)); BaseCallback2 *c4 = NewCallback( this, &CallbackTest::BoolMethod2); OLA_ASSERT_TRUE(c4->Run(TEST_INT_VALUE, TEST_INT_VALUE2)); OLA_ASSERT_TRUE(c4->Run(TEST_INT_VALUE, TEST_INT_VALUE2)); delete c4; // test 1 create time, 2 run time arg callbacks that return void BaseCallback2 *c5 = NewSingleCallback( this, &CallbackTest::Method3, TEST_INT_VALUE); c5->Run(TEST_INT_VALUE2, TEST_CHAR_VALUE); BaseCallback2 *c6 = NewCallback( this, &CallbackTest::Method3, TEST_INT_VALUE); c6->Run(TEST_INT_VALUE2, TEST_CHAR_VALUE); c6->Run(TEST_INT_VALUE2, TEST_CHAR_VALUE); delete c6; // test 1 create time, 2 run time arg callbacks that return bools BaseCallback2 *c7 = NewSingleCallback( this, &CallbackTest::BoolMethod3, TEST_INT_VALUE); OLA_ASSERT_TRUE(c7->Run(TEST_INT_VALUE2, TEST_CHAR_VALUE)); BaseCallback2 *c8 = NewCallback( this, &CallbackTest::BoolMethod3, TEST_INT_VALUE); OLA_ASSERT_TRUE(c8->Run(TEST_INT_VALUE2, TEST_CHAR_VALUE)); OLA_ASSERT_TRUE(c8->Run(TEST_INT_VALUE2, TEST_CHAR_VALUE)); delete c8; } /* * Test the Method Callbacks */ void CallbackTest::testMethodCallbacks4() { // test 2 arg callbacks that return unsigned ints BaseCallback4 *c1 = NewSingleCallback( this, &CallbackTest::Method4); c1->Run(TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE, TEST_STRING_VALUE); BaseCallback4 *c2 = NewCallback( this, &CallbackTest::Method4); c2->Run(TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE, TEST_STRING_VALUE); c2->Run(TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE, TEST_STRING_VALUE); delete c2; // test 2 arg callbacks that return bools BaseCallback4 *c3 = NewSingleCallback( this, &CallbackTest::BoolMethod4); OLA_ASSERT_TRUE(c3->Run(TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE, TEST_STRING_VALUE)); BaseCallback4 *c4 = NewCallback( this, &CallbackTest::BoolMethod4); OLA_ASSERT_TRUE(c4->Run(TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE, TEST_STRING_VALUE)); OLA_ASSERT_TRUE(c4->Run(TEST_INT_VALUE, TEST_INT_VALUE2, TEST_CHAR_VALUE, TEST_STRING_VALUE)); delete c4; } ola-0.10.9/common/utils/StringUtilsTest.cpp0000664000175000017500000011214614376533110015572 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * StringUtilsTest.cpp * Unittest for String functions. * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include "ola/StringUtils.h" #include "ola/testing/TestUtils.h" using ola::CapitalizeLabel; using ola::CustomCapitalizeLabel; using ola::CapitalizeFirst; using ola::EncodeString; using ola::Escape; using ola::EscapeString; using ola::FormatData; using ola::HexStringToInt; using ola::IntToHexString; using ola::IntToString; using ola::PrefixedHexStringToInt; using ola::ReplaceAll; using ola::ShortenString; using ola::StringBeginsWith; using ola::StringEndsWith; using ola::StringJoin; using ola::StringSplit; using ola::StringToBool; using ola::StringToBoolTolerant; using ola::StringToInt; using ola::StringToIntOrDefault; using ola::StringTrim; using ola::StripPrefix; using ola::StripSuffix; using ola::ToLower; using ola::ToUpper; using ola::strings::ToHex; using std::ostringstream; using std::string; using std::vector; class StringUtilsTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(StringUtilsTest); CPPUNIT_TEST(testSplit); CPPUNIT_TEST(testTrim); CPPUNIT_TEST(testShorten); CPPUNIT_TEST(testBeginsWith); CPPUNIT_TEST(testEndsWith); CPPUNIT_TEST(testStripPrefix); CPPUNIT_TEST(testStripSuffix); CPPUNIT_TEST(testIntToString); CPPUNIT_TEST(testIntToHexString); CPPUNIT_TEST(testEscape); CPPUNIT_TEST(testEncodeString); CPPUNIT_TEST(testStringToBool); CPPUNIT_TEST(testStringToBoolTolerant); CPPUNIT_TEST(testStringToUInt); CPPUNIT_TEST(testStringToUIntOrDefault); CPPUNIT_TEST(testStringToUInt16); CPPUNIT_TEST(testStringToUInt16OrDefault); CPPUNIT_TEST(testStringToUInt8); CPPUNIT_TEST(testStringToUInt8OrDefault); CPPUNIT_TEST(testStringToInt); CPPUNIT_TEST(testStringToIntOrDefault); CPPUNIT_TEST(testStringToInt16); CPPUNIT_TEST(testStringToInt16OrDefault); CPPUNIT_TEST(testStringToInt8); CPPUNIT_TEST(testStringToInt8OrDefault); CPPUNIT_TEST(testHexStringToInt); CPPUNIT_TEST(testPrefixedHexStringToInt); CPPUNIT_TEST(testToLower); CPPUNIT_TEST(testToUpper); CPPUNIT_TEST(testCapitalizeLabel); CPPUNIT_TEST(testCustomCapitalizeLabel); CPPUNIT_TEST(testCapitalizeFirst); CPPUNIT_TEST(testFormatData); CPPUNIT_TEST(testStringJoin); CPPUNIT_TEST(testReplaceAll); CPPUNIT_TEST_SUITE_END(); public: void testSplit(); void testTrim(); void testShorten(); void testBeginsWith(); void testEndsWith(); void testStripPrefix(); void testStripSuffix(); void testIntToString(); void testIntToHexString(); void testEscape(); void testEncodeString(); void testStringToBool(); void testStringToBoolTolerant(); void testStringToUInt(); void testStringToUIntOrDefault(); void testStringToUInt16(); void testStringToUInt16OrDefault(); void testStringToUInt8(); void testStringToUInt8OrDefault(); void testStringToInt(); void testStringToIntOrDefault(); void testStringToInt16(); void testStringToInt16OrDefault(); void testStringToInt8(); void testStringToInt8OrDefault(); void testHexStringToInt(); void testPrefixedHexStringToInt(); void testToLower(); void testToUpper(); void testCapitalizeLabel(); void testCustomCapitalizeLabel(); void testCapitalizeFirst(); void testFormatData(); void testStringJoin(); void testReplaceAll(); }; CPPUNIT_TEST_SUITE_REGISTRATION(StringUtilsTest); /* * Test the split function */ void StringUtilsTest::testSplit() { vector tokens; string input = ""; StringSplit(input, &tokens); OLA_ASSERT_EQ((size_t) 1, tokens.size()); OLA_ASSERT_EQ(string(""), tokens[0]); input = "1 2 345"; tokens.clear(); StringSplit(input, &tokens); OLA_ASSERT_EQ((size_t) 3, tokens.size()); OLA_ASSERT_EQ(string("1"), tokens[0]); OLA_ASSERT_EQ(string("2"), tokens[1]); OLA_ASSERT_EQ(string("345"), tokens[2]); input = "1,2,345"; tokens.clear(); StringSplit(input, &tokens, ","); OLA_ASSERT_EQ((size_t) 3, tokens.size()); OLA_ASSERT_EQ(string("1"), tokens[0]); OLA_ASSERT_EQ(string("2"), tokens[1]); OLA_ASSERT_EQ(string("345"), tokens[2]); input = ",1,2,345,,"; tokens.clear(); StringSplit(input, &tokens, ","); OLA_ASSERT_EQ((size_t) 6, tokens.size()); OLA_ASSERT_EQ(string(""), tokens[0]); OLA_ASSERT_EQ(string("1"), tokens[1]); OLA_ASSERT_EQ(string("2"), tokens[2]); OLA_ASSERT_EQ(string("345"), tokens[3]); OLA_ASSERT_EQ(string(""), tokens[4]); OLA_ASSERT_EQ(string(""), tokens[5]); input = "1 2,345"; tokens.clear(); StringSplit(input, &tokens, " ,"); OLA_ASSERT_EQ((size_t) 3, tokens.size()); OLA_ASSERT_EQ(string("1"), tokens[0]); OLA_ASSERT_EQ(string("2"), tokens[1]); OLA_ASSERT_EQ(string("345"), tokens[2]); input = "1, 2,345"; tokens.clear(); StringSplit(input, &tokens, " ,"); OLA_ASSERT_EQ((size_t) 4, tokens.size()); OLA_ASSERT_EQ(string("1"), tokens[0]); OLA_ASSERT_EQ(string(""), tokens[1]); OLA_ASSERT_EQ(string("2"), tokens[2]); OLA_ASSERT_EQ(string("345"), tokens[3]); input = "1"; tokens.clear(); StringSplit(input, &tokens, "."); OLA_ASSERT_EQ((size_t) 1, tokens.size()); OLA_ASSERT_EQ(string("1"), tokens[0]); // And the old non-pointer version input = ",1,2,345,,"; tokens.clear(); StringSplit(input, tokens, ","); OLA_ASSERT_EQ((size_t) 6, tokens.size()); OLA_ASSERT_EQ(string(""), tokens[0]); OLA_ASSERT_EQ(string("1"), tokens[1]); OLA_ASSERT_EQ(string("2"), tokens[2]); OLA_ASSERT_EQ(string("345"), tokens[3]); OLA_ASSERT_EQ(string(""), tokens[4]); OLA_ASSERT_EQ(string(""), tokens[5]); } /* * Test the trim function. */ void StringUtilsTest::testTrim() { string input = "foo bar baz"; StringTrim(&input); OLA_ASSERT_EQ(string("foo bar baz"), input); input = " \rfoo bar\t\n"; StringTrim(&input); OLA_ASSERT_EQ(string("foo bar"), input); input = " \r\t\n"; StringTrim(&input); OLA_ASSERT_EQ(string(""), input); } /* * Test the shorten function. */ void StringUtilsTest::testShorten() { string input = "foo bar baz"; ShortenString(&input); OLA_ASSERT_EQ(string("foo bar baz"), input); input = "foo \0bar"; ShortenString(&input); OLA_ASSERT_EQ(string("foo "), input); input = "foo\0bar\0baz"; StringTrim(&input); OLA_ASSERT_EQ(string("foo"), input); } /* * Test the StringBeginsWith function. */ void StringUtilsTest::testBeginsWith() { string input = "foo bar baz"; OLA_ASSERT_TRUE(StringBeginsWith(input, "foo")); OLA_ASSERT_TRUE(StringBeginsWith(input, "foo ")); OLA_ASSERT_TRUE(StringBeginsWith(input, "foo bar")); OLA_ASSERT_TRUE(StringBeginsWith(input, "")); OLA_ASSERT_FALSE(StringBeginsWith(input, "baz")); } /* * Test the StringEndsWith function. */ void StringUtilsTest::testEndsWith() { string input = "foo bar baz"; OLA_ASSERT_TRUE(StringEndsWith(input, "baz")); OLA_ASSERT_TRUE(StringEndsWith(input, " baz")); OLA_ASSERT_TRUE(StringEndsWith(input, "bar baz")); OLA_ASSERT_TRUE(StringEndsWith(input, "")); OLA_ASSERT_FALSE(StringEndsWith(input, "foo")); } /* * Test the StripPrefix function. */ void StringUtilsTest::testStripPrefix() { string input = "foo bar baz"; OLA_ASSERT_TRUE(StripPrefix(&input, "foo")); OLA_ASSERT_EQ(string(" bar baz"), input); input = "foo bar baz"; OLA_ASSERT_TRUE(StripPrefix(&input, "foo ")); OLA_ASSERT_EQ(string("bar baz"), input); input = "foo bar baz"; OLA_ASSERT_TRUE(StripPrefix(&input, "foo bar")); OLA_ASSERT_EQ(string(" baz"), input); input = "foo bar baz"; OLA_ASSERT_TRUE(StripPrefix(&input, "")); OLA_ASSERT_EQ(string("foo bar baz"), input); input = "foo bar baz"; OLA_ASSERT_FALSE(StripPrefix(&input, "baz")); } /* * Test the StripSuffix function. */ void StringUtilsTest::testStripSuffix() { string input = "foo bar baz"; OLA_ASSERT_TRUE(StripSuffix(&input, "baz")); OLA_ASSERT_EQ(string("foo bar "), input); input = "foo bar baz"; OLA_ASSERT_TRUE(StripSuffix(&input, " baz")); OLA_ASSERT_EQ(string("foo bar"), input); input = "foo bar baz"; OLA_ASSERT_TRUE(StripSuffix(&input, "bar baz")); OLA_ASSERT_EQ(string("foo "), input); input = "foo bar baz"; OLA_ASSERT_TRUE(StripSuffix(&input, "")); OLA_ASSERT_EQ(string("foo bar baz"), input); input = "foo bar baz"; OLA_ASSERT_FALSE(StripSuffix(&input, "foo")); } /* * test the IntToString function. */ void StringUtilsTest::testIntToString() { OLA_ASSERT_EQ(string("0"), IntToString(0)); OLA_ASSERT_EQ(string("1234"), IntToString(1234)); OLA_ASSERT_EQ(string("-1234"), IntToString(-1234)); unsigned int i = 42; OLA_ASSERT_EQ(string("42"), IntToString(i)); } /* * test the IntToHexString function. */ void StringUtilsTest::testIntToHexString() { // Using the old IntToHexString OLA_ASSERT_EQ(string("0x00"), IntToHexString((uint8_t)0)); OLA_ASSERT_EQ(string("0x01"), IntToHexString((uint8_t)1)); OLA_ASSERT_EQ(string("0x42"), IntToHexString((uint8_t)0x42)); OLA_ASSERT_EQ(string("0x0001"), IntToHexString((uint16_t)0x0001)); OLA_ASSERT_EQ(string("0xabcd"), IntToHexString((uint16_t)0xABCD)); OLA_ASSERT_EQ(string("0xdeadbeef"), IntToHexString((uint32_t)0xDEADBEEF)); unsigned int i = 0x42; OLA_ASSERT_EQ(string("0x00000042"), IntToHexString(i)); // Using the inline string concatenation ostringstream str; str << ToHex((uint8_t)0); OLA_ASSERT_EQ(string("0x00"), str.str()); str.str(""); str << ToHex((uint8_t)1); OLA_ASSERT_EQ(string("0x01"), str.str()); str.str(""); str << ToHex((uint8_t)0x42); OLA_ASSERT_EQ(string("0x42"), str.str()); str.str(""); str << ToHex((uint16_t)0x0001); OLA_ASSERT_EQ(string("0x0001"), str.str()); str.str(""); str << ToHex((uint16_t)0xABCD); OLA_ASSERT_EQ(string("0xabcd"), str.str()); str.str(""); str << ToHex((uint32_t)0xDEADBEEF); OLA_ASSERT_EQ(string("0xdeadbeef"), str.str()); str.str(""); str << ToHex(i); OLA_ASSERT_EQ(string("0x00000042"), str.str()); str.str(""); // Without prefix str << ToHex((uint8_t)0x42, false); OLA_ASSERT_EQ(string("42"), str.str()); str.str(""); str << ToHex((uint16_t)0xABCD, false); OLA_ASSERT_EQ(string("abcd"), str.str()); str.str(""); } /** * Test escaping. */ void StringUtilsTest::testEscape() { string s1 = "foo\""; Escape(&s1); OLA_ASSERT_EQ(string("foo\\\""), s1); s1 = "he said \"foo\""; Escape(&s1); OLA_ASSERT_EQ(string("he said \\\"foo\\\""), s1); s1 = "backslash\\test"; Escape(&s1); OLA_ASSERT_EQ(string("backslash\\\\test"), s1); s1 = "newline\ntest"; Escape(&s1); OLA_ASSERT_EQ(string("newline\\ntest"), s1); s1 = "tab\ttest"; Escape(&s1); OLA_ASSERT_EQ(string("tab\\ttest"), s1); s1 = "one\"two\\three/four\bfive\fsix\nseven\reight\tnine"; Escape(&s1); OLA_ASSERT_EQ( string("one\\\"two\\\\three\\/four\\bfive\\fsix\\nseven\\reight\\tnine"), s1); s1 = "one\"two\\three/four\bfive\fsix\nseven\reight\tnine"; string result = EscapeString(s1); OLA_ASSERT_EQ( string("one\\\"two\\\\three\\/four\\bfive\\fsix\\nseven\\reight\\tnine"), result); } /** * Test encoding string */ void StringUtilsTest::testEncodeString() { string s1 = "foo"; OLA_ASSERT_EQ(string("foo"), EncodeString(s1)); s1 = "newline\ntest"; OLA_ASSERT_EQ(string("newline\\x0atest"), EncodeString(s1)); s1 = "newline\n\ntest"; OLA_ASSERT_EQ(string("newline\\x0a\\x0atest"), EncodeString(s1)); s1 = "\x01newline\x02test"; OLA_ASSERT_EQ(string("\\x01newline\\x02test"), EncodeString(s1)); // Test a null in the middle of a string s1 = string("newline" "\x00" "test", 12); OLA_ASSERT_EQ(string("newline\\x00test"), EncodeString(s1)); } void StringUtilsTest::testStringToBool() { bool value; OLA_ASSERT_FALSE(StringToBool("", &value)); OLA_ASSERT_FALSE(StringToBool("-1", &value)); OLA_ASSERT_FALSE(StringToBool("2", &value)); OLA_ASSERT_FALSE(StringToBool("a", &value)); OLA_ASSERT_TRUE(StringToBool("true", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBool("false", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBool("TrUE", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBool("FalSe", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBool("t", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBool("f", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBool("T", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBool("F", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBool("1", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBool("0", &value)); OLA_ASSERT_EQ(value, false); } void StringUtilsTest::testStringToBoolTolerant() { bool value; OLA_ASSERT_FALSE(StringToBoolTolerant("", &value)); OLA_ASSERT_FALSE(StringToBoolTolerant("-1", &value)); OLA_ASSERT_FALSE(StringToBoolTolerant("2", &value)); OLA_ASSERT_FALSE(StringToBoolTolerant("a", &value)); OLA_ASSERT_TRUE(StringToBoolTolerant("true", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBoolTolerant("false", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBoolTolerant("TrUE", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBoolTolerant("FalSe", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBoolTolerant("t", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBoolTolerant("f", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBoolTolerant("T", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBoolTolerant("F", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBoolTolerant("1", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBoolTolerant("0", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBoolTolerant("on", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBoolTolerant("off", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBoolTolerant("On", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBoolTolerant("oFf", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBoolTolerant("enable", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBoolTolerant("disable", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBoolTolerant("EnAblE", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBoolTolerant("dISaBle", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBoolTolerant("enabled", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBoolTolerant("disabled", &value)); OLA_ASSERT_EQ(value, false); OLA_ASSERT_TRUE(StringToBoolTolerant("eNabLED", &value)); OLA_ASSERT_EQ(value, true); OLA_ASSERT_TRUE(StringToBoolTolerant("DisaBLED", &value)); OLA_ASSERT_EQ(value, false); } void StringUtilsTest::testStringToUInt() { unsigned int value; OLA_ASSERT_FALSE(StringToInt("", &value)); OLA_ASSERT_FALSE(StringToInt("-1", &value)); OLA_ASSERT_TRUE(StringToInt("0", &value)); OLA_ASSERT_EQ(0u, value); OLA_ASSERT_TRUE(StringToInt("1", &value)); OLA_ASSERT_EQ(1u, value); OLA_ASSERT_TRUE(StringToInt(" 42050", &value)); OLA_ASSERT_EQ(42050u, value); OLA_ASSERT_TRUE(StringToInt("65537", &value)); OLA_ASSERT_EQ(65537u, value); OLA_ASSERT_TRUE(StringToInt("4294967295", &value)); OLA_ASSERT_EQ(4294967295U, value); OLA_ASSERT_FALSE(StringToInt("4294967296", &value)); OLA_ASSERT_FALSE(StringToInt("foo", &value)); // same tests with strict mode on OLA_ASSERT_FALSE(StringToInt("-1 foo", &value, true)); OLA_ASSERT_FALSE(StringToInt("0 ", &value, true)); OLA_ASSERT_FALSE(StringToInt("1 bar baz", &value, true)); OLA_ASSERT_FALSE(StringToInt("65537cat", &value, true)); OLA_ASSERT_FALSE(StringToInt("4294967295bat bar", &value, true)); } void StringUtilsTest::testStringToUIntOrDefault() { OLA_ASSERT_EQ(42u, StringToIntOrDefault("", 42u)); OLA_ASSERT_EQ(42u, StringToIntOrDefault("-1", 42u)); OLA_ASSERT_EQ(0u, StringToIntOrDefault("0", 42u)); OLA_ASSERT_EQ(1u, StringToIntOrDefault("1", 42u)); OLA_ASSERT_EQ(65537u, StringToIntOrDefault("65537", 42u)); OLA_ASSERT_EQ(4294967295U, StringToIntOrDefault("4294967295", 42u)); OLA_ASSERT_EQ(42u, StringToIntOrDefault("4294967296", 42u)); OLA_ASSERT_EQ(42u, StringToIntOrDefault("foo", 42u)); // same tests with strict mode on OLA_ASSERT_EQ(42u, StringToIntOrDefault("-1 foo", 42u, true)); OLA_ASSERT_EQ(42u, StringToIntOrDefault("0 ", 42u, true)); OLA_ASSERT_EQ(42u, StringToIntOrDefault("1 bar baz", 42u, true)); OLA_ASSERT_EQ(42u, StringToIntOrDefault("65537cat", 42u, true)); OLA_ASSERT_EQ(42u, StringToIntOrDefault("4294967295bat bar", 42u, true)); } void StringUtilsTest::testHexStringToInt() { unsigned int value; OLA_ASSERT_FALSE(HexStringToInt("", &value)); OLA_ASSERT_FALSE(HexStringToInt("-1", &value)); OLA_ASSERT_TRUE(HexStringToInt("0", &value)); OLA_ASSERT_EQ(0u, value); OLA_ASSERT_TRUE(HexStringToInt("1", &value)); OLA_ASSERT_EQ(1u, value); OLA_ASSERT_TRUE(HexStringToInt("a", &value)); OLA_ASSERT_EQ(10u, value); OLA_ASSERT_TRUE(HexStringToInt("f", &value)); OLA_ASSERT_EQ(15u, value); OLA_ASSERT_TRUE(HexStringToInt("a1", &value)); OLA_ASSERT_EQ(161u, value); OLA_ASSERT_TRUE(HexStringToInt("ff", &value)); OLA_ASSERT_EQ(255u, value); OLA_ASSERT_TRUE(HexStringToInt("a1", &value)); OLA_ASSERT_EQ(161u, value); OLA_ASSERT_TRUE(HexStringToInt("ff", &value)); OLA_ASSERT_EQ(255u, value); OLA_ASSERT_TRUE(HexStringToInt("ffff", &value)); OLA_ASSERT_EQ(65535u, value); OLA_ASSERT_TRUE(HexStringToInt("ffffff", &value)); OLA_ASSERT_EQ((unsigned int) 16777215, value); OLA_ASSERT_TRUE(HexStringToInt("ffffffff", &value)); OLA_ASSERT_EQ((unsigned int) 4294967295UL, value); OLA_ASSERT_TRUE(HexStringToInt("ef123456", &value)); OLA_ASSERT_EQ((unsigned int) 4010947670UL, value); OLA_ASSERT_FALSE(HexStringToInt("fz", &value)); OLA_ASSERT_FALSE(HexStringToInt("zfff", &value)); OLA_ASSERT_FALSE(HexStringToInt("0xf", &value)); // uint16_t uint16_t value2; OLA_ASSERT_FALSE(HexStringToInt("", &value2)); OLA_ASSERT_FALSE(HexStringToInt("-1", &value2)); OLA_ASSERT_TRUE(HexStringToInt("0", &value2)); OLA_ASSERT_EQ((uint16_t) 0, value2); OLA_ASSERT_TRUE(HexStringToInt("1", &value2)); OLA_ASSERT_EQ((uint16_t) 1, value2); OLA_ASSERT_TRUE(HexStringToInt("a", &value2)); OLA_ASSERT_EQ((uint16_t) 10, value2); OLA_ASSERT_TRUE(HexStringToInt("f", &value2)); OLA_ASSERT_EQ((uint16_t) 15, value2); OLA_ASSERT_TRUE(HexStringToInt("a1", &value2)); OLA_ASSERT_EQ((uint16_t) 161, value2); OLA_ASSERT_TRUE(HexStringToInt("ff", &value2)); OLA_ASSERT_EQ((uint16_t) 255, value2); OLA_ASSERT_TRUE(HexStringToInt("a1", &value2)); OLA_ASSERT_EQ((uint16_t) 161, value2); OLA_ASSERT_TRUE(HexStringToInt("ff", &value2)); OLA_ASSERT_EQ((uint16_t) 255, value2); OLA_ASSERT_TRUE(HexStringToInt("400", &value2)); OLA_ASSERT_EQ((uint16_t) 1024, value2); OLA_ASSERT_TRUE(HexStringToInt("ffff", &value2)); OLA_ASSERT_EQ((uint16_t) 65535, value2); OLA_ASSERT_FALSE(HexStringToInt("ffffff", &value2)); OLA_ASSERT_FALSE(HexStringToInt("ffffffff", &value2)); OLA_ASSERT_FALSE(HexStringToInt("ef123456", &value2)); OLA_ASSERT_FALSE(HexStringToInt("fz", &value2)); OLA_ASSERT_FALSE(HexStringToInt("zfff", &value2)); OLA_ASSERT_FALSE(HexStringToInt("0xf", &value2)); // int8_t int8_t value3; OLA_ASSERT_FALSE(HexStringToInt("", &value3)); OLA_ASSERT_FALSE(HexStringToInt("-1", &value3)); OLA_ASSERT_TRUE(HexStringToInt("0", &value3)); OLA_ASSERT_EQ((int8_t) 0, value3); OLA_ASSERT_TRUE(HexStringToInt("1", &value3)); OLA_ASSERT_EQ((int8_t) 1, value3); OLA_ASSERT_TRUE(HexStringToInt("a", &value3)); OLA_ASSERT_EQ((int8_t) 10, value3); OLA_ASSERT_TRUE(HexStringToInt("f", &value3)); OLA_ASSERT_EQ((int8_t) 15, value3); OLA_ASSERT_TRUE(HexStringToInt("7f", &value3)); OLA_ASSERT_EQ((int8_t) 127, value3); OLA_ASSERT_TRUE(HexStringToInt("a1", &value3)); OLA_ASSERT_EQ((int8_t) -95, value3); OLA_ASSERT_TRUE(HexStringToInt("80", &value3)); OLA_ASSERT_EQ((int8_t) -128, value3); OLA_ASSERT_TRUE(HexStringToInt("ff", &value3)); OLA_ASSERT_EQ((int8_t) -1, value3); OLA_ASSERT_FALSE(HexStringToInt("ffff", &value3)); OLA_ASSERT_FALSE(HexStringToInt("fff0", &value3)); OLA_ASSERT_FALSE(HexStringToInt("ffffff", &value3)); OLA_ASSERT_FALSE(HexStringToInt("ffffffff", &value3)); OLA_ASSERT_FALSE(HexStringToInt("ef123456", &value3)); OLA_ASSERT_FALSE(HexStringToInt("fz", &value3)); OLA_ASSERT_FALSE(HexStringToInt("zfff", &value3)); OLA_ASSERT_FALSE(HexStringToInt("0xf", &value3)); // int16_t int16_t value4; OLA_ASSERT_FALSE(HexStringToInt("", &value4)); OLA_ASSERT_FALSE(HexStringToInt("-1", &value4)); OLA_ASSERT_TRUE(HexStringToInt("0", &value4)); OLA_ASSERT_EQ((int16_t) 0, value4); OLA_ASSERT_TRUE(HexStringToInt("1", &value4)); OLA_ASSERT_EQ((int16_t) 1, value4); OLA_ASSERT_TRUE(HexStringToInt("a", &value4)); OLA_ASSERT_EQ((int16_t) 10, value4); OLA_ASSERT_TRUE(HexStringToInt("f", &value4)); OLA_ASSERT_EQ((int16_t) 15, value4); OLA_ASSERT_TRUE(HexStringToInt("a1", &value4)); OLA_ASSERT_EQ((int16_t) 161, value4); OLA_ASSERT_TRUE(HexStringToInt("ff", &value4)); OLA_ASSERT_EQ((int16_t) 255, value4); OLA_ASSERT_TRUE(HexStringToInt("7fff", &value4)); OLA_ASSERT_EQ((int16_t) 32767, value4); OLA_ASSERT_TRUE(HexStringToInt("ffff", &value4)); OLA_ASSERT_EQ((int16_t) -1, value4); OLA_ASSERT_TRUE(HexStringToInt("fff0", &value4)); OLA_ASSERT_EQ((int16_t) -16, value4); OLA_ASSERT_TRUE(HexStringToInt("8000", &value4)); OLA_ASSERT_EQ((int16_t) -32768, value4); OLA_ASSERT_FALSE(HexStringToInt("ffffff", &value4)); OLA_ASSERT_FALSE(HexStringToInt("ffffffff", &value4)); OLA_ASSERT_FALSE(HexStringToInt("ef123456", &value4)); OLA_ASSERT_FALSE(HexStringToInt("fz", &value4)); OLA_ASSERT_FALSE(HexStringToInt("zfff", &value4)); OLA_ASSERT_FALSE(HexStringToInt("0xf", &value4)); // int32 int32_t value5; OLA_ASSERT_FALSE(HexStringToInt("", &value5)); OLA_ASSERT_FALSE(HexStringToInt("-1", &value5)); OLA_ASSERT_TRUE(HexStringToInt("0", &value5)); OLA_ASSERT_EQ((int32_t) 0, value5); OLA_ASSERT_TRUE(HexStringToInt("1", &value5)); OLA_ASSERT_EQ((int32_t) 1, value5); OLA_ASSERT_TRUE(HexStringToInt("a", &value5)); OLA_ASSERT_EQ((int32_t) 10, value5); OLA_ASSERT_TRUE(HexStringToInt("f", &value5)); OLA_ASSERT_EQ((int32_t) 15, value5); OLA_ASSERT_TRUE(HexStringToInt("a1", &value5)); OLA_ASSERT_EQ((int32_t) 161, value5); OLA_ASSERT_TRUE(HexStringToInt("ff", &value5)); OLA_ASSERT_EQ((int32_t) 255, value5); OLA_ASSERT_TRUE(HexStringToInt("7fff", &value5)); OLA_ASSERT_EQ((int32_t) 32767, value5); OLA_ASSERT_TRUE(HexStringToInt("ffff", &value5)); OLA_ASSERT_EQ((int32_t) 65535, value5); OLA_ASSERT_TRUE(HexStringToInt("ffffffff", &value5)); OLA_ASSERT_EQ((int32_t) -1, value5); OLA_ASSERT_TRUE(HexStringToInt("fffffff0", &value5)); OLA_ASSERT_EQ((int32_t) -16, value5); OLA_ASSERT_TRUE(HexStringToInt("80000000", &value5)); OLA_ASSERT_EQ((int32_t) -2147483647 - 1, value5); } void StringUtilsTest::testPrefixedHexStringToInt() { int value; OLA_ASSERT_FALSE(PrefixedHexStringToInt("", &value)); OLA_ASSERT_FALSE(PrefixedHexStringToInt("-1", &value)); OLA_ASSERT_FALSE(PrefixedHexStringToInt("0", &value)); OLA_ASSERT_FALSE(PrefixedHexStringToInt("2000", &value)); OLA_ASSERT_FALSE(PrefixedHexStringToInt("0x", &value)); OLA_ASSERT_TRUE(PrefixedHexStringToInt("0x1", &value)); OLA_ASSERT_EQ(1, value); OLA_ASSERT_TRUE(PrefixedHexStringToInt("0xff", &value)); OLA_ASSERT_EQ(255, value); OLA_ASSERT_TRUE(PrefixedHexStringToInt("0x70ff", &value)); OLA_ASSERT_EQ(28927, value); OLA_ASSERT_TRUE(PrefixedHexStringToInt("0xffffffff", &value)); OLA_ASSERT_EQ(-1, value); OLA_ASSERT_TRUE(PrefixedHexStringToInt("0X7f", &value)); OLA_ASSERT_EQ(127, value); OLA_ASSERT_TRUE(PrefixedHexStringToInt("0X7F", &value)); OLA_ASSERT_EQ(127, value); OLA_ASSERT_TRUE(PrefixedHexStringToInt("0x7F", &value)); OLA_ASSERT_EQ(127, value); } void StringUtilsTest::testStringToUInt16() { uint16_t value; OLA_ASSERT_FALSE(StringToInt("", &value)); OLA_ASSERT_FALSE(StringToInt("-1", &value)); OLA_ASSERT_FALSE(StringToInt("65536", &value)); OLA_ASSERT_TRUE(StringToInt("0", &value)); OLA_ASSERT_EQ((uint16_t) 0, value); OLA_ASSERT_TRUE(StringToInt("1", &value)); OLA_ASSERT_EQ((uint16_t) 1, value); OLA_ASSERT_TRUE(StringToInt("143", &value)); OLA_ASSERT_EQ((uint16_t) 143, value); OLA_ASSERT_TRUE(StringToInt("65535", &value)); OLA_ASSERT_EQ((uint16_t) 65535, value); } void StringUtilsTest::testStringToUInt16OrDefault() { OLA_ASSERT_EQ((uint16_t) 42, StringToIntOrDefault("", (uint16_t) 42)); OLA_ASSERT_EQ((uint16_t) 42, StringToIntOrDefault("-1", (uint16_t) 42)); OLA_ASSERT_EQ((uint16_t) 42, StringToIntOrDefault("65536", (uint16_t) 42)); OLA_ASSERT_EQ((uint16_t) 0, StringToIntOrDefault("0", (uint16_t) 42)); OLA_ASSERT_EQ((uint16_t) 1, StringToIntOrDefault("1", (uint16_t) 42)); OLA_ASSERT_EQ((uint16_t) 143, StringToIntOrDefault("143", (uint16_t) 42)); OLA_ASSERT_EQ((uint16_t) 65535, StringToIntOrDefault("65535", (uint16_t) 42)); } void StringUtilsTest::testStringToUInt8() { uint8_t value; OLA_ASSERT_FALSE(StringToInt("", &value)); OLA_ASSERT_FALSE(StringToInt("-1", &value)); OLA_ASSERT_FALSE(StringToInt("256", &value)); OLA_ASSERT_TRUE(StringToInt("0", &value)); OLA_ASSERT_EQ((uint8_t) 0, value); OLA_ASSERT_TRUE(StringToInt("1", &value)); OLA_ASSERT_EQ((uint8_t) 1, value); OLA_ASSERT_TRUE(StringToInt("143", &value)); OLA_ASSERT_EQ((uint8_t) 143, value); OLA_ASSERT_TRUE(StringToInt("255", &value)); OLA_ASSERT_EQ((uint8_t) 255, value); } void StringUtilsTest::testStringToUInt8OrDefault() { OLA_ASSERT_EQ((uint8_t) 42, StringToIntOrDefault("", (uint8_t) 42)); OLA_ASSERT_EQ((uint8_t) 42, StringToIntOrDefault("-1", (uint8_t) 42)); OLA_ASSERT_EQ((uint8_t) 42, StringToIntOrDefault("256", (uint8_t) 42)); OLA_ASSERT_EQ((uint8_t) 0, StringToIntOrDefault("0", (uint8_t) 42)); OLA_ASSERT_EQ((uint8_t) 1, StringToIntOrDefault("1", (uint8_t) 42)); OLA_ASSERT_EQ((uint8_t) 143, StringToIntOrDefault("143", (uint8_t) 42)); OLA_ASSERT_EQ((uint8_t) 255, StringToIntOrDefault("255", (uint8_t) 42)); } void StringUtilsTest::testStringToInt() { int value; OLA_ASSERT_FALSE(StringToInt("", &value)); OLA_ASSERT_FALSE(StringToInt("a", &value)); OLA_ASSERT_FALSE(StringToInt("2147483649", &value)); OLA_ASSERT_TRUE(StringToInt("-2147483648", &value)); OLA_ASSERT_EQ(static_cast(-2147483647 - 1), value); OLA_ASSERT_TRUE(StringToInt("-2147483647", &value)); OLA_ASSERT_EQ(-2147483647, value); OLA_ASSERT_TRUE(StringToInt("-1", &value)); OLA_ASSERT_EQ(-1, value); OLA_ASSERT_TRUE(StringToInt("0", &value)); OLA_ASSERT_EQ(0, value); OLA_ASSERT_TRUE(StringToInt("1", &value)); OLA_ASSERT_EQ(1, value); OLA_ASSERT_TRUE(StringToInt("143", &value)); OLA_ASSERT_EQ(143, value); OLA_ASSERT_TRUE(StringToInt("2147483647", &value)); OLA_ASSERT_EQ(2147483647, value); OLA_ASSERT_FALSE(StringToInt("2147483648", &value)); // strict mode on OLA_ASSERT_FALSE(StringToInt("2147483649 ", &value, true)); OLA_ASSERT_FALSE(StringToInt("-2147483648bar", &value, true)); OLA_ASSERT_FALSE(StringToInt("-2147483647 baz", &value, true)); OLA_ASSERT_FALSE(StringToInt("-1.", &value, true)); OLA_ASSERT_FALSE(StringToInt("0!", &value, true)); OLA_ASSERT_FALSE(StringToInt("1 this is a test", &value, true)); OLA_ASSERT_FALSE(StringToInt("143car", &value, true)); OLA_ASSERT_FALSE(StringToInt("2147483647 !@#", &value, true)); OLA_ASSERT_FALSE(StringToInt("2147483648mm", &value, true)); } void StringUtilsTest::testStringToIntOrDefault() { OLA_ASSERT_EQ(42, StringToIntOrDefault("", 42)); OLA_ASSERT_EQ(42, StringToIntOrDefault("a", 42)); OLA_ASSERT_EQ(42, StringToIntOrDefault("2147483649", 42)); OLA_ASSERT_EQ(static_cast(-2147483647 - 1), StringToIntOrDefault("-2147483648", 42)); OLA_ASSERT_EQ(-2147483647, StringToIntOrDefault("-2147483647", 42)); OLA_ASSERT_EQ(-1, StringToIntOrDefault("-1", 42)); OLA_ASSERT_EQ(0, StringToIntOrDefault("0", 42)); OLA_ASSERT_EQ(1, StringToIntOrDefault("1", 42)); OLA_ASSERT_EQ(143, StringToIntOrDefault("143", 42)); OLA_ASSERT_EQ(2147483647, StringToIntOrDefault("2147483647", 42)); OLA_ASSERT_EQ(42, StringToIntOrDefault("2147483648", 42)); // strict mode on OLA_ASSERT_EQ(42, StringToIntOrDefault("2147483649 ", 42, true)); OLA_ASSERT_EQ(42, StringToIntOrDefault("-2147483648bar", 42, true)); OLA_ASSERT_EQ(42, StringToIntOrDefault("-2147483647 baz", 42, true)); OLA_ASSERT_EQ(42, StringToIntOrDefault("-1.", 42, true)); OLA_ASSERT_EQ(42, StringToIntOrDefault("0!", 42, true)); OLA_ASSERT_EQ(42, StringToIntOrDefault("1 this is a test", 42, true)); OLA_ASSERT_EQ(42, StringToIntOrDefault("143car", 42, true)); OLA_ASSERT_EQ(42, StringToIntOrDefault("2147483647 !@#", 42, true)); OLA_ASSERT_EQ(42, StringToIntOrDefault("2147483648mm", 42, true)); } void StringUtilsTest::testStringToInt16() { int16_t value; OLA_ASSERT_FALSE(StringToInt("", &value)); OLA_ASSERT_FALSE(StringToInt("a", &value)); OLA_ASSERT_FALSE(StringToInt("-32769", &value)); OLA_ASSERT_TRUE(StringToInt("-32768", &value)); OLA_ASSERT_EQ((int16_t) -32768, value); OLA_ASSERT_TRUE(StringToInt("-32767", &value)); OLA_ASSERT_EQ((int16_t) -32767, value); OLA_ASSERT_TRUE(StringToInt("-1", &value)); OLA_ASSERT_EQ((int16_t) -1, value); OLA_ASSERT_TRUE(StringToInt("0", &value)); OLA_ASSERT_EQ((int16_t) 0, value); OLA_ASSERT_TRUE(StringToInt("1", &value)); OLA_ASSERT_EQ((int16_t) 1, value); OLA_ASSERT_TRUE(StringToInt("143", &value)); OLA_ASSERT_EQ((int16_t) 143, value); OLA_ASSERT_TRUE(StringToInt("32767", &value)); OLA_ASSERT_EQ((int16_t) 32767, value); OLA_ASSERT_FALSE(StringToInt("32768", &value)); } void StringUtilsTest::testStringToInt16OrDefault() { OLA_ASSERT_EQ((int16_t) 42, StringToIntOrDefault("", (int16_t) 42)); OLA_ASSERT_EQ((int16_t) 42, StringToIntOrDefault("a", (int16_t) 42)); OLA_ASSERT_EQ((int16_t) 42, StringToIntOrDefault("-32769", (int16_t) 42)); OLA_ASSERT_EQ((int16_t) -32768, StringToIntOrDefault("-32768", (int16_t) 42)); OLA_ASSERT_EQ((int16_t) -32767, StringToIntOrDefault("-32767", (int16_t) 42)); OLA_ASSERT_EQ((int16_t) -1, StringToIntOrDefault("-1", (int16_t) 42)); OLA_ASSERT_EQ((int16_t) 0, StringToIntOrDefault("0", (int16_t) 42)); OLA_ASSERT_EQ((int16_t) 1, StringToIntOrDefault("1", (int16_t) 42)); OLA_ASSERT_EQ((int16_t) 143, StringToIntOrDefault("143", (int16_t) 42)); OLA_ASSERT_EQ((int16_t) 32767, StringToIntOrDefault("32767", (int16_t) 42)); OLA_ASSERT_EQ((int16_t) 42, StringToIntOrDefault("32768", (int16_t) 42)); } void StringUtilsTest::testStringToInt8() { int8_t value; OLA_ASSERT_FALSE(StringToInt("", &value)); OLA_ASSERT_FALSE(StringToInt("a", &value)); OLA_ASSERT_FALSE(StringToInt("-129", &value)); OLA_ASSERT_TRUE(StringToInt("-128", &value)); OLA_ASSERT_EQ((int8_t) -128, value); OLA_ASSERT_TRUE(StringToInt("-127", &value)); OLA_ASSERT_EQ((int8_t) -127, value); OLA_ASSERT_TRUE(StringToInt("-127", &value)); OLA_ASSERT_EQ((int8_t) -127, value); OLA_ASSERT_TRUE(StringToInt("-1", &value)); OLA_ASSERT_EQ((int8_t) -1, value); OLA_ASSERT_TRUE(StringToInt("0", &value)); OLA_ASSERT_EQ((int8_t) 0, value); OLA_ASSERT_TRUE(StringToInt("1", &value)); OLA_ASSERT_EQ((int8_t) 1, value); OLA_ASSERT_TRUE(StringToInt("127", &value)); OLA_ASSERT_EQ((int8_t) 127, value); OLA_ASSERT_FALSE(StringToInt("128", &value)); OLA_ASSERT_FALSE(StringToInt("129", &value)); } void StringUtilsTest::testStringToInt8OrDefault() { OLA_ASSERT_EQ((int8_t) 42, StringToIntOrDefault("", (int8_t) 42)); OLA_ASSERT_EQ((int8_t) 42, StringToIntOrDefault("a", (int8_t) 42)); OLA_ASSERT_EQ((int8_t) 42, StringToIntOrDefault("-129", (int8_t) 42)); OLA_ASSERT_EQ((int8_t) -128, StringToIntOrDefault("-128", (int8_t) 42)); OLA_ASSERT_EQ((int8_t) -127, StringToIntOrDefault("-127", (int8_t) 42)); OLA_ASSERT_EQ((int8_t) -127, StringToIntOrDefault("-127", (int8_t) 42)); OLA_ASSERT_EQ((int8_t) -1, StringToIntOrDefault("-1", (int8_t) 42)); OLA_ASSERT_EQ((int8_t) 0, StringToIntOrDefault("0", (int8_t) 42)); OLA_ASSERT_EQ((int8_t) 1, StringToIntOrDefault("1", (int8_t) 42)); OLA_ASSERT_EQ((int8_t) 127, StringToIntOrDefault("127", (int8_t) 42)); OLA_ASSERT_EQ((int8_t) 42, StringToIntOrDefault("128", (int8_t) 42)); OLA_ASSERT_EQ((int8_t) 42, StringToIntOrDefault("129", (int8_t) 42)); } void StringUtilsTest::testToLower() { string s = "HelLo There"; ToLower(&s); OLA_ASSERT_EQ(string("hello there"), s); } void StringUtilsTest::testToUpper() { string s = "HelLo There"; ToUpper(&s); OLA_ASSERT_EQ(string("HELLO THERE"), s); } void StringUtilsTest::testCapitalizeLabel() { string label = "this-is_a_test"; CapitalizeLabel(&label); OLA_ASSERT_EQ(string("This Is A Test"), label); } void StringUtilsTest::testCustomCapitalizeLabel() { string label1 = "dmx_start_address"; CustomCapitalizeLabel(&label1); OLA_ASSERT_EQ(string("DMX Start Address"), label1); string label2 = "foo-dmx"; CustomCapitalizeLabel(&label2); OLA_ASSERT_EQ(string("Foo DMX"), label2); string label3 = "mini_dmxter_device"; CustomCapitalizeLabel(&label3); OLA_ASSERT_EQ(string("Mini Dmxter Device"), label3); string label4 = "this-is_a_test"; CustomCapitalizeLabel(&label4); OLA_ASSERT_EQ(string("This Is A Test"), label4); string label5 = "ip_address"; CustomCapitalizeLabel(&label5); OLA_ASSERT_EQ(string("IP Address"), label5); string label6 = "controller_ip_address"; CustomCapitalizeLabel(&label6); OLA_ASSERT_EQ(string("Controller IP Address"), label6); string label7 = "dazzled_led_type"; CustomCapitalizeLabel(&label7); OLA_ASSERT_EQ(string("Dazzled LED Type"), label7); string label8 = "device_rdm_uid"; CustomCapitalizeLabel(&label8); OLA_ASSERT_EQ(string("Device RDM UID"), label8); string label9 = "dns_via_ipv4_dhcp"; CustomCapitalizeLabel(&label9); OLA_ASSERT_EQ(string("DNS Via IPV4 DHCP"), label9); } void StringUtilsTest::testCapitalizeFirst() { string label1 = "foo bar"; CapitalizeFirst(&label1); OLA_ASSERT_EQ(string("Foo bar"), label1); string label2 = "RDM bar"; CapitalizeFirst(&label2); OLA_ASSERT_EQ(string("RDM bar"), label2); } void StringUtilsTest::testFormatData() { uint8_t data[] = {0, 'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o', 'r', 'l', 'd', 1, 2}; std::ostringstream str; FormatData(&str, data, sizeof(data)); OLA_ASSERT_EQ( string("00 48 65 6c 6c 6f 20 57 .Hello W\n" "6f 72 6c 64 01 02 orld..\n"), str.str()); // try 4 bytes per line with a 2 space indent str.str(""); FormatData(&str, data, sizeof(data), 2, 4); OLA_ASSERT_EQ( string(" 00 48 65 6c .Hel\n" " 6c 6f 20 57 lo W\n" " 6f 72 6c 64 orld\n" " 01 02 ..\n"), str.str()); str.str(""); // try ending on the block boundary uint8_t data1[] = {'H', 'e', 'l', 'l', 'o', ' ', 'W', 'o'}; FormatData(&str, data1, sizeof(data1), 0, 4); OLA_ASSERT_EQ( string("48 65 6c 6c Hell\n" "6f 20 57 6f o Wo\n"), str.str()); } void StringUtilsTest::testStringJoin() { vector ints; ints.push_back(1); ints.push_back(2); ints.push_back(3); OLA_ASSERT_EQ(string("1,2,3"), StringJoin(",", ints)); vector chars; chars.push_back('a'); chars.push_back('b'); chars.push_back('c'); OLA_ASSERT_EQ(string("a,b,c"), StringJoin(",", chars)); vector strings; strings.push_back("one"); strings.push_back("two"); strings.push_back("three"); OLA_ASSERT_EQ(string("one,two,three"), StringJoin(",", strings)); } void StringUtilsTest::testReplaceAll() { string input = ""; ReplaceAll(&input, "", ""); OLA_ASSERT_EQ(string(""), input); input = "abc"; ReplaceAll(&input, "", ""); OLA_ASSERT_EQ(string("abc"), input); ReplaceAll(&input, "", "def"); OLA_ASSERT_EQ(string("abc"), input); input = "abc"; ReplaceAll(&input, "b", "d"); OLA_ASSERT_EQ(string("adc"), input); input = "aaa"; ReplaceAll(&input, "a", "b"); OLA_ASSERT_EQ(string("bbb"), input); input = "abcdef"; ReplaceAll(&input, "cd", "cds"); OLA_ASSERT_EQ(string("abcdsef"), input); input = "abcdefabcdef"; ReplaceAll(&input, "cd", "gh"); OLA_ASSERT_EQ(string("abghefabghef"), input); input = "abcde"; ReplaceAll(&input, "c", "cdc"); OLA_ASSERT_EQ(string("abcdcde"), input); input = "abcdcdce"; ReplaceAll(&input, "cdc", "c"); OLA_ASSERT_EQ(string("abce"), input); input = "abcdcdcdce"; ReplaceAll(&input, "cdcdc", "cdc"); OLA_ASSERT_EQ(string("abcdce"), input); } ola-0.10.9/common/utils/DmxBuffer.cpp0000664000175000017500000002074514376533110014330 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DmxBuffer.cpp * The DmxBuffer class * Copyright (C) 2005 Simon Newton * * This implements a DmxBuffer which uses copy-on-write and delayed init. * * A DmxBuffer can hold up to 512 bytes of channel information. The amount of * valid data is returned by calling Size(). */ /** * @file DmxBuffer.cpp */ #include #include #include #include #include #include "ola/Constants.h" #include "ola/DmxBuffer.h" #include "ola/Logging.h" #include "ola/StringUtils.h" namespace ola { using std::min; using std::max; using std::string; using std::vector; DmxBuffer::DmxBuffer() : m_ref_count(NULL), m_copy_on_write(false), m_data(NULL), m_length(0) { } DmxBuffer::DmxBuffer(const DmxBuffer &other) : m_ref_count(NULL), m_copy_on_write(false), m_data(NULL), m_length(0) { if (other.m_data && other.m_ref_count) { CopyFromOther(other); } } DmxBuffer::DmxBuffer(const uint8_t *data, unsigned int length) : m_ref_count(0), m_copy_on_write(false), m_data(NULL), m_length(0) { Set(data, length); } DmxBuffer::DmxBuffer(const string &data) : m_ref_count(0), m_copy_on_write(false), m_data(NULL), m_length(0) { Set(data); } DmxBuffer::~DmxBuffer() { CleanupMemory(); } DmxBuffer& DmxBuffer::operator=(const DmxBuffer &other) { if (this != &other) { CleanupMemory(); if (other.m_data) { CopyFromOther(other); } } return *this; } bool DmxBuffer::operator==(const DmxBuffer &other) const { return (m_length == other.m_length && (m_data == other.m_data || 0 == memcmp(m_data, other.m_data, m_length))); } bool DmxBuffer::operator!=(const DmxBuffer &other) const { return !(*this == other); } bool DmxBuffer::HTPMerge(const DmxBuffer &other) { if (!m_data) { if (!Init()) return false; } DuplicateIfNeeded(); unsigned int other_length = min((unsigned int) DMX_UNIVERSE_SIZE, other.m_length); unsigned int merge_length = min(m_length, other.m_length); for (unsigned int i = 0; i < merge_length; i++) { m_data[i] = max(m_data[i], other.m_data[i]); } if (other_length > m_length) { memcpy(m_data + merge_length, other.m_data + merge_length, other_length - merge_length); m_length = other_length; } return true; } bool DmxBuffer::Set(const uint8_t *data, unsigned int length) { if (!data) return false; if (m_copy_on_write) CleanupMemory(); if (!m_data) { if (!Init()) return false; } m_length = min(length, (unsigned int) DMX_UNIVERSE_SIZE); memcpy(m_data, data, m_length); return true; } bool DmxBuffer::Set(const string &data) { return Set(reinterpret_cast(data.data()), data.length()); } bool DmxBuffer::Set(const DmxBuffer &other) { return Set(other.m_data, other.m_length); } bool DmxBuffer::SetFromString(const string &input) { unsigned int i = 0; vector dmx_values; vector::const_iterator iter; if (m_copy_on_write) CleanupMemory(); if (!m_data) if (!Init()) return false; if (input.empty()) { m_length = 0; return true; } StringSplit(input, &dmx_values, ","); for (iter = dmx_values.begin(); iter != dmx_values.end() && i < DMX_UNIVERSE_SIZE; ++iter, ++i) { m_data[i] = atoi(iter->data()); } m_length = i; return true; } bool DmxBuffer::SetRangeToValue(unsigned int offset, uint8_t value, unsigned int length) { if (offset >= DMX_UNIVERSE_SIZE) return false; if (!m_data) { Blackout(); } if (offset > m_length) return false; DuplicateIfNeeded(); unsigned int copy_length = min(length, DMX_UNIVERSE_SIZE - offset); memset(m_data + offset, value, copy_length); m_length = max(m_length, offset + copy_length); return true; } bool DmxBuffer::SetRange(unsigned int offset, const uint8_t *data, unsigned int length) { if (!data || offset >= DMX_UNIVERSE_SIZE) return false; if (!m_data) { Blackout(); } if (offset > m_length) return false; DuplicateIfNeeded(); unsigned int copy_length = min(length, DMX_UNIVERSE_SIZE - offset); memcpy(m_data + offset, data, copy_length); m_length = max(m_length, offset + copy_length); return true; } void DmxBuffer::SetChannel(unsigned int channel, uint8_t data) { if (channel >= DMX_UNIVERSE_SIZE) return; if (!m_data) { Blackout(); } if (channel > m_length) { OLA_WARN << "Attempting to set channel " << channel << " when length is " << m_length; return; } DuplicateIfNeeded(); m_data[channel] = data; m_length = max(channel+1, m_length); } void DmxBuffer::Get(uint8_t *data, unsigned int *length) const { if (m_data) { *length = min(*length, m_length); memcpy(data, m_data, *length); } else { *length = 0; } } void DmxBuffer::GetRange(unsigned int slot, uint8_t *data, unsigned int *length) const { if (slot >= m_length) { *length = 0; return; } if (m_data) { *length = min(*length, m_length - slot); memcpy(data, m_data + slot, *length); } else { *length = 0; } } uint8_t DmxBuffer::Get(unsigned int channel) const { if (m_data && channel < m_length) { return m_data[channel]; } else { return 0; } } string DmxBuffer::Get() const { string data; data.append(reinterpret_cast(m_data), m_length); return data; } bool DmxBuffer::Blackout() { if (m_copy_on_write) { CleanupMemory(); } if (!m_data) { if (!Init()) { return false; } } memset(m_data, DMX_MIN_SLOT_VALUE, DMX_UNIVERSE_SIZE); m_length = DMX_UNIVERSE_SIZE; return true; } void DmxBuffer::Reset() { if (m_data) { m_length = 0; } } string DmxBuffer::ToString() const { if (!m_data) { return ""; } // TODO(Peter): Change to the uint8_t version of StringJoin std::ostringstream str; for (unsigned int i = 0; i < Size(); i++) { if (i) { str << ","; } str << static_cast(m_data[i]); } return str.str(); } /* * Allocate memory * @return true on success, otherwise raises an exception */ bool DmxBuffer::Init() { m_data = new uint8_t[DMX_UNIVERSE_SIZE]; m_ref_count = new unsigned int; m_length = 0; *m_ref_count = 1; return true; } /* * Called before making a change, this duplicates the data if required. * @return true on Duplication, and false it duplication was not needed */ bool DmxBuffer::DuplicateIfNeeded() { if (m_copy_on_write && *m_ref_count == 1) { m_copy_on_write = false; } if (m_copy_on_write && *m_ref_count > 1) { unsigned int *old_ref_count = m_ref_count; uint8_t *original_data = m_data; unsigned int length = m_length; m_copy_on_write = false; if (Init()) { Set(original_data, length); (*old_ref_count)--; return true; } return false; } return true; } /* * Setup this buffer to point to the data of the other buffer * @param other the source buffer * @pre other.m_data and other.m_ref_count are not NULL */ void DmxBuffer::CopyFromOther(const DmxBuffer &other) { m_copy_on_write = true; other.m_copy_on_write = true; m_ref_count = other.m_ref_count; (*m_ref_count)++; m_data = other.m_data; m_length = other.m_length; } /* * Decrement the ref count by one and free the memory if required */ void DmxBuffer::CleanupMemory() { if (m_ref_count && m_data) { (*m_ref_count)--; if (!*m_ref_count) { delete[] m_data; delete m_ref_count; } m_data = NULL; m_ref_count = NULL; m_length = 0; } } std::ostream& operator<<(std::ostream &out, const DmxBuffer &data) { return out << data.ToString(); } } // namespace ola ola-0.10.9/common/protocol/0000775000175000017500000000000014376533271012523 500000000000000ola-0.10.9/common/protocol/Ola.proto0000664000175000017500000002674214376533110014246 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Ola.proto * Defines the protocol buffers used to talk to olad * Copyright (C) 2005 Simon Newton */ package ola.proto; option cc_generic_services = false; option py_generic_services = true; option java_generic_services = true; enum RegisterAction { REGISTER = 1; UNREGISTER = 2; } enum PatchAction { PATCH = 1; UNPATCH = 2; } enum MergeMode { HTP = 1; LTP = 2; } /** * Please see the note below about getting a new Plugin ID. */ enum PluginIds { OLA_PLUGIN_ALL = 0; OLA_PLUGIN_DUMMY = 1; OLA_PLUGIN_ARTNET = 2; OLA_PLUGIN_SHOWNET = 3; OLA_PLUGIN_ESPNET = 4; OLA_PLUGIN_USBPRO = 5; OLA_PLUGIN_OPENDMX = 6; OLA_PLUGIN_SANDNET = 7; OLA_PLUGIN_STAGEPROFI = 8; OLA_PLUGIN_PATHPORT = 9; OLA_PLUGIN_DMX4LINUX = 10; OLA_PLUGIN_E131 = 11; OLA_PLUGIN_USBDMX = 12; OLA_PLUGIN_FTDIDMX = 13; OLA_PLUGIN_OSC = 14; OLA_PLUGIN_SPI = 15; OLA_PLUGIN_KINET = 16; OLA_PLUGIN_KARATE = 17; OLA_PLUGIN_MILINST = 18; OLA_PLUGIN_RENARD = 19; OLA_PLUGIN_UARTDMX = 20; OLA_PLUGIN_OPENPIXELCONTROL = 21; OLA_PLUGIN_GPIO = 22; /* * To obtain a new plugin ID, open a ticket at * https://github.com/OpenLightingProject/ola/issues/new * Plugin IDs are usually assigned just prior to merging the code into the * mainline. For development of plugins please use the value of * OLA_PLUGIN_EXPERIMENTAL in a plugin ID you define above. */ OLA_PLUGIN_EXPERIMENTAL = 10000; } /** * If you add more here be sure to update ResponseCodeToString in RDMHelper.cpp */ enum RDMResponseCode { // The request/response completed correctly RDM_COMPLETED_OK = 0; // The request was broadcast, no response expected RDM_WAS_BROADCAST = 1; // We failed to send this request RDM_FAILED_TO_SEND = 2; // The response timed out RDM_TIMEOUT = 3; // The response was invalid RDM_INVALID_RESPONSE = 4; // The UID could not be located (may have been removed) RDM_UNKNOWN_UID = 5; // The response checksum was wrong RDM_CHECKSUM_INCORRECT = 6; // Invalid transaction number RDM_TRANSACTION_MISMATCH = 7; // Wrong sub device RDM_SUB_DEVICE_MISMATCH = 8; //Source UID in response doesn't match RDM_SRC_UID_MISMATCH = 9; //Destination UID in response doesn't match RDM_DEST_UID_MISMATCH = 10; //Incorrect sub start code RDM_WRONG_SUB_START_CODE = 11; //RDM response was smaller than the minimum size RDM_PACKET_TOO_SHORT = 12; //The length field of packet didn't match length received RDM_PACKET_LENGTH_MISMATCH = 13; //The parameter length exceeds the remaining packet size RDM_PARAM_LENGTH_MISMATCH = 14; //The command class was not one of GET_RESPONSE or SET_RESPONSE RDM_INVALID_COMMAND_CLASS = 15; //The command class didn't match the request RDM_COMMAND_CLASS_MISMATCH = 16; //The response type was not ACK, ACK_OVERFLOW, ACK_TIMER or NACK RDM_INVALID_RESPONSE_TYPE = 17; // The discovery command class is not supported by this device. This // typically means the hardware doesn't support discovery commands. RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED = 18; // Responses to DUB commands, these responses won't have a defined RDM // message, but rather just a string of bytes from the wire. RDM_DUB_RESPONSE = 19; } /** * The valid Response Types when the response_code is RDM_COMPLETED_OK. * ACK_OVERFLOW isn't in this list because overflows are handed by the plugins, * not the clients. */ enum RDMResponseType { RDM_ACK = 0; RDM_ACK_TIMER = 1; RDM_NACK_REASON = 2; // OVERFLOW can never be returned } /** * The RDM command class */ enum RDMCommandClass { RDM_GET_RESPONSE = 0; RDM_SET_RESPONSE = 1; RDM_DISCOVERY_RESPONSE = 2; } // This is a special string which indicates that no response will be received // for an RPC. message STREAMING_NO_RESPONSE {} // Generic Ack Message message Ack {} // request the list of available plugins message PluginListRequest {} // Trigger a plugin reload. message PluginReloadRequest {} message PluginInfo { required int32 plugin_id = 1; required string name = 2; required bool active = 3; optional bool enabled = 4; } message PluginListReply { repeated PluginInfo plugin = 1; } // request the description for a plugin message PluginDescriptionRequest { required int32 plugin_id = 1; } message PluginDescriptionReply { required string name = 1; required string description = 2; } // request the state for a plugin message PluginStateRequest { required int32 plugin_id = 1; } message PluginStateReply { required string name = 1; required bool enabled = 2; required bool active = 3; required string preferences_source = 4; repeated PluginInfo conflicts_with = 5; } message PluginStateChangeRequest { required int32 plugin_id = 1; required bool enabled = 2; } // request info on a device message DeviceInfoRequest { optional int32 plugin_id = 1; } message PortInfo { required int32 port_id = 1; required int32 priority_capability = 2; required string description = 5; optional int32 universe = 3; optional bool active = 4; optional int32 priority_mode = 6; optional int32 priority = 7; optional bool supports_rdm = 8 [default = false]; } message DeviceInfo { required int32 device_alias = 1; required int32 plugin_id = 2; required string device_name = 3; repeated PortInfo input_port = 4; repeated PortInfo output_port = 5; required string device_id = 6; } message DeviceInfoReply { repeated DeviceInfo device = 1; } message DmxData { required int32 universe = 1; required bytes data = 2; optional int32 priority = 3; } message RegisterDmxRequest { required int32 universe = 1; required RegisterAction action = 2; } message PatchPortRequest { required int32 universe = 1; required int32 device_alias = 2; required int32 port_id = 3; required PatchAction action = 4; required bool is_output = 5; } message UniverseNameRequest { required int32 universe = 1; required string name = 2; } message MergeModeRequest { required int32 universe = 1; required MergeMode merge_mode = 2; } // request info about a universe message OptionalUniverseRequest { optional int32 universe = 1; } message UniverseInfo { required int32 universe = 1; required string name = 2; required MergeMode merge_mode = 3; required int32 input_port_count = 4; required int32 output_port_count = 5; required int32 rdm_devices = 6; repeated PortInfo input_ports = 7; repeated PortInfo output_ports = 8; } message UniverseInfoReply { repeated UniverseInfo universe = 1; } message PortPriorityRequest { required int32 device_alias = 1; required bool is_output = 2; required int32 port_id = 3; required int32 priority_mode = 4; optional int32 priority = 5; } // a device config request message DeviceConfigRequest { required int32 device_alias = 1; required bytes data = 2; } message DeviceConfigReply { required bytes data = 1; } // RDM Messages // This represents a UID message UID { required int32 esta_id = 1; // only lower 2 bytes are used required fixed32 device_id = 2; } // Request the UID list for a universe message UniverseRequest { required int32 universe = 1; } message DiscoveryRequest { required int32 universe = 1; required bool full = 2; } message UIDListReply { required int32 universe = 1; repeated UID uid = 2; } message RDMRequestOverrideOptions { optional uint32 sub_start_code = 1; optional uint32 message_length = 2; optional uint32 message_count = 3; optional uint32 checksum = 4; } message RDMRequest { required int32 universe = 1; required UID uid = 2; required int32 sub_device = 3; required int32 param_id = 4; required bytes data = 5; // 0 - 231 bytes required bool is_set = 6; optional bool include_raw_response = 7 [default = false]; optional RDMRequestOverrideOptions options = 8; } message RDMDiscoveryRequest { required int32 universe = 1; required UID uid = 2; required int32 sub_device = 3; required int32 param_id = 4; required bytes data = 5; // 0 - 231 bytes optional bool include_raw_response = 6 [default = false]; optional RDMRequestOverrideOptions options = 8; } message RDMFrameTiming { optional int32 response_delay = 1; optional int32 break_time = 2; optional int32 mark_time = 3; optional int32 data_time = 4; } message RDMFrame { optional bytes raw_response = 1; optional RDMFrameTiming timing = 2; } message RDMResponse { required RDMResponseCode response_code = 1; optional UID source_uid = 9; optional UID dest_uid = 10; optional int32 transaction_number = 11; // ACK, NACK or TIMER optional RDMResponseType response_type = 2; optional uint32 message_count = 3 [default = 0]; optional uint32 sub_device = 7; // the sub device optional RDMCommandClass command_class = 6; // the command class optional uint32 param_id = 5; // the param id, required for queued messages optional bytes data = 4 [default = ""]; // 0 - 231 bytes repeated bytes raw_response = 8; // deprecated repeated RDMFrame raw_frame = 12; } // timecode enum TimeCodeType { TIMECODE_FILM = 0; // 24fps TIMECODE_EBU = 1; // 25fps TIMECODE_DF = 2; // 29.97fps TIMECODE_SMPTE = 3; // 30fps }; message TimeCode { required uint32 hours = 1; required uint32 minutes = 2; required uint32 seconds = 3; required uint32 frames = 4; required TimeCodeType type = 5; } // Services // RPCs handled by the OLA Server service OlaServerService { rpc GetPlugins (PluginListRequest) returns (PluginListReply); rpc ReloadPlugins (PluginReloadRequest) returns (Ack); rpc GetPluginDescription (PluginDescriptionRequest) returns (PluginDescriptionReply); rpc GetPluginState (PluginStateRequest) returns (PluginStateReply); rpc GetDeviceInfo (DeviceInfoRequest) returns (DeviceInfoReply); rpc GetCandidatePorts (OptionalUniverseRequest) returns (DeviceInfoReply); rpc ConfigureDevice (DeviceConfigRequest) returns (DeviceConfigReply); rpc SetPluginState (PluginStateChangeRequest) returns (Ack); rpc SetPortPriority (PortPriorityRequest) returns (Ack); rpc GetUniverseInfo (OptionalUniverseRequest) returns (UniverseInfoReply); rpc SetUniverseName (UniverseNameRequest) returns (Ack); rpc SetMergeMode (MergeModeRequest) returns (Ack); rpc PatchPort (PatchPortRequest) returns (Ack); rpc RegisterForDmx (RegisterDmxRequest) returns (Ack); rpc UpdateDmxData (DmxData) returns (Ack); rpc GetDmx (UniverseRequest) returns (DmxData); rpc GetUIDs (UniverseRequest) returns (UIDListReply); rpc ForceDiscovery (DiscoveryRequest) returns (UIDListReply); rpc SetSourceUID (UID) returns (Ack); rpc RDMCommand (RDMRequest) returns (RDMResponse); rpc RDMDiscoveryCommand (RDMDiscoveryRequest) returns (RDMResponse); rpc StreamDmxData (DmxData) returns (STREAMING_NO_RESPONSE); // timecode rpc SendTimeCode(TimeCode) returns (Ack); } // RPCs handled by the OLA Client service OlaClientService { rpc UpdateDmxData (DmxData) returns (Ack); } ola-0.10.9/common/protocol/Makefile.mk0000664000175000017500000000252614376533110014506 00000000000000EXTRA_DIST += common/protocol/Ola.proto # The .h files are included elsewhere so we have to put them in BUILT_SOURCES built_sources += \ common/protocol/Ola.pb.cc \ common/protocol/Ola.pb.h \ common/protocol/OlaService.pb.h \ common/protocol/OlaService.pb.cpp # LIBRARIES ################################################## # We build the .cc files as a separate unit because they aren't warning-clean. noinst_LTLIBRARIES += common/protocol/libolaproto.la nodist_common_protocol_libolaproto_la_SOURCES = \ common/protocol/Ola.pb.cc \ common/protocol/OlaService.pb.cpp common_protocol_libolaproto_la_LIBADD = $(libprotobuf_LIBS) # required, otherwise we get build errors common_protocol_libolaproto_la_CXXFLAGS = $(COMMON_CXXFLAGS_ONLY_WARNINGS) common_libolacommon_la_LIBADD += common/protocol/libolaproto.la common/protocol/Ola.pb.cc common/protocol/Ola.pb.h: common/protocol/Makefile.mk common/protocol/Ola.proto $(PROTOC) --cpp_out $(top_builddir)/common/protocol --proto_path $(srcdir)/common/protocol $(srcdir)/common/protocol/Ola.proto common/protocol/OlaService.pb.cpp common/protocol/OlaService.pb.h: common/protocol/Makefile.mk common/protocol/Ola.proto protoc/ola_protoc_plugin$(EXEEXT) $(OLA_PROTOC) --cppservice_out $(top_builddir)/common/protocol --proto_path $(srcdir)/common/protocol $(srcdir)/common/protocol/Ola.proto ola-0.10.9/common/file/0000775000175000017500000000000014376533271011601 500000000000000ola-0.10.9/common/file/UtilTest.cpp0000664000175000017500000001355414376533110014002 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * UtilTest.cpp * Unittest for file util functions. * Copyright (C) 2013 Peter Newman */ #include #include #include #include #include "ola/StringUtils.h" #include "ola/file/Util.h" #include "ola/testing/TestUtils.h" using ola::file::FilenameFromPath; using ola::file::FilenameFromPathOrDefault; using ola::file::FilenameFromPathOrPath; using ola::file::JoinPaths; using ola::file::FindMatchingFiles; using std::string; class UtilTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(UtilTest); CPPUNIT_TEST(testJoinPaths); CPPUNIT_TEST(testFilenameFromPath); CPPUNIT_TEST(testFindMatchingFiles); CPPUNIT_TEST_SUITE_END(); public: void testFilenameFromPath(); void testJoinPaths(); void testFindMatchingFiles(); }; CPPUNIT_TEST_SUITE_REGISTRATION(UtilTest); void UtilTest::testJoinPaths() { // Same behaviour as os.path.join() OLA_ASSERT_EQ(string("/tmp/1"), JoinPaths("/tmp", "1")); OLA_ASSERT_EQ(string("/tmp/1"), JoinPaths("/tmp/", "1")); OLA_ASSERT_EQ(string("1"), JoinPaths("", "1")); OLA_ASSERT_EQ(string("/tmp/"), JoinPaths("/tmp/", "")); OLA_ASSERT_EQ(string("/tmp"), JoinPaths("/tmp", "")); OLA_ASSERT_EQ(string("/foo"), JoinPaths("/tmp", "/foo")); OLA_ASSERT_EQ(string(""), JoinPaths("", "")); } /* * Test the FilenameFromPath function */ void UtilTest::testFilenameFromPath() { // TODO(Peter): Make these tests work on Windows too OLA_ASSERT_EQ(string(""), FilenameFromPath("")); OLA_ASSERT_EQ(string(""), FilenameFromPath("foo")); OLA_ASSERT_EQ(string(""), FilenameFromPath("/")); OLA_ASSERT_EQ(string("foo"), FilenameFromPath("/foo")); OLA_ASSERT_EQ(string(""), FilenameFromPath("/foo/")); OLA_ASSERT_EQ(string("bar"), FilenameFromPath("/foo/bar")); OLA_ASSERT_EQ(string(""), FilenameFromPath("/foo/bar/")); OLA_ASSERT_EQ(string("baz"), FilenameFromPath("/foo/bar/baz")); OLA_ASSERT_EQ(string("bak"), FilenameFromPathOrDefault("", "bak")); OLA_ASSERT_EQ(string("bak"), FilenameFromPathOrDefault("foo", "bak")); OLA_ASSERT_EQ(string(""), FilenameFromPathOrDefault("/", "bak")); OLA_ASSERT_EQ(string("foo"), FilenameFromPathOrDefault("/foo", "bak")); OLA_ASSERT_EQ(string(""), FilenameFromPathOrDefault("/foo/", "bak")); OLA_ASSERT_EQ(string("bar"), FilenameFromPathOrDefault("/foo/bar", "bak")); OLA_ASSERT_EQ(string(""), FilenameFromPathOrDefault("/foo/bar/", "bak")); OLA_ASSERT_EQ(string("baz"), FilenameFromPathOrDefault("/foo/bar/baz", "bak")); OLA_ASSERT_EQ(string(""), FilenameFromPathOrPath("")); OLA_ASSERT_EQ(string("foo"), FilenameFromPathOrPath("foo")); OLA_ASSERT_EQ(string(""), FilenameFromPathOrPath("/")); OLA_ASSERT_EQ(string("foo"), FilenameFromPathOrPath("/foo")); OLA_ASSERT_EQ(string(""), FilenameFromPathOrPath("/foo/")); OLA_ASSERT_EQ(string("bar"), FilenameFromPathOrPath("/foo/bar")); OLA_ASSERT_EQ(string(""), FilenameFromPathOrPath("/foo/bar/")); OLA_ASSERT_EQ(string("baz"), FilenameFromPathOrPath("/foo/bar/baz")); } /* * Test the FindMatchingFiles function */ void UtilTest::testFindMatchingFiles() { bool okay = false; std::vector files; std::vector::iterator file; OLA_ASSERT_TRUE_MSG(ola::file::PATH_SEPARATOR == '/' || ola::file::PATH_SEPARATOR == '\\', "ola::file::PATH_SEPARATOR is neither / nor \\"); okay = FindMatchingFiles(std::string(TEST_SRC_DIR) + ola::file::PATH_SEPARATOR + std::string("man"), std::string("rdm_"), &files); OLA_ASSERT_TRUE_MSG(okay, "FindMatchingFiles returned false"); // At the time this test was written, there were 3 files in folder "man" // starting with "rdm_". If this changed, please adapt the number below // Or find something better to match against OLA_ASSERT_EQ_MSG(3, (int)files.size(), "Not exactly 3 files man/rdm_* returned"); bool rdm_model_collector_found = false; bool rdm_responder_test_found = false; bool rdm_test_server_found = false; // Iterate over all files that have been returned and check if the ones // we expected are in that list for (file = files.begin(); file < files.end(); file++) { if (ola::StringEndsWith(*file, "rdm_model_collector.py.1")) { // make sure it has not been reported as found before OLA_ASSERT_FALSE(rdm_model_collector_found); rdm_model_collector_found = true; } else if (ola::StringEndsWith(*file, "rdm_responder_test.py.1")) { // make sure it has not been reported as found before OLA_ASSERT_FALSE(rdm_responder_test_found); rdm_responder_test_found = true; } else if (ola::StringEndsWith(*file, "rdm_test_server.py.1")) { // make sure it has not been reported as found before OLA_ASSERT_FALSE(rdm_test_server_found); rdm_test_server_found = true; } } OLA_ASSERT_TRUE_MSG(rdm_model_collector_found, "Result lacks rdm_model_collector.py.1"); OLA_ASSERT_TRUE_MSG(rdm_responder_test_found, "Result lacks rdm_responder_test.py.1"); OLA_ASSERT_TRUE_MSG(rdm_test_server_found, "Result lacks rdm_test_server.py.1"); } ola-0.10.9/common/file/Util.cpp0000664000175000017500000001326514376533110013141 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Util.cpp * File related helper functions. * Copyright (C) 2013 Simon Newton */ #include #include #include #include #include #ifdef _WIN32 #define VC_EXTRALEAN #define WIN32_LEAN_AND_MEAN #include #endif // _WIN32 #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include namespace ola { namespace file { using std::string; using std::vector; #ifdef _WIN32 const char PATH_SEPARATOR = '\\'; #else const char PATH_SEPARATOR = '/'; #endif // _WIN32 string ConvertPathSeparators(const string &path) { string result = path; #ifdef _WIN32 std::replace(result.begin(), result.end(), '/', PATH_SEPARATOR); #else std::replace(result.begin(), result.end(), '\\', PATH_SEPARATOR); #endif // _WIN32 return result; } string JoinPaths(const string &first, const string &second) { if (second.empty()) { return first; } if (first.empty()) { return second; } if (second[0] == PATH_SEPARATOR) { return second; } string output(first); if (output[output.size() - 1] != PATH_SEPARATOR) { output.push_back(PATH_SEPARATOR); } output.append(second); return output; } bool FindMatchingFiles(const string &directory, const string &prefix, vector *files) { vector prefixes; prefixes.push_back(prefix); return FindMatchingFiles(directory, prefixes, files); } bool FindMatchingFiles(const string &directory, const vector &prefixes, vector *files) { if (directory.empty() || prefixes.empty()) { return true; } #ifdef _WIN32 WIN32_FIND_DATA find_file_data; HANDLE h_find; string mutable_directory = ConvertPathSeparators(directory); // Strip trailing path separators, otherwise FindFirstFile fails while (*mutable_directory.rbegin() == PATH_SEPARATOR) { mutable_directory.erase(mutable_directory.size() - 1); } string search_pattern = mutable_directory + PATH_SEPARATOR + "*"; h_find = FindFirstFileA(search_pattern.data(), &find_file_data); if (h_find == INVALID_HANDLE_VALUE) { OLA_WARN << "Find first file failed: " << GetLastError() << " for " << search_pattern; return false; } do { vector::const_iterator iter; for (iter = prefixes.begin(); iter != prefixes.end(); ++iter) { if (!strncmp(find_file_data.cFileName, iter->data(), iter->size())) { std::ostringstream str; str << mutable_directory << PATH_SEPARATOR << find_file_data.cFileName; files->push_back(str.str()); } } } while (FindNextFile(h_find, &find_file_data)); FindClose(h_find); #else DIR *dp; struct dirent *dir_ent_p; if ((dp = opendir(directory.data())) == NULL) { OLA_WARN << "Could not open " << directory << ": " << strerror(errno); return false; } // Explicitly set errno to 0 so we can reliably check the value after // the call to readdir. It might have a undefined value otherwise since // a successful call may but doesn't need to set a value. errno = 0; dir_ent_p = readdir(dp); if ((dir_ent_p == NULL) && (errno != 0)) { OLA_WARN << "readdir(" << directory << "): " << strerror(errno); closedir(dp); return false; } while (dir_ent_p != NULL) { vector::const_iterator iter; for (iter = prefixes.begin(); iter != prefixes.end(); ++iter) { if (!strncmp(dir_ent_p->d_name, iter->data(), iter->size())) { std::ostringstream str; str << directory << PATH_SEPARATOR << dir_ent_p->d_name; files->push_back(str.str()); } } // Explicitly set errno to 0 so we can reliably check the value after // the call. It might have an undefined value otherwise. errno = 0; dir_ent_p = readdir(dp); if ((dir_ent_p == NULL) && (errno != 0)) { OLA_WARN << "readdir(" << directory << "): " << strerror(errno); closedir(dp); return false; } } if (closedir(dp)) { OLA_WARN << "closedir(" << directory << "): " << strerror(errno); return false; } #endif // _WIN32 return true; } bool ListDirectory(const string& directory, vector *files) { return FindMatchingFiles(directory, "", files); } string FilenameFromPathOrDefault(const string &path, const string &default_value) { string mutable_path = ConvertPathSeparators(path); string::size_type last_path_sep = string::npos; last_path_sep = mutable_path.find_last_of(PATH_SEPARATOR); if (last_path_sep == string::npos) return default_value; // Don't return the path sep itself return mutable_path.substr(last_path_sep + 1); } string FilenameFromPathOrPath(const string &path) { return FilenameFromPathOrDefault(path, path); } string FilenameFromPath(const string &path) { return FilenameFromPathOrDefault(path, ""); } } // namespace file } // namespace ola ola-0.10.9/common/file/Makefile.mk0000664000175000017500000000060514376533110013560 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += common/file/Util.cpp # TESTS ################################################## test_programs += common/file/UtilTester common_file_UtilTester_SOURCES = common/file/UtilTest.cpp common_file_UtilTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_file_UtilTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/thread/0000775000175000017500000000000014376533271012131 500000000000000ola-0.10.9/common/thread/ThreadPoolTest.cpp0000664000175000017500000000442214376533110015450 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ThreadPoolTest.cpp * Test fixture for the ThreadPool class * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/thread/Thread.h" #include "ola/thread/ThreadPool.h" #include "ola/testing/TestUtils.h" using ola::thread::Mutex; using ola::thread::MutexLocker; using ola::thread::ThreadPool; class ThreadPoolTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ThreadPoolTest); CPPUNIT_TEST(test1By10); CPPUNIT_TEST(test2By10); CPPUNIT_TEST(test10By100); CPPUNIT_TEST_SUITE_END(); public: void test1By10() { RunThreads(1, 10); } void test2By10() { RunThreads(2, 10); } void test10By100() { RunThreads(10, 100); } void setUp() { m_counter = 0; } private: unsigned int m_counter; Mutex m_mutex; void IncrementCounter() { MutexLocker locker(&m_mutex); m_counter++; } void RunThreads(unsigned int threads, unsigned int actions); }; CPPUNIT_TEST_SUITE_REGISTRATION(ThreadPoolTest); /** * Run threads and add actions to the queue */ void ThreadPoolTest::RunThreads(unsigned int threads, unsigned int actions) { ThreadPool pool(threads); OLA_ASSERT_TRUE(pool.Init()); for (unsigned int i = 0; i < actions; i++) pool.Execute( ola::NewSingleCallback(this, &ThreadPoolTest::IncrementCounter)); pool.JoinAll(); OLA_ASSERT_EQ(static_cast(actions), m_counter); } ola-0.10.9/common/thread/Mutex.cpp0000664000175000017500000000570014376533110013651 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Mutex.cpp * Mutex and ConditionVariable * Copyright (C) 2010 Simon Newton */ #include #include "ola/thread/Mutex.h" namespace ola { namespace thread { /** * Construct a new mutex object */ Mutex::Mutex() { pthread_mutex_init(&m_mutex, NULL); } /** * Clean up */ Mutex::~Mutex() { pthread_mutex_destroy(&m_mutex); } /** * Lock this mutex */ void Mutex::Lock() { pthread_mutex_lock(&m_mutex); } /** * Try and lock this mutex * @return true if we got the lock, false otherwise */ bool Mutex::TryLock() { int i = pthread_mutex_trylock(&m_mutex); return i == 0; } /** * Unlock this mutex */ void Mutex::Unlock() { pthread_mutex_unlock(&m_mutex); } /** * Create a new MutexLocker and lock the mutex. */ MutexLocker::MutexLocker(Mutex *mutex) : m_mutex(mutex), m_requires_unlock(true) { m_mutex->Lock(); } /** * Destroy this MutexLocker and unlock the mutex */ MutexLocker::~MutexLocker() { Release(); } void MutexLocker::Release() { if (m_requires_unlock) { m_mutex->Unlock(); m_requires_unlock = false; } } /** * New ConditionVariable */ ConditionVariable::ConditionVariable() { pthread_cond_init(&m_condition, NULL); } /** * Clean up */ ConditionVariable::~ConditionVariable() { pthread_cond_destroy(&m_condition); } /** * Wait on a condition variable * @param mutex the mutex that is locked */ void ConditionVariable::Wait(Mutex *mutex) { pthread_cond_wait(&m_condition, &mutex->m_mutex); } /** * Timed Wait * @param mutex the mutex that is locked * @param wake_up_time the time to wake up. This must be an absolute i.e. real * time. * @returns true if we received a signal, false if the timeout expired. */ bool ConditionVariable::TimedWait(Mutex *mutex, const TimeStamp &wake_up_time) { struct timespec ts = { wake_up_time.Seconds(), wake_up_time.MicroSeconds() * ONE_THOUSAND }; int i = pthread_cond_timedwait(&m_condition, &mutex->m_mutex, &ts); return i == 0; } /** * Wake up a single listener */ void ConditionVariable::Signal() { pthread_cond_signal(&m_condition); } /** * Wake up all listeners */ void ConditionVariable::Broadcast() { pthread_cond_broadcast(&m_condition); } } // namespace thread } // namespace ola ola-0.10.9/common/thread/FutureTest.cpp0000664000175000017500000000663714376533110014673 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * FutureTest.cpp * Test fixture for the Future class * Copyright (C) 2013 Simon Newton */ #include #include "ola/Logging.h" #include "ola/thread/Future.h" #include "ola/thread/Thread.h" #include "ola/testing/TestUtils.h" using ola::thread::ConditionVariable; using ola::thread::Mutex; using ola::thread::MutexLocker; using ola::thread::Future; class FutureTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(FutureTest); CPPUNIT_TEST(testSingleThreadedFuture); CPPUNIT_TEST(testSingleThreadedVoidFuture); CPPUNIT_TEST(testMultithreadedFuture); CPPUNIT_TEST_SUITE_END(); public: void testSingleThreadedFuture(); void testSingleThreadedVoidFuture(); void testMultithreadedFuture(); }; CPPUNIT_TEST_SUITE_REGISTRATION(FutureTest); class AdderThread: public ola::thread::Thread { public: AdderThread(int i, int j, Future *future) : Thread(), i(i), j(j), future(future) { } ~AdderThread() {} void *Run() { future->Set(i + j); return NULL; } private: const int i, j; Future *future; }; /* * Check that single threaded Future functionality works. */ void FutureTest::testSingleThreadedFuture() { Future f1; OLA_ASSERT_FALSE(f1.IsComplete()); f1.Set(true); OLA_ASSERT_EQ(true, f1.Get()); // now test a copy-constructor Future f2; Future f3(f2); OLA_ASSERT_FALSE(f2.IsComplete()); OLA_ASSERT_FALSE(f3.IsComplete()); f2.Set(true); OLA_ASSERT_EQ(true, f2.Get()); OLA_ASSERT_EQ(true, f3.Get()); // now test an assignment, this is more expensive than the copy-constructor Future f4; Future f5 = f4; OLA_ASSERT_FALSE(f4.IsComplete()); OLA_ASSERT_FALSE(f5.IsComplete()); f5.Set(false); OLA_ASSERT_EQ(false, f4.Get()); OLA_ASSERT_EQ(false, f5.Get()); } /* * Check that single threaded Future functionality works. */ void FutureTest::testSingleThreadedVoidFuture() { Future f1; OLA_ASSERT_FALSE(f1.IsComplete()); f1.Set(); f1.Get(); // now test a copy-constructor Future f2; Future f3(f2); OLA_ASSERT_FALSE(f2.IsComplete()); OLA_ASSERT_FALSE(f3.IsComplete()); f2.Set(); f2.Get(); f3.Get(); // now test an assignment, this is more expensive than the copy-constructor Future f4; Future f5 = f4; OLA_ASSERT_FALSE(f4.IsComplete()); OLA_ASSERT_FALSE(f5.IsComplete()); f5.Set(); f4.Get(); f5.Get(); } /* * Check that Futures work in a multithreaded environment */ void FutureTest::testMultithreadedFuture() { Future f1; AdderThread thread(3, 5, &f1); OLA_ASSERT_FALSE(f1.IsComplete()); thread.Run(); OLA_ASSERT_EQ(8, f1.Get()); } ola-0.10.9/common/thread/ThreadTest.cpp0000664000175000017500000001636114376533110014623 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ThreadTest.cpp * Test fixture for the Thread class * Copyright (C) 2010 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #ifndef _WIN32 #include #endif // _WIN32 #include #include "ola/Logging.h" #include "ola/system/Limits.h" #include "ola/testing/TestUtils.h" #include "ola/thread/Thread.h" #include "ola/thread/Utils.h" using ola::thread::ConditionVariable; using ola::thread::Mutex; using ola::thread::MutexLocker; using ola::thread::Thread; // A struct containing the scheduling parameters. struct SchedulingParams { int policy; int priority; }; // Get the current scheduling parameters. SchedulingParams GetCurrentParams() { SchedulingParams our_params; struct sched_param param; pthread_getschedparam(pthread_self(), &our_params.policy, ¶m); our_params.priority = param.sched_priority; return our_params; } // Set the current scheduling parameters. bool SetCurrentParams(const SchedulingParams &new_params) { struct sched_param param; param.sched_priority = new_params.priority; return ola::thread::SetSchedParam(pthread_self(), new_params.policy, param); } // A simple thread that runs, captures the scheduling parameters and exits. class MockThread: public Thread { public: explicit MockThread(const Options &options = Options("MockThread")) : Thread(options), m_thread_ran(false), m_mutex() { } ~MockThread() {} void *Run() { MutexLocker locker(&m_mutex); m_thread_ran = true; m_scheduling_params = GetCurrentParams(); return NULL; } bool HasRan() { MutexLocker locker(&m_mutex); return m_thread_ran; } SchedulingParams GetSchedulingParams() { MutexLocker locker(&m_mutex); return m_scheduling_params; } private: bool m_thread_ran; SchedulingParams m_scheduling_params; Mutex m_mutex; }; bool RunThread(MockThread *thread) { return thread->Start() && thread->Join() && thread->HasRan(); } class ThreadTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ThreadTest); CPPUNIT_TEST(testThread); CPPUNIT_TEST(testSchedulingOptions); CPPUNIT_TEST(testConditionVariable); CPPUNIT_TEST_SUITE_END(); public: void testThread(); void testConditionVariable(); void testSchedulingOptions(); }; CPPUNIT_TEST_SUITE_REGISTRATION(ThreadTest); /* * Check that basic thread functionality works. */ void ThreadTest::testThread() { MockThread thread; OLA_ASSERT_FALSE(thread.HasRan()); OLA_ASSERT_TRUE(thread.Start()); // starting twice must fail OLA_ASSERT_FALSE(thread.Start()); OLA_ASSERT_TRUE(thread.IsRunning()); OLA_ASSERT_TRUE(thread.Join()); OLA_ASSERT_FALSE(thread.IsRunning()); OLA_ASSERT_TRUE(thread.HasRan()); } /* * Check that the scheduling options behave as expected. */ void ThreadTest::testSchedulingOptions() { #ifndef _WIN32 #if HAVE_DECL_RLIMIT_RTPRIO struct rlimit rlim; OLA_ASSERT_TRUE(ola::system::GetRLimit(RLIMIT_RTPRIO, &rlim)); if (rlim.rlim_cur == 0) { // A value of 0 means the user can't change policies. OLA_INFO << "Skipping testSchedulingOptions since RLIMIT_RTPRIO is 0"; return; } const int max_priority = rlim.rlim_cur - 1; const int other_priority = std::min(1, max_priority - 1); #else const int max_priority = 31; const int other_priority = 15; #endif // HAVE_DECL_RLIMIT_RTPRIO SchedulingParams default_params = GetCurrentParams(); { // Default scheduling options. MockThread thread; OLA_ASSERT_TRUE(RunThread(&thread)); OLA_ASSERT_EQ(default_params.policy, thread.GetSchedulingParams().policy); OLA_ASSERT_EQ(default_params.priority, thread.GetSchedulingParams().priority); } { // A thread that explicitly sets scheduling params. Thread::Options options; options.name = "ExplicitSchedParamsFIFO"; options.policy = SCHED_FIFO; options.priority = max_priority; MockThread thread(options); OLA_ASSERT_TRUE(RunThread(&thread)); OLA_ASSERT_EQ(static_cast(SCHED_FIFO), thread.GetSchedulingParams().policy); OLA_ASSERT_EQ(max_priority, thread.GetSchedulingParams().priority); } // Set the current thread to something other than the default. // This allows us to check inheritance. SchedulingParams override_params; override_params.policy = SCHED_FIFO; override_params.priority = other_priority; OLA_ASSERT_TRUE(SetCurrentParams(override_params)); { // Default scheduling options. MockThread thread; OLA_ASSERT_TRUE(RunThread(&thread)); OLA_ASSERT_EQ(default_params.policy, thread.GetSchedulingParams().policy); OLA_ASSERT_EQ(default_params.priority, thread.GetSchedulingParams().priority); } { // A thread that explicitly sets scheduling params. Thread::Options options; options.name = "ExplicitSchedParamsRR"; options.policy = SCHED_RR; options.priority = max_priority; MockThread thread(options); OLA_ASSERT_TRUE(RunThread(&thread)); OLA_ASSERT_EQ(static_cast(SCHED_RR), thread.GetSchedulingParams().policy); OLA_ASSERT_EQ(max_priority, thread.GetSchedulingParams().priority); } { // A thread that inherits scheduling params. Thread::Options options; options.name = "InheritSchedParams"; options.inheritsched = PTHREAD_INHERIT_SCHED; MockThread thread(options); OLA_ASSERT_TRUE(RunThread(&thread)); OLA_ASSERT_EQ(override_params.policy, thread.GetSchedulingParams().policy); OLA_ASSERT_EQ(override_params.priority, thread.GetSchedulingParams().priority); } #else OLA_WARN << "Scheduling options are not supported on Windows."; #endif // !_WIN32 } class MockConditionThread: public Thread { public: MockConditionThread( Mutex *mutex, ConditionVariable *condition) : m_mutex(mutex), m_condition(condition) {} void *Run() { m_mutex->Lock(); i = EXPECTED; m_mutex->Unlock(); m_condition->Signal(); return NULL; } int i; static const int EXPECTED = 10; private: Mutex *m_mutex; ConditionVariable *m_condition; }; /* * Check that a condition variable works */ void ThreadTest::testConditionVariable() { Mutex mutex; ConditionVariable condition; MockConditionThread thread(&mutex, &condition); thread.Start(); mutex.Lock(); if (thread.i != MockConditionThread::EXPECTED) { condition.Wait(&mutex); } OLA_ASSERT_EQ(10, thread.i); mutex.Unlock(); thread.Join(); } ola-0.10.9/common/thread/PeriodicThread.cpp0000664000175000017500000000443414376533110015440 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PeriodicThread.cpp * A thread which executes a Callback periodically. * Copyright (C) 2015 Simon Newton */ #include "ola/thread/PeriodicThread.h" #include #include #include namespace ola { namespace thread { PeriodicThread::PeriodicThread(const TimeInterval &delay, PeriodicCallback *callback, const Options &options) : Thread(options), m_delay(delay), m_callback(callback), m_terminate(false) { if (m_callback) { Start(); } } void PeriodicThread::Stop() { { MutexLocker lock(&m_mutex); m_terminate = true; } m_condition.Signal(); Join(NULL); } void *PeriodicThread::Run() { Clock clock; TimeStamp last_run_at; // Real time is used here because it gets passed into pthread_cond_timedwait // which expects an absolute time clock.CurrentRealTime(&last_run_at); if (!m_callback->Run()) { return NULL; } while (true) { { MutexLocker lock(&m_mutex); if (m_terminate) { return NULL; } if (m_condition.TimedWait(&m_mutex, last_run_at + m_delay)) { // Either m_terminate is true, or a spurious wake up if (m_terminate) { return NULL; } continue; } } // Real time is used here again to maintain clock consistency with the // previous call to CurrentRealTime() clock.CurrentRealTime(&last_run_at); if (!m_callback->Run()) { return NULL; } } return NULL; } } // namespace thread } // namespace ola ola-0.10.9/common/thread/Utils.cpp0000664000175000017500000000375114376533110013653 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Utils.cpp * Helper functions for threads. * Copyright (C) 2014 Simon Newton */ #include "ola/thread/Utils.h" #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef _WIN32 // On MinGW, pthread.h pulls in Windows.h, which in turn pollutes the global // namespace. We define VC_EXTRALEAN and WIN32_LEAN_AND_MEAN to reduce this. #define VC_EXTRALEAN #define WIN32_LEAN_AND_MEAN #endif // _WIN32 #include #include #include #include "ola/Logging.h" #include "ola/thread/Thread.h" namespace ola { namespace thread { std::string PolicyToString(int policy) { switch (policy) { case SCHED_FIFO: return "SCHED_FIFO"; case SCHED_RR: return "SCHED_RR"; case SCHED_OTHER: return "SCHED_OTHER"; default: return "unknown"; } } bool SetSchedParam(pthread_t thread, int policy, const struct sched_param ¶m) { int r = pthread_setschedparam(thread, policy, ¶m); if (r != 0) { OLA_FATAL << "Unable to set thread scheduling parameters for thread: " #ifdef _WIN32 << thread.x << ": " << strerror(r); #else << thread << ": " << strerror(r); #endif // _WIN32 return false; } return true; } } // namespace thread } // namespace ola ola-0.10.9/common/thread/Thread.cpp0000664000175000017500000001366014376533110013762 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Thread.cpp * A simple thread class * Copyright (C) 2010 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #ifdef _WIN32 // On MinGW, pthread.h pulls in Windows.h, which in turn pollutes the global // namespace. We define VC_EXTRALEAN and WIN32_LEAN_AND_MEAN to reduce this. #define VC_EXTRALEAN #define WIN32_LEAN_AND_MEAN #endif // _WIN32 #include #include #ifdef HAVE_PTHREAD_NP_H #include #endif // HAVE_PTHREAD_NP_H #include #include "ola/Logging.h" #include "ola/thread/Thread.h" #include "ola/thread/Utils.h" namespace { /* * Called by the new thread */ void *StartThread(void *d) { ola::thread::Thread *thread = static_cast(d); return thread->_InternalRun(); } } // namespace namespace ola { namespace thread { using std::string; Thread::Options::Options(const std::string &name) : name(name), inheritsched(PTHREAD_EXPLICIT_SCHED) { // Default the scheduling options to the system-default values. pthread_attr_t attrs; pthread_attr_init(&attrs); struct sched_param param; pthread_attr_getschedpolicy(&attrs, &policy); pthread_attr_getschedparam(&attrs, ¶m); priority = param.sched_priority; pthread_attr_destroy(&attrs); } Thread::Thread(const Options &options) : m_thread_id(), m_running(false), m_options(options) { // Mac has a bug where PTHREAD_INHERIT_SCHED doesn't work. We work around // this by explicitly setting the policy and priority to match the current // thread if PTHREAD_INHERIT_SCHED was requested. if (m_options.inheritsched == PTHREAD_INHERIT_SCHED) { struct sched_param param; pthread_getschedparam(pthread_self(), &m_options.policy, ¶m); m_options.priority = param.sched_priority; m_options.inheritsched = PTHREAD_EXPLICIT_SCHED; } } bool Thread::Start() { MutexLocker locker(&m_mutex); if (m_running) { OLA_WARN << "Attempt to start already running thread " << Name(); return false; } if (FastStart()) { m_condition.Wait(&m_mutex); return true; } return false; } bool Thread::FastStart() { pthread_attr_t attrs; pthread_attr_init(&attrs); if (m_options.inheritsched != PTHREAD_EXPLICIT_SCHED) { OLA_FATAL << "PTHREAD_EXPLICIT_SCHED not set, programming bug for " << Name() << "!"; return false; } // glibc 2.8 and onwards has a bug where PTHREAD_EXPLICIT_SCHED won't be // honored unless the policy and priority are explicitly set. See // man pthread_attr_setinheritsched. // By fetching the default values in Thread::Options(), we avoid this bug. int ret = pthread_attr_setschedpolicy(&attrs, m_options.policy); if (ret) { OLA_WARN << "pthread_attr_setschedpolicy failed for " << Name() << ", policy " << m_options.policy << ": " << strerror(errno); pthread_attr_destroy(&attrs); return false; } struct sched_param param; param.sched_priority = m_options.priority; ret = pthread_attr_setschedparam(&attrs, ¶m); if (ret) { OLA_WARN << "pthread_attr_setschedparam failed for " << Name() << ", priority " << param.sched_priority << ": " << strerror(errno); pthread_attr_destroy(&attrs); return false; } ret = pthread_attr_setinheritsched(&attrs, PTHREAD_EXPLICIT_SCHED); if (ret) { OLA_WARN << "pthread_attr_setinheritsched to PTHREAD_EXPLICIT_SCHED " << "failed for " << Name() << ": " << strerror(errno); pthread_attr_destroy(&attrs); return false; } ret = pthread_create(&m_thread_id, &attrs, StartThread, static_cast(this)); pthread_attr_destroy(&attrs); if (ret) { OLA_WARN << "pthread create failed for " << Name() << ": " << strerror(ret); return false; } return true; } bool Thread::Join(void *ptr) { { MutexLocker locker(&m_mutex); if (!m_running) return false; } int ret = pthread_join(m_thread_id, &ptr); m_running = false; return 0 == ret; } bool Thread::IsRunning() { MutexLocker locker(&m_mutex); return m_running; } void *Thread::_InternalRun() { string truncated_name = m_options.name.substr(0, 15); // There are 4 different variants of pthread_setname_np ! #ifdef HAVE_PTHREAD_SETNAME_NP_2 pthread_setname_np(pthread_self(), truncated_name.c_str()); #endif // HAVE_PTHREAD_SETNAME_NP_2 #if defined(HAVE_PTHREAD_SET_NAME_NP_2) || \ defined(HAVE_PTHREAD_SET_NAME_NP_2_VOID) pthread_set_name_np(pthread_self(), truncated_name.c_str()); #endif // defined(HAVE_PTHREAD_SET_NAME_NP_2) || // defined(HAVE_PTHREAD_SET_NAME_NP_2_VOID) #ifdef HAVE_PTHREAD_SETNAME_NP_1 pthread_setname_np(truncated_name.c_str()); #endif // HAVE_PTHREAD_SETNAME_NP_1 #ifdef HAVE_PTHREAD_SETNAME_NP_3 pthread_setname_np(pthread_self(), truncated_name.c_str(), NULL); #endif // HAVE_PTHREAD_SETNAME_NP_3 int policy; struct sched_param param; pthread_getschedparam(pthread_self(), &policy, ¶m); OLA_INFO << "Thread " << Name() << ", policy " << PolicyToString(policy) << ", priority " << param.sched_priority; { MutexLocker locker(&m_mutex); m_running = true; } m_condition.Signal(); return Run(); } } // namespace thread } // namespace ola ola-0.10.9/common/thread/SignalThread.cpp0000664000175000017500000001075214376533110015117 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SignalThread.cpp * A thread to handle signals. * Copyright (C) 2013 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #ifdef _WIN32 // On MinGW, pthread.h pulls in Windows.h, which in turn pollutes the global // namespace. We define VC_EXTRALEAN and WIN32_LEAN_AND_MEAN to reduce this. #define VC_EXTRALEAN #define WIN32_LEAN_AND_MEAN #endif // _WIN32 #include #include #include #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/stl/STLUtils.h" #include "ola/thread/SignalThread.h" namespace ola { namespace thread { #ifdef _WIN32 // Windows doesn't support sigwait and related functions, so we need to use // this workaround. Keep the definition of g_signal_map in sync with // SignalThread::SignalMap. static std::map* g_signal_map = NULL; static void Win32SignalHandler(int signo) { OLA_INFO << "Received signal: " << signo; if (!g_signal_map) { OLA_WARN << "Signal handler called without signal map"; return; } SignalThread::SignalHandler *handler = STLFindOrNull(*g_signal_map, signo); if (handler) { handler->Run(); } } #endif // _WIN32 SignalThread::SignalThread() : Thread(Thread::Options("signal-thread")) {} SignalThread::~SignalThread() { ola::STLDeleteValues(&m_signal_handlers); } /** * @brief Install a signal handler for the given signal. * * This can't be called once the thread has stared. */ bool SignalThread::InstallSignalHandler(int signal, SignalHandler *handler) { if (BlockSignal(signal)) { ola::STLReplaceAndDelete(&m_signal_handlers, signal, handler); return true; } return false; } /** * @brief Entry point into the thread. */ void* SignalThread::Run() { #ifndef _WIN32 sigset_t signals; int signo; #endif // _WIN32 #ifdef _WIN32 if (g_signal_map) { OLA_WARN << "Windows signal map was already set, it will be overwritten."; } g_signal_map = &m_signal_handlers; SignalMap::const_iterator iter = m_signal_handlers.begin(); for (; iter != m_signal_handlers.end(); ++iter) { signal(iter->first, Win32SignalHandler); } #endif // _WIN32 while (true) { #ifndef _WIN32 sigemptyset(&signals); AddSignals(&signals); // Don't try to use sigpending here. It won't work on Mac. if (sigwait(&signals, &signo) != 0) { OLA_INFO << "sigwait error: " << strerror(errno); continue; } OLA_INFO << "Received signal: " << strsignal(signo); SignalHandler *handler = STLFindOrNull(m_signal_handlers, signo); if (handler) { handler->Run(); } #endif // _WIN32 } return NULL; } /** * @brief Add the signals we're interested in to the sigset. */ bool SignalThread::AddSignals(sigset_t *signals) { #ifndef _WIN32 SignalMap::const_iterator iter = m_signal_handlers.begin(); for (; iter != m_signal_handlers.end(); ++iter) { if (sigaddset(signals, iter->first)) { OLA_WARN << "Failed to add " << strsignal(iter->first) << " to the signal set: " << strerror(errno); return false; } } #else (void) signals; #endif // _WIN32 return true; } /** * Block the signal */ bool SignalThread::BlockSignal(int signal) { #ifdef _WIN32 ::signal(signal, SIG_IGN); #else sigset_t signals; if (sigemptyset(&signals)) { OLA_WARN << "Failed to init signal set: " << strerror(errno); return false; } if (sigaddset(&signals, signal)) { OLA_WARN << "Failed to add " << strsignal(signal) << " to the signal set: " << strerror(errno); return false; } if (pthread_sigmask(SIG_BLOCK, &signals, NULL)) { OLA_WARN << "Failed to block signals: " << strerror(errno); return false; } #endif // _WIN32 return true; } } // namespace thread } // namespace ola ola-0.10.9/common/thread/ExecutorThreadTest.cpp0000664000175000017500000000367314376533110016344 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ExecutorThreadTest.cpp * Test fixture for the ExecutorThread class * Copyright (C) 2015 Simon Newton */ #include #include "ola/thread/ExecutorThread.h" #include "ola/thread/Future.h" #include "ola/testing/TestUtils.h" using ola::NewSingleCallback; using ola::thread::Future; using ola::thread::ExecutorThread; namespace { void SetFuture(Future* f) { f->Set(); } } // namespace class ExecutorThreadTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ExecutorThreadTest); CPPUNIT_TEST(test); CPPUNIT_TEST_SUITE_END(); public: void test(); }; CPPUNIT_TEST_SUITE_REGISTRATION(ExecutorThreadTest); /* * Check that callbacks are executed correctly. */ void ExecutorThreadTest::test() { Future f1; { ola::thread::Thread::Options options; ExecutorThread thread(options); OLA_ASSERT_TRUE(thread.Start()); Future f2; thread.Execute(NewSingleCallback(SetFuture, &f2)); f2.Get(); OLA_ASSERT_TRUE(thread.Stop()); // Try stop a second time. OLA_ASSERT_FALSE(thread.Stop()); // Confirm that all callbacks are run when the thread is destroyed. thread.Execute(NewSingleCallback(SetFuture, &f1)); } f1.Get(); } ola-0.10.9/common/thread/ThreadPool.cpp0000664000175000017500000000503714376533110014613 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ThreadPool.cpp * An executor which farms work out to a bunch of threads. * Copyright (C) 2011 Simon Newton */ #include "ola/Logging.h" #include "ola/thread/Thread.h" #include "ola/thread/ThreadPool.h" #include "ola/thread/ConsumerThread.h" namespace ola { namespace thread { /** * Clean up */ ThreadPool::~ThreadPool() { JoinAllThreads(); } /** * Start the threads */ bool ThreadPool::Init() { if (!m_threads.empty()) { OLA_WARN << "Thread pool already started"; return false; } for (unsigned int i = 1 ; i <= m_thread_count; i++) { ConsumerThread *thread = new ConsumerThread( &m_callback_queue, &m_shutdown, &m_mutex, &m_condition_var); if (!thread->Start()) { OLA_WARN << "Failed to start thread " << i << ", aborting ThreadPool::Init()"; JoinAllThreads(); return false; } m_threads.push_back(thread); } return true; } /** * Join all threads */ void ThreadPool::JoinAll() { JoinAllThreads(); } /** * Queue the callback. * Don't call this after JoinAll() otherwise the closure may not run and will * probably leak memory. */ void ThreadPool::Execute(ola::BaseCallback0 *closure) { MutexLocker locker(&m_mutex); if (m_shutdown) { OLA_WARN << "Adding actions to a ThreadPool while it's shutting down, " "this will leak!"; } m_callback_queue.push(closure); m_condition_var.Signal(); } /** * Join all threads. */ void ThreadPool::JoinAllThreads() { if (m_threads.empty()) return; { MutexLocker locker(&m_mutex); m_shutdown = true; m_condition_var.Broadcast(); } while (!m_threads.empty()) { ConsumerThread *thread = m_threads.back(); m_threads.pop_back(); thread->Join(); delete thread; } } } // namespace thread } // namespace ola ola-0.10.9/common/thread/ConsumerThread.cpp0000664000175000017500000000342514376533110015474 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ConsumerThread.cpp * An thread which consumes Callbacks from a queue and runs them. * Copyright (C) 2011 Simon Newton */ #include "ola/Logging.h" #include "ola/thread/ConsumerThread.h" namespace ola { namespace thread { /** * The run method, this loops, executing actions, until we're told to * terminate. */ void *ConsumerThread::Run() { m_mutex->Lock(); while (true) { EmptyQueue(); // Mutex is held here if (*m_shutdown) { m_mutex->Unlock(); break; } m_condition_var->Wait(m_mutex); } return NULL; } /** * Drain the queue of actions * @pre We hold the Mutex * @post We hold the mutex and the queue is empty. */ void ConsumerThread::EmptyQueue() { while (true) { // we have the lock if (m_callback_queue->empty()) { break; } // action in queue Action action = m_callback_queue->front(); m_callback_queue->pop(); m_mutex->Unlock(); action->Run(); // reacquire the lock m_mutex->Lock(); // coverity[LOCK] } } } // namespace thread } // namespace ola ola-0.10.9/common/thread/Makefile.mk0000664000175000017500000000231114376533110014104 00000000000000# LIBRARIES ################################################## common_libolacommon_la_SOURCES += \ common/thread/ConsumerThread.cpp \ common/thread/ExecutorThread.cpp \ common/thread/Mutex.cpp \ common/thread/PeriodicThread.cpp \ common/thread/SignalThread.cpp \ common/thread/Thread.cpp \ common/thread/ThreadPool.cpp \ common/thread/Utils.cpp # TESTS ################################################## test_programs += common/thread/ExecutorThreadTester \ common/thread/ThreadTester \ common/thread/FutureTester common_thread_ThreadTester_SOURCES = \ common/thread/ThreadPoolTest.cpp \ common/thread/ThreadTest.cpp common_thread_ThreadTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_thread_ThreadTester_LDADD = $(COMMON_TESTING_LIBS) common_thread_FutureTester_SOURCES = common/thread/FutureTest.cpp common_thread_FutureTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_thread_FutureTester_LDADD = $(COMMON_TESTING_LIBS) common_thread_ExecutorThreadTester_SOURCES = \ common/thread/ExecutorThreadTest.cpp common_thread_ExecutorThreadTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_thread_ExecutorThreadTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/thread/ExecutorThread.cpp0000664000175000017500000000410214376533110015470 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ExecutorThread.cpp * Run callbacks in a separate thread. * Copyright (C) 2015 Simon Newton */ #include "ola/thread/ExecutorThread.h" #include #include #include #include namespace ola { namespace thread { using ola::io::SelectServer; using ola::thread::Future; using ola::thread::Thread; namespace { void SetFuture(Future* f) { f->Set(); } } // namespace ExecutorThread::~ExecutorThread() { RunRemaining(); } void ExecutorThread::Execute(ola::BaseCallback0 *callback) { { MutexLocker locker(&m_mutex); m_callback_queue.push(callback); } m_condition_var.Signal(); } void ExecutorThread::DrainCallbacks() { Future f; Execute(NewSingleCallback(SetFuture, &f)); f.Get(); } bool ExecutorThread::Start() { return m_thread.Start(); } bool ExecutorThread::Stop() { if (!m_thread.IsRunning()) { return false; } { MutexLocker locker(&m_mutex); m_shutdown = true; } m_condition_var.Signal(); bool ok = m_thread.Join(); RunRemaining(); return ok; } void ExecutorThread::RunRemaining() { MutexLocker locker(&m_mutex); while (!m_callback_queue.empty()) { BaseCallback0* cb = m_callback_queue.front(); m_callback_queue.pop(); cb->Run(); } } } // namespace thread } // namespace ola ola-0.10.9/common/Makefile.mk0000664000175000017500000000204014376533110012634 00000000000000lib_LTLIBRARIES += common/libolacommon.la # Variables the included files can append to # ------------------------------------------ common_libolacommon_la_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) common_libolacommon_la_LIBADD = common_libolacommon_la_SOURCES = nodist_common_libolacommon_la_SOURCES = # ------------------------------------------ if USING_WIN32 common_libolacommon_la_LIBADD += -lWs2_32 -lIphlpapi endif include common/base/Makefile.mk include common/dmx/Makefile.mk include common/export_map/Makefile.mk include common/file/Makefile.mk include common/http/Makefile.mk include common/io/Makefile.mk include common/math/Makefile.mk include common/messaging/Makefile.mk include common/network/Makefile.mk include common/protocol/Makefile.mk include common/rdm/Makefile.mk include common/rpc/Makefile.mk include common/strings/Makefile.mk include common/system/Makefile.mk include common/testing/Makefile.mk include common/thread/Makefile.mk include common/timecode/Makefile.mk include common/utils/Makefile.mk include common/web/Makefile.mk ola-0.10.9/common/http/0000775000175000017500000000000014376533270011640 500000000000000ola-0.10.9/common/http/HTTPServer.cpp0000664000175000017500000006204114376533110014226 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * HTTPServer.cpp * The base HTTP Server class. * Copyright (C) 2005 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include #include #include #include #ifdef _WIN32 #include #endif // _WIN32 #include #include #include #include #include #include #include namespace ola { namespace http { #ifdef _WIN32 class UnmanagedSocketDescriptor : public ola::io::UnmanagedFileDescriptor { public: explicit UnmanagedSocketDescriptor(int fd) : ola::io::UnmanagedFileDescriptor(fd) { m_handle.m_type = ola::io::SOCKET_DESCRIPTOR; // Set socket to nonblocking to enable WSAEventSelect u_long mode = 1; ioctlsocket(fd, FIONBIO, &mode); } private: DISALLOW_COPY_AND_ASSIGN(UnmanagedSocketDescriptor); }; #endif // _WIN32 using std::ifstream; using std::map; using std::pair; using std::set; using std::string; using std::vector; using ola::io::UnmanagedFileDescriptor; using ola::web::JsonValue; using ola::web::JsonWriter; const char HTTPServer::CONTENT_TYPE_PLAIN[] = "text/plain"; const char HTTPServer::CONTENT_TYPE_HTML[] = "text/html"; const char HTTPServer::CONTENT_TYPE_GIF[] = "image/gif"; const char HTTPServer::CONTENT_TYPE_PNG[] = "image/png"; const char HTTPServer::CONTENT_TYPE_CSS[] = "text/css"; const char HTTPServer::CONTENT_TYPE_JS[] = "text/javascript"; const char HTTPServer::CONTENT_TYPE_OCT[] = "application/octet-stream"; /** * @brief Called by MHD_get_connection_values to add headers to a request * object. * @param cls a pointer to an HTTPRequest object. * @param kind the source of the key-value pair * @param key the header name * @param value the header value */ static MHD_RESULT AddHeaders(void *cls, OLA_UNUSED enum MHD_ValueKind kind, const char *key, const char *value) { HTTPRequest *request = static_cast(cls); string key_string = key; string value_string = value; request->AddHeader(key, value); return MHD_YES; } /** * @brief Called by MHD_create_post_processor to iterate over the post form data * @param request_cls a pointer to a HTTPRequest object * @param kind the source of the key-value pair * @param key the header name * @param filename the name of the uploaded file or NULL if unknown * @param content_type the MIME type of the data or NULL if unknown * @param transfer_encoding the encoding of the data or NULL if unknown * @param data the header value * @param off the offset of the data * @param size the number of bytes available */ MHD_RESULT IteratePost(void *request_cls, OLA_UNUSED enum MHD_ValueKind kind, const char *key, OLA_UNUSED const char *filename, OLA_UNUSED const char *content_type, OLA_UNUSED const char *transfer_encoding, const char *data, OLA_UNUSED uint64_t off, OLA_UNUSED size_t size) { // libmicrohttpd has a bug where the size isn't set correctly. HTTPRequest *request = static_cast(request_cls); string value(data); request->AddPostParameter(key, value); return MHD_YES; } /** * @brief Called whenever a new request is made. * * This sets up HTTPRequest & HTTPResponse objects and then calls * DispatchRequest. */ static MHD_RESULT HandleRequest(void *http_server_ptr, struct MHD_Connection *connection, const char *url, const char *method, const char *version, const char *upload_data, size_t *upload_data_size, void **ptr) { HTTPServer *http_server = static_cast(http_server_ptr); HTTPRequest *request; // on the first call ptr is null if (*ptr == NULL) { request = new HTTPRequest(url, method, version, connection); if (!request) { return MHD_NO; } if (!request->Init()) { delete request; return MHD_NO; } *ptr = static_cast(request); return MHD_YES; } request = static_cast(*ptr); if (request->InFlight()) { // don't dispatch more than once return MHD_YES; } if (request->Method() == MHD_HTTP_METHOD_GET) { HTTPResponse *response = new HTTPResponse(connection); request->SetInFlight(); return static_cast( http_server->DispatchRequest(request, response)); } else if (request->Method() == MHD_HTTP_METHOD_POST) { if (*upload_data_size != 0) { request->ProcessPostData(upload_data, upload_data_size); *upload_data_size = 0; return MHD_YES; } request->SetInFlight(); HTTPResponse *response = new HTTPResponse(connection); return static_cast( http_server->DispatchRequest(request, response)); } return MHD_NO; } /** * @brief Called when a request completes. * * This deletes the associated HTTPRequest object. */ void RequestCompleted(void*, struct MHD_Connection*, void **request_cls, enum MHD_RequestTerminationCode) { if (!request_cls) { return; } delete static_cast(*request_cls); *request_cls = NULL; } /* * HTTPRequest object * Setup the header callback and the post processor if needed. */ HTTPRequest::HTTPRequest(const string &url, const string &method, const string &version, struct MHD_Connection *connection): m_url(url), m_method(method), m_version(version), m_connection(connection), m_processor(NULL), m_in_flight(false) { } /* * @brief Initialize this request * @return true if successful, false otherwise. */ bool HTTPRequest::Init() { MHD_get_connection_values(m_connection, MHD_HEADER_KIND, AddHeaders, this); if (m_method == MHD_HTTP_METHOD_POST) { m_processor = MHD_create_post_processor(m_connection, K_POST_BUFFER_SIZE, IteratePost, static_cast(this)); return m_processor; } return true; } /* * @brief Cleanup this request object */ HTTPRequest::~HTTPRequest() { if (m_processor) { MHD_destroy_post_processor(m_processor); } } /** * @brief Add a header to the request object. * @param key the header name * @param value the value of the header */ void HTTPRequest::AddHeader(const string &key, const string &value) { std::pair pair(key, value); m_headers.insert(pair); } /** * @brief Add a post parameter. * * This can be called multiple times and the values will be appended. * @param key the parameter name * @param value the value */ void HTTPRequest::AddPostParameter(const string &key, const string &value) { map::iterator iter = m_post_params.find(key); if (iter == m_post_params.end()) { std::pair pair(key, value); m_post_params.insert(pair); } else { iter->second.append(value); } } /** * @brief Process post data */ void HTTPRequest::ProcessPostData(const char *data, size_t *data_size) { MHD_post_process(m_processor, data, *data_size); } /** * @brief Return the value of the header sent with this request * @param key the name of the header * @returns the value of the header or empty string if it doesn't exist. */ const string HTTPRequest::GetHeader(const string &key) const { map::const_iterator iter = m_headers.find(key); if (iter == m_headers.end()) { return ""; } else { return iter->second; } } /** * @brief Return the value of a url parameter * @param key the name of the parameter * @return the value of the parameter */ const string HTTPRequest::GetParameter(const string &key) const { const char *value = MHD_lookup_connection_value(m_connection, MHD_GET_ARGUMENT_KIND, key.c_str()); if (value) { return string(value); } else { return string(); } } /** * @brief Return whether an url parameter exists * @param key the name of the parameter * @return if the parameter exists */ bool HTTPRequest::CheckParameterExists(const string &key) const { const char *value = MHD_lookup_connection_value(m_connection, MHD_GET_ARGUMENT_KIND, key.c_str()); if (value != NULL) { return true; } else { return false; /* * TODO(Peter): try and check the "trailer" ?key, only in since Tue Jul 17 * 2012 * const char *trailer = MHD_lookup_connection_value(m_connection, * MHD_GET_ARGUMENT_KIND, * NULL); */ } } /** * @brief Lookup a post parameter in this request * @param key the name of the parameter * @return the value of the parameter or the empty string if it doesn't exist */ const string HTTPRequest::GetPostParameter(const string &key) const { map::const_iterator iter = m_post_params.find(key); if (iter == m_post_params.end()) { return ""; } else { return iter->second; } } /** * @brief Set the content-type header * @param type the content type * @return true if the header was set correctly, false otherwise */ void HTTPResponse::SetContentType(const string &type) { SetHeader(MHD_HTTP_HEADER_CONTENT_TYPE, type); } /** * @brief Set the appropriate headers so this response isn't cached */ void HTTPResponse::SetNoCache() { SetHeader(MHD_HTTP_HEADER_CACHE_CONTROL, "no-cache, must-revalidate"); } /** * @brief Set a header in the response * @param key the header name * @param value the header value * @return true if the header was set correctly, false otherwise */ void HTTPResponse::SetHeader(const string &key, const string &value) { std::pair pair(key, value); m_headers.insert(pair); } /** * @brief Send a JsonObject as the response. * @return true on success, false on error */ int HTTPResponse::SendJson(const JsonValue &json) { const string output = JsonWriter::AsString(json); struct MHD_Response *response = HTTPServer::BuildResponse( static_cast(const_cast(output.data())), output.length()); HeadersMultiMap::const_iterator iter; for (iter = m_headers.begin(); iter != m_headers.end(); ++iter) { MHD_add_response_header(response, iter->first.c_str(), iter->second.c_str()); } int ret = MHD_queue_response(m_connection, m_status_code, response); MHD_destroy_response(response); return ret; } /** * @brief Send the HTTP response * @return true on success, false on error */ int HTTPResponse::Send() { HeadersMultiMap::const_iterator iter; struct MHD_Response *response = HTTPServer::BuildResponse( static_cast(const_cast(m_data.data())), m_data.length()); for (iter = m_headers.begin(); iter != m_headers.end(); ++iter) { MHD_add_response_header(response, iter->first.c_str(), iter->second.c_str()); } int ret = MHD_queue_response(m_connection, m_status_code, response); MHD_destroy_response(response); return ret; } /** * @brief Setup the HTTP server. * @param options the configuration options for the server */ HTTPServer::HTTPServer(const HTTPServerOptions &options) : Thread(Thread::Options("http")), m_httpd(NULL), m_default_handler(NULL), m_port(options.port), m_data_dir(options.data_dir) { ola::io::SelectServer::Options ss_options; // See issue #761. epoll/kqueue can't be used with the current // implementation. ss_options.force_select = true; m_select_server.reset(new ola::io::SelectServer(ss_options)); } /** * @brief Destroy this object */ HTTPServer::~HTTPServer() { Stop(); if (m_httpd) MHD_stop_daemon(m_httpd); map::const_iterator iter; for (iter = m_handlers.begin(); iter != m_handlers.end(); ++iter) { delete iter->second; } if (m_default_handler) { delete m_default_handler; m_default_handler = NULL; } m_handlers.clear(); } /** * @brief Setup the HTTP server * @return true on success, false on failure */ bool HTTPServer::Init() { if (m_httpd) { OLA_INFO << "Non null pointers found, Init() was probably called twice"; return false; } m_httpd = MHD_start_daemon(MHD_NO_FLAG, m_port, NULL, NULL, &HandleRequest, this, MHD_OPTION_NOTIFY_COMPLETED, RequestCompleted, NULL, MHD_OPTION_END); if (m_httpd) { m_select_server->RunInLoop(NewCallback(this, &HTTPServer::UpdateSockets)); } return m_httpd ? true : false; } /** * @brief The entry point into the new thread */ void *HTTPServer::Run() { if (!m_httpd) { OLA_WARN << "HTTPServer::Run called but the server wasn't setup."; return NULL; } OLA_INFO << "HTTP Server started on port " << m_port; #ifdef _WIN32 // set a short poll interval since we'd block too long otherwise. // TODO(Lukas) investigate why the poller does not wake up on HTTP requests. m_select_server->SetDefaultInterval(TimeInterval(1, 0)); #else // set a long poll interval so we don't spin m_select_server->SetDefaultInterval(TimeInterval(60, 0)); #endif // _WIN32 m_select_server->Run(); // clean up any remaining sockets SocketSet::iterator iter = m_sockets.begin(); for (; iter != m_sockets.end(); ++iter) { FreeSocket(*iter); } m_sockets.clear(); return NULL; } /** * @brief Stop the HTTP server */ void HTTPServer::Stop() { if (IsRunning()) { OLA_INFO << "Notifying HTTP server thread to stop"; m_select_server->Terminate(); OLA_INFO << "Waiting for HTTP server thread to exit"; Join(); OLA_INFO << "HTTP server thread exited"; } } /** * @brief This is run every loop iteration to update the list of sockets in the * SelectServer from MHD. */ void HTTPServer::UpdateSockets() { // We always call MHD_run so we send any queued responses. This isn't // inefficient because the only thing that can wake up the select server is // activity on a http socket or the client socket. The latter almost always // results in a change to HTTP state. if (MHD_run(m_httpd) == MHD_NO) { OLA_WARN << "MHD run failed"; } fd_set r_set, w_set, e_set; int max_fd = 0; FD_ZERO(&r_set); FD_ZERO(&w_set); #ifdef MHD_SOCKET_DEFINED if (MHD_YES != MHD_get_fdset(m_httpd, &r_set, &w_set, &e_set, reinterpret_cast(&max_fd))) { #else if (MHD_YES != MHD_get_fdset(m_httpd, &r_set, &w_set, &e_set, &max_fd)) { #endif // MHD_SOCKET_DEFINED OLA_WARN << "Failed to get a list of the file descriptors for MHD"; return; } SocketSet::iterator iter = m_sockets.begin(); // This isn't the best plan, talk to the MHD devs about exposing the list of // FD in a more suitable way int i = 0; while (iter != m_sockets.end() && i <= max_fd) { DescriptorState *state = *iter; if (ola::io::ToFD(state->descriptor->ReadDescriptor()) < i) { // This socket is no longer required so remove it FreeSocket(state); m_sockets.erase(iter++); } else if (ola::io::ToFD(state->descriptor->ReadDescriptor()) == i) { // Check if this socket must be updated. if (FD_ISSET(i, &r_set) && state->read == 0) { m_select_server->AddReadDescriptor(state->descriptor); state->read = 1; } else if ((!FD_ISSET(i, &r_set)) && state->read == 1) { m_select_server->RemoveReadDescriptor(state->descriptor); state->read = 0; } if (FD_ISSET(i, &w_set) && state->write == 0) { m_select_server->AddWriteDescriptor(state->descriptor); state->write = 1; } else if ((!FD_ISSET(i, &w_set)) && state->write == 1) { m_select_server->RemoveWriteDescriptor(state->descriptor); state->write = 0; } iter++; i++; } else { // this is a new socket if (FD_ISSET(i, &r_set) || FD_ISSET(i, &w_set)) { InsertSocket(FD_ISSET(i, &r_set), FD_ISSET(i, &w_set), i); } i++; } } while (iter != m_sockets.end()) { FreeSocket(*iter); m_sockets.erase(iter++); } for (; i <= max_fd; i++) { // add the remaining sockets to the SS if (FD_ISSET(i, &r_set) || FD_ISSET(i, &w_set)) { InsertSocket(FD_ISSET(i, &r_set), FD_ISSET(i, &w_set), i); } } } /** * @brief Call the appropriate handler. */ int HTTPServer::DispatchRequest(const HTTPRequest *request, HTTPResponse *response) { map::iterator iter = m_handlers.find(request->Url()); if (iter != m_handlers.end()) { return iter->second->Run(request, response); } map::iterator file_iter = m_static_content.find(request->Url()); if (file_iter != m_static_content.end()) { return ServeStaticContent(&(file_iter->second), response); } if (m_default_handler) { return m_default_handler->Run(request, response); } return ServeNotFound(response); } /** * @brief Register a handler * @param path the url to respond on * @param handler the Closure to call for this request. These will be freed * once the HTTPServer is destroyed. */ bool HTTPServer::RegisterHandler(const string &path, BaseHTTPCallback *handler) { map::const_iterator iter = m_handlers.find(path); if (iter != m_handlers.end()) { return false; } pair pair(path, handler); m_handlers.insert(pair); return true; } /** * @brief Register a static file. The root of the URL corresponds to the data dir. * @param path the URL path for the file e.g. '/foo.png' * @param content_type the content type. */ bool HTTPServer::RegisterFile(const std::string &path, const std::string &content_type) { if (path.empty() || path[0] != '/') { OLA_WARN << "Invalid static file: " << path; return false; } return RegisterFile(path, path.substr(1), content_type); } /** * @brief Register a static file * @param path the path to serve on e.g. /foo.png * @param file the path to the file to serve relative to the data dir e.g. * images/foo.png * @param content_type the content type. */ bool HTTPServer::RegisterFile(const std::string &path, const std::string &file, const std::string &content_type) { map::const_iterator file_iter = ( m_static_content.find(path)); if (file_iter != m_static_content.end()) { return false; } static_file_info file_info; file_info.file_path = file; file_info.content_type = content_type; pair pair(path, file_info); m_static_content.insert(pair); return true; } /** * @brief Set the default handler. * @param handler the default handler to call. This will be freed when the * HTTPServer is destroyed. */ void HTTPServer::RegisterDefaultHandler(BaseHTTPCallback *handler) { m_default_handler = handler; } /** * @brief Return a list of all handlers registered */ void HTTPServer::Handlers(vector *handlers) const { map::const_iterator iter; for (iter = m_handlers.begin(); iter != m_handlers.end(); ++iter) { handlers->push_back(iter->first); } map::const_iterator file_iter; for (file_iter = m_static_content.begin(); file_iter != m_static_content.end(); ++file_iter) { handlers->push_back(file_iter->first); } } /** * @brief Serve an error. * @param response the response to use. * @param details the error description */ int HTTPServer::ServeError(HTTPResponse *response, const string &details) { response->SetStatus(MHD_HTTP_INTERNAL_SERVER_ERROR); response->SetContentType(CONTENT_TYPE_HTML); response->Append("500 Server Error"); if (!details.empty()) { response->Append("

"); response->Append(details); response->Append("

"); } int r = response->Send(); delete response; return r; } /** * @brief Serve a 404 * @param response the response to use */ int HTTPServer::ServeNotFound(HTTPResponse *response) { response->SetStatus(MHD_HTTP_NOT_FOUND); response->SetContentType(CONTENT_TYPE_HTML); response->Append("404 Not Found"); int r = response->Send(); delete response; return r; } /** * @brief Serve a redirect * @param response the response to use * @param location the location to redirect to */ int HTTPServer::ServeRedirect(HTTPResponse *response, const string &location) { response->SetStatus(MHD_HTTP_FOUND); response->SetContentType(CONTENT_TYPE_HTML); response->SetHeader(MHD_HTTP_HEADER_LOCATION, location); response->Append("302 Found See " + location); int r = response->Send(); delete response; return r; } /** * @brief Return the contents of a file */ int HTTPServer::ServeStaticContent(const std::string &path, const std::string &content_type, HTTPResponse *response) { static_file_info file_info; file_info.file_path = path; file_info.content_type = content_type; return ServeStaticContent(&file_info, response); } /** * @brief Serve static content. * @param file_info details on the file to server * @param response the response to use */ int HTTPServer::ServeStaticContent(static_file_info *file_info, HTTPResponse *response) { char *data; unsigned int length; string file_path = m_data_dir; file_path.push_back(ola::file::PATH_SEPARATOR); file_path.append(file_info->file_path); ifstream i_stream(file_path.c_str(), ifstream::binary); if (!i_stream.is_open()) { OLA_WARN << "Missing file: " << file_path; return ServeNotFound(response); } i_stream.seekg(0, std::ios::end); length = i_stream.tellg(); i_stream.seekg(0, std::ios::beg); data = static_cast(malloc(length)); i_stream.read(data, length); i_stream.close(); struct MHD_Response *mhd_response = BuildResponse(static_cast(data), length); if (!file_info->content_type.empty()) { MHD_add_response_header(mhd_response, MHD_HTTP_HEADER_CONTENT_TYPE, file_info->content_type.c_str()); } int ret = MHD_queue_response(response->Connection(), MHD_HTTP_OK, mhd_response); MHD_destroy_response(mhd_response); delete response; return ret; } void HTTPServer::InsertSocket(bool is_readable, bool is_writeable, int fd) { #ifdef _WIN32 UnmanagedSocketDescriptor *socket = new UnmanagedSocketDescriptor(fd); #else UnmanagedFileDescriptor *socket = new UnmanagedFileDescriptor(fd); #endif // _WIN32 socket->SetOnData(NewCallback(this, &HTTPServer::HandleHTTPIO)); socket->SetOnWritable(NewCallback(this, &HTTPServer::HandleHTTPIO)); DescriptorState *state = new DescriptorState(socket); if (is_readable) { m_select_server->AddReadDescriptor(state->descriptor); state->read = 1; } if (is_writeable) { state->write = 1; m_select_server->AddWriteDescriptor(state->descriptor); } m_sockets.insert(state); } void HTTPServer::FreeSocket(DescriptorState *state) { if (state->read) { m_select_server->RemoveReadDescriptor(state->descriptor); } if (state->write) { m_select_server->RemoveWriteDescriptor(state->descriptor); } delete state->descriptor; delete state; } struct MHD_Response *HTTPServer::BuildResponse(void *data, size_t size) { #ifdef HAVE_MHD_CREATE_RESPONSE_FROM_BUFFER return MHD_create_response_from_buffer(size, data, MHD_RESPMEM_MUST_COPY); #else return MHD_create_response_from_data(size, data, MHD_NO, MHD_YES); #endif // HAVE_MHD_CREATE_RESPONSE_FROM_BUFFER } } // namespace http } // namespace ola ola-0.10.9/common/http/OlaHTTPServer.cpp0000664000175000017500000000702014376533110014656 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * OlaHTTPServer.cpp * A HTTP Server with export map integration. * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include #include namespace ola { namespace http { using ola::ExportMap; using std::auto_ptr; using std::ostringstream; using std::string; using std::vector; const char OlaHTTPServer::K_DATA_DIR_VAR[] = "http_data_dir"; const char OlaHTTPServer::K_UPTIME_VAR[] = "uptime-in-ms"; /** * Create a new OlaHTTPServer. * @param options The HTTPServerOptions options, * @param export_map the ExportMap to server */ OlaHTTPServer::OlaHTTPServer(const HTTPServer::HTTPServerOptions &options, ExportMap *export_map) : m_export_map(export_map), m_server(options) { RegisterHandler("/debug", &OlaHTTPServer::DisplayDebug); RegisterHandler("/help", &OlaHTTPServer::DisplayHandlers); StringVariable *data_dir_var = export_map->GetStringVar(K_DATA_DIR_VAR); data_dir_var->Set(m_server.DataDir()); m_clock.CurrentMonotonicTime(&m_start_time); export_map->GetStringVar(K_UPTIME_VAR); } /** * Setup the OLA HTTP server * @return true if this worked, false otherwise. */ bool OlaHTTPServer::Init() { return m_server.Init(); } /** * Display the contents of the ExportMap */ int OlaHTTPServer::DisplayDebug(const HTTPRequest*, HTTPResponse *raw_response) { auto_ptr response(raw_response); ola::TimeStamp now; m_clock.CurrentMonotonicTime(&now); ola::TimeInterval diff = now - m_start_time; ostringstream str; str << diff.InMilliSeconds(); m_export_map->GetStringVar(K_UPTIME_VAR)->Set(str.str()); vector variables = m_export_map->AllVariables(); response->SetContentType(HTTPServer::CONTENT_TYPE_PLAIN); vector::iterator iter; for (iter = variables.begin(); iter != variables.end(); ++iter) { ostringstream out; out << (*iter)->Name() << ": " << (*iter)->Value() << "\n"; response->Append(out.str()); } int r = response->Send(); return r; } /** * Display a list of registered handlers */ int OlaHTTPServer::DisplayHandlers(const HTTPRequest*, HTTPResponse *raw_response) { auto_ptr response(raw_response); vector handlers; m_server.Handlers(&handlers); vector::const_iterator iter; response->SetContentType(HTTPServer::CONTENT_TYPE_HTML); response->Append("Registered Handlers
    "); for (iter = handlers.begin(); iter != handlers.end(); ++iter) { response->Append("
  • " + *iter + "
  • "); } response->Append("
"); int r = response->Send(); return r; } } // namespace http } // namespace ola ola-0.10.9/common/http/Makefile.mk0000664000175000017500000000045514376533110013623 00000000000000# LIBRARIES ################################################## if HAVE_LIBMICROHTTPD noinst_LTLIBRARIES += common/http/libolahttp.la common_http_libolahttp_la_SOURCES = \ common/http/HTTPServer.cpp \ common/http/OlaHTTPServer.cpp common_http_libolahttp_la_LIBADD = $(libmicrohttpd_LIBS) endif ola-0.10.9/common/rdm/0000775000175000017500000000000014376533271011444 500000000000000ola-0.10.9/common/rdm/RDMFrame.cpp0000664000175000017500000000352614376533110013463 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMFrame.cpp * The RDMFrame object. * Copyright (C) 2015 Simon Newton */ #include "ola/rdm/RDMFrame.h" #include #include #include namespace ola { namespace rdm { RDMFrame::RDMFrame(const uint8_t *raw_data, unsigned int length, const Options &options) { if (options.prepend_start_code) { data.push_back(START_CODE); } data.append(raw_data, length); memset(reinterpret_cast(&timing), 0, sizeof(timing)); } RDMFrame::RDMFrame(const ola::io::ByteString &frame_data, const Options &options) { if (options.prepend_start_code) { data.push_back(START_CODE); } data.append(frame_data); memset(reinterpret_cast(&timing), 0, sizeof(timing)); } bool RDMFrame::operator==(const RDMFrame &other) const { return (data == other.data && timing.response_time == other.timing.response_time && timing.break_time == other.timing.break_time && timing.mark_time == other.timing.mark_time && timing.data_time == other.timing.data_time); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/RDMHelperTest.cpp0000664000175000017500000000366414376533110014513 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMHelperTest.cpp * Test fixture for the RDM Helper code * Copyright (C) 2014 Peter Newman */ #include #include #include #include "ola/rdm/RDMEnums.h" #include "ola/rdm/RDMHelper.h" #include "ola/testing/TestUtils.h" using std::string; using ola::rdm::StatusMessageIdToString; class RDMHelperTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RDMHelperTest); CPPUNIT_TEST(testStatusMessageIdToString); CPPUNIT_TEST_SUITE_END(); public: void testStatusMessageIdToString(); }; CPPUNIT_TEST_SUITE_REGISTRATION(RDMHelperTest); /* * Test the StatusMessageIdToString function. */ void RDMHelperTest::testStatusMessageIdToString() { OLA_ASSERT_EQ(string("Slot 25 failed calibration"), StatusMessageIdToString(ola::rdm::STS_CAL_FAIL, 25, 0)); OLA_ASSERT_EQ(string("Proxy Drop: PID 0xabcd at TN 1"), StatusMessageIdToString(ola::rdm::STS_PROXY_BROADCAST_DROPPED, 0xABCD, 1)); OLA_ASSERT_EQ(string("Proxy Drop: PID 0xff00 at TN 255"), StatusMessageIdToString(ola::rdm::STS_PROXY_BROADCAST_DROPPED, 0xFF00, 255)); } ola-0.10.9/common/rdm/DescriptorConsistencyCheckerTest.cpp0000664000175000017500000002345014376533110020551 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DescriptorConsistencyCheckerTest.cpp * Test fixture for the DescriptorConsistencyChecker class. * Copyright (C) 2011 Simon Newton */ #include #include #include "ola/Logging.h" #include "ola/messaging/Descriptor.h" #include "common/rdm/DescriptorConsistencyChecker.h" #include "ola/testing/TestUtils.h" using ola::messaging::Descriptor; using ola::messaging::FieldDescriptor; using ola::rdm::DescriptorConsistencyChecker; using std::vector; class DescriptorConsistencyCheckerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DescriptorConsistencyCheckerTest); CPPUNIT_TEST(testOkDescriptors); CPPUNIT_TEST(testDuplicateStrings); CPPUNIT_TEST(testGroups); CPPUNIT_TEST(testNestedGroups); CPPUNIT_TEST_SUITE_END(); public: void testOkDescriptors(); void testDuplicateStrings(); void testGroups(); void testNestedGroups(); }; CPPUNIT_TEST_SUITE_REGISTRATION(DescriptorConsistencyCheckerTest); /* * Test the simple Descriptor cases */ void DescriptorConsistencyCheckerTest::testOkDescriptors() { DescriptorConsistencyChecker checker; // test the empty descriptor vector fields; const Descriptor empty_descriptor("Empty", fields); OLA_ASSERT_TRUE(checker.CheckConsistency(&empty_descriptor)); // now a simple multi-field descriptor vector fields2; fields2.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); fields2.push_back(new ola::messaging::BoolFieldDescriptor("bool")); const Descriptor simple_descriptor("Simple", fields2); OLA_ASSERT_TRUE(checker.CheckConsistency(&simple_descriptor)); // now a multi-field descriptor with a variable string vector fields3; fields3.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); fields3.push_back( new ola::messaging::StringFieldDescriptor("string1", 0, 32)); const Descriptor simple_string_descriptor("Simple", fields3); OLA_ASSERT_TRUE(checker.CheckConsistency(&simple_string_descriptor)); } /* * Verify that the check fails if the descriptor contains multiple, variable * length strings. Also check that it passes if there are multiple, fixed * length strings. */ void DescriptorConsistencyCheckerTest::testDuplicateStrings() { DescriptorConsistencyChecker checker; // test fixed length strings vector fields; fields.push_back(new ola::messaging::StringFieldDescriptor("string1", 4, 4)); fields.push_back(new ola::messaging::StringFieldDescriptor("string2", 4, 4)); const Descriptor fixed_length_descriptor("Fixed", fields); OLA_ASSERT_TRUE(checker.CheckConsistency(&fixed_length_descriptor)); // variable length strings vector fields2; fields2.push_back( new ola::messaging::StringFieldDescriptor("string1", 4, 32)); fields2.push_back( new ola::messaging::StringFieldDescriptor("string2", 4, 32)); const Descriptor variable_length_descriptor("Variable", fields2); OLA_ASSERT_FALSE(checker.CheckConsistency(&variable_length_descriptor)); // test one fixed and one variable vector fields3; fields3.push_back( new ola::messaging::StringFieldDescriptor("string1", 4, 4)); fields3.push_back( new ola::messaging::StringFieldDescriptor("string2", 4, 32)); const Descriptor combination_descriptor("Variable", fields3); OLA_ASSERT_TRUE(checker.CheckConsistency(&combination_descriptor)); } /** * Verify that groups produce the correct results */ void DescriptorConsistencyCheckerTest::testGroups() { DescriptorConsistencyChecker checker; // test a single, fixed sized group vector fields, group_fields; group_fields.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); fields.push_back( new ola::messaging::FieldDescriptorGroup("group", group_fields, 2, 2)); const Descriptor fixed_length_descriptor("SingleFixed", fields); OLA_ASSERT_TRUE(checker.CheckConsistency(&fixed_length_descriptor)); // test multiple, fixed size groups vector fields2, group_fields2, group_fields3; group_fields2.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); group_fields3.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); fields2.push_back( new ola::messaging::FieldDescriptorGroup("group1", group_fields2, 2, 2)); fields2.push_back( new ola::messaging::FieldDescriptorGroup("group2", group_fields3, 2, 2)); const Descriptor multiple_fixed_descriptor("MuiltpleFixed", fields2); OLA_ASSERT_TRUE(checker.CheckConsistency(&multiple_fixed_descriptor)); // test a fixed size group, and a variable-sized group vector fields3, group_fields4, group_fields5; group_fields4.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); group_fields5.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); fields3.push_back( new ola::messaging::FieldDescriptorGroup("group1", group_fields4, 2, 2)); fields3.push_back( new ola::messaging::FieldDescriptorGroup("group2", group_fields5, 2, 8)); const Descriptor fixed_and_variable_descriptor("Fixed", fields3); OLA_ASSERT_TRUE(checker.CheckConsistency(&fixed_and_variable_descriptor)); // test a variable sized group vector fields4, group_fields6; group_fields6.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); fields4.push_back( new ola::messaging::FieldDescriptorGroup("group1", group_fields6, 2, 8)); const Descriptor variable_descriptor("Variable", fields4); OLA_ASSERT_TRUE(checker.CheckConsistency(&variable_descriptor)); // test a multiple variable sized groups vector fields5, group_fields7, group_fields8; group_fields7.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); group_fields8.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); fields5.push_back( new ola::messaging::FieldDescriptorGroup("group1", group_fields7, 2, 8)); fields5.push_back( new ola::messaging::FieldDescriptorGroup("group1", group_fields8, 2, 8)); const Descriptor multiple_variable_descriptor("Variable", fields5); OLA_ASSERT_FALSE(checker.CheckConsistency(&multiple_variable_descriptor)); } /** * Verify that nested groups produce the correct results. */ void DescriptorConsistencyCheckerTest::testNestedGroups() { DescriptorConsistencyChecker checker; // nested, fixed sized groups vector fields, group_fields1, group_fields2; group_fields1.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); group_fields1.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); group_fields2.push_back(new ola::messaging::BoolFieldDescriptor("bool")); group_fields2.push_back( new ola::messaging::FieldDescriptorGroup("", group_fields1, 2, 2)); fields.push_back( new ola::messaging::FieldDescriptorGroup("", group_fields2, 2, 2)); const Descriptor nested_fixed_descriptor("", fields); OLA_ASSERT_TRUE(checker.CheckConsistency(&nested_fixed_descriptor)); // nested, both variable vector fields2, group_fields3, group_fields4; group_fields3.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); group_fields3.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); group_fields4.push_back(new ola::messaging::BoolFieldDescriptor("bool")); group_fields4.push_back( new ola::messaging::FieldDescriptorGroup("", group_fields3, 2, 4)); fields2.push_back( new ola::messaging::FieldDescriptorGroup("", group_fields4, 2, 4)); const Descriptor nested_variable_descriptor("", fields2); OLA_ASSERT_FALSE(checker.CheckConsistency(&nested_variable_descriptor)); // variable, containing a fixed size group vector fields3, group_fields5, group_fields6; group_fields5.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); group_fields5.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); group_fields6.push_back(new ola::messaging::BoolFieldDescriptor("bool")); group_fields6.push_back( new ola::messaging::FieldDescriptorGroup("", group_fields5, 2, 2)); fields3.push_back( new ola::messaging::FieldDescriptorGroup("", group_fields6, 2, 4)); const Descriptor variable_fixed_descriptor("", fields3); OLA_ASSERT_TRUE(checker.CheckConsistency(&variable_fixed_descriptor)); // fixed, containing a variable sized group vector fields4, group_fields7, group_fields8; group_fields7.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); group_fields7.push_back(new ola::messaging::UInt8FieldDescriptor("uint8")); group_fields8.push_back(new ola::messaging::BoolFieldDescriptor("bool")); group_fields8.push_back( new ola::messaging::FieldDescriptorGroup("", group_fields7, 2, 4)); fields4.push_back( new ola::messaging::FieldDescriptorGroup("", group_fields8, 2, 2)); const Descriptor fixed_variable_descriptor("", fields4); OLA_ASSERT_FALSE(checker.CheckConsistency(&fixed_variable_descriptor)); } ola-0.10.9/common/rdm/RDMReply.cpp0000664000175000017500000000556414376533110013530 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMReply.cpp * The RDMReply object. * Copyright (C) 2015 Simon Newton */ #include "ola/rdm/RDMReply.h" #include #include #include #include using ola::rdm::RDMResponse; namespace { bool ResponsesAreEqual(const RDMResponse *response1, const RDMResponse *response2) { if (response1 == NULL && response2 == NULL) { return true; } if (response1 == NULL || response2 == NULL) { return false; } return *response1 == *response2; } } // namespace namespace ola { namespace rdm { RDMReply::RDMReply(RDMStatusCode status_code) : m_status_code(status_code) { } RDMReply::RDMReply(RDMStatusCode status_code, RDMResponse *response) : m_status_code(status_code), m_response(response) { } RDMReply::RDMReply(RDMStatusCode status_code, RDMResponse *response, const RDMFrames &frames) : m_status_code(status_code), m_response(response), m_frames(frames) { } bool RDMReply::operator==(const RDMReply &other) const { return (m_status_code == other.m_status_code && ResponsesAreEqual(m_response.get(), other.m_response.get()) && m_frames == other.m_frames); } std::string RDMReply::ToString() const { std::ostringstream str; str << StatusCodeToString(m_status_code); if (m_response.get()) { str << ": " << *m_response.get(); } return str.str(); } RDMReply* RDMReply::FromFrame(const RDMFrame &frame, const RDMRequest *request) { RDMFrames frames; frames.push_back(frame); ola::rdm::RDMStatusCode status_code = RDM_INVALID_RESPONSE; RDMResponse *response = NULL; if (frame.data.size() > 1) { // Skip over the start code. response = ola::rdm::RDMResponse::InflateFromData( frame.data.data() + 1, frame.data.size() - 1, &status_code, request); } return new RDMReply(status_code, response, frames); } RDMReply* RDMReply::DUBReply(const RDMFrame &frame) { RDMFrames frames; frames.push_back(frame); return new RDMReply(ola::rdm::RDM_DUB_RESPONSE, NULL, frames); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/ResponderSettings.cpp0000664000175000017500000000453614376533110015552 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ResponderSettings.cpp * Copyright (C) 2013 Simon Newton */ #include "ola/rdm/ResponderSettings.h" #include #include #include "ola/base/Array.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/RDMCommand.h" #include "ola/strings/Utils.h" namespace ola { namespace rdm { using std::string; BasicSetting::BasicSetting(const ArgType description) : m_description(description) { } unsigned int BasicSetting::GenerateDescriptionResponse(uint8_t index, uint8_t *data) const { description_s *output = reinterpret_cast(data); output->setting = index; strings::CopyToFixedLengthBuffer(m_description, output->description, arraysize(output->description)); return (sizeof(description_s) - MAX_RDM_STRING_LENGTH + std::min(static_cast(MAX_RDM_STRING_LENGTH), m_description.size())); } FrequencyModulationSetting::FrequencyModulationSetting(const ArgType &arg) : m_frequency(arg.frequency), m_description(arg.description) { } unsigned int FrequencyModulationSetting::GenerateDescriptionResponse( uint8_t index, uint8_t *data) const { description_s *output = reinterpret_cast(data); output->setting = index; output->frequency = ola::network::HostToNetwork(m_frequency); strings::CopyToFixedLengthBuffer(m_description, output->description, arraysize(output->description)); return (sizeof(description_s) - MAX_RDM_STRING_LENGTH + m_description.size()); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/StringMessageBuilderTest.cpp0000664000175000017500000002762414376533110017015 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * StringMessageBuilderTest.cpp * Test fixture for the StringMessageBuilder classes * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include "ola/testing/TestUtils.h" #include "ola/Logging.h" #include "ola/messaging/Descriptor.h" #include "ola/messaging/Message.h" #include "ola/messaging/MessagePrinter.h" #include "ola/rdm/StringMessageBuilder.h" using ola::messaging::BoolFieldDescriptor; using ola::messaging::Descriptor; using ola::messaging::FieldDescriptor; using ola::messaging::FieldDescriptorGroup; using ola::messaging::IPV4FieldDescriptor; using ola::messaging::Int16FieldDescriptor; using ola::messaging::Int32FieldDescriptor; using ola::messaging::Int8FieldDescriptor; using ola::messaging::MACFieldDescriptor; using ola::messaging::Message; using ola::messaging::StringFieldDescriptor; using ola::messaging::UInt16FieldDescriptor; using ola::messaging::UInt32FieldDescriptor; using ola::messaging::UInt8FieldDescriptor; using ola::rdm::StringMessageBuilder; using std::auto_ptr; using std::string; using std::vector; class StringBuilderTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(StringBuilderTest); CPPUNIT_TEST(testSimpleBuilder); CPPUNIT_TEST(testBuilderWithLabels); CPPUNIT_TEST(testBuilderWithGroups); CPPUNIT_TEST(testBuilderWithNestedGroups); CPPUNIT_TEST(testBuilderWithVariableNestedGroups); CPPUNIT_TEST(testBoolFailure); CPPUNIT_TEST(testUIntFailure); CPPUNIT_TEST(testIntFailure); CPPUNIT_TEST(testStringFailure); CPPUNIT_TEST_SUITE_END(); public: void testSimpleBuilder(); void testBuilderWithLabels(); void testBuilderWithGroups(); void testBuilderWithNestedGroups(); void testBuilderWithVariableNestedGroups(); void testBoolFailure(); void testUIntFailure(); void testIntFailure(); void testStringFailure(); private: ola::messaging::GenericMessagePrinter m_printer; const Message *BuildMessage(const Descriptor &descriptor, const vector &inputs); }; CPPUNIT_TEST_SUITE_REGISTRATION(StringBuilderTest); /** * Build a message from a given set of inputs and return the string * representation of the message. */ const Message *StringBuilderTest::BuildMessage( const Descriptor &descriptor, const vector &inputs) { StringMessageBuilder builder; const Message *message = builder.GetMessage(inputs, &descriptor); if (!message) OLA_WARN << "Error with field: " << builder.GetError(); return message; } /** * Check the StringBuilder works. */ void StringBuilderTest::testSimpleBuilder() { // build the descriptor vector fields; fields.push_back(new BoolFieldDescriptor("bool1")); fields.push_back(new BoolFieldDescriptor("bool2")); fields.push_back(new BoolFieldDescriptor("bool3")); fields.push_back(new BoolFieldDescriptor("bool4")); fields.push_back(new BoolFieldDescriptor("bool5")); fields.push_back(new BoolFieldDescriptor("bool6")); fields.push_back(new IPV4FieldDescriptor("ip1")); fields.push_back(new MACFieldDescriptor("mac1")); fields.push_back(new UInt8FieldDescriptor("uint8")); fields.push_back(new UInt16FieldDescriptor("uint16")); fields.push_back(new UInt32FieldDescriptor("uint32")); fields.push_back(new Int8FieldDescriptor("int8")); fields.push_back(new Int16FieldDescriptor("int16")); fields.push_back(new Int32FieldDescriptor("int32")); fields.push_back(new StringFieldDescriptor("string", 0, 32)); fields.push_back(new UInt16FieldDescriptor("hex uint16")); Descriptor descriptor("Test Descriptor", fields); // now setup the inputs vector inputs; inputs.push_back("true"); inputs.push_back("false"); inputs.push_back("1"); inputs.push_back("0"); inputs.push_back("TRUE"); inputs.push_back("FALSE"); inputs.push_back("10.0.0.1"); inputs.push_back("01:23:45:67:89:ab"); inputs.push_back("255"); inputs.push_back("300"); inputs.push_back("66000"); inputs.push_back("-128"); inputs.push_back("-300"); inputs.push_back("-66000"); inputs.push_back("foo"); inputs.push_back("0x400"); auto_ptr message(BuildMessage(descriptor, inputs)); // verify OLA_ASSERT_TRUE(message.get()); OLA_ASSERT_EQ(static_cast(fields.size()), message->FieldCount()); string expected = ( "bool1: true\nbool2: false\nbool3: true\nbool4: false\nbool5: true\n" "bool6: false\nip1: 10.0.0.1\nmac1: 01:23:45:67:89:ab\nuint8: 255\n" "uint16: 300\nuint32: 66000\nint8: -128\nint16: -300\nint32: -66000\n" "string: foo\nhex uint16: 1024\n"); OLA_ASSERT_EQ(expected, m_printer.AsString(message.get())); } /** * Check the builder accepts labels */ void StringBuilderTest::testBuilderWithLabels() { // build the descriptor UInt8FieldDescriptor::IntervalVector intervals; UInt8FieldDescriptor::LabeledValues labels; labels["dozen"] = 12; labels["bakers_dozen"] = 13; vector fields; fields.push_back(new UInt8FieldDescriptor("uint8", intervals, labels)); Descriptor descriptor("Test Descriptor", fields); // now setup the inputs vector inputs; inputs.push_back("dozen"); auto_ptr message(BuildMessage(descriptor, inputs)); // verify OLA_ASSERT_NOT_NULL(message.get()); OLA_ASSERT_EQ(static_cast(fields.size()), message->FieldCount()); string expected = "uint8: dozen\n"; OLA_ASSERT_EQ(expected, m_printer.AsString(message.get())); } /** * Check the StringBuilder works with variable sized groups. */ void StringBuilderTest::testBuilderWithGroups() { // build the descriptor vector group_fields; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); vector fields; fields.push_back(new FieldDescriptorGroup("group", group_fields, 0, 3)); Descriptor descriptor("Test Descriptor", fields); // now setup the inputs vector inputs; inputs.push_back("true"); inputs.push_back("10"); auto_ptr message(BuildMessage(descriptor, inputs)); // verify OLA_ASSERT_TRUE(message.get()); OLA_ASSERT_EQ(1u, message->FieldCount()); string expected = ( "group {\n bool: true\n uint8: 10\n}\n"); OLA_ASSERT_EQ(expected, m_printer.AsString(message.get())); // now do multiple groups vector inputs2; inputs2.push_back("true"); inputs2.push_back("10"); inputs2.push_back("true"); inputs2.push_back("42"); inputs2.push_back("false"); inputs2.push_back("240"); auto_ptr message2(BuildMessage(descriptor, inputs2)); // verify OLA_ASSERT_NOT_NULL(message2.get()); OLA_ASSERT_EQ(3u, message2->FieldCount()); string expected2 = ( "group {\n bool: true\n uint8: 10\n}\n" "group {\n bool: true\n uint8: 42\n}\n" "group {\n bool: false\n uint8: 240\n}\n"); OLA_ASSERT_EQ(expected2, m_printer.AsString(message2.get())); // now provide too many inputs inputs2.clear(); inputs2.push_back("true"); inputs2.push_back("10"); inputs2.push_back("true"); inputs2.push_back("42"); inputs2.push_back("false"); inputs2.push_back("240"); inputs2.push_back("false"); inputs2.push_back("53"); OLA_ASSERT_NULL(BuildMessage(descriptor, inputs2)); } /** * test StringBuilder with nested fixed groups */ void StringBuilderTest::testBuilderWithNestedGroups() { vector fields, group_fields, group_fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields2.push_back(new Int16FieldDescriptor("int16")); group_fields2.push_back(new FieldDescriptorGroup("bar", group_fields, 2, 2)); const FieldDescriptorGroup *nested_group = new FieldDescriptorGroup( "", group_fields2, 0, 4); fields.push_back(nested_group); Descriptor descriptor("Test Descriptor", fields); vector inputs; inputs.push_back("1"); inputs.push_back("true"); inputs.push_back("true"); auto_ptr message(BuildMessage(descriptor, inputs)); // verify OLA_ASSERT_NOT_NULL(message.get()); OLA_ASSERT_EQ(1u, message->FieldCount()); string expected = ( " {\n int16: 1\n bar {\n bool: true\n }\n" " bar {\n bool: true\n }\n}\n"); OLA_ASSERT_EQ(expected, m_printer.AsString(message.get())); } /** * test StringBuilder with nested variable groups. */ void StringBuilderTest::testBuilderWithVariableNestedGroups() { vector fields, group_fields, group_fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); group_fields2.push_back(new Int16FieldDescriptor("int16")); group_fields2.push_back(new FieldDescriptorGroup("", group_fields, 0, 2)); const FieldDescriptorGroup *nested_variable_group = new FieldDescriptorGroup( "", group_fields2, 0, 4); fields.push_back(new Int16FieldDescriptor("int16")); fields.push_back(nested_variable_group); Descriptor descriptor("Test Descriptor", fields); vector inputs; OLA_ASSERT_NULL(BuildMessage(descriptor, inputs)); } /** * Test that the bool parsing fails with bad data. */ void StringBuilderTest::testBoolFailure() { vector fields; fields.push_back(new BoolFieldDescriptor("bool1")); Descriptor descriptor("Test Descriptor", fields); // bad string input vector inputs; inputs.push_back("foo"); OLA_ASSERT_FALSE(BuildMessage(descriptor, inputs)); // bad int input vector inputs2; inputs2.push_back("2"); OLA_ASSERT_FALSE(BuildMessage(descriptor, inputs2)); } /** * Test that the int parsing fails with bad data. */ void StringBuilderTest::testUIntFailure() { vector fields; fields.push_back(new UInt8FieldDescriptor("uint8")); Descriptor descriptor("Test Descriptor", fields); // bad uint8 input vector inputs; inputs.push_back("a"); OLA_ASSERT_FALSE(BuildMessage(descriptor, inputs)); vector inputs2; inputs2.push_back("-1"); OLA_ASSERT_FALSE(BuildMessage(descriptor, inputs2)); vector inputs3; inputs3.push_back("256"); OLA_ASSERT_FALSE(BuildMessage(descriptor, inputs3)); } /** * Test that the int parsing fails with bad data. */ void StringBuilderTest::testIntFailure() { vector fields; fields.push_back(new Int8FieldDescriptor("int8")); Descriptor descriptor("Test Descriptor", fields); // bad uint8 input vector inputs; inputs.push_back("a"); OLA_ASSERT_FALSE(BuildMessage(descriptor, inputs)); vector inputs2; inputs2.push_back("-129"); OLA_ASSERT_FALSE(BuildMessage(descriptor, inputs2)); vector inputs3; inputs3.push_back("128"); OLA_ASSERT_FALSE(BuildMessage(descriptor, inputs3)); } /** * Test that the int parsing fails with bad data. */ void StringBuilderTest::testStringFailure() { vector fields; fields.push_back(new StringFieldDescriptor("string", 0, 10)); Descriptor descriptor("Test Descriptor", fields); // bad string input vector inputs; inputs.push_back("this is a very long string"); OLA_ASSERT_FALSE(BuildMessage(descriptor, inputs)); } ola-0.10.9/common/rdm/TestHelper.h0000664000175000017500000000234714376533110013612 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * TestHelper.h * Helper classes for the RDM tests. * Copyright (C) 2015 Simon Newton */ #ifndef COMMON_RDM_TESTHELPER_H_ #define COMMON_RDM_TESTHELPER_H_ #include "ola/network/NetworkUtils.h" #include "ola/rdm/RDMCommand.h" inline uint16_t NackReasonFromResponse(const ola::rdm::RDMResponse *response) { uint16_t reason; memcpy(reinterpret_cast(&reason), response->ParamData(), sizeof(reason)); return ola::network::NetworkToHost(reason); } #endif // COMMON_RDM_TESTHELPER_H_ ola-0.10.9/common/rdm/AckTimerResponder.cpp0000664000175000017500000003162114376533110015444 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * AckTimerResponder.cpp * Copyright (C) 2013 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include "ola/Constants.h" #include "ola/Clock.h" #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/AckTimerResponder.h" #include "ola/rdm/OpenLightingEnums.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/ResponderHelper.h" namespace ola { namespace rdm { using ola::network::HostToNetwork; using ola::network::NetworkToHost; using std::string; using std::vector; AckTimerResponder::RDMOps *AckTimerResponder::RDMOps::instance = NULL; const AckTimerResponder::Personalities * AckTimerResponder::Personalities::Instance() { if (!instance) { PersonalityList personalities; personalities.push_back(Personality(0, "Personality 1")); personalities.push_back(Personality(5, "Personality 2")); personalities.push_back(Personality(10, "Personality 3")); personalities.push_back(Personality(20, "Personality 4")); instance = new Personalities(personalities); } return instance; } AckTimerResponder::Personalities * AckTimerResponder::Personalities::instance = NULL; const ResponderOps::ParamHandler AckTimerResponder::PARAM_HANDLERS[] = { { PID_QUEUED_MESSAGE, &AckTimerResponder::GetQueuedMessage, NULL}, { PID_DEVICE_INFO, &AckTimerResponder::GetDeviceInfo, NULL}, { PID_DEVICE_MODEL_DESCRIPTION, &AckTimerResponder::GetDeviceModelDescription, NULL}, { PID_MANUFACTURER_LABEL, &AckTimerResponder::GetManufacturerLabel, NULL}, { PID_DEVICE_LABEL, &AckTimerResponder::GetDeviceLabel, NULL}, { PID_SOFTWARE_VERSION_LABEL, &AckTimerResponder::GetSoftwareVersionLabel, NULL}, { PID_DMX_PERSONALITY, &AckTimerResponder::GetPersonality, &AckTimerResponder::SetPersonality}, { PID_DMX_PERSONALITY_DESCRIPTION, &AckTimerResponder::GetPersonalityDescription, NULL}, { PID_DMX_START_ADDRESS, &AckTimerResponder::GetDmxStartAddress, &AckTimerResponder::SetDmxStartAddress}, { PID_IDENTIFY_DEVICE, &AckTimerResponder::GetIdentify, &AckTimerResponder::SetIdentify}, { 0, NULL, NULL}, }; /* * This class contains the information required to return a response to Get * QUEUED_MESSAGE. */ class QueuedResponse { public: // Takes ownership of the param data QueuedResponse( const ola::TimeStamp &valid_after, rdm_pid pid, RDMCommand::RDMCommandClass command_class, const uint8_t *param_data, unsigned int param_data_size) : m_valid_after(valid_after), m_pid(pid), m_command_class(command_class), m_param_data(param_data), m_param_data_size(param_data_size) { } ~QueuedResponse() { if (m_param_data) { delete[] m_param_data; } } bool IsValid(const TimeStamp &now) const { return now >= m_valid_after; } rdm_pid Pid() const { return m_pid; } RDMCommand::RDMCommandClass CommandClass() const { return m_command_class; } const uint8_t* ParamData() const { return m_param_data; } unsigned int ParamDataSize() const { return m_param_data_size; } private: ola::TimeStamp m_valid_after; rdm_pid m_pid; RDMCommand::RDMCommandClass m_command_class; const uint8_t *m_param_data; unsigned int m_param_data_size; }; // Use 400ms for the ack timers. const uint16_t AckTimerResponder::ACK_TIMER_MS = 400; /** * New AckTimerResponder */ AckTimerResponder::AckTimerResponder(const UID &uid) : m_uid(uid), m_start_address(1), m_identify_mode(false), m_personality_manager(Personalities::Instance()) { } /** * Clean up */ AckTimerResponder::~AckTimerResponder() { STLDeleteElements(&m_upcoming_queued_messages); while (!m_queued_messages.empty()) { delete m_queued_messages.front(); m_queued_messages.pop(); } } /* * Handle an RDM Request */ void AckTimerResponder::SendRDMRequest(RDMRequest *request, RDMCallback *callback) { // Queue any messages here QueueAnyNewMessages(); OLA_DEBUG << " Queued message count is now " << m_queued_messages.size(); RDMOps::Instance()->HandleRDMRequest(this, m_uid, ROOT_RDM_DEVICE, request, callback); } /** * Get the number of queued messages, capping it at 255 */ uint8_t AckTimerResponder::QueuedMessageCount() const { unsigned int size = m_queued_messages.size(); return size > MAX_QUEUED_MESSAGE_COUNT ? MAX_QUEUED_MESSAGE_COUNT : size; } /** * Move any 'new' queued messages in to the queue. */ void AckTimerResponder::QueueAnyNewMessages() { TimeStamp now; m_clock.CurrentMonotonicTime(&now); PendingResponses::iterator iter = m_upcoming_queued_messages.begin(); while (iter != m_upcoming_queued_messages.end()) { if ((*iter)->IsValid(now)) { m_queued_messages.push(*iter); iter = m_upcoming_queued_messages.erase(iter); } else { ++iter; } } } /** * Build a RDM response from a QueuedResponse */ RDMResponse *AckTimerResponder::ResponseFromQueuedMessage( const RDMRequest *request, const class QueuedResponse *queued_response) { switch (queued_response->CommandClass()) { case RDMCommand::GET_COMMAND_RESPONSE: return new RDMGetResponse( // coverity[SWAPPED_ARGUMENTS] request->DestinationUID(), request->SourceUID(), request->TransactionNumber(), RDM_ACK, QueuedMessageCount(), ROOT_RDM_DEVICE, queued_response->Pid(), queued_response->ParamData(), queued_response->ParamDataSize()); case RDMCommand::SET_COMMAND_RESPONSE: return new RDMSetResponse( // coverity[SWAPPED_ARGUMENTS] request->DestinationUID(), request->SourceUID(), request->TransactionNumber(), RDM_ACK, QueuedMessageCount(), ROOT_RDM_DEVICE, queued_response->Pid(), queued_response->ParamData(), queued_response->ParamDataSize()); default: OLA_WARN << "Queued message returning NULL, CC was " << static_cast(queued_response->CommandClass()); return NULL; } } /** * Return an empty STATUS_MESSAGES response. */ RDMResponse *AckTimerResponder::EmptyStatusMessage( const RDMRequest *request) { return GetResponseWithPid(request, PID_STATUS_MESSAGES, NULL, 0, RDM_ACK, QueuedMessageCount()); } /** * PID_QUEUED_MESSAGE */ RDMResponse *AckTimerResponder::GetQueuedMessage(const RDMRequest *request) { uint8_t status_type; if (!ResponderHelper::ExtractUInt8(request, &status_type)) { return NackWithReason(request, NR_FORMAT_ERROR, QueuedMessageCount()); } if (m_queued_messages.empty()) { // respond with empty status message return EmptyStatusMessage(request); } if (status_type == STATUS_GET_LAST_MESSAGE) { if (m_last_queued_message.get()) { return ResponseFromQueuedMessage(request, m_last_queued_message.get()); } else { return EmptyStatusMessage(request); } } m_last_queued_message.reset(m_queued_messages.front()); m_queued_messages.pop(); RDMResponse *response = ResponseFromQueuedMessage( request, m_last_queued_message.get()); OLA_DEBUG << *response; return response; } /** * PID_DEVICE_INFO */ RDMResponse *AckTimerResponder::GetDeviceInfo(const RDMRequest *request) { return ResponderHelper::GetDeviceInfo( request, OLA_ACK_TIMER_MODEL, PRODUCT_CATEGORY_TEST, 1, &m_personality_manager, m_start_address, 0, 0, QueuedMessageCount()); } /** * PID_DMX_PERSONALITY */ RDMResponse *AckTimerResponder::GetPersonality(const RDMRequest *request) { return ResponderHelper::GetPersonality(request, &m_personality_manager, QueuedMessageCount()); } RDMResponse *AckTimerResponder::SetPersonality(const RDMRequest *request) { return ResponderHelper::SetPersonality(request, &m_personality_manager, m_start_address, QueuedMessageCount()); } /** * PID_DMX_PERSONALITY_DESCRIPTION */ RDMResponse *AckTimerResponder::GetPersonalityDescription( const RDMRequest *request) { return ResponderHelper::GetPersonalityDescription( request, &m_personality_manager, QueuedMessageCount()); } /** * PID_DMX_START_ADDRESS */ RDMResponse *AckTimerResponder::GetDmxStartAddress(const RDMRequest *request) { return ResponderHelper::GetDmxAddress(request, &m_personality_manager, m_start_address, QueuedMessageCount()); } RDMResponse *AckTimerResponder::SetDmxStartAddress(const RDMRequest *request) { uint16_t address; if (!ResponderHelper::ExtractUInt16(request, &address)) { return NackWithReason(request, NR_FORMAT_ERROR, QueuedMessageCount()); } uint16_t end_address = (1 + DMX_UNIVERSE_SIZE - m_personality_manager.ActivePersonalityFootprint()); if (address == 0 || address > end_address) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE, QueuedMessageCount()); } else if (Footprint() == 0) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE, QueuedMessageCount()); } m_start_address = address; TimeStamp valid_after; m_clock.CurrentMonotonicTime(&valid_after); valid_after += TimeInterval(0, ACK_TIMER_MS * 1000); QueuedResponse *our_response = new QueuedResponse( valid_after, PID_DMX_START_ADDRESS, RDMCommand::SET_COMMAND_RESPONSE, NULL, 0); m_upcoming_queued_messages.push_back(our_response); uint16_t ack_time = 1 + ACK_TIMER_MS / 100; ack_time = HostToNetwork(ack_time); return GetResponseFromData(request, reinterpret_cast(&ack_time), sizeof(ack_time), RDM_ACK_TIMER, QueuedMessageCount()); } /** * PID_IDENTIFY_DEVICE */ RDMResponse *AckTimerResponder::GetIdentify(const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_identify_mode, QueuedMessageCount()); } RDMResponse *AckTimerResponder::SetIdentify(const RDMRequest *request) { uint8_t arg; if (!ResponderHelper::ExtractUInt8(request, &arg)) { return NackWithReason(request, NR_FORMAT_ERROR, QueuedMessageCount()); } if (arg != 0 && arg != 1) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE, QueuedMessageCount()); } bool old_value = m_identify_mode; m_identify_mode = arg; if (m_identify_mode != old_value) { OLA_INFO << "Ack Timer Responder" << m_uid << ", identify mode " << (m_identify_mode ? "on" : "off"); } TimeStamp valid_after; m_clock.CurrentMonotonicTime(&valid_after); valid_after += TimeInterval(0, ACK_TIMER_MS * 1000); QueuedResponse *our_response = new QueuedResponse( valid_after, PID_IDENTIFY_DEVICE, RDMCommand::SET_COMMAND_RESPONSE, NULL, 0); m_upcoming_queued_messages.push_back(our_response); uint16_t ack_time = 1 + ACK_TIMER_MS / 100; ack_time = HostToNetwork(ack_time); return GetResponseFromData(request, reinterpret_cast(&ack_time), sizeof(ack_time), RDM_ACK_TIMER, QueuedMessageCount()); } RDMResponse *AckTimerResponder::GetDeviceModelDescription( const RDMRequest *request) { return ResponderHelper::GetString(request, "OLA Ack Timer Responder", QueuedMessageCount()); } RDMResponse *AckTimerResponder::GetManufacturerLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, OLA_MANUFACTURER_LABEL, QueuedMessageCount()); } RDMResponse *AckTimerResponder::GetDeviceLabel(const RDMRequest *request) { return ResponderHelper::GetString(request, "Ack Timer Responder", QueuedMessageCount()); } RDMResponse *AckTimerResponder::GetSoftwareVersionLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, string("OLA Version ") + VERSION, QueuedMessageCount()); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/Pids.proto0000664000175000017500000000561314376533110013345 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Pids.proto * Defines the structure for describing RDM PIDs * Copyright (C) 2010 Simon Newton */ package ola.rdm.pid; enum SubDeviceRange { ROOT_DEVICE = 1; // 0 ROOT_OR_ALL_SUBDEVICE = 2; // 0 - 512 or 0xffff ROOT_OR_SUBDEVICE = 3; // 0 - 512 ONLY_SUBDEVICES = 4; // 1 - 512 } enum FieldType { BOOL = 1; UINT8 = 2; UINT16 = 3; UINT32 = 4; STRING = 5; GROUP = 6; INT8 = 7; INT16 = 8; INT32 = 9; IPV4 = 10; UID = 11; MAC = 12; } // A value which has a label applied message LabeledValue { required int64 value = 1; required string label = 2; } // An allowable range, only used for int fields message Range { // min and max are inclusive required int64 min = 1; required int64 max = 2; } // A field within a frame, this can contain other fields message Field { required FieldType type = 1; required string name = 2; optional uint32 min_size = 3; // used for strings & groups optional uint32 max_size = 4; // used for strings & groups optional sint32 multiplier = 5; // used for ints, these are the exponents repeated LabeledValue label = 6; // values with labels applied repeated Range range = 7; // valid ranges repeated Field field = 8; // for type == GROUP } // Describes the format of a frame message FrameFormat { repeated Field field = 1; } // A definition for a PID message Pid { required string name = 1; // A short name required uint32 value = 2; // The 2 byte PID value optional FrameFormat get_request = 3; optional FrameFormat get_response = 4; optional FrameFormat set_request = 5; optional FrameFormat set_response = 6; optional SubDeviceRange get_sub_device_range = 7; optional SubDeviceRange set_sub_device_range = 8; optional FrameFormat discovery_request = 9; optional FrameFormat discovery_response = 10; optional SubDeviceRange discovery_sub_device_range = 11; } // Groups of Manufacturer PIDs message Manufacturer { required uint32 manufacturer_id = 1; required string manufacturer_name = 2; repeated Pid pid = 3; } // The PID Store, which holds all PIDs message PidStore { repeated Pid pid = 1; repeated Manufacturer manufacturer = 2; required uint64 version = 3; } ola-0.10.9/common/rdm/SubDeviceDispatcher.cpp0000664000175000017500000001134314376533110015742 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SubDeviceDispatcher.cpp * Handles dispatching RDM requests to the correct sub device. * Copyright (C) 2013 Simon Newton */ #include #include #include #include #include "ola/Logging.h" #include "ola/rdm/SubDeviceDispatcher.h" #include "ola/stl/STLUtils.h" namespace ola { namespace rdm { using std::string; using std::vector; /** * Add or remove a sub device. Ownership of the device is not transferred. */ void SubDeviceDispatcher::AddSubDevice(uint16_t sub_device_number, RDMControllerInterface *device) { if (sub_device_number != ROOT_RDM_DEVICE) { STLReplace(&m_subdevices, sub_device_number, device); } else { OLA_WARN << "SubDeviceDispatcher does not accept Root Devices"; } } /* * Handle an RDM Request */ void SubDeviceDispatcher::SendRDMRequest(RDMRequest *request, RDMCallback *callback) { if (request->SubDevice() == ALL_RDM_SUBDEVICES) { FanOutToSubDevices(request, callback); } else { RDMControllerInterface *sub_device = STLFindOrNull( m_subdevices, request->SubDevice()); if (sub_device) { sub_device->SendRDMRequest(request, callback); } else { NackIfNotBroadcast(request, callback, NR_SUB_DEVICE_OUT_OF_RANGE); } } } /** * Handle commands sent to the SUB_DEVICE_ALL_CALL target. */ void SubDeviceDispatcher::FanOutToSubDevices( const RDMRequest *request, RDMCallback *callback) { // GETs to the all subdevices don't make any sense. // Section 9.2.2 if (request->CommandClass() == RDMCommand::GET_COMMAND) { NackIfNotBroadcast(request, callback, NR_SUB_DEVICE_OUT_OF_RANGE); return; } // Fan out to all sub devices but don't include the root device if (m_subdevices.empty()) { RunRDMCallback(callback, RDM_WAS_BROADCAST); } else { SubDeviceMap::iterator iter = m_subdevices.begin(); FanOutTracker *tracker = new FanOutTracker(m_subdevices.size(), callback); for (; iter != m_subdevices.end(); ++iter) { iter->second->SendRDMRequest( request->Duplicate(), NewSingleCallback(this, &SubDeviceDispatcher::HandleSubDeviceResponse, tracker)); } } } /** * Respond with a NACK, or RDM_WAS_BROADCAST. * Takes ownership of the request object. */ void SubDeviceDispatcher::NackIfNotBroadcast( const RDMRequest *request_ptr, RDMCallback *callback, rdm_nack_reason nack_reason) { std::auto_ptr request(request_ptr); if (request->DestinationUID().IsBroadcast()) { RunRDMCallback(callback, RDM_WAS_BROADCAST); } else { RDMReply reply(RDM_COMPLETED_OK, NackWithReason(request.get(), nack_reason)); callback->Run(&reply); } } /** * Called when a subdevice returns during a ALL_RDM_SUBDEVICES call. */ void SubDeviceDispatcher::HandleSubDeviceResponse(FanOutTracker *tracker, RDMReply *reply) { if (tracker->NumResponses() == 0) { tracker->SetResponse(reply->StatusCode(), reply->Response()->Duplicate()); } if (tracker->IncrementAndCheckIfComplete()) { // now it's not really clear what we're supposed to return here. // We do the least crazy thing, which is to return the root device response. tracker->RunCallback(); delete tracker; } } SubDeviceDispatcher::FanOutTracker::FanOutTracker( uint16_t number_of_subdevices, RDMCallback *callback) : m_number_of_subdevices(number_of_subdevices), m_responses_so_far(0), m_callback(callback), m_status_code(RDM_COMPLETED_OK), m_response(NULL) { } void SubDeviceDispatcher::FanOutTracker::SetResponse( RDMStatusCode code, RDMResponse *response) { m_status_code = code; m_response = response; } void SubDeviceDispatcher::FanOutTracker::RunCallback() { if (m_callback) { RDMReply reply(m_status_code, m_response); m_callback->Run(&reply); } m_callback = NULL; } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/RDMReplyTest.cpp0000664000175000017500000001602414376533110014361 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMReplyTest.cpp * Test fixture for the RDMReply. * Copyright (C) 2015 Simon Newton */ #include #include #include "ola/base/Array.h" #include "ola/io/ByteString.h" #include "ola/rdm/RDMFrame.h" #include "ola/rdm/RDMReply.h" #include "ola/rdm/RDMResponseCodes.h" #include "ola/rdm/UID.h" #include "ola/testing/TestUtils.h" using ola::io::ByteString; using ola::rdm::RDMFrame; using ola::rdm::RDMFrames; using ola::rdm::RDMGetResponse; using ola::rdm::RDMReply; using ola::rdm::RDMResponse; using ola::rdm::UID; using std::auto_ptr; class RDMReplyTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RDMReplyTest); CPPUNIT_TEST(testReplyFromCode); CPPUNIT_TEST(testReplyWithResponse); CPPUNIT_TEST(testReplyWithFrames); CPPUNIT_TEST(testFromFrameHelper); CPPUNIT_TEST(testDUBHelper); CPPUNIT_TEST_SUITE_END(); public: RDMReplyTest() : m_source(1, 2), m_destination(3, 4) { } void testReplyFromCode(); void testReplyWithResponse(); void testReplyWithFrames(); void testFromFrameHelper(); void testDUBHelper(); private: UID m_source; UID m_destination; }; CPPUNIT_TEST_SUITE_REGISTRATION(RDMReplyTest); void RDMReplyTest::testReplyFromCode() { RDMReply reply(ola::rdm::RDM_WAS_BROADCAST); OLA_ASSERT_EQ(ola::rdm::RDM_WAS_BROADCAST, reply.StatusCode()); OLA_ASSERT_NULL(reply.Response()); OLA_ASSERT_NULL(reply.MutableResponse()); OLA_ASSERT_TRUE(reply.Frames().empty()); } void RDMReplyTest::testReplyWithResponse() { RDMResponse *response = new RDMGetResponse(m_source, m_destination, 0, // transaction # 0, // response type 0, // message count 10, // sub device 100, // param id NULL, // data 0); // Ownership is transferred. RDMReply reply(ola::rdm::RDM_COMPLETED_OK, response); OLA_ASSERT_EQ(ola::rdm::RDM_COMPLETED_OK, reply.StatusCode()); OLA_ASSERT_EQ(static_cast(response), reply.Response()); OLA_ASSERT_EQ(response, reply.MutableResponse()); OLA_ASSERT_TRUE(reply.Frames().empty()); } void RDMReplyTest::testReplyWithFrames() { const uint8_t response_data[] = { 0xcc, 1, 28, // start code, sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 0, 1, 0, 0, 10, // transaction, port id, msg count & sub device 0x21, 1, 40, 4, // command, param id, param data length 0x5a, 0x5a, 0x5a, 0x5a, // param data 0, 0 // checksum, anoything is fine. }; RDMFrame frame(response_data, arraysize(response_data)); frame.timing.response_time = 10000; frame.timing.mark_time = 32000; frame.timing.break_time = 8000; frame.timing.data_time = 45000; RDMFrames frames; frames.push_back(frame); RDMResponse *response = new RDMGetResponse(m_source, m_destination, 0, // transaction # 0, // response type 0, // message count 10, // sub device 100, // param id NULL, // data 0); RDMReply reply(ola::rdm::RDM_COMPLETED_OK, response, frames); OLA_ASSERT_EQ(ola::rdm::RDM_COMPLETED_OK, reply.StatusCode()); OLA_ASSERT_EQ(static_cast(response), reply.Response()); OLA_ASSERT_EQ(response, reply.MutableResponse()); OLA_ASSERT_EQ(static_cast(1), reply.Frames().size()); OLA_ASSERT_TRUE(frame == reply.Frames()[0]); } void RDMReplyTest::testFromFrameHelper() { const uint8_t response_data[] = { 0xcc, 1, 28, // start code, sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 0, 1, 0, 0, 10, // transaction, port id, msg count & sub device 0x21, 1, 40, 4, // command, param id, param data length 0x5a, 0x5a, 0x5a, 0x5a, // param data 2, 0xb4 // checksum, anoything is fine. }; RDMFrame frame(response_data, arraysize(response_data)); frame.timing.response_time = 10000; frame.timing.mark_time = 32000; frame.timing.break_time = 8000; frame.timing.data_time = 45000; auto_ptr reply(RDMReply::FromFrame(frame)); OLA_ASSERT_NOT_NULL(reply.get()); OLA_ASSERT_EQ(ola::rdm::RDM_COMPLETED_OK, reply->StatusCode()); OLA_ASSERT_NOT_NULL(reply->Response()); OLA_ASSERT_NOT_NULL(reply->MutableResponse()); OLA_ASSERT_EQ(static_cast(1), reply->Frames().size()); OLA_ASSERT_TRUE(frame == reply->Frames()[0]); const RDMResponse *response = reply->Response(); OLA_ASSERT_EQ(ola::rdm::SUB_START_CODE, response->SubStartCode()); OLA_ASSERT_EQ((uint8_t) 28, response->MessageLength()); OLA_ASSERT_EQ(m_source, response->SourceUID()); OLA_ASSERT_EQ(m_destination, response->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, response->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 1, response->PortIdResponseType()); OLA_ASSERT_EQ((uint8_t) 0, response->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, response->SubDevice()); OLA_ASSERT_EQ(ola::rdm::RDMCommand::GET_COMMAND_RESPONSE, response->CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, response->ParamId()); OLA_ASSERT_NOT_NULL(response->ParamData()); OLA_ASSERT_EQ(4u, response->ParamDataSize()); } void RDMReplyTest::testDUBHelper() { const uint8_t data[] = {1, 2, 3, 4}; RDMFrame frame(data, arraysize(data)); frame.timing.response_time = 10000; frame.timing.data_time = 45000; auto_ptr reply(RDMReply::DUBReply(frame)); OLA_ASSERT_NOT_NULL(reply.get()); OLA_ASSERT_EQ(ola::rdm::RDM_DUB_RESPONSE, reply->StatusCode()); OLA_ASSERT_NULL(reply->Response()); OLA_ASSERT_NULL(reply->MutableResponse()); OLA_ASSERT_EQ(static_cast(1), reply->Frames().size()); OLA_ASSERT_TRUE(frame == reply->Frames()[0]); OLA_ASSERT_EQ(10000u, reply->Frames()[0].timing.response_time); OLA_ASSERT_EQ(45000u, reply->Frames()[0].timing.data_time); } ola-0.10.9/common/rdm/MessageSerializer.cpp0000664000175000017500000001214614376533110015502 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MessageSerializer.cpp * Prints the test representation of a Message. * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include namespace ola { namespace rdm { MessageSerializer::MessageSerializer(unsigned int initial_size) : m_data(NULL), m_offset(0), m_buffer_size(0), m_initial_buffer_size(initial_size) { } MessageSerializer::~MessageSerializer() { if (m_data) { delete[] m_data; } } /** * Serialize a message and return a pointer to the message in memory */ const uint8_t *MessageSerializer::SerializeMessage( const ola::messaging::Message *message, unsigned int *length) { if (!m_data) { m_buffer_size = m_initial_buffer_size; m_data = new uint8_t[m_buffer_size]; } m_offset = 0; message->Accept(this); *length = m_offset; return m_data; } void MessageSerializer::Visit( const ola::messaging::BoolMessageField *message) { CheckForFreeSpace(message->GetDescriptor()->MaxSize()); m_data[m_offset++] = message->Value(); } void MessageSerializer::Visit( const ola::messaging::IPV4MessageField *message) { CheckForFreeSpace(message->GetDescriptor()->MaxSize()); uint32_t data = message->Value().AsInt(); memcpy(m_data + m_offset, reinterpret_cast(&data), sizeof(data)); m_offset += sizeof(data); } void MessageSerializer::Visit( const ola::messaging::MACMessageField *message) { unsigned int size = message->GetDescriptor()->MaxSize(); CheckForFreeSpace(size); message->Value().Pack(m_data + m_offset, size); m_offset += size; } void MessageSerializer::Visit( const ola::messaging::UIDMessageField *message) { unsigned int size = message->GetDescriptor()->MaxSize(); CheckForFreeSpace(size); message->Value().Pack(m_data + m_offset, size); m_offset += size; } void MessageSerializer::Visit( const ola::messaging::StringMessageField *message) { unsigned int size = std::min( static_cast(message->Value().size()), message->GetDescriptor()->MaxSize()); unsigned int used_size = std::max( size, message->GetDescriptor()->MinSize()); CheckForFreeSpace(size); memcpy(m_data + m_offset, message->Value().c_str(), size); memset(m_data + m_offset + size, 0, used_size - size); m_offset += used_size; } void MessageSerializer::Visit( const ola::messaging::BasicMessageField *message) { IntVisit(message); } void MessageSerializer::Visit( const ola::messaging::BasicMessageField *message) { IntVisit(message); } void MessageSerializer::Visit( const ola::messaging::BasicMessageField *message) { IntVisit(message); } void MessageSerializer::Visit( const ola::messaging::BasicMessageField *message) { IntVisit(message); } void MessageSerializer::Visit( const ola::messaging::BasicMessageField *message) { IntVisit(message); } void MessageSerializer::Visit( const ola::messaging::BasicMessageField *message) { IntVisit(message); } void MessageSerializer::Visit( const ola::messaging::GroupMessageField *message) { (void) message; } void MessageSerializer::PostVisit( const ola::messaging::GroupMessageField *message) { (void) message; } /** * Check that there is at least required_size bytes of space left, if not * expand the memory so the new data can fit. */ void MessageSerializer::CheckForFreeSpace(unsigned int required_size) { if (m_buffer_size - m_offset > required_size) { return; } uint8_t *old_buffer = m_data; m_data = new uint8_t[2 * m_buffer_size]; memcpy(m_data, old_buffer, m_offset); delete[] old_buffer; } /** * Serialize an integer value, converting to little endian if needed */ template void MessageSerializer::IntVisit( const ola::messaging::BasicMessageField *message) { CheckForFreeSpace(sizeof(int_type)); int_type value; if (message->GetDescriptor()->IsLittleEndian()) { value = ola::network::HostToLittleEndian( static_cast(message->Value())); } else { value = ola::network::HostToNetwork( static_cast(message->Value())); } uint8_t *ptr = reinterpret_cast(&value); memcpy(m_data + m_offset, ptr, sizeof(int_type)); m_offset += sizeof(int_type); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/PidStoreLoader.h0000664000175000017500000001111114376533110014400 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PidStoreLoader.h * This class does the heavy lifting for loading the PidStore from a protobuf. * It's separate so that PidStore.h doesn't have to include the Pids.pb.h * header. * Copyright (C) 2011 Simon Newton */ #ifndef COMMON_RDM_PIDSTORELOADER_H_ #define COMMON_RDM_PIDSTORELOADER_H_ #include #include #include #include #include #include #include "common/rdm/DescriptorConsistencyChecker.h" #include "common/rdm/Pids.pb.h" namespace ola { namespace rdm { /** * The PidStore Loader */ class PidStoreLoader { public: PidStoreLoader() {} /** * @brief Load PID information from a file. * @param file the path to the file to load * @param validate set to true if we should perform validation of the * contents. * @returns A pointer to a new RootPidStore or NULL if loading failed. */ const RootPidStore *LoadFromFile(const std::string &file, bool validate = true); /** * @brief Load PID information from a directory, including overrides. * @param directory the directory to load files from. * @param validate set to true if we should perform validation of the * contents. * @returns A pointer to a new RootPidStore or NULL if loading failed. * * This is an all-or-nothing load. Any error with cause us to abort the load. */ const RootPidStore *LoadFromDirectory(const std::string &directory, bool validate = true); /** * @brief Load Pid information from a stream * @param data the input stream. * @param validate set to true if we should perform validation of the * contents. * @returns A pointer to a new RootPidStore or NULL if loading failed. */ const RootPidStore *LoadFromStream(std::istream *data, bool validate = true); private: typedef std::map PidMap; typedef std::map ManufacturerMap; DescriptorConsistencyChecker m_checker; bool ReadFile(const std::string &file_path, ola::rdm::pid::PidStore *proto); const RootPidStore *BuildStore(const ola::rdm::pid::PidStore &store_pb, const ola::rdm::pid::PidStore &override_pb, bool validate); bool LoadFromProto(ManufacturerMap *pid_data, const ola::rdm::pid::PidStore &proto, bool validate); template bool GetPidList(PidMap *pid_map, const pb_object &store, bool validate, bool limit_pid_values); PidDescriptor *PidToDescriptor(const ola::rdm::pid::Pid &pid, bool validate); const ola::messaging::Descriptor* FrameFormatToDescriptor( const ola::rdm::pid::FrameFormat &format, bool validate); const ola::messaging::FieldDescriptor *FieldToFieldDescriptor( const ola::rdm::pid::Field &field); template const ola::messaging::FieldDescriptor *IntegerFieldToFieldDescriptor( const ola::rdm::pid::Field &field); const ola::messaging::FieldDescriptor *StringFieldToFieldDescriptor( const ola::rdm::pid::Field &field); const ola::messaging::FieldDescriptor *GroupFieldToFieldDescriptor( const ola::rdm::pid::Field &field); PidDescriptor::sub_device_validator ConvertSubDeviceValidator( const ola::rdm::pid::SubDeviceRange &sub_device_range); void FreeManufacturerMap(ManufacturerMap *data); static const char OVERRIDE_FILE_NAME[]; static const uint16_t ESTA_MANUFACTURER_ID; static const uint16_t MANUFACTURER_PID_MIN; static const uint16_t MANUFACTURER_PID_MAX; DISALLOW_COPY_AND_ASSIGN(PidStoreLoader); }; } // namespace rdm } // namespace ola #endif // COMMON_RDM_PIDSTORELOADER_H_ ola-0.10.9/common/rdm/RDMCommand.cpp0000664000175000017500000006365314376533110014016 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMCommand.cpp * The RDMCommand class * Copyright (C) 2010 Simon Newton */ /** * @addtogroup rdm_command * @{ * @file RDMCommand.cpp * @} */ #include #include #include "ola/Logging.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/UID.h" #include "ola/strings/Format.h" #include "ola/util/Utils.h" namespace ola { namespace rdm { using std::string; using ola::strings::ToHex; using ola::utils::JoinUInt8; using ola::utils::SplitUInt16; // Internal Helper Functions namespace { /** * @brief Guess the CommandClass of an RDM message. * @param data a pointer to the RDM message (excluding the start code) * @param length length of the RDM data * @returns A RDMCommandClass value, which is set to INVALID_COMMAND if we * couldn't determine the message type. * * This doesn't perform any data checking (that's left to the Inflate* methods). */ RDMCommand::RDMCommandClass GuessMessageType(const uint8_t *data, unsigned int length) { static const unsigned int COMMAND_CLASS_OFFSET = 19; if (!data || length < COMMAND_CLASS_OFFSET + 1) { return RDMCommand::INVALID_COMMAND; } switch (data[COMMAND_CLASS_OFFSET]) { case RDMCommand::GET_COMMAND: case RDMCommand::GET_COMMAND_RESPONSE: case RDMCommand::SET_COMMAND: case RDMCommand::SET_COMMAND_RESPONSE: case RDMCommand::DISCOVER_COMMAND: case RDMCommand::DISCOVER_COMMAND_RESPONSE: return static_cast( data[COMMAND_CLASS_OFFSET]); default: return RDMCommand::INVALID_COMMAND; } } } // namespace /** * @addtogroup rdm_command * @{ */ RDMCommand::RDMCommand(const UID &source, const UID &destination, uint8_t transaction_number, uint8_t port_id, uint8_t message_count, uint16_t sub_device, uint16_t param_id, const uint8_t *data, unsigned int length): m_port_id(port_id), m_source(source), m_destination(destination), m_transaction_number(transaction_number), m_message_count(message_count), m_sub_device(sub_device), m_param_id(param_id), m_data(NULL), m_data_length(length) { SetParamData(data, length); } RDMCommand::~RDMCommand() { if (m_data) { delete[] m_data; } } string RDMCommand::ToString() const { std::ostringstream str; str << m_source << " -> " << m_destination << ", Trans # " << static_cast(m_transaction_number) << ", Port ID " << static_cast(m_port_id) << ", Msg Cnt " << static_cast(m_message_count) << ", SubDevice " << m_sub_device << ", Cmd Class " << CommandClass() << ", Param ID " << m_param_id << ", Data Len " << m_data_length; str << ", Data "; for (unsigned int i = 0 ; i < m_data_length; i++) { str << std::hex << std::setw(2) << static_cast(m_data[i]) << " "; } return str.str(); } bool RDMCommand::operator==(const RDMCommand &other) const { if (SourceUID() == other.SourceUID() && DestinationUID() == other.DestinationUID() && TransactionNumber() == other.TransactionNumber() && MessageCount() == other.MessageCount() && SubDevice() == other.SubDevice() && CommandClass() == other.CommandClass() && ParamId() == other.ParamId() && ParamDataSize() == other.ParamDataSize()) { return 0 == memcmp(ParamData(), other.ParamData(), ParamDataSize()); } return false; } RDMCommand *RDMCommand::Inflate(const uint8_t *data, unsigned int length) { RDMCommandClass command_class = GuessMessageType(data, length); RDMStatusCode status_code = RDM_COMPLETED_OK; switch (command_class) { case RDMCommand::GET_COMMAND: case RDMCommand::SET_COMMAND: return RDMRequest::InflateFromData(data, length); case RDMCommand::GET_COMMAND_RESPONSE: case RDMCommand::SET_COMMAND_RESPONSE: return RDMResponse::InflateFromData(data, length, &status_code); case RDMCommand::DISCOVER_COMMAND: return RDMDiscoveryRequest::InflateFromData(data, length); case RDMCommand::DISCOVER_COMMAND_RESPONSE: return RDMDiscoveryResponse::InflateFromData(data, length); case RDMCommand::INVALID_COMMAND: return NULL; } return NULL; } uint8_t RDMCommand::MessageLength() const { // The size of packet including start code, excluding checksum return sizeof(RDMCommandHeader) + m_data_length + 1; } /** * Set the parameter data */ void RDMCommand::SetParamData(const uint8_t *data, unsigned int length) { m_data_length = length; if (m_data_length > 0 && data != NULL) { if (m_data) delete[] m_data; m_data = new uint8_t[m_data_length]; memcpy(m_data, data, m_data_length); } } /* * Convert a block of RDM data to an RDMCommand object. * The data must not include the RDM start code. * @param data the raw RDM data, starting from the sub-start-code * @param length the length of the data * @param command_header the RDMCommandHeader struct to copy the data to * @return a RDMStatusCode */ RDMStatusCode RDMCommand::VerifyData(const uint8_t *data, size_t length, RDMCommandHeader *command_header) { if (length < sizeof(RDMCommandHeader)) { OLA_WARN << "RDM message is too small, needs to be at least " << sizeof(RDMCommandHeader) << ", was " << length; return RDM_PACKET_TOO_SHORT; } if (!data) { OLA_WARN << "RDM data was null"; return RDM_INVALID_RESPONSE; } memcpy(reinterpret_cast(command_header), data, sizeof(*command_header)); if (command_header->sub_start_code != SUB_START_CODE) { OLA_WARN << "Sub start code mis match, was 0x" << std::hex << static_cast(command_header->sub_start_code) << ", required 0x" << static_cast(SUB_START_CODE); return RDM_WRONG_SUB_START_CODE; } unsigned int message_length = command_header->message_length; if (length < message_length + 1) { OLA_WARN << "RDM message is too small, needs to be " << message_length + 1 << ", was " << length; return RDM_PACKET_LENGTH_MISMATCH; } uint16_t checksum = CalculateChecksum(data, message_length - 1); uint16_t actual_checksum = (data[message_length - 1] << 8) + data[message_length]; if (actual_checksum != checksum) { OLA_WARN << "RDM checksum mismatch, was " << actual_checksum << " but was supposed to be " << checksum; return RDM_CHECKSUM_INCORRECT; } // check param length is valid here unsigned int block_size = length - sizeof(RDMCommandHeader) - 2; if (command_header->param_data_length > block_size) { OLA_WARN << "Param length " << static_cast(command_header->param_data_length) << " exceeds remaining RDM message size of " << block_size; return RDM_PARAM_LENGTH_MISMATCH; } return RDM_COMPLETED_OK; } /* * Calculate the checksum of this packet */ uint16_t RDMCommand::CalculateChecksum(const uint8_t *data, unsigned int packet_length) { unsigned int checksum_value = START_CODE; for (unsigned int i = 0; i < packet_length; i++) checksum_value += data[i]; return static_cast(checksum_value); } /* * Convert the Command Class int to an enum */ RDMCommand::RDMCommandClass RDMCommand::ConvertCommandClass( uint8_t command_class) { switch (command_class) { case DISCOVER_COMMAND: return DISCOVER_COMMAND; case DISCOVER_COMMAND_RESPONSE: return DISCOVER_COMMAND_RESPONSE; case GET_COMMAND: return GET_COMMAND; case GET_COMMAND_RESPONSE: return GET_COMMAND_RESPONSE; case SET_COMMAND: return SET_COMMAND; case SET_COMMAND_RESPONSE: return SET_COMMAND_RESPONSE; default: return INVALID_COMMAND; } } RDMRequest::RDMRequest(const UID &source, const UID &destination, uint8_t transaction_number, uint8_t port_id, uint16_t sub_device, RDMCommandClass command_class, uint16_t param_id, const uint8_t *data, unsigned int length, const OverrideOptions &options) : RDMCommand(source, destination, transaction_number, port_id, options.message_count, sub_device, param_id, data, length), m_override_options(options), m_command_class(command_class) { } bool RDMRequest::IsDUB() const { return (CommandClass() == ola::rdm::RDMCommand::DISCOVER_COMMAND && ParamId() == ola::rdm::PID_DISC_UNIQUE_BRANCH); } uint8_t RDMRequest::SubStartCode() const { return m_override_options.sub_start_code; } uint8_t RDMRequest::MessageLength() const { if (m_override_options.has_message_length) { return m_override_options.message_length; } else { return RDMCommand::MessageLength(); } } uint16_t RDMRequest::Checksum(uint16_t checksum) const { return m_override_options.has_checksum ? m_override_options.checksum : checksum; } RDMRequest* RDMRequest::InflateFromData(const uint8_t *data, unsigned int length) { RDMCommandHeader command_message; RDMStatusCode status_code = VerifyData(data, length, &command_message); if (status_code != RDM_COMPLETED_OK) { return NULL; } uint16_t sub_device = JoinUInt8(command_message.sub_device[0], command_message.sub_device[1]); uint16_t param_id = JoinUInt8(command_message.param_id[0], command_message.param_id[1]); RDMCommandClass command_class = ConvertCommandClass( command_message.command_class); OverrideOptions options; options.sub_start_code = command_message.sub_start_code; options.message_length = command_message.message_length; options.message_count = command_message.message_count; switch (command_class) { case DISCOVER_COMMAND: return new RDMDiscoveryRequest( UID(command_message.source_uid), UID(command_message.destination_uid), command_message.transaction_number, // transaction # command_message.port_id, // port id sub_device, param_id, data + sizeof(RDMCommandHeader), command_message.param_data_length, // data length options); case GET_COMMAND: return new RDMGetRequest( UID(command_message.source_uid), UID(command_message.destination_uid), command_message.transaction_number, // transaction # command_message.port_id, // port id sub_device, param_id, data + sizeof(RDMCommandHeader), command_message.param_data_length, // data length options); case SET_COMMAND: return new RDMSetRequest( UID(command_message.source_uid), UID(command_message.destination_uid), command_message.transaction_number, // transaction # command_message.port_id, // port id sub_device, param_id, data + sizeof(RDMCommandHeader), command_message.param_data_length, // data length options); default: OLA_WARN << "Expected a RDM request command but got " << command_class; return NULL; } } RDMResponse* RDMResponse::InflateFromData(const uint8_t *data, size_t length, RDMStatusCode *status_code, const RDMRequest *request) { RDMCommandHeader command_message; *status_code = VerifyData(data, length, &command_message); if (*status_code != RDM_COMPLETED_OK) { return NULL; } UID source_uid(command_message.source_uid); UID destination_uid(command_message.destination_uid); uint16_t sub_device = ((command_message.sub_device[0] << 8) + command_message.sub_device[1]); RDMCommandClass command_class = ConvertCommandClass( command_message.command_class); if (request) { // check dest uid if (request->SourceUID() != destination_uid) { OLA_WARN << "The destination UID in the response doesn't match, got " << destination_uid << ", expected " << request->SourceUID(); *status_code = RDM_DEST_UID_MISMATCH; return NULL; } // check src uid if (request->DestinationUID() != source_uid) { OLA_WARN << "The source UID in the response doesn't match, got " << source_uid << ", expected " << request->DestinationUID(); *status_code = RDM_SRC_UID_MISMATCH; return NULL; } // check transaction # if (command_message.transaction_number != request->TransactionNumber()) { OLA_WARN << "Transaction numbers don't match, got " << static_cast(command_message.transaction_number) << ", expected " << static_cast(request->TransactionNumber()); *status_code = RDM_TRANSACTION_MISMATCH; return NULL; } // check subdevice, but ignore if request was for all sub devices or // QUEUED_MESSAGE if (sub_device != request->SubDevice() && request->SubDevice() != ALL_RDM_SUBDEVICES && request->ParamId() != PID_QUEUED_MESSAGE) { OLA_WARN << "Sub device didn't match, got " << sub_device << ", expected " << request->SubDevice(); *status_code = RDM_SUB_DEVICE_MISMATCH; return NULL; } // check command class if (request->CommandClass() == GET_COMMAND && command_class != GET_COMMAND_RESPONSE && request->ParamId() != PID_QUEUED_MESSAGE) { OLA_WARN << "Expected GET_COMMAND_RESPONSE, got " << ToHex(command_class); *status_code = RDM_COMMAND_CLASS_MISMATCH; return NULL; } if (request->CommandClass() == SET_COMMAND && command_class != SET_COMMAND_RESPONSE) { OLA_WARN << "Expected SET_COMMAND_RESPONSE, got " << ToHex(command_class); *status_code = RDM_COMMAND_CLASS_MISMATCH; return NULL; } if (request->CommandClass() == DISCOVER_COMMAND && command_class != DISCOVER_COMMAND_RESPONSE) { OLA_WARN << "Expected DISCOVER_COMMAND_RESPONSE, got " << ToHex(command_class); *status_code = RDM_COMMAND_CLASS_MISMATCH; return NULL; } } // check response type if (command_message.port_id > ACK_OVERFLOW) { OLA_WARN << "Response type isn't valid, got " << static_cast(command_message.port_id); *status_code = RDM_INVALID_RESPONSE_TYPE; return NULL; } uint16_t param_id = JoinUInt8(command_message.param_id[0], command_message.param_id[1]); uint8_t return_transaction_number = command_message.transaction_number; switch (command_class) { case DISCOVER_COMMAND_RESPONSE: *status_code = RDM_COMPLETED_OK; return new RDMDiscoveryResponse( source_uid, destination_uid, return_transaction_number, // transaction # command_message.port_id, // port id command_message.message_count, // message count sub_device, param_id, data + sizeof(RDMCommandHeader), command_message.param_data_length); // data length case GET_COMMAND_RESPONSE: *status_code = RDM_COMPLETED_OK; return new RDMGetResponse( source_uid, destination_uid, return_transaction_number, // transaction # command_message.port_id, // port id command_message.message_count, // message count sub_device, param_id, data + sizeof(RDMCommandHeader), command_message.param_data_length); // data length case SET_COMMAND_RESPONSE: *status_code = RDM_COMPLETED_OK; return new RDMSetResponse( source_uid, destination_uid, return_transaction_number, // transaction # command_message.port_id, // port id command_message.message_count, // message count sub_device, param_id, data + sizeof(RDMCommandHeader), command_message.param_data_length); // data length default: OLA_WARN << "Command class isn't valid, got " << ToHex(command_class); *status_code = RDM_INVALID_COMMAND_CLASS; return NULL; } } RDMResponse* RDMResponse::CombineResponses(const RDMResponse *response1, const RDMResponse *response2) { unsigned int combined_length = response1->ParamDataSize() + response2->ParamDataSize(); // do some sort of checking if (combined_length > MAX_OVERFLOW_SIZE) { OLA_WARN << "ACK_OVERFLOW buffer size hit! Limit is " << MAX_OVERFLOW_SIZE << ", request size is " << combined_length; return NULL; } else if (response1->SourceUID() != response2->SourceUID()) { OLA_WARN << "Source UIDs don't match"; return NULL; } uint8_t *combined_data = new uint8_t[combined_length]; memcpy(combined_data, response1->ParamData(), response1->ParamDataSize()); memcpy(combined_data + response1->ParamDataSize(), response2->ParamData(), response2->ParamDataSize()); RDMResponse *response = NULL; if (response1->CommandClass() == GET_COMMAND_RESPONSE && response2->CommandClass() == GET_COMMAND_RESPONSE) { response = new RDMGetResponse( response1->SourceUID(), response1->DestinationUID(), response1->TransactionNumber(), RDM_ACK, response2->MessageCount(), response1->SubDevice(), response1->ParamId(), combined_data, combined_length); } else if (response1->CommandClass() == SET_COMMAND_RESPONSE && response2->CommandClass() == SET_COMMAND_RESPONSE) { response = new RDMSetResponse( response1->SourceUID(), response1->DestinationUID(), response1->TransactionNumber(), RDM_ACK, response2->MessageCount(), response1->SubDevice(), response1->ParamId(), combined_data, combined_length); } else { OLA_WARN << "Expected a RDM request command but got " << std::hex << response1->CommandClass(); } delete[] combined_data; return response; } // Helper functions follow RDMResponse *NackWithReason(const RDMRequest *request, rdm_nack_reason reason_enum, uint8_t outstanding_messages) { uint16_t reason = ola::network::HostToNetwork( static_cast(reason_enum)); return GetResponseFromData(request, reinterpret_cast(&reason), sizeof(reason), RDM_NACK_REASON, outstanding_messages); } RDMResponse *GetResponseFromData(const RDMRequest *request, const uint8_t *data, unsigned int length, rdm_response_type type, uint8_t outstanding_messages) { // We can reuse GetResponseWithPid return GetResponseWithPid(request, request->ParamId(), data, length, type, outstanding_messages); } RDMResponse *GetResponseWithPid(const RDMRequest *request, uint16_t pid, const uint8_t *data, unsigned int length, uint8_t type, uint8_t outstanding_messages) { switch (request->CommandClass()) { case RDMCommand::GET_COMMAND: // coverity[SWAPPED_ARGUMENTS] return new RDMGetResponse( request->DestinationUID(), request->SourceUID(), request->TransactionNumber(), type, outstanding_messages, request->SubDevice(), pid, data, length); case RDMCommand::SET_COMMAND: // coverity[SWAPPED_ARGUMENTS] return new RDMSetResponse( request->DestinationUID(), request->SourceUID(), request->TransactionNumber(), type, outstanding_messages, request->SubDevice(), pid, data, length); case RDMCommand::DISCOVER_COMMAND: // coverity[SWAPPED_ARGUMENTS] return new RDMDiscoveryResponse( request->DestinationUID(), request->SourceUID(), request->TransactionNumber(), type, outstanding_messages, request->SubDevice(), pid, data, length); default: return NULL; } } /** * @brief Inflate a discovery request. */ RDMDiscoveryRequest* RDMDiscoveryRequest::InflateFromData( const uint8_t *data, unsigned int length) { RDMCommandHeader command_message; RDMStatusCode code = VerifyData(data, length, &command_message); if (code != RDM_COMPLETED_OK) { return NULL; } uint16_t sub_device = JoinUInt8(command_message.sub_device[0], command_message.sub_device[1]); uint16_t param_id = JoinUInt8(command_message.param_id[0], command_message.param_id[1]); RDMCommandClass command_class = ConvertCommandClass( command_message.command_class); OverrideOptions options; options.sub_start_code = command_message.sub_start_code; options.message_length = command_message.message_length; options.message_count = command_message.message_count; if (command_class == DISCOVER_COMMAND) { return new RDMDiscoveryRequest( UID(command_message.source_uid), UID(command_message.destination_uid), command_message.transaction_number, // transaction # command_message.port_id, // port id sub_device, param_id, data + sizeof(RDMCommandHeader), command_message.param_data_length, // data length options); } else { OLA_WARN << "Expected a RDM discovery request but got " << command_class; return NULL; } } /* * Create a new DUB request object. */ RDMDiscoveryRequest *NewDiscoveryUniqueBranchRequest( const UID &source, const UID &lower, const UID &upper, uint8_t transaction_number, uint8_t port_id) { uint8_t param_data[UID::UID_SIZE * 2]; unsigned int length = sizeof(param_data); lower.Pack(param_data, length); upper.Pack(param_data + UID::UID_SIZE, length - UID::UID_SIZE); return new RDMDiscoveryRequest(source, UID::AllDevices(), transaction_number, port_id, ROOT_RDM_DEVICE, PID_DISC_UNIQUE_BRANCH, param_data, length); } /* * Create a new Mute Request Object. */ RDMDiscoveryRequest *NewMuteRequest(const UID &source, const UID &destination, uint8_t transaction_number, uint8_t port_id) { return new RDMDiscoveryRequest(source, destination, transaction_number, port_id, ROOT_RDM_DEVICE, PID_DISC_MUTE, NULL, 0); } /** * Create a new UnMute request object. */ RDMDiscoveryRequest *NewUnMuteRequest(const UID &source, const UID &destination, uint8_t transaction_number, uint8_t port_id) { return new RDMDiscoveryRequest(source, destination, transaction_number, port_id, ROOT_RDM_DEVICE, PID_DISC_UN_MUTE, NULL, 0); } /** * Inflate a discovery response. */ RDMDiscoveryResponse* RDMDiscoveryResponse::InflateFromData( const uint8_t *data, unsigned int length) { RDMCommandHeader command_message; RDMStatusCode code = VerifyData(data, length, &command_message); if (code != RDM_COMPLETED_OK) return NULL; uint16_t sub_device = ((command_message.sub_device[0] << 8) + command_message.sub_device[1]); uint16_t param_id = ((command_message.param_id[0] << 8) + command_message.param_id[1]); RDMCommandClass command_class = ConvertCommandClass( command_message.command_class); if (command_class == DISCOVER_COMMAND_RESPONSE) { return new RDMDiscoveryResponse( UID(command_message.source_uid), UID(command_message.destination_uid), command_message.transaction_number, // transaction # command_message.port_id, // port id command_message.message_count, // message count sub_device, param_id, data + sizeof(RDMCommandHeader), command_message.param_data_length); // data length } else { OLA_WARN << "Expected a RDM discovery response but got " << command_class; return NULL; } } /**@}*/ } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/QueueingRDMController.cpp0000664000175000017500000002300114376533110016245 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * QueueingRDMController.cpp * The Jese DMX TRI device. * Copyright (C) 2010 Simon Newton */ #include #include #include #include #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/rdm/QueueingRDMController.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/UID.h" #include "ola/rdm/UIDSet.h" namespace ola { namespace rdm { using ola::rdm::RDMCommand; using ola::rdm::RDMRequest; using ola::rdm::UID; using ola::rdm::UIDSet; using std::string; using std::vector; /* * A new QueueingRDMController. This takes another controller as a argument, * and ensures that we only send one request at a time. */ QueueingRDMController::QueueingRDMController( RDMControllerInterface *controller, unsigned int max_queue_size) : m_controller(controller), m_max_queue_size(max_queue_size), m_rdm_request_pending(false), m_active(true), m_callback(ola::NewCallback(this, &QueueingRDMController::HandleRDMResponse)) { } /* * Shutdown */ QueueingRDMController::~QueueingRDMController() { // delete all outstanding requests while (!m_pending_requests.empty()) { outstanding_rdm_request outstanding_request = m_pending_requests.front(); if (outstanding_request.on_complete) { RunRDMCallback(outstanding_request.on_complete, RDM_FAILED_TO_SEND); } delete outstanding_request.request; m_pending_requests.pop(); } } /** * Pause the sending of RDM messages. This won't cancel any message in-flight. */ void QueueingRDMController::Pause() { m_active = false; } /** * Resume the sending of RDM requests. */ void QueueingRDMController::Resume() { m_active = true; MaybeSendRDMRequest(); } /** * Queue an RDM request for sending. */ void QueueingRDMController::SendRDMRequest(RDMRequest *request, RDMCallback *on_complete) { if (m_pending_requests.size() >= m_max_queue_size) { OLA_WARN << "RDM Queue is full, dropping request"; if (on_complete) { RunRDMCallback(on_complete, RDM_FAILED_TO_SEND); } delete request; return; } outstanding_rdm_request outstanding_request; outstanding_request.request = request; outstanding_request.on_complete = on_complete; m_pending_requests.push(outstanding_request); TakeNextAction(); } /** * Do the next action. */ void QueueingRDMController::TakeNextAction() { if (CheckForBlockingCondition()) return; MaybeSendRDMRequest(); } /** * This method runs before we decide to send another request and allows sub * classes (like the DiscoverableQueueingRDMController) to insert other actions * into the queue. * @returns true if some other action is running, false otherwise. */ bool QueueingRDMController::CheckForBlockingCondition() { return !m_active || m_rdm_request_pending; } /* * If we're not paused, send the next request. */ void QueueingRDMController::MaybeSendRDMRequest() { if (m_pending_requests.empty()) return; m_rdm_request_pending = true; DispatchNextRequest(); } /* * Send the next RDM request. */ void QueueingRDMController::DispatchNextRequest() { outstanding_rdm_request outstanding_request = m_pending_requests.front(); // We have to make a copy here because we pass ownership of the request to // the underlying controller. // We need to have the original request because we use it if we receive an // ACK_OVERFLOW. m_controller->SendRDMRequest(outstanding_request.request->Duplicate(), m_callback.get()); } /* * Handle the response to a RemoteGet command */ void QueueingRDMController::HandleRDMResponse(RDMReply *reply) { m_rdm_request_pending = false; if (m_pending_requests.empty()) { OLA_FATAL << "Received a response but the queue was empty!"; return; } bool was_ack_overflow = reply->StatusCode() == RDM_COMPLETED_OK && reply->Response() && reply->Response()->ResponseType() == ACK_OVERFLOW; // Check for ACK_OVERFLOW if (m_response.get()) { if (reply->StatusCode() != RDM_COMPLETED_OK || reply->Response() == NULL) { // We failed part way through an ACK_OVERFLOW m_frames.insert(m_frames.end(), reply->Frames().begin(), reply->Frames().end()); RDMReply new_reply(reply->StatusCode(), NULL, m_frames); RunCallback(&new_reply); m_response.reset(); m_frames.clear(); TakeNextAction(); } else { // Combine the data. m_response.reset(RDMResponse::CombineResponses( m_response.get(), reply->Response())); m_frames.insert(m_frames.end(), reply->Frames().begin(), reply->Frames().end()); if (!m_response.get()) { // The response was invalid RDMReply new_reply(RDM_INVALID_RESPONSE, NULL, m_frames); RunCallback(&new_reply); m_frames.clear(); TakeNextAction(); } else if (reply->Response()->ResponseType() != ACK_OVERFLOW) { RDMReply new_reply(RDM_COMPLETED_OK, m_response.release(), m_frames); RunCallback(&new_reply); m_response.reset(); m_frames.clear(); TakeNextAction(); } else { DispatchNextRequest(); } return; } } else if (was_ack_overflow) { // We're in an ACK_OVERFLOW sequence. m_frames.clear(); m_response.reset(reply->Response()->Duplicate()); m_frames.insert(m_frames.end(), reply->Frames().begin(), reply->Frames().end()); DispatchNextRequest(); } else { // Just pass the RDMReply on. RunCallback(reply); TakeNextAction(); } } void QueueingRDMController::RunCallback(RDMReply *reply) { outstanding_rdm_request outstanding_request = m_pending_requests.front(); m_pending_requests.pop(); if (outstanding_request.on_complete) { outstanding_request.on_complete->Run(reply); } delete outstanding_request.request; } /** * Constructor for the DiscoverableQueueingRDMController */ DiscoverableQueueingRDMController::DiscoverableQueueingRDMController( DiscoverableRDMControllerInterface *controller, unsigned int max_queue_size) : QueueingRDMController(controller, max_queue_size), m_discoverable_controller(controller) { } /** * Run the full RDM discovery routine. This will either run immediately or * after the current request completes. */ void DiscoverableQueueingRDMController::RunFullDiscovery( RDMDiscoveryCallback *callback) { GenericDiscovery(callback, true); } /** * Run the incremental RDM discovery routine. This will either run immediately * or after the current request completes. */ void DiscoverableQueueingRDMController::RunIncrementalDiscovery( RDMDiscoveryCallback *callback) { GenericDiscovery(callback, false); } /** * Override this so we can prioritize the discovery requests. */ void DiscoverableQueueingRDMController::TakeNextAction() { if (CheckForBlockingCondition()) return; // prioritize discovery above RDM requests if (!m_pending_discovery_callbacks.empty()) StartRDMDiscovery(); else MaybeSendRDMRequest(); } /** * Block if either a RDM request is pending, or another discovery process is * running. */ bool DiscoverableQueueingRDMController::CheckForBlockingCondition() { return (QueueingRDMController::CheckForBlockingCondition() || !m_discovery_callbacks.empty()); } /** * The generic discovery routine */ void DiscoverableQueueingRDMController::GenericDiscovery( RDMDiscoveryCallback *callback, bool full) { m_pending_discovery_callbacks.push_back(std::make_pair(full, callback)); TakeNextAction(); } /** * Run the rdm discovery routine for the underlying controller. * @pre m_pending_discovery_callbacks is not empty() */ void DiscoverableQueueingRDMController::StartRDMDiscovery() { bool full = false; m_discovery_callbacks.reserve(m_pending_discovery_callbacks.size()); PendingDiscoveryCallbacks::iterator iter = m_pending_discovery_callbacks.begin(); for (; iter != m_pending_discovery_callbacks.end(); iter++) { full |= iter->first; m_discovery_callbacks.push_back(iter->second); } m_pending_discovery_callbacks.clear(); RDMDiscoveryCallback *callback = NewSingleCallback( this, &DiscoverableQueueingRDMController::DiscoveryComplete); if (full) m_discoverable_controller->RunFullDiscovery(callback); else m_discoverable_controller->RunIncrementalDiscovery(callback); } /** * Called when discovery completes */ void DiscoverableQueueingRDMController::DiscoveryComplete( const ola::rdm::UIDSet &uids) { DiscoveryCallbacks::iterator iter = m_discovery_callbacks.begin(); for (; iter != m_discovery_callbacks.end(); ++iter) { if (*iter) (*iter)->Run(uids); } m_discovery_callbacks.clear(); TakeNextAction(); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/PidStoreHelper.cpp0000664000175000017500000001735614376533110014765 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PidStoreHelper.cpp * Provides helper methods for loading / accessing the pid store, and dealing * with pids. * Copyright (C) 2011 Simon Newton */ #include #include #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/rdm/PidStoreHelper.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/RDMMessagePrinters.h" namespace ola { namespace rdm { using std::string; using std::vector; /** * @brief Set up a new PidStoreHelper object */ PidStoreHelper::PidStoreHelper(const string &pid_location, unsigned int initial_indent) : m_pid_location(pid_location.empty() ? RootPidStore::DataLocation() : pid_location), m_root_store(NULL), m_message_printer(initial_indent) { } /** * @brief Clean up */ PidStoreHelper::~PidStoreHelper() { if (m_root_store) { delete m_root_store; } } /** * @brief Init the PidStoreHelper, this loads the PID store */ bool PidStoreHelper::Init() { if (m_root_store) { OLA_WARN << "Root PID Store already loaded from: " << m_pid_location; return false; } m_root_store = ola::rdm::RootPidStore::LoadFromDirectory(m_pid_location); return m_root_store; } /** * @brief Lookup a PidDescriptor by name. * @param manufacturer_id the ESTA id of the manufacturer_id * @param pid_name the name of the pid * @return a PidDescriptor or NULL if the pid wasn't found. */ const ola::rdm::PidDescriptor *PidStoreHelper::GetDescriptor( const string &pid_name, uint16_t manufacturer_id) const { if (!m_root_store) { return NULL; } return m_root_store->GetDescriptor(pid_name, manufacturer_id); } /** * @brief Lookup a PidDescriptor by PID value. * @param manufacturer_id the ESTA id of the manufacturer_id * @param pid_value the pid to lookup * @return a PidDescriptor or NULL if the pid wasn't found. */ const ola::rdm::PidDescriptor *PidStoreHelper::GetDescriptor( uint16_t pid_value, uint16_t manufacturer_id) const { if (!m_root_store) { return NULL; } return m_root_store->GetDescriptor(pid_value, manufacturer_id); } /** * @brief Build a Message object from a series of input strings */ const ola::messaging::Message *PidStoreHelper::BuildMessage( const ola::messaging::Descriptor *descriptor, const vector &inputs) { const ola::messaging::Message *message = m_string_builder.GetMessage( inputs, descriptor); if (!message) { OLA_WARN << "Error building message: " << m_string_builder.GetError(); } return message; } /** * @brief Serialize a message to binary format */ const uint8_t *PidStoreHelper::SerializeMessage( const ola::messaging::Message *message, unsigned int *data_length) { return m_serializer.SerializeMessage(message, data_length); } /** * @brief DeSerialize a message */ const ola::messaging::Message *PidStoreHelper::DeserializeMessage( const ola::messaging::Descriptor *descriptor, const uint8_t *data, unsigned int data_length) { return m_deserializer.InflateMessage(descriptor, data, data_length); } /** * @brief Convert a message to a string * @param message the Message object to print * @returns a formatted string representation of the message. */ const string PidStoreHelper::MessageToString( const ola::messaging::Message *message) { return m_message_printer.AsString(message); } /** * @brief Pretty print a RDM message based on the PID. * * If we can't find a custom MessagePrinter we default to the * GenericMessagePrinter. * @param manufacturer_id the manufacturer ID * @param is_set true if the message is a set command, false otherwise * @param pid the pid value * @param message the Message object to print * @returns a formatted string representation of the message. */ const string PidStoreHelper::PrettyPrintMessage( uint16_t manufacturer_id, bool is_set, uint16_t pid, const ola::messaging::Message *message) { // switch based on command class and PID if (is_set) { { } } else { switch (pid) { case PID_PROXIED_DEVICES: { ProxiedDevicesPrinter printer; return printer.AsString(message); } case PID_STATUS_MESSAGES: { StatusMessagePrinter printer; return printer.AsString(message); } case PID_SUPPORTED_PARAMETERS: { SupportedParamsPrinter printer(manufacturer_id, m_root_store); return printer.AsString(message); } case PID_DEVICE_INFO: { DeviceInfoPrinter printer; return printer.AsString(message); } case PID_PRODUCT_DETAIL_ID_LIST: { ProductIdPrinter printer; return printer.AsString(message); } case PID_DEVICE_MODEL_DESCRIPTION: case PID_MANUFACTURER_LABEL: case PID_DEVICE_LABEL: case PID_SOFTWARE_VERSION_LABEL: case PID_BOOT_SOFTWARE_VERSION_LABEL: { LabelPrinter printer; return printer.AsString(message); } case PID_LANGUAGE_CAPABILITIES: { LanguageCapabilityPrinter printer; return printer.AsString(message); } case PID_REAL_TIME_CLOCK: { ClockPrinter printer; return printer.AsString(message); } case PID_SENSOR_DEFINITION: { SensorDefinitionPrinter printer; return printer.AsString(message); } case PID_SLOT_INFO: { SlotInfoPrinter printer; return printer.AsString(message); } } } return m_message_printer.AsString(message); } /** * @brief Return a string describing the schema for a descriptor */ const string PidStoreHelper::SchemaAsString( const ola::messaging::Descriptor *descriptor) { m_schema_printer.Reset(); descriptor->Accept(&m_schema_printer); return m_schema_printer.AsString(); } /** * @brief Return the list of PIDs supported including manufacturer PIDs. */ void PidStoreHelper::SupportedPids(uint16_t manufacturer_id, vector *pid_names) const { if (!m_root_store) { return; } vector descriptors; const ola::rdm::PidStore *store = m_root_store->EstaStore(); if (store) { store->AllPids(&descriptors); } store = m_root_store->ManufacturerStore(manufacturer_id); if (store) { store->AllPids(&descriptors); } vector::const_iterator iter; for (iter = descriptors.begin(); iter != descriptors.end(); ++iter) { string name = (*iter)->Name(); ola::ToLower(&name); pid_names->push_back(name); } } /** * @brief Return the list of PidDescriptors supported. * * The caller does not own the pointers, they are valid for the lifetime of the * PidStoreHelper. */ void PidStoreHelper::SupportedPids( uint16_t manufacturer_id, vector *descriptors) const { if (!m_root_store) { return; } const ola::rdm::PidStore *store = m_root_store->EstaStore(); if (store) { store->AllPids(descriptors); } store = m_root_store->ManufacturerStore(manufacturer_id); if (store) { store->AllPids(descriptors); } } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/GroupSizeCalculator.h0000664000175000017500000001051214376533110015465 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * GroupSizeCalculator.h * Calculate the number of items in a group, given a fixed number of tokens. * Copyright (C) 2011 Simon Newton */ #ifndef COMMON_RDM_GROUPSIZECALCULATOR_H_ #define COMMON_RDM_GROUPSIZECALCULATOR_H_ #include #include #include namespace ola { namespace messaging { class Descriptor; } namespace rdm { /** * This calculates the required nmuber of tokens for a group which contains no * variable-sized groups. */ class StaticGroupTokenCalculator : public ola::messaging::FieldDescriptorVisitor { public: StaticGroupTokenCalculator() : m_variable_sized_group_encountered(false) { } ~StaticGroupTokenCalculator() {} bool Descend() const { return true; } bool CalculateTokensRequired( const class ola::messaging::FieldDescriptorGroup*, unsigned int *token_count); void Visit(const ola::messaging::BoolFieldDescriptor*); void Visit(const ola::messaging::IPV4FieldDescriptor*); void Visit(const ola::messaging::MACFieldDescriptor*); void Visit(const ola::messaging::UIDFieldDescriptor*); void Visit(const ola::messaging::StringFieldDescriptor*); void Visit(const ola::messaging::UInt8FieldDescriptor*); void Visit(const ola::messaging::UInt16FieldDescriptor*); void Visit(const ola::messaging::UInt32FieldDescriptor*); void Visit(const ola::messaging::Int8FieldDescriptor*); void Visit(const ola::messaging::Int16FieldDescriptor*); void Visit(const ola::messaging::Int32FieldDescriptor*); void Visit(const ola::messaging::FieldDescriptorGroup*); void PostVisit(const ola::messaging::FieldDescriptorGroup*); private: std::stack m_token_count; bool m_variable_sized_group_encountered; }; /** * Calculate the number of repeats of a group required, given a certain number * of tokens. */ class GroupSizeCalculator: public ola::messaging::FieldDescriptorVisitor { public: typedef enum { INSUFFICIENT_TOKENS, EXTRA_TOKENS, NO_VARIABLE_GROUPS, SINGLE_VARIABLE_GROUP, MULTIPLE_VARIABLE_GROUPS, NESTED_VARIABLE_GROUPS, MISMATCHED_TOKENS, } calculator_state; GroupSizeCalculator() {} ~GroupSizeCalculator() {} bool Descend() const { return false; } calculator_state CalculateGroupSize( unsigned int token_count, const class ola::messaging::Descriptor *descriptor, unsigned int *group_repeat_count); void Visit(const ola::messaging::BoolFieldDescriptor*); void Visit(const ola::messaging::IPV4FieldDescriptor*); void Visit(const ola::messaging::MACFieldDescriptor*); void Visit(const ola::messaging::UIDFieldDescriptor*); void Visit(const ola::messaging::StringFieldDescriptor*); void Visit(const ola::messaging::UInt8FieldDescriptor*); void Visit(const ola::messaging::UInt16FieldDescriptor*); void Visit(const ola::messaging::UInt32FieldDescriptor*); void Visit(const ola::messaging::Int8FieldDescriptor*); void Visit(const ola::messaging::Int16FieldDescriptor*); void Visit(const ola::messaging::Int32FieldDescriptor*); void Visit(const ola::messaging::FieldDescriptorGroup*); void PostVisit(const ola::messaging::FieldDescriptorGroup*); private: std::vector m_groups; std::vector m_non_groups; StaticGroupTokenCalculator m_simple_calculator; unsigned int DetermineGroupSize(const ola::messaging::FieldDescriptorGroup*); }; } // namespace rdm } // namespace ola #endif // COMMON_RDM_GROUPSIZECALCULATOR_H_ ola-0.10.9/common/rdm/VariableFieldSizeCalculator.cpp0000664000175000017500000001407514376533110017425 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * VariableFieldSizeCalculator.cpp * Copyright (C) 2011 Simon Newton */ #include #include #include "common/rdm/VariableFieldSizeCalculator.h" namespace ola { namespace rdm { using ola::messaging::FieldDescriptorGroup; using ola::messaging::StringFieldDescriptor; /** * Figure out the size of a variable-length field in a descriptor. The variable * field may be a string or a repeated group of fields. Multiple-variable * length fields are not supported as this doesn't allow us to determine the * boundary of the individual fields within a message. * * This method is *not* re-entrant. * @param data_size the size in bytes of the data in this message * @param descriptor The descriptor to use to build the Message * @param variable_field_size a pointer to a int which is set to the length of * the variable field within this message. * @returns A enum which indicates if one (or more) variable length fields * exist, and if only one exists, what type it is. */ VariableFieldSizeCalculator::calculator_state VariableFieldSizeCalculator::CalculateFieldSize( unsigned int data_size, const class ola::messaging::Descriptor *descriptor, unsigned int *variable_field_size) { m_fixed_size_sum = 0; m_variable_string_fields.clear(); m_variable_group_fields.clear(); // split out the fields into fixed and variable length for (unsigned int i = 0; i < descriptor->FieldCount(); ++i) descriptor->GetField(i)->Accept(this); if (data_size < m_fixed_size_sum) return TOO_SMALL; unsigned int variable_string_field_count = m_variable_string_fields.size(); unsigned int variable_group_field_count = m_variable_group_fields.size(); if (variable_string_field_count + variable_group_field_count > 1) return MULTIPLE_VARIABLE_FIELDS; if (variable_string_field_count + variable_group_field_count == 0) return data_size > m_fixed_size_sum ? TOO_LARGE : FIXED_SIZE; // we know there is only one, now we need to work out the number of // repeatitions or length if it's a string unsigned int bytes_remaining = data_size - m_fixed_size_sum; if (variable_string_field_count) { // variable string const StringFieldDescriptor *string_descriptor = m_variable_string_fields[0]; if (bytes_remaining < string_descriptor->MinSize()) return TOO_SMALL; if (bytes_remaining > string_descriptor->MaxSize()) return TOO_LARGE; *variable_field_size = bytes_remaining; return VARIABLE_STRING; } else { // variable group const FieldDescriptorGroup *group_descriptor = m_variable_group_fields[0]; if (!group_descriptor->FixedBlockSize()) return NESTED_VARIABLE_GROUPS; unsigned int block_size = group_descriptor->BlockSize(); if (group_descriptor->LimitedSize() && bytes_remaining > block_size * group_descriptor->MaxBlocks()) return TOO_LARGE; if (bytes_remaining % block_size) return MISMATCHED_SIZE; unsigned int repeat_count = bytes_remaining / block_size; if (repeat_count < group_descriptor->MinBlocks()) return TOO_SMALL; if (group_descriptor->MaxBlocks() != FieldDescriptorGroup::UNLIMITED_BLOCKS && repeat_count > static_cast(group_descriptor->MaxBlocks())) return TOO_LARGE; *variable_field_size = repeat_count; return VARIABLE_GROUP; } } void VariableFieldSizeCalculator::Visit( const ola::messaging::BoolFieldDescriptor *descriptor) { m_fixed_size_sum += descriptor->MaxSize(); } void VariableFieldSizeCalculator::Visit( const ola::messaging::IPV4FieldDescriptor *descriptor) { m_fixed_size_sum += descriptor->MaxSize(); } void VariableFieldSizeCalculator::Visit( const ola::messaging::MACFieldDescriptor *descriptor) { m_fixed_size_sum += descriptor->MaxSize(); } void VariableFieldSizeCalculator::Visit( const ola::messaging::UIDFieldDescriptor *descriptor) { m_fixed_size_sum += descriptor->MaxSize(); } void VariableFieldSizeCalculator::Visit( const ola::messaging::StringFieldDescriptor *descriptor) { if (descriptor->FixedSize()) m_fixed_size_sum += descriptor->MaxSize(); else m_variable_string_fields.push_back(descriptor); } void VariableFieldSizeCalculator::Visit( const ola::messaging::UInt8FieldDescriptor *descriptor) { m_fixed_size_sum += descriptor->MaxSize(); } void VariableFieldSizeCalculator::Visit( const ola::messaging::UInt16FieldDescriptor *descriptor) { m_fixed_size_sum += descriptor->MaxSize(); } void VariableFieldSizeCalculator::Visit( const ola::messaging::UInt32FieldDescriptor *descriptor) { m_fixed_size_sum += descriptor->MaxSize(); } void VariableFieldSizeCalculator::Visit( const ola::messaging::Int8FieldDescriptor *descriptor) { m_fixed_size_sum += descriptor->MaxSize(); } void VariableFieldSizeCalculator::Visit( const ola::messaging::Int16FieldDescriptor *descriptor) { m_fixed_size_sum += descriptor->MaxSize(); } void VariableFieldSizeCalculator::Visit( const ola::messaging::Int32FieldDescriptor *descriptor) { m_fixed_size_sum += descriptor->MaxSize(); } void VariableFieldSizeCalculator::Visit( const ola::messaging::FieldDescriptorGroup *descriptor) { if (descriptor->FixedSize()) m_fixed_size_sum += descriptor->MaxSize(); else m_variable_group_fields.push_back(descriptor); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/RDMCommandTest.cpp0000664000175000017500000012443414376533110014651 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMCommandTest.cpp * Test fixture for the RDMCommand classes * Copyright (C) 2010 Simon Newton */ #include #include #include #include #include #include #include "common/rdm/TestHelper.h" #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/io/ByteString.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/RDMCommandSerializer.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/UID.h" #include "ola/util/Utils.h" #include "ola/testing/TestUtils.h" using ola::io::ByteString; using ola::rdm::RDMCommand; using ola::rdm::RDMCommandSerializer; using ola::rdm::RDMDiscoveryRequest; using ola::rdm::RDMDiscoveryResponse; using ola::rdm::RDMGetRequest; using ola::rdm::RDMGetResponse; using ola::rdm::RDMRequest; using ola::rdm::RDMResponse; using ola::rdm::RDMSetRequest; using ola::rdm::RDMSetResponse; using ola::rdm::UID; using ola::utils::SplitUInt16; using std::auto_ptr; using std::ostringstream; using std::string; /* * Calculate a checksum for a packet and update it */ void UpdateChecksum(uint8_t *expected, unsigned int expected_length) { unsigned int checksum = RDMCommand::START_CODE; for (unsigned int i = 0 ; i < expected_length - 2; i++) { checksum += expected[i]; } SplitUInt16(checksum, &expected[expected_length - 2], &expected[expected_length - 1]); } void UpdateChecksum(ByteString *data) { unsigned int checksum = RDMCommand::START_CODE; for (unsigned int i = 0 ; i < data->size() - 2; i++) { checksum += (*data)[i]; } SplitUInt16(checksum, &data->at(data->size() - 2), &data->at(data->size() - 1)); } class RDMCommandTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RDMCommandTest); CPPUNIT_TEST(testGetRequestCreation); CPPUNIT_TEST(testGetWithExtraData); CPPUNIT_TEST(testSetWithParamData); CPPUNIT_TEST(testRequestOverrides); CPPUNIT_TEST(testRequestMutation); CPPUNIT_TEST(testRequestInflation); CPPUNIT_TEST(testResponseMutation); CPPUNIT_TEST(testResponseInflation); CPPUNIT_TEST(testNackWithReason); CPPUNIT_TEST(testGetResponseFromData); CPPUNIT_TEST(testCombineResponses); CPPUNIT_TEST(testDiscoveryCommand); CPPUNIT_TEST(testMuteRequest); CPPUNIT_TEST(testUnMuteRequest); CPPUNIT_TEST(testCommandInflation); CPPUNIT_TEST(testDiscoveryResponseInflation); CPPUNIT_TEST_SUITE_END(); public: RDMCommandTest() : m_source(1, 2), m_destination(3, 4) { } void setUp(); void testGetRequestCreation(); void testGetWithExtraData(); void testSetWithParamData(); void testRequestOverrides(); void testRequestMutation(); void testRequestInflation(); void testResponseMutation(); void testResponseInflation(); void testNackWithReason(); void testGetResponseFromData(); void testCombineResponses(); void testDiscoveryCommand(); void testMuteRequest(); void testUnMuteRequest(); void testCommandInflation(); void testDiscoveryResponseInflation(); private: UID m_source; UID m_destination; static uint8_t EXPECTED_GET_BUFFER[]; static uint8_t EXPECTED_SET_BUFFER[]; static uint8_t EXPECTED_GET_RESPONSE_BUFFER[]; static uint8_t EXPECTED_DISCOVERY_REQUEST[]; static uint8_t EXPECTED_MUTE_REQUEST[]; static uint8_t EXPECTED_UNMUTE_REQUEST[]; static uint8_t MUTE_RESPONSE[]; }; CPPUNIT_TEST_SUITE_REGISTRATION(RDMCommandTest); uint8_t RDMCommandTest::EXPECTED_GET_BUFFER[] = { 1, 24, // sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 0, 1, 0, 0, 10, // transaction, port id, msg count & sub device 0x20, 1, 40, 0, // command, param id, param data length 0, 0 // checksum, filled in below }; uint8_t RDMCommandTest::EXPECTED_SET_BUFFER[] = { 1, 28, // sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 0, 1, 0, 0, 10, // transaction, port id, msg count & sub device 0x30, 1, 40, 4, // command, param id, param data length 0xa5, 0xa5, 0xa5, 0xa5, // param data 0, 0 // checksum, filled in below }; uint8_t RDMCommandTest::EXPECTED_GET_RESPONSE_BUFFER[] = { 1, 28, // sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 0, 1, 0, 0, 10, // transaction, port id, msg count & sub device 0x21, 1, 40, 4, // command, param id, param data length 0x5a, 0x5a, 0x5a, 0x5a, // param data 0, 0 // checksum, filled in below }; uint8_t RDMCommandTest::EXPECTED_DISCOVERY_REQUEST[] = { 1, 36, // sub code & length 255, 255, 255, 255, 255, 255, // dst uid 0, 1, 0, 0, 0, 2, // src uid 1, 1, 0, 0, 0, // transaction, port id, msg count & sub device 0x10, 0, 1, 12, // command, param id, param data length 1, 2, 0, 0, 3, 4, // lower uid 5, 6, 0, 0, 7, 8, // upper uid 0, 0 // checksum, filled in below }; uint8_t RDMCommandTest::EXPECTED_MUTE_REQUEST[] = { 1, 24, // sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 1, 1, 0, 0, 0, // transaction, port id, msg count & sub device 0x10, 0, 2, 0, // command, param id, param data length 0, 0 // checksum, filled in below }; uint8_t RDMCommandTest::EXPECTED_UNMUTE_REQUEST[] = { 1, 24, // sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 1, 1, 0, 0, 0, // transaction, port id, msg count & sub device 0x10, 0, 3, 0, // command, param id, param data length 0, 0 // checksum, filled in below }; uint8_t RDMCommandTest::MUTE_RESPONSE[] = { 1, 24, // sub code & length 0, 1, 0, 0, 0, 2, // dst uid 0, 3, 0, 0, 0, 4, // src uid 1, 1, 0, 0, 0, // transaction, response type, msg count & sub device 0x11, 0, 2, 0, // command, param id, param data length 0, 0 // checksum, filled in below }; /* * Fill in the checksums */ void RDMCommandTest::setUp() { UpdateChecksum(EXPECTED_GET_BUFFER, sizeof(EXPECTED_GET_BUFFER)); UpdateChecksum(EXPECTED_SET_BUFFER, sizeof(EXPECTED_SET_BUFFER)); UpdateChecksum(EXPECTED_GET_RESPONSE_BUFFER, sizeof(EXPECTED_GET_RESPONSE_BUFFER)); UpdateChecksum(EXPECTED_DISCOVERY_REQUEST, sizeof(EXPECTED_DISCOVERY_REQUEST)); UpdateChecksum(EXPECTED_MUTE_REQUEST, sizeof(EXPECTED_MUTE_REQUEST)); UpdateChecksum(EXPECTED_UNMUTE_REQUEST, sizeof(EXPECTED_UNMUTE_REQUEST)); UpdateChecksum(MUTE_RESPONSE, sizeof(MUTE_RESPONSE)); } void RDMCommandTest::testGetRequestCreation() { RDMGetRequest command(m_source, m_destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length OLA_ASSERT_EQ(ola::rdm::SUB_START_CODE, command.SubStartCode()); OLA_ASSERT_EQ((uint8_t) 24, command.MessageLength()); OLA_ASSERT_EQ(m_source, command.SourceUID()); OLA_ASSERT_EQ(m_destination, command.DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, command.TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 1, command.PortIdResponseType()); OLA_ASSERT_EQ((uint8_t) 1, command.PortId()); OLA_ASSERT_EQ((uint8_t) 0, command.MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, command.SubDevice()); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND, command.CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, command.ParamId()); OLA_ASSERT_NULL(command.ParamData()); OLA_ASSERT_EQ(0u, command.ParamDataSize()); OLA_ASSERT_EQ((uint16_t) 0, command.Checksum(0)); OLA_ASSERT_FALSE(command.IsDUB()); // Test ToString() and <<. ostringstream str; str << command; OLA_ASSERT_FALSE(str.str().empty()); OLA_ASSERT_EQ(str.str(), command.ToString()); } void RDMCommandTest::testGetWithExtraData() { uint8_t data[232]; memset(data, 0, arraysize(data)); RDMGetRequest command(m_source, m_destination, 1, // transaction # 1, // port id 10, // sub device 123, // param id data, // data arraysize(data)); // data length OLA_ASSERT_EQ(ola::rdm::SUB_START_CODE, command.SubStartCode()); OLA_ASSERT_EQ(m_source, command.SourceUID()); OLA_ASSERT_EQ(m_destination, command.DestinationUID()); OLA_ASSERT_EQ((uint8_t) 1, command.TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 1, command.PortIdResponseType()); OLA_ASSERT_EQ((uint8_t) 1, command.PortId()); OLA_ASSERT_EQ((uint8_t) 0, command.MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, command.SubDevice()); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND, command.CommandClass()); OLA_ASSERT_EQ((uint16_t) 123, command.ParamId()); OLA_ASSERT_DATA_EQUALS(reinterpret_cast(&data), arraysize(data), command.ParamData(), command.ParamDataSize()); OLA_ASSERT_EQ((uint16_t) 0, command.Checksum(0)); OLA_ASSERT_FALSE(command.IsDUB()); } void RDMCommandTest::testSetWithParamData() { uint32_t data_value = 0xa5a5a5a5; RDMSetRequest command(m_source, m_destination, 3, // transaction # 1, // port id 13, // sub device 296, // param id reinterpret_cast(&data_value), // data sizeof(data_value)); // data length OLA_ASSERT_EQ(ola::rdm::SUB_START_CODE, command.SubStartCode()); OLA_ASSERT_EQ((uint8_t) 28, command.MessageLength()); OLA_ASSERT_EQ(m_source, command.SourceUID()); OLA_ASSERT_EQ(m_destination, command.DestinationUID()); OLA_ASSERT_EQ((uint8_t) 3, command.TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 1, command.PortIdResponseType()); OLA_ASSERT_EQ((uint8_t) 1, command.PortId()); OLA_ASSERT_EQ((uint8_t) 0, command.MessageCount()); OLA_ASSERT_EQ((uint16_t) 13, command.SubDevice()); OLA_ASSERT_EQ(RDMCommand::SET_COMMAND, command.CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, command.ParamId()); OLA_ASSERT_DATA_EQUALS(reinterpret_cast(&data_value), sizeof(data_value), command.ParamData(), command.ParamDataSize()); OLA_ASSERT_EQ((uint16_t) 0, command.Checksum(0)); OLA_ASSERT_FALSE(command.IsDUB()); } void RDMCommandTest::testRequestOverrides() { RDMRequest::OverrideOptions options; options.SetMessageLength(10); options.SetChecksum(999); options.sub_start_code = 5; options.message_count = 9; RDMGetRequest command(m_source, m_destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0, // data length options); OLA_ASSERT_EQ((uint8_t) 5, command.SubStartCode()); OLA_ASSERT_EQ((uint8_t) 10, command.MessageLength()); OLA_ASSERT_EQ(m_source, command.SourceUID()); OLA_ASSERT_EQ(m_destination, command.DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, command.TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 1, command.PortId()); OLA_ASSERT_EQ((uint8_t) 9, command.MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, command.SubDevice()); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND, command.CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, command.ParamId()); OLA_ASSERT_NULL(command.ParamData()); OLA_ASSERT_EQ(0u, command.ParamDataSize()); OLA_ASSERT_EQ((uint16_t) 999u, command.Checksum(0)); } void RDMCommandTest::testRequestMutation() { UID new_uid(5, 6); RDMGetRequest command(m_source, m_destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); command.SetSourceUID(new_uid); command.SetTransactionNumber(99); command.SetPortId(5); OLA_ASSERT_EQ(ola::rdm::SUB_START_CODE, command.SubStartCode()); OLA_ASSERT_EQ((uint8_t) 24, command.MessageLength()); OLA_ASSERT_EQ(new_uid, command.SourceUID()); OLA_ASSERT_EQ(m_destination, command.DestinationUID()); OLA_ASSERT_EQ((uint8_t) 99, command.TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 5, command.PortIdResponseType()); OLA_ASSERT_EQ((uint8_t) 5, command.PortId()); OLA_ASSERT_EQ((uint8_t) 0, command.MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, command.SubDevice()); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND, command.CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, command.ParamId()); OLA_ASSERT_NULL(command.ParamData()); OLA_ASSERT_EQ(0u, command.ParamDataSize()); OLA_ASSERT_EQ((uint16_t) 0, command.Checksum(0)); OLA_ASSERT_FALSE(command.IsDUB()); } /* * Test that we can inflate RDM request messages correctly */ void RDMCommandTest::testRequestInflation() { UID source(1, 2); UID destination(3, 4); auto_ptr command(RDMRequest::InflateFromData(NULL, 10)); OLA_ASSERT_NULL(command.get()); // now try a proper command but with no length command.reset(RDMRequest::InflateFromData(EXPECTED_GET_BUFFER, 0)); OLA_ASSERT_NULL(command.get()); // Try a valid command command.reset(RDMRequest::InflateFromData(EXPECTED_GET_BUFFER, arraysize(EXPECTED_GET_BUFFER))); OLA_ASSERT_NOT_NULL(command.get()); RDMGetRequest expected_command(source, destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length OLA_ASSERT_TRUE(expected_command == *command); // An invalid Command class ByteString invalid_command(EXPECTED_GET_BUFFER, arraysize(EXPECTED_GET_BUFFER)); invalid_command[19] = 0x44; command.reset(RDMRequest::InflateFromData(invalid_command.data(), invalid_command.size())); OLA_ASSERT_NULL(command.get()); // A SET request command.reset(RDMRequest::InflateFromData(EXPECTED_SET_BUFFER, arraysize(EXPECTED_SET_BUFFER))); OLA_ASSERT_NOT_NULL(command.get()); uint8_t expected_data[] = {0xa5, 0xa5, 0xa5, 0xa5}; OLA_ASSERT_DATA_EQUALS(expected_data, arraysize(expected_data), command->ParamData(), command->ParamDataSize()); // Change the param length and make sure the checksum fails ByteString bad_packet(EXPECTED_GET_BUFFER, arraysize(EXPECTED_GET_BUFFER)); bad_packet[22] = 255; command.reset(RDMRequest::InflateFromData(bad_packet.data(), bad_packet.size())); OLA_ASSERT_NULL(command.get()); // Make sure we can't pass a bad param length larger than the buffer UpdateChecksum(&bad_packet); command.reset(RDMRequest::InflateFromData(bad_packet.data(), bad_packet.size())); OLA_ASSERT_NULL(command.get()); // Change the param length of another packet and make sure the checksum fails bad_packet.assign(EXPECTED_SET_BUFFER, arraysize(EXPECTED_SET_BUFFER)); bad_packet[22] = 5; UpdateChecksum(&bad_packet); command.reset(RDMRequest::InflateFromData(bad_packet.data(), bad_packet.size())); OLA_ASSERT_NULL(command.get()); // A non-0 length with a NULL pointer command.reset(RDMRequest::InflateFromData(NULL, 32)); OLA_ASSERT_NULL(command.get()); // Try to inflate a response command.reset(RDMRequest::InflateFromData( EXPECTED_GET_RESPONSE_BUFFER, arraysize(EXPECTED_GET_RESPONSE_BUFFER))); OLA_ASSERT_NULL(command.get()); } void RDMCommandTest::testResponseMutation() { UID new_uid(5, 6); RDMGetResponse command(m_source, m_destination, 0, // transaction # 0, // response type 0, // message count 10, // sub device 100, // param id NULL, // data 0); command.SetDestinationUID(new_uid); command.SetTransactionNumber(99); OLA_ASSERT_EQ(ola::rdm::SUB_START_CODE, command.SubStartCode()); OLA_ASSERT_EQ((uint8_t) 24, command.MessageLength()); OLA_ASSERT_EQ(m_source, command.SourceUID()); OLA_ASSERT_EQ(new_uid, command.DestinationUID()); OLA_ASSERT_EQ((uint8_t) 99, command.TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 0, command.PortIdResponseType()); OLA_ASSERT_EQ((uint8_t) 0, command.MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, command.SubDevice()); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND_RESPONSE, command.CommandClass()); OLA_ASSERT_EQ((uint16_t) 100, command.ParamId()); OLA_ASSERT_NULL(command.ParamData()); OLA_ASSERT_EQ(0u, command.ParamDataSize()); OLA_ASSERT_EQ((uint16_t) 0, command.Checksum(0)); } /* * Test that we can inflate RDM response correctly */ void RDMCommandTest::testResponseInflation() { UID source(1, 2); UID destination(3, 4); ola::rdm::RDMStatusCode code; RDMResponse *command = RDMResponse::InflateFromData(NULL, 10, &code); OLA_ASSERT_NULL(command); OLA_ASSERT_EQ(ola::rdm::RDM_PACKET_TOO_SHORT, code); ByteString empty_string; command = RDMResponse::InflateFromData(empty_string, &code); OLA_ASSERT_EQ(ola::rdm::RDM_PACKET_TOO_SHORT, code); OLA_ASSERT_NULL(command); command = RDMResponse::InflateFromData(EXPECTED_GET_RESPONSE_BUFFER, 0, &code); OLA_ASSERT_EQ(ola::rdm::RDM_PACKET_TOO_SHORT, code); OLA_ASSERT_NULL(command); command = RDMResponse::InflateFromData( EXPECTED_GET_RESPONSE_BUFFER, sizeof(EXPECTED_GET_RESPONSE_BUFFER), &code); OLA_ASSERT_NOT_NULL(command); OLA_ASSERT_EQ(ola::rdm::RDM_COMPLETED_OK, code); uint8_t expected_data[] = {0x5a, 0x5a, 0x5a, 0x5a}; OLA_ASSERT_EQ(4u, command->ParamDataSize()); OLA_ASSERT_EQ(0, memcmp(expected_data, command->ParamData(), command->ParamDataSize())); uint32_t data_value = 0x5a5a5a5a; RDMGetResponse expected_command(source, destination, 0, // transaction # 1, // port id 0, // message count 10, // sub device 296, // param id reinterpret_cast(&data_value), sizeof(data_value)); // data length OLA_ASSERT_TRUE(expected_command == *command); delete command; // now try from a string ByteString response_string(EXPECTED_GET_RESPONSE_BUFFER, sizeof(EXPECTED_GET_RESPONSE_BUFFER)); command = RDMResponse::InflateFromData(response_string, &code); OLA_ASSERT_EQ(ola::rdm::RDM_COMPLETED_OK, code); OLA_ASSERT_NOT_NULL(command); OLA_ASSERT_EQ(4u, command->ParamDataSize()); OLA_ASSERT_EQ(0, memcmp(expected_data, command->ParamData(), command->ParamDataSize())); OLA_ASSERT_TRUE(expected_command == *command); delete command; // change the param length and make sure the checksum fails uint8_t *bad_packet = new uint8_t[arraysize(EXPECTED_GET_RESPONSE_BUFFER)]; memcpy(bad_packet, EXPECTED_GET_RESPONSE_BUFFER, arraysize(EXPECTED_GET_RESPONSE_BUFFER)); bad_packet[22] = 255; command = RDMResponse::InflateFromData( bad_packet, arraysize(EXPECTED_GET_RESPONSE_BUFFER), &code); OLA_ASSERT_EQ(ola::rdm::RDM_CHECKSUM_INCORRECT, code); OLA_ASSERT_NULL(command); // now make sure we can't pass a bad param length larger than the buffer UpdateChecksum(bad_packet, sizeof(EXPECTED_GET_RESPONSE_BUFFER)); command = RDMResponse::InflateFromData( bad_packet, sizeof(EXPECTED_GET_RESPONSE_BUFFER), &code); OLA_ASSERT_EQ(ola::rdm::RDM_PARAM_LENGTH_MISMATCH, code); OLA_ASSERT_NULL(command); delete[] bad_packet; // change the param length of another packet and make sure the checksum fails bad_packet = new uint8_t[sizeof(EXPECTED_SET_BUFFER)]; memcpy(bad_packet, EXPECTED_SET_BUFFER, sizeof(EXPECTED_SET_BUFFER)); bad_packet[22] = 5; UpdateChecksum(bad_packet, sizeof(EXPECTED_SET_BUFFER)); command = RDMResponse::InflateFromData( bad_packet, sizeof(EXPECTED_SET_BUFFER), &code); OLA_ASSERT_EQ(ola::rdm::RDM_PARAM_LENGTH_MISMATCH, code); OLA_ASSERT_NULL(command); delete[] bad_packet; // now try to inflate a request command = RDMResponse::InflateFromData( EXPECTED_GET_BUFFER, sizeof(EXPECTED_GET_BUFFER), &code); OLA_ASSERT_NULL(command); ByteString request_string(EXPECTED_GET_BUFFER, arraysize(EXPECTED_GET_BUFFER)); command = RDMResponse::InflateFromData(request_string, &code); OLA_ASSERT_EQ(ola::rdm::RDM_INVALID_COMMAND_CLASS, code); OLA_ASSERT_NULL(command); } /** * Test that we can build nack messages */ void RDMCommandTest::testNackWithReason() { UID source(1, 2); UID destination(3, 4); RDMGetRequest get_command(source, destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length auto_ptr response( NackWithReason(&get_command, ola::rdm::NR_UNKNOWN_PID)); OLA_ASSERT_NOT_NULL(response.get()); OLA_ASSERT_EQ(destination, response->SourceUID()); OLA_ASSERT_EQ(source, response->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, response->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) ola::rdm::RDM_NACK_REASON, response->ResponseType()); OLA_ASSERT_EQ((uint8_t) 0, response->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, response->SubDevice()); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND_RESPONSE, response->CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, response->ParamId()); OLA_ASSERT_EQ(2u, response->ParamDataSize()); OLA_ASSERT_EQ((uint16_t) ola::rdm::NR_UNKNOWN_PID, NackReasonFromResponse(response.get())); response.reset(NackWithReason(&get_command, ola::rdm::NR_SUB_DEVICE_OUT_OF_RANGE)); OLA_ASSERT_NOT_NULL(response.get()); OLA_ASSERT_EQ(destination, response->SourceUID()); OLA_ASSERT_EQ(source, response->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, response->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) ola::rdm::RDM_NACK_REASON, response->ResponseType()); OLA_ASSERT_EQ((uint8_t) 0, response->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, response->SubDevice()); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND_RESPONSE, response->CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, response->ParamId()); OLA_ASSERT_EQ(2u, response->ParamDataSize()); OLA_ASSERT_EQ((uint16_t) ola::rdm::NR_SUB_DEVICE_OUT_OF_RANGE, NackReasonFromResponse(response.get())); RDMSetRequest set_command(source, destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length response.reset(NackWithReason(&set_command, ola::rdm::NR_WRITE_PROTECT)); OLA_ASSERT_NOT_NULL(response.get()); OLA_ASSERT_EQ(destination, response->SourceUID()); OLA_ASSERT_EQ(source, response->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, response->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) ola::rdm::RDM_NACK_REASON, response->ResponseType()); OLA_ASSERT_EQ((uint8_t) 0, response->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, response->SubDevice()); OLA_ASSERT_EQ(RDMCommand::SET_COMMAND_RESPONSE, response->CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, response->ParamId()); OLA_ASSERT_EQ(2u, response->ParamDataSize()); OLA_ASSERT_EQ((uint16_t) ola::rdm::NR_WRITE_PROTECT, NackReasonFromResponse(response.get())); } void RDMCommandTest::testGetResponseFromData() { UID source(1, 2); UID destination(3, 4); RDMGetRequest get_command(source, destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length RDMResponse *response = GetResponseFromData(&get_command, NULL, 0); OLA_ASSERT_NOT_NULL(response); OLA_ASSERT_EQ(destination, response->SourceUID()); OLA_ASSERT_EQ(source, response->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, response->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) ola::rdm::RDM_ACK, response->ResponseType()); OLA_ASSERT_EQ((uint8_t) 0, response->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, response->SubDevice()); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND_RESPONSE, response->CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, response->ParamId()); OLA_ASSERT_NULL(response->ParamData()); OLA_ASSERT_EQ(0u, response->ParamDataSize()); delete response; RDMSetRequest set_command(source, destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length response = GetResponseFromData(&set_command, NULL, 0); OLA_ASSERT_NOT_NULL(response); OLA_ASSERT_EQ(destination, response->SourceUID()); OLA_ASSERT_EQ(source, response->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, response->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) ola::rdm::RDM_ACK, response->ResponseType()); OLA_ASSERT_EQ((uint8_t) 0, response->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, response->SubDevice()); OLA_ASSERT_EQ(RDMCommand::SET_COMMAND_RESPONSE, response->CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, response->ParamId()); OLA_ASSERT_NULL(response->ParamData()); OLA_ASSERT_EQ(0u, response->ParamDataSize()); delete response; uint32_t data_value = 0xa5a5a5a5; response = GetResponseFromData( &get_command, reinterpret_cast(&data_value), sizeof(data_value)); OLA_ASSERT_NOT_NULL(response); OLA_ASSERT_EQ(destination, response->SourceUID()); OLA_ASSERT_EQ(source, response->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, response->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) ola::rdm::RDM_ACK, response->ResponseType()); OLA_ASSERT_EQ((uint8_t) 0, response->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, response->SubDevice()); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND_RESPONSE, response->CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, response->ParamId()); OLA_ASSERT_EQ(data_value, *(reinterpret_cast(response->ParamData()))); OLA_ASSERT_EQ((unsigned int) sizeof(data_value), response->ParamDataSize()); delete response; } /** * Check that CombineResponses() works. */ void RDMCommandTest::testCombineResponses() { UID source(1, 2); UID destination(3, 4); uint16_t param_id = 296; uint32_t data_value = 0x5a5a5a5a; RDMGetResponse response1(source, destination, 0, // transaction # ola::rdm::RDM_ACK, // response type 0, // message count 10, // sub device param_id, // param id reinterpret_cast(&data_value), sizeof(data_value)); // data length uint32_t data_value2 = 0xa5a5a5a5; RDMGetResponse response2(source, destination, 1, // transaction # ola::rdm::RDM_ACK, // response type 0, // message count 10, // sub device param_id, // param id reinterpret_cast(&data_value2), sizeof(data_value2)); // data length const RDMResponse *combined_response = RDMResponse::CombineResponses( &response1, &response2); OLA_ASSERT_NOT_NULL(combined_response); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND_RESPONSE, combined_response->CommandClass()); OLA_ASSERT_EQ(source, combined_response->SourceUID()); OLA_ASSERT_EQ(destination, combined_response->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, combined_response->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 0, combined_response->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, combined_response->SubDevice()); OLA_ASSERT_EQ(param_id, combined_response->ParamId()); OLA_ASSERT_EQ(8u, combined_response->ParamDataSize()); const uint8_t *combined_data = combined_response->ParamData(); const uint32_t expected_data[] = {0x5a5a5a5a, 0xa5a5a5a5}; OLA_ASSERT_EQ(0, memcmp(expected_data, combined_data, sizeof(expected_data))); delete combined_response; // try to combine with a response with no data RDMGetResponse response3(source, destination, 1, // transaction # ola::rdm::RDM_ACK, // response type 0, // message count 10, // sub device param_id, // param id NULL, 0); combined_response = RDMResponse::CombineResponses( &response1, &response3); OLA_ASSERT_NOT_NULL(combined_response); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND_RESPONSE, combined_response->CommandClass()); OLA_ASSERT_EQ(source, combined_response->SourceUID()); OLA_ASSERT_EQ(destination, combined_response->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, combined_response->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 0, combined_response->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, combined_response->SubDevice()); OLA_ASSERT_EQ(param_id, combined_response->ParamId()); OLA_ASSERT_EQ(4u, combined_response->ParamDataSize()); combined_data = combined_response->ParamData(); OLA_ASSERT_EQ(data_value, *(reinterpret_cast(combined_data))); delete combined_response; // combining a GetResponse with a SetResponse is invalid RDMSetResponse response4(source, destination, 1, // transaction # ola::rdm::RDM_ACK, // response type 0, // message count 10, // sub device param_id, // param id NULL, 0); combined_response = RDMResponse::CombineResponses( &response1, &response4); OLA_ASSERT_FALSE(combined_response); combined_response = RDMResponse::CombineResponses( &response4, &response1); OLA_ASSERT_FALSE(combined_response); // combine two set responses RDMSetResponse response5(source, destination, 0, // transaction # ola::rdm::RDM_ACK, // response type 0, // message count 10, // sub device param_id, // param id reinterpret_cast(&data_value), sizeof(data_value)); // data length combined_response = RDMResponse::CombineResponses( &response5, &response4); OLA_ASSERT_NOT_NULL(combined_response); OLA_ASSERT_EQ(RDMCommand::SET_COMMAND_RESPONSE, combined_response->CommandClass()); OLA_ASSERT_EQ(source, combined_response->SourceUID()); OLA_ASSERT_EQ(destination, combined_response->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, combined_response->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 0, combined_response->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, combined_response->SubDevice()); OLA_ASSERT_EQ(param_id, combined_response->ParamId()); OLA_ASSERT_EQ(4u, combined_response->ParamDataSize()); combined_data = combined_response->ParamData(); OLA_ASSERT_EQ(data_value, *(reinterpret_cast(combined_data))); delete combined_response; // combine two responses so that the size exceeds 231 bytes const unsigned int first_block_size = 200; const unsigned int second_block_size = 100; uint8_t data_block1[first_block_size]; uint8_t data_block2[second_block_size]; uint8_t expected_combined_data[first_block_size + second_block_size]; memset(data_block1, 0xff, first_block_size); memset(data_block2, 0xac, second_block_size); memcpy(expected_combined_data, data_block1, first_block_size); memcpy(expected_combined_data + first_block_size, data_block2, second_block_size); RDMSetResponse response6(source, destination, 0, // transaction # ola::rdm::RDM_ACK, // response type 0, // message count 10, // sub device param_id, // param id data_block1, sizeof(data_block1)); RDMSetResponse response7(source, destination, 1, // transaction # ola::rdm::RDM_ACK, // response type 0, // message count 10, // sub device param_id, // param id data_block2, sizeof(data_block2)); combined_response = RDMResponse::CombineResponses( &response6, &response7); OLA_ASSERT_NOT_NULL(combined_response); OLA_ASSERT_EQ(RDMCommand::SET_COMMAND_RESPONSE, combined_response->CommandClass()); OLA_ASSERT_EQ(source, combined_response->SourceUID()); OLA_ASSERT_EQ(destination, combined_response->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 0, combined_response->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 0, combined_response->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, combined_response->SubDevice()); OLA_ASSERT_EQ(param_id, combined_response->ParamId()); OLA_ASSERT_EQ(300u, combined_response->ParamDataSize()); OLA_ASSERT_DATA_EQUALS(expected_combined_data, first_block_size + second_block_size, combined_response->ParamData(), combined_response->ParamDataSize()); delete combined_response; } /** * Check the discovery command */ void RDMCommandTest::testDiscoveryCommand() { UID lower(0x0102, 0x0304); UID upper(0x0506, 0x0708); const uint8_t expected_data[] = { 1, 2, 0, 0, 3, 4, 5, 6, 0, 0, 7, 8 }; auto_ptr request( NewDiscoveryUniqueBranchRequest(m_source, lower, upper, 1)); OLA_ASSERT_EQ(RDMCommand::DISCOVER_COMMAND, request->CommandClass()); OLA_ASSERT_EQ(ola::rdm::SUB_START_CODE, request->SubStartCode()); OLA_ASSERT_EQ((uint8_t) 36, request->MessageLength()); OLA_ASSERT_EQ(m_source, request->SourceUID()); OLA_ASSERT_EQ(UID::AllDevices(), request->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 1, request->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 1, request->PortIdResponseType()); OLA_ASSERT_EQ((uint8_t) 1, request->PortId()); OLA_ASSERT_EQ((uint8_t) 0, request->MessageCount()); OLA_ASSERT_EQ((uint16_t) 0, request->SubDevice()); OLA_ASSERT_EQ(RDMCommand::DISCOVER_COMMAND, request->CommandClass()); OLA_ASSERT_EQ((uint16_t) 0x0001, request->ParamId()); OLA_ASSERT_DATA_EQUALS(expected_data, arraysize(expected_data), request->ParamData(), request->ParamDataSize()); OLA_ASSERT_EQ((uint16_t) 0, request->Checksum(0)); OLA_ASSERT_TRUE(request->IsDUB()); } /** * Check the mute command */ void RDMCommandTest::testMuteRequest() { auto_ptr request( NewMuteRequest(m_source, m_destination, 1)); OLA_ASSERT_EQ(ola::rdm::SUB_START_CODE, request->SubStartCode()); OLA_ASSERT_EQ((uint8_t) 24, request->MessageLength()); OLA_ASSERT_EQ(m_source, request->SourceUID()); OLA_ASSERT_EQ(m_destination, request->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 1, request->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 1, request->PortIdResponseType()); OLA_ASSERT_EQ((uint8_t) 1, request->PortId()); OLA_ASSERT_EQ((uint8_t) 0, request->MessageCount()); OLA_ASSERT_EQ((uint16_t) 0, request->SubDevice()); OLA_ASSERT_EQ(RDMCommand::DISCOVER_COMMAND, request->CommandClass()); OLA_ASSERT_EQ((uint16_t) 0x0002, request->ParamId()); OLA_ASSERT_NULL(request->ParamData()); OLA_ASSERT_EQ(0u, request->ParamDataSize()); OLA_ASSERT_EQ((uint16_t) 0, request->Checksum(0)); OLA_ASSERT_FALSE(request->IsDUB()); } /** * Check the UnMute Command */ void RDMCommandTest::testUnMuteRequest() { auto_ptr request( NewUnMuteRequest(m_source, m_destination, 1)); OLA_ASSERT_EQ(ola::rdm::SUB_START_CODE, request->SubStartCode()); OLA_ASSERT_EQ((uint8_t) 24, request->MessageLength()); OLA_ASSERT_EQ(m_source, request->SourceUID()); OLA_ASSERT_EQ(m_destination, request->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 1, request->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 1, request->PortIdResponseType()); OLA_ASSERT_EQ((uint8_t) 1, request->PortId()); OLA_ASSERT_EQ((uint8_t) 0, request->MessageCount()); OLA_ASSERT_EQ((uint16_t) 0, request->SubDevice()); OLA_ASSERT_EQ(RDMCommand::DISCOVER_COMMAND, request->CommandClass()); OLA_ASSERT_EQ((uint16_t) 0x0003, request->ParamId()); OLA_ASSERT_NULL(request->ParamData()); OLA_ASSERT_EQ(0u, request->ParamDataSize()); OLA_ASSERT_EQ((uint16_t) 0, request->Checksum(0)); OLA_ASSERT_FALSE(request->IsDUB()); } /** * Test that the generic InflateFromData method works. */ void RDMCommandTest::testCommandInflation() { const UID source(1, 2); const UID destination(3, 4); const UID lower(0x0102, 0x0304); const UID upper(0x0506, 0x0708); auto_ptr command(RDMCommand::Inflate(NULL, 10)); OLA_ASSERT_NULL(command.get()); command.reset(RDMCommand::Inflate(EXPECTED_GET_BUFFER, 0)); OLA_ASSERT_NULL(command.get()); command.reset(RDMRequest::Inflate(EXPECTED_GET_BUFFER, sizeof(EXPECTED_GET_BUFFER))); OLA_ASSERT_NOT_NULL(command.get()); RDMGetRequest expected_request(source, destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length OLA_ASSERT_TRUE(expected_request == *command); command.reset(RDMCommand::Inflate(EXPECTED_SET_BUFFER, sizeof(EXPECTED_SET_BUFFER))); OLA_ASSERT_NOT_NULL(command.get()); uint8_t expected_data[] = {0xa5, 0xa5, 0xa5, 0xa5}; OLA_ASSERT_EQ(4u, command->ParamDataSize()); OLA_ASSERT_EQ(0, memcmp(expected_data, command->ParamData(), command->ParamDataSize())); // now try a response. command.reset(RDMCommand::Inflate(EXPECTED_GET_RESPONSE_BUFFER, sizeof(EXPECTED_GET_RESPONSE_BUFFER))); OLA_ASSERT_NOT_NULL(command.get()); uint8_t expected_data2[] = {0x5a, 0x5a, 0x5a, 0x5a}; OLA_ASSERT_EQ(4u, command->ParamDataSize()); OLA_ASSERT_EQ(0, memcmp(expected_data2, command->ParamData(), command->ParamDataSize())); uint32_t data_value = 0x5a5a5a5a; RDMGetResponse expected_response(source, destination, 0, // transaction # 1, // port id 0, // message count 10, // sub device 296, // param id reinterpret_cast(&data_value), sizeof(data_value)); // data length OLA_ASSERT_TRUE(expected_response == *command); // test DUB command.reset(RDMCommand::Inflate(EXPECTED_DISCOVERY_REQUEST, sizeof(EXPECTED_DISCOVERY_REQUEST))); OLA_ASSERT_NOT_NULL(command.get()); auto_ptr discovery_request( NewDiscoveryUniqueBranchRequest(source, lower, upper, 1)); OLA_ASSERT_TRUE(*discovery_request == *command); // test mute command.reset(RDMCommand::Inflate(EXPECTED_MUTE_REQUEST, sizeof(EXPECTED_MUTE_REQUEST))); OLA_ASSERT_NOT_NULL(command.get()); discovery_request.reset(NewMuteRequest(source, destination, 1)); OLA_ASSERT_TRUE(*discovery_request == *command); // test unmute command.reset(RDMCommand::Inflate(EXPECTED_UNMUTE_REQUEST, sizeof(EXPECTED_UNMUTE_REQUEST))); OLA_ASSERT_NOT_NULL(command.get()); discovery_request.reset(NewUnMuteRequest(source, destination, 1)); OLA_ASSERT_TRUE(*discovery_request == *command); } void RDMCommandTest::testDiscoveryResponseInflation() { auto_ptr command; command.reset(RDMRequest::Inflate(MUTE_RESPONSE, arraysize(MUTE_RESPONSE))); OLA_ASSERT_NOT_NULL(command.get()); OLA_ASSERT_EQ(RDMCommand::DISCOVER_COMMAND_RESPONSE, command->CommandClass()); OLA_ASSERT_EQ((uint16_t) 2, command->ParamId()); OLA_ASSERT_EQ(0u, command->ParamDataSize()); } ola-0.10.9/common/rdm/FakeNetworkManager.h0000664000175000017500000000555414376533110015251 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * FakeNetworkManager.h * Talks to the machine's network systems to get/set data. * Copyright (C) 2013 Peter Newman */ #ifndef COMMON_RDM_FAKENETWORKMANAGER_H_ #define COMMON_RDM_FAKENETWORKMANAGER_H_ #include #include #include "common/network/FakeInterfacePicker.h" #include "ola/network/IPV4Address.h" #include "ola/network/Interface.h" #include "ola/network/InterfacePicker.h" #include "ola/rdm/NetworkManagerInterface.h" namespace ola { namespace rdm { /** * @brief An implementation of NetworkManagerInterface which simulates a * network configuration. */ class FakeNetworkManager : public NetworkManagerInterface { public: /** * @brief Create a new FakeNetworkManager * @param interfaces the interfaces to return * @param ipv4_default_route_if_index the interface that has the default gateway * @param ipv4_default_route the default gateway * @param hostname the hostname * @param domain_name the domain name * @param name_servers the name servers to return. */ FakeNetworkManager( const std::vector &interfaces, const int32_t ipv4_default_route_if_index, const ola::network::IPV4Address ipv4_default_route, const std::string &hostname, const std::string &domain_name, const std::vector &name_servers); ~FakeNetworkManager() {} const ola::network::InterfacePicker *GetInterfacePicker() const; rdm_dhcp_status GetDHCPStatus(const ola::network::Interface &iface) const; bool GetIPV4DefaultRoute( int32_t *if_index, ola::network::IPV4Address *default_route) const; const std::string GetHostname() const; const std::string GetDomainName() const; bool GetNameServers( std::vector *name_servers) const; private: ola::network::FakeInterfacePicker m_interface_picker; int32_t m_ipv4_default_route_if_index; ola::network::IPV4Address m_ipv4_default_route; std::string m_hostname; std::string m_domain_name; std::vector m_name_servers; }; } // namespace rdm } // namespace ola #endif // COMMON_RDM_FAKENETWORKMANAGER_H_ ola-0.10.9/common/rdm/ResponderLoadSensor.cpp0000664000175000017500000000232214376533110016012 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ResponderLoadSensor.cpp * Copyright (C) 2013 Peter Newman */ #include "ola/Logging.h" #include "ola/rdm/ResponderLoadSensor.h" #include "ola/system/SystemUtils.h" namespace ola { namespace rdm { /** * Fetch a Sensor value */ int16_t LoadSensor::PollSensor() { double average; if (!ola::system::LoadAverage(m_load_average, &average)) { return LOAD_SENSOR_ERROR_VALUE; } else { return static_cast(average * 100); } } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/VariableFieldSizeCalculatorTest.cpp0000664000175000017500000002752414376533110020270 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * VariableFieldSizeCalculatorTest.cpp * Test fixture for the VariableFieldSizeCalculator. * Copyright (C) 2011 Simon Newton */ #include #include #include "ola/testing/TestUtils.h" #include "ola/Logging.h" #include "ola/messaging/Descriptor.h" #include "common/rdm/VariableFieldSizeCalculator.h" using ola::messaging::BoolFieldDescriptor; using ola::messaging::IPV4FieldDescriptor; using ola::messaging::Descriptor; using ola::messaging::FieldDescriptor; using ola::messaging::FieldDescriptorGroup; using ola::messaging::Int16FieldDescriptor; using ola::messaging::Int32FieldDescriptor; using ola::messaging::Int8FieldDescriptor; using ola::messaging::StringFieldDescriptor; using ola::messaging::UInt16FieldDescriptor; using ola::messaging::UInt32FieldDescriptor; using ola::messaging::UInt8FieldDescriptor; using ola::messaging::UIDFieldDescriptor; using ola::rdm::VariableFieldSizeCalculator; using std::vector; class VariableFieldSizeCalculatorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(VariableFieldSizeCalculatorTest); CPPUNIT_TEST(testFixedFields); CPPUNIT_TEST(testStringFields); CPPUNIT_TEST(testWithFixedGroups); CPPUNIT_TEST(testSingleVariableSizedGroup); CPPUNIT_TEST(testMultipleVariableSizedFields); CPPUNIT_TEST(testNestedVariableSizedGroups); CPPUNIT_TEST_SUITE_END(); public: void testFixedFields(); void testStringFields(); void testWithFixedGroups(); void testSingleVariableSizedGroup(); void testMultipleVariableSizedFields(); void testNestedVariableSizedGroups(); private: ola::rdm::VariableFieldSizeCalculator m_calculator; }; CPPUNIT_TEST_SUITE_REGISTRATION(VariableFieldSizeCalculatorTest); /** * Test that we can determine the token count for descriptors that contain only * fixed fields. */ void VariableFieldSizeCalculatorTest::testFixedFields() { vector fields; fields.push_back(new BoolFieldDescriptor("bool1")); fields.push_back(new IPV4FieldDescriptor("ip1")); fields.push_back(new UIDFieldDescriptor("ip1")); fields.push_back(new UInt8FieldDescriptor("uint8")); fields.push_back(new UInt16FieldDescriptor("uint16")); fields.push_back(new UInt32FieldDescriptor("uint32")); fields.push_back(new Int8FieldDescriptor("int8")); fields.push_back(new Int16FieldDescriptor("int16")); fields.push_back(new Int32FieldDescriptor("int32")); Descriptor descriptor("Test Descriptor", fields); unsigned int variable_field_size; OLA_ASSERT_EQ( VariableFieldSizeCalculator::TOO_SMALL, m_calculator.CalculateFieldSize( 0, &descriptor, &variable_field_size)); OLA_ASSERT_EQ( VariableFieldSizeCalculator::TOO_SMALL, m_calculator.CalculateFieldSize( 1, &descriptor, &variable_field_size)); OLA_ASSERT_EQ( VariableFieldSizeCalculator::TOO_SMALL, m_calculator.CalculateFieldSize( 14, &descriptor, &variable_field_size)); OLA_ASSERT_EQ( VariableFieldSizeCalculator::FIXED_SIZE, m_calculator.CalculateFieldSize( 25, &descriptor, &variable_field_size)); OLA_ASSERT_EQ( VariableFieldSizeCalculator::TOO_LARGE, m_calculator.CalculateFieldSize( 26, &descriptor, &variable_field_size)); } /** * Check that we can work out the size for variable sized string fields */ void VariableFieldSizeCalculatorTest::testStringFields() { vector fields; fields.push_back(new UInt8FieldDescriptor("uint8")); fields.push_back(new UInt16FieldDescriptor("uint16")); fields.push_back(new StringFieldDescriptor("str1", 0, 32)); Descriptor descriptor("Test Descriptor", fields); // set this to something large so we can verify it's set correctly unsigned int variable_field_size = 2000; OLA_ASSERT_EQ( VariableFieldSizeCalculator::TOO_SMALL, m_calculator.CalculateFieldSize( 0, &descriptor, &variable_field_size)); OLA_ASSERT_EQ( VariableFieldSizeCalculator::TOO_SMALL, m_calculator.CalculateFieldSize( 2, &descriptor, &variable_field_size)); OLA_ASSERT_EQ( VariableFieldSizeCalculator::VARIABLE_STRING, m_calculator.CalculateFieldSize( 3, &descriptor, &variable_field_size)); OLA_ASSERT_EQ(0u, variable_field_size); OLA_ASSERT_EQ( VariableFieldSizeCalculator::VARIABLE_STRING, m_calculator.CalculateFieldSize( 4, &descriptor, &variable_field_size)); OLA_ASSERT_EQ(1u, variable_field_size); OLA_ASSERT_EQ( VariableFieldSizeCalculator::VARIABLE_STRING, m_calculator.CalculateFieldSize( 34, &descriptor, &variable_field_size)); OLA_ASSERT_EQ(31u, variable_field_size); OLA_ASSERT_EQ( VariableFieldSizeCalculator::VARIABLE_STRING, m_calculator.CalculateFieldSize( 35, &descriptor, &variable_field_size)); OLA_ASSERT_EQ(32u, variable_field_size); OLA_ASSERT_EQ( VariableFieldSizeCalculator::TOO_LARGE, m_calculator.CalculateFieldSize( 36, &descriptor, &variable_field_size)); } /** * Check the calculators work with fixed groups. */ void VariableFieldSizeCalculatorTest::testWithFixedGroups() { vector group_fields, group_fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); group_fields2.push_back(new Int16FieldDescriptor("int16")); group_fields2.push_back(new UInt16FieldDescriptor("uint16")); vector fields; fields.push_back(new FieldDescriptorGroup("", group_fields, 2, 2)); fields.push_back(new FieldDescriptorGroup("", group_fields2, 2, 2)); Descriptor descriptor("Test Descriptor", fields); unsigned int variable_field_size; OLA_ASSERT_EQ( VariableFieldSizeCalculator::TOO_SMALL, m_calculator.CalculateFieldSize( 11, &descriptor, &variable_field_size)); OLA_ASSERT_EQ( VariableFieldSizeCalculator::FIXED_SIZE, m_calculator.CalculateFieldSize( 12, &descriptor, &variable_field_size)); OLA_ASSERT_EQ( VariableFieldSizeCalculator::TOO_LARGE, m_calculator.CalculateFieldSize( 13, &descriptor, &variable_field_size)); } /* * Test that a single variable-sized group passes */ void VariableFieldSizeCalculatorTest::testSingleVariableSizedGroup() { vector group_fields; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); vector fields; fields.push_back(new UInt8FieldDescriptor("uint8")); fields.push_back(new UInt16FieldDescriptor("uint16")); fields.push_back(new FieldDescriptorGroup("", group_fields, 0, 2)); Descriptor descriptor("Test Descriptor", fields); unsigned int variable_field_size; OLA_ASSERT_EQ( VariableFieldSizeCalculator::TOO_SMALL, m_calculator.CalculateFieldSize( 2, &descriptor, &variable_field_size)); OLA_ASSERT_EQ( VariableFieldSizeCalculator::VARIABLE_GROUP, m_calculator.CalculateFieldSize( 3, &descriptor, &variable_field_size)); OLA_ASSERT_EQ(0u, variable_field_size); OLA_ASSERT_EQ( VariableFieldSizeCalculator::MISMATCHED_SIZE, m_calculator.CalculateFieldSize( 4, &descriptor, &variable_field_size)); OLA_ASSERT_EQ( VariableFieldSizeCalculator::VARIABLE_GROUP, m_calculator.CalculateFieldSize( 5, &descriptor, &variable_field_size)); OLA_ASSERT_EQ(1u, variable_field_size); OLA_ASSERT_EQ( VariableFieldSizeCalculator::MISMATCHED_SIZE, m_calculator.CalculateFieldSize( 6, &descriptor, &variable_field_size)); OLA_ASSERT_EQ( VariableFieldSizeCalculator::VARIABLE_GROUP, m_calculator.CalculateFieldSize( 7, &descriptor, &variable_field_size)); OLA_ASSERT_EQ(2u, variable_field_size); OLA_ASSERT_EQ( VariableFieldSizeCalculator::TOO_LARGE, m_calculator.CalculateFieldSize( 8, &descriptor, &variable_field_size)); } /* * Test that multiple variable-sized groups fail */ void VariableFieldSizeCalculatorTest::testMultipleVariableSizedFields() { // first try a descriptor with two strings vector fields; fields.push_back(new StringFieldDescriptor("str1", 0, 10)); fields.push_back(new StringFieldDescriptor("str2", 0 , 10)); Descriptor string_descriptor("Test Descriptor", fields); unsigned int variable_field_size; OLA_ASSERT_EQ( VariableFieldSizeCalculator::MULTIPLE_VARIABLE_FIELDS, m_calculator.CalculateFieldSize( 0, &string_descriptor, &variable_field_size)); // now try a variable group and a variable string vector group_fields, fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); fields2.push_back(new StringFieldDescriptor("str1", 0, 10)); fields2.push_back(new FieldDescriptorGroup("", group_fields, 0, 2)); Descriptor string_group_descriptor("Test Descriptor", fields2); OLA_ASSERT_EQ( VariableFieldSizeCalculator::MULTIPLE_VARIABLE_FIELDS, m_calculator.CalculateFieldSize( 0, &string_group_descriptor, &variable_field_size)); // now do multiple variable sized groups vector group_fields1, group_fields2, fields3; group_fields1.push_back(new BoolFieldDescriptor("bool")); group_fields1.push_back(new UInt8FieldDescriptor("uint8")); group_fields2.push_back(new BoolFieldDescriptor("bool")); group_fields2.push_back(new UInt8FieldDescriptor("uint8")); fields3.push_back(new FieldDescriptorGroup("", group_fields1, 0, 2)); fields3.push_back(new FieldDescriptorGroup("", group_fields2, 0, 2)); Descriptor multi_group_descriptor("Test Descriptor", fields3); OLA_ASSERT_EQ( VariableFieldSizeCalculator::MULTIPLE_VARIABLE_FIELDS, m_calculator.CalculateFieldSize( 0, &multi_group_descriptor, &variable_field_size)); } /* * Test that a nested, variable sized groups fail */ void VariableFieldSizeCalculatorTest::testNestedVariableSizedGroups() { vector fields, group_fields, group_fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); group_fields2.push_back(new Int16FieldDescriptor("int16")); group_fields2.push_back(new FieldDescriptorGroup("", group_fields, 0, 2)); const FieldDescriptorGroup *nested_variable_group = new FieldDescriptorGroup( "", group_fields2, 0, 4); fields.push_back(new Int16FieldDescriptor("int16")); fields.push_back(nested_variable_group); Descriptor descriptor("Test Descriptor", fields); unsigned int variable_field_size; // now check the main calculator. OLA_ASSERT_EQ( VariableFieldSizeCalculator::NESTED_VARIABLE_GROUPS, m_calculator.CalculateFieldSize( 10, &descriptor, &variable_field_size)); } ola-0.10.9/common/rdm/DummyResponder.cpp0000664000175000017500000003343214376533110015042 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DummyResponder.cpp * Copyright (C) 2005 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include "ola/base/Array.h" #include "ola/Clock.h" #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/DummyResponder.h" #include "common/rdm/NetworkManager.h" #include "ola/rdm/OpenLightingEnums.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/ResponderHelper.h" #include "ola/rdm/ResponderLoadSensor.h" #include "ola/rdm/ResponderSensor.h" #include "ola/stl/STLUtils.h" namespace ola { namespace rdm { using ola::network::HostToNetwork; using ola::network::NetworkToHost; using std::string; using std::vector; DummyResponder::RDMOps *DummyResponder::RDMOps::instance = NULL; const DummyResponder::Personalities * DummyResponder::Personalities::Instance() { if (!instance) { SlotDataCollection::SlotDataList p2_slot_data; p2_slot_data.push_back(SlotData::PrimarySlot(SD_INTENSITY, 0)); p2_slot_data.push_back(SlotData::SecondarySlot(ST_SEC_FINE, 0, 0)); p2_slot_data.push_back(SlotData::PrimarySlot(SD_PAN, 127)); p2_slot_data.push_back(SlotData::PrimarySlot(SD_TILT, 127)); p2_slot_data.push_back(SlotData::PrimarySlot(SD_UNDEFINED, 0, "Foo")); PersonalityList personalities; personalities.push_back(Personality(0, "Personality 1")); personalities.push_back(Personality(5, "Personality 2", SlotDataCollection(p2_slot_data))); personalities.push_back(Personality(10, "Personality 3")); personalities.push_back(Personality(20, "Personality 4")); instance = new Personalities(personalities); } return instance; } DummyResponder::Personalities * DummyResponder::Personalities::instance = NULL; const ResponderOps::ParamHandler DummyResponder::PARAM_HANDLERS[] = { { PID_PARAMETER_DESCRIPTION, &DummyResponder::GetParamDescription, NULL}, { PID_DEVICE_INFO, &DummyResponder::GetDeviceInfo, NULL}, { PID_PRODUCT_DETAIL_ID_LIST, &DummyResponder::GetProductDetailList, NULL}, { PID_DEVICE_MODEL_DESCRIPTION, &DummyResponder::GetDeviceModelDescription, NULL}, { PID_MANUFACTURER_LABEL, &DummyResponder::GetManufacturerLabel, NULL}, { PID_DEVICE_LABEL, &DummyResponder::GetDeviceLabel, NULL}, { PID_FACTORY_DEFAULTS, &DummyResponder::GetFactoryDefaults, &DummyResponder::SetFactoryDefaults}, { PID_SOFTWARE_VERSION_LABEL, &DummyResponder::GetSoftwareVersionLabel, NULL}, { PID_DMX_PERSONALITY, &DummyResponder::GetPersonality, &DummyResponder::SetPersonality}, { PID_DMX_PERSONALITY_DESCRIPTION, &DummyResponder::GetPersonalityDescription, NULL}, { PID_SLOT_INFO, &DummyResponder::GetSlotInfo, NULL}, { PID_SLOT_DESCRIPTION, &DummyResponder::GetSlotDescription, NULL}, { PID_DEFAULT_SLOT_VALUE, &DummyResponder::GetSlotDefaultValues, NULL}, { PID_DMX_START_ADDRESS, &DummyResponder::GetDmxStartAddress, &DummyResponder::SetDmxStartAddress}, { PID_LAMP_STRIKES, &DummyResponder::GetLampStrikes, &DummyResponder::SetLampStrikes}, { PID_IDENTIFY_DEVICE, &DummyResponder::GetIdentify, &DummyResponder::SetIdentify}, { PID_REAL_TIME_CLOCK, &DummyResponder::GetRealTimeClock, NULL}, #ifdef HAVE_GETLOADAVG { PID_SENSOR_DEFINITION, &DummyResponder::GetSensorDefinition, NULL}, { PID_SENSOR_VALUE, &DummyResponder::GetSensorValue, &DummyResponder::SetSensorValue}, { PID_RECORD_SENSORS, NULL, &DummyResponder::RecordSensor}, #endif // HAVE_GETLOADAVG { PID_LIST_INTERFACES, &DummyResponder::GetListInterfaces, NULL}, { PID_INTERFACE_LABEL, &DummyResponder::GetInterfaceLabel, NULL}, { PID_INTERFACE_HARDWARE_ADDRESS_TYPE1, &DummyResponder::GetInterfaceHardwareAddressType1, NULL}, { PID_IPV4_CURRENT_ADDRESS, &DummyResponder::GetIPV4CurrentAddress, NULL}, { PID_IPV4_DEFAULT_ROUTE, &DummyResponder::GetIPV4DefaultRoute, NULL}, { PID_DNS_HOSTNAME, &DummyResponder::GetDNSHostname, NULL}, { PID_DNS_DOMAIN_NAME, &DummyResponder::GetDNSDomainName, NULL}, { PID_DNS_NAME_SERVER, &DummyResponder::GetDNSNameServer, NULL}, { OLA_MANUFACTURER_PID_CODE_VERSION, &DummyResponder::GetOlaCodeVersion, NULL}, { 0, NULL, NULL}, }; DummyResponder::DummyResponder(const UID &uid) : m_uid(uid), m_start_address(1), m_identify_mode(0), m_lamp_strikes(0), m_personality_manager(Personalities::Instance()) { // default to a personality with a non-0 footprint. m_personality_manager.SetActivePersonality(DEFAULT_PERSONALITY); #ifdef HAVE_GETLOADAVG m_sensors.push_back(new LoadSensor(ola::system::LOAD_AVERAGE_1_MIN, "Load Average 1 minute")); m_sensors.push_back(new LoadSensor(ola::system::LOAD_AVERAGE_5_MINS, "Load Average 5 minutes")); m_sensors.push_back(new LoadSensor(ola::system::LOAD_AVERAGE_15_MINS, "Load Average 15 minutes")); #endif // HAVE_GETLOADAVG m_network_manager.reset(new NetworkManager()); } DummyResponder::~DummyResponder() { STLDeleteElements(&m_sensors); } /* * Handle an RDM Request */ void DummyResponder::SendRDMRequest(RDMRequest *request, RDMCallback *callback) { RDMOps::Instance()->HandleRDMRequest(this, m_uid, ola::rdm::ROOT_RDM_DEVICE, request, callback); } RDMResponse *DummyResponder::GetParamDescription( const RDMRequest *request) { // Check that it's OLA_MANUFACTURER_PID_CODE_VERSION being requested uint16_t parameter_id; if (!ResponderHelper::ExtractUInt16(request, ¶meter_id)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (parameter_id != OLA_MANUFACTURER_PID_CODE_VERSION) { OLA_WARN << "Dummy responder received param description request with " "unknown PID, expected " << OLA_MANUFACTURER_PID_CODE_VERSION << ", got " << parameter_id; return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } else { return ResponderHelper::GetASCIIParamDescription( request, OLA_MANUFACTURER_PID_CODE_VERSION, CC_GET, "Code Version"); } } RDMResponse *DummyResponder::GetDeviceInfo(const RDMRequest *request) { return ResponderHelper::GetDeviceInfo( request, OLA_DUMMY_DEVICE_MODEL, PRODUCT_CATEGORY_OTHER, 3, &m_personality_manager, m_start_address, 0, m_sensors.size()); } /** * Reset to factory defaults */ RDMResponse *DummyResponder::GetFactoryDefaults( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } uint8_t using_defaults = ( m_start_address == 1 && m_personality_manager.ActivePersonalityNumber() == DEFAULT_PERSONALITY && m_identify_mode == false); return GetResponseFromData(request, &using_defaults, sizeof(using_defaults)); } RDMResponse *DummyResponder::SetFactoryDefaults( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } m_start_address = 1; m_personality_manager.SetActivePersonality(DEFAULT_PERSONALITY); m_identify_mode = 0; return ResponderHelper::EmptySetResponse(request); } RDMResponse *DummyResponder::GetProductDetailList( const RDMRequest *request) { vector product_details; product_details.push_back(PRODUCT_DETAIL_TEST); product_details.push_back(PRODUCT_DETAIL_OTHER); return ResponderHelper::GetProductDetailList(request, product_details); } RDMResponse *DummyResponder::GetPersonality( const RDMRequest *request) { return ResponderHelper::GetPersonality(request, &m_personality_manager); } RDMResponse *DummyResponder::SetPersonality( const RDMRequest *request) { return ResponderHelper::SetPersonality(request, &m_personality_manager, m_start_address); } RDMResponse *DummyResponder::GetPersonalityDescription( const RDMRequest *request) { return ResponderHelper::GetPersonalityDescription( request, &m_personality_manager); } RDMResponse *DummyResponder::GetSlotInfo(const RDMRequest *request) { return ResponderHelper::GetSlotInfo(request, &m_personality_manager); } RDMResponse *DummyResponder::GetSlotDescription( const RDMRequest *request) { return ResponderHelper::GetSlotDescription(request, &m_personality_manager); } RDMResponse *DummyResponder::GetSlotDefaultValues( const RDMRequest *request) { return ResponderHelper::GetSlotDefaultValues(request, &m_personality_manager); } RDMResponse *DummyResponder::GetDmxStartAddress( const RDMRequest *request) { return ResponderHelper::GetDmxAddress(request, &m_personality_manager, m_start_address); } RDMResponse *DummyResponder::SetDmxStartAddress( const RDMRequest *request) { return ResponderHelper::SetDmxAddress(request, &m_personality_manager, &m_start_address); } RDMResponse *DummyResponder::GetLampStrikes(const RDMRequest *request) { return ResponderHelper::GetUInt32Value(request, m_lamp_strikes); } RDMResponse *DummyResponder::SetLampStrikes(const RDMRequest *request) { return ResponderHelper::SetUInt32Value(request, &m_lamp_strikes); } RDMResponse *DummyResponder::GetIdentify(const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_identify_mode); } RDMResponse *DummyResponder::SetIdentify(const RDMRequest *request) { bool old_value = m_identify_mode; RDMResponse *response = ResponderHelper::SetBoolValue( request, &m_identify_mode); if (m_identify_mode != old_value) { OLA_INFO << "Dummy device, identify mode " << (m_identify_mode ? "on" : "off"); } return response; } RDMResponse *DummyResponder::GetRealTimeClock(const RDMRequest *request) { return ResponderHelper::GetRealTimeClock(request); } RDMResponse *DummyResponder::GetManufacturerLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, OLA_MANUFACTURER_LABEL); } RDMResponse *DummyResponder::GetDeviceLabel(const RDMRequest *request) { return ResponderHelper::GetString(request, "Dummy RDM Device"); } RDMResponse *DummyResponder::GetDeviceModelDescription( const RDMRequest *request) { return ResponderHelper::GetString(request, "Dummy Model"); } RDMResponse *DummyResponder::GetSoftwareVersionLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, "Dummy Software Version"); } /** * PID_SENSOR_DEFINITION */ RDMResponse *DummyResponder::GetSensorDefinition( const RDMRequest *request) { return ResponderHelper::GetSensorDefinition(request, m_sensors); } /** * PID_SENSOR_VALUE */ RDMResponse *DummyResponder::GetSensorValue(const RDMRequest *request) { return ResponderHelper::GetSensorValue(request, m_sensors); } RDMResponse *DummyResponder::SetSensorValue(const RDMRequest *request) { return ResponderHelper::SetSensorValue(request, m_sensors); } /** * PID_RECORD_SENSORS */ RDMResponse *DummyResponder::RecordSensor(const RDMRequest *request) { return ResponderHelper::RecordSensor(request, m_sensors); } /** * E1.37-2 PIDs */ RDMResponse *DummyResponder::GetListInterfaces( const RDMRequest *request) { return ResponderHelper::GetListInterfaces(request, m_network_manager.get()); } RDMResponse *DummyResponder::GetInterfaceLabel( const RDMRequest *request) { return ResponderHelper::GetInterfaceLabel(request, m_network_manager.get()); } RDMResponse *DummyResponder::GetInterfaceHardwareAddressType1( const RDMRequest *request) { return ResponderHelper::GetInterfaceHardwareAddressType1( request, m_network_manager.get()); } RDMResponse *DummyResponder::GetIPV4CurrentAddress( const RDMRequest *request) { return ResponderHelper::GetIPV4CurrentAddress(request, m_network_manager.get()); } RDMResponse *DummyResponder::GetIPV4DefaultRoute( const RDMRequest *request) { return ResponderHelper::GetIPV4DefaultRoute(request, m_network_manager.get()); } RDMResponse *DummyResponder::GetDNSHostname( const RDMRequest *request) { return ResponderHelper::GetDNSHostname(request, m_network_manager.get()); } RDMResponse *DummyResponder::GetDNSDomainName( const RDMRequest *request) { return ResponderHelper::GetDNSDomainName(request, m_network_manager.get()); } RDMResponse *DummyResponder::GetDNSNameServer( const RDMRequest *request) { return ResponderHelper::GetDNSNameServer(request, m_network_manager.get()); } RDMResponse *DummyResponder::GetOlaCodeVersion( const RDMRequest *request) { return ResponderHelper::GetString(request, VERSION); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/RDMAPI.cpp0000664000175000017500000034776414376533110013061 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMAPI.cpp * Provides a generic RDM API that can use different implementations. * Copyright (C) 2010 Simon Newton */ #include #include #include #include #include #include #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/base/Macro.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/RDMAPI.h" #include "ola/rdm/RDMAPIImplInterface.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/UID.h" namespace ola { namespace rdm { using std::map; using std::string; using std::vector; using ola::SingleUseCallback1; using ola::SingleUseCallback2; using ola::SingleUseCallback4; using ola::network::HostToNetwork; using ola::network::NetworkToHost; /* * Return the number of queues messages for a UID. Note that this is cached on * the client side so this number may not be correct. * @param uid the UID to fetch the outstanding message count for * @return the number of outstanding messages */ uint8_t RDMAPI::OutstandingMessagesCount(const UID &uid) { map::const_iterator iter = m_outstanding_messages.find(uid); if (iter == m_outstanding_messages.end()) return 0; return iter->second; } /* * Fetch a count of the proxied devices * @param uid the UID of the device to address this message to * @param callback the Callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return false if an error occurred, true otherwise */ bool RDMAPI::GetProxiedDeviceCount( unsigned int universe, const UID &uid, SingleUseCallback3 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetProxiedDeviceCount, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, ROOT_RDM_DEVICE, PID_PROXIED_DEVICE_COUNT), error); } /* * Fetch a list of the proxied devices * @param uid the UID of the device to address this message to * @param callback the Callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return false if an error occurred, true otherwise */ bool RDMAPI::GetProxiedDevices( unsigned int universe, const UID &uid, SingleUseCallback2&> *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetProxiedDevices, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, ROOT_RDM_DEVICE, PID_PROXIED_DEVICES), error); } /* * Get the communication status report * @param uid the UID of the device to address this message to * @param callback the Callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return false if an error occurred, true otherwise */ bool RDMAPI::GetCommStatus( unsigned int universe, const UID &uid, SingleUseCallback4 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetCommStatus, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, ROOT_RDM_DEVICE, PID_COMMS_STATUS), error); } /* * Clear the Communication status * @param uid the UID of the device to address this message to * @param callback the Callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return false if an error occurred, true otherwise */ bool RDMAPI::ClearCommStatus( unsigned int universe, const UID &uid, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, ROOT_RDM_DEVICE, PID_COMMS_STATUS), error); } /** * Send a queued message request. */ bool RDMAPI::GetQueuedMessage( unsigned int universe, const UID &uid, rdm_status_type status_type, QueuedMessageHandler *handler, string *error) { if (!handler) { if (error) *error = "Callback is null, this is a programming error"; return false; } RDMAPIImplInterface::rdm_pid_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleQueuedMessage, handler); uint8_t type = status_type; return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, ROOT_RDM_DEVICE, PID_QUEUED_MESSAGE, &type, sizeof(type)), error); } /** * Send a queued message request. When complete the callback will be run and * it's up to the caller to decode the message based on the PID. */ bool RDMAPI::GetQueuedMessage( unsigned int universe, const UID &uid, rdm_status_type status_type, SingleUseCallback3 *callback, string *error) { if (CheckCallback(error, callback)) return false; uint8_t type = status_type; return CheckReturnStatus( m_impl->RDMGet(callback, universe, uid, ROOT_RDM_DEVICE, PID_QUEUED_MESSAGE, &type, sizeof(type)), error); } /* * Get the status information from a device * @param uid the UID of the device to address this message to * @param status_type the Status Type requested * @param callback the Callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return false if an error occurred, true otherwise */ bool RDMAPI::GetStatusMessage( unsigned int universe, const UID &uid, rdm_status_type status_type, SingleUseCallback2&> *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetStatusMessage, callback); uint8_t type = static_cast(status_type); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, ROOT_RDM_DEVICE, PID_STATUS_MESSAGES, &type, sizeof(type)), error); } /* * Fetch the description for a status id * @param uid the UID of the device to address this message to * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetStatusIdDescription( unsigned int universe, const UID &uid, uint16_t status_id, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleLabelResponse, callback); status_id = HostToNetwork(status_id); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, ROOT_RDM_DEVICE, PID_STATUS_ID_DESCRIPTION, reinterpret_cast(&status_id), sizeof(status_id)), error); } /* * Clear the status message queue * @param uid the UID of the device to address this message to * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::ClearStatusId( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_CLEAR_STATUS_ID), error); } /* * Get the reporting threshold for a device * @param uid the UID of the device to address this message to * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetSubDeviceReporting( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetSubDeviceReporting, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_SUB_DEVICE_STATUS_REPORT_THRESHOLD), error); } /* * Set the reporting threshold for a device * @param uid the UID of the device to address this message to * @param sub_device the sub device to use * @param status_type the Status Type to set the threshold as * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetSubDeviceReporting( unsigned int universe, const UID &uid, uint16_t sub_device, rdm_status_type status_type, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); uint8_t type = static_cast(status_type); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, ROOT_RDM_DEVICE, PID_SUB_DEVICE_STATUS_REPORT_THRESHOLD, &type, sizeof(type)), error); } /* * Fetch the supported parameters list * @param uid the UID of the device to address this message to * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetSupportedParameters( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2&> *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetSupportedParameters, callback); return m_impl->RDMGet(cb, universe, uid, sub_device, PID_SUPPORTED_PARAMETERS); } /* * Fetch the description of a param ID * @param uid the UID of the device to address this message to * @param pid the parameter id to fetch the description for * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetParameterDescription( unsigned int universe, const UID &uid, uint16_t pid, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetParameterDescriptor, callback); pid = HostToNetwork(pid); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, ROOT_RDM_DEVICE, PID_PARAMETER_DESCRIPTION, reinterpret_cast(&pid), sizeof(pid)), error); } /* * Fetch the device information * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDeviceInfo( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetDeviceDescriptor, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_DEVICE_INFO), error); } /* * Fetch the product detail IDs. * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetProductDetailIdList( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2&> *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetProductDetailIdList, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_PRODUCT_DETAIL_ID_LIST), error); } /* * Fetch the description for a device model. * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDeviceModelDescription( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleLabelResponse, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_DEVICE_MODEL_DESCRIPTION), error); } /* * Fetch the manufacturer label for a device * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetManufacturerLabel( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleLabelResponse, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_MANUFACTURER_LABEL), error); } /* * Fetch the device label * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDeviceLabel( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleLabelResponse, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_DEVICE_LABEL), error); } /* * Set the device label * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetDeviceLabel( unsigned int universe, const UID &uid, uint16_t sub_device, const string &label, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; // It doesn't really make sense to broadcast this but allow it anyway if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_DEVICE_LABEL, reinterpret_cast(label.data()), label.size()), error); } /* * Check if a device is using the factory defaults * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetFactoryDefaults( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleBoolResponse, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_FACTORY_DEFAULTS), error); } /* * Reset a device to factory defaults * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::ResetToFactoryDefaults( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_FACTORY_DEFAULTS), error); } /* * Get the list of languages this device supports * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetLanguageCapabilities( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2&> *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetLanguageCapabilities, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_LANGUAGE_CAPABILITIES), error); } /* * Get the language for this device * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetLanguage( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetLanguage, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_LANGUAGE), error); } /* * Set the language for this device * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param language the language code, only the first two characters are used * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetLanguage( unsigned int universe, const UID &uid, uint16_t sub_device, const string &language, SingleUseCallback1 *callback, string *error) { static const unsigned int DATA_SIZE = 2; if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; if (language.size() != DATA_SIZE) { if (error) *error = "Language must be a two letter code"; delete callback; return false; } RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_LANGUAGE, reinterpret_cast(language.data()), DATA_SIZE), error); } /* * Get the software version label * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetSoftwareVersionLabel( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleLabelResponse, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_SOFTWARE_VERSION_LABEL), error); } /* * Get the boot software version. * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetBootSoftwareVersion( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetBootSoftwareVersion, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_BOOT_SOFTWARE_VERSION_ID), error); } /* * Get the boot software version label * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetBootSoftwareVersionLabel( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleLabelResponse, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_BOOT_SOFTWARE_VERSION_LABEL), error); } /* * Get the current DMX personality * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDMXPersonality( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback3 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetDMXPersonality, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_DMX_PERSONALITY), error); } /* * Set the DMX personality * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param personality the value of the personality to choose * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetDMXPersonality( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t personality, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_DMX_PERSONALITY, &personality, sizeof(personality)), error); } /* * Get the description for a DMX personality * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param personality the value of the personality to get the description of * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDMXPersonalityDescription( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t personality, SingleUseCallback4 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetDMXPersonalityDescription, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_DMX_PERSONALITY_DESCRIPTION, &personality, sizeof(personality)), error); } /* * Get the DMX start address * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDMXAddress( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetDMXAddress, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_DMX_START_ADDRESS), error); } /* * Set the DMX start address * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param start_address the new start address * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetDMXAddress( unsigned int universe, const UID &uid, uint16_t sub_device, uint16_t start_address, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; start_address = HostToNetwork(start_address); RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_DMX_START_ADDRESS, reinterpret_cast(&start_address), sizeof(start_address)), error); } /* * Fetch the DMX slot info * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetSlotInfo( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2&> *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetSlotInfo, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_SLOT_INFO), error); } /* * Fetch a DMX slot description * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param slot_offset the offset of the slot to get the description of * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetSlotDescription( unsigned int universe, const UID &uid, uint16_t sub_device, uint16_t slot_offset, SingleUseCallback3 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; slot_offset = HostToNetwork(slot_offset); RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetSlotDescription, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_SLOT_DESCRIPTION, reinterpret_cast(&slot_offset), sizeof(slot_offset)), error); } /* * Get the default value for a slot * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetSlotDefaultValues( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2&> *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetSlotDefaultValues, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_DEFAULT_SLOT_VALUE), error); } /* * Get the definition for a sensor * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param sensor_number the sensor index to get the descriptor for * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetSensorDefinition( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t sensor_number, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleGetSensorDefinition, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_SENSOR_DEFINITION, &sensor_number, sizeof(sensor_number)), error); } /* * Get the value of a sensor * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param sensor_number the sensor index to get the value of * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetSensorValue( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t sensor_number, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleSensorValue, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_SENSOR_VALUE, &sensor_number, sizeof(sensor_number)), error); } /* * Reset a sensor * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param sensor_number the sensor index to reset * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetSensorValue( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t sensor_number, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleSensorValue, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_SENSOR_VALUE, &sensor_number, sizeof(sensor_number)), error); } /* * Put a sensor into record mode * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param sensor_number the sensor index to record * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::RecordSensors( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t sensor_number, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_RECORD_SENSORS, &sensor_number, sizeof(sensor_number)), error); } /* * Get the device hours * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDeviceHours( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericGetU32( universe, uid, sub_device, callback, PID_DEVICE_HOURS, error); } /* * Set the device hours * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param device_hours the number of device hours * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetDeviceHours( unsigned int universe, const UID &uid, uint16_t sub_device, uint32_t device_hours, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericSetU32( universe, uid, sub_device, device_hours, callback, PID_DEVICE_HOURS, error); } /* * Get the lamp hours * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetLampHours( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericGetU32( universe, uid, sub_device, callback, PID_LAMP_HOURS, error); } /* * Set the lamp hours * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param lamp_hours the number of lamp hours * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetLampHours( unsigned int universe, const UID &uid, uint16_t sub_device, uint32_t lamp_hours, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericSetU32( universe, uid, sub_device, lamp_hours, callback, PID_LAMP_STRIKES, error); } /* * Get the number of lamp strikes * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetLampStrikes( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericGetU32( universe, uid, sub_device, callback, PID_LAMP_STRIKES, error); } /* * Set the lamp strikes * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param lamp_strikes the number of lamp strikes * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetLampStrikes( unsigned int universe, const UID &uid, uint16_t sub_device, uint32_t lamp_strikes, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericSetU32( universe, uid, sub_device, lamp_strikes, callback, PID_LAMP_STRIKES, error); } /* * Get the state of the lamp * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetLampState( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericGetU8( universe, uid, sub_device, callback, PID_LAMP_STATE, error); } /* * Set the lamp state * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param lamp_state the new lamp state * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetLampState( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t lamp_state, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericSetU8( universe, uid, sub_device, lamp_state, callback, PID_LAMP_STATE, error); } /* * Get the mode of the lamp * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetLampMode( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericGetU8( universe, uid, sub_device, callback, PID_LAMP_ON_MODE, error); } /* * Set the lamp mode * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param lamp_mode the new lamp mode * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetLampMode( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t lamp_mode, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericSetU8( universe, uid, sub_device, lamp_mode, callback, PID_LAMP_ON_MODE, error); } /* * Get the number of device power cycles * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDevicePowerCycles( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericGetU32( universe, uid, sub_device, callback, PID_DEVICE_POWER_CYCLES, error); } /* * Set the number of power cycles * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param power_cycles the number of power cycles * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetDevicePowerCycles( unsigned int universe, const UID &uid, uint16_t sub_device, uint32_t power_cycles, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericSetU32( universe, uid, sub_device, power_cycles, callback, PID_DEVICE_POWER_CYCLES, error); } /* * Get the display invert setting * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDisplayInvert( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericGetU8( universe, uid, sub_device, callback, PID_DISPLAY_INVERT, error); } /* * Set the display invert setting * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param display_invert the new invert setting * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetDisplayInvert( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t display_invert, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericSetU8( universe, uid, sub_device, display_invert, callback, PID_DISPLAY_INVERT, error); } /* * Get the display level * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDisplayLevel( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericGetU8( universe, uid, sub_device, callback, PID_DISPLAY_LEVEL, error); } /* * Set the display level * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param display_level the new setting * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetDisplayLevel( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t display_level, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericSetU8( universe, uid, sub_device, display_level, callback, PID_DISPLAY_LEVEL, error); } /* * Get the pan invert parameter * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetPanInvert( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericGetU8( universe, uid, sub_device, callback, PID_PAN_INVERT, error); } /* * Invert the pan parameter * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param invert set to true to invert * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetPanInvert( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t invert, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericSetU8( universe, uid, sub_device, invert, callback, PID_PAN_INVERT, error); } /* * Get the tilt invert parameter * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetTiltInvert( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericGetU8( universe, uid, sub_device, callback, PID_TILT_INVERT, error); } /* * Invert the tilt parameter * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param invert set to true to invert * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetTiltInvert( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t invert, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericSetU8( universe, uid, sub_device, invert, callback, PID_TILT_INVERT, error); } /* * Get the pan/tilt swap parameter * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetPanTiltSwap( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericGetU8( universe, uid, sub_device, callback, PID_PAN_TILT_SWAP, error); } /* * Swap the pan and tilt actions * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param swap, true to swap, false otherwise * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetPanTiltSwap( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t swap, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; return GenericSetU8( universe, uid, sub_device, swap, callback, PID_PAN_TILT_SWAP, error); } /* * Get the clock value * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetClock( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleClock, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_REAL_TIME_CLOCK), error); } /* * Set the clock value * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param clock, the new clock settings * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetClock( unsigned int universe, const UID &uid, uint16_t sub_device, const ClockValue &clock, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; ClockValue clock_data; memcpy(&clock_data, &clock, sizeof(clock_data)); clock_data.year = HostToNetwork(clock_data.year); RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_REAL_TIME_CLOCK, reinterpret_cast(&clock_data), sizeof(struct clock_value_s)), error); } /* * Check the identify state for a device * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetIdentifyDevice( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleBoolResponse, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_IDENTIFY_DEVICE), error); } /* * Change the identify state for a device * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param mode the identify mode to set * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::IdentifyDevice( unsigned int universe, const UID &uid, uint16_t sub_device, bool mode, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); uint8_t option = mode; return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_IDENTIFY_DEVICE, &option, sizeof(option)), error); } /* * Reset a device * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param warm_reset true for a warm reset, false for a cold reset * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::ResetDevice( unsigned int universe, const UID &uid, uint16_t sub_device, bool warm_reset, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); uint8_t option = warm_reset ? RESET_WARM : RESET_COLD; return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_RESET_DEVICE, &option, sizeof(option)), error); } /* * Get the power state for a device * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetPowerState( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleU8Response, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_POWER_STATE), error); } /* * Set the power state for a device. * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param power_state the new power state * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetPowerState( unsigned int universe, const UID &uid, uint16_t sub_device, rdm_power_state power_state, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); uint8_t option = static_cast(power_state); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_POWER_STATE, &option, sizeof(option)), error); } /* * Set the reset device for a device. * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param reset_device the new reset device * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetResetDevice( unsigned int universe, const UID &uid, uint16_t sub_device, rdm_reset_device_mode reset_device, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); uint8_t option = static_cast(reset_device); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_RESET_DEVICE, &option, sizeof(option)), error); } /* * Fetch the DNS hostname * @param uid the UID to fetch the DNS hostname for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDnsHostname( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) { return false; } if (CheckNotBroadcast(uid, error, callback)) { return false; } if (CheckValidSubDevice(sub_device, false, error, callback)) { return false; } RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleCustomLengthLabelResponse, callback, MAX_RDM_HOSTNAME_LENGTH); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_DNS_HOSTNAME), error); } /* * Set the DNS hostname * @param uid the UID to set the DNS hostname for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetDnsHostname( unsigned int universe, const UID &uid, uint16_t sub_device, const string &label, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) { return false; } // It doesn't really make sense to broadcast this but allow it anyway if (CheckValidSubDevice(sub_device, true, error, callback)) { return false; } RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_DNS_HOSTNAME, reinterpret_cast(label.data()), label.size()), error); } /* * Fetch the DNS domain name * @param uid the UID to fetch the DNS domain name for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::GetDnsDomainName( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) { return false; } if (CheckNotBroadcast(uid, error, callback)) { return false; } if (CheckValidSubDevice(sub_device, false, error, callback)) { return false; } RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleCustomLengthLabelResponse, callback, MAX_RDM_DOMAIN_NAME_LENGTH); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_DNS_DOMAIN_NAME), error); } /* * Set the DNS domain name * @param uid the UID to set the DNS domain name for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetDnsDomainName( unsigned int universe, const UID &uid, uint16_t sub_device, const string &label, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) { return false; } // It doesn't really make sense to broadcast this but allow it anyway if (CheckValidSubDevice(sub_device, true, error, callback)) { return false; } RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_DNS_DOMAIN_NAME, reinterpret_cast(label.data()), label.size()), error); } /* * Check if a device is in self test mode. * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SelfTestEnabled( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleBoolResponse, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_PERFORM_SELFTEST), error); } /* * Perform a self test on a device. * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param self_test_number the number of the self test to perform. * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::PerformSelfTest( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t self_test_number, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_PERFORM_SELFTEST, &self_test_number, sizeof(self_test_number)), error); } /* * Fetch the description of a self test. * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param self_test_number the number of the self test to fetch the description * of. * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SelfTestDescription( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t self_test_number, SingleUseCallback3 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleSelfTestDescription, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_SELF_TEST_DESCRIPTION, &self_test_number, sizeof(self_test_number)), error); } /* * Capture the current state into a preset. * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param scene the number of the preset scene to store * @param fade_up_time the time in 10s of a second to fade up this scene. * @param fade_down_time the time in 10s of a second to fade down the previous * scene. * @param wait_time the time in 10s of a second to hold this scene when the * playback mode is PRESET_PLAYBACK_ALL * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::CapturePreset( unsigned int universe, const UID &uid, uint16_t sub_device, uint16_t scene, uint16_t fade_up_time, uint16_t fade_down_time, uint16_t wait_time, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; PACK( struct preset_config { uint16_t scene; uint16_t fade_up_time; uint16_t fade_down_time; uint16_t wait_time; }); STATIC_ASSERT(sizeof(preset_config) == 8); struct preset_config raw_config; raw_config.scene = HostToNetwork(scene); raw_config.fade_up_time = HostToNetwork(fade_up_time); raw_config.fade_down_time = HostToNetwork(fade_down_time); raw_config.wait_time = HostToNetwork(wait_time); RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_CAPTURE_PRESET, reinterpret_cast(&raw_config), sizeof(raw_config)), error); } /* * Fetch the current playback mode. * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::PresetPlaybackMode( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback3 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandlePlaybackMode, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, PID_PRESET_PLAYBACK, NULL, 0), error); } /* * Set the current playback mode. * @param uid the UID to fetch the outstanding message count for * @param sub_device the sub device to use * @param playback_mode the playback scene to use, PRESET_PLAYBACK_OFF or * PRESET_PLAYBACK_ALL. * @param level the level to use for the scene. * @param callback the callback to invoke when this request completes * @param error a pointer to a string which it set if an error occurs * @return true if the request is sent correctly, false otherwise */ bool RDMAPI::SetPresetPlaybackMode( unsigned int universe, const UID &uid, uint16_t sub_device, uint16_t playback_mode, uint8_t level, SingleUseCallback1 *callback, string *error) { if (CheckCallback(error, callback)) return false; if (CheckValidSubDevice(sub_device, true, error, callback)) return false; PACK( struct preset_config { uint16_t mode; uint8_t level; }); STATIC_ASSERT(sizeof(preset_config) == 3); struct preset_config raw_config; raw_config.mode = HostToNetwork(playback_mode); raw_config.level = level; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, PID_PRESET_PLAYBACK, reinterpret_cast(&raw_config), sizeof(raw_config)), error); } // Handlers follow. These are invoked by the RDMAPIImpl when responses arrive // ---------------------------------------------------------------------------- /* * Handle a response that contains a custom length ASCII string */ void RDMAPI::_HandleCustomLengthLabelResponse( SingleUseCallback2 *callback, uint8_t max_length, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; if (status.WasAcked() && data.size() > max_length) { std::ostringstream str; str << "PDL needs to be <= " << static_cast(max_length) << ", was " << data.size(); response_status.error = str.str(); } string label = data; ShortenString(&label); callback->Run(response_status, label); } /* * Handle a response that contains a 32 byte ASCII string */ void RDMAPI::_HandleLabelResponse( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { _HandleCustomLengthLabelResponse(callback, MAX_RDM_STRING_LENGTH, status, data); } /* * Handle a response that contains a bool */ void RDMAPI::_HandleBoolResponse( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { static const unsigned int DATA_SIZE = 1; ResponseStatus response_status = status; bool option = false; if (response_status.WasAcked()) { if (data.size() == DATA_SIZE) { option = data.data()[0]; } else { SetIncorrectPDL(&response_status, data.size(), DATA_SIZE); } } callback->Run(response_status, option); } /* * Handle a response that contains a uint8_t */ void RDMAPI::_HandleU8Response( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; uint8_t value = 0; if (response_status.WasAcked()) { if (data.size() == sizeof(value)) { value = data.data()[0]; } else { SetIncorrectPDL(&response_status, data.size(), sizeof(value)); } } callback->Run(response_status, value); } /* * Handle a response that contains a uint32_t */ void RDMAPI::_HandleU32Response( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; uint32_t value = 0; if (response_status.WasAcked()) { if (data.size() == sizeof(value)) { const uint32_t *ptr = reinterpret_cast(data.data()); value = NetworkToHost(*ptr); } else { SetIncorrectPDL(&response_status, data.size(), sizeof(value)); } } callback->Run(response_status, value); } /* * Handle a response that doesn't contain any data */ void RDMAPI::_HandleEmptyResponse( SingleUseCallback1 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; if (response_status.WasAcked() && !data.empty()) SetIncorrectPDL(&response_status, data.size(), 0); callback->Run(response_status); } /* * Handle a PROXIED_DEVICE_COUNT get response */ void RDMAPI::_HandleGetProxiedDeviceCount( SingleUseCallback3 *callback, const ResponseStatus &status, const string &data) { static const unsigned int DATA_SIZE = 3; ResponseStatus response_status = status; uint16_t device_count = 0; bool list_change = false; if (response_status.WasAcked()) { if (data.size() >= DATA_SIZE) { struct { uint16_t device_count; uint8_t list_change; } unpacked_data; memcpy(&unpacked_data, data.data(), DATA_SIZE); device_count = NetworkToHost(unpacked_data.device_count); list_change = unpacked_data.list_change; } else { SetIncorrectPDL(&response_status, data.size(), DATA_SIZE); } } callback->Run(response_status, device_count, list_change); } /* * Handle a PROXIED_DEVICES get response */ void RDMAPI::_HandleGetProxiedDevices( SingleUseCallback2&> *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; vector uids; unsigned int data_size = data.size(); if (response_status.WasAcked()) { if (data_size % UID::UID_SIZE == 0) { const uint8_t *start = reinterpret_cast(data.data()); for (const uint8_t *ptr = start; ptr < start + data_size; ptr += UID::UID_SIZE) { UID uid(ptr); uids.push_back(uid); } } else { response_status.error = ("PDL size not a multiple of " + IntToString(static_cast(UID::UID_SIZE)) + " : " + IntToString(static_cast(data_size))); } } callback->Run(response_status, uids); } /* * Handle a get COMMS_STATUS response */ void RDMAPI::_HandleGetCommStatus( SingleUseCallback4 *callback, const ResponseStatus &status, const string &data) { static const unsigned int DATA_SIZE = 6; ResponseStatus response_status = status; uint16_t short_message = 0, length_mismatch = 0, checksum_fail = 0; if (response_status.WasAcked()) { if (data.size() >= DATA_SIZE) { struct { uint16_t short_message; uint16_t length_mismatch; uint16_t checksum_fail; } unpacked_data; memcpy(&unpacked_data, data.data(), DATA_SIZE); short_message = NetworkToHost(unpacked_data.short_message); length_mismatch = NetworkToHost(unpacked_data.length_mismatch); checksum_fail = NetworkToHost(unpacked_data.checksum_fail); } else { SetIncorrectPDL(&response_status, data.size(), DATA_SIZE); } } callback->Run(response_status, short_message, length_mismatch, checksum_fail); } /* * Handle a QUEUED_MESSAGE response */ void RDMAPI::_HandleQueuedMessage( QueuedMessageHandler *handler, const ResponseStatus &status, uint16_t pid, const string &data) { // now we need to switch on pid, and dispatch to the handler // we should also pass the uid here handler->DefaultHandler(status, pid, data); } /* * Handle a STATUS_MESSAGES response */ void RDMAPI::_HandleGetStatusMessage( SingleUseCallback2&> *callback, const ResponseStatus &status, const string &data) { // Seriously WTF, learn how to align data structures struct status_message { uint8_t sub_device_hi; uint8_t sub_device_lo; uint8_t status_type; uint8_t message_id_hi; uint8_t message_id_lo; uint8_t value_1_hi; uint8_t value_1_lo; uint8_t value_2_hi; uint8_t value_2_lo; } message; ResponseStatus response_status = status; vector messages; unsigned int data_size = data.size(); if (response_status.WasAcked()) { if (data_size % sizeof(message) == 0) { const uint8_t *start = reinterpret_cast(data.data()); for (const uint8_t *ptr = start; ptr < start + data_size; ptr += sizeof(message)) { memcpy(&message, ptr, sizeof(message)); StatusMessage msg_object; msg_object.sub_device = (message.sub_device_hi << 8) + message.sub_device_lo; msg_object.status_message_id = (message.message_id_hi << 8) + message.message_id_lo; msg_object.value1 = (message.value_1_hi << 8) + message.value_1_lo; msg_object.value2 = (message.value_2_hi << 8) + message.value_2_lo; msg_object.status_type = message.status_type; messages.push_back(msg_object); } } else { response_status.error = ("PDL size not a multiple of " + IntToString(static_cast(sizeof(message))) + " : " + IntToString(static_cast(data_size))); } } callback->Run(response_status, messages); } /* * Handle a get SUB_DEVICE_STATUS_REPORT_THRESHOLD message */ void RDMAPI::_HandleGetSubDeviceReporting( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; uint8_t status_type = 0; if (response_status.WasAcked()) { if (data.size() == sizeof(status_type)) { status_type = data.data()[0]; } else { SetIncorrectPDL(&response_status, data.size(), sizeof(status_type)); } } callback->Run(response_status, status_type); } /* * Handle a SUPPORTED_PARAMETERS Get command */ void RDMAPI::_HandleGetSupportedParameters( SingleUseCallback2&> *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; vector pids; unsigned int data_size = data.size(); if (response_status.WasAcked()) { if (data_size % 2 == 0) { const uint16_t *start = reinterpret_cast(data.data()); const uint16_t *end = start + (data_size / sizeof(*start)); for (const uint16_t *ptr = start; ptr < end; ptr++) { pids.push_back(NetworkToHost(*ptr)); } } else { response_status.error = ("PDL size not a multiple of 2 : " + IntToString(static_cast(data_size))); } sort(pids.begin(), pids.end()); } callback->Run(response_status, pids); } /* * Handle a PARAMETER_DESCRIPTION message */ void RDMAPI::_HandleGetParameterDescriptor( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; ParameterDescriptor description; if (response_status.WasAcked()) { PACK( struct param_description { uint16_t pid; uint8_t pdl_size; uint8_t data_type; uint8_t command_class; uint8_t type; uint8_t unit; uint8_t prefix; uint32_t min_value; uint32_t max_value; uint32_t default_value; // +1 for a null since it's not clear in the spec if this is null // terminated char description[MAX_RDM_STRING_LENGTH + 1]; }); STATIC_ASSERT(sizeof(param_description) == 53); struct param_description raw_description; unsigned int max = sizeof(raw_description) - 1; unsigned int min = max - MAX_RDM_STRING_LENGTH; unsigned int data_size = data.size(); if (data_size >= min && data_size <= max) { memcpy(&raw_description, data.data(), std::min(static_cast(data.size()), max)); raw_description.description[MAX_RDM_STRING_LENGTH] = 0; description.pid = NetworkToHost(raw_description.pid); description.pdl_size = raw_description.pdl_size; description.data_type = raw_description.data_type; description.command_class = raw_description.command_class; description.unit = raw_description.unit; description.prefix = raw_description.prefix; description.min_value = NetworkToHost(raw_description.min_value); description.default_value = NetworkToHost(raw_description.default_value); description.max_value = NetworkToHost(raw_description.max_value); unsigned int label_size = data_size - ( sizeof(raw_description) - MAX_RDM_STRING_LENGTH - 1); description.description = string(raw_description.description, label_size); ShortenString(&description.description); } else { std::ostringstream str; str << data_size << " needs to be between " << min << " and " << max; response_status.error = str.str(); } } callback->Run(response_status, description); } /* * Handle a DEVICE_INFO Get command */ void RDMAPI::_HandleGetDeviceDescriptor( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; DeviceDescriptor device_info; if (response_status.WasAcked()) { unsigned int data_size = data.size(); if (data_size == sizeof(device_info)) { memcpy(&device_info, data.data(), sizeof(device_info)); device_info.device_model = NetworkToHost(device_info.device_model); device_info.product_category = NetworkToHost(device_info.product_category); device_info.software_version = NetworkToHost(device_info.software_version); device_info.dmx_footprint = NetworkToHost(device_info.dmx_footprint); device_info.dmx_start_address = NetworkToHost(device_info.dmx_start_address); device_info.sub_device_count = NetworkToHost(device_info.sub_device_count); } else { SetIncorrectPDL(&response_status, data.size(), sizeof(device_info)); } } callback->Run(response_status, device_info); } /* * Handle a PRODUCT_DETAIL_ID_LIST response */ void RDMAPI::_HandleGetProductDetailIdList( SingleUseCallback2&> *callback, const ResponseStatus &status, const string &data) { static const unsigned int MAX_DETAIL_IDS = 6; ResponseStatus response_status = status; vector product_detail_ids; if (response_status.WasAcked()) { unsigned int data_size = data.size(); if (data_size > MAX_DETAIL_IDS * sizeof(uint16_t)) { std::ostringstream str; str << "PDL needs to be <= " << (MAX_DETAIL_IDS * sizeof(uint16_t)) << ", was " << data_size; response_status.error = str.str(); } else if (data_size % 2) { std::ostringstream str; str << "PDL needs to be a multiple of 2, was " << data_size; response_status.error = str.str(); } else { const uint16_t *start = reinterpret_cast(data.data()); const uint16_t *end = start + (data_size / sizeof(*start)); for (const uint16_t *ptr = start; ptr < end; ptr++) { product_detail_ids.push_back(NetworkToHost(*ptr)); } } } callback->Run(response_status, product_detail_ids); } /* * Handle a LANGUAGE_CAPABILITIES response */ void RDMAPI::_HandleGetLanguageCapabilities( SingleUseCallback2&> *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; vector languages; if (response_status.WasAcked()) { unsigned int data_size = data.size(); if (data_size % 2) { std::ostringstream str; str << "PDL needs to be a multiple of 2, was " << data_size; response_status.error = str.str(); } else { const char *ptr = data.data(); const char *end = data.data() + data.size(); while (ptr < end) { languages.push_back(string(ptr, 2)); ptr+=2; } } } callback->Run(response_status, languages); } /* * Handle a LANGUAGE response */ void RDMAPI::_HandleGetLanguage( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; static const unsigned int DATA_SIZE = 2; if (response_status.WasAcked() && data.size() != DATA_SIZE) { SetIncorrectPDL(&response_status, data.size(), DATA_SIZE); } callback->Run(response_status, data); } /* * Handle a BOOT_SOFTWARE_VERSION_ID response */ void RDMAPI::_HandleGetBootSoftwareVersion( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; static const unsigned int DATA_SIZE = 4; uint32_t boot_version = 0; if (response_status.WasAcked()) { if (data.size() != DATA_SIZE) { SetIncorrectPDL(&response_status, data.size(), DATA_SIZE); } else { boot_version = *(reinterpret_cast(data.data())); boot_version = NetworkToHost(boot_version); } } callback->Run(response_status, boot_version); } /* * Handle a get DMX_PERSONALITY response */ void RDMAPI::_HandleGetDMXPersonality( SingleUseCallback3 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; static const unsigned int DATA_SIZE = 2; uint8_t current_personality = 0; uint8_t personality_count = 0; if (response_status.WasAcked()) { if (data.size() != DATA_SIZE) { SetIncorrectPDL(&response_status, data.size(), DATA_SIZE); } else { current_personality = data[0]; personality_count = data[1]; } } callback->Run(response_status, current_personality, personality_count); } /* * Handle a get DMX_PERSONALITY_DESCRIPTION response */ void RDMAPI::_HandleGetDMXPersonalityDescription( SingleUseCallback4 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; uint8_t personality = 0; uint16_t dmx_slots = 0; string description; if (response_status.WasAcked()) { PACK( struct personality_description { uint8_t personality; uint16_t dmx_slots; // +1 for a null since it's not clear in the spec if this is null // terminated char description[MAX_RDM_STRING_LENGTH + 1]; }); STATIC_ASSERT(sizeof(personality_description) == 36); struct personality_description raw_description; unsigned int max = sizeof(personality_description) - 1; unsigned int min = max - MAX_RDM_STRING_LENGTH; unsigned int data_size = data.size(); if (data_size >= min && data_size <= max) { memcpy(&raw_description, data.data(), std::min(static_cast(data.size()), max)); personality = raw_description.personality; dmx_slots = NetworkToHost(raw_description.dmx_slots); description = string(raw_description.description, data_size - min); ShortenString(&description); } else { std::ostringstream str; str << data_size << " needs to be between " << min << " and " << max; response_status.error = str.str(); } } callback->Run(response_status, personality, dmx_slots, description); } /* * Handle a get DMX_START_ADDRESS response */ void RDMAPI::_HandleGetDMXAddress( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; static const unsigned int DATA_SIZE = 2; uint16_t start_address = 0; if (response_status.WasAcked()) { if (data.size() != DATA_SIZE) { SetIncorrectPDL(&response_status, data.size(), DATA_SIZE); } else { start_address = *(reinterpret_cast(data.data())); start_address = NetworkToHost(start_address); } } callback->Run(response_status, start_address); } /* * Handle a get SLOT_INFO response */ void RDMAPI::_HandleGetSlotInfo( SingleUseCallback2&> *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; vector slots; SlotDescriptor slot_info; unsigned int slot_info_size = sizeof(slot_info); unsigned int data_size = data.size(); if (response_status.WasAcked()) { if (data_size % slot_info_size) { response_status.error = ("PDL size not a multiple of " + IntToString(slot_info_size) + ", was " + IntToString(static_cast(data_size))); } else { const uint8_t *ptr = reinterpret_cast(data.data()); const uint8_t *end = ptr + data.size(); while (ptr < end) { memcpy(&slot_info, ptr, slot_info_size); slot_info.slot_offset = NetworkToHost(slot_info.slot_offset); slot_info.slot_label = NetworkToHost(slot_info.slot_label); slots.push_back(slot_info); } } } callback->Run(response_status, slots); } /* * Handle a get SLOT_DESCRIPTION response */ void RDMAPI::_HandleGetSlotDescription( SingleUseCallback3 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; uint16_t slot_index = 0; string description; if (response_status.WasAcked()) { PACK( struct slot_description { uint16_t slot_index; // +1 for a null since it's not clear in the spec if this is null // terminated char description[MAX_RDM_STRING_LENGTH + 1]; }); STATIC_ASSERT(sizeof(slot_description) == 35); struct slot_description raw_description; unsigned int max = sizeof(raw_description) - 1; unsigned int min = max - MAX_RDM_STRING_LENGTH; unsigned int data_size = data.size(); if (data_size >= min && data_size <= max) { raw_description.description[MAX_RDM_STRING_LENGTH] = 0; memcpy(&raw_description, data.data(), data.size()); slot_index = NetworkToHost(raw_description.slot_index); description = string(raw_description.description, data.size() - min); ShortenString(&description); } else { std::ostringstream str; str << data_size << " needs to be between " << min << " and " << max; response_status.error = str.str(); } } callback->Run(response_status, slot_index, description); } /* * Handle a get DEFAULT_SLOT_VALUE response */ void RDMAPI::_HandleGetSlotDefaultValues( SingleUseCallback2&> *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; vector slots; SlotDefault slot_default; unsigned int slot_default_size = sizeof(slot_default); unsigned int data_size = data.size(); if (response_status.WasAcked()) { if (data_size % slot_default_size) { response_status.error = ("PDL size not a multiple of " + IntToString(slot_default_size) + ", was " + IntToString(static_cast(data_size))); } else { const uint8_t *ptr = reinterpret_cast(data.data()); const uint8_t *end = ptr + data.size(); while (ptr < end) { memcpy(&slot_default, ptr, slot_default_size); slot_default.slot_offset = NetworkToHost(slot_default.slot_offset); slots.push_back(slot_default); } } } callback->Run(response_status, slots); } /* * Handle a SENSOR_DEFINITION response */ void RDMAPI::_HandleGetSensorDefinition( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; SensorDescriptor sensor; if (response_status.WasAcked()) { PACK( struct sensor_definition_s { uint8_t sensor_number; uint8_t type; uint8_t unit; uint8_t prefix; int16_t range_min; int16_t range_max; int16_t normal_min; int16_t normal_max; uint8_t recorded_value_support; char description[MAX_RDM_STRING_LENGTH + 1]; }); STATIC_ASSERT(sizeof(sensor_definition_s) == 46); struct sensor_definition_s raw_description; unsigned int max = sizeof(raw_description) - 1; unsigned int min = max - MAX_RDM_STRING_LENGTH; unsigned int data_size = data.size(); if (data_size >= min && data_size <= max) { memcpy(&raw_description, data.data(), std::min(static_cast(data.size()), max)); sensor.sensor_number = raw_description.sensor_number; sensor.type = raw_description.type; sensor.unit = raw_description.unit; sensor.prefix = raw_description.prefix; sensor.range_min = NetworkToHost(raw_description.range_min); sensor.range_max = NetworkToHost(raw_description.range_max); sensor.normal_min = NetworkToHost(raw_description.normal_min); sensor.normal_max = NetworkToHost(raw_description.normal_max); sensor.recorded_value_support = raw_description.recorded_value_support; sensor.description = string(raw_description.description, data_size - min); ShortenString(&sensor.description); } else { std::ostringstream str; str << data_size << " needs to be between " << min << " and " << max; response_status.error = str.str(); } } callback->Run(response_status, sensor); } /* * Handle a SENSOR_VALUE response */ void RDMAPI::_HandleSensorValue( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; SensorValueDescriptor sensor; if (response_status.WasAcked()) { unsigned int data_size = data.size(); if (data_size == sizeof(sensor)) { memcpy(&sensor, data.data(), sizeof(sensor)); sensor.present_value = NetworkToHost(sensor.present_value); sensor.lowest = NetworkToHost(sensor.lowest); sensor.highest = NetworkToHost(sensor.highest); sensor.recorded = NetworkToHost(sensor.recorded); } else { SetIncorrectPDL(&response_status, data.size(), sizeof(sensor)); } } callback->Run(response_status, sensor); } /* * Handle a REAL_TIME_CLOCK response */ void RDMAPI::_HandleClock( SingleUseCallback2 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; ClockValue clock; if (response_status.WasAcked()) { unsigned int data_size = data.size(); if (data_size == sizeof(clock)) { memcpy(&clock, data.data(), sizeof(clock)); clock.year = NetworkToHost(clock.year); } else { SetIncorrectPDL(&response_status, data.size(), sizeof(clock)); } } callback->Run(response_status, clock); } /** * Handle a PID_SELF_TEST_DESCRIPTION response. */ void RDMAPI::_HandleSelfTestDescription( SingleUseCallback3 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; uint8_t self_test_number = 0; string description; if (response_status.WasAcked()) { PACK( struct self_test_description { uint8_t self_test_number; // +1 for a null since it's not clear in the spec if this is null // terminated char description[MAX_RDM_STRING_LENGTH + 1]; }); STATIC_ASSERT(sizeof(self_test_description) == 34); struct self_test_description raw_description; unsigned int max = sizeof(raw_description) - 1; unsigned int min = max - MAX_RDM_STRING_LENGTH; unsigned int data_size = data.size(); if (data_size >= min && data_size <= max) { raw_description.description[MAX_RDM_STRING_LENGTH] = 0; memcpy(&raw_description, data.data(), data.size()); self_test_number = raw_description.self_test_number; description = string(raw_description.description, data.size() - min); ShortenString(&description); } else { std::ostringstream str; str << data_size << " needs to be between " << min << " and " << max; response_status.error = str.str(); } } callback->Run(response_status, self_test_number, description); } /** * Handle a PID_PRESET_PLAYBACK response */ void RDMAPI::_HandlePlaybackMode( SingleUseCallback3 *callback, const ResponseStatus &status, const string &data) { ResponseStatus response_status = status; uint16_t mode = 0; uint8_t level = 0; if (response_status.WasAcked()) { PACK( struct preset_mode { uint16_t mode; uint8_t level; }); STATIC_ASSERT(sizeof(preset_mode) == 3); struct preset_mode raw_config; if (data.size() >= sizeof(raw_config)) { memcpy(&raw_config, data.data(), data.size()); mode = NetworkToHost(raw_config.mode); level = raw_config.level; } else { std::ostringstream str; str << data.size() << " needs to be more than " << sizeof(raw_config); response_status.error = str.str(); } } callback->Run(response_status, mode, level); } //----------------------------------------------------------------------------- // Private methods follow // get a 8 bit value bool RDMAPI::GenericGetU8( unsigned int universe, const UID &uid, uint8_t sub_device, SingleUseCallback2 *callback, uint16_t pid, string *error) { if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleU8Response, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, pid), error); } // set an 8 bit value bool RDMAPI::GenericSetU8( unsigned int universe, const UID &uid, uint16_t sub_device, uint8_t value, SingleUseCallback1 *callback, uint16_t pid, string *error) { if (CheckValidSubDevice(sub_device, true, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, pid, &value, sizeof(value)), error); } // get a 32 bit value bool RDMAPI::GenericGetU32( unsigned int universe, const UID &uid, uint16_t sub_device, SingleUseCallback2 *callback, uint16_t pid, string *error) { if (CheckNotBroadcast(uid, error, callback)) return false; if (CheckValidSubDevice(sub_device, false, error, callback)) return false; RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleU32Response, callback); return CheckReturnStatus( m_impl->RDMGet(cb, universe, uid, sub_device, pid), error); } // set a 32 bit value bool RDMAPI::GenericSetU32( unsigned int universe, const UID &uid, uint16_t sub_device, uint32_t value, SingleUseCallback1 *callback, uint16_t pid, string *error) { if (CheckValidSubDevice(sub_device, true, error, callback)) return false; value = HostToNetwork(value); RDMAPIImplInterface::rdm_callback *cb = NewSingleCallback( this, &RDMAPI::_HandleEmptyResponse, callback); return CheckReturnStatus( m_impl->RDMSet(cb, universe, uid, sub_device, pid, reinterpret_cast(&value), sizeof(value)), error); } // Checks the status of a rdm command and sets error appropriately bool RDMAPI::CheckReturnStatus(bool status, string *error) { if (!status && error) *error = "Unable to send RDM command"; return status; } // Mark a ResponseStatus as malformed due to a length mismatch void RDMAPI::SetIncorrectPDL(ResponseStatus *status, unsigned int actual, unsigned int expected) { status->error = ("PDL mismatch, " + IntToString(actual) + " != " + IntToString(expected) + " (expected)"); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/NetworkResponder.cpp0000664000175000017500000001751014376533110015377 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * NetworkResponder.cpp * Copyright (C) 2013 Peter Newman */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include "common/rdm/FakeNetworkManager.h" #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/network/IPV4Address.h" #include "ola/network/InterfacePicker.h" #include "ola/network/MACAddress.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/NetworkResponder.h" #include "ola/rdm/OpenLightingEnums.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/ResponderHelper.h" #include "ola/stl/STLUtils.h" namespace ola { namespace rdm { using ola::network::HostToNetwork; using ola::network::Interface; using ola::network::InterfacePicker; using ola::network::IPV4Address; using ola::network::MACAddress; using ola::network::NetworkToHost; using std::string; using std::vector; using std::auto_ptr; NetworkResponder::RDMOps *NetworkResponder::RDMOps::instance = NULL; const ResponderOps::ParamHandler NetworkResponder::PARAM_HANDLERS[] = { { PID_DEVICE_INFO, &NetworkResponder::GetDeviceInfo, NULL}, { PID_PRODUCT_DETAIL_ID_LIST, &NetworkResponder::GetProductDetailList, NULL}, { PID_DEVICE_MODEL_DESCRIPTION, &NetworkResponder::GetDeviceModelDescription, NULL}, { PID_MANUFACTURER_LABEL, &NetworkResponder::GetManufacturerLabel, NULL}, { PID_DEVICE_LABEL, &NetworkResponder::GetDeviceLabel, NULL}, { PID_SOFTWARE_VERSION_LABEL, &NetworkResponder::GetSoftwareVersionLabel, NULL}, { PID_IDENTIFY_DEVICE, &NetworkResponder::GetIdentify, &NetworkResponder::SetIdentify}, { PID_LIST_INTERFACES, &NetworkResponder::GetListInterfaces, NULL}, { PID_INTERFACE_LABEL, &NetworkResponder::GetInterfaceLabel, NULL}, { PID_INTERFACE_HARDWARE_ADDRESS_TYPE1, &NetworkResponder::GetInterfaceHardwareAddressType1, NULL}, { PID_IPV4_CURRENT_ADDRESS, &NetworkResponder::GetIPV4CurrentAddress, NULL}, { PID_IPV4_DEFAULT_ROUTE, &NetworkResponder::GetIPV4DefaultRoute, NULL}, { PID_DNS_HOSTNAME, &NetworkResponder::GetDNSHostname, NULL}, { PID_DNS_DOMAIN_NAME, &NetworkResponder::GetDNSDomainName, NULL}, { PID_DNS_NAME_SERVER, &NetworkResponder::GetDNSNameServer, NULL}, { 0, NULL, NULL}, }; /** * New NetworkResponder */ NetworkResponder::NetworkResponder(const UID &uid) : m_uid(uid), m_identify_mode(false) { vector interfaces; interfaces.push_back(Interface( "eth0", IPV4Address::FromStringOrDie("10.0.0.20"), IPV4Address::FromStringOrDie("10.0.0.255"), IPV4Address::FromStringOrDie("255.255.0.0"), MACAddress::FromStringOrDie("01:23:45:67:89:ab"), false, 1, Interface::ARP_ETHERNET_TYPE)); interfaces.push_back(Interface( "eth2", IPV4Address::FromStringOrDie("192.168.0.1"), IPV4Address::FromStringOrDie("192.168.0.254"), IPV4Address::FromStringOrDie("255.255.255.0"), MACAddress::FromStringOrDie("45:67:89:ab:cd:ef"), false, 2, Interface::ARP_ETHERNET_TYPE)); vector name_servers; name_servers.push_back(IPV4Address::FromStringOrDie("10.0.0.1")); name_servers.push_back(IPV4Address::FromStringOrDie("10.0.0.2")); name_servers.push_back(IPV4Address::FromStringOrDie("10.0.0.3")); m_network_manager.reset(new FakeNetworkManager( interfaces, 1, IPV4Address::FromStringOrDie("10.0.0.254"), "foo", "bar.com", name_servers)); } NetworkResponder::~NetworkResponder() { } /* * Handle an RDM Request */ void NetworkResponder::SendRDMRequest(RDMRequest *request, RDMCallback *callback) { RDMOps::Instance()->HandleRDMRequest(this, m_uid, ROOT_RDM_DEVICE, request, callback); } RDMResponse *NetworkResponder::GetDeviceInfo( const RDMRequest *request) { return ResponderHelper::GetDeviceInfo( request, OLA_E137_2_MODEL, PRODUCT_CATEGORY_TEST, 2, 0, 1, 1, ZERO_FOOTPRINT_DMX_ADDRESS, 0, 0); } RDMResponse *NetworkResponder::GetProductDetailList( const RDMRequest *request) { // Shortcut for only one item in the vector return ResponderHelper::GetProductDetailList( request, vector(1, PRODUCT_DETAIL_TEST)); } RDMResponse *NetworkResponder::GetIdentify( const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_identify_mode); } RDMResponse *NetworkResponder::SetIdentify( const RDMRequest *request) { bool old_value = m_identify_mode; RDMResponse *response = ResponderHelper::SetBoolValue( request, &m_identify_mode); if (m_identify_mode != old_value) { OLA_INFO << "Network Device " << m_uid << ", identify mode " << (m_identify_mode ? "on" : "off"); } return response; } RDMResponse *NetworkResponder::GetDeviceModelDescription( const RDMRequest *request) { return ResponderHelper::GetString(request, "OLA Network Device"); } RDMResponse *NetworkResponder::GetManufacturerLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, OLA_MANUFACTURER_LABEL); } RDMResponse *NetworkResponder::GetDeviceLabel(const RDMRequest *request) { return ResponderHelper::GetString(request, "Network Device"); } RDMResponse *NetworkResponder::GetSoftwareVersionLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, string("OLA Version ") + VERSION); } RDMResponse *NetworkResponder::GetListInterfaces(const RDMRequest *request) { return ResponderHelper::GetListInterfaces(request, m_network_manager.get()); } RDMResponse *NetworkResponder::GetInterfaceLabel(const RDMRequest *request) { return ResponderHelper::GetInterfaceLabel(request, m_network_manager.get()); } RDMResponse *NetworkResponder::GetInterfaceHardwareAddressType1( const RDMRequest *request) { return ResponderHelper::GetInterfaceHardwareAddressType1( request, m_network_manager.get()); } RDMResponse *NetworkResponder::GetIPV4CurrentAddress( const RDMRequest *request) { return ResponderHelper::GetIPV4CurrentAddress(request, m_network_manager.get()); } RDMResponse *NetworkResponder::GetIPV4DefaultRoute(const RDMRequest *request) { return ResponderHelper::GetIPV4DefaultRoute(request, m_network_manager.get()); } RDMResponse *NetworkResponder::GetDNSHostname(const RDMRequest *request) { return ResponderHelper::GetDNSHostname(request, m_network_manager.get()); } RDMResponse *NetworkResponder::GetDNSDomainName(const RDMRequest *request) { return ResponderHelper::GetDNSDomainName(request, m_network_manager.get()); } RDMResponse *NetworkResponder::GetDNSNameServer(const RDMRequest *request) { return ResponderHelper::GetDNSNameServer(request, m_network_manager.get()); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/StringMessageBuilder.cpp0000664000175000017500000002224214376533110016144 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * StringMessageBuilder.cpp * Builds a Message object from a list of strings & a Descriptor. * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include "common/rdm/GroupSizeCalculator.h" namespace ola { namespace rdm { using ola::messaging::MessageFieldInterface; using ola::rdm::UID; using std::auto_ptr; using std::string; using std::vector; StringMessageBuilder::StringMessageBuilder() : m_offset(0), m_input_size(0), m_group_instance_count(0), m_error(false) { } /** * @brief Clean up */ StringMessageBuilder::~StringMessageBuilder() { CleanUpVector(); } /** * @brief Get the Message object that this Builder created * * This method is *not* re-entrant. * @param inputs the string inputs provided to build the Message * @param descriptor the descriptor to use to build the Message * @returns a Message object, or NULL if the inputs failed. */ const ola::messaging::Message *StringMessageBuilder::GetMessage( const vector &inputs, const ola::messaging::Descriptor *descriptor) { InitVars(inputs); // first figure out if the number of inputs provided matches the number // expected by the descriptor. This accounts for repeating groups. GroupSizeCalculator calculator; GroupSizeCalculator::calculator_state state = calculator.CalculateGroupSize( inputs.size(), descriptor, &m_group_instance_count); switch (state) { case GroupSizeCalculator::INSUFFICIENT_TOKENS: SetError("Insufficient tokens"); return NULL; case GroupSizeCalculator::EXTRA_TOKENS: SetError("Extra tokens"); return NULL; case GroupSizeCalculator::MISMATCHED_TOKENS: SetError("Mismatched tokens"); return NULL; case GroupSizeCalculator::MULTIPLE_VARIABLE_GROUPS: SetError("Multiple variable groups"); return NULL; case GroupSizeCalculator::NESTED_VARIABLE_GROUPS: SetError("Nested variable groups"); return NULL; case GroupSizeCalculator::SINGLE_VARIABLE_GROUP: case GroupSizeCalculator::NO_VARIABLE_GROUPS: break; } // now we now that this list of inputs can be parsed, and we know the number // of instances of a repeating group if there is one. descriptor->Accept(this); if (m_error) { OLA_WARN << "Error building message, field is: " << m_error_string; return NULL; } if (m_groups.size() != 1) { OLA_WARN << "Mismatched stack, size was " << m_groups.size(); return NULL; } const ola::messaging::Message *message = new ola::messaging::Message( m_groups.top()); m_groups.top().clear(); return message; } /** * Bool values can be true,false,0,1 */ void StringMessageBuilder::Visit( const ola::messaging::BoolFieldDescriptor *descriptor) { if (StopParsing()) return; bool value = false; bool valid = false; string token = m_inputs[m_offset++]; ola::StringTrim(&token); ola::ToLower(&token); if (token == "true") { valid = value = true; } else if (token == "false") { value = false; valid = true; } if (!valid) { uint8_t int_value; if (ola::StringToInt(token, &int_value)) { if (int_value == 1) { valid = value = true; } else if (int_value == 0) { valid = true; value = false; } } } if (!valid) { SetError(descriptor->Name()); return; } m_groups.top().push_back( new ola::messaging::BoolMessageField(descriptor, value)); } /** * IPV4 Addresses */ void StringMessageBuilder::Visit( const ola::messaging::IPV4FieldDescriptor *descriptor) { if (StopParsing()) return; string token = m_inputs[m_offset++]; ola::network::IPV4Address ip_address; if (!ola::network::IPV4Address::FromString(token, &ip_address)) { SetError(descriptor->Name()); return; } m_groups.top().push_back( new ola::messaging::IPV4MessageField(descriptor, ip_address)); } /** * MAC Addresses */ void StringMessageBuilder::Visit( const ola::messaging::MACFieldDescriptor *descriptor) { if (StopParsing()) return; string token = m_inputs[m_offset++]; ola::network::MACAddress mac_address; if (!ola::network::MACAddress::FromString(token, &mac_address)) { SetError(descriptor->Name()); return; } m_groups.top().push_back( new ola::messaging::MACMessageField(descriptor, mac_address)); } /** * UIDs. */ void StringMessageBuilder::Visit( const ola::messaging::UIDFieldDescriptor *descriptor) { if (StopParsing()) return; string token = m_inputs[m_offset++]; auto_ptr uid(UID::FromString(token)); if (!uid.get()) { SetError(descriptor->Name()); return; } m_groups.top().push_back( new ola::messaging::UIDMessageField(descriptor, *uid)); } /** * Handle strings */ void StringMessageBuilder::Visit( const ola::messaging::StringFieldDescriptor *descriptor) { if (StopParsing()) return; const string &token = m_inputs[m_offset++]; if (descriptor->MaxSize() != 0 && token.size() > descriptor->MaxSize()) { SetError(descriptor->Name()); return; } m_groups.top().push_back( new ola::messaging::StringMessageField(descriptor, token)); } /** * uint8 */ void StringMessageBuilder::Visit( const ola::messaging::UInt8FieldDescriptor *descriptor) { VisitInt(descriptor); } void StringMessageBuilder::Visit( const ola::messaging::UInt16FieldDescriptor *descriptor) { VisitInt(descriptor); } void StringMessageBuilder::Visit( const ola::messaging::UInt32FieldDescriptor *descriptor) { VisitInt(descriptor); } void StringMessageBuilder::Visit( const ola::messaging::Int8FieldDescriptor *descriptor) { VisitInt(descriptor); } void StringMessageBuilder::Visit( const ola::messaging::Int16FieldDescriptor *descriptor) { VisitInt(descriptor); } void StringMessageBuilder::Visit( const ola::messaging::Int32FieldDescriptor *descriptor) { VisitInt(descriptor); } /** * Visit a group */ void StringMessageBuilder::Visit( const ola::messaging::FieldDescriptorGroup *descriptor) { unsigned int iterations = descriptor->FixedSize() ? descriptor->MinBlocks() : m_group_instance_count; for (unsigned int i = 0; i < iterations; ++i) { vector fields; m_groups.push(fields); for (unsigned int j = 0; j < descriptor->FieldCount(); ++j) { descriptor->GetField(j)->Accept(this); } const vector &populated_fields = m_groups.top(); const ola::messaging::MessageFieldInterface *message = new ola::messaging::GroupMessageField(descriptor, populated_fields); m_groups.pop(); m_groups.top().push_back(message); } } /** * This is a no-op since we handle descending ourselves in Visit() */ void StringMessageBuilder::PostVisit( const ola::messaging::FieldDescriptorGroup *descriptor) { (void) descriptor; } bool StringMessageBuilder::StopParsing() const { return m_error || m_offset >= m_input_size; } void StringMessageBuilder::SetError(const string &error) { m_error = true; m_error_string = error; } template void StringMessageBuilder::VisitInt( const ola::messaging::IntegerFieldDescriptor *descriptor) { if (StopParsing()) return; type int_value; string input = m_inputs[m_offset++]; if (descriptor->LookupLabel(input, &int_value) || ola::PrefixedHexStringToInt(input, &int_value) || ola::StringToInt(input, &int_value)) { m_groups.top().push_back( new ola::messaging::BasicMessageField(descriptor, int_value)); } else { SetError(descriptor->Name()); } } void StringMessageBuilder::InitVars(const vector &inputs) { CleanUpVector(); // add the first fields vector to the stack vector fields; m_groups.push(fields); m_inputs = inputs; m_input_size = inputs.size(); m_error = false; m_offset = 0; } void StringMessageBuilder::CleanUpVector() { while (!m_groups.empty()) { const vector &fields = m_groups.top(); vector::const_iterator iter = fields.begin(); for (; iter != fields.end(); ++iter) { delete *iter; } m_groups.pop(); } } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/DescriptorConsistencyChecker.cpp0000664000175000017500000000535214376533110017712 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DescriptorConsistencyChecker.cpp * Verify that we can determine the layout of a Descriptor. * Copyright (C) 2011 Simon Newton */ #include "common/rdm/DescriptorConsistencyChecker.h" namespace ola { namespace rdm { bool DescriptorConsistencyChecker::CheckConsistency( const ola::messaging::Descriptor *descriptor) { m_variable_sized_field_count = 0; descriptor->Accept(this); return m_variable_sized_field_count <= 1; } void DescriptorConsistencyChecker::Visit( const ola::messaging::BoolFieldDescriptor*) { } void DescriptorConsistencyChecker::Visit( const ola::messaging::IPV4FieldDescriptor*) { } void DescriptorConsistencyChecker::Visit( const ola::messaging::MACFieldDescriptor*) { } void DescriptorConsistencyChecker::Visit( const ola::messaging::UIDFieldDescriptor*) { } void DescriptorConsistencyChecker::Visit( const ola::messaging::StringFieldDescriptor *descriptor) { if (!descriptor->FixedSize()) { m_variable_sized_field_count++; } } void DescriptorConsistencyChecker::Visit( const ola::messaging::UInt8FieldDescriptor*) { } void DescriptorConsistencyChecker::Visit( const ola::messaging::UInt16FieldDescriptor*) { } void DescriptorConsistencyChecker::Visit( const ola::messaging::UInt32FieldDescriptor*) { } void DescriptorConsistencyChecker::Visit( const ola::messaging::Int8FieldDescriptor*) { } void DescriptorConsistencyChecker::Visit( const ola::messaging::Int16FieldDescriptor*) { } void DescriptorConsistencyChecker::Visit( const ola::messaging::Int32FieldDescriptor*) { } void DescriptorConsistencyChecker::Visit( const ola::messaging::FieldDescriptorGroup *descriptor) { if (!descriptor->FixedSize()) m_variable_sized_field_count++; // if the block size isn't fixed this descriptor isn't consistent. if (!descriptor->FixedBlockSize()) m_variable_sized_field_count++; } void DescriptorConsistencyChecker::PostVisit( const ola::messaging::FieldDescriptorGroup*) { } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/DimmerRootDevice.cpp0000664000175000017500000001722614376533110015271 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DimmerRootDevice.cpp * Copyright (C) 2013 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/DimmerRootDevice.h" #include "ola/rdm/DimmerSubDevice.h" #include "ola/rdm/OpenLightingEnums.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/ResponderHelper.h" namespace ola { namespace rdm { using ola::network::HostToNetwork; using ola::network::NetworkToHost; using std::string; using std::vector; DimmerRootDevice::RDMOps *DimmerRootDevice::RDMOps::instance = NULL; const ResponderOps::ParamHandler DimmerRootDevice::PARAM_HANDLERS[] = { { PID_DEVICE_INFO, &DimmerRootDevice::GetDeviceInfo, NULL}, { PID_PRODUCT_DETAIL_ID_LIST, &DimmerRootDevice::GetProductDetailList, NULL}, { PID_DEVICE_MODEL_DESCRIPTION, &DimmerRootDevice::GetDeviceModelDescription, NULL}, { PID_MANUFACTURER_LABEL, &DimmerRootDevice::GetManufacturerLabel, NULL}, { PID_DEVICE_LABEL, &DimmerRootDevice::GetDeviceLabel, NULL}, { PID_SOFTWARE_VERSION_LABEL, &DimmerRootDevice::GetSoftwareVersionLabel, NULL}, { PID_IDENTIFY_DEVICE, &DimmerRootDevice::GetIdentify, &DimmerRootDevice::SetIdentify}, { PID_DMX_BLOCK_ADDRESS, &DimmerRootDevice::GetDmxBlockAddress, &DimmerRootDevice::SetDmxBlockAddress}, { PID_IDENTIFY_MODE, &DimmerRootDevice::GetIdentifyMode, &DimmerRootDevice::SetIdentifyMode}, { 0, NULL, NULL} }; /** * Create a new dimmer root device. Ownership of the DimmerSubDevices is not * transferred. */ DimmerRootDevice::DimmerRootDevice(const UID &uid, SubDeviceMap sub_devices) : m_uid(uid), m_identify_on(false), m_identify_mode(IDENTIFY_MODE_LOUD), m_sub_devices(sub_devices) { if (m_sub_devices.size() > MAX_SUBDEVICE_NUMBER) { OLA_FATAL << "More than " << MAX_SUBDEVICE_NUMBER << " sub devices created for device " << uid; } } /* * Handle an RDM Request */ void DimmerRootDevice::SendRDMRequest(RDMRequest *request, RDMCallback *callback) { RDMOps::Instance()->HandleRDMRequest(this, m_uid, ROOT_RDM_DEVICE, request, callback); } RDMResponse *DimmerRootDevice::GetDeviceInfo(const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } return ResponderHelper::GetDeviceInfo( request, OLA_DUMMY_DIMMER_MODEL, PRODUCT_CATEGORY_DIMMER, 1, 0, 1, 1, // personality 0xffff, // start address m_sub_devices.size(), 0); } RDMResponse *DimmerRootDevice::GetProductDetailList(const RDMRequest *request) { // Shortcut for only one item in the vector return ResponderHelper::GetProductDetailList(request, vector(1, PRODUCT_DETAIL_TEST)); } RDMResponse *DimmerRootDevice::GetDeviceModelDescription( const RDMRequest *request) { return ResponderHelper::GetString(request, "OLA Dimmer"); } RDMResponse *DimmerRootDevice::GetManufacturerLabel(const RDMRequest *request) { return ResponderHelper::GetString(request, OLA_MANUFACTURER_LABEL); } RDMResponse *DimmerRootDevice::GetDeviceLabel(const RDMRequest *request) { return ResponderHelper::GetString(request, "Dummy Dimmer"); } RDMResponse *DimmerRootDevice::GetSoftwareVersionLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, string("OLA Version ") + VERSION); } RDMResponse *DimmerRootDevice::GetIdentify(const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_identify_on); } RDMResponse *DimmerRootDevice::SetIdentify(const RDMRequest *request) { bool old_value = m_identify_on; RDMResponse *response = ResponderHelper::SetBoolValue( request, &m_identify_on); if (m_identify_on != old_value) { OLA_INFO << "Dimmer Root Device " << m_uid << ", identify mode " << (m_identify_on ? "on" : "off"); } return response; } RDMResponse *DimmerRootDevice::GetDmxBlockAddress(const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } PACK( struct block_address_pdl { uint16_t total_footprint; uint16_t base_address; }); STATIC_ASSERT(sizeof(block_address_pdl) == 4); block_address_pdl pdl; pdl.base_address = 0; pdl.total_footprint = 0; uint16_t next_address = 0; for (SubDeviceMap::const_iterator iter = m_sub_devices.begin(); iter != m_sub_devices.end(); ++iter) { if (iter->second->Footprint() != 0) { if (next_address == iter->second->GetDmxStartAddress()) { next_address += iter->second->Footprint(); } else if (next_address == 0) { next_address = iter->second->GetDmxStartAddress() + iter->second->Footprint(); pdl.base_address = iter->second->GetDmxStartAddress(); } else { pdl.base_address = 0xFFFF; } pdl.total_footprint += iter->second->Footprint(); } } pdl.base_address = HostToNetwork(pdl.base_address); pdl.total_footprint = HostToNetwork(pdl.total_footprint); return GetResponseFromData(request, reinterpret_cast(&pdl), sizeof(pdl)); } RDMResponse *DimmerRootDevice::SetDmxBlockAddress(const RDMRequest *request) { uint16_t base_start_address = 0; uint16_t total_footprint = 0; if (!ResponderHelper::ExtractUInt16(request, &base_start_address)) { return NackWithReason(request, NR_FORMAT_ERROR); } for (SubDeviceMap::const_iterator i = m_sub_devices.begin(); i != m_sub_devices.end(); ++i) { total_footprint += i->second->Footprint(); } if (base_start_address < 1 || base_start_address + total_footprint - 1 > DMX_MAX_SLOT_VALUE) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } for (SubDeviceMap::const_iterator iter = m_sub_devices.begin(); iter != m_sub_devices.end(); ++iter) { // We don't check here because we already have for every Sub Device iter->second->SetDmxStartAddress(base_start_address); base_start_address += iter->second->Footprint(); } return GetResponseFromData(request, NULL, 0); } RDMResponse *DimmerRootDevice::GetIdentifyMode(const RDMRequest *request) { return ResponderHelper::GetUInt8Value(request, m_identify_mode); } RDMResponse *DimmerRootDevice::SetIdentifyMode(const RDMRequest *request) { uint8_t new_identify_mode; if (!ResponderHelper::ExtractUInt8(request, &new_identify_mode)) return NackWithReason(request, NR_FORMAT_ERROR); if (new_identify_mode != IDENTIFY_MODE_QUIET && new_identify_mode != IDENTIFY_MODE_LOUD) return NackWithReason(request, NR_DATA_OUT_OF_RANGE); m_identify_mode = static_cast(new_identify_mode); return ResponderHelper::EmptySetResponse(request); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/DiscoveryAgentTest.cpp0000664000175000017500000004013714376533110015653 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DiscoveryAgentTest.cpp * Test fixture for the DiscoveryAgent class * Copyright (C) 2011 Simon Newton */ #include #include #include "ola/Logging.h" #include "ola/rdm/UID.h" #include "ola/rdm/UIDSet.h" #include "ola/rdm/DiscoveryAgent.h" #include "common/rdm/DiscoveryAgentTestHelper.h" #include "ola/testing/TestUtils.h" using ola::rdm::UID; using ola::rdm::UIDSet; using ola::rdm::DiscoveryAgent; using std::vector; typedef vector ResponderList; class DiscoveryAgentTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DiscoveryAgentTest); CPPUNIT_TEST(testNoReponders); CPPUNIT_TEST(testSingleResponder); CPPUNIT_TEST(testResponderWithBroadcastUID); CPPUNIT_TEST(testMultipleResponders); CPPUNIT_TEST(testObnoxiousResponder); CPPUNIT_TEST(testRamblingResponder); CPPUNIT_TEST(testBipolarResponder); CPPUNIT_TEST(testBriefResponder); CPPUNIT_TEST(testNonMutingResponder); CPPUNIT_TEST(testFlakeyResponder); CPPUNIT_TEST(testProxy); CPPUNIT_TEST_SUITE_END(); public: DiscoveryAgentTest() : CppUnit::TestFixture(), m_callback_run(false) { } void testNoReponders(); void testSingleResponder(); void testResponderWithBroadcastUID(); void testMultipleResponders(); void testObnoxiousResponder(); void testRamblingResponder(); void testBriefResponder(); void testBipolarResponder(); void testNonMutingResponder(); void testFlakeyResponder(); void testProxy(); private: bool m_callback_run; void DiscoverySuccessful(const UIDSet *expected, bool successful, const UIDSet &received); void DiscoveryFailed(const UIDSet *expected, bool successful, const UIDSet &received); void PopulateResponderListFromUIDs(const UIDSet &uids, ResponderList *responders); }; CPPUNIT_TEST_SUITE_REGISTRATION(DiscoveryAgentTest); /** * Called when discovery completes */ void DiscoveryAgentTest::DiscoverySuccessful(const UIDSet *expected, bool successful, const UIDSet &received) { OLA_INFO << "in discovery callback, size is " << received.Size() << ", state: " << successful; OLA_ASSERT_TRUE(successful); OLA_ASSERT_EQ(*expected, received); m_callback_run = true; } /** * Called when discovery completes and fails for some reason. */ void DiscoveryAgentTest::DiscoveryFailed(const UIDSet *expected, bool successful, const UIDSet &received) { OLA_INFO << "in discovery callback, size is " << received.Size() << ", state: " << successful; OLA_ASSERT_FALSE(successful); OLA_ASSERT_EQ(*expected, received); m_callback_run = true; } /** * Build a vector of MockResponder objects with the given uids. */ void DiscoveryAgentTest::PopulateResponderListFromUIDs( const UIDSet &uids, ResponderList *responders) { UIDSet::Iterator iter = uids.Begin(); for (; iter != uids.End(); iter++) { responders->push_back(new MockResponder(*iter)); } } /* * Test the case where we have no responders. */ void DiscoveryAgentTest::testNoReponders() { UIDSet uids; ResponderList responders; PopulateResponderListFromUIDs(uids, &responders); MockDiscoveryTarget target(responders); DiscoveryAgent agent(&target); agent.StartFullDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); OLA_ASSERT_EQ(3u, target.UnmuteCallCount()); // now try incremental target.ResetCounters(); agent.StartIncrementalDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); OLA_ASSERT_EQ(3u, target.UnmuteCallCount()); } /** * Test single responder */ void DiscoveryAgentTest::testSingleResponder() { UIDSet uids; ResponderList responders; uids.AddUID(UID(1, 10)); PopulateResponderListFromUIDs(uids, &responders); MockDiscoveryTarget target(responders); DiscoveryAgent agent(&target); OLA_INFO << "starting discovery with one responder"; agent.StartFullDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); m_callback_run = false; // now try incremental OLA_INFO << "starting incremental discovery with one responder"; agent.StartIncrementalDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); } /** * Test single responder with a broadcast UID */ void DiscoveryAgentTest::testResponderWithBroadcastUID() { UIDSet uids; ResponderList responders; uids.AddUID(UID(0xffff, 0xffffffff)); PopulateResponderListFromUIDs(uids, &responders); MockDiscoveryTarget target(responders); DiscoveryAgent agent(&target); agent.StartFullDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); m_callback_run = false; // now try incremental agent.StartIncrementalDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); } /** * Test multiple responders */ void DiscoveryAgentTest::testMultipleResponders() { UIDSet uids; ResponderList responders; UID uid_to_remove(0x7a70, 0x00002001); uids.AddUID(uid_to_remove); uids.AddUID(UID(0x7a70, 0x00002002)); uids.AddUID(UID(0x7a77, 0x00002002)); PopulateResponderListFromUIDs(uids, &responders); MockDiscoveryTarget target(responders); DiscoveryAgent agent(&target); OLA_INFO << "starting discovery with two responder"; agent.StartFullDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); m_callback_run = false; // now try incremental, adding one uid and removing another UID uid_to_add(0x8080, 0x00103456); uids.RemoveUID(uid_to_remove); uids.AddUID(uid_to_add); // update the responder list target.RemoveResponder(uid_to_remove); target.AddResponder(new MockResponder(uid_to_add)); OLA_INFO << "starting incremental discovery with modified responder list"; agent.StartIncrementalDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); } /** * Test a responder that continues to responder when muted. */ void DiscoveryAgentTest::testObnoxiousResponder() { UIDSet uids; ResponderList responders; uids.AddUID(UID(0x7a70, 0x00002002)); PopulateResponderListFromUIDs(uids, &responders); // add the ObnoxiousResponders UID obnoxious_uid = UID(0x7a77, 0x00002002); UID obnoxious_uid2 = UID(0x7a77, 0x00003030); uids.AddUID(obnoxious_uid); uids.AddUID(obnoxious_uid2); responders.push_back(new ObnoxiousResponder(obnoxious_uid)); responders.push_back(new ObnoxiousResponder(obnoxious_uid2)); MockDiscoveryTarget target(responders); DiscoveryAgent agent(&target); OLA_INFO << "starting discovery with obnoxious responder"; agent.StartFullDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoveryFailed, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); m_callback_run = false; // now try incremental, adding one uid and removing another OLA_INFO << "starting incremental discovery with modified responder list"; agent.StartIncrementalDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoveryFailed, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); } /** * Test a responder that replies with responses larger than the DUB size */ void DiscoveryAgentTest::testRamblingResponder() { const UID normal_responder_uid(0x7a70, 0x00002002); const UID rambling_responder_uid(0x7a77, 0x0002002); UIDSet uids; ResponderList responders; uids.AddUID(normal_responder_uid); PopulateResponderListFromUIDs(uids, &responders); // add the RamblingResponder responders.push_back(new RamblingResponder(rambling_responder_uid)); MockDiscoveryTarget target(responders); DiscoveryAgent agent(&target); uids.AddUID(rambling_responder_uid); OLA_INFO << "starting discovery with rambling responder"; agent.StartFullDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); } /** * Test a responder that replies with too little data. */ void DiscoveryAgentTest::testBriefResponder() { UIDSet uids; ResponderList responders; uids.AddUID(UID(0x7a70, 0x00002002)); PopulateResponderListFromUIDs(uids, &responders); // add the BriefResponder UID brief_uid = UID(0x7a77, 0x00002002); responders.push_back(new BriefResponder(brief_uid)); MockDiscoveryTarget target(responders); DiscoveryAgent agent(&target); OLA_INFO << "starting discovery with brief responder"; agent.StartFullDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoveryFailed, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); } /** * Test a responder that can't make up it's mind about it's UID */ void DiscoveryAgentTest::testBipolarResponder() { UIDSet uids; ResponderList responders; uids.AddUID(UID(0x7a70, 0x00002002)); PopulateResponderListFromUIDs(uids, &responders); // add the BiPolarResponders UID bipolar_uid = UID(0x7a77, 0x00002002); UID bipolar_uid2 = UID(0x7a77, 0x00003030); responders.push_back(new BiPolarResponder(bipolar_uid)); responders.push_back(new BiPolarResponder(bipolar_uid2)); MockDiscoveryTarget target(responders); DiscoveryAgent agent(&target); OLA_INFO << "starting discovery with BiPolarResponder responder"; agent.StartFullDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoveryFailed, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); m_callback_run = false; // now try incremental, adding one uid and removing another OLA_INFO << "starting incremental discovery with modified responder list"; agent.StartIncrementalDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoveryFailed, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); } /** * Test a responder that doesn't respond to a mute message. */ void DiscoveryAgentTest::testNonMutingResponder() { UIDSet uids; ResponderList responders; uids.AddUID(UID(0x7a70, 0x00002002)); PopulateResponderListFromUIDs(uids, &responders); // add the NonMutingResponders UID non_muting_uid = UID(0x7a77, 0x00002002); UID non_muting_uid2 = UID(0x7a77, 0x00003030); responders.push_back(new NonMutingResponder(non_muting_uid)); responders.push_back(new NonMutingResponder(non_muting_uid2)); MockDiscoveryTarget target(responders); DiscoveryAgent agent(&target); OLA_INFO << "starting discovery with NonMutingResponder responder"; agent.StartFullDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoveryFailed, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); m_callback_run = false; } /** * Test a responder that only acks a mute request after N attempts. */ void DiscoveryAgentTest::testFlakeyResponder() { UIDSet uids; ResponderList responders; uids.AddUID(UID(0x7a70, 0x00002002)); PopulateResponderListFromUIDs(uids, &responders); // add the NonMutingResponders UID flakey_uid = UID(0x7a77, 0x00002002); UID flakey_uid2 = UID(0x7a77, 0x00003030); uids.AddUID(flakey_uid); uids.AddUID(flakey_uid2); FlakeyMutingResponder *flakey_responder1 = new FlakeyMutingResponder( flakey_uid); FlakeyMutingResponder *flakey_responder2 = new FlakeyMutingResponder( flakey_uid2); responders.push_back(flakey_responder1); responders.push_back(flakey_responder2); MockDiscoveryTarget target(responders); DiscoveryAgent agent(&target); OLA_INFO << "starting discovery with flakey responder"; agent.StartFullDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); m_callback_run = false; // now try incremental flakey_responder1->Reset(); flakey_responder2->Reset(); OLA_INFO << "starting incremental discovery with flakey responder list"; agent.StartIncrementalDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); } /** * Test a proxy. */ void DiscoveryAgentTest::testProxy() { UIDSet proxied_uids, proxied_uids2; ResponderList proxied_responders, proxied_responders2, responders; proxied_uids.AddUID(UID(0x7a70, 0x00002002)); proxied_uids.AddUID(UID(0x8080, 0x00001234)); proxied_uids.AddUID(UID(0x9000, 0x00005678)); proxied_uids.AddUID(UID(0x1020, 0x00005678)); PopulateResponderListFromUIDs(proxied_uids, &proxied_responders); proxied_uids2.AddUID(UID(0x7a71, 0x00002002)); proxied_uids2.AddUID(UID(0x8081, 0x00001234)); proxied_uids2.AddUID(UID(0x9001, 0x00005678)); proxied_uids2.AddUID(UID(0x1021, 0x00005678)); PopulateResponderListFromUIDs(proxied_uids2, &proxied_responders2); // add the two proxies UIDSet uids = proxied_uids.Union(proxied_uids2); UID proxy_uid = UID(0x1010, 0x00002002); uids.AddUID(proxy_uid); responders.push_back(new ProxyResponder(proxy_uid, proxied_responders)); UID proxy_uid2 = UID(0x1010, 0x00001999); uids.AddUID(proxy_uid2); responders.push_back(new ProxyResponder(proxy_uid2, proxied_responders2)); // add some other responders UID responder(0x0001, 0x00000001); UID responder2(0x0001, 0x10000001); uids.AddUID(responder); uids.AddUID(responder2); responders.push_back(new MockResponder(responder)); responders.push_back(new MockResponder(responder2)); MockDiscoveryTarget target(responders); DiscoveryAgent agent(&target); OLA_INFO << "starting discovery with Proxy responder"; agent.StartFullDiscovery( ola::NewSingleCallback(this, &DiscoveryAgentTest::DiscoverySuccessful, static_cast(&uids))); OLA_ASSERT_TRUE(m_callback_run); m_callback_run = false; } ola-0.10.9/common/rdm/ResponderHelper.cpp0000664000175000017500000011166514376533110015173 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ResponderHelper.cpp * Copyright (C) 2013 Simon Newton */ #define __STDC_LIMIT_MACROS // for UINT8_MAX & friends #include #include #include #include #include "ola/Clock.h" #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/base/Macro.h" #include "ola/network/IPV4Address.h" #include "ola/network/Interface.h" #include "ola/network/InterfacePicker.h" #include "ola/network/MACAddress.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/ResponderHelper.h" #include "ola/rdm/ResponderSensor.h" #include "ola/strings/Utils.h" namespace ola { namespace rdm { using ola::network::HostToNetwork; using ola::network::Interface; using ola::network::InterfacePicker; using ola::network::IPV4Address; using ola::network::MACAddress; using ola::network::NetworkToHost; using std::min; using std::string; using std::vector; template static bool GenericExtractValue(const RDMRequest *request, T *output) { T value; if (request->ParamDataSize() != sizeof(value)) { return false; } memcpy(reinterpret_cast(&value), request->ParamData(), sizeof(value)); *output = NetworkToHost(value); return true; } bool ResponderHelper::ExtractUInt8(const RDMRequest *request, uint8_t *output) { return GenericExtractValue(request, output); } bool ResponderHelper::ExtractUInt16(const RDMRequest *request, uint16_t *output) { return GenericExtractValue(request, output); } bool ResponderHelper::ExtractUInt32(const RDMRequest *request, uint32_t *output) { return GenericExtractValue(request, output); } RDMResponse *ResponderHelper::GetDeviceInfo( const RDMRequest *request, uint16_t device_model, rdm_product_category product_category, uint32_t software_version, uint16_t dmx_footprint, uint8_t current_personality, uint8_t personality_count, uint16_t dmx_start_address, uint16_t sub_device_count, uint8_t sensor_count, uint8_t queued_message_count) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } PACK( struct device_info_s { uint16_t rdm_version; uint16_t model; uint16_t product_category; uint32_t software_version; uint16_t dmx_footprint; uint8_t current_personality; uint8_t personality_count; uint16_t dmx_start_address; uint16_t sub_device_count; uint8_t sensor_count; }); STATIC_ASSERT(sizeof(device_info_s) == 19); struct device_info_s device_info; device_info.rdm_version = HostToNetwork( static_cast(RDM_VERSION_1_0)); device_info.model = HostToNetwork(device_model); device_info.product_category = HostToNetwork( static_cast(product_category)); device_info.software_version = HostToNetwork(software_version); device_info.dmx_footprint = HostToNetwork(dmx_footprint); device_info.current_personality = current_personality; device_info.personality_count = personality_count; device_info.dmx_start_address = HostToNetwork(dmx_start_address); device_info.sub_device_count = HostToNetwork(sub_device_count); device_info.sensor_count = sensor_count; return GetResponseFromData( request, reinterpret_cast(&device_info), sizeof(device_info), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::GetDeviceInfo( const RDMRequest *request, uint16_t device_model, rdm_product_category product_category, uint32_t software_version, const PersonalityManager *personality_manager, uint16_t start_address, uint16_t sub_device_count, uint8_t sensor_count, uint8_t queued_message_count) { return ResponderHelper::GetDeviceInfo( request, device_model, product_category, software_version, personality_manager->ActivePersonalityFootprint(), personality_manager->ActivePersonalityNumber(), personality_manager->PersonalityCount(), (personality_manager->ActivePersonalityFootprint() ? start_address : ZERO_FOOTPRINT_DMX_ADDRESS), sub_device_count, sensor_count, queued_message_count); } RDMResponse *ResponderHelper::GetProductDetailList( const RDMRequest *request, const vector &product_details, uint8_t queued_message_count) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } uint16_t product_details_raw[product_details.size()]; for (unsigned int i = 0; i < product_details.size(); i++) { product_details_raw[i] = HostToNetwork(static_cast(product_details[i])); } return GetResponseFromData( request, reinterpret_cast(&product_details_raw), sizeof(product_details_raw), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::GetPersonality( const RDMRequest *request, const PersonalityManager *personality_manager, uint8_t queued_message_count) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } PACK( struct personality_info_s { uint8_t personality; uint8_t total; }); STATIC_ASSERT(sizeof(personality_info_s) == 2); struct personality_info_s personality_info = { personality_manager->ActivePersonalityNumber(), personality_manager->PersonalityCount() }; return GetResponseFromData( request, reinterpret_cast(&personality_info), sizeof(personality_info), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::SetPersonality( const RDMRequest *request, PersonalityManager *personality_manager, uint16_t start_address, uint8_t queued_message_count) { uint8_t personality_number; if (!ExtractUInt8(request, &personality_number)) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } const Personality *personality = personality_manager->Lookup( personality_number); if (!personality) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE, queued_message_count); } else if (start_address + personality->Footprint() - 1 > DMX_UNIVERSE_SIZE) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE, queued_message_count); } else { personality_manager->SetActivePersonality(personality_number); return EmptySetResponse(request, queued_message_count); } } RDMResponse *ResponderHelper::GetPersonalityDescription( const RDMRequest *request, const PersonalityManager *personality_manager, uint8_t queued_message_count) { uint8_t personality_number; if (!ExtractUInt8(request, &personality_number)) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } const Personality *personality = personality_manager->Lookup( personality_number); if (!personality) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE, queued_message_count); } else { PACK( struct personality_description_s { uint8_t personality; uint16_t slots_required; char description[MAX_RDM_STRING_LENGTH]; }); STATIC_ASSERT(sizeof(personality_description_s) == 35); struct personality_description_s personality_description; personality_description.personality = personality_number; personality_description.slots_required = HostToNetwork(personality->Footprint()); size_t str_len = min(personality->Description().size(), sizeof(personality_description.description)); strncpy(personality_description.description, personality->Description().c_str(), str_len); unsigned int param_data_size = ( sizeof(personality_description) - sizeof(personality_description.description) + str_len); return GetResponseFromData( request, reinterpret_cast(&personality_description), param_data_size, RDM_ACK, queued_message_count); } } /** * Get slot info */ RDMResponse *ResponderHelper::GetSlotInfo( const RDMRequest *request, const PersonalityManager *personality_manager, uint8_t queued_message_count) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } const SlotDataCollection *slot_data = personality_manager->ActivePersonality()->GetSlotData(); if (slot_data->SlotCount() == 0) { return EmptyGetResponse(request, queued_message_count); } PACK( struct slot_info_s { uint16_t offset; uint8_t type; uint16_t label; }); STATIC_ASSERT(sizeof(slot_info_s) == 5); slot_info_s slot_info_raw[slot_data->SlotCount()]; for (uint16_t slot = 0; slot < slot_data->SlotCount(); slot++) { const SlotData *sd = slot_data->Lookup(slot); slot_info_raw[slot].offset = HostToNetwork(slot); slot_info_raw[slot].type = static_cast(sd->SlotType()); slot_info_raw[slot].label = HostToNetwork(sd->SlotIDDefinition()); } return GetResponseFromData( request, reinterpret_cast(&slot_info_raw), sizeof(slot_info_raw), RDM_ACK, queued_message_count); } /** * Get a slot description */ RDMResponse *ResponderHelper::GetSlotDescription( const RDMRequest *request, const PersonalityManager *personality_manager, uint8_t queued_message_count) { uint16_t slot_number; if (!ExtractUInt16(request, &slot_number)) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } const SlotData *slot_data = personality_manager->ActivePersonality()->GetSlotData(slot_number); if (!slot_data) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE, queued_message_count); } if (!slot_data->HasDescription()) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE, queued_message_count); } PACK( struct slot_description_s { uint16_t slot; char description[MAX_RDM_STRING_LENGTH]; }); STATIC_ASSERT(sizeof(slot_description_s) == 34); struct slot_description_s slot_description; slot_description.slot = HostToNetwork(slot_number); size_t str_len = min(slot_data->Description().size(), sizeof(slot_description.description)); strncpy(slot_description.description, slot_data->Description().c_str(), str_len); unsigned int param_data_size = ( sizeof(slot_description) - sizeof(slot_description.description) + str_len); return GetResponseFromData(request, reinterpret_cast(&slot_description), param_data_size, RDM_ACK, queued_message_count); } /** * Get slot default values */ RDMResponse *ResponderHelper::GetSlotDefaultValues( const RDMRequest *request, const PersonalityManager *personality_manager, uint8_t queued_message_count) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } const SlotDataCollection *slot_data = personality_manager->ActivePersonality()->GetSlotData(); if (slot_data->SlotCount() == 0) { return EmptyGetResponse(request, queued_message_count); } PACK( struct slot_default_s { uint16_t offset; uint8_t value; }); STATIC_ASSERT(sizeof(slot_default_s) == 3); slot_default_s slot_default_raw[slot_data->SlotCount()]; for (uint16_t slot = 0; slot < slot_data->SlotCount(); slot++) { const SlotData *sd = slot_data->Lookup(slot); slot_default_raw[slot].offset = HostToNetwork(slot); slot_default_raw[slot].value = static_cast(sd->DefaultSlotValue()); } return GetResponseFromData( request, reinterpret_cast(&slot_default_raw), sizeof(slot_default_raw), RDM_ACK, queued_message_count); } /** * Get the start address */ RDMResponse *ResponderHelper::GetDmxAddress( const RDMRequest *request, const PersonalityManager *personality_manager, uint16_t start_address, uint8_t queued_message_count) { return ResponderHelper::GetUInt16Value( request, ((personality_manager->ActivePersonalityFootprint() == 0) ? ZERO_FOOTPRINT_DMX_ADDRESS : start_address), queued_message_count); } /** * Set the start address */ RDMResponse *ResponderHelper::SetDmxAddress( const RDMRequest *request, const PersonalityManager *personality_manager, uint16_t *dmx_address, uint8_t queued_message_count) { uint16_t address; if (!ResponderHelper::ExtractUInt16(request, &address)) { return NackWithReason(request, NR_FORMAT_ERROR); } uint16_t end_address = (1 + DMX_UNIVERSE_SIZE - personality_manager->ActivePersonalityFootprint()); if (address == 0 || address > end_address) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE, queued_message_count); } else if (personality_manager->ActivePersonalityFootprint() == 0) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE, queued_message_count); } else { *dmx_address = address; return EmptySetResponse(request, queued_message_count); } } /** * Get a sensor definition */ RDMResponse *ResponderHelper::GetSensorDefinition( const RDMRequest *request, const Sensors &sensor_list) { uint8_t sensor_number; if (!ResponderHelper::ExtractUInt8(request, &sensor_number)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (sensor_number >= sensor_list.size()) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } PACK( struct sensor_definition_s { uint8_t sensor; uint8_t type; uint8_t unit; uint8_t prefix; int16_t range_min; int16_t range_max; int16_t normal_min; int16_t normal_max; uint8_t recorded_support; char description[MAX_RDM_STRING_LENGTH]; }); STATIC_ASSERT(sizeof(sensor_definition_s) == 45); const Sensor *sensor = sensor_list.at(sensor_number); struct sensor_definition_s sensor_definition; sensor_definition.sensor = sensor_number; sensor_definition.type = sensor->Type(); sensor_definition.unit = sensor->Unit(); sensor_definition.prefix = sensor->Prefix(); sensor_definition.range_min = HostToNetwork(sensor->RangeMin()); sensor_definition.range_max = HostToNetwork(sensor->RangeMax()); sensor_definition.normal_min = HostToNetwork(sensor->NormalMin()); sensor_definition.normal_max = HostToNetwork(sensor->NormalMax()); sensor_definition.recorded_support = sensor->RecordedSupportBitMask(); strings::CopyToFixedLengthBuffer(sensor->Description(), sensor_definition.description, arraysize(sensor_definition.description)); return GetResponseFromData( request, reinterpret_cast(&sensor_definition), sizeof(sensor_definition)); } /** * Get a sensor value */ RDMResponse *ResponderHelper::GetSensorValue( const RDMRequest *request, const Sensors &sensor_list) { uint8_t sensor_number; if (!ResponderHelper::ExtractUInt8(request, &sensor_number)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (sensor_number >= sensor_list.size()) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } Sensor *sensor = sensor_list.at(sensor_number); struct sensor_value_s sensor_value = { sensor_number, HostToNetwork(sensor->FetchValue()), HostToNetwork(sensor->Lowest()), HostToNetwork(sensor->Highest()), HostToNetwork(sensor->Recorded()), }; return GetResponseFromData( request, reinterpret_cast(&sensor_value), sizeof(sensor_value)); } /** * Set a sensor value */ RDMResponse *ResponderHelper::SetSensorValue( const RDMRequest *request, const Sensors &sensor_list) { uint8_t sensor_number; if (!ResponderHelper::ExtractUInt8(request, &sensor_number)) { return NackWithReason(request, NR_FORMAT_ERROR); } int16_t value = 0; if (sensor_number == ALL_SENSORS) { Sensors::const_iterator iter = sensor_list.begin(); for (; iter != sensor_list.end(); ++iter) { value = (*iter)->Reset(); } } else if (sensor_number < sensor_list.size()) { Sensor *sensor = sensor_list.at(sensor_number); value = sensor->Reset(); } else { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } struct sensor_value_s sensor_value = { sensor_number, HostToNetwork(value), HostToNetwork(value), HostToNetwork(value), HostToNetwork(value), }; return GetResponseFromData( request, reinterpret_cast(&sensor_value), sizeof(sensor_value)); } /** * Record a sensor */ RDMResponse *ResponderHelper::RecordSensor( const RDMRequest *request, const Sensors &sensor_list) { uint8_t sensor_number; if (!ResponderHelper::ExtractUInt8(request, &sensor_number)) { return NackWithReason(request, NR_FORMAT_ERROR); } if ((sensor_number == ALL_SENSORS) && (sensor_list.size() > 0)) { Sensors::const_iterator iter = sensor_list.begin(); for (; iter != sensor_list.end(); ++iter) { (*iter)->Record(); } } else if (sensor_number < sensor_list.size()) { Sensor *sensor = sensor_list.at(sensor_number); sensor->Record(); } else { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } return GetResponseFromData(request, NULL, 0); } /** * Get the clock response. */ RDMResponse *ResponderHelper::GetRealTimeClock( const RDMRequest *request, uint8_t queued_message_count) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } PACK( struct clock_s { uint16_t year; uint8_t month; uint8_t day; uint8_t hour; uint8_t minute; uint8_t second; }); STATIC_ASSERT(sizeof(clock_s) == 7); time_t now; now = time(NULL); struct tm tm_now; #ifdef _WIN32 tm_now = *localtime(&now); // NOLINT(runtime/threadsafe_fn) #else localtime_r(&now, &tm_now); #endif // _WIN32 struct clock_s clock; clock.year = HostToNetwork(static_cast(1900 + tm_now.tm_year)); clock.month = tm_now.tm_mon + 1; clock.day = tm_now.tm_mday; clock.hour = tm_now.tm_hour; clock.minute = tm_now.tm_min; clock.second = tm_now.tm_sec; return GetResponseFromData( request, reinterpret_cast(&clock), sizeof(clock), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::GetListInterfaces( const RDMRequest *request, const NetworkManagerInterface *network_manager, uint8_t queued_message_count) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } vector interfaces = network_manager->GetInterfacePicker()->GetInterfaces(false); if (interfaces.size() == 0) { return EmptyGetResponse(request, queued_message_count); } std::sort(interfaces.begin(), interfaces.end(), ola::network::InterfaceIndexOrdering()); uint16_t interface_count = std::count_if( interfaces.begin(), interfaces.end(), IsInterfaceIndexValidInterface); PACK( struct list_interfaces_s { uint32_t index; uint16_t type; }); STATIC_ASSERT(sizeof(list_interfaces_s) == 6); list_interfaces_s list_interfaces[interface_count]; // Reorder so valid interfaces are first std::stable_partition(interfaces.begin(), interfaces.end(), IsInterfaceIndexValidInterface); // Then just iterate through the valid ones vector::iterator iter = interfaces.begin(); for (uint16_t i = 0; i < interface_count; i++) { list_interfaces[i].index = HostToNetwork(iter[i].index); list_interfaces[i].type = HostToNetwork( static_cast(iter[i].type)); } return GetResponseFromData( request, reinterpret_cast(&list_interfaces), sizeof(list_interfaces), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::GetInterfaceLabel( const RDMRequest *request, const NetworkManagerInterface *network_manager, uint8_t queued_message_count) { uint32_t index; if (!ResponderHelper::ExtractUInt32(request, &index)) { return NackWithReason(request, NR_FORMAT_ERROR); } Interface interface; if (!FindInterface(network_manager, &interface, index)) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } PACK( struct interface_label_s { uint32_t index; char label[MAX_RDM_STRING_LENGTH]; }); STATIC_ASSERT(sizeof(interface_label_s) == 36); struct interface_label_s interface_label; interface_label.index = HostToNetwork(interface.index); size_t str_len = min(interface.name.size(), sizeof(interface_label.label)); strncpy(interface_label.label, interface.name.c_str(), str_len); unsigned int param_data_size = ( sizeof(interface_label) - sizeof(interface_label.label) + str_len); return GetResponseFromData(request, reinterpret_cast(&interface_label), param_data_size, RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::GetInterfaceHardwareAddressType1( const RDMRequest *request, const NetworkManagerInterface *network_manager, uint8_t queued_message_count) { uint32_t index; if (!ResponderHelper::ExtractUInt32(request, &index)) { return NackWithReason(request, NR_FORMAT_ERROR); } Interface interface; if (!FindInterface(network_manager, &interface, index)) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } // Only return type 1 (Ethernet) if (interface.type != Interface::ARP_ETHERNET_TYPE) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } PACK( struct interface_hardware_address_s { uint32_t index; uint8_t hardware_address[MACAddress::LENGTH]; }); STATIC_ASSERT(sizeof(interface_hardware_address_s) == 10); struct interface_hardware_address_s interface_hardware_address; interface_hardware_address.index = HostToNetwork(interface.index); interface.hw_address.Get(interface_hardware_address.hardware_address); return GetResponseFromData( request, reinterpret_cast(&interface_hardware_address), sizeof(interface_hardware_address), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::GetIPV4CurrentAddress( const RDMRequest *request, const NetworkManagerInterface *network_manager, uint8_t queued_message_count) { uint32_t index; if (!ResponderHelper::ExtractUInt32(request, &index)) { return NackWithReason(request, NR_FORMAT_ERROR); } Interface interface; if (!FindInterface(network_manager, &interface, index)) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } PACK( struct ipv4_current_address_s { uint32_t index; uint32_t ipv4_address; uint8_t netmask; uint8_t dhcp; }); STATIC_ASSERT(sizeof(ipv4_current_address_s) == 10); struct ipv4_current_address_s ipv4_current_address; ipv4_current_address.index = HostToNetwork(interface.index); // Already in correct byte order ipv4_current_address.ipv4_address = interface.ip_address.AsInt(); uint8_t mask = UINT8_MAX; if (!IPV4Address::ToCIDRMask(interface.subnet_mask, &mask)) { OLA_WARN << "Error converting " << interface.subnet_mask << " to CIDR value"; } ipv4_current_address.netmask = mask; ipv4_current_address.dhcp = static_cast( network_manager->GetDHCPStatus(interface)); return GetResponseFromData( request, reinterpret_cast(&ipv4_current_address), sizeof(ipv4_current_address), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::GetIPV4DefaultRoute( const RDMRequest *request, const NetworkManagerInterface *network_manager, uint8_t queued_message_count) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } int32_t if_index = Interface::DEFAULT_INDEX; IPV4Address default_route; if (!network_manager->GetIPV4DefaultRoute(&if_index, &default_route)) { return NackWithReason(request, NR_HARDWARE_FAULT); } PACK( struct ipv4_default_route_s { uint32_t if_index; uint32_t default_route; }); STATIC_ASSERT(sizeof(ipv4_default_route_s) == 8); struct ipv4_default_route_s ipv4_default_route; if (if_index == Interface::DEFAULT_INDEX) { // No default route interface index set, return special value ipv4_default_route.if_index = HostToNetwork(NO_DEFAULT_ROUTE); } else { ipv4_default_route.if_index = HostToNetwork(if_index); } if (default_route.IsWildcard()) { // No default route set, return special value ipv4_default_route.default_route = HostToNetwork(NO_DEFAULT_ROUTE); } else { // Already in correct byte order ipv4_default_route.default_route = default_route.AsInt(); } return GetResponseFromData( request, reinterpret_cast(&ipv4_default_route), sizeof(ipv4_default_route), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::GetDNSHostname( const RDMRequest *request, const NetworkManagerInterface *network_manager, uint8_t queued_message_count) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } const string hostname = network_manager->GetHostname(); if (hostname.empty() || hostname.length() > MAX_RDM_HOSTNAME_LENGTH) { // Hostname outside of the allowed parameters for RDM, return an error return NackWithReason(request, NR_HARDWARE_FAULT); } else { return GetString(request, hostname, queued_message_count, MAX_RDM_HOSTNAME_LENGTH); } } RDMResponse *ResponderHelper::GetDNSDomainName( const RDMRequest *request, const NetworkManagerInterface *network_manager, uint8_t queued_message_count) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } string domain_name = network_manager->GetDomainName(); if (domain_name.length() > MAX_RDM_DOMAIN_NAME_LENGTH) { // Domain name outside of the allowed parameters for RDM, return an error return NackWithReason(request, NR_HARDWARE_FAULT); } else { return GetString(request, domain_name, queued_message_count, MAX_RDM_DOMAIN_NAME_LENGTH); } } RDMResponse *ResponderHelper::GetDNSNameServer( const RDMRequest *request, const NetworkManagerInterface *network_manager, uint8_t queued_message_count) { uint8_t name_server_number; if (!ResponderHelper::ExtractUInt8(request, &name_server_number)) { return NackWithReason(request, NR_FORMAT_ERROR); } vector name_servers; if (!network_manager->GetNameServers(&name_servers)) { return NackWithReason(request, NR_HARDWARE_FAULT); } if ((name_server_number >= name_servers.size()) || (name_server_number > DNS_NAME_SERVER_MAX_INDEX)) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } PACK( struct name_server_s { uint8_t index; uint32_t address; }); STATIC_ASSERT(sizeof(name_server_s) == 5); struct name_server_s name_server; name_server.index = name_server_number; // s_addr is already in network byte order, so doesn't need converting name_server.address = name_servers.at(name_server_number).AsInt(); return GetResponseFromData( request, reinterpret_cast(&name_server), sizeof(name_server), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::GetParamDescription( const RDMRequest *request, uint16_t pid, uint8_t pdl_size, rdm_data_type data_type, rdm_command_class command_class, rdm_pid_unit unit, rdm_pid_prefix prefix, uint32_t min_value, uint32_t default_value, uint32_t max_value, string description, uint8_t queued_message_count) { PACK( struct parameter_description_s { uint16_t pid; uint8_t pdl_size; uint8_t data_type; uint8_t command_class; uint8_t type; uint8_t unit; uint8_t prefix; uint32_t min_value; uint32_t default_value; uint32_t max_value; char description[MAX_RDM_STRING_LENGTH]; }); STATIC_ASSERT(sizeof(parameter_description_s) == 52); struct parameter_description_s param_description; param_description.pid = HostToNetwork(pid); param_description.pdl_size = HostToNetwork(pdl_size); param_description.data_type = HostToNetwork( static_cast(data_type)); param_description.command_class = HostToNetwork( static_cast(command_class)); param_description.type = 0; param_description.unit = HostToNetwork( static_cast(unit)); param_description.prefix = HostToNetwork( static_cast(prefix)); param_description.min_value = min_value; param_description.default_value = default_value; param_description.max_value = max_value; size_t str_len = min(description.size(), sizeof(param_description.description)); strncpy(param_description.description, description.c_str(), str_len); unsigned int param_data_size = ( sizeof(param_description) - sizeof(param_description.description) + str_len); return GetResponseFromData( request, reinterpret_cast(¶m_description), param_data_size, RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::GetASCIIParamDescription( const RDMRequest *request, uint16_t pid, rdm_command_class command_class, string description, uint8_t queued_message_count) { return GetParamDescription( request, pid, static_cast(MAX_RDM_STRING_LENGTH), DS_ASCII, command_class, UNITS_NONE, PREFIX_NONE, static_cast(0), static_cast(0), static_cast(0), description, queued_message_count); } RDMResponse *ResponderHelper::GetBitFieldParamDescription( const RDMRequest *request, uint16_t pid, uint8_t pdl_size, rdm_command_class command_class, string description, uint8_t queued_message_count) { return GetParamDescription( request, pid, pdl_size, DS_BIT_FIELD, command_class, UNITS_NONE, PREFIX_NONE, static_cast(0), static_cast(0), static_cast(0), description, queued_message_count); } /* * Handle a request that returns an IPv4 address */ RDMResponse *ResponderHelper::GetIPV4Address( const RDMRequest *request, const IPV4Address &value, uint8_t queued_message_count) { return GetUInt32Value(request, // Flip it back because s_addr is in network byte order // already NetworkToHost(value.AsInt()), queued_message_count); } /** * @brief Handle a request that returns a string * @note this truncates the string to max_length */ RDMResponse *ResponderHelper::GetString( const RDMRequest *request, const string &value, uint8_t queued_message_count, uint8_t max_length) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } string sanitised_value = value.substr( 0, min(static_cast(value.length()), max_length)); return GetResponseFromData( request, reinterpret_cast(sanitised_value.data()), sanitised_value.size(), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::EmptyGetResponse( const RDMRequest *request, uint8_t queued_message_count) { return GetResponseFromData(request, NULL, 0, RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::EmptySetResponse( const RDMRequest *request, uint8_t queued_message_count) { return GetResponseFromData(request, NULL, 0, RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::SetString( const RDMRequest *request, string *value, uint8_t queued_message_count, uint8_t max_length) { if (request->ParamDataSize() > max_length) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } const string new_label(reinterpret_cast(request->ParamData()), request->ParamDataSize()); *value = new_label; return EmptySetResponse(request, queued_message_count); } RDMResponse *ResponderHelper::GetBoolValue(const RDMRequest *request, bool value, uint8_t queued_message_count) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } uint8_t param = value ? 1 : 0; return GetResponseFromData(request, ¶m, sizeof(param), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::SetBoolValue(const RDMRequest *request, bool *value, uint8_t queued_message_count) { uint8_t arg; if (!ResponderHelper::ExtractUInt8(request, &arg)) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } if (arg == 0 || arg == 1) { *value = arg; return EmptySetResponse(request, queued_message_count); } else { return NackWithReason(request, NR_DATA_OUT_OF_RANGE, queued_message_count); } } template static RDMResponse *GenericGetIntValue(const RDMRequest *request, T value, uint8_t queued_message_count = 0) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } T param = HostToNetwork(value); return GetResponseFromData( request, reinterpret_cast(¶m), sizeof(param), RDM_ACK, queued_message_count); } RDMResponse *ResponderHelper::GetUInt8Value( const RDMRequest *request, uint8_t value, uint8_t queued_message_count) { return GenericGetIntValue(request, value, queued_message_count); } RDMResponse *ResponderHelper::GetUInt16Value( const RDMRequest *request, uint16_t value, uint8_t queued_message_count) { return GenericGetIntValue(request, value, queued_message_count); } RDMResponse *ResponderHelper::GetUInt32Value( const RDMRequest *request, uint32_t value, uint8_t queued_message_count) { return GenericGetIntValue(request, value, queued_message_count); } template static RDMResponse *GenericSetIntValue(const RDMRequest *request, T *value, uint8_t queued_message_count = 0) { if (!GenericExtractValue(request, value)) { return NackWithReason(request, NR_FORMAT_ERROR, queued_message_count); } return ResponderHelper::EmptySetResponse(request, queued_message_count); } RDMResponse *ResponderHelper::SetUInt8Value( const RDMRequest *request, uint8_t *value, uint8_t queued_message_count) { return GenericSetIntValue(request, value, queued_message_count); } RDMResponse *ResponderHelper::SetUInt16Value( const RDMRequest *request, uint16_t *value, uint8_t queued_message_count) { return GenericSetIntValue(request, value, queued_message_count); } RDMResponse *ResponderHelper::SetUInt32Value( const RDMRequest *request, uint32_t *value, uint8_t queued_message_count) { return GenericSetIntValue(request, value, queued_message_count); } bool ResponderHelper::FindInterface( const NetworkManagerInterface *network_manager, Interface *interface, uint32_t index) { if (!IsInterfaceIndexValid(index)) { // Invalid index return false; } InterfacePicker::Options options; options.specific_only = true; return network_manager->GetInterfacePicker()->ChooseInterface( interface, index, options); } bool ResponderHelper::IsInterfaceIndexValid(uint32_t index) { return (index >= MIN_RDM_INTERFACE_INDEX && index <= MAX_RDM_INTERFACE_INDEX); } bool ResponderHelper::IsInterfaceIndexValidInterface(Interface interface) { return IsInterfaceIndexValid(interface.index); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/DiscoveryAgent.cpp0000664000175000017500000002701014376533110015006 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DiscoveryAgent.cpp * Implements the RDM Discovery algorithm. * Copyright (C) 2011 Simon Newton */ #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/rdm/DiscoveryAgent.h" #include "ola/rdm/UID.h" #include "ola/rdm/UIDSet.h" #include "ola/strings/Format.h" #include "ola/util/Utils.h" namespace ola { namespace rdm { using ola::utils::JoinUInt8; DiscoveryAgent::DiscoveryAgent(DiscoveryTargetInterface *target) : m_target(target), m_on_complete(NULL), m_unmute_callback( ola::NewCallback(this, &DiscoveryAgent::UnMuteComplete)), m_incremental_mute_callback( ola::NewCallback(this, &DiscoveryAgent::IncrementalMuteComplete)), m_branch_mute_callback( ola::NewCallback(this, &DiscoveryAgent::BranchMuteComplete)), m_branch_callback( ola::NewCallback(this, &DiscoveryAgent::BranchComplete)), m_muting_uid(0, 0), m_unmute_count(0), m_mute_attempts(0), m_tree_corrupt(false) { } DiscoveryAgent::~DiscoveryAgent() { Abort(); } void DiscoveryAgent::Abort() { while (!m_uid_ranges.empty()) { UIDRange *range = m_uid_ranges.top(); delete range; m_uid_ranges.pop(); } if (m_on_complete) { DiscoveryCompleteCallback *callback = m_on_complete; m_on_complete = NULL; UIDSet uids; callback->Run(false, uids); } } void DiscoveryAgent::StartFullDiscovery( DiscoveryCompleteCallback *on_complete) { InitDiscovery(on_complete, false); } void DiscoveryAgent::StartIncrementalDiscovery( DiscoveryCompleteCallback *on_complete) { InitDiscovery(on_complete, true); } /* * Start the discovery process * @param on_complete the callback to run when discovery completes * @param incremental true if this is incremental, false otherwise */ void DiscoveryAgent::InitDiscovery( DiscoveryCompleteCallback *on_complete, bool incremental) { if (m_on_complete) { OLA_WARN << "Discovery procedure already running"; UIDSet uids; on_complete->Run(false, uids); return; } m_on_complete = on_complete; // this should be empty, but clear it out anyway while (!m_uids_to_mute.empty()) { m_uids_to_mute.pop(); } // this should also be empty while (!m_uid_ranges.empty()) { FreeCurrentRange(); } if (incremental) { UIDSet::Iterator iter = m_uids.Begin(); for (; iter != m_uids.End(); ++iter) { m_uids_to_mute.push(*iter); } } else { m_uids.Clear(); } m_bad_uids.Clear(); m_tree_corrupt = false; // push the first range on to the branch stack UID lower(0, 0); m_uid_ranges.push(new UIDRange(lower, UID::AllDevices(), NULL)); m_unmute_count = 0; m_target->UnMuteAll(m_unmute_callback.get()); } /* * Called when the UnMute completes. This resends the Unmute command up to * BROADCAST_UNMUTE_REPEATS times and then starts muting previously known * devices (incremental only). */ void DiscoveryAgent::UnMuteComplete() { if (m_uid_ranges.empty()) { // Abort() was called return; } m_unmute_count++; if (m_unmute_count < BROADCAST_UNMUTE_REPEATS) { m_target->UnMuteAll(m_unmute_callback.get()); return; } MaybeMuteNextDevice(); } /* * If we're in incremental mode, mute previously discovered devices. Otherwise * proceed to the branch stage. */ void DiscoveryAgent::MaybeMuteNextDevice() { if (m_uids_to_mute.empty()) { SendDiscovery(); } else { m_muting_uid = m_uids_to_mute.front(); m_uids_to_mute.pop(); OLA_DEBUG << "Muting previously discovered responder: " << m_muting_uid; m_target->MuteDevice(m_muting_uid, m_incremental_mute_callback.get()); } } /** * Called when we mute a device during incremental discovery. */ void DiscoveryAgent::IncrementalMuteComplete(bool status) { if (!status) { m_uids.RemoveUID(m_muting_uid); OLA_WARN << "Unable to mute " << m_muting_uid << ", device has gone"; } else { OLA_DEBUG << "Muted " << m_muting_uid; } MaybeMuteNextDevice(); } /* * Send a Discovery Unique Branch request. */ void DiscoveryAgent::SendDiscovery() { if (m_uid_ranges.empty()) { // we're hit the end of the stack, now we're done if (m_on_complete) { m_on_complete->Run(!m_tree_corrupt, m_uids); m_on_complete = NULL; } else { OLA_WARN << "Discovery complete but no callback"; } return; } UIDRange *range = m_uid_ranges.top(); if (range->uids_discovered == 0) { range->attempt++; } if (range->failures == MAX_BRANCH_FAILURES || range->attempt == MAX_EMPTY_BRANCH_ATTEMPTS || range->branch_corrupt) { // limit reached, move on to the next branch OLA_DEBUG << "Hit failure limit for (" << range->lower << ", " << range->upper << ")"; if (range->parent) range->parent->branch_corrupt = true; FreeCurrentRange(); SendDiscovery(); } else { OLA_DEBUG << "DUB " << range->lower << " - " << range->upper << ", attempt " << range->attempt << ", uids found: " << range->uids_discovered << ", failures " << range->failures << ", corrupted " << range->branch_corrupt; m_target->Branch(range->lower, range->upper, m_branch_callback.get()); } } /* * Handle a DUB response (inc. timeouts). * @param data the raw response, excluding the start code * @param length the length of the response, 0 if no response was received. */ void DiscoveryAgent::BranchComplete(const uint8_t *data, unsigned int length) { OLA_INFO << "BranchComplete, got " << length; if (length == 0) { // timeout if (!m_uid_ranges.empty()) { FreeCurrentRange(); } SendDiscovery(); return; } // Must at least have the separator, the EUID and the checksum if (length < 1 + EUID_SIZE + CHECKSUM_SIZE) { HandleCollision(); return; } unsigned int offset = 0; while (data[offset] != PREAMBLE_SEPARATOR && offset < PREAMBLE_SIZE - 1) { if (data[offset] != PREAMBLE) { OLA_INFO << "Preamble " << offset << " " << strings::ToHex(data[offset]); HandleCollision(); return; } offset++; } if (data[offset] != PREAMBLE_SEPARATOR) { OLA_INFO << "Preamble separator" << offset << " " << strings::ToHex(data[offset]); HandleCollision(); return; } offset++; unsigned int remaining = length - offset; if (remaining < EUID_SIZE + CHECKSUM_SIZE) { OLA_INFO << "Insufficient data remaining, was " << remaining; HandleCollision(); return; } typedef struct { uint8_t euid11; uint8_t euid10; uint8_t euid9; uint8_t euid8; uint8_t euid7; uint8_t euid6; uint8_t euid5; uint8_t euid4; uint8_t euid3; uint8_t euid2; uint8_t euid1; uint8_t euid0; uint8_t ecs3; uint8_t ecs2; uint8_t ecs1; uint8_t ecs0; } dub_response_structure; const dub_response_structure *response = reinterpret_cast(data + offset); uint16_t calculated_checksum = 0; for (unsigned int i = offset; i < offset + EUID_SIZE; i++) { calculated_checksum += data[i]; } uint16_t recovered_checksum = JoinUInt8((response->ecs3 & response->ecs2), (response->ecs1 & response->ecs0)); if (recovered_checksum != calculated_checksum) { OLA_INFO << "Recovered checksum: " << recovered_checksum << " != " << "calculated checksum: " << calculated_checksum; HandleCollision(); return; } // ok this is a valid response uint16_t manufacturer_id = JoinUInt8((response->euid11 & response->euid10), (response->euid9 & response->euid8)); uint32_t device_id = JoinUInt8((response->euid7 & response->euid6), (response->euid5 & response->euid4), (response->euid3 & response->euid2), (response->euid1 & response->euid0)); UIDRange *range = m_uid_ranges.top(); // we store this as an instance variable so we don't have to create a new // callback each time. UID located_uid = UID(manufacturer_id, device_id); if (m_uids.Contains(located_uid)) { OLA_WARN << "Previous muted responder " << located_uid << " continues to respond"; range->failures++; // Treat this as a collision and continue branching down HandleCollision(); } else if (m_bad_uids.Contains(located_uid)) { // we've already tried this one range->failures++; // Continue branching HandleCollision(); } else { m_muting_uid = located_uid; m_mute_attempts = 0; OLA_INFO << "Muting " << m_muting_uid; m_target->MuteDevice(m_muting_uid, m_branch_mute_callback.get()); } } /* * Called when we successful mute a device during the branch stage. */ void DiscoveryAgent::BranchMuteComplete(bool status) { m_mute_attempts++; if (status) { m_uids.AddUID(m_muting_uid); m_uid_ranges.top()->uids_discovered++; } else { // failed to mute, if we haven't reached the limit try it again if (m_mute_attempts < MAX_MUTE_ATTEMPTS) { OLA_INFO << "Muting " << m_muting_uid; m_target->MuteDevice(m_muting_uid, m_branch_mute_callback.get()); return; } else { // this UID is bad, either it was a phantom or it doesn't response to // mute commands OLA_INFO << m_muting_uid << " didn't respond to MUTE, marking as bad"; m_bad_uids.AddUID(m_muting_uid); } } SendDiscovery(); } /* * Handle a DUB collision. */ void DiscoveryAgent::HandleCollision() { UIDRange *range = m_uid_ranges.top(); UID lower_uid = range->lower; UID upper_uid = range->upper; if (lower_uid == upper_uid) { range->failures++; OLA_WARN << "End of tree reached!!!"; SendDiscovery(); return; } // work out the mid point uint64_t lower = ((static_cast(lower_uid.ManufacturerId()) << 32) + lower_uid.DeviceId()); uint64_t upper = ((static_cast(upper_uid.ManufacturerId()) << 32) + upper_uid.DeviceId()); uint64_t mid = (lower + upper) / 2; UID mid_uid(mid >> 32, mid); mid++; UID mid_plus_one_uid(mid >> 32, mid); OLA_INFO << "Collision, splitting into: " << lower_uid << " - " << mid_uid << " , " << mid_plus_one_uid << " - " << upper_uid; range->uids_discovered = 0; // add both ranges to the stack m_uid_ranges.push(new UIDRange(lower_uid, mid_uid, range)); m_uid_ranges.push(new UIDRange(mid_plus_one_uid, upper_uid, range)); SendDiscovery(); } /* * Deletes the current range from the stack, and pops it. */ void DiscoveryAgent::FreeCurrentRange() { UIDRange *range = m_uid_ranges.top(); if (m_uid_ranges.size() == 1) { // top of stack if (range->branch_corrupt) { OLA_INFO << "Discovery tree is corrupted"; m_tree_corrupt = true; } } else { range->parent->uids_discovered += range->uids_discovered; } delete range; m_uid_ranges.pop(); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/CommandPrinter.cpp0000664000175000017500000003327214376533110015011 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * CommandPrinter.cpp * Write out RDMCommands in a human-readable format. * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include #include #include #include #include namespace ola { namespace rdm { using ola::messaging::Descriptor; using ola::messaging::Message; using ola::network::NetworkToHost; using std::auto_ptr; using std::endl; using std::string; /** * Constructor * @param output the ostream to write to. * @param pid_helper a pointer to a PidStoreHelper object */ CommandPrinter::CommandPrinter(std::ostream *output, PidStoreHelper *pid_helper) : m_output(output), m_pid_helper(pid_helper) { } void CommandPrinter::Print(const class RDMCommand *, bool, bool) { *m_output << "Unknown RDM Command class"; } void CommandPrinter::Print(const class RDMRequest *request, bool summarize, bool unpack_param_data) { DisplayRequest(request, summarize, unpack_param_data); } void CommandPrinter::Print(const class RDMResponse *response, bool summarize, bool unpack_param_data) { DisplayResponse(response, summarize, unpack_param_data); } void CommandPrinter::Print(const class RDMDiscoveryRequest *request, bool summarize, bool unpack_param_data) { DisplayDiscoveryRequest(request, summarize, unpack_param_data); } void CommandPrinter::Print(const class RDMDiscoveryResponse *response, bool summarize, bool unpack_param_data) { DisplayDiscoveryResponse(response, summarize, unpack_param_data); } /** * Write out a RDM Request * @param request the request to format * @param summarize enable the one line summary * @param unpack_param_data if the summary isn't enabled, this controls if we * unpack and display parameter data. */ void CommandPrinter::DisplayRequest(const RDMRequest *request, bool summarize, bool unpack_param_data) { const PidDescriptor *descriptor = m_pid_helper->GetDescriptor( request->ParamId(), request->DestinationUID().ManufacturerId()); bool is_get = request->CommandClass() == RDMCommand::GET_COMMAND; if (summarize) { AppendUIDsAndType(request, (is_get ? "GET" : "SET")); *m_output << ", port: " << std::dec << static_cast(request->PortId()) << ", "; AppendPidString(request, descriptor); } else { AppendVerboseUIDs(request); AppendPortId(request); AppendHeaderFields(request, (is_get ? "GET" : "SET")); *m_output << " Param ID : 0x" << std::setfill('0') << std::setw(4) << std::hex << request->ParamId(); if (descriptor) *m_output << " (" << descriptor->Name() << ")"; *m_output << endl; *m_output << " Param data len : " << std::dec << request->ParamDataSize() << endl; DisplayParamData(descriptor, unpack_param_data, true, is_get, request->ParamData(), request->ParamDataSize()); } } /** * Write out a RDM Response * @param response the response to format * @param summarize enable the one line summary * @param unpack_param_data if the summary isn't enabled, this controls if we * unpack and display parameter data. */ void CommandPrinter::DisplayResponse(const RDMResponse *response, bool summarize, bool unpack_param_data) { const PidDescriptor *descriptor = m_pid_helper->GetDescriptor( response->ParamId(), response->SourceUID().ManufacturerId()); bool is_get = response->CommandClass() == RDMCommand::GET_COMMAND_RESPONSE; if (summarize) { AppendUIDsAndType(response, (is_get ? "GET_RESPONSE" : "SET_RESPONSE")); *m_output << ", response type: "; AppendResponseType(response); *m_output << ", "; AppendPidString(response, descriptor); } else { AppendVerboseUIDs(response); AppendVerboseResponseType(response); AppendHeaderFields(response, (is_get ? "GET_RESPONSE" : "SET_RESPONSE")); *m_output << " Param ID : 0x" << std::setfill('0') << std::setw(4) << std::hex << response->ParamId(); if (descriptor) *m_output << " (" << descriptor->Name() << ")"; *m_output << endl; *m_output << " Param data len : " << std::dec << response->ParamDataSize() << endl; DisplayParamData(descriptor, unpack_param_data, false, is_get, response->ParamData(), response->ParamDataSize()); } } /** * Write out a RDM discovery request * @param request the request to format * @param summarize enable the one line summary * @param unpack_param_data if the summary isn't enabled, this controls if we * unpack and display parameter data. */ void CommandPrinter::DisplayDiscoveryRequest( const RDMDiscoveryRequest *request, bool summarize, bool unpack_param_data) { string param_name; switch (request->ParamId()) { case ola::rdm::PID_DISC_UNIQUE_BRANCH: param_name = "DISC_UNIQUE_BRANCH"; break; case ola::rdm::PID_DISC_MUTE: param_name = "DISC_MUTE"; break; case ola::rdm::PID_DISC_UN_MUTE: param_name = "DISC_UN_MUTE"; break; } if (summarize) { AppendUIDsAndType(request, "DISCOVERY_COMMAND"); *m_output << ", PID 0x" << std::hex << std::setfill('0') << std::setw(4) << request->ParamId(); if (!param_name.empty()) *m_output << " (" << param_name << ")"; if (request->ParamId() == ola::rdm::PID_DISC_UNIQUE_BRANCH && request->ParamDataSize() == 2 * UID::UID_SIZE) { const uint8_t *param_data = request->ParamData(); UID lower(param_data); UID upper(param_data + UID::UID_SIZE); *m_output << ", (" << lower << ", " << upper << ")"; } else { *m_output << ", pdl: " << std::dec << request->ParamDataSize(); } *m_output << endl; } else { AppendVerboseUIDs(request); AppendPortId(request); AppendHeaderFields(request, "DISCOVERY_COMMAND"); *m_output << " Param ID : 0x" << std::setfill('0') << std::setw(4) << std::hex << request->ParamId(); if (!param_name.empty()) *m_output << " (" << param_name << ")"; *m_output << endl; *m_output << " Param data len : " << std::dec << request->ParamDataSize() << endl; DisplayParamData(NULL, unpack_param_data, true, false, request->ParamData(), request->ParamDataSize()); } } /** * Write out a RDM discovery response. * @param response the response to format. * @param summarize enable the one line summary * @param unpack_param_data if the summary isn't enabled, this controls if we * unpack and display parameter data. */ void CommandPrinter::DisplayDiscoveryResponse( const RDMDiscoveryResponse *response, bool summarize, bool unpack_param_data) { string param_name; switch (response->ParamId()) { case ola::rdm::PID_DISC_UNIQUE_BRANCH: param_name = "DISC_UNIQUE_BRANCH"; break; case ola::rdm::PID_DISC_MUTE: param_name = "DISC_MUTE"; break; case ola::rdm::PID_DISC_UN_MUTE: param_name = "DISC_UN_MUTE"; break; } if (summarize) { AppendUIDsAndType(response, "DISCOVERY_COMMAND_RESPONSE"); *m_output << ", PID 0x" << std::hex << std::setfill('0') << std::setw(4) << response->ParamId(); if (!param_name.empty()) *m_output << " (" << param_name << ")"; if (response->ParamId() == ola::rdm::PID_DISC_UNIQUE_BRANCH && response->ParamDataSize() == 2 * UID::UID_SIZE) { const uint8_t *param_data = response->ParamData(); UID lower(param_data); UID upper(param_data + UID::UID_SIZE); *m_output << ", (" << lower << ", " << upper << ")"; } else { *m_output << ", pdl: " << std::dec << response->ParamDataSize(); } *m_output << endl; } else { AppendVerboseUIDs(response); AppendVerboseResponseType(response); AppendHeaderFields(response, "DISCOVERY_COMMAND_RESPONSE"); *m_output << " Param ID : 0x" << std::setfill('0') << std::setw(4) << std::hex << response->ParamId(); if (!param_name.empty()) *m_output << " (" << param_name << ")"; *m_output << endl; *m_output << " Param data len : " << std::dec << response->ParamDataSize() << endl; DisplayParamData(NULL, unpack_param_data, true, false, response->ParamData(), response->ParamDataSize()); } } /** * Append the src/dst UIDs & type */ void CommandPrinter::AppendUIDsAndType(const class RDMCommand *command, const char *message_type) { *m_output << command->SourceUID() << " -> " << command->DestinationUID() << " " << message_type << ", sub-device: " << std::dec << command->SubDevice() << ", tn: " << static_cast(command->TransactionNumber()); } void CommandPrinter::AppendPortId(const class RDMRequest *request) { *m_output << " Port ID : " << std::dec << static_cast(request->PortId()) << endl; } void CommandPrinter::AppendVerboseUIDs(const class RDMCommand *command) { *m_output << " Source UID : " << command->SourceUID() << endl; *m_output << " Dest UID : " << command->DestinationUID() << endl; *m_output << " Transaction # : " << std::dec << static_cast(command->TransactionNumber()) << endl; } void CommandPrinter::AppendResponseType(const RDMResponse *response) { switch (response->ResponseType()) { case ola::rdm::RDM_ACK: *m_output << "ACK"; break; case ola::rdm::RDM_ACK_TIMER: *m_output << "ACK TIMER"; break; case ola::rdm::RDM_NACK_REASON: uint16_t reason; if (GetNackReason(response, &reason)) { *m_output << "NACK (" << ola::rdm::NackReasonToString(reason) << ")"; } else { *m_output << "Malformed NACK "; } break; case ola::rdm::ACK_OVERFLOW: *m_output << "ACK OVERFLOW"; break; default: *m_output << "Unknown (" << response->ResponseType() << ")"; } } void CommandPrinter::AppendVerboseResponseType( const RDMResponse *response) { *m_output << " Response Type : "; AppendResponseType(response); *m_output << endl; } void CommandPrinter::AppendHeaderFields( const RDMCommand *command, const char *command_class) { *m_output << " Message count : " << std::dec << static_cast(command->MessageCount()) << endl; *m_output << " Sub device : " << std::dec << command->SubDevice() << endl; *m_output << " Command class : " << command_class << endl; } /** * Append the PID descriptor */ void CommandPrinter::AppendPidString(const RDMCommand *command, const PidDescriptor *descriptor) { *m_output << "PID 0x" << std::hex << std::setfill('0') << std::setw(4) << command->ParamId(); if (descriptor) *m_output << " (" << descriptor->Name() << ")"; *m_output << ", pdl: " << std::dec << command->ParamDataSize() << endl; } /** * Format parameter data. */ void CommandPrinter::DisplayParamData( const PidDescriptor *pid_descriptor, bool unpack_param_data, bool is_request, bool is_get, const uint8_t *param_data, unsigned int data_length) { if (!data_length) { return; } *m_output << " Param data:" << endl; if (unpack_param_data && pid_descriptor) { const Descriptor *descriptor = NULL; if (is_request) { descriptor = (is_get ? pid_descriptor->GetRequest() : pid_descriptor->SetRequest()); } else { descriptor = (is_get ? pid_descriptor->GetResponse() : pid_descriptor->SetResponse()); } if (descriptor) { auto_ptr message( m_pid_helper->DeserializeMessage(descriptor, param_data, data_length)); if (message.get()) { *m_output << m_pid_helper->MessageToString(message.get()); return; } } } // otherwise just display the raw data, indent 4, 8 bytes per line ola::FormatData(m_output, param_data, data_length, 4, 8); } /** * Get the nack reason. */ bool CommandPrinter::GetNackReason(const RDMCommand *response, uint16_t *reason) { if (response->ParamDataSize() == 2) { memcpy(reinterpret_cast(reason), response->ParamData(), sizeof(*reason)); *reason = NetworkToHost(*reason); return true; } else { return false; } } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/PidStore.cpp0000664000175000017500000001451314376533110013615 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PidStore.cpp * The PidStore and Pid classes. * Copyright (C) 2011 Simon Newton */ #include #include #include "common/rdm/PidStoreLoader.h" #include "ola/StringUtils.h" #include "ola/rdm/PidStore.h" #include "ola/rdm/RDMEnums.h" #include "ola/stl/STLUtils.h" namespace ola { namespace rdm { using std::string; using std::vector; RootPidStore::~RootPidStore() { m_esta_store.reset(); STLDeleteValues(&m_manufacturer_store); } const PidStore *RootPidStore::ManufacturerStore(uint16_t esta_id) const { ManufacturerMap::const_iterator iter = m_manufacturer_store.find(esta_id); if (iter == m_manufacturer_store.end()) return NULL; return iter->second; } const PidDescriptor *RootPidStore::GetDescriptor( const string &pid_name) const { string canonical_pid_name = pid_name; ola::ToUpper(&canonical_pid_name); return InternalESTANameLookup(canonical_pid_name); } const PidDescriptor *RootPidStore::GetDescriptor( const string &pid_name, uint16_t manufacturer_id) const { string canonical_pid_name = pid_name; ola::ToUpper(&canonical_pid_name); const PidDescriptor *descriptor = InternalESTANameLookup(canonical_pid_name); if (descriptor) return descriptor; // now try the specific manufacturer store const PidStore *store = ManufacturerStore(manufacturer_id); if (store) return store->LookupPID(canonical_pid_name); return NULL; } const PidDescriptor *RootPidStore::GetDescriptor(uint16_t pid_value) const { if (m_esta_store.get()) { const PidDescriptor *descriptor = m_esta_store->LookupPID(pid_value); if (descriptor) return descriptor; } return NULL; } const PidDescriptor *RootPidStore::GetDescriptor( uint16_t pid_value, uint16_t manufacturer_id) const { const PidDescriptor *descriptor = GetDescriptor(pid_value); if (descriptor) return descriptor; // now try the specific manufacturer store const PidStore *store = ManufacturerStore(manufacturer_id); if (store) { const PidDescriptor *descriptor = store->LookupPID(pid_value); if (descriptor) return descriptor; } return NULL; } const PidDescriptor *RootPidStore::InternalESTANameLookup( const string &canonical_pid_name) const { if (m_esta_store.get()) { const PidDescriptor *descriptor = m_esta_store->LookupPID( canonical_pid_name); if (descriptor) return descriptor; } return NULL; } const RootPidStore *RootPidStore::LoadFromFile(const string &file, bool validate) { PidStoreLoader loader; return loader.LoadFromFile(file, validate); } const RootPidStore *RootPidStore::LoadFromDirectory( const string &directory, bool validate) { PidStoreLoader loader; string data_source = directory; if (directory.empty()) { data_source = DataLocation(); } return loader.LoadFromDirectory(data_source, validate); } const string RootPidStore::DataLocation() { // Provided at compile time. return PID_DATA_DIR; } PidStore::PidStore(const vector &pids) { vector::const_iterator iter = pids.begin(); for (; iter != pids.end(); ++iter) { m_pid_by_value[(*iter)->Value()] = *iter; m_pid_by_name[(*iter)->Name()] = *iter; } } PidStore::~PidStore() { STLDeleteValues(&m_pid_by_value); m_pid_by_name.clear(); } void PidStore::AllPids(vector *pids) const { pids->reserve(pids->size() + m_pid_by_value.size()); PidMap::const_iterator iter = m_pid_by_value.begin(); for (; iter != m_pid_by_value.end(); ++iter) { pids->push_back(iter->second); } } /** * Clean up */ PidDescriptor::~PidDescriptor() { delete m_get_request; delete m_get_response; delete m_set_request; delete m_set_response; } /** * Lookup a PID by value. * @param pid_value the 16 bit pid value. */ const PidDescriptor *PidStore::LookupPID(uint16_t pid_value) const { PidMap::const_iterator iter = m_pid_by_value.find(pid_value); if (iter == m_pid_by_value.end()) return NULL; else return iter->second; } /** * Lookup a PID by name * @param pid_name the name of the pid. */ const PidDescriptor *PidStore::LookupPID(const string &pid_name) const { PidNameMap::const_iterator iter = m_pid_by_name.find(pid_name); if (iter == m_pid_by_name.end()) return NULL; else return iter->second; } /** * Check if a GET request to this subdevice is valid * @param sub_device the sub device for this request. * @returns true if the request is valid, false otherwise. */ bool PidDescriptor::IsGetValid(uint16_t sub_device) const { return m_get_request && RequestValid(sub_device, m_get_subdevice_range); } /** * Check if a SET request to this subdevice is valid * @param sub_device the sub device for this request. * @returns true if the request is valid, false otherwise. */ bool PidDescriptor::IsSetValid(uint16_t sub_device) const { return m_set_request && RequestValid(sub_device, m_set_subdevice_range); } /** * Returns is a request is valid */ bool PidDescriptor::RequestValid(uint16_t sub_device, const sub_device_validator &validator) const { switch (validator) { case ROOT_DEVICE: // 0 only return sub_device == 0; case ANY_SUB_DEVICE: // 0 - 512 of ALL_RDM_SUBDEVICES return (sub_device <= MAX_SUBDEVICE_NUMBER || sub_device == ALL_RDM_SUBDEVICES); case NON_BROADCAST_SUB_DEVICE: // 0 - 512 return sub_device <= MAX_SUBDEVICE_NUMBER; case SPECIFIC_SUB_DEVICE: // 1 - 512 return sub_device > 0 && sub_device <= MAX_SUBDEVICE_NUMBER; default: return false; } } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/PidStoreTest.cpp0000664000175000017500000004254514376533110014463 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PidStoreTest.cpp * Test fixture for the PidStore & Pid classes * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include #include "common/rdm/PidStoreLoader.h" #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/messaging/Descriptor.h" #include "ola/messaging/SchemaPrinter.h" #include "ola/rdm/PidStore.h" #include "ola/rdm/RDMEnums.h" #include "ola/testing/TestUtils.h" using ola::messaging::Descriptor; using ola::messaging::FieldDescriptor; using ola::messaging::FieldDescriptorGroup; using ola::rdm::PidDescriptor; using ola::rdm::PidStore; using ola::rdm::PidStoreLoader; using ola::rdm::RootPidStore; using std::auto_ptr; using std::endl; using std::string; using std::stringstream; using std::vector; class PidStoreTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(PidStoreTest); CPPUNIT_TEST(testPidDescriptor); CPPUNIT_TEST(testPidStore); CPPUNIT_TEST(testPidStoreLoad); CPPUNIT_TEST(testPidStoreFileLoad); CPPUNIT_TEST(testPidStoreDirectoryLoad); CPPUNIT_TEST(testPidStoreLoadMissingFile); CPPUNIT_TEST(testPidStoreLoadDuplicateManufacturer); CPPUNIT_TEST(testPidStoreLoadDuplicateValue); CPPUNIT_TEST(testPidStoreLoadDuplicateName); CPPUNIT_TEST(testPidStoreLoadInvalidEstaPid); CPPUNIT_TEST(testInconsistentData); CPPUNIT_TEST_SUITE_END(); public: void testPidDescriptor(); void testPidStore(); void testPidStoreLoad(); void testPidStoreFileLoad(); void testPidStoreDirectoryLoad(); void testPidStoreLoadMissingFile(); void testPidStoreLoadDuplicateManufacturer(); void testPidStoreLoadDuplicateValue(); void testPidStoreLoadDuplicateName(); void testPidStoreLoadInvalidEstaPid(); void testInconsistentData(); private: string GetTestDataFile(const string &filename) { string path = TEST_SRC_DIR; path.append("/common/rdm/testdata/"); path.append(filename); return path; } }; CPPUNIT_TEST_SUITE_REGISTRATION(PidStoreTest); /* * Test that the PidDescriptor works. */ void PidStoreTest::testPidDescriptor() { // just use empty fields for now vector fields; const Descriptor *get_request_descriptor = new Descriptor("GET Request", fields); const Descriptor *get_response_descriptor = new Descriptor("GET Response", fields); const Descriptor *set_request_descriptor = new Descriptor("SET Request", fields); const Descriptor *set_response_descriptor = new Descriptor("SET Response", fields); PidDescriptor pid("foo", 10, get_request_descriptor, get_response_descriptor, set_request_descriptor, set_response_descriptor, PidDescriptor::NON_BROADCAST_SUB_DEVICE, PidDescriptor::ANY_SUB_DEVICE); // basic checks OLA_ASSERT_EQ(string("foo"), pid.Name()); OLA_ASSERT_EQ(static_cast(10), pid.Value()); OLA_ASSERT_EQ(get_request_descriptor, pid.GetRequest()); OLA_ASSERT_EQ(get_response_descriptor, pid.GetResponse()); OLA_ASSERT_EQ(set_request_descriptor, pid.SetRequest()); OLA_ASSERT_EQ(set_response_descriptor, pid.SetResponse()); // check sub device constraints OLA_ASSERT_TRUE(pid.IsGetValid(0)); OLA_ASSERT_TRUE(pid.IsGetValid(1)); OLA_ASSERT_TRUE(pid.IsGetValid(2)); OLA_ASSERT_TRUE(pid.IsGetValid(511)); OLA_ASSERT_TRUE(pid.IsGetValid(512)); OLA_ASSERT_FALSE(pid.IsGetValid(513)); OLA_ASSERT_FALSE(pid.IsGetValid(0xffff)); OLA_ASSERT_TRUE(pid.IsSetValid(0)); OLA_ASSERT_TRUE(pid.IsSetValid(1)); OLA_ASSERT_TRUE(pid.IsSetValid(2)); OLA_ASSERT_TRUE(pid.IsSetValid(511)); OLA_ASSERT_TRUE(pid.IsSetValid(512)); OLA_ASSERT_FALSE(pid.IsSetValid(513)); OLA_ASSERT_TRUE(pid.IsSetValid(0xffff)); } /** * Check the PidStore works. */ void PidStoreTest::testPidStore() { const PidDescriptor *foo_pid = new PidDescriptor( "foo", 0, NULL, NULL, NULL, NULL, PidDescriptor::NON_BROADCAST_SUB_DEVICE, PidDescriptor::ANY_SUB_DEVICE); const PidDescriptor *bar_pid = new PidDescriptor( "bar", 1, NULL, NULL, NULL, NULL, PidDescriptor::NON_BROADCAST_SUB_DEVICE, PidDescriptor::ANY_SUB_DEVICE); vector pids; pids.push_back(foo_pid); pids.push_back(bar_pid); PidStore store(pids); // check value lookups OLA_ASSERT_EQ(foo_pid, store.LookupPID(0)); OLA_ASSERT_EQ(bar_pid, store.LookupPID(1)); OLA_ASSERT_EQ(static_cast(NULL), store.LookupPID(2)); // check name lookups OLA_ASSERT_EQ(foo_pid, store.LookupPID("foo")); OLA_ASSERT_EQ(bar_pid, store.LookupPID("bar")); OLA_ASSERT_EQ(static_cast(NULL), store.LookupPID("baz")); // check all pids; vector all_pids; store.AllPids(&all_pids); OLA_ASSERT_EQ(static_cast(2), all_pids.size()); OLA_ASSERT_EQ(foo_pid, all_pids[0]); OLA_ASSERT_EQ(bar_pid, all_pids[1]); } /** * Check we can load a PidStore from a string */ void PidStoreTest::testPidStoreLoad() { PidStoreLoader loader; // This is a stringstream not a ostringstream as the other end needs an // istream stringstream str; // check that this fails to load const RootPidStore *empty_root_store = loader.LoadFromStream(&str); OLA_ASSERT_EQ(static_cast(NULL), empty_root_store); // now try a simple pid store config str.clear(); str << "pid {" << endl << " name: \"PROXIED_DEVICES\"" << endl << " value: 16" << endl << " get_request {" << endl << " }" << endl << " get_response {" << endl << " field {" << endl << " type: GROUP" << endl << " name: \"uids\"" << endl << " field {" << endl << " type: UINT16" << endl << " name: \"manufacturer_id\"" << endl << " }" << endl << " field {" << endl << " type: UINT32" << endl << " name: \"device_id\"" << endl << " }" << endl << " }" << endl << " }" << endl << " get_sub_device_range: ROOT_DEVICE" << endl << "}" << endl << "manufacturer {" << endl << " manufacturer_id: 31344" << endl << " manufacturer_name: \"Open Lighting\"" << endl << "}" << endl << "version: 1" << endl; auto_ptr root_store(loader.LoadFromStream(&str)); OLA_ASSERT_TRUE(root_store.get()); // check version OLA_ASSERT_EQ(static_cast(1), root_store->Version()); // check manufacturer pids const PidStore *open_lighting_store = root_store->ManufacturerStore(ola::OPEN_LIGHTING_ESTA_CODE); OLA_ASSERT_TRUE(open_lighting_store); OLA_ASSERT_EQ(0u, open_lighting_store->PidCount()); // lookup by value OLA_ASSERT_TRUE(root_store->GetDescriptor(16)); OLA_ASSERT_FALSE(root_store->GetDescriptor(17)); OLA_ASSERT_TRUE(root_store->GetDescriptor(16, ola::OPEN_LIGHTING_ESTA_CODE)); OLA_ASSERT_FALSE(root_store->GetDescriptor(17, ola::OPEN_LIGHTING_ESTA_CODE)); // lookup by name OLA_ASSERT_TRUE(root_store->GetDescriptor("PROXIED_DEVICES")); OLA_ASSERT_FALSE(root_store->GetDescriptor("DEVICE_INFO")); OLA_ASSERT_TRUE(root_store->GetDescriptor("PROXIED_DEVICES", ola::OPEN_LIGHTING_ESTA_CODE)); OLA_ASSERT_FALSE(root_store->GetDescriptor("DEVICE_INFO", ola::OPEN_LIGHTING_ESTA_CODE)); // check lookups const PidStore *esta_store = root_store->EstaStore(); OLA_ASSERT_TRUE(esta_store); const PidDescriptor *pid_descriptor = esta_store->LookupPID(16); OLA_ASSERT_TRUE(pid_descriptor); const PidDescriptor *pid_descriptor2 = esta_store->LookupPID( "PROXIED_DEVICES"); OLA_ASSERT_TRUE(pid_descriptor2); OLA_ASSERT_EQ(pid_descriptor, pid_descriptor2); // check name and value OLA_ASSERT_EQ(static_cast(16), pid_descriptor->Value()); OLA_ASSERT_EQ(string("PROXIED_DEVICES"), pid_descriptor->Name()); // check descriptors OLA_ASSERT_TRUE(pid_descriptor->GetRequest()); OLA_ASSERT_TRUE(pid_descriptor->GetResponse()); OLA_ASSERT_EQ(static_cast(NULL), pid_descriptor->SetRequest()); OLA_ASSERT_EQ(static_cast(NULL), pid_descriptor->SetResponse()); // check GET descriptors const Descriptor *get_request = pid_descriptor->GetRequest(); OLA_ASSERT_EQ(0u, get_request->FieldCount()); const Descriptor *get_response = pid_descriptor->GetResponse(); OLA_ASSERT_EQ(1u, get_response->FieldCount()); const FieldDescriptor *proxied_group = get_response->GetField(0); OLA_ASSERT_TRUE(proxied_group); // this is ugly but it's a test const FieldDescriptorGroup *group_descriptor = dynamic_cast(proxied_group); OLA_ASSERT_TRUE(group_descriptor); // check all the group properties OLA_ASSERT_FALSE(group_descriptor->FixedSize()); OLA_ASSERT_FALSE(group_descriptor->LimitedSize()); OLA_ASSERT_EQ(0u, group_descriptor->MaxSize()); OLA_ASSERT_EQ(2u, group_descriptor->FieldCount()); OLA_ASSERT_TRUE(group_descriptor->FixedBlockSize()); OLA_ASSERT_EQ(6u, group_descriptor->BlockSize()); OLA_ASSERT_EQ(6u, group_descriptor->MaxBlockSize()); OLA_ASSERT_EQ(static_cast(0), group_descriptor->MinBlocks()); OLA_ASSERT_EQ(FieldDescriptorGroup::UNLIMITED_BLOCKS, group_descriptor->MaxBlocks()); OLA_ASSERT_FALSE(group_descriptor->FixedBlockCount()); // Check this prints correctly ola::messaging::SchemaPrinter printer; get_response->Accept(&printer); string expected = ( "uids {\n manufacturer_id: uint16\n device_id: uint32\n}\n"); OLA_ASSERT_EQ(expected, printer.AsString()); // check sub device ranges OLA_ASSERT_TRUE(pid_descriptor->IsGetValid(0)); OLA_ASSERT_FALSE(pid_descriptor->IsGetValid(1)); OLA_ASSERT_FALSE(pid_descriptor->IsGetValid(512)); OLA_ASSERT_FALSE(pid_descriptor->IsGetValid(ola::rdm::ALL_RDM_SUBDEVICES)); OLA_ASSERT_FALSE(pid_descriptor->IsSetValid(0)); OLA_ASSERT_FALSE(pid_descriptor->IsSetValid(1)); OLA_ASSERT_FALSE(pid_descriptor->IsSetValid(512)); OLA_ASSERT_FALSE(pid_descriptor->IsSetValid(ola::rdm::ALL_RDM_SUBDEVICES)); } /** * Check that loading from a file works */ void PidStoreTest::testPidStoreFileLoad() { PidStoreLoader loader; auto_ptr root_store( loader.LoadFromFile(GetTestDataFile("test_pids.proto"))); OLA_ASSERT_NOT_NULL(root_store.get()); // check version OLA_ASSERT_EQ(static_cast(1302986774), root_store->Version()); // Check all the esta pids are there const PidStore *esta_store = root_store->EstaStore(); OLA_ASSERT_NOT_NULL(esta_store); vector all_pids; esta_store->AllPids(&all_pids); OLA_ASSERT_EQ(static_cast(70), all_pids.size()); // check for device info const PidDescriptor *device_info = esta_store->LookupPID("DEVICE_INFO"); OLA_ASSERT_NOT_NULL(device_info); OLA_ASSERT_EQ(static_cast(96), device_info->Value()); OLA_ASSERT_EQ(string("DEVICE_INFO"), device_info->Name()); // check descriptors OLA_ASSERT_TRUE(device_info->GetRequest()); OLA_ASSERT_TRUE(device_info->GetResponse()); OLA_ASSERT_EQ(static_cast(NULL), device_info->SetRequest()); OLA_ASSERT_EQ(static_cast(NULL), device_info->SetResponse()); ola::messaging::SchemaPrinter printer; device_info->GetResponse()->Accept(&printer); string expected = ( "protocol_major: uint8\nprotocol_minor: uint8\ndevice_model: uint16\n" "product_category: uint16\nsoftware_version: uint32\n" "dmx_footprint: uint16\ncurrent_personality: uint8\n" "personality_count: uint8\ndmx_start_address: uint16\n" "sub_device_count: uint16\nsensor_count: uint8\n"); OLA_ASSERT_EQ(expected, printer.AsString()); // check manufacturer pids const PidStore *open_lighting_store = root_store->ManufacturerStore(ola::OPEN_LIGHTING_ESTA_CODE); OLA_ASSERT_NOT_NULL(open_lighting_store); OLA_ASSERT_EQ(1u, open_lighting_store->PidCount()); const PidDescriptor *serial_number = open_lighting_store->LookupPID( "SERIAL_NUMBER"); OLA_ASSERT_NOT_NULL(serial_number); OLA_ASSERT_EQ(static_cast(32768), serial_number->Value()); OLA_ASSERT_EQ(string("SERIAL_NUMBER"), serial_number->Name()); // check descriptors OLA_ASSERT_EQ(static_cast(NULL), serial_number->GetRequest()); OLA_ASSERT_EQ(static_cast(NULL), serial_number->GetResponse()); OLA_ASSERT_TRUE(serial_number->SetRequest()); OLA_ASSERT_TRUE(serial_number->SetResponse()); printer.Reset(); serial_number->SetRequest()->Accept(&printer); string expected2 = "serial_number: uint32\n"; OLA_ASSERT_EQ(expected2, printer.AsString()); } /** * Check that loading from a directory works. This also tests the override * mechanism. */ void PidStoreTest::testPidStoreDirectoryLoad() { PidStoreLoader loader; auto_ptr root_store(loader.LoadFromDirectory( GetTestDataFile("pids"))); OLA_ASSERT_NOT_NULL(root_store.get()); // check version OLA_ASSERT_EQ(static_cast(1302986774), root_store->Version()); // Check all the esta pids are there const PidStore *esta_store = root_store->EstaStore(); OLA_ASSERT_NOT_NULL(esta_store); vector all_pids; esta_store->AllPids(&all_pids); OLA_ASSERT_EQ(static_cast(6), all_pids.size()); // check manufacturer pids const PidStore *open_lighting_store = root_store->ManufacturerStore(ola::OPEN_LIGHTING_ESTA_CODE); OLA_ASSERT_NOT_NULL(open_lighting_store); OLA_ASSERT_EQ(1u, open_lighting_store->PidCount()); // FOO_BAR in the overrides file replaces SERIAL_NUMBER. const PidDescriptor *serial_number = open_lighting_store->LookupPID( "SERIAL_NUMBER"); OLA_ASSERT_NULL(serial_number); const PidDescriptor *foo_bar = open_lighting_store->LookupPID( "FOO_BAR"); OLA_ASSERT_NOT_NULL(foo_bar); OLA_ASSERT_EQ(static_cast(32768), foo_bar->Value()); OLA_ASSERT_EQ(string("FOO_BAR"), foo_bar->Name()); // check descriptors OLA_ASSERT_TRUE(foo_bar->GetRequest()); OLA_ASSERT_TRUE(foo_bar->GetResponse()); OLA_ASSERT_EQ(static_cast(NULL), foo_bar->SetRequest()); OLA_ASSERT_EQ(static_cast(NULL), foo_bar->SetResponse()); ola::messaging::SchemaPrinter printer; foo_bar->GetResponse()->Accept(&printer); string expected2 = "baz: uint32\n"; OLA_ASSERT_EQ(expected2, printer.AsString()); } /** * Check that loading a missing file fails. */ void PidStoreTest::testPidStoreLoadMissingFile() { PidStoreLoader loader; const RootPidStore *root_store = loader.LoadFromFile( GetTestDataFile("missing_file_pids.proto")); OLA_ASSERT_NULL(root_store); } /** * Check that loading a file with duplicate manufacturers fails. */ void PidStoreTest::testPidStoreLoadDuplicateManufacturer() { PidStoreLoader loader; const RootPidStore *root_store = loader.LoadFromFile( GetTestDataFile("duplicate_manufacturer.proto")); OLA_ASSERT_NULL(root_store); } /** * Check that loading file with duplicate pid values fails. */ void PidStoreTest::testPidStoreLoadDuplicateValue() { PidStoreLoader loader; const RootPidStore *root_store = loader.LoadFromFile( GetTestDataFile("duplicate_pid_value.proto")); OLA_ASSERT_NULL(root_store); } /** * Check that loading a file with duplicate pid names fails. */ void PidStoreTest::testPidStoreLoadDuplicateName() { PidStoreLoader loader; const RootPidStore *root_store = loader.LoadFromFile( GetTestDataFile("duplicate_pid_name.proto")); OLA_ASSERT_NULL(root_store); } /** * Check that loading a file with an out-of-range ESTA pid fails. */ void PidStoreTest::testPidStoreLoadInvalidEstaPid() { PidStoreLoader loader; const RootPidStore *root_store = loader.LoadFromFile( GetTestDataFile("invalid_esta_pid.proto")); OLA_ASSERT_NULL(root_store); } /** * Check that loading a file with an inconsistent descriptor fails. */ void PidStoreTest::testInconsistentData() { PidStoreLoader loader; const RootPidStore *root_store = loader.LoadFromFile( GetTestDataFile("inconsistent_pid.proto")); OLA_ASSERT_NULL(root_store); } ola-0.10.9/common/rdm/FakeNetworkManager.cpp0000664000175000017500000000500514376533110015573 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * FakeNetworkManager.cpp * A NetworkManager which uses a simulated network config. * Copyright (C) 2014 Simon Newton */ #include "common/rdm/FakeNetworkManager.h" #include #include namespace ola { namespace rdm { using ola::network::Interface; using ola::network::InterfacePicker; using ola::network::IPV4Address; using std::string; using std::vector; FakeNetworkManager::FakeNetworkManager( const vector &interfaces, const int32_t ipv4_default_route_if_index, const IPV4Address ipv4_default_route, const string &hostname, const string &domain_name, const vector &name_servers) : NetworkManagerInterface(), m_interface_picker(interfaces), m_ipv4_default_route_if_index(ipv4_default_route_if_index), m_ipv4_default_route(ipv4_default_route), m_hostname(hostname), m_domain_name(domain_name), m_name_servers(name_servers) { } const InterfacePicker *FakeNetworkManager::GetInterfacePicker() const { return &m_interface_picker; } rdm_dhcp_status FakeNetworkManager::GetDHCPStatus( const Interface &iface) const { // Mix things up a bit. The status depends on the index. return static_cast(iface.index % DHCP_STATUS_MAX); } bool FakeNetworkManager::GetIPV4DefaultRoute( int32_t *if_index, IPV4Address *default_route) const { *if_index = m_ipv4_default_route_if_index; *default_route = m_ipv4_default_route; return true; } const string FakeNetworkManager::GetHostname() const { return m_hostname; } const string FakeNetworkManager::GetDomainName() const { return m_domain_name; } bool FakeNetworkManager::GetNameServers( vector *name_servers) const { *name_servers = m_name_servers; return true; } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/testdata/0000775000175000017500000000000014376533271013255 500000000000000ola-0.10.9/common/rdm/testdata/duplicate_manufacturer.proto0000664000175000017500000000116414376533110021002 00000000000000manufacturer { manufacturer_id: 31344 manufacturer_name: "Open Lighting" pid { name: "SERIAL_NUMBER" value: 32768 set_request { field { type: UINT32 name: "serial_number" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } manufacturer { manufacturer_id: 31344 manufacturer_name: "Open Lighting" pid { name: "SERIAL_NUMBER" value: 32768 set_request { field { type: UINT32 name: "serial_number" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } version: 1302986774 ola-0.10.9/common/rdm/testdata/pids/0000775000175000017500000000000014376533271014214 500000000000000ola-0.10.9/common/rdm/testdata/pids/pids1.proto0000664000175000017500000000333614376533110016236 00000000000000pid { name: "PROXIED_DEVICES" value: 16 get_request { } get_response { field { type: GROUP name: "uids" field { type: UINT16 name: "manufacturer_id" } field { type: UINT32 name: "device_id" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "PROXIED_DEVICE_COUNT" value: 17 get_request { } get_response { field { type: UINT16 name: "device_count" } field { type: BOOL name: "list_changed" } } get_sub_device_range: ROOT_DEVICE } pid { name: "DEVICE_INFO" value: 96 get_request { } get_response { field { type: UINT8 name: "protocol_major" } field { type: UINT8 name: "protocol_minor" } field { type: UINT16 name: "device_model" } field { type: UINT16 name: "product_category" } field { type: UINT32 name: "software_version" } field { type: UINT16 name: "dmx_footprint" } field { type: UINT8 name: "current_personality" } field { type: UINT8 name: "personality_count" } field { type: UINT16 name: "dmx_start_address" } field { type: UINT16 name: "sub_device_count" } field { type: UINT8 name: "sensor_count" } } get_sub_device_range: ROOT_OR_SUBDEVICE } manufacturer { manufacturer_id: 31344 manufacturer_name: "Open Lighting" pid { name: "SERIAL_NUMBER" value: 32768 set_request { field { type: UINT32 name: "serial_number" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } version: 1302986774 ola-0.10.9/common/rdm/testdata/pids/pids2.proto0000664000175000017500000000373214376533110016237 00000000000000pid { name: "COMMS_STATUS" value: 21 get_request { } get_response { field { type: UINT16 name: "short_message" } field { type: UINT16 name: "length_mismatch" } field { type: UINT16 name: "checksum_fail" } } get_sub_device_range: ROOT_DEVICE set_request { } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "QUEUED_MESSAGE" value: 32 get_request { field { type: UINT8 name: "status_type" label { value: 1 label: "Last Message" } label { value: 2 label: "Advisory" } label { value: 3 label: "Warning" } label { value: 4 label: "Error" } } } get_response { } get_sub_device_range: ROOT_DEVICE } pid { name: "SUPPORTED_PARAMETERS" value: 80 get_request { } get_response { field { type: GROUP name: "params" field { type: UINT16 name: "param_id" } } } get_sub_device_range: ROOT_OR_SUBDEVICE } manufacturer { manufacturer_id: 161 manufacturer_name: "Creative Lighting And Sound Systems Pty Ltd." pid { name: "DEVICE_MODE" value: 32768 get_request { } get_response { field { type: UINT8 name: "mode" label { value: 0 label: "DMX512" } label { value: 1 label: "DALI" } label { value: 2 label: "DSI" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "DMX512" } label { value: 1 label: "DALI" } label { value: 2 label: "DSI" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } version: 1302986774 ola-0.10.9/common/rdm/testdata/pids/overrides.proto0000664000175000017500000000045314376533110017215 00000000000000manufacturer { manufacturer_id: 31344 manufacturer_name: "Open Lighting" pid { name: "FOO_BAR" value: 32768 get_request { } get_response { field { type: UINT32 name: "baz" } } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } version: 1 ola-0.10.9/common/rdm/testdata/invalid_esta_pid.proto0000664000175000017500000000053114376533110017547 00000000000000pid { name: "PROXIED_DEVICES" value: 32769 get_request { } get_response { field { type: GROUP name: "uids" field { type: UINT16 name: "manufacturer_id" } field { type: UINT32 name: "device_id" } } } get_sub_device_range: ROOT_DEVICE } version: 1302986774 ola-0.10.9/common/rdm/testdata/duplicate_pid_name.proto0000664000175000017500000000123014376533110020054 00000000000000pid { name: "PROXIED_DEVICES" value: 16 get_request { } get_response { field { type: GROUP name: "uids" field { type: UINT16 name: "manufacturer_id" } field { type: UINT32 name: "device_id" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "PROXIED_DEVICES" value: 17 get_request { } get_response { field { type: GROUP name: "uids" field { type: UINT16 name: "manufacturer_id" } field { type: UINT32 name: "device_id" } } } get_sub_device_range: ROOT_DEVICE } version: 1302986774 ola-0.10.9/common/rdm/testdata/inconsistent_pid.proto0000664000175000017500000000045114376533110017626 00000000000000pid { name: "PROXIED_DEVICES" value: 16 get_request { } get_response { field { type: STRING name: "label1" max_size: 32 } field { type: STRING name: "label2" max_size: 32 } } get_sub_device_range: ROOT_DEVICE } version: 1302986774 ola-0.10.9/common/rdm/testdata/test_pids.proto0000664000175000017500000014666714376533110016274 00000000000000pid { name: "PROXIED_DEVICES" value: 16 get_request { } get_response { field { type: GROUP name: "uids" field { type: UINT16 name: "manufacturer_id" } field { type: UINT32 name: "device_id" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "PROXIED_DEVICE_COUNT" value: 17 get_request { } get_response { field { type: UINT16 name: "device_count" } field { type: BOOL name: "list_changed" } } get_sub_device_range: ROOT_DEVICE } pid { name: "COMMS_STATUS" value: 21 get_request { } get_response { field { type: UINT16 name: "short_message" } field { type: UINT16 name: "length_mismatch" } field { type: UINT16 name: "checksum_fail" } } get_sub_device_range: ROOT_DEVICE set_request { } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "QUEUED_MESSAGE" value: 32 get_request { field { type: UINT8 name: "status_type" label { value: 1 label: "Last Message" } label { value: 2 label: "Advisory" } label { value: 3 label: "Warning" } label { value: 4 label: "Error" } } } get_response { } get_sub_device_range: ROOT_DEVICE } pid { name: "STATUS_MESSAGES" value: 48 get_request { field { type: UINT8 name: "status_type" label { value: 0 label: "None" } label { value: 1 label: "Last Message" } label { value: 2 label: "Advisory" } label { value: 3 label: "Warning" } label { value: 4 label: "Error" } } } get_response { field { type: GROUP name: "messages" field { type: UINT16 name: "sub_device" } field { type: UINT8 name: "status_type" } field { type: UINT16 name: "message_id" } field { type: INT16 name: "value1" } field { type: INT16 name: "value2" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "STATUS_ID_DESCRIPTION" value: 49 get_request { field { type: UINT16 name: "status_id" } } get_response { field { type: STRING name: "label" max_size: 32 } } get_sub_device_range: ROOT_DEVICE } pid { name: "CLEAR_STATUS_ID" value: 50 set_request { } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SUB_DEVICE_STATUS_REPORT_THRESHOLD" value: 51 get_request { } get_response { field { type: UINT8 name: "status_type" } } get_sub_device_range: ONLY_SUBDEVICES set_request { field { type: UINT8 name: "status_type" label { value: 0 label: "None" } label { value: 2 label: "Advisory" } label { value: 3 label: "Warning" } label { value: 4 label: "Error" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SUPPORTED_PARAMETERS" value: 80 get_request { } get_response { field { type: GROUP name: "params" field { type: UINT16 name: "param_id" } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "PARAMETER_DESCRIPTION" value: 81 get_request { field { type: UINT16 name: "pid" } } get_response { field { type: UINT16 name: "pid" } field { type: UINT8 name: "pdl_size" } field { type: UINT8 name: "data_type" } field { type: UINT8 name: "command_class" } field { type: UINT8 name: "type" } field { type: UINT8 name: "unit" } field { type: UINT8 name: "prefix" } field { type: UINT32 name: "min_value" } field { type: UINT32 name: "max_value" } field { type: UINT32 name: "default_value" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_DEVICE } pid { name: "DEVICE_INFO" value: 96 get_request { } get_response { field { type: UINT8 name: "protocol_major" } field { type: UINT8 name: "protocol_minor" } field { type: UINT16 name: "device_model" } field { type: UINT16 name: "product_category" } field { type: UINT32 name: "software_version" } field { type: UINT16 name: "dmx_footprint" } field { type: UINT8 name: "current_personality" } field { type: UINT8 name: "personality_count" } field { type: UINT16 name: "dmx_start_address" } field { type: UINT16 name: "sub_device_count" } field { type: UINT8 name: "sensor_count" } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "PRODUCT_DETAIL_ID_LIST" value: 112 get_request { } get_response { field { type: GROUP name: "detail_ids" max_size: 6 field { type: UINT16 name: "detail_id" } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DEVICE_MODEL_DESCRIPTION" value: 128 get_request { } get_response { field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "MANUFACTURER_LABEL" value: 129 get_request { } get_response { field { type: STRING name: "label" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DEVICE_LABEL" value: 130 get_request { } get_response { field { type: STRING name: "label" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: STRING name: "label" max_size: 32 } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "FACTORY_DEFAULTS" value: 144 get_request { } get_response { field { type: BOOL name: "using_defaults" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LANGUAGE_CAPABILITIES" value: 160 get_request { } get_response { field { type: GROUP name: "languages" field { type: STRING name: "language" min_size: 2 max_size: 2 } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "LANGUAGE" value: 176 get_request { } get_response { field { type: STRING name: "language" max_size: 2 } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: STRING name: "language" max_size: 2 } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SOFTWARE_VERSION_LABEL" value: 192 get_request { } get_response { field { type: STRING name: "label" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "BOOT_SOFTWARE_VERSION_ID" value: 193 get_request { } get_response { field { type: UINT32 name: "version" } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "BOOT_SOFTWARE_VERSION_LABEL" value: 194 get_request { } get_response { field { type: STRING name: "label" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DMX_PERSONALITY" value: 224 get_request { } get_response { field { type: UINT8 name: "current_personality" } field { type: UINT8 name: "personality_count" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "personality" range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DMX_PERSONALITY_DESCRIPTION" value: 225 get_request { field { type: UINT8 name: "personality" range { min: 0 max: 255 } } } get_response { field { type: UINT8 name: "personality" } field { type: UINT16 name: "slots_required" } field { type: STRING name: "name" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DMX_START_ADDRESS" value: 240 get_request { } get_response { field { type: UINT16 name: "dmx_address" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "dmx_address" range { min: 1 max: 512 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SLOT_INFO" value: 288 get_request { } get_response { field { type: GROUP name: "slots" field { type: UINT16 name: "slot_offset" } field { type: UINT8 name: "slot_type" } field { type: UINT16 name: "slot_label_id" } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "SLOT_DESCRIPTION" value: 289 get_request { field { type: UINT16 name: "slot_number" } } get_response { field { type: UINT16 name: "slot_number" } field { type: STRING name: "name" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DEFAULT_SLOT_VALUE" value: 290 get_request { } get_response { field { type: GROUP name: "slot_values" field { type: UINT16 name: "slot_offset" } field { type: UINT8 name: "default_slot_value" } } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "SENSOR_DEFINITION" value: 512 get_request { field { type: UINT8 name: "sensor_number" range { min: 0 max: 254 } } } get_response { field { type: UINT8 name: "sensor_number" } field { type: UINT8 name: "type" } field { type: UINT8 name: "unit" } field { type: UINT8 name: "prefix" } field { type: INT16 name: "range_min" label { value: -32768 label: "Undefined" } range { min: -32768 max: 32767 } } field { type: INT16 name: "range_max" label { value: 32767 label: "Undefined" } range { min: -32767 max: 32767 } } field { type: INT16 name: "normal_min" label { value: -32768 label: "Undefined" } range { min: -32768 max: 32767 } } field { type: INT16 name: "normal_max" label { value: 32767 label: "Undefined" } range { min: -32768 max: 32767 } } field { type: UINT8 name: "supports_recording" } field { type: STRING name: "name" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "SENSOR_VALUE" value: 513 get_request { field { type: UINT8 name: "sensor_number" range { min: 0 max: 254 } } } get_response { field { type: UINT8 name: "sensor_number" } field { type: INT16 name: "present_value" } field { type: INT16 name: "lowest" } field { type: INT16 name: "highest" } field { type: INT16 name: "recorded" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "sensor_number" label { value: 255 label: "All Sensors" } range { min: 0 max: 255 } } } set_response { field { type: UINT8 name: "sensor_number" } field { type: UINT16 name: "present_value" } field { type: UINT16 name: "lowest" } field { type: UINT16 name: "highest" } field { type: UINT16 name: "recorded" } } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "RECORD_SENSORS" value: 514 set_request { field { type: UINT8 name: "sensor_number" label { value: 255 label: "All Sensors" } range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DEVICE_HOURS" value: 1024 get_request { } get_response { field { type: UINT32 name: "hours" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "hours" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LAMP_HOURS" value: 1025 get_request { } get_response { field { type: UINT32 name: "hours" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "hours" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LAMP_STRIKES" value: 1026 get_request { } get_response { field { type: UINT32 name: "strikes" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "strikes" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LAMP_STATE" value: 1027 get_request { } get_response { field { type: UINT8 name: "state" label { value: 0 label: "Off" } label { value: 1 label: "On" } label { value: 2 label: "Strike" } label { value: 3 label: "Standby" } label { value: 4 label: "Not Present" } label { value: 127 label: "Error" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "state" label { value: 0 label: "Off" } label { value: 1 label: "On" } label { value: 2 label: "Strike" } label { value: 3 label: "Standby" } range { min: 0 max: 3 } range { min: 128 max: 223 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LAMP_ON_MODE" value: 1028 get_request { } get_response { field { type: UINT8 name: "mode" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "Off" } label { value: 1 label: "DMX" } label { value: 2 label: "On" } label { value: 3 label: "On After Calibration" } range { min: 0 max: 3 } range { min: 128 max: 223 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DEVICE_POWER_CYCLES" value: 1029 get_request { } get_response { field { type: UINT32 name: "power_cycles" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT32 name: "power_cycles" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DISPLAY_INVERT" value: 1280 get_request { } get_response { field { type: UINT8 name: "invert_status" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "invert_status" label { value: 0 label: "Off" } label { value: 1 label: "On" } label { value: 2 label: "Auto" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DISPLAY_LEVEL" value: 1281 get_request { } get_response { field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PAN_INVERT" value: 1536 get_request { } get_response { field { type: BOOL name: "invert" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "invert" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "TILT_INVERT" value: 1537 get_request { } get_response { field { type: BOOL name: "invert" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "invert" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PAN_TILT_SWAP" value: 1538 get_request { } get_response { field { type: BOOL name: "swap" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "swap" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "REAL_TIME_CLOCK" value: 1539 get_request { } get_response { field { type: UINT16 name: "year" } field { type: UINT8 name: "month" } field { type: UINT8 name: "day" } field { type: UINT8 name: "hour" } field { type: UINT8 name: "minute" } field { type: UINT8 name: "second" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "year" range { min: 2003 max: 65535 } } field { type: UINT8 name: "month" range { min: 1 max: 12 } } field { type: UINT8 name: "day" range { min: 1 max: 31 } } field { type: UINT8 name: "hour" range { min: 0 max: 23 } } field { type: UINT8 name: "minute" range { min: 0 max: 59 } } field { type: UINT8 name: "second" range { min: 0 max: 60 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "IDENTIFY_DEVICE" value: 4096 get_request { } get_response { field { type: BOOL name: "identify_state" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "identify_state" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "RESET_DEVICE" value: 4097 set_request { field { type: UINT8 name: "reset_mode" label { value: 1 label: "Warm" } label { value: 255 label: "Cold" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "POWER_STATE" value: 4112 get_request { } get_response { field { type: UINT8 name: "power_state" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "power_state" label { value: 0 label: "Full Off" } label { value: 1 label: "Shutdown" } label { value: 2 label: "Standby" } label { value: 255 label: "Normal" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PERFORM_SELFTEST" value: 4128 get_request { } get_response { field { type: BOOL name: "tests_active" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "test_number" label { value: 0 label: "Off" } label { value: 255 label: "All" } range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "SELF_TEST_DESCRIPTION" value: 4129 get_request { field { type: UINT8 name: "test_number" } } get_response { field { type: UINT8 name: "test_number" } field { type: STRING name: "description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "CAPTURE_PRESET" value: 4144 set_request { field { type: UINT16 name: "scene" range { min: 1 max: 65534 } } field { type: UINT16 name: "fade_up_time" multiplier: -1 } field { type: UINT16 name: "fade_down_time" multiplier: -1 } field { type: UINT16 name: "wait_time" multiplier: -1 } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PRESET_PLAYBACK" value: 4145 get_request { } get_response { field { type: UINT16 name: "mode" } field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "mode" label { value: 0 label: "Off" } label { value: 65535 label: "All" } range { min: 0 max: 65535 } } field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "IDENTIFY_MODE" value: 32688 get_request { } get_response { field { type: UINT8 name: "identify_mode" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "identify_mode" label { value: 0 label: "Quiet" } label { value: 255 label: "Loud" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PRESET_INFO" value: 32689 get_request { } get_response { field { type: BOOL name: "level_field_supported" } field { type: BOOL name: "preset_sequence_supported" } field { type: BOOL name: "split_times_supported" } field { type: BOOL name: "fail_infitite_delay_supported" } field { type: BOOL name: "fail_infitite_hold_supported" } field { type: BOOL name: "startup_infitite_hold_supported" } field { type: UINT16 name: "max_scene_number" } field { type: UINT16 name: "min_preset_fade_time" multiplier: -1 } field { type: UINT16 name: "max_preset_fade_time" multiplier: -1 } field { type: UINT16 name: "min_preset_wait_time" multiplier: -1 } field { type: UINT16 name: "max_preset_wait_time" multiplier: -1 } field { type: UINT16 name: "min_fail_delay_time" multiplier: -1 } field { type: UINT16 name: "max_fail_delay_time" multiplier: -1 } field { type: UINT16 name: "min_fail_hold_time" multiplier: -1 } field { type: UINT16 name: "max_fail_hold_time" multiplier: -1 } field { type: UINT16 name: "min_startup_delay_time" multiplier: -1 } field { type: UINT16 name: "max_startup_delay_time" multiplier: -1 } field { type: UINT16 name: "min_startup_hold_time" multiplier: -1 } field { type: UINT16 name: "max_startup_hold_time" multiplier: -1 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "PRESET_STATUS" value: 32690 get_request { field { type: UINT16 name: "scene_number" range { min: 1 max: 65534 } } } get_response { field { type: UINT16 name: "scene_number" range { min: 1 max: 65534 } } field { type: UINT16 name: "up_fade_time" multiplier: -1 } field { type: UINT16 name: "down_fade_time" multiplier: -1 } field { type: UINT16 name: "wait_time" multiplier: -1 } field { type: UINT16 name: "programmed" label { value: 0 label: "Not Programmed" } label { value: 1 label: "Programmed" } label { value: 2 label: "Read Only" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "scene_number" range { min: 1 max: 65534 } } field { type: UINT16 name: "up_fade_time" multiplier: -1 } field { type: UINT16 name: "down_fade_time" multiplier: -1 } field { type: UINT16 name: "wait_time" multiplier: -1 } field { type: BOOL name: "clear_preset" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "PRESET_MERGEMODE" value: 32691 get_request { } get_response { field { type: UINT8 name: "merge_mode" label { value: 0 label: "Default" } label { value: 1 label: "HTP" } label { value: 2 label: "LTP" } label { value: 3 label: "DMX Only" } label { value: 255 label: "Other" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "merge_mode" label { value: 0 label: "Default" } label { value: 1 label: "HTP" } label { value: 2 label: "LTP" } label { value: 3 label: "DMX Only" } label { value: 255 label: "Other" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "POWER_ON_SELF_TEST" value: 32692 get_request { } get_response { field { type: BOOL name: "power_on_self_test" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: BOOL name: "power_on_self_test" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DMX_BLOCK_ADDRESS" value: 32752 get_request { } get_response { field { type: UINT16 name: "sub_device_footprint" } field { type: UINT16 name: "base_dmx_address" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "base_dmx_address" range { min: 1 max: 512 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DMX_FAIL_MODE" value: 32753 get_request { } get_response { field { type: UINT16 name: "scene_number" } field { type: UINT16 name: "loss_of_signal_delay" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT16 name: "hold_time" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "scene_number" label { value: 0 label: "Fixed Level" } range { min: 0 max: 255 } } field { type: UINT16 name: "loss_of_signal_delay" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT16 name: "hold_time" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DMX_STARTUP_MODE" value: 32754 get_request { } get_response { field { type: UINT16 name: "scene_number" } field { type: UINT16 name: "startup_delay" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT16 name: "hold_time" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT8 name: "level" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "scene_number" label { value: 0 label: "Fixed Level" } range { min: 0 max: 255 } } field { type: UINT16 name: "startup_delay" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT16 name: "hold_time" multiplier: -1 label { value: 65535 label: "Infinite" } range { min: 0 max: 65535 } } field { type: UINT8 name: "level" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DIMMER_INFO" value: 32755 get_request { } get_response { field { type: UINT16 name: "minimum_level_lower" } field { type: UINT16 name: "minimum_level_upper" } field { type: UINT16 name: "maximum_level_lower" } field { type: UINT16 name: "maximum_level_upper" } field { type: UINT8 name: "number_curves_supported" } field { type: UINT8 name: "levels_resolution" range { min: 0 max: 16 } } field { type: BOOL name: "split_levels_supported" } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "MINIMUM_LEVEL" value: 32756 get_request { } get_response { field { type: UINT16 name: "minimum_level_increasing" } field { type: UINT16 name: "minimum_level_decreasing" } field { type: BOOL name: "on_below_minimum" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "minimum_level_increasing" } field { type: UINT16 name: "minimum_level_decreasing" } field { type: BOOL name: "on_below_minimum" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "MAXIMUM_LEVEL" value: 32757 get_request { } get_response { field { type: UINT16 name: "maximum_level" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "maximum_level" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CURVE" value: 32758 get_request { } get_response { field { type: UINT8 name: "current_curve" } field { type: UINT8 name: "number_curves" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "curve" range { min: 1 max: 4080 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CURVE_DESCRIPTION" value: 32759 get_request { field { type: UINT8 name: "curve_number" range { min: 1 max: 255 } } } get_response { field { type: UINT8 name: "curve_number" range { min: 1 max: 255 } } field { type: STRING name: "curve_description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "OUTPUT_RESPONSE_TIME" value: 32760 get_request { } get_response { field { type: UINT8 name: "current_response_time" } field { type: UINT8 name: "number_response_options" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "response_time" range { min: 1 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "OUTPUT_RESPONSE_TIME_DESCRIPTION" value: 32761 get_request { field { type: UINT8 name: "response_time" range { min: 1 max: 255 } } } get_response { field { type: UINT8 name: "response_time" range { min: 1 max: 255 } } field { type: STRING name: "response_time_description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "MODULATION_FREQUENCY" value: 32762 get_request { } get_response { field { type: UINT8 name: "current_moduluation_frequency" } field { type: UINT8 name: "number_modluation_frequencies" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "modulation_frequency" range { min: 1 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "MODULATION_FREQUENCY_DESCRIPTION" value: 32763 get_request { field { type: UINT8 name: "modulation_frequency" range { min: 1 max: 255 } } } get_response { field { type: UINT8 name: "modulation_frequency" range { min: 1 max: 255 } } field { type: UINT32 name: "frequency" } field { type: STRING name: "modulation_frequency_description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "BURN_IN" value: 32764 get_request { } get_response { field { type: UINT8 name: "hours_remaining" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "hours" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LOCK_PIN" value: 32765 get_request { } get_response { field { type: UINT16 name: "pin_code" range { min: 0 max: 9999 } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "new_pin_code" range { min: 0 max: 9999 } } field { type: UINT16 name: "current_pin_code" range { min: 0 max: 9999 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LOCK_STATE" value: 32766 get_request { } get_response { field { type: UINT8 name: "current_lock_state" label { value: 0 label: "Unlocked" } range { min: 0 max: 255 } } field { type: UINT8 name: "number_of_lock_states" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT16 name: "pin_code" range { min: 0 max: 9999 } } field { type: UINT8 name: "lock_state" label { value: 0 label: "Unlocked" } range { min: 0 max: 255 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "LOCK_STATE_DESCRIPTION" value: 32767 get_request { field { type: UINT8 name: "lock_state" range { min: 1 max: 255 } } } get_response { field { type: UINT8 name: "lock_state" range { min: 1 max: 255 } } field { type: STRING name: "lock_state_description" max_size: 32 } } get_sub_device_range: ROOT_OR_SUBDEVICE } manufacturer { manufacturer_id: 161 manufacturer_name: "Creative Lighting And Sound Systems Pty Ltd." pid { name: "DEVICE_MODE" value: 32768 get_request { } get_response { field { type: UINT8 name: "mode" label { value: 0 label: "DMX512" } label { value: 1 label: "DALI" } label { value: 2 label: "DSI" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "DMX512" } label { value: 1 label: "DALI" } label { value: 2 label: "DSI" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } manufacturer { manufacturer_id: 18501 manufacturer_name: "Howard Eaton Lighting Ltd." pid { name: "PWRUP_TEST" value: 51287 get_request { } get_response { field { type: BOOL name: "enabled" } field { type: UINT8 name: "max_allowed" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "INTERNAL_STATS" value: 51298 get_request { } get_response { field { type: UINT16 name: "dmx_nsc_packet_count" } field { type: UINT16 name: "dmx_asc_packet_count" } field { type: UINT16 name: "rdm_asc_packet_count" } field { type: UINT8 name: "uart_errors" } field { type: UINT8 name: "device_minutes" } field { type: UINT8 name: "brownout_count" } field { type: UINT8 name: "watchdog_resets" } field { type: UINT8 name: "software_resets" } field { type: UINT16 name: "dither_adjust" } field { type: UINT8 name: "record_sensor_counts" } } get_sub_device_range: ROOT_DEVICE set_request { } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 19041 manufacturer_name: "Jands Pty Ltd." pid { name: "NE_FAULT_DETECT_MODE" value: 32896 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DMX_PROTECT_MODE" value: 32898 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "DMX_LOSS_MODE" value: 32900 get_request { } get_response { field { type: UINT8 name: "mode" label { value: 0 label: "Hold" } label { value: 1 label: "Fade to scene #1" } } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "Hold" } label { value: 1 label: "Fade to scene #1" } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "PREHEAT_LEVEL" value: 32902 get_request { } get_response { field { type: UINT8 name: "level" label { value: 0 label: "Off" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "level" label { value: 0 label: "Off" } range { min: 0 max: 50 } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "OUTPUT_CAP_VALUE" value: 32904 get_request { } get_response { field { type: UINT8 name: "cap" label { value: 0 label: "Off" } label { value: 1 label: "95%" } label { value: 2 label: "90%" } label { value: 3 label: "85%" } label { value: 4 label: "80%" } label { value: 5 label: "75%" } label { value: 6 label: "70%" } label { value: 7 label: "65%" } label { value: 8 label: "60%" } label { value: 9 label: "55%" } label { value: 10 label: "50%" } label { value: 11 label: "45%" } label { value: 12 label: "40%" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "cap" label { value: 0 label: "Off" } label { value: 1 label: "95%" } label { value: 2 label: "90%" } label { value: 3 label: "85%" } label { value: 4 label: "80%" } label { value: 5 label: "75%" } label { value: 6 label: "70%" } label { value: 7 label: "65%" } label { value: 8 label: "60%" } label { value: 9 label: "55%" } label { value: 10 label: "50%" } label { value: 11 label: "45%" } label { value: 12 label: "40%" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DMX_TERM_MODE" value: 32906 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 19541 manufacturer_name: "LumenRadio AB" pid { name: "FULL_DISCOVERY" value: 32768 get_request { } get_response { field { type: BOOL name: "enabled" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: BOOL name: "enabled" } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "OUTPUT_DEFAULT_VALUE" value: 32770 get_request { } get_response { field { type: UINT8 name: "dmx_level" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "dmx_level" } } set_response { field { type: UINT8 name: "dmx_level" } } set_sub_device_range: ROOT_DEVICE } pid { name: "DALI_FADE_TIME" value: 32771 get_request { } get_response { field { type: UINT8 name: "fade_time" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT8 name: "fade_time" } } set_response { field { type: UINT8 name: "fade_time" } } set_sub_device_range: ROOT_DEVICE } pid { name: "INCREMENTAL_DISCOVERY_INTERVAL" value: 33025 get_request { } get_response { field { type: UINT16 name: "interval" multiplier: -1 } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "interval" multiplier: -1 range { min: 257 max: 65535 } } } set_response { } set_sub_device_range: ROOT_DEVICE } pid { name: "ACK_TIMER_FACTOR" value: 33026 get_request { } get_response { field { type: UINT16 name: "timer_factor" } } get_sub_device_range: ROOT_DEVICE set_request { field { type: UINT16 name: "timer_factor" range { min: 257 max: 65535 } } } set_response { } set_sub_device_range: ROOT_DEVICE } } manufacturer { manufacturer_id: 21324 manufacturer_name: "Soundlight" pid { name: "DMX_HOLD_MODE" value: 33009 get_request { } get_response { field { type: UINT8 name: "mode" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "mode" label { value: 0 label: "Outputs to 0%" } label { value: 1 label: "Output to 100%" } label { value: 2 label: "Hold" } label { value: 3 label: "Go to predefined scene" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "MODIFY_SENSOR_DEFINITION" value: 33280 get_request { field { type: UINT8 name: "sensor_number" } } get_response { field { type: UINT8 name: "sensor_number" } field { type: UINT8 name: "type" } field { type: UINT8 name: "unit" } field { type: UINT8 name: "prefix" } field { type: UINT16 name: "range_min" } field { type: UINT16 name: "range_max" } field { type: UINT16 name: "normal_min" } field { type: UINT16 name: "normal_max" } field { type: UINT8 name: "supports_recording" } field { type: STRING name: "name" max_size: 20 } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "sensor_number" } field { type: UINT8 name: "type" } field { type: UINT8 name: "unit" } field { type: UINT8 name: "prefix" } field { type: UINT16 name: "range_min" } field { type: UINT16 name: "range_max" } field { type: UINT16 name: "normal_min" } field { type: UINT16 name: "normal_max" } field { type: UINT8 name: "supports_recording" } field { type: STRING name: "name" max_size: 20 } } set_response { } set_sub_device_range: ROOT_OR_SUBDEVICE } pid { name: "DC_OFFSET" value: 56334 get_request { } get_response { field { type: GROUP name: "dc_offsets" field { type: UINT8 name: "offset_value" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: GROUP name: "dc_offsets" field { type: UINT8 name: "offset_value" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DC_FADER_OFFSET" value: 56335 set_request { field { type: GROUP name: "offsets" field { type: UINT8 name: "offset_value" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "DC_CALIBRATION" value: 56522 get_request { } get_response { field { type: UINT8 name: "scale_value" } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "scale_value" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } pid { name: "CURVE_DEFINITION" value: 56525 get_request { } get_response { field { type: UINT8 name: "curve_number" } field { type: UINT8 name: "total_curves" } field { type: UINT8 name: "segment_count" } field { type: UINT8 name: "interpolation_method" label { value: 0 label: "Step" } label { value: 1 label: "Linear" } label { value: 2 label: "Square" } label { value: 3 label: "Cubic" } } field { type: UINT8 name: "start_value" } field { type: GROUP name: "curve_values" field { type: UINT8 name: "value" } } } get_sub_device_range: ROOT_OR_SUBDEVICE set_request { field { type: UINT8 name: "curve_number" } field { type: UINT8 name: "total_curves" } field { type: UINT8 name: "segment_count" } field { type: UINT8 name: "interpolation_method" label { value: 0 label: "Step" } label { value: 1 label: "Linear" } label { value: 2 label: "Square" } label { value: 3 label: "Cubic" } } field { type: UINT8 name: "start_value" } field { type: GROUP name: "curve_values" field { type: UINT8 name: "value" } } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } manufacturer { manufacturer_id: 31344 manufacturer_name: "Open Lighting" pid { name: "SERIAL_NUMBER" value: 32768 set_request { field { type: UINT32 name: "serial_number" } } set_response { } set_sub_device_range: ROOT_OR_ALL_SUBDEVICE } } version: 1302986774 ola-0.10.9/common/rdm/testdata/duplicate_pid_value.proto0000664000175000017500000000122214376533110020251 00000000000000pid { name: "PROXIED_DEVICES" value: 16 get_request { } get_response { field { type: GROUP name: "uids" field { type: UINT16 name: "manufacturer_id" } field { type: UINT32 name: "device_id" } } } get_sub_device_range: ROOT_DEVICE } pid { name: "OTHER_PID" value: 16 get_request { } get_response { field { type: GROUP name: "uids" field { type: UINT16 name: "manufacturer_id" } field { type: UINT32 name: "device_id" } } } get_sub_device_range: ROOT_DEVICE } version: 1302986774 ola-0.10.9/common/rdm/RDMFrameTest.cpp0000664000175000017500000000544414376533110014324 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMFrameTest.cpp * Test fixture for the RDMFrame. * Copyright (C) 2015 Simon Newton */ #include #include "ola/base/Array.h" #include "ola/io/ByteString.h" #include "ola/rdm/RDMFrame.h" #include "ola/testing/TestUtils.h" using ola::io::ByteString; using ola::rdm::RDMFrame; class RDMFrameTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RDMFrameTest); CPPUNIT_TEST(testRDMFrame); CPPUNIT_TEST(testPrependStartCode); CPPUNIT_TEST_SUITE_END(); public: void testRDMFrame(); void testPrependStartCode(); }; CPPUNIT_TEST_SUITE_REGISTRATION(RDMFrameTest); void RDMFrameTest::testRDMFrame() { const uint8_t raw_data[] = {1, 2, 3, 4, 5}; RDMFrame frame(raw_data, arraysize(raw_data)); OLA_ASSERT_DATA_EQUALS(raw_data, arraysize(raw_data), frame.data.data(), frame.data.size()); OLA_ASSERT_EQ(0u, frame.timing.response_time); OLA_ASSERT_EQ(0u, frame.timing.break_time); OLA_ASSERT_EQ(0u, frame.timing.mark_time); OLA_ASSERT_EQ(0u, frame.timing.data_time); ByteString input_data(raw_data, arraysize(raw_data)); RDMFrame frame2(input_data); OLA_ASSERT_DATA_EQUALS(input_data.data(), input_data.size(), frame.data.data(), frame.data.size()); OLA_ASSERT_EQ(0u, frame2.timing.response_time); OLA_ASSERT_EQ(0u, frame2.timing.break_time); OLA_ASSERT_EQ(0u, frame2.timing.mark_time); OLA_ASSERT_EQ(0u, frame2.timing.data_time); } void RDMFrameTest::testPrependStartCode() { const uint8_t raw_data[] = {1, 2, 3, 4, 5}; RDMFrame::Options options(true); RDMFrame frame(raw_data, arraysize(raw_data), options); ByteString expected_data(1, 0xcc); expected_data.append(raw_data, arraysize(raw_data)); OLA_ASSERT_DATA_EQUALS(expected_data.data(), expected_data.size(), frame.data.data(), frame.data.size()); ByteString input_data(raw_data, arraysize(raw_data)); RDMFrame frame2(input_data, options); OLA_ASSERT_DATA_EQUALS(expected_data.data(), expected_data.size(), frame2.data.data(), frame2.data.size()); } ola-0.10.9/common/rdm/MovingLightResponder.cpp0000664000175000017500000005153214376533110016177 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MovingLightResponder.cpp * Copyright (C) 2013 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/MovingLightResponder.h" #include "ola/rdm/OpenLightingEnums.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/RDMHelper.h" #include "ola/rdm/ResponderHelper.h" #include "ola/rdm/ResponderSlotData.h" #include "ola/StringUtils.h" namespace ola { namespace rdm { using ola::network::HostToNetwork; using ola::network::NetworkToHost; using std::string; using std::vector; MovingLightResponder::RDMOps *MovingLightResponder::RDMOps::instance = NULL; const MovingLightResponder::Personalities * MovingLightResponder::Personalities::Instance() { if (!instance) { SlotDataCollection::SlotDataList p1_slot_data; p1_slot_data.push_back( SlotData::PrimarySlot(SD_INTENSITY, 0, "Intensity Coarse")); // 0 p1_slot_data.push_back( SlotData::SecondarySlot(ST_SEC_FINE, 0, 0, "Intensity Fine")); // 1 p1_slot_data.push_back( SlotData::SecondarySlot(ST_SEC_CONTROL, 0, 0, "Shutter")); // 2 p1_slot_data.push_back(SlotData::PrimarySlot(SD_PAN, 127)); // 3 p1_slot_data.push_back( SlotData::SecondarySlot(ST_SEC_SPEED, 3, 0, "Pan Speed")); // 4 p1_slot_data.push_back(SlotData::PrimarySlot(SD_TILT, 127)); // 5 p1_slot_data.push_back( SlotData::SecondarySlot(ST_SEC_TIMING, 5, 0, "Tilt Timing")); // 6 p1_slot_data.push_back(SlotData::PrimarySlot(SD_ROTO_GOBO_WHEEL, 0)); // 7 p1_slot_data.push_back( SlotData::SecondarySlot(ST_SEC_INDEX, 7, 0)); // 8 p1_slot_data.push_back(SlotData::PrimarySlot(SD_PRISM_WHEEL, 0)); // 9 p1_slot_data.push_back( SlotData::SecondarySlot(ST_SEC_ROTATION, 8, 0)); // 10 p1_slot_data.push_back(SlotData::PrimarySlot(SD_EFFECTS_WHEEL, 0)); // 11 p1_slot_data.push_back( SlotData::SecondarySlot(ST_SEC_INDEX_ROTATE, 8, 0)); // 12 p1_slot_data.push_back( SlotData::PrimarySlot(SD_FIXTURE_SPEED, 0, "Speed")); // 13 p1_slot_data.push_back( SlotData::SecondarySlot(ST_SEC_SPEED, 13, 0, "Speed ^ 2")); // 14 p1_slot_data.push_back( SlotData::PrimarySlot(SD_UNDEFINED, 0, "Open Sourceiness Foo")); // 15 p1_slot_data.push_back( SlotData::SecondarySlot(ST_SEC_UNDEFINED, 15, 0, "Open Sourceiness Bar")); // 16 SlotDataCollection::SlotDataList p2_slot_data; p2_slot_data.push_back(SlotData::PrimarySlot(SD_INTENSITY, 0)); p2_slot_data.push_back(SlotData::PrimarySlot(SD_PAN, 127)); p2_slot_data.push_back(SlotData::PrimarySlot(SD_TILT, 127)); p2_slot_data.push_back(SlotData::PrimarySlot(SD_COLOR_WHEEL, 0)); p2_slot_data.push_back(SlotData::PrimarySlot(SD_STATIC_GOBO_WHEEL, 0)); SlotDataCollection::SlotDataList p4_slot_data; p4_slot_data.push_back( SlotData::PrimarySlot(SD_INTENSITY, 0, "")); p4_slot_data.push_back( SlotData::SecondarySlot(ST_SEC_FINE, 0, 0, "")); PersonalityList personalities; personalities.push_back(Personality(17, "Full", SlotDataCollection(p1_slot_data))); personalities.push_back(Personality(5, "Basic", SlotDataCollection(p2_slot_data))); personalities.push_back(Personality(0, "No Channels")); personalities.push_back(Personality(3, // One more slot than highest "Quirks Mode", SlotDataCollection(p4_slot_data))); instance = new Personalities(personalities); } return instance; } MovingLightResponder::Personalities * MovingLightResponder::Personalities::instance = NULL; const ResponderOps::ParamHandler MovingLightResponder::PARAM_HANDLERS[] = { { PID_PARAMETER_DESCRIPTION, &MovingLightResponder::GetParamDescription, NULL}, { PID_DEVICE_INFO, &MovingLightResponder::GetDeviceInfo, NULL}, { PID_PRODUCT_DETAIL_ID_LIST, &MovingLightResponder::GetProductDetailList, NULL}, { PID_DEVICE_MODEL_DESCRIPTION, &MovingLightResponder::GetDeviceModelDescription, NULL}, { PID_MANUFACTURER_LABEL, &MovingLightResponder::GetManufacturerLabel, NULL}, { PID_DEVICE_LABEL, &MovingLightResponder::GetDeviceLabel, &MovingLightResponder::SetDeviceLabel}, { PID_FACTORY_DEFAULTS, &MovingLightResponder::GetFactoryDefaults, &MovingLightResponder::SetFactoryDefaults}, { PID_LANGUAGE_CAPABILITIES, &MovingLightResponder::GetLanguageCapabilities, NULL}, { PID_LANGUAGE, &MovingLightResponder::GetLanguage, &MovingLightResponder::SetLanguage}, { PID_SOFTWARE_VERSION_LABEL, &MovingLightResponder::GetSoftwareVersionLabel, NULL}, { PID_DMX_PERSONALITY, &MovingLightResponder::GetPersonality, &MovingLightResponder::SetPersonality}, { PID_DMX_PERSONALITY_DESCRIPTION, &MovingLightResponder::GetPersonalityDescription, NULL}, { PID_SLOT_INFO, &MovingLightResponder::GetSlotInfo, NULL}, { PID_SLOT_DESCRIPTION, &MovingLightResponder::GetSlotDescription, NULL}, { PID_DEFAULT_SLOT_VALUE, &MovingLightResponder::GetSlotDefaultValues, NULL}, { PID_DMX_START_ADDRESS, &MovingLightResponder::GetDmxStartAddress, &MovingLightResponder::SetDmxStartAddress}, { PID_DEVICE_HOURS, &MovingLightResponder::GetDeviceHours, &MovingLightResponder::SetDeviceHours}, { PID_LAMP_HOURS, &MovingLightResponder::GetLampHours, &MovingLightResponder::SetLampHours}, { PID_LAMP_STRIKES, &MovingLightResponder::GetLampStrikes, &MovingLightResponder::SetLampStrikes}, { PID_LAMP_STATE, &MovingLightResponder::GetLampState, &MovingLightResponder::SetLampState}, { PID_LAMP_ON_MODE, &MovingLightResponder::GetLampOnMode, &MovingLightResponder::SetLampOnMode}, { PID_DEVICE_POWER_CYCLES, &MovingLightResponder::GetDevicePowerCycles, &MovingLightResponder::SetDevicePowerCycles}, { PID_IDENTIFY_DEVICE, &MovingLightResponder::GetIdentify, &MovingLightResponder::SetIdentify}, { PID_DISPLAY_INVERT, &MovingLightResponder::GetDisplayInvert, &MovingLightResponder::SetDisplayInvert}, { PID_DISPLAY_LEVEL, &MovingLightResponder::GetDisplayLevel, &MovingLightResponder::SetDisplayLevel}, { PID_PAN_INVERT, &MovingLightResponder::GetPanInvert, &MovingLightResponder::SetPanInvert}, { PID_TILT_INVERT, &MovingLightResponder::GetTiltInvert, &MovingLightResponder::SetTiltInvert}, { PID_PAN_TILT_SWAP, &MovingLightResponder::GetPanTiltSwap, &MovingLightResponder::SetPanTiltSwap}, { PID_REAL_TIME_CLOCK, &MovingLightResponder::GetRealTimeClock, NULL}, { PID_RESET_DEVICE, NULL, &MovingLightResponder::SetResetDevice}, { PID_POWER_STATE, &MovingLightResponder::GetPowerState, &MovingLightResponder::SetPowerState}, { OLA_MANUFACTURER_PID_CODE_VERSION, &MovingLightResponder::GetOlaCodeVersion, NULL}, { 0, NULL, NULL}, }; /** * New MovingLightResponder */ MovingLightResponder::MovingLightResponder(const UID &uid) : m_uid(uid), m_start_address(1), m_language("en"), m_identify_mode(false), m_pan_invert(false), m_tilt_invert(false), m_device_hours(0), m_lamp_hours(0), m_lamp_strikes(0), m_lamp_state(LAMP_ON), m_lamp_on_mode(LAMP_ON_MODE_DMX), m_device_power_cycles(0), m_display_invert(DISPLAY_INVERT_AUTO), m_display_level(255), m_pan_tilt_swap(false), m_power_state(POWER_STATE_NORMAL), m_device_label("Dummy Moving Light"), m_personality_manager(Personalities::Instance()) { } /* * Handle an RDM Request */ void MovingLightResponder::SendRDMRequest(RDMRequest *request, RDMCallback *callback) { RDMOps::Instance()->HandleRDMRequest(this, m_uid, ROOT_RDM_DEVICE, request, callback); } RDMResponse *MovingLightResponder::GetParamDescription( const RDMRequest *request) { // Check that it's MANUFACTURER_PID_CODE_VERSION being requested uint16_t parameter_id; if (!ResponderHelper::ExtractUInt16(request, ¶meter_id)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (parameter_id != OLA_MANUFACTURER_PID_CODE_VERSION) { OLA_WARN << "Dummy responder received param description request with " "unknown PID, expected " << OLA_MANUFACTURER_PID_CODE_VERSION << ", got " << parameter_id; return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } else { return ResponderHelper::GetASCIIParamDescription( request, OLA_MANUFACTURER_PID_CODE_VERSION, CC_GET, "Code Version"); } } RDMResponse *MovingLightResponder::GetDeviceInfo( const RDMRequest *request) { return ResponderHelper::GetDeviceInfo( request, OLA_DUMMY_MOVING_LIGHT_MODEL, PRODUCT_CATEGORY_FIXTURE_MOVING_YOKE, 2, &m_personality_manager, m_start_address, 0, 0); } /** * Reset to factory defaults */ RDMResponse *MovingLightResponder::GetFactoryDefaults( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } uint8_t using_defaults = ( m_start_address == 1 && m_personality_manager.ActivePersonalityNumber() == 1 && m_identify_mode == false); return GetResponseFromData(request, &using_defaults, sizeof(using_defaults)); } RDMResponse *MovingLightResponder::SetFactoryDefaults( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } m_start_address = 1; m_personality_manager.SetActivePersonality(1); m_identify_mode = 0; return ResponderHelper::EmptySetResponse(request); } RDMResponse *MovingLightResponder::GetLanguageCapabilities( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } const char languages[] = { 'e', 'n', 'f', 'r', 'd', 'e', }; return GetResponseFromData(request, reinterpret_cast(languages), arraysize(languages)); } RDMResponse *MovingLightResponder::GetLanguage( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } return GetResponseFromData( request, reinterpret_cast(m_language.c_str()), m_language.size()); } RDMResponse *MovingLightResponder::SetLanguage( const RDMRequest *request) { if (request->ParamDataSize() != 2) { return NackWithReason(request, NR_FORMAT_ERROR); } const string new_lang(reinterpret_cast(request->ParamData()), request->ParamDataSize()); if (new_lang != "en" && new_lang != "fr" && new_lang != "de") { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } m_language = new_lang; return ResponderHelper::EmptySetResponse(request); } RDMResponse *MovingLightResponder::GetProductDetailList( const RDMRequest *request) { // Shortcut for only one item in the vector return ResponderHelper::GetProductDetailList( request, vector(1, PRODUCT_DETAIL_TEST)); } RDMResponse *MovingLightResponder::GetPersonality( const RDMRequest *request) { return ResponderHelper::GetPersonality(request, &m_personality_manager); } RDMResponse *MovingLightResponder::SetPersonality( const RDMRequest *request) { return ResponderHelper::SetPersonality(request, &m_personality_manager, m_start_address); } RDMResponse *MovingLightResponder::GetPersonalityDescription( const RDMRequest *request) { return ResponderHelper::GetPersonalityDescription( request, &m_personality_manager); } RDMResponse *MovingLightResponder::GetSlotInfo( const RDMRequest *request) { return ResponderHelper::GetSlotInfo(request, &m_personality_manager); } RDMResponse *MovingLightResponder::GetSlotDescription( const RDMRequest *request) { return ResponderHelper::GetSlotDescription(request, &m_personality_manager); } RDMResponse *MovingLightResponder::GetSlotDefaultValues( const RDMRequest *request) { return ResponderHelper::GetSlotDefaultValues(request, &m_personality_manager); } RDMResponse *MovingLightResponder::GetDmxStartAddress( const RDMRequest *request) { return ResponderHelper::GetDmxAddress(request, &m_personality_manager, m_start_address); } RDMResponse *MovingLightResponder::SetDmxStartAddress( const RDMRequest *request) { return ResponderHelper::SetDmxAddress(request, &m_personality_manager, &m_start_address); } RDMResponse *MovingLightResponder::GetDeviceHours( const RDMRequest *request) { return ResponderHelper::GetUInt32Value(request, m_device_hours++); } RDMResponse *MovingLightResponder::SetDeviceHours( const RDMRequest *request) { return ResponderHelper::SetUInt32Value(request, &m_device_hours); } RDMResponse *MovingLightResponder::GetLampHours( const RDMRequest *request) { return ResponderHelper::GetUInt32Value(request, m_lamp_hours++); } RDMResponse *MovingLightResponder::SetLampHours( const RDMRequest *request) { return ResponderHelper::SetUInt32Value(request, &m_lamp_hours); } RDMResponse *MovingLightResponder::GetLampStrikes( const RDMRequest *request) { return ResponderHelper::GetUInt32Value(request, m_lamp_strikes); } RDMResponse *MovingLightResponder::SetLampStrikes( const RDMRequest *request) { return ResponderHelper::SetUInt32Value(request, &m_lamp_strikes); } RDMResponse *MovingLightResponder::GetLampState( const RDMRequest *request) { uint8_t value = m_lamp_state; return ResponderHelper::GetUInt8Value(request, value); } RDMResponse *MovingLightResponder::SetLampState( const RDMRequest *request) { uint8_t new_value; if (!ResponderHelper::ExtractUInt8(request, &new_value)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (new_value > static_cast(LAMP_STANDBY)) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } m_lamp_state = static_cast(new_value); return ResponderHelper::EmptySetResponse(request); } RDMResponse *MovingLightResponder::GetLampOnMode( const RDMRequest *request) { uint8_t value = m_lamp_on_mode; return ResponderHelper::GetUInt8Value(request, value); } RDMResponse *MovingLightResponder::SetLampOnMode( const RDMRequest *request) { uint8_t new_value; if (!ResponderHelper::ExtractUInt8(request, &new_value)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (new_value > static_cast(LAMP_ON_MODE_ON_AFTER_CAL)) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } m_lamp_on_mode = static_cast(new_value); return ResponderHelper::EmptySetResponse(request); } RDMResponse *MovingLightResponder::GetDevicePowerCycles( const RDMRequest *request) { return ResponderHelper::GetUInt32Value(request, m_device_power_cycles++); } RDMResponse *MovingLightResponder::SetDevicePowerCycles( const RDMRequest *request) { return ResponderHelper::SetUInt32Value(request, &m_device_power_cycles); } RDMResponse *MovingLightResponder::GetIdentify( const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_identify_mode); } RDMResponse *MovingLightResponder::SetIdentify( const RDMRequest *request) { bool old_value = m_identify_mode; RDMResponse *response = ResponderHelper::SetBoolValue( request, &m_identify_mode); if (m_identify_mode != old_value) { OLA_INFO << "Dummy Moving Light " << m_uid << ", identify mode " << (m_identify_mode ? "on" : "off"); } return response; } RDMResponse *MovingLightResponder::GetDisplayInvert( const RDMRequest *request) { uint8_t value = m_display_invert; return ResponderHelper::GetUInt8Value(request, value); } RDMResponse *MovingLightResponder::SetDisplayInvert( const RDMRequest *request) { uint8_t new_value; if (!ResponderHelper::ExtractUInt8(request, &new_value)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (new_value > static_cast(DISPLAY_INVERT_AUTO)) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } m_display_invert = static_cast(new_value); return ResponderHelper::EmptySetResponse(request); } RDMResponse *MovingLightResponder::GetDisplayLevel( const RDMRequest *request) { return ResponderHelper::GetUInt8Value(request, m_display_level); } RDMResponse *MovingLightResponder::SetDisplayLevel( const RDMRequest *request) { return ResponderHelper::SetUInt8Value(request, &m_display_level); } RDMResponse *MovingLightResponder::GetPanInvert( const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_pan_invert); } RDMResponse *MovingLightResponder::SetPanInvert( const RDMRequest *request) { return ResponderHelper::SetBoolValue(request, &m_pan_invert); } RDMResponse *MovingLightResponder::GetTiltInvert( const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_tilt_invert); } RDMResponse *MovingLightResponder::SetTiltInvert( const RDMRequest *request) { return ResponderHelper::SetBoolValue(request, &m_tilt_invert); } RDMResponse *MovingLightResponder::GetPanTiltSwap( const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_pan_tilt_swap); } RDMResponse *MovingLightResponder::SetPanTiltSwap( const RDMRequest *request) { return ResponderHelper::SetBoolValue(request, &m_pan_tilt_swap); } RDMResponse *MovingLightResponder::GetRealTimeClock( const RDMRequest *request) { return ResponderHelper::GetRealTimeClock(request); } RDMResponse *MovingLightResponder::GetPowerState( const RDMRequest *request) { uint8_t value = m_power_state; return ResponderHelper::GetUInt8Value(request, value); } RDMResponse *MovingLightResponder::SetPowerState( const RDMRequest *request) { uint8_t new_value; if (!ResponderHelper::ExtractUInt8(request, &new_value)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (!UIntToPowerState(new_value, &m_power_state)) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } return ResponderHelper::EmptySetResponse(request); } RDMResponse *MovingLightResponder::SetResetDevice( const RDMRequest *request) { uint8_t value; rdm_reset_device_mode reset_device_enum; if (!ResponderHelper::ExtractUInt8(request, &value)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (!UIntToResetDevice(value, &reset_device_enum)) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } string reset_type = ResetDeviceToString(reset_device_enum); ToLower(&reset_type); OLA_INFO << "Dummy Moving Light " << m_uid << " " << reset_type << " reset device"; return ResponderHelper::EmptySetResponse(request); } RDMResponse *MovingLightResponder::GetDeviceModelDescription( const RDMRequest *request) { return ResponderHelper::GetString(request, "OLA Moving Light"); } RDMResponse *MovingLightResponder::GetManufacturerLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, OLA_MANUFACTURER_LABEL); } RDMResponse *MovingLightResponder::GetDeviceLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, m_device_label); } RDMResponse *MovingLightResponder::SetDeviceLabel( const RDMRequest *request) { return ResponderHelper::SetString(request, &m_device_label); } RDMResponse *MovingLightResponder::GetSoftwareVersionLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, string("OLA Version ") + VERSION); } RDMResponse *MovingLightResponder::GetOlaCodeVersion( const RDMRequest *request) { return ResponderHelper::GetString(request, VERSION); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/GroupSizeCalculatorTest.cpp0000664000175000017500000002502514376533110016665 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * GroupSizeCalculatorTest.cpp * Test fixture for the GroupSizeCalculator and StaticGroupTokenCalculator * classes. * Copyright (C) 2011 Simon Newton */ #include #include #include "ola/Logging.h" #include "ola/messaging/Descriptor.h" #include "common/rdm/GroupSizeCalculator.h" #include "ola/testing/TestUtils.h" using ola::messaging::BoolFieldDescriptor; using ola::messaging::Descriptor; using ola::messaging::FieldDescriptor; using ola::messaging::FieldDescriptorGroup; using ola::messaging::IPV4FieldDescriptor; using ola::messaging::Int16FieldDescriptor; using ola::messaging::Int32FieldDescriptor; using ola::messaging::Int8FieldDescriptor; using ola::messaging::StringFieldDescriptor; using ola::messaging::UIDFieldDescriptor; using ola::messaging::UInt16FieldDescriptor; using ola::messaging::UInt32FieldDescriptor; using ola::messaging::UInt8FieldDescriptor; using ola::rdm::GroupSizeCalculator; using std::vector; class GroupSizeCalculatorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(GroupSizeCalculatorTest); CPPUNIT_TEST(testSimpleCases); CPPUNIT_TEST(testWithFixedGroups); CPPUNIT_TEST(testSingleVariableSizedGroup); CPPUNIT_TEST(testMultipleVariableSizedGroups); CPPUNIT_TEST(testNestedVariableSizedGroups); CPPUNIT_TEST_SUITE_END(); public: void testSimpleCases(); void testWithFixedGroups(); void testSingleVariableSizedGroup(); void testMultipleVariableSizedGroups(); void testNestedVariableSizedGroups(); private: ola::rdm::GroupSizeCalculator m_calculator; ola::rdm::StaticGroupTokenCalculator m_static_calculator; }; CPPUNIT_TEST_SUITE_REGISTRATION(GroupSizeCalculatorTest); /** * Test that we can determine the token count for simple descriptors. */ void GroupSizeCalculatorTest::testSimpleCases() { vector fields; fields.push_back(new BoolFieldDescriptor("bool1")); fields.push_back(new UInt8FieldDescriptor("uint8")); fields.push_back(new UInt16FieldDescriptor("uint16")); fields.push_back(new UInt32FieldDescriptor("uint32")); fields.push_back(new Int8FieldDescriptor("int8")); fields.push_back(new Int16FieldDescriptor("int16")); fields.push_back(new Int32FieldDescriptor("int32")); fields.push_back(new StringFieldDescriptor("string", 0, 32)); fields.push_back(new IPV4FieldDescriptor("address")); fields.push_back(new UIDFieldDescriptor("uid")); Descriptor descriptor("Test Descriptor", fields); unsigned int token_count, group_repeat_count; OLA_ASSERT_TRUE( m_static_calculator.CalculateTokensRequired(&descriptor, &token_count)); OLA_ASSERT_EQ(10u, token_count); OLA_ASSERT_EQ( GroupSizeCalculator::INSUFFICIENT_TOKENS, m_calculator.CalculateGroupSize( 1, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ( GroupSizeCalculator::INSUFFICIENT_TOKENS, m_calculator.CalculateGroupSize( 9, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ( GroupSizeCalculator::NO_VARIABLE_GROUPS, m_calculator.CalculateGroupSize( 10, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ( GroupSizeCalculator::EXTRA_TOKENS, m_calculator.CalculateGroupSize( 11, &descriptor, &group_repeat_count)); } /** * Check the calculators work with fixed groups. */ void GroupSizeCalculatorTest::testWithFixedGroups() { vector group_fields, group_fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); const FieldDescriptorGroup *fixed_group = new FieldDescriptorGroup( "", group_fields, 2, 2); group_fields2.push_back(new Int16FieldDescriptor("int16")); group_fields2.push_back(new UInt16FieldDescriptor("uint16")); group_fields2.push_back(new BoolFieldDescriptor("uint16")); const FieldDescriptorGroup *fixed_group2 = new FieldDescriptorGroup( "", group_fields2, 4, 4); unsigned int token_count, group_repeat_count; // first check the static calculator OLA_ASSERT_TRUE( m_static_calculator.CalculateTokensRequired(fixed_group, &token_count)); OLA_ASSERT_EQ(2u, token_count); OLA_ASSERT_TRUE( m_static_calculator.CalculateTokensRequired(fixed_group2, &token_count)); OLA_ASSERT_EQ(3u, token_count); // now check the main calculator vector fields; fields.push_back(fixed_group); fields.push_back(fixed_group2); Descriptor descriptor("Test Descriptor", fields); OLA_ASSERT_EQ( GroupSizeCalculator::INSUFFICIENT_TOKENS, m_calculator.CalculateGroupSize( 4, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ( GroupSizeCalculator::INSUFFICIENT_TOKENS, m_calculator.CalculateGroupSize( 12, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ( GroupSizeCalculator::INSUFFICIENT_TOKENS, m_calculator.CalculateGroupSize( 15, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ( GroupSizeCalculator::NO_VARIABLE_GROUPS, m_calculator.CalculateGroupSize( 16, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ( GroupSizeCalculator::EXTRA_TOKENS, m_calculator.CalculateGroupSize( 17, &descriptor, &group_repeat_count)); } /* * Test that a single variable-sized group passes */ void GroupSizeCalculatorTest::testSingleVariableSizedGroup() { vector group_fields, group_fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); const FieldDescriptorGroup *variable_group = new FieldDescriptorGroup( "", group_fields, 0, 2); vector fields; // add some static fields as well fields.push_back(new UInt8FieldDescriptor("uint8")); fields.push_back(new UInt16FieldDescriptor("uint16")); fields.push_back(variable_group); fields.push_back(new UInt32FieldDescriptor("uint32")); Descriptor descriptor("Test Descriptor", fields); unsigned int group_repeat_count; OLA_ASSERT_EQ( GroupSizeCalculator::INSUFFICIENT_TOKENS, m_calculator.CalculateGroupSize( 0, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ( GroupSizeCalculator::INSUFFICIENT_TOKENS, m_calculator.CalculateGroupSize( 2, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ( GroupSizeCalculator::SINGLE_VARIABLE_GROUP, m_calculator.CalculateGroupSize( 3, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ(0u, group_repeat_count); OLA_ASSERT_EQ( GroupSizeCalculator::SINGLE_VARIABLE_GROUP, m_calculator.CalculateGroupSize( 5, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ(1u, group_repeat_count); OLA_ASSERT_EQ( GroupSizeCalculator::SINGLE_VARIABLE_GROUP, m_calculator.CalculateGroupSize( 7, &descriptor, &group_repeat_count)); OLA_ASSERT_EQ(2u, group_repeat_count); OLA_ASSERT_EQ( GroupSizeCalculator::EXTRA_TOKENS, m_calculator.CalculateGroupSize( 8, &descriptor, &group_repeat_count)); } /** * Test that multiple variable-sized groups fail */ void GroupSizeCalculatorTest::testMultipleVariableSizedGroups() { vector group_fields, group_fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); const FieldDescriptorGroup *variable_group = new FieldDescriptorGroup( "", group_fields, 0, 2); group_fields2.push_back(new Int16FieldDescriptor("int16")); group_fields2.push_back(new UInt16FieldDescriptor("uint16")); group_fields2.push_back(new BoolFieldDescriptor("uint16")); const FieldDescriptorGroup *variable_group2 = new FieldDescriptorGroup( "", group_fields2, 0, 4); vector fields; fields.push_back(variable_group); fields.push_back(variable_group2); Descriptor descriptor("Test Descriptor", fields); unsigned int token_count, group_repeat_count; // first check these the static calculator OLA_ASSERT_TRUE( m_static_calculator.CalculateTokensRequired(variable_group, &token_count)); OLA_ASSERT_EQ(2u, token_count); OLA_ASSERT_TRUE( m_static_calculator.CalculateTokensRequired(variable_group2, &token_count)); OLA_ASSERT_EQ(3u, token_count); // now check the main calculator. OLA_ASSERT_EQ( GroupSizeCalculator::MULTIPLE_VARIABLE_GROUPS, m_calculator.CalculateGroupSize( 10, &descriptor, &group_repeat_count)); } /* * Test that a nested, variable sized groups fail */ void GroupSizeCalculatorTest::testNestedVariableSizedGroups() { vector fields, group_fields, group_fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); group_fields2.push_back(new Int16FieldDescriptor("int16")); group_fields2.push_back(new FieldDescriptorGroup("", group_fields, 0, 2)); const FieldDescriptorGroup *nested_variable_group = new FieldDescriptorGroup( "", group_fields2, 0, 4); fields.push_back(new Int16FieldDescriptor("int16")); fields.push_back(nested_variable_group); Descriptor descriptor("Test Descriptor", fields); // first check these the static calculator unsigned int token_count, group_repeat_count; OLA_ASSERT_TRUE( !m_static_calculator.CalculateTokensRequired( nested_variable_group, &token_count)); // now check the main calculator. OLA_ASSERT_EQ( GroupSizeCalculator::NESTED_VARIABLE_GROUPS, m_calculator.CalculateGroupSize( 10, &descriptor, &group_repeat_count)); } ola-0.10.9/common/rdm/DescriptorConsistencyChecker.h0000664000175000017500000000531514376533110017356 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DescriptorConsistencyChecker.h * Verify that we can determine the layout of a Descriptor. * * In order for the binary unpacker to work, we need to be able to determine * the size and offset of every field within a descriptor, without consdering * the data itself. This means the following are unsupported: * * - nested non-fixed sized groups * - multiple variable-sized fields e.g multiple strings * - variable-sized fields within groups * * Copyright (C) 2011 Simon Newton */ #ifndef COMMON_RDM_DESCRIPTORCONSISTENCYCHECKER_H_ #define COMMON_RDM_DESCRIPTORCONSISTENCYCHECKER_H_ #include #include namespace ola { namespace rdm { /** * Check that a RDM Descriptor is consistent. */ class DescriptorConsistencyChecker : public ola::messaging::FieldDescriptorVisitor { public: DescriptorConsistencyChecker() : m_variable_sized_field_count(0) { } bool Descend() const { return false; } bool CheckConsistency(const ola::messaging::Descriptor *descriptor); void Visit(const ola::messaging::BoolFieldDescriptor*); void Visit(const ola::messaging::IPV4FieldDescriptor*); void Visit(const ola::messaging::MACFieldDescriptor*); void Visit(const ola::messaging::UIDFieldDescriptor*); void Visit(const ola::messaging::StringFieldDescriptor*); void Visit(const ola::messaging::UInt8FieldDescriptor*); void Visit(const ola::messaging::UInt16FieldDescriptor*); void Visit(const ola::messaging::UInt32FieldDescriptor*); void Visit(const ola::messaging::Int8FieldDescriptor*); void Visit(const ola::messaging::Int16FieldDescriptor*); void Visit(const ola::messaging::Int32FieldDescriptor*); void Visit(const ola::messaging::FieldDescriptorGroup*); void PostVisit(const ola::messaging::FieldDescriptorGroup*); private: unsigned int m_variable_sized_field_count; }; } // namespace rdm } // namespace ola #endif // COMMON_RDM_DESCRIPTORCONSISTENCYCHECKER_H_ ola-0.10.9/common/rdm/DimmerSubDevice.cpp0000664000175000017500000001600114376533110015065 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DimmerSubDevice.cpp * Copyright (C) 2013 Simon Newton */ #include "ola/rdm/DimmerSubDevice.h" #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include "ola/base/Array.h" #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/OpenLightingEnums.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/ResponderHelper.h" namespace ola { namespace rdm { using ola::network::HostToNetwork; using ola::network::NetworkToHost; using std::string; using std::vector; DimmerSubDevice::RDMOps *DimmerSubDevice::RDMOps::instance = NULL; const DimmerSubDevice::Personalities * DimmerSubDevice::Personalities::Instance() { if (!instance) { PersonalityList personalities; personalities.push_back(Personality(1, "8 bit dimming")); personalities.push_back(Personality(2, "16 bit dimming")); instance = new Personalities(personalities); } return instance; } DimmerSubDevice::Personalities *DimmerSubDevice::Personalities::instance = NULL; const ResponderOps::ParamHandler DimmerSubDevice::PARAM_HANDLERS[] = { { PID_DEVICE_INFO, &DimmerSubDevice::GetDeviceInfo, NULL}, { PID_PRODUCT_DETAIL_ID_LIST, &DimmerSubDevice::GetProductDetailList, NULL}, { PID_DEVICE_MODEL_DESCRIPTION, &DimmerSubDevice::GetDeviceModelDescription, NULL}, { PID_MANUFACTURER_LABEL, &DimmerSubDevice::GetManufacturerLabel, NULL}, { PID_DEVICE_LABEL, &DimmerSubDevice::GetDeviceLabel, NULL}, { PID_SOFTWARE_VERSION_LABEL, &DimmerSubDevice::GetSoftwareVersionLabel, NULL}, { PID_DMX_PERSONALITY, &DimmerSubDevice::GetPersonality, &DimmerSubDevice::SetPersonality}, { PID_DMX_PERSONALITY_DESCRIPTION, &DimmerSubDevice::GetPersonalityDescription, NULL}, { PID_DMX_START_ADDRESS, &DimmerSubDevice::GetDmxStartAddress, &DimmerSubDevice::SetDmxStartAddress}, { PID_IDENTIFY_DEVICE, &DimmerSubDevice::GetIdentify, &DimmerSubDevice::SetIdentify}, { PID_IDENTIFY_MODE, &DimmerSubDevice::GetIdentifyMode, &DimmerSubDevice::SetIdentifyMode}, { 0, NULL, NULL}, }; DimmerSubDevice::DimmerSubDevice(const UID &uid, uint16_t sub_device_number, uint16_t sub_device_count) : m_uid(uid), m_sub_device_number(sub_device_number), m_sub_device_count(sub_device_count), m_start_address(sub_device_number), m_identify_on(false), m_identify_mode(IDENTIFY_MODE_LOUD), m_personality_manager(Personalities::Instance()) { } /* * Handle an RDM Request */ void DimmerSubDevice::SendRDMRequest(RDMRequest *request, RDMCallback *callback) { RDMOps::Instance()->HandleRDMRequest(this, m_uid, m_sub_device_number, request, callback); } RDMResponse *DimmerSubDevice::GetDeviceInfo(const RDMRequest *request) { return ResponderHelper::GetDeviceInfo( request, OLA_DUMMY_DIMMER_MODEL, PRODUCT_CATEGORY_DIMMER, 1, &m_personality_manager, m_start_address, m_sub_device_count, 0); } bool DimmerSubDevice::SetDmxStartAddress(uint16_t start_address) { if (start_address < 1 || start_address + Footprint() - 1 > DMX_UNIVERSE_SIZE) return false; m_start_address = start_address; return true; } RDMResponse *DimmerSubDevice::GetProductDetailList( const RDMRequest *request) { // Shortcut for only one item in the vector return ResponderHelper::GetProductDetailList(request, vector (1, PRODUCT_DETAIL_TEST)); } RDMResponse *DimmerSubDevice::GetPersonality( const RDMRequest *request) { return ResponderHelper::GetPersonality(request, &m_personality_manager); } RDMResponse *DimmerSubDevice::SetPersonality( const RDMRequest *request) { return ResponderHelper::SetPersonality(request, &m_personality_manager, m_start_address); } RDMResponse *DimmerSubDevice::GetPersonalityDescription( const RDMRequest *request) { return ResponderHelper::GetPersonalityDescription( request, &m_personality_manager); } RDMResponse *DimmerSubDevice::GetDmxStartAddress( const RDMRequest *request) { return ResponderHelper::GetUInt16Value(request, m_start_address); } RDMResponse *DimmerSubDevice::SetDmxStartAddress( const RDMRequest *request) { return ResponderHelper::SetDmxAddress(request, &m_personality_manager, &m_start_address); } RDMResponse *DimmerSubDevice::GetDeviceModelDescription( const RDMRequest *request) { return ResponderHelper::GetString(request, "OLA Dimmer"); } RDMResponse *DimmerSubDevice::GetManufacturerLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, OLA_MANUFACTURER_LABEL); } RDMResponse *DimmerSubDevice::GetDeviceLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, "Dummy Dimmer"); } RDMResponse *DimmerSubDevice::GetSoftwareVersionLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, string("OLA Version ") + VERSION); } RDMResponse *DimmerSubDevice::GetIdentify(const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_identify_on); } RDMResponse *DimmerSubDevice::SetIdentify(const RDMRequest *request) { bool old_value = m_identify_on; RDMResponse *response = ResponderHelper::SetBoolValue( request, &m_identify_on); if (m_identify_on != old_value) { OLA_INFO << "Dummy dimmer device " << m_uid << ":" << m_sub_device_number << ", identify mode " << (m_identify_on ? "on" : "off"); } return response; } RDMResponse *DimmerSubDevice::GetIdentifyMode( const RDMRequest *request) { return ResponderHelper::GetUInt8Value(request, m_identify_mode); } RDMResponse *DimmerSubDevice::SetIdentifyMode( const RDMRequest *request) { uint8_t new_identify_mode; if (!ResponderHelper::ExtractUInt8(request, &new_identify_mode)) return NackWithReason(request, NR_FORMAT_ERROR); if (new_identify_mode != IDENTIFY_MODE_QUIET && new_identify_mode != IDENTIFY_MODE_LOUD) return NackWithReason(request, NR_DATA_OUT_OF_RANGE); m_identify_mode = new_identify_mode; return GetResponseFromData(request, NULL, 0); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/AdvancedDimmerResponder.cpp0000664000175000017500000007312114376533110016611 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * AdvancedDimmerResponder.cpp * Copyright (C) 2013 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/AdvancedDimmerResponder.h" #include "ola/rdm/OpenLightingEnums.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/ResponderHelper.h" #include "ola/rdm/ResponderSettings.h" namespace ola { namespace rdm { using ola::network::HostToNetwork; using ola::network::NetworkToHost; using std::max; using std::min; using std::string; using std::vector; const uint8_t AdvancedDimmerResponder::DIMMER_RESOLUTION = 14; const uint16_t AdvancedDimmerResponder::LOWER_MAX_LEVEL = 0x7fff; const uint16_t AdvancedDimmerResponder::UPPER_MAX_LEVEL = 0xffff; const uint16_t AdvancedDimmerResponder::LOWER_MIN_LEVEL = 0x0; const uint16_t AdvancedDimmerResponder::UPPER_MIN_LEVEL = 0x7fff; const unsigned int AdvancedDimmerResponder::PRESET_COUNT = 6; const uint16_t AdvancedDimmerResponder::MIN_FAIL_DELAY_TIME = 10; const uint16_t AdvancedDimmerResponder::MIN_FAIL_HOLD_TIME = 0; const uint16_t AdvancedDimmerResponder::MAX_FAIL_DELAY_TIME = 0x00ff; const uint16_t AdvancedDimmerResponder::MAX_FAIL_HOLD_TIME = 0xff00; const uint16_t AdvancedDimmerResponder::MIN_STARTUP_DELAY_TIME = 0; const uint16_t AdvancedDimmerResponder::MIN_STARTUP_HOLD_TIME = 0; const uint16_t AdvancedDimmerResponder::MAX_STARTUP_DELAY_TIME = 1200; const uint16_t AdvancedDimmerResponder::MAX_STARTUP_HOLD_TIME = 36000; const uint16_t AdvancedDimmerResponder::INFINITE_TIME = 0xffff; const char* AdvancedDimmerResponder::CURVES[] = { "Linear Curve", "Square Law Curve", "S Curve", }; const char* AdvancedDimmerResponder::RESPONSE_TIMES[] = { "Super fast", "Fast", "Slow", "Very slow", }; const FrequencyModulationSetting::ArgType AdvancedDimmerResponder::PWM_FREQUENCIES[] = { {120, "120Hz"}, {500, "500Hz"}, {1000, "1kHz"}, {5000, "5kHz"}, {10000, "10kHz"}, }; const char* AdvancedDimmerResponder::LOCK_STATES[] = { "Unlocked", "Start Address Locked", "Address and Personalities Locked", }; const SettingCollection AdvancedDimmerResponder::CurveSettings(CURVES, arraysize(CURVES)); const SettingCollection AdvancedDimmerResponder::ResponseTimeSettings( RESPONSE_TIMES, arraysize(RESPONSE_TIMES)); const SettingCollection AdvancedDimmerResponder::FrequencySettings( PWM_FREQUENCIES, arraysize(PWM_FREQUENCIES)); const SettingCollection AdvancedDimmerResponder::LockSettings( LOCK_STATES, arraysize(LOCK_STATES), true); RDMResponse *AdvancedDimmerResponder:: LockManager::SetWithPin(const RDMRequest *request, uint16_t pin) { PACK( struct lock_s { uint16_t pin; uint8_t state; }); STATIC_ASSERT(sizeof(lock_s) == 3); lock_s data; if (request->ParamDataSize() != sizeof(lock_s)) { return NackWithReason(request, NR_FORMAT_ERROR); } memcpy(reinterpret_cast(&data), request->ParamData(), sizeof(data)); data.pin = NetworkToHost(data.pin); if (data.pin != pin) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } if (!ChangeSetting(data.state)) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } return ResponderHelper::EmptySetResponse(request); } const AdvancedDimmerResponder::Personalities * AdvancedDimmerResponder::Personalities::Instance() { if (!instance) { PersonalityList personalities; personalities.push_back(Personality(12, "6-Channel 16-bit")); instance = new Personalities(personalities); } return instance; } AdvancedDimmerResponder::Personalities * AdvancedDimmerResponder::Personalities::instance = NULL; AdvancedDimmerResponder::RDMOps * AdvancedDimmerResponder::RDMOps::instance = NULL; const ResponderOps::ParamHandler AdvancedDimmerResponder::PARAM_HANDLERS[] = { { PID_DEVICE_INFO, &AdvancedDimmerResponder::GetDeviceInfo, NULL}, { PID_PRODUCT_DETAIL_ID_LIST, &AdvancedDimmerResponder::GetProductDetailList, NULL}, { PID_DEVICE_MODEL_DESCRIPTION, &AdvancedDimmerResponder::GetDeviceModelDescription, NULL}, { PID_MANUFACTURER_LABEL, &AdvancedDimmerResponder::GetManufacturerLabel, NULL}, { PID_DEVICE_LABEL, &AdvancedDimmerResponder::GetDeviceLabel, NULL}, { PID_SOFTWARE_VERSION_LABEL, &AdvancedDimmerResponder::GetSoftwareVersionLabel, NULL}, { PID_DMX_PERSONALITY, &AdvancedDimmerResponder::GetPersonality, &AdvancedDimmerResponder::SetPersonality}, { PID_DMX_PERSONALITY_DESCRIPTION, &AdvancedDimmerResponder::GetPersonalityDescription, NULL}, { PID_DMX_START_ADDRESS, &AdvancedDimmerResponder::GetDmxStartAddress, &AdvancedDimmerResponder::SetDmxStartAddress}, { PID_IDENTIFY_DEVICE, &AdvancedDimmerResponder::GetIdentify, &AdvancedDimmerResponder::SetIdentify}, { PID_IDENTIFY_MODE, &AdvancedDimmerResponder::GetIdentifyMode, &AdvancedDimmerResponder::SetIdentifyMode}, { PID_CAPTURE_PRESET, NULL, &AdvancedDimmerResponder::SetCapturePreset}, { PID_PRESET_PLAYBACK, &AdvancedDimmerResponder::GetPresetPlayback, &AdvancedDimmerResponder::SetPresetPlayback}, { PID_DIMMER_INFO, &AdvancedDimmerResponder::GetDimmerInfo, NULL}, { PID_MINIMUM_LEVEL, &AdvancedDimmerResponder::GetMinimumLevel, &AdvancedDimmerResponder::SetMinimumLevel}, { PID_MAXIMUM_LEVEL, &AdvancedDimmerResponder::GetMaximumLevel, &AdvancedDimmerResponder::SetMaximumLevel}, { PID_DMX_FAIL_MODE, &AdvancedDimmerResponder::GetFailMode, &AdvancedDimmerResponder::SetFailMode}, { PID_DMX_STARTUP_MODE, &AdvancedDimmerResponder::GetStartUpMode, &AdvancedDimmerResponder::SetStartUpMode}, { PID_BURN_IN, &AdvancedDimmerResponder::GetBurnIn, &AdvancedDimmerResponder::SetBurnIn}, { PID_CURVE, &AdvancedDimmerResponder::GetCurve, &AdvancedDimmerResponder::SetCurve}, { PID_CURVE_DESCRIPTION, &AdvancedDimmerResponder::GetCurveDescription, NULL}, { PID_OUTPUT_RESPONSE_TIME, &AdvancedDimmerResponder::GetResponseTime, &AdvancedDimmerResponder::SetResponseTime}, { PID_OUTPUT_RESPONSE_TIME_DESCRIPTION, &AdvancedDimmerResponder::GetResponseTimeDescription, NULL}, { PID_MODULATION_FREQUENCY, &AdvancedDimmerResponder::GetPWMFrequency, &AdvancedDimmerResponder::SetPWMFrequency}, { PID_MODULATION_FREQUENCY_DESCRIPTION, &AdvancedDimmerResponder::GetPWMFrequencyDescription, NULL}, { PID_LOCK_STATE, &AdvancedDimmerResponder::GetLockState, &AdvancedDimmerResponder::SetLockState}, { PID_LOCK_STATE_DESCRIPTION, &AdvancedDimmerResponder::GetLockStateDescription, NULL}, { PID_LOCK_PIN, &AdvancedDimmerResponder::GetLockPin, &AdvancedDimmerResponder::SetLockPin}, { PID_POWER_ON_SELF_TEST, &AdvancedDimmerResponder::GetPowerOnSelfTest, &AdvancedDimmerResponder::SetPowerOnSelfTest}, { PID_PRESET_STATUS, &AdvancedDimmerResponder::GetPresetStatus, &AdvancedDimmerResponder::SetPresetStatus}, { PID_PRESET_MERGEMODE, &AdvancedDimmerResponder::GetPresetMergeMode, &AdvancedDimmerResponder::SetPresetMergeMode}, { PID_PRESET_INFO, &AdvancedDimmerResponder::GetPresetInfo, NULL}, { 0, NULL, NULL}, }; /** * Create a new dimmer device. */ AdvancedDimmerResponder::AdvancedDimmerResponder(const UID &uid) : m_uid(uid), m_identify_state(false), m_start_address(1), m_lock_pin(0), m_maximum_level(UPPER_MAX_LEVEL), m_identify_mode(IDENTIFY_MODE_QUIET), m_burn_in(0), m_power_on_self_test(true), m_personality_manager(Personalities::Instance()), m_curve_settings(&CurveSettings), m_response_time_settings(&ResponseTimeSettings), m_lock_settings(&LockSettings), m_frequency_settings(&FrequencySettings), m_presets(PRESET_COUNT), m_preset_scene(0), m_preset_level(0), m_preset_mergemode(MERGEMODE_DEFAULT) { m_min_level.min_level_increasing = 10; m_min_level.min_level_decreasing = 20; m_min_level.on_below_min = true; m_fail_mode.scene = 0; m_fail_mode.delay = MIN_FAIL_DELAY_TIME; m_fail_mode.hold_time = MIN_FAIL_HOLD_TIME; m_fail_mode.level = 0; m_startup_mode.scene = 0; m_startup_mode.delay = MIN_STARTUP_DELAY_TIME; m_startup_mode.hold_time = MIN_STARTUP_HOLD_TIME; m_startup_mode.level = 255; // make the first preset read only m_presets[0].programmed = PRESET_PROGRAMMED_READ_ONLY; } /* * Handle an RDM Request */ void AdvancedDimmerResponder::SendRDMRequest(RDMRequest *request, RDMCallback *callback) { RDMOps::Instance()->HandleRDMRequest(this, m_uid, ROOT_RDM_DEVICE, request, callback); } RDMResponse *AdvancedDimmerResponder::GetDeviceInfo( const RDMRequest *request) { return ResponderHelper::GetDeviceInfo( request, OLA_E137_DIMMER_MODEL, PRODUCT_CATEGORY_DIMMER, 1, &m_personality_manager, m_start_address, 0, 0); } RDMResponse *AdvancedDimmerResponder::GetProductDetailList( const RDMRequest *request) { // Shortcut for only one item in the vector return ResponderHelper::GetProductDetailList(request, vector(1, PRODUCT_DETAIL_TEST)); } RDMResponse *AdvancedDimmerResponder::GetDeviceModelDescription( const RDMRequest *request) { return ResponderHelper::GetString(request, "OLA E1.37-1 Dimmer"); } RDMResponse *AdvancedDimmerResponder::GetManufacturerLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, OLA_MANUFACTURER_LABEL); } RDMResponse *AdvancedDimmerResponder::GetDeviceLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, "Dummy Adv Dimmer"); } RDMResponse *AdvancedDimmerResponder::GetSoftwareVersionLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, string("OLA Version ") + VERSION); } RDMResponse *AdvancedDimmerResponder::GetPersonality( const RDMRequest *request) { return ResponderHelper::GetPersonality(request, &m_personality_manager); } RDMResponse *AdvancedDimmerResponder::SetPersonality( const RDMRequest *request) { if (m_lock_settings.CurrentSetting() > 1) { return NackWithReason(request, NR_WRITE_PROTECT); } return ResponderHelper::SetPersonality(request, &m_personality_manager, m_start_address); } RDMResponse *AdvancedDimmerResponder::GetPersonalityDescription( const RDMRequest *request) { return ResponderHelper::GetPersonalityDescription( request, &m_personality_manager); } RDMResponse *AdvancedDimmerResponder::GetDmxStartAddress( const RDMRequest *request) { return ResponderHelper::GetDmxAddress(request, &m_personality_manager, m_start_address); } RDMResponse *AdvancedDimmerResponder::SetDmxStartAddress( const RDMRequest *request) { if (m_lock_settings.CurrentSetting() > 0) { return NackWithReason(request, NR_WRITE_PROTECT); } return ResponderHelper::SetDmxAddress(request, &m_personality_manager, &m_start_address); } RDMResponse *AdvancedDimmerResponder::GetDimmerInfo( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } PACK( struct dimmer_info_s { uint16_t min_level_lower; uint16_t min_level_upper; uint16_t max_level_lower; uint16_t max_level_upper; uint8_t curve_count; uint8_t level_resolution; uint8_t level_support; }); STATIC_ASSERT(sizeof(dimmer_info_s) == 11); struct dimmer_info_s dimmer_info; dimmer_info.min_level_lower = HostToNetwork(LOWER_MIN_LEVEL); dimmer_info.min_level_upper = HostToNetwork(UPPER_MIN_LEVEL); dimmer_info.max_level_lower = HostToNetwork(LOWER_MAX_LEVEL); dimmer_info.max_level_upper = HostToNetwork(UPPER_MAX_LEVEL); dimmer_info.curve_count = CurveSettings.Count(); dimmer_info.level_resolution = DIMMER_RESOLUTION; dimmer_info.level_support = 1; return GetResponseFromData( request, reinterpret_cast(&dimmer_info), sizeof(dimmer_info), RDM_ACK); } RDMResponse *AdvancedDimmerResponder::GetMinimumLevel( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } min_level_s output = m_min_level; output.min_level_increasing = HostToNetwork(output.min_level_increasing); output.min_level_decreasing = HostToNetwork(output.min_level_decreasing); return GetResponseFromData( request, reinterpret_cast(&output), sizeof(output), RDM_ACK); } RDMResponse *AdvancedDimmerResponder::SetMinimumLevel( const RDMRequest *request) { min_level_s args; if (request->ParamDataSize() != sizeof(args)) { return NackWithReason(request, NR_FORMAT_ERROR); } memcpy(reinterpret_cast(&args), request->ParamData(), sizeof(args)); args.min_level_increasing = NetworkToHost(args.min_level_increasing); args.min_level_decreasing = NetworkToHost(args.min_level_decreasing); if (!ValueBetweenRange(args.min_level_decreasing, LOWER_MIN_LEVEL, UPPER_MIN_LEVEL) || !ValueBetweenRange(args.min_level_increasing, LOWER_MIN_LEVEL, UPPER_MIN_LEVEL) || args.on_below_min > 1) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } else { m_min_level = args; return ResponderHelper::EmptySetResponse(request); } } RDMResponse *AdvancedDimmerResponder::GetMaximumLevel( const RDMRequest *request) { return ResponderHelper::GetUInt16Value(request, m_maximum_level); } RDMResponse *AdvancedDimmerResponder::SetMaximumLevel( const RDMRequest *request) { uint16_t arg; if (!ResponderHelper::ExtractUInt16(request, &arg)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (!ValueBetweenRange(arg, LOWER_MAX_LEVEL, UPPER_MAX_LEVEL)) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } else { m_maximum_level = arg; return ResponderHelper::EmptySetResponse(request); } } RDMResponse *AdvancedDimmerResponder::GetIdentify( const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_identify_state); } RDMResponse *AdvancedDimmerResponder::SetIdentify( const RDMRequest *request) { bool old_value = m_identify_state; RDMResponse *response = ResponderHelper::SetBoolValue( request, &m_identify_state); if (m_identify_state != old_value) { OLA_INFO << "E1.37-1 Dimmer Device " << m_uid << ", identify state " << (m_identify_state ? "on" : "off"); } return response; } RDMResponse *AdvancedDimmerResponder::SetCapturePreset( const RDMRequest *request) { PACK( struct preset_s { uint16_t scene; uint16_t fade_up_time; uint16_t fade_down_time; uint16_t wait_time; }); STATIC_ASSERT(sizeof(preset_s) == 8); preset_s args; if (request->ParamDataSize() != sizeof(args)) { return NackWithReason(request, NR_FORMAT_ERROR); } memcpy(reinterpret_cast(&args), request->ParamData(), sizeof(args)); args.scene = NetworkToHost(args.scene); args.fade_up_time = NetworkToHost(args.fade_up_time); args.fade_down_time = NetworkToHost(args.fade_down_time); args.wait_time = NetworkToHost(args.wait_time); if (args.scene == 0 || args.scene >= m_presets.size()) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } Preset &preset = m_presets[args.scene - 1]; if (preset.programmed == PRESET_PROGRAMMED_READ_ONLY) { return NackWithReason(request, NR_WRITE_PROTECT); } preset.fade_up_time = args.fade_up_time; preset.fade_down_time = args.fade_down_time; preset.wait_time = args.wait_time; preset.programmed = PRESET_PROGRAMMED; return ResponderHelper::EmptySetResponse(request); } RDMResponse *AdvancedDimmerResponder::GetPresetPlayback( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } preset_playback_s output; output.mode = HostToNetwork(m_preset_scene); output.level = m_preset_level; return GetResponseFromData( request, reinterpret_cast(&output), sizeof(output), RDM_ACK); } RDMResponse *AdvancedDimmerResponder::SetPresetPlayback( const RDMRequest *request) { preset_playback_s args; if (request->ParamDataSize() != sizeof(args)) { return NackWithReason(request, NR_FORMAT_ERROR); } memcpy(reinterpret_cast(&args), request->ParamData(), sizeof(args)); args.mode = NetworkToHost(args.mode); if (args.mode >= m_presets.size() && args.mode != PRESET_PLAYBACK_ALL) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } m_preset_scene = args.mode; m_preset_level = args.level; return ResponderHelper::EmptySetResponse(request); } RDMResponse *AdvancedDimmerResponder::GetIdentifyMode( const RDMRequest *request) { return ResponderHelper::GetUInt8Value(request, m_identify_mode); } RDMResponse *AdvancedDimmerResponder::SetIdentifyMode( const RDMRequest *request) { uint8_t arg; if (!ResponderHelper::ExtractUInt8(request, &arg)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (arg == static_cast(IDENTIFY_MODE_QUIET) || arg == static_cast(IDENTIFY_MODE_LOUD)) { m_identify_mode = static_cast(arg); return ResponderHelper::EmptySetResponse(request); } else { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } } RDMResponse *AdvancedDimmerResponder::GetBurnIn( const RDMRequest *request) { return ResponderHelper::GetUInt8Value(request, m_burn_in); } RDMResponse *AdvancedDimmerResponder::SetBurnIn( const RDMRequest *request) { uint8_t arg; if (!ResponderHelper::ExtractUInt8(request, &arg)) { return NackWithReason(request, NR_FORMAT_ERROR); } // We start the 'clock' immediately, so the hours remaining is one less than // what was requested. m_burn_in = (arg ? arg - 1 : 0); return ResponderHelper::EmptySetResponse(request); } RDMResponse *AdvancedDimmerResponder::GetCurve( const RDMRequest *request) { return m_curve_settings.Get(request); } RDMResponse *AdvancedDimmerResponder::SetCurve( const RDMRequest *request) { return m_curve_settings.Set(request); } RDMResponse *AdvancedDimmerResponder::GetCurveDescription( const RDMRequest *request) { return m_curve_settings.GetDescription(request); } RDMResponse *AdvancedDimmerResponder::GetResponseTime( const RDMRequest *request) { return m_response_time_settings.Get(request); } RDMResponse *AdvancedDimmerResponder::SetResponseTime( const RDMRequest *request) { return m_response_time_settings.Set(request); } RDMResponse *AdvancedDimmerResponder::GetResponseTimeDescription( const RDMRequest *request) { return m_response_time_settings.GetDescription(request); } RDMResponse *AdvancedDimmerResponder::GetPWMFrequency( const RDMRequest *request) { return m_frequency_settings.Get(request); } RDMResponse *AdvancedDimmerResponder::SetPWMFrequency( const RDMRequest *request) { return m_frequency_settings.Set(request); } RDMResponse *AdvancedDimmerResponder::GetPWMFrequencyDescription( const RDMRequest *request) { return m_frequency_settings.GetDescription(request); } RDMResponse *AdvancedDimmerResponder::GetLockState( const RDMRequest *request) { return m_lock_settings.Get(request); } RDMResponse *AdvancedDimmerResponder::SetLockState( const RDMRequest *request) { return m_lock_settings.SetWithPin(request, m_lock_pin); } RDMResponse *AdvancedDimmerResponder::GetLockStateDescription( const RDMRequest *request) { return m_lock_settings.GetDescription(request); } RDMResponse *AdvancedDimmerResponder::GetLockPin( const RDMRequest *request) { return ResponderHelper::GetUInt16Value(request, m_lock_pin, 0); } RDMResponse *AdvancedDimmerResponder::SetLockPin( const RDMRequest *request) { PACK( struct set_pin_s { uint16_t new_pin; uint16_t current_pin; }); STATIC_ASSERT(sizeof(set_pin_s) == 4); set_pin_s data; if (request->ParamDataSize() != sizeof(data)) { return NackWithReason(request, NR_FORMAT_ERROR); } memcpy(reinterpret_cast(&data), request->ParamData(), sizeof(data)); data.new_pin = NetworkToHost(data.new_pin); data.current_pin = NetworkToHost(data.current_pin); if (data.current_pin != m_lock_pin) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } if (data.new_pin > MAX_LOCK_PIN) { return NackWithReason(request, NR_FORMAT_ERROR); } m_lock_pin = data.new_pin; return ResponderHelper::EmptySetResponse(request); } RDMResponse *AdvancedDimmerResponder::GetPowerOnSelfTest( const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_power_on_self_test); } RDMResponse *AdvancedDimmerResponder::SetPowerOnSelfTest( const RDMRequest *request) { return ResponderHelper::SetBoolValue(request, &m_power_on_self_test); } RDMResponse *AdvancedDimmerResponder::GetPresetStatus( const RDMRequest *request) { uint16_t arg; if (!ResponderHelper::ExtractUInt16(request, &arg)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (arg == 0 || arg > m_presets.size()) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } preset_status_s output; const Preset &preset = m_presets[arg - 1]; output.scene = HostToNetwork(arg); output.fade_up_time = HostToNetwork(preset.fade_up_time); output.fade_down_time = HostToNetwork(preset.fade_down_time); output.wait_time = HostToNetwork(preset.wait_time); output.programmed = preset.programmed; return GetResponseFromData( request, reinterpret_cast(&output), sizeof(output), RDM_ACK); } RDMResponse *AdvancedDimmerResponder::SetPresetStatus( const RDMRequest *request) { preset_status_s args; if (request->ParamDataSize() != sizeof(args)) { return NackWithReason(request, NR_FORMAT_ERROR); } memcpy(reinterpret_cast(&args), request->ParamData(), sizeof(args)); uint16_t scene = NetworkToHost(args.scene); if (scene == 0 || scene > m_presets.size()) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } Preset &preset = m_presets[scene - 1]; if (preset.programmed == PRESET_PROGRAMMED_READ_ONLY) { return NackWithReason(request, NR_WRITE_PROTECT); } if (args.programmed > 1) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } if (args.programmed == 1) { preset.fade_up_time = 0; preset.fade_down_time = 0; preset.wait_time = 0; preset.programmed = PRESET_NOT_PROGRAMMED; } else { preset.fade_up_time = NetworkToHost(args.fade_up_time); preset.fade_down_time = NetworkToHost(args.fade_down_time); preset.wait_time = NetworkToHost(args.wait_time); preset.programmed = PRESET_PROGRAMMED; } return ResponderHelper::EmptySetResponse(request); } RDMResponse *AdvancedDimmerResponder::GetPresetInfo( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } PACK( struct preset_info_s { uint8_t level_supported; uint8_t preset_seq_supported; uint8_t split_times_supported; uint8_t fail_infinite_delay_supported; uint8_t fail_infinite_hold_supported; uint8_t startup_infinite_hold_supported; uint16_t max_scene_number; uint16_t min_preset_fade_time; uint16_t max_preset_fade_time; uint16_t min_preset_wait_time; uint16_t max_preset_wait_time; uint16_t min_fail_delay_time; uint16_t max_fail_delay_time; uint16_t min_fail_hold_time; uint16_t max_fail_hold_time; uint16_t min_startup_delay; uint16_t max_startup_delay; uint16_t min_startup_hold; uint16_t max_startup_hold; }); STATIC_ASSERT(sizeof(preset_info_s) == 32); uint16_t preset_count = m_presets.size(); preset_info_s preset_info = { 1, // level_supported 1, // preset_seq_supported 1, // split_times_supported 1, // fail_infinite_delay_supported 1, // fail_infinite_hold_supported 1, // startup_infinite_hold_supported HostToNetwork(preset_count), 0, 0xfffe, // fade time 0, 0xfffe, // wait time HostToNetwork(MIN_FAIL_DELAY_TIME), HostToNetwork(MAX_FAIL_DELAY_TIME), // fail delay HostToNetwork(MIN_FAIL_HOLD_TIME), HostToNetwork(MAX_FAIL_HOLD_TIME), // fail hold time HostToNetwork(MIN_STARTUP_DELAY_TIME), HostToNetwork(MAX_STARTUP_DELAY_TIME), // startup delay HostToNetwork(MIN_STARTUP_HOLD_TIME), HostToNetwork(MAX_STARTUP_HOLD_TIME), // startup hold time }; return GetResponseFromData( request, reinterpret_cast(&preset_info), sizeof(preset_info), RDM_ACK); } RDMResponse *AdvancedDimmerResponder::GetPresetMergeMode( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } uint8_t output = m_preset_mergemode; return GetResponseFromData(request, &output, sizeof(output), RDM_ACK); } RDMResponse *AdvancedDimmerResponder::SetPresetMergeMode( const RDMRequest *request) { uint8_t arg; if (!ResponderHelper::ExtractUInt8(request, &arg)) { return NackWithReason(request, NR_FORMAT_ERROR); } if (arg > MERGEMODE_DMX_ONLY) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } m_preset_mergemode = static_cast(arg); return ResponderHelper::EmptySetResponse(request); } RDMResponse *AdvancedDimmerResponder::GetFailMode( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } fail_mode_s fail_mode = { HostToNetwork(m_fail_mode.scene), HostToNetwork(m_fail_mode.delay), HostToNetwork(m_fail_mode.hold_time), m_fail_mode.level }; return GetResponseFromData( request, reinterpret_cast(&fail_mode), sizeof(fail_mode), RDM_ACK); } RDMResponse *AdvancedDimmerResponder::SetFailMode( const RDMRequest *request) { fail_mode_s args; if (request->ParamDataSize() != sizeof(args)) { return NackWithReason(request, NR_FORMAT_ERROR); } memcpy(reinterpret_cast(&args), request->ParamData(), sizeof(args)); uint16_t scene = NetworkToHost(args.scene); if (scene >= m_presets.size()) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } m_fail_mode.scene = NetworkToHost(args.scene); uint16_t delay = NetworkToHost(args.delay); if (delay == INFINITE_TIME) { m_fail_mode.delay = INFINITE_TIME; } else { m_fail_mode.delay = max(MIN_FAIL_DELAY_TIME, min(MAX_FAIL_DELAY_TIME, delay)); } uint16_t hold = NetworkToHost(args.hold_time); if (hold == INFINITE_TIME) { m_fail_mode.hold_time = INFINITE_TIME; } else { m_fail_mode.hold_time = max(MIN_FAIL_HOLD_TIME, min(MAX_FAIL_HOLD_TIME, hold)); } m_fail_mode.level = args.level; return ResponderHelper::EmptySetResponse(request); } RDMResponse *AdvancedDimmerResponder::GetStartUpMode( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } startup_mode_s startup_mode = { HostToNetwork(m_startup_mode.scene), HostToNetwork(m_startup_mode.delay), HostToNetwork(m_startup_mode.hold_time), m_startup_mode.level }; return GetResponseFromData( request, reinterpret_cast(&startup_mode), sizeof(startup_mode), RDM_ACK); } RDMResponse *AdvancedDimmerResponder::SetStartUpMode( const RDMRequest *request) { startup_mode_s args; if (request->ParamDataSize() != sizeof(args)) { return NackWithReason(request, NR_FORMAT_ERROR); } memcpy(reinterpret_cast(&args), request->ParamData(), sizeof(args)); uint16_t scene = NetworkToHost(args.scene); if (scene >= m_presets.size()) { return NackWithReason(request, NR_DATA_OUT_OF_RANGE); } m_startup_mode.scene = NetworkToHost(args.scene); uint16_t delay = NetworkToHost(args.delay); if (delay == INFINITE_TIME) { m_startup_mode.delay = INFINITE_TIME; } else { m_startup_mode.delay = max(MIN_STARTUP_DELAY_TIME, min(MAX_STARTUP_DELAY_TIME, delay)); } uint16_t hold = NetworkToHost(args.hold_time); if (hold == INFINITE_TIME) { m_startup_mode.hold_time = INFINITE_TIME; } else { m_startup_mode.hold_time = max(MIN_STARTUP_HOLD_TIME, min(MAX_STARTUP_HOLD_TIME, hold)); } m_startup_mode.level = args.level; return ResponderHelper::EmptySetResponse(request); } bool AdvancedDimmerResponder::ValueBetweenRange(const uint16_t value, const uint16_t lower, const uint16_t upper) { return value >= lower && value <= upper; } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/DiscoveryAgentTestHelper.h0000664000175000017500000002752414376533110016465 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DiscoveryAgentTestHelper.h * Helper classes for the DiscoveryAgent test. * Copyright (C) 2011 Simon Newton */ #ifndef COMMON_RDM_DISCOVERYAGENTTESTHELPER_H_ #define COMMON_RDM_DISCOVERYAGENTTESTHELPER_H_ #include #include #include #include #include "ola/Logging.h" #include "ola/rdm/UID.h" #include "ola/rdm/UIDSet.h" #include "ola/rdm/DiscoveryAgent.h" typedef std::vector ResponderList; /** * The interface for MockResponders */ class MockResponderInterface { public: virtual ~MockResponderInterface() {} virtual const ola::rdm::UID& GetUID() const = 0; virtual void UnMute() = 0; virtual bool Mute(const ola::rdm::UID &uid) = 0; virtual bool FormResponse(const ola::rdm::UID &upper, const ola::rdm::UID &lower, uint8_t *data, unsigned int *length) const = 0; enum {DISCOVERY_RESPONSE_SIZE = 24 }; }; /** * A MockResponder. */ class MockResponder: public MockResponderInterface { public: explicit MockResponder(const ola::rdm::UID &uid) : m_uid(uid), m_muted(false) { } const ola::rdm::UID& GetUID() const { return m_uid; } void UnMute() { m_muted = false; } virtual bool Mute(const ola::rdm::UID &uid) { if (m_uid == uid) { m_muted = true; return true; } return false; } bool FormResponse(const ola::rdm::UID &lower, const ola::rdm::UID &upper, uint8_t *data, unsigned int *length) const { if (!ShouldRespond(lower, upper)) return false; uint16_t manufacturer_id = m_uid.ManufacturerId(); uint32_t device_id = m_uid.DeviceId(); CPPUNIT_ASSERT(*length >= DISCOVERY_RESPONSE_SIZE); for (unsigned int i = 0; i < 7; i++) data[i] |= 0xfe; data[7] |= 0xaa; uint16_t checksum = 0; // manufacturer_id OrAndChecksum(data, 8, (manufacturer_id >> 8) | 0xaa, &checksum); OrAndChecksum(data, 9, (manufacturer_id >> 8) | 0x55, &checksum); OrAndChecksum(data, 10, manufacturer_id | 0xaa, &checksum); OrAndChecksum(data, 11, manufacturer_id | 0x55, &checksum); // device id OrAndChecksum(data, 12, (device_id >> 24) | 0xaa, &checksum); OrAndChecksum(data, 13, (device_id >> 24) | 0x55, &checksum); OrAndChecksum(data, 14, (device_id >> 16) | 0xaa, &checksum); OrAndChecksum(data, 15, (device_id >> 16) | 0x55, &checksum); OrAndChecksum(data, 16, (device_id >> 8) | 0xaa, &checksum); OrAndChecksum(data, 17, (device_id >> 8) | 0x55, &checksum); OrAndChecksum(data, 18, device_id | 0xaa, &checksum); OrAndChecksum(data, 19, device_id | 0x55, &checksum); data[20] |= (checksum >> 8) | 0xaa; data[21] |= (checksum >> 8) | 0x55; data[22] |= checksum | 0xaa; data[23] |= checksum | 0x55; *length = DISCOVERY_RESPONSE_SIZE; return true; } protected: virtual bool ShouldRespond(const ola::rdm::UID &lower, const ola::rdm::UID &upper) const { if (m_uid < lower || m_uid > upper) return false; if (m_muted) return false; return true; } ola::rdm::UID m_uid; bool m_muted; private: void OrAndChecksum(uint8_t *data, unsigned int offset, uint8_t value, uint16_t *checksum) const { data[offset] |= value; *checksum += value; } }; /** * A responder which stops responding once the manufacturer_id matches. This * simulates a responder with broken UID inequality handling. */ class BiPolarResponder: public MockResponder { public: explicit BiPolarResponder(const ola::rdm::UID &uid) : MockResponder(uid) { } protected: bool ShouldRespond(const ola::rdm::UID &lower, const ola::rdm::UID &upper) const { if (m_uid < lower || m_uid > upper) return false; if (m_muted) return false; if (m_uid.ManufacturerId() == lower.ManufacturerId() && m_uid.ManufacturerId() == upper.ManufacturerId()) return false; return true; } }; /** * A responder which doesn't honor mute. */ class ObnoxiousResponder: public MockResponder { public: explicit ObnoxiousResponder(const ola::rdm::UID &uid) : MockResponder(uid) { } protected: bool ShouldRespond(const ola::rdm::UID &lower, const ola::rdm::UID &upper) const { if (m_uid < lower || m_uid > upper) return false; return true; } }; /** * A responder which replies to DUB with extra data */ class RamblingResponder: public MockResponder { public: explicit RamblingResponder(const ola::rdm::UID &uid) : MockResponder(uid) { } bool FormResponse(const ola::rdm::UID &lower, const ola::rdm::UID &upper, uint8_t *data, unsigned int *length) const { unsigned int data_size = *length; bool ok = MockResponder::FormResponse(lower, upper, data, length); if (ok && data_size > DISCOVERY_RESPONSE_SIZE) { // add some random data and increase the packet size data[DISCOVERY_RESPONSE_SIZE] = 0x52; (*length)++; } return ok; } }; /** * A responder which replies to DUB with too little data */ class BriefResponder: public MockResponder { public: explicit BriefResponder(const ola::rdm::UID &uid) : MockResponder(uid) { } bool FormResponse(const ola::rdm::UID &lower, const ola::rdm::UID &upper, uint8_t *data, unsigned int *length) const { bool ok = MockResponder::FormResponse(lower, upper, data, length); if (ok && *length > 1) (*length)--; return ok; } }; /** * A responder that doesn't respond to a mute message. */ class NonMutingResponder: public MockResponder { public: explicit NonMutingResponder(const ola::rdm::UID &uid) : MockResponder(uid) { } bool Mute(const ola::rdm::UID&) { return false; } }; /** * A responder that only mutes after N attempts */ class FlakeyMutingResponder: public MockResponder { public: explicit FlakeyMutingResponder(const ola::rdm::UID &uid, unsigned int threshold = 2) : MockResponder(uid), m_threshold(threshold), m_attempts(0) { } bool Mute(const ola::rdm::UID &uid) { if (m_uid != uid) return false; m_attempts++; if (m_attempts > m_threshold) { m_muted = true; return true; } return false; } void Reset() { m_attempts = 0; } private: unsigned int m_threshold; unsigned int m_attempts; }; /** * A proxy responder */ class ProxyResponder: public MockResponder { public: explicit ProxyResponder(const ola::rdm::UID &uid, const ResponderList &responders) : MockResponder(uid), m_responders(responders) { } ~ProxyResponder() { ResponderList::const_iterator iter = m_responders.begin(); for (; iter != m_responders.end(); ++iter) delete *iter; } void UnMute() { m_muted = false; // unmute everything behind this proxy ResponderList::const_iterator iter = m_responders.begin(); for (; iter != m_responders.end(); ++iter) (*iter)->UnMute(); } bool Mute(const ola::rdm::UID &uid) { bool r = MockResponder::Mute(uid); if (m_muted) { ResponderList::const_iterator iter = m_responders.begin(); for (; iter != m_responders.end(); ++iter) r |= (*iter)->Mute(uid); } return r; } bool FormResponse(const ola::rdm::UID &lower, const ola::rdm::UID &upper, uint8_t *data, unsigned int *length) const { bool r = MockResponder::FormResponse(lower, upper, data, length); if (m_muted) { ResponderList::const_iterator iter = m_responders.begin(); for (; iter != m_responders.end(); ++iter) { if (r) break; r |= (*iter)->FormResponse(lower, upper, data, length); } } return r; } private: ResponderList m_responders; }; /** * A class which implements the DiscoveryTargetInterface */ class MockDiscoveryTarget: public ola::rdm::DiscoveryTargetInterface { public: explicit MockDiscoveryTarget(const ResponderList &responders) : m_responders(responders), m_unmute_calls(0) { } ~MockDiscoveryTarget() { ResponderList::const_iterator iter = m_responders.begin(); for (; iter != m_responders.end(); ++iter) delete *iter; } void ResetCounters() { m_unmute_calls = 0; } unsigned int UnmuteCallCount() const { return m_unmute_calls; } // Mute a device void MuteDevice(const ola::rdm::UID &target, MuteDeviceCallback *mute_complete) { ResponderList::const_iterator iter = m_responders.begin(); for (; iter != m_responders.end(); ++iter) { if ((*iter)->Mute(target)) { mute_complete->Run(true); return; } } // if we made it this far the responder has gone mute_complete->Run(false); } // Un Mute all devices void UnMuteAll(UnMuteDeviceCallback *unmute_complete) { ResponderList::const_iterator iter = m_responders.begin(); for (; iter != m_responders.end(); ++iter) { (*iter)->UnMute(); } m_unmute_calls++; unmute_complete->Run(); } // Send a branch request void Branch(const ola::rdm::UID &lower, const ola::rdm::UID &upper, BranchCallback *callback) { // alloc twice the amount we need unsigned int data_size = 2 * MockResponder::DISCOVERY_RESPONSE_SIZE; uint8_t data[data_size]; memset(data, 0, data_size); bool valid = false; unsigned int actual_size = 0; ResponderList::const_iterator iter = m_responders.begin(); for (; iter != m_responders.end(); ++iter) { unsigned int data_used = data_size; if ((*iter)->FormResponse(lower, upper, data, &data_used)) { actual_size = std::max(data_used, actual_size); valid = true; } } if (valid) callback->Run(data, actual_size); else callback->Run(NULL, 0); } // Add a responder to the list of responders void AddResponder(MockResponderInterface *responder) { m_responders.push_back(responder); } // Remove a responder from the list void RemoveResponder(const ola::rdm::UID &uid) { ResponderList::iterator iter = m_responders.begin(); for (; iter != m_responders.end(); ++iter) { if ((*iter)->GetUID() == uid) { delete *iter; m_responders.erase(iter); break; } } } private: ResponderList m_responders; unsigned int m_unmute_calls; }; #endif // COMMON_RDM_DISCOVERYAGENTTESTHELPER_H_ ola-0.10.9/common/rdm/ResponderSlotData.cpp0000664000175000017500000000710214376533110015455 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ResponderSlotData.cpp * Manages slot data for a personality for a RDM responder. * Copyright (C) 2013 Peter Newman */ #ifndef COMMON_RDM_RESPONDERSLOTDATA_H_ #define COMMON_RDM_RESPONDERSLOTDATA_H_ #include #include "ola/Logging.h" #include "ola/rdm/ResponderSlotData.h" namespace ola { namespace rdm { using std::string; SlotData SlotData::PrimarySlot(rdm_slot_definition slot_definition, uint8_t default_slot_value) { if (slot_definition == SD_UNDEFINED) { OLA_WARN << "Undefined slot definition and no slot description!"; } return SlotData(ST_PRIMARY, slot_definition, default_slot_value); } SlotData SlotData::PrimarySlot(rdm_slot_definition slot_definition, uint8_t default_slot_value, const string &description) { if (slot_definition == SD_UNDEFINED && description.empty()) { OLA_WARN << "Undefined slot definition and no slot description!"; } return SlotData(ST_PRIMARY, slot_definition, default_slot_value, description); } SlotData SlotData::SecondarySlot(rdm_slot_type slot_type, uint16_t primary_slot, uint8_t default_slot_value) { if (slot_type == ST_PRIMARY) { OLA_WARN << "Secondary slot created with slot_type == ST_PRIMARY"; } return SlotData(slot_type, primary_slot, default_slot_value); } SlotData SlotData::SecondarySlot(rdm_slot_type slot_type, uint16_t primary_slot, uint8_t default_slot_value, const string &description) { if (slot_type == ST_PRIMARY) { OLA_WARN << "Secondary slot created with slot_type == ST_PRIMARY: " << description; } return SlotData(slot_type, primary_slot, default_slot_value, description); } SlotData::SlotData(rdm_slot_type slot_type, uint16_t slot_id, uint8_t default_slot_value) : m_slot_type(slot_type), m_slot_id(slot_id), m_default_slot_value(default_slot_value), m_has_description(false) { } SlotData::SlotData(rdm_slot_type slot_type, uint16_t slot_id, uint8_t default_slot_value, const string &description) : m_slot_type(slot_type), m_slot_id(slot_id), m_default_slot_value(default_slot_value), m_has_description(true), m_description(description) { } SlotDataCollection::SlotDataCollection(const SlotDataList &slot_data) : m_slot_data(slot_data) { } uint16_t SlotDataCollection::SlotCount() const { return m_slot_data.size(); } const SlotData *SlotDataCollection::Lookup(uint16_t slot) const { if (slot >= m_slot_data.size()) return NULL; return &m_slot_data[slot]; } } // namespace rdm } // namespace ola #endif // COMMON_RDM_RESPONDERSLOTDATA_H_ ola-0.10.9/common/rdm/RDMHelper.cpp0000664000175000017500000010232714376533110013647 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMHelper.cpp * Various misc RDM functions. * Copyright (C) 2010 Simon Newton * * At some point we may want to localize this file. */ #include #include #include #include "ola/rdm/RDMHelper.h" #include "ola/StringUtils.h" namespace ola { namespace rdm { using std::ostringstream; using std::string; using std::vector; /** * Convert a RDMStatusCode to a string */ string StatusCodeToString(RDMStatusCode status) { switch (status) { case RDM_COMPLETED_OK: return "Completed Ok"; case RDM_WAS_BROADCAST: return "Request was broadcast"; case RDM_FAILED_TO_SEND: return "Failed to send request"; case RDM_TIMEOUT: return "Response Timeout"; case RDM_INVALID_RESPONSE: return "Invalid Response"; case RDM_UNKNOWN_UID: return "The RDM device could not be found"; case RDM_CHECKSUM_INCORRECT: return "Incorrect checksum"; case RDM_TRANSACTION_MISMATCH: return "Transaction number mismatch"; case RDM_SUB_DEVICE_MISMATCH: return "Sub device mismatch"; case RDM_SRC_UID_MISMATCH: return "Source UID in response doesn't match"; case RDM_DEST_UID_MISMATCH: return "Destination UID in response doesn't match"; case RDM_WRONG_SUB_START_CODE: return "Incorrect sub start code"; case RDM_PACKET_TOO_SHORT: return "RDM response was smaller than the minimum size"; case RDM_PACKET_LENGTH_MISMATCH: return "The length field of packet didn't match length received"; case RDM_PARAM_LENGTH_MISMATCH: return "The parameter length exceeds the remaining packet size"; case RDM_INVALID_COMMAND_CLASS: return "The command class was not one of GET_RESPONSE or SET_RESPONSE"; case RDM_COMMAND_CLASS_MISMATCH: return "The command class didn't match the request"; case RDM_INVALID_RESPONSE_TYPE: return "The response type was not ACK, ACK_OVERFLOW, ACK_TIMER or NACK"; case RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED: return "The output plugin does not support DISCOVERY commands"; case RDM_DUB_RESPONSE: return "DUB response"; default: return "Unknown"; } } /** * Convert a uint8_t representing a data type to a human-readable string. * @param type the data type value */ string DataTypeToString(uint8_t type) { switch (type) { case DS_NOT_DEFINED: return "Not defined"; case DS_BIT_FIELD: return "Bit field"; case DS_ASCII: return "ASCII"; case DS_UNSIGNED_BYTE: return "uint8"; case DS_SIGNED_BYTE: return "int8"; case DS_UNSIGNED_WORD: return "uint16"; case DS_SIGNED_WORD: return "int16"; case DS_UNSIGNED_DWORD: return "uint32"; case DS_SIGNED_DWORD: return "int32"; default: ostringstream str; str << "Unknown, was " << static_cast(type); return str.str(); } } /** * Convert a uint8_t representing a lamp mode to a human-readable string. * @param lamp_mode the lamp mode value */ string LampModeToString(uint8_t lamp_mode) { switch (lamp_mode) { case LAMP_ON_MODE_OFF: return "Off"; case LAMP_ON_MODE_DMX: return "DMX"; case LAMP_ON_MODE_ON: return "On"; case LAMP_ON_MODE_ON_AFTER_CAL: return "On after calibration"; default: ostringstream str; str << "Unknown, was " << static_cast(lamp_mode); return str.str(); } } /** * Convert a uint8_t representing a lamp state to a human-readable string. * @param lamp_state the lamp state value */ string LampStateToString(uint8_t lamp_state) { switch (lamp_state) { case LAMP_OFF: return "Off"; case LAMP_ON: return "On"; case LAMP_STRIKE: return "Strike"; case LAMP_STANDBY: return "Standby"; case LAMP_NOT_PRESENT: return "Lamp not present"; case LAMP_ERROR: return "Error"; default: ostringstream str; str << "Unknown, was " << static_cast(lamp_state); return str.str(); } } /** * Convert a uint16_t representing a nack reason to a human-readable string. * @param reason the nack reason value */ string NackReasonToString(uint16_t reason) { switch (reason) { case NR_UNKNOWN_PID: return "Unknown PID"; case NR_FORMAT_ERROR: return "Format error"; case NR_HARDWARE_FAULT: return "Hardware fault"; case NR_PROXY_REJECT: return "Proxy reject"; case NR_WRITE_PROTECT: return "Write protect"; case NR_UNSUPPORTED_COMMAND_CLASS: return "Unsupported command class"; case NR_DATA_OUT_OF_RANGE: return "Data out of range"; case NR_BUFFER_FULL: return "Buffer full"; case NR_PACKET_SIZE_UNSUPPORTED: return "Packet size unsupported"; case NR_SUB_DEVICE_OUT_OF_RANGE: return "Sub device out of range"; case NR_PROXY_BUFFER_FULL: return "Proxy buffer full"; case NR_ACTION_NOT_SUPPORTED: return "Action not supported"; case NR_ENDPOINT_NUMBER_INVALID: return "Endpoint number invalid"; case NR_INVALID_ENDPOINT_MODE: return "Invalid endpoint mode"; case NR_UNKNOWN_UID: return "Unknown UID"; case NR_UNKNOWN_SCOPE: return "Unknown scope"; case NR_INVALID_STATIC_CONFIG_TYPE: return "Invalid static config type"; case NR_INVALID_IPV4_ADDRESS: return "Invalid IPv4 address"; case NR_INVALID_IPV6_ADDRESS: return "Invalid IPv6 address"; case NR_INVALID_PORT: return "Invalid port"; default: ostringstream str; str << "Unknown, was " << reason; return str.str(); } } /** * Convert a uint8_t representing a power state to a human-readable string. * @param power_state the power state value */ string PowerStateToString(uint8_t power_state) { switch (power_state) { case POWER_STATE_FULL_OFF: return "Full Off"; case POWER_STATE_SHUTDOWN: return "Shutdown"; case POWER_STATE_STANDBY: return "Standby"; case POWER_STATE_NORMAL: return "Normal"; default: ostringstream str; str << "Unknown, was " << static_cast(power_state); return str.str(); } } /** * Safely convert a uint8_t to a rdm_power_state */ bool UIntToPowerState(uint8_t state, rdm_power_state *power_state) { switch (state) { case POWER_STATE_FULL_OFF: *power_state = POWER_STATE_FULL_OFF; return true; case POWER_STATE_SHUTDOWN: *power_state = POWER_STATE_SHUTDOWN; return true; case POWER_STATE_STANDBY: *power_state = POWER_STATE_STANDBY; return true; case POWER_STATE_NORMAL: *power_state = POWER_STATE_NORMAL; return true; default: return false; } } /** * Convert a uint8 representing a prefix to a human-readable string. * @param prefix the prefix value */ string PrefixToString(uint8_t prefix) { switch (prefix) { case PREFIX_NONE: return ""; case PREFIX_DECI: return "Deci"; case PREFIX_CENTI: return "Centi"; case PREFIX_MILLI: return "Milli"; case PREFIX_MICRO: return "Micro"; case PREFIX_NANO: return "Nano"; case PREFIX_PICO: return "Pico"; case PREFIX_FEMTO: return "Femto"; case PREFIX_ATTO: return "Atto"; case PREFIX_ZEPTO: return "Zepto"; case PREFIX_YOCTO: return "Yocto"; case PREFIX_DECA: return "Deca"; case PREFIX_HECTO: return "Hecto"; case PREFIX_KILO: return "Kilo"; case PREFIX_MEGA: return "Mega"; case PREFIX_GIGA: return "Giga"; case PREFIX_TERA: return "Tera"; case PREFIX_PETA: return "Peta"; case PREFIX_EXA: return "Exa"; case PREFIX_ZETTA: return "Zetta"; case PREFIX_YOTTA: return "Yotta"; default: ostringstream str; str << "Unknown, was " << static_cast(prefix); return str.str(); } } /** * Convert a uint16_t representing a product category to a human-readable * string. * @param category the product category value */ string ProductCategoryToString(uint16_t category) { switch (category) { case PRODUCT_CATEGORY_NOT_DECLARED: return "Not declared"; case PRODUCT_CATEGORY_FIXTURE: return "Fixture"; case PRODUCT_CATEGORY_FIXTURE_FIXED: return "Fixed fixture"; case PRODUCT_CATEGORY_FIXTURE_MOVING_YOKE: return "Moving yoke fixture"; case PRODUCT_CATEGORY_FIXTURE_MOVING_MIRROR: return "Moving mirror fixture"; case PRODUCT_CATEGORY_FIXTURE_OTHER: return "Fixture other"; case PRODUCT_CATEGORY_FIXTURE_ACCESSORY: return "Fixture accessory"; case PRODUCT_CATEGORY_FIXTURE_ACCESSORY_COLOR: return "Fixture accessory color"; case PRODUCT_CATEGORY_FIXTURE_ACCESSORY_YOKE: return "Fixture accessory yoke"; case PRODUCT_CATEGORY_FIXTURE_ACCESSORY_MIRROR: return "Fixture accessory mirror"; case PRODUCT_CATEGORY_FIXTURE_ACCESSORY_EFFECT: return "Fixture accessory effect"; case PRODUCT_CATEGORY_FIXTURE_ACCESSORY_BEAM: return "Fixture accessory beam"; case PRODUCT_CATEGORY_FIXTURE_ACCESSORY_OTHER: return "Fixture accessory other"; case PRODUCT_CATEGORY_PROJECTOR: return "Projector"; case PRODUCT_CATEGORY_PROJECTOR_FIXED: return "Projector fixed"; case PRODUCT_CATEGORY_PROJECTOR_MOVING_YOKE: return "Projector moving yoke"; case PRODUCT_CATEGORY_PROJECTOR_MOVING_MIRROR: return "Projector moving mirror"; case PRODUCT_CATEGORY_PROJECTOR_OTHER: return "Projector other"; case PRODUCT_CATEGORY_ATMOSPHERIC: return "Atmospheric"; case PRODUCT_CATEGORY_ATMOSPHERIC_EFFECT: return "Atmospheric effect"; case PRODUCT_CATEGORY_ATMOSPHERIC_PYRO: return "Atmospheric pyro"; case PRODUCT_CATEGORY_ATMOSPHERIC_OTHER: return "Atmospheric other"; case PRODUCT_CATEGORY_DIMMER: return "Dimmer"; case PRODUCT_CATEGORY_DIMMER_AC_INCANDESCENT: return "Dimmer AC incandescent"; case PRODUCT_CATEGORY_DIMMER_AC_FLUORESCENT: return "Dimmer AC fluorescent"; case PRODUCT_CATEGORY_DIMMER_AC_COLDCATHODE: return "Dimmer AC cold cathode"; case PRODUCT_CATEGORY_DIMMER_AC_NONDIM: return "Dimmer AC no dim"; case PRODUCT_CATEGORY_DIMMER_AC_ELV: return "Dimmer AC ELV"; case PRODUCT_CATEGORY_DIMMER_AC_OTHER: return "Dimmer AC other"; case PRODUCT_CATEGORY_DIMMER_DC_LEVEL: return "Dimmer DC level"; case PRODUCT_CATEGORY_DIMMER_DC_PWM: return "Dimmer DC PWM"; case PRODUCT_CATEGORY_DIMMER_CS_LED: return "Dimmer DC LED"; case PRODUCT_CATEGORY_DIMMER_OTHER: return "Dimmer other"; case PRODUCT_CATEGORY_POWER: return "Power"; case PRODUCT_CATEGORY_POWER_CONTROL: return "Power control"; case PRODUCT_CATEGORY_POWER_SOURCE: return "Power source"; case PRODUCT_CATEGORY_POWER_OTHER: return "Power other"; case PRODUCT_CATEGORY_SCENIC: return "Scenic"; case PRODUCT_CATEGORY_SCENIC_DRIVE: return "Scenic drive"; case PRODUCT_CATEGORY_SCENIC_OTHER: return "Scenic other"; case PRODUCT_CATEGORY_DATA: return "Data"; case PRODUCT_CATEGORY_DATA_DISTRIBUTION: return "Data distribution"; case PRODUCT_CATEGORY_DATA_CONVERSION: return "Data conversion"; case PRODUCT_CATEGORY_DATA_OTHER: return "Data other"; case PRODUCT_CATEGORY_AV: return "A/V"; case PRODUCT_CATEGORY_AV_AUDIO: return "A/V audio"; case PRODUCT_CATEGORY_AV_VIDEO: return "A/V video"; case PRODUCT_CATEGORY_AV_OTHER: return "AV other"; case PRODUCT_CATEGORY_MONITOR: return "Monitor"; case PRODUCT_CATEGORY_MONITOR_ACLINEPOWER: return "AC line power monitor"; case PRODUCT_CATEGORY_MONITOR_DCPOWER: return "DC power monitor"; case PRODUCT_CATEGORY_MONITOR_ENVIRONMENTAL: return "Environmental monitor"; case PRODUCT_CATEGORY_MONITOR_OTHER: return "Other monitor"; case PRODUCT_CATEGORY_CONTROL: return "Control"; case PRODUCT_CATEGORY_CONTROL_CONTROLLER: return "Controller"; case PRODUCT_CATEGORY_CONTROL_BACKUPDEVICE: return "Backup device"; case PRODUCT_CATEGORY_CONTROL_OTHER: return "Other control"; case PRODUCT_CATEGORY_TEST: return "Test"; case PRODUCT_CATEGORY_TEST_EQUIPMENT: return "Test equipment"; case PRODUCT_CATEGORY_TEST_EQUIPMENT_OTHER: return "Test equipment other"; case PRODUCT_CATEGORY_OTHER: return "Other"; default: ostringstream str; str << "Unknown, was " << static_cast(category); return str.str(); } } /** * Convert a uint16_t representing a product detail to a human-readable string. * @param detail the product detail value. */ string ProductDetailToString(uint16_t detail) { switch (detail) { case PRODUCT_DETAIL_NOT_DECLARED: return "Not declared"; case PRODUCT_DETAIL_ARC: return "Arc Lamp"; case PRODUCT_DETAIL_METAL_HALIDE: return "Metal Halide Lamp"; case PRODUCT_DETAIL_INCANDESCENT: return "Incandescent Lamp"; case PRODUCT_DETAIL_LED: return "LED"; case PRODUCT_DETAIL_FLUORESCENT: return "Fluorescent"; case PRODUCT_DETAIL_COLDCATHODE: return "Cold Cathode"; case PRODUCT_DETAIL_ELECTROLUMINESCENT: return "Electro-luminescent"; case PRODUCT_DETAIL_LASER: return "Laser"; case PRODUCT_DETAIL_FLASHTUBE: return "Flash Tube"; case PRODUCT_DETAIL_COLORSCROLLER: return "Color Scroller"; case PRODUCT_DETAIL_COLORWHEEL: return "Color Wheel"; case PRODUCT_DETAIL_COLORCHANGE: return "Color Changer (Semaphore or other type)"; case PRODUCT_DETAIL_IRIS_DOUSER: return "Iris"; case PRODUCT_DETAIL_DIMMING_SHUTTER: return "Dimming Shuttle"; case PRODUCT_DETAIL_PROFILE_SHUTTER: return "Profile Shuttle"; case PRODUCT_DETAIL_BARNDOOR_SHUTTER: return "Barndoor Shuttle"; case PRODUCT_DETAIL_EFFECTS_DISC: return "Effects Disc"; case PRODUCT_DETAIL_GOBO_ROTATOR: return "Gobo Rotator"; case PRODUCT_DETAIL_VIDEO: return "Video"; case PRODUCT_DETAIL_SLIDE: return "Slide"; case PRODUCT_DETAIL_FILM: return "Film"; case PRODUCT_DETAIL_OILWHEEL: return "Oil Wheel"; case PRODUCT_DETAIL_LCDGATE: return "LCD Gate"; case PRODUCT_DETAIL_FOGGER_GLYCOL: return "Fogger, Glycol"; case PRODUCT_DETAIL_FOGGER_MINERALOIL: return "Fogger, Mineral Oil"; case PRODUCT_DETAIL_FOGGER_WATER: return "Fogger, Water"; case PRODUCT_DETAIL_CO2: return "Dry Ice/ Carbon Dioxide Device"; case PRODUCT_DETAIL_LN2: return "Nitrogen based"; case PRODUCT_DETAIL_BUBBLE: return "Bubble or Foam Machine"; case PRODUCT_DETAIL_FLAME_PROPANE: return "Propane Flame"; case PRODUCT_DETAIL_FLAME_OTHER: return "Other Flame"; case PRODUCT_DETAIL_OLEFACTORY_STIMULATOR: return "Scents"; case PRODUCT_DETAIL_SNOW: return "Snow Machine"; case PRODUCT_DETAIL_WATER_JET: return "Water Jet"; case PRODUCT_DETAIL_WIND: return "Wind Machine"; case PRODUCT_DETAIL_CONFETTI: return "Confetti Machine"; case PRODUCT_DETAIL_HAZARD: return "Hazard (Any form of pyrotechnic control or device.)"; case PRODUCT_DETAIL_PHASE_CONTROL: return "Phase Control"; case PRODUCT_DETAIL_REVERSE_PHASE_CONTROL: return "Phase Angle"; case PRODUCT_DETAIL_SINE: return "Sine"; case PRODUCT_DETAIL_PWM: return "PWM"; case PRODUCT_DETAIL_DC: return "DC"; case PRODUCT_DETAIL_HFBALLAST: return "HF Ballast"; case PRODUCT_DETAIL_HFHV_NEONBALLAST: return "HFHV Neon/Argon"; case PRODUCT_DETAIL_HFHV_EL: return "HFHV Electroluminscent"; case PRODUCT_DETAIL_MHR_BALLAST: return "Metal Halide Ballast"; case PRODUCT_DETAIL_BITANGLE_MODULATION: return "Bit Angle Modulation"; case PRODUCT_DETAIL_FREQUENCY_MODULATION: return "Frequency Modulation"; case PRODUCT_DETAIL_HIGHFREQUENCY_12V: return "High Frequency 12V"; case PRODUCT_DETAIL_RELAY_MECHANICAL: return "Mechanical Relay"; case PRODUCT_DETAIL_RELAY_ELECTRONIC: return "Electronic Relay"; case PRODUCT_DETAIL_SWITCH_ELECTRONIC: return "Electronic Switch"; case PRODUCT_DETAIL_CONTACTOR: return "Contactor"; case PRODUCT_DETAIL_MIRRORBALL_ROTATOR: return "Mirror Ball Rotator"; case PRODUCT_DETAIL_OTHER_ROTATOR: return "Other Rotator"; case PRODUCT_DETAIL_KABUKI_DROP: return "Kabuki Drop"; case PRODUCT_DETAIL_CURTAIN: return "Curtain"; case PRODUCT_DETAIL_LINESET: return "Line Set"; case PRODUCT_DETAIL_MOTOR_CONTROL: return "Motor Control"; case PRODUCT_DETAIL_DAMPER_CONTROL: return "Damper Control"; case PRODUCT_DETAIL_SPLITTER: return "Splitter"; case PRODUCT_DETAIL_ETHERNET_NODE: return "Ethernet Node"; case PRODUCT_DETAIL_MERGE: return "DMX512 Merger"; case PRODUCT_DETAIL_DATAPATCH: return "Data Patch"; case PRODUCT_DETAIL_WIRELESS_LINK: return "Wireless link"; case PRODUCT_DETAIL_PROTOCOL_CONVERTER: return "Protocol Converter"; case PRODUCT_DETAIL_ANALOG_DEMULTIPLEX: return "DMX512 to DC Voltage"; case PRODUCT_DETAIL_ANALOG_MULTIPLEX: return "DC Voltage to DMX512"; case PRODUCT_DETAIL_SWITCH_PANEL: return "Switch Panel"; case PRODUCT_DETAIL_ROUTER: return "Router"; case PRODUCT_DETAIL_FADER: return "Fader, Single Channel"; case PRODUCT_DETAIL_MIXER: return "Mixer, Multi Channel"; case PRODUCT_DETAIL_CHANGEOVER_MANUAL: return "Manual Changeover"; case PRODUCT_DETAIL_CHANGEOVER_AUTO: return "Auto Changeover"; case PRODUCT_DETAIL_TEST: return "Test Device"; case PRODUCT_DETAIL_GFI_RCD: return "GFI / RCD Device"; case PRODUCT_DETAIL_BATTERY: return "Battery"; case PRODUCT_DETAIL_CONTROLLABLE_BREAKER: return "Controllable Breaker"; case PRODUCT_DETAIL_OTHER: return "Other Device"; default: ostringstream str; str << "Unknown, was " << detail; return str.str(); } } /** * Convert a uint8_t representing a reset device to a human-readable string. * @param reset_device the reset device value */ string ResetDeviceToString(uint8_t reset_device) { switch (reset_device) { case RESET_WARM: return "Warm"; case RESET_COLD: return "Cold"; default: ostringstream str; str << "Unknown, was " << static_cast(reset_device); return str.str(); } } /** * Safely convert a uint8_t to a rdm_reset_device_mode */ bool UIntToResetDevice(uint8_t state, rdm_reset_device_mode *reset_device) { switch (state) { case RESET_WARM: *reset_device = RESET_WARM; return true; case RESET_COLD: *reset_device = RESET_COLD; return true; default: return false; } } /** * Convert a uint8_t representing a sensor type to a human-readable string. * @param type the sensor type value */ string SensorTypeToString(uint8_t type) { switch (type) { case SENSOR_TEMPERATURE: return "Temperature"; case SENSOR_VOLTAGE: return "Voltage"; case SENSOR_CURRENT: return "Current"; case SENSOR_FREQUENCY: return "Frequency"; case SENSOR_RESISTANCE: return "Resistance"; case SENSOR_POWER: return "Power"; case SENSOR_MASS: return "Mass"; case SENSOR_LENGTH: return "Length"; case SENSOR_AREA: return "Area"; case SENSOR_VOLUME: return "Volume"; case SENSOR_DENSITY: return "Density"; case SENSOR_VELOCITY: return "Velocity"; case SENSOR_ACCELERATION: return "Acceleration"; case SENSOR_FORCE: return "Force"; case SENSOR_ENERGY: return "Energy"; case SENSOR_PRESSURE: return "Pressure"; case SENSOR_TIME: return "Time"; case SENSOR_ANGLE: return "Angle"; case SENSOR_POSITION_X: return "Position X"; case SENSOR_POSITION_Y: return "Position Y"; case SENSOR_POSITION_Z: return "Position Z"; case SENSOR_ANGULAR_VELOCITY: return "Angular velocity"; case SENSOR_LUMINOUS_INTENSITY: return "Luminous intensity"; case SENSOR_LUMINOUS_FLUX: return "Luminous flux"; case SENSOR_ILLUMINANCE: return "Illuminance"; case SENSOR_CHROMINANCE_RED: return "Chrominance red"; case SENSOR_CHROMINANCE_GREEN: return "Chrominance green"; case SENSOR_CHROMINANCE_BLUE: return "Chrominance blue"; case SENSOR_CONTACTS: return "Contacts"; case SENSOR_MEMORY: return "Memory"; case SENSOR_ITEMS: return "Items"; case SENSOR_HUMIDITY: return "Humidity"; case SENSOR_COUNTER_16BIT: return "16 bit counter"; case SENSOR_OTHER: return "Other"; default: ostringstream str; str << "Unknown, was " << static_cast(type); return str.str(); } } /** * Convert a uint8_t representing a sensor's recording support to a * human-readable string. * @param supports_recording the sensor recording support bitmask */ string SensorSupportsRecordingToString(uint8_t supports_recording) { vector recording_support; if (supports_recording & SENSOR_RECORDED_VALUE) { recording_support.push_back("Recorded Value"); } if (supports_recording & SENSOR_RECORDED_RANGE_VALUES) { recording_support.push_back("Lowest/Highest Detected Values"); } return StringJoin(", ", recording_support); } /** * Convert a uint16_t representing a slot type to a human-readable string. * @param slot_type the type of the slot. * @param slot_label the label for the slot. */ string SlotInfoToString(uint8_t slot_type, uint16_t slot_label) { if (slot_type == ST_PRIMARY) { switch (slot_label) { case SD_INTENSITY: return "Primary, intensity"; case SD_INTENSITY_MASTER: return "Primary, intensity master"; case SD_PAN: return "Primary, pan"; case SD_TILT: return "Primary, tilt"; case SD_COLOR_WHEEL: return "Primary, color wheel"; case SD_COLOR_SUB_CYAN: return "Primary, subtractive cyan"; case SD_COLOR_SUB_YELLOW: return "Primary, subtractive yellow"; case SD_COLOR_SUB_MAGENTA: return "Primary, subtractive magenta"; case SD_COLOR_ADD_RED: return "Primary, additive red"; case SD_COLOR_ADD_GREEN: return "Primary, additive green"; case SD_COLOR_ADD_BLUE: return "Primary, additive blue"; case SD_COLOR_CORRECTION: return "Primary, color correction"; case SD_COLOR_SCROLL: return "Primary, scroll"; case SD_COLOR_SEMAPHORE: return "Primary, color semaphore"; case SD_COLOR_ADD_AMBER: return "Primary, additive amber"; case SD_COLOR_ADD_WHITE: return "Primary, additive white"; case SD_COLOR_ADD_WARM_WHITE: return "Primary, additive warm white"; case SD_COLOR_ADD_COOL_WHITE: return "Primary, additive cool white"; case SD_COLOR_SUB_UV: return "Primary, subtractive UV"; case SD_COLOR_HUE: return "Primary, hue"; case SD_COLOR_SATURATION: return "Primary, saturation"; case SD_STATIC_GOBO_WHEEL: return "Primary, static gobo wheel"; case SD_ROTO_GOBO_WHEEL: return "Primary, gobo wheel"; case SD_PRISM_WHEEL: return "Primary, prism wheel"; case SD_EFFECTS_WHEEL: return "Primary, effects wheel"; case SD_BEAM_SIZE_IRIS: return "Primary, iris size"; case SD_EDGE: return "Primary, edge"; case SD_FROST: return "Primary, frost"; case SD_STROBE: return "Primary, strobe"; case SD_ZOOM: return "Primary, zoom"; case SD_FRAMING_SHUTTER: return "Primary, framing shutter"; case SD_SHUTTER_ROTATE: return "Primary, shuttle rotate"; case SD_DOUSER: return "Primary, douser"; case SD_BARN_DOOR: return "Primary, barn door"; case SD_LAMP_CONTROL: return "Primary, lamp control"; case SD_FIXTURE_CONTROL: return "Primary, fixture control"; case SD_FIXTURE_SPEED: return "Primary, fixture speed"; case SD_MACRO: return "Primary, macro"; case SD_POWER_CONTROL: return "Primary, relay or power control"; case SD_FAN_CONTROL: return "Primary, fan control"; case SD_HEATER_CONTROL: return "Primary, heater control"; case SD_FOUNTAIN_CONTROL: return "Primary, fountain water pump control"; case SD_UNDEFINED: return "Primary, undefined"; default: ostringstream str; str << "Primary, unknown, was " << slot_label; return str.str(); } } else { ostringstream str; str << "Secondary, "; switch (slot_type) { case ST_SEC_FINE: str << "fine control for slot " << slot_label; break; case ST_SEC_TIMING: str << "timing control for slot " << slot_label; break; case ST_SEC_SPEED: str << "speed control for slot " << slot_label; break; case ST_SEC_CONTROL: str << "mode control for slot " << slot_label; break; case ST_SEC_INDEX: str << "index control for slot " << slot_label; break; case ST_SEC_ROTATION: str << "rotation speed control for slot " << slot_label; break; case ST_SEC_INDEX_ROTATE: str << "rotation index control for slot " << slot_label; break; case ST_SEC_UNDEFINED: str << "undefined for slot " << slot_label; break; default: str << "unknown, was type " << static_cast(slot_type) << ", for slot " << slot_label; } return str.str(); } } /** * Convert a uint16_t representing a status message to a human-readable string. * @param message_id the status message value * @param data1 the first data value for the message * @param data2 the second data value for the message */ string StatusMessageIdToString(uint16_t message_id, int16_t data1, int16_t data2) { ostringstream str; switch (message_id) { case STS_CAL_FAIL: str << "Slot " << data1 << " failed calibration"; break; case STS_SENS_NOT_FOUND: str << "Sensor " << data1 << " not found"; break; case STS_SENS_ALWAYS_ON: str << "Sensor " << data1 << " always on"; break; case STS_FEEDBACK_ERROR: str << "Slot " << data1 << " feedback error"; break; case STS_INDEX_ERROR: str << "Slot " << data1 << " index circuit error"; break; case STS_LAMP_DOUSED: str << "Lamp doused"; break; case STS_LAMP_STRIKE: str<< "Lamp failed to strike"; break; case STS_LAMP_ACCESS_OPEN: str << "Lamp access open"; break; case STS_LAMP_ALWAYS_ON: str << "Lamp on without command"; break; case STS_OVERTEMP: str << "Sensor " << data1 << " over temp at " << data2 << " degrees C"; break; case STS_UNDERTEMP: str << "Sensor " << data1 << " under temp at " << data2 << " degrees C"; break; case STS_SENS_OUT_RANGE: str << "Sensor " << data1 << " out of range"; break; case STS_OVERVOLTAGE_PHASE: str << "Phase " << data1 << " over voltage at " << data2 << "V"; break; case STS_UNDERVOLTAGE_PHASE: str << "Phase " << data1 << " under voltage at " << data2 << "V"; break; case STS_OVERCURRENT: str << "Phase " << data1 << " over current at " << data2 << "V"; break; case STS_UNDERCURRENT: str << "Phase " << data1 << " under current at " << data2 << "V"; break; case STS_PHASE: str << "Phase " << data1 << " is at " << data2 << " degrees"; break; case STS_PHASE_ERROR: str << "Phase " << data1 << " error"; break; case STS_AMPS: str << data1 << " Amps"; break; case STS_VOLTS: str << data1 << " Volts"; break; case STS_DIMSLOT_OCCUPIED: str << "No Dimmer"; break; case STS_BREAKER_TRIP: str << "Tripped Breaker"; break; case STS_WATTS: str << data1 << " Watts"; break; case STS_DIM_FAILURE: str << "Dimmer Failure"; break; case STS_DIM_PANIC: str << "Dimmer panic mode"; break; case STS_LOAD_FAILURE: str << "Lamp or cable failure"; break; case STS_READY: str << "Slot " << data1 << " ready"; break; case STS_NOT_READY: str << "Slot " << data1 << " not ready"; break; case STS_LOW_FLUID: str << "Slot " << data1 << " low fluid"; break; case STS_EEPROM_ERROR: str << "EEPROM error"; break; case STS_RAM_ERROR: str << "RAM error"; break; case STS_FPGA_ERROR: str << "FPGA programming error"; break; case STS_PROXY_BROADCAST_DROPPED: // This is technically against the standard, which in 10.3.2.4 says "Each // Data Value shall be a signed integer." but I'm sure it's what was // intended. The same thing is technically true with the slots too. str << "Proxy Drop: PID " << strings::ToHex(reinterpret_cast(data1)) << " at TN " << data2; break; case STS_ASC_RXOK: str << "DMX ASC " << strings::ToHex(reinterpret_cast(data1)) << " received OK"; break; case STS_ASC_DROPPED: str << "DMX ASC " << strings::ToHex(reinterpret_cast(data1)) << " now dropped"; break; case STS_DMXNSCNONE: str << "DMX NSC never received"; break; case STS_DMXNSCLOSS: str << "DMX NSC received, now dropped"; break; case STS_DMXNSCERROR: str << "DMX NSC timing or packet error"; break; case STS_DMXNSC_OK: str << "DMX NSC received OK"; break; default: str << "Unknown, was status message " << message_id << " with data value" " 1 " << data1 << " and data value 2 " << data2; break; } return str.str(); } /** * Convert a uint8_t representing a status type to a human-readable string. * @param status_type the status type value */ string StatusTypeToString(uint8_t status_type) { switch (status_type) { case STATUS_NONE: return "None"; case STATUS_GET_LAST_MESSAGE: return "Get last messages"; case STATUS_ADVISORY: return "Advisory"; case STATUS_WARNING: return "Warning"; case STATUS_ERROR: return "Error"; case STATUS_ADVISORY_CLEARED: return "Advisory cleared"; case STATUS_WARNING_CLEARED: return "Warning cleared"; case STATUS_ERROR_CLEARED: return "Error cleared"; default: ostringstream str; str << "Unknown, was " << static_cast(status_type); return str.str(); } } /** * Convert a uint8_t representing a unit to a human-readable string. * @param unit the unit value */ string UnitToString(uint8_t unit) { switch (unit) { case UNITS_NONE: return ""; case UNITS_CENTIGRADE: return "degrees C"; case UNITS_VOLTS_DC: return "Volts (DC)"; case UNITS_VOLTS_AC_PEAK: return "Volts (AC Peak)"; case UNITS_VOLTS_AC_RMS: return "Volts (AC RMS)"; case UNITS_AMPERE_DC: return "Amps (DC)"; case UNITS_AMPERE_AC_PEAK: return "Amps (AC Peak)"; case UNITS_AMPERE_AC_RMS: return "Amps (AC RMS)"; case UNITS_HERTZ: return "Hz"; case UNITS_OHM: return "ohms"; case UNITS_WATT: return "W"; case UNITS_KILOGRAM: return "kg"; case UNITS_METERS: return "m"; case UNITS_METERS_SQUARED: return "m^2"; case UNITS_METERS_CUBED: return "m^3"; case UNITS_KILOGRAMMES_PER_METER_CUBED: return "kg/m^3"; case UNITS_METERS_PER_SECOND: return "m/s"; case UNITS_METERS_PER_SECOND_SQUARED: return "m/s^2"; case UNITS_NEWTON: return "newton"; case UNITS_JOULE: return "joule"; case UNITS_PASCAL: return "pascal"; case UNITS_SECOND: return "second"; case UNITS_DEGREE: return "degree"; case UNITS_STERADIAN: return "steradian"; case UNITS_CANDELA: return "candela"; case UNITS_LUMEN: return "lumen"; case UNITS_LUX: return "lux"; case UNITS_IRE: return "ire"; case UNITS_BYTE: return "bytes"; default: ostringstream str; str << "Unknown, was " << static_cast(unit); return str.str(); } } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/MessageSerializerTest.cpp0000664000175000017500000002542114376533110016342 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MessageSerializerTest.cpp * Test fixture for the MessageSerializer classes * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include "ola/Logging.h" #include "ola/messaging/Descriptor.h" #include "ola/messaging/Message.h" #include "ola/rdm/StringMessageBuilder.h" #include "ola/rdm/MessageSerializer.h" #include "ola/testing/TestUtils.h" using ola::messaging::BoolFieldDescriptor; using ola::messaging::Descriptor; using ola::messaging::FieldDescriptor; using ola::messaging::FieldDescriptorGroup; using ola::messaging::Int16FieldDescriptor; using ola::messaging::Int32FieldDescriptor; using ola::messaging::Int8FieldDescriptor; using ola::messaging::IPV4FieldDescriptor; using ola::messaging::MACFieldDescriptor; using ola::messaging::Message; using ola::messaging::StringFieldDescriptor; using ola::messaging::UInt16FieldDescriptor; using ola::messaging::UInt32FieldDescriptor; using ola::messaging::UInt8FieldDescriptor; using ola::messaging::UIDFieldDescriptor; using ola::rdm::StringMessageBuilder; using ola::rdm::MessageSerializer; using std::auto_ptr; using std::string; using std::vector; class MessageSerializerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(MessageSerializerTest); CPPUNIT_TEST(testSimple); CPPUNIT_TEST(testString); CPPUNIT_TEST(testUID); CPPUNIT_TEST(testLittleEndian); CPPUNIT_TEST(testWithGroups); CPPUNIT_TEST(testWithNestedGroups); CPPUNIT_TEST_SUITE_END(); public: void testSimple(); void testString(); void testUID(); void testLittleEndian(); void testWithGroups(); void testWithNestedGroups(); private: const Message *BuildMessage(const Descriptor &descriptor, const vector &inputs); }; CPPUNIT_TEST_SUITE_REGISTRATION(MessageSerializerTest); /** * Build a message from a given set of inputs and return the string * representation of the message. */ const Message *MessageSerializerTest::BuildMessage( const Descriptor &descriptor, const vector &inputs) { StringMessageBuilder builder; const Message *message = builder.GetMessage(inputs, &descriptor); if (!message) OLA_WARN << "Error with field: " << builder.GetError(); return message; } /** * Check the MessageSerializer works. */ void MessageSerializerTest::testSimple() { // build the descriptor vector fields; fields.push_back(new BoolFieldDescriptor("bool1")); fields.push_back(new UInt8FieldDescriptor("uint8")); fields.push_back(new Int8FieldDescriptor("int8")); fields.push_back(new UInt16FieldDescriptor("uint16")); fields.push_back(new Int16FieldDescriptor("int16")); fields.push_back(new UInt32FieldDescriptor("uint32")); fields.push_back(new Int32FieldDescriptor("int32")); fields.push_back(new IPV4FieldDescriptor("ip")); fields.push_back(new MACFieldDescriptor("mac")); fields.push_back(new StringFieldDescriptor("string", 0, 32)); Descriptor descriptor("Test Descriptor", fields); // now setup the inputs vector inputs; inputs.push_back("true"); inputs.push_back("1"); inputs.push_back("-3"); inputs.push_back("300"); inputs.push_back("-400"); inputs.push_back("66000"); inputs.push_back("-66000"); inputs.push_back("10.0.0.1"); inputs.push_back("01:23:45:67:89:ab"); inputs.push_back("foo"); auto_ptr message(BuildMessage(descriptor, inputs)); // verify OLA_ASSERT_NOT_NULL(message.get()); MessageSerializer serializer; unsigned int packed_length; const uint8_t *data = serializer.SerializeMessage(message.get(), &packed_length); OLA_ASSERT_NOT_NULL(data); OLA_ASSERT_EQ(28u, packed_length); uint8_t expected[] = { 1, 1, 253, 1, 44, 254, 112, 0, 1, 1, 208, 255, 254, 254, 48, 10, 0, 0, 1, 1, 35, 69, 103, 137, 171, 'f', 'o', 'o'}; OLA_ASSERT_DATA_EQUALS(expected, sizeof(expected), data, packed_length); } /** * Check that strings do the right thing */ void MessageSerializerTest::testString() { vector fields; fields.push_back(new StringFieldDescriptor("string", 10, 10)); fields.push_back(new StringFieldDescriptor("string", 0, 32)); Descriptor descriptor("Test Descriptor", fields); // now setup the inputs vector inputs; inputs.push_back("foo bar"); // this is shorter than the min size inputs.push_back("long long foo bar baz"); auto_ptr message(BuildMessage(descriptor, inputs)); // verify OLA_ASSERT_NOT_NULL(message.get()); MessageSerializer serializer; unsigned int packed_length; const uint8_t *data = serializer.SerializeMessage(message.get(), &packed_length); OLA_ASSERT_NOT_NULL(data); OLA_ASSERT_EQ(31u, packed_length); uint8_t expected[] = "foo bar\0\0\0long long foo bar baz"; OLA_ASSERT_DATA_EQUALS(expected, sizeof(expected) - 1, // ignore the trailing \0 data, packed_length); } /** * Check that UIDs work. */ void MessageSerializerTest::testUID() { vector fields; fields.push_back(new UIDFieldDescriptor("Address")); Descriptor descriptor("Test Descriptor", fields); // now setup the inputs vector inputs; inputs.push_back("7a70:00000001"); auto_ptr message(BuildMessage(descriptor, inputs)); // verify OLA_ASSERT_NOT_NULL(message.get()); MessageSerializer serializer; unsigned int packed_length; const uint8_t *data = serializer.SerializeMessage(message.get(), &packed_length); OLA_ASSERT_NOT_NULL(data); OLA_ASSERT_EQ(6u, packed_length); uint8_t expected[] = {0x7a, 0x70, 0, 0, 0, 1}; OLA_ASSERT_DATA_EQUALS(expected, sizeof(expected), data, packed_length); } /** * Check the MessageSerializer works with little endian fields. */ void MessageSerializerTest::testLittleEndian() { // build the descriptor vector fields; fields.push_back(new UInt8FieldDescriptor("uint8", true)); fields.push_back(new Int8FieldDescriptor("int8", true)); fields.push_back(new UInt16FieldDescriptor("uint16", true)); fields.push_back(new Int16FieldDescriptor("int16", true)); fields.push_back(new UInt32FieldDescriptor("uint32", true)); fields.push_back(new Int32FieldDescriptor("int32", true)); Descriptor descriptor("Test Descriptor", fields); // now setup the inputs vector inputs; inputs.push_back("1"); inputs.push_back("-3"); inputs.push_back("300"); inputs.push_back("-400"); inputs.push_back("66000"); inputs.push_back("-66000"); auto_ptr message(BuildMessage(descriptor, inputs)); // verify OLA_ASSERT_NOT_NULL(message.get()); MessageSerializer serializer; unsigned int packed_length; const uint8_t *data = serializer.SerializeMessage(message.get(), &packed_length); OLA_ASSERT_NOT_NULL(data); OLA_ASSERT_EQ(14u, packed_length); uint8_t expected[] = { 1, 253, 44, 1, 112, 254, 208, 1, 1, 0, 48, 254, 254, 255}; OLA_ASSERT_DATA_EQUALS(expected, sizeof(expected), data, packed_length); } /** * Check the MessageSerializer works with variable sized groups. */ void MessageSerializerTest::testWithGroups() { // build the descriptor vector group_fields; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); vector fields; fields.push_back(new FieldDescriptorGroup("group", group_fields, 0, 3)); Descriptor descriptor("Test Descriptor", fields); // now setup the inputs vector inputs; inputs.push_back("true"); inputs.push_back("10"); auto_ptr message(BuildMessage(descriptor, inputs)); // verify OLA_ASSERT_NOT_NULL(message.get()); MessageSerializer serializer; unsigned int packed_length; const uint8_t *data = serializer.SerializeMessage(message.get(), &packed_length); OLA_ASSERT_NOT_NULL(data); OLA_ASSERT_EQ(2u, packed_length); uint8_t expected[] = {1, 10}; OLA_ASSERT_DATA_EQUALS(expected, sizeof(expected), data, packed_length); // now do multiple groups vector inputs2; inputs2.push_back("true"); inputs2.push_back("10"); inputs2.push_back("true"); inputs2.push_back("42"); inputs2.push_back("false"); inputs2.push_back("240"); auto_ptr message2(BuildMessage(descriptor, inputs2)); data = serializer.SerializeMessage(message2.get(), &packed_length); OLA_ASSERT_NOT_NULL(data); OLA_ASSERT_EQ(6u, packed_length); uint8_t expected2[] = {1, 10, 1, 42, 0, 240}; OLA_ASSERT_DATA_EQUALS(expected2, sizeof(expected2), data, packed_length); } /** * test MessageSerializer with nested fixed groups */ void MessageSerializerTest::testWithNestedGroups() { vector fields, group_fields, group_fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields2.push_back(new Int16FieldDescriptor("int16")); group_fields2.push_back(new FieldDescriptorGroup("bar", group_fields, 2, 2)); const FieldDescriptorGroup *nested_group = new FieldDescriptorGroup( "", group_fields2, 0, 4); fields.push_back(nested_group); Descriptor descriptor("Test Descriptor", fields); vector inputs; inputs.push_back("1"); inputs.push_back("true"); inputs.push_back("true"); inputs.push_back("2"); inputs.push_back("true"); inputs.push_back("false"); auto_ptr message(BuildMessage(descriptor, inputs)); OLA_ASSERT_NOT_NULL(message.get()); MessageSerializer serializer; unsigned int packed_length; const uint8_t *data = serializer.SerializeMessage(message.get(), &packed_length); OLA_ASSERT_NOT_NULL(data); OLA_ASSERT_EQ(8u, packed_length); uint8_t expected[] = {0, 1, 1, 1, 0, 2, 1, 0}; OLA_ASSERT_DATA_EQUALS(expected, sizeof(expected), data, packed_length); } ola-0.10.9/common/rdm/MessageDeserializerTest.cpp0000664000175000017500000004014314376533110016651 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MessageDeserializerTest.cpp * Test fixture for the MessageDeserializer classes * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include "ola/Logging.h" #include "ola/messaging/Descriptor.h" #include "ola/messaging/Message.h" #include "ola/messaging/MessagePrinter.h" #include "ola/rdm/MessageSerializer.h" #include "ola/rdm/MessageDeserializer.h" #include "ola/testing/TestUtils.h" using ola::messaging::BoolFieldDescriptor; using ola::messaging::IPV4FieldDescriptor; using ola::messaging::Descriptor; using ola::messaging::FieldDescriptor; using ola::messaging::FieldDescriptorGroup; using ola::messaging::Int16FieldDescriptor; using ola::messaging::Int32FieldDescriptor; using ola::messaging::Int8FieldDescriptor; using ola::messaging::IPV4FieldDescriptor; using ola::messaging::MACFieldDescriptor; using ola::messaging::Message; using ola::messaging::GenericMessagePrinter; using ola::messaging::StringFieldDescriptor; using ola::messaging::UInt16FieldDescriptor; using ola::messaging::UInt32FieldDescriptor; using ola::messaging::UInt8FieldDescriptor; using ola::messaging::UIDFieldDescriptor; using ola::rdm::MessageDeserializer; using std::auto_ptr; using std::string; using std::vector; class MessageDeserializerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(MessageDeserializerTest); CPPUNIT_TEST(testEmpty); CPPUNIT_TEST(testSimpleBigEndian); CPPUNIT_TEST(testSimpleLittleEndian); CPPUNIT_TEST(testIPV4); CPPUNIT_TEST(testMAC); CPPUNIT_TEST(testString); CPPUNIT_TEST(testUID); CPPUNIT_TEST(testWithGroups); CPPUNIT_TEST(testWithNestedFixedGroups); CPPUNIT_TEST(testWithNestedVariableGroups); CPPUNIT_TEST_SUITE_END(); public: void testEmpty(); void testSimpleBigEndian(); void testSimpleLittleEndian(); void testIPV4(); void testMAC(); void testString(); void testUID(); void testWithGroups(); void testWithNestedFixedGroups(); void testWithNestedVariableGroups(); private: MessageDeserializer m_deserializer; GenericMessagePrinter m_printer; }; CPPUNIT_TEST_SUITE_REGISTRATION(MessageDeserializerTest); /** * Check that empty messages work. */ void MessageDeserializerTest::testEmpty() { vector fields; Descriptor descriptor("Empty Descriptor", fields); auto_ptr empty_message(m_deserializer.InflateMessage( &descriptor, NULL, 0)); OLA_ASSERT_NOT_NULL(empty_message.get()); OLA_ASSERT_EQ(0u, empty_message->FieldCount()); // now and try to pass in too much data const uint8_t data[] = {0, 1, 2}; OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, sizeof(data))); } /** * Test that simple (no variable sized fields) work big endian style. */ void MessageDeserializerTest::testSimpleBigEndian() { // build the descriptor vector fields; // All multi-byte fields default to big endian fields.push_back(new BoolFieldDescriptor("bool")); fields.push_back(new UInt8FieldDescriptor("uint8")); fields.push_back(new Int8FieldDescriptor("int8")); fields.push_back(new UInt16FieldDescriptor("uint16")); fields.push_back(new Int16FieldDescriptor("int16")); fields.push_back(new UInt32FieldDescriptor("uint32")); fields.push_back(new Int32FieldDescriptor("int32")); Descriptor descriptor("Test Descriptor", fields); // now setup the data const uint8_t big_endian_data[] = { 0, 10, 246, 1, 0x2c, 0xfe, 10, 1, 2, 3, 4, 0xfe, 6, 7, 8}; // try to inflate with no data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, NULL, 0)); // now inflate with too little data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, big_endian_data, 1)); // now inflate with too much data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, big_endian_data, sizeof(big_endian_data) + 1)); // now the correct amount & verify auto_ptr message(m_deserializer.InflateMessage( &descriptor, big_endian_data, sizeof(big_endian_data))); OLA_ASSERT_NOT_NULL(message.get()); OLA_ASSERT_EQ(7u, message->FieldCount()); const string expected = ( "bool: false\nuint8: 10\nint8: -10\nuint16: 300\nint16: -502\n" "uint32: 16909060\nint32: -33159416\n"); OLA_ASSERT_EQ(expected, m_printer.AsString(message.get())); } /** * Test that simple (no variable sized fields) work little endian style. */ void MessageDeserializerTest::testSimpleLittleEndian() { // build the descriptor vector fields; fields.push_back(new BoolFieldDescriptor("bool")); fields.push_back(new UInt8FieldDescriptor("uint8")); fields.push_back(new Int8FieldDescriptor("int8")); fields.push_back(new UInt16FieldDescriptor("uint16", true)); fields.push_back(new Int16FieldDescriptor("int16", true)); fields.push_back(new UInt32FieldDescriptor("uint32", true)); fields.push_back(new Int32FieldDescriptor("int32", true)); Descriptor descriptor("Test Descriptor", fields); // now setup the data const uint8_t little_endian_data[] = { 1, 10, 246, 0x2c, 1, 10, 0xfe, 4, 3, 2, 1, 8, 7, 6, 0xfe}; // try to inflate with no data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, NULL, 0)); // now inflate with too little data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, little_endian_data, 1)); // now inflate with too much data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, little_endian_data, sizeof(little_endian_data) + 1)); // now the correct amount & verify auto_ptr message(m_deserializer.InflateMessage( &descriptor, little_endian_data, sizeof(little_endian_data))); OLA_ASSERT_NOT_NULL(message.get()); OLA_ASSERT_EQ(7u, message->FieldCount()); const string expected = ( "bool: true\nuint8: 10\nint8: -10\nuint16: 300\nint16: -502\n" "uint32: 16909060\nint32: -33159416\n"); OLA_ASSERT_EQ(expected, m_printer.AsString(message.get())); } /** * Test IPV4 inflation. */ void MessageDeserializerTest::testIPV4() { // build the descriptor vector fields; fields.push_back(new IPV4FieldDescriptor("Address")); Descriptor descriptor("Test Descriptor", fields); // now setup the data const uint8_t big_endian_data[] = {10, 0, 0, 1}; // now the correct amount & verify auto_ptr message(m_deserializer.InflateMessage( &descriptor, big_endian_data, sizeof(big_endian_data))); OLA_ASSERT_NOT_NULL(message.get()); OLA_ASSERT_EQ(1u, message->FieldCount()); const string expected = "Address: 10.0.0.1\n"; OLA_ASSERT_EQ(expected, m_printer.AsString(message.get())); } /** * Test MAC inflation. */ void MessageDeserializerTest::testMAC() { // build the descriptor vector fields; fields.push_back(new MACFieldDescriptor("Address")); Descriptor descriptor("Test Descriptor", fields); // now setup the data const uint8_t big_endian_data[] = {1, 35, 69, 103, 137, 171}; // now the correct amount & verify auto_ptr message(m_deserializer.InflateMessage( &descriptor, big_endian_data, sizeof(big_endian_data))); OLA_ASSERT_NOT_NULL(message.get()); OLA_ASSERT_EQ(1u, message->FieldCount()); const string expected = "Address: 01:23:45:67:89:ab\n"; OLA_ASSERT_EQ(expected, m_printer.AsString(message.get())); } /** * Check that strings do the right thing */ void MessageDeserializerTest::testString() { vector fields; fields.push_back(new StringFieldDescriptor("string", 10, 10)); fields.push_back(new StringFieldDescriptor("string", 0, 32)); Descriptor descriptor("Test Descriptor", fields); // now setup the data const uint8_t data[] = "0123456789this is a longer string"; // try to inflate with too little OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, 0)); OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, 9)); // try to inflat with too much data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, 43)); // now to the right amount auto_ptr message(m_deserializer.InflateMessage( &descriptor, data, sizeof(data))); OLA_ASSERT_NOT_NULL(message.get()); OLA_ASSERT_EQ(2u, message->FieldCount()); const string expected = ( "string: 0123456789\nstring: this is a longer string\n"); OLA_ASSERT_EQ(expected, m_printer.AsString(message.get())); // now try with different sizes auto_ptr message2(m_deserializer.InflateMessage( &descriptor, data, 19)); OLA_ASSERT_NOT_NULL(message2.get()); OLA_ASSERT_EQ(2u, message2->FieldCount()); const string expected2 = ( "string: 0123456789\nstring: this is a\n"); OLA_ASSERT_EQ(expected2, m_printer.AsString(message2.get())); } /** * Test UID inflation. */ void MessageDeserializerTest::testUID() { // build the descriptor vector fields; fields.push_back(new UIDFieldDescriptor("Address")); Descriptor descriptor("Test Descriptor", fields); // now setup the data const uint8_t big_endian_data[] = {0x70, 0x7a, 0, 0, 0, 1}; // now the correct amount & verify auto_ptr message(m_deserializer.InflateMessage( &descriptor, big_endian_data, sizeof(big_endian_data))); OLA_ASSERT_NOT_NULL(message.get()); OLA_ASSERT_EQ(1u, message->FieldCount()); const string expected = "Address: 707a:00000001\n"; OLA_ASSERT_EQ(expected, m_printer.AsString(message.get())); } /* * Check the MessageSerializer works with variable sized groups. */ void MessageDeserializerTest::testWithGroups() { // build the descriptor vector group_fields; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields.push_back(new UInt8FieldDescriptor("uint8")); vector fields; fields.push_back(new FieldDescriptorGroup("group", group_fields, 0, 3)); Descriptor descriptor("Test Descriptor", fields); // now setup the inputs const uint8_t data[] = {0, 10, 1, 3, 0, 20, 1, 40}; // an empty message auto_ptr message(m_deserializer.InflateMessage( &descriptor, data, 0)); OLA_ASSERT_NOT_NULL(message.get()); OLA_ASSERT_EQ(0u, message->FieldCount()); // message with not enough data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, 1)); // a single instance of a group auto_ptr message2(m_deserializer.InflateMessage( &descriptor, data, 2)); OLA_ASSERT_NOT_NULL(message2.get()); OLA_ASSERT_EQ(1u, message2->FieldCount()); const string expected = "group {\n bool: false\n uint8: 10\n}\n"; OLA_ASSERT_EQ(expected, m_printer.AsString(message2.get())); // another message with not enough data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, 3)); // two instances of the group auto_ptr message3(m_deserializer.InflateMessage( &descriptor, data, 4)); OLA_ASSERT_NOT_NULL(message3.get()); OLA_ASSERT_EQ(2u, message3->FieldCount()); const string expected2 = ( "group {\n bool: false\n uint8: 10\n}\n" "group {\n bool: true\n uint8: 3\n}\n"); OLA_ASSERT_EQ(expected2, m_printer.AsString(message3.get())); // trhee instances of the group auto_ptr message4(m_deserializer.InflateMessage( &descriptor, data, 6)); OLA_ASSERT_NOT_NULL(message4.get()); OLA_ASSERT_EQ(3u, message4->FieldCount()); const string expected3 = ( "group {\n bool: false\n uint8: 10\n}\n" "group {\n bool: true\n uint8: 3\n}\n" "group {\n bool: false\n uint8: 20\n}\n"); OLA_ASSERT_EQ(expected3, m_printer.AsString(message4.get())); // message with too much data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, sizeof(data))); } /* * Test MessageSerializer with nested fixed groups. */ void MessageDeserializerTest::testWithNestedFixedGroups() { vector fields, group_fields, group_fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields2.push_back(new UInt8FieldDescriptor("uint8")); group_fields2.push_back(new FieldDescriptorGroup("bar", group_fields, 2, 2)); fields.push_back(new FieldDescriptorGroup("", group_fields2, 0, 4)); Descriptor descriptor("Test Descriptor", fields); // now setup the inputs const uint8_t data[] = {0, 0, 0, 1, 0, 1, 2, 1, 0, 3, 1, 1}; // an empty message auto_ptr message(m_deserializer.InflateMessage( &descriptor, data, 0)); OLA_ASSERT_NOT_NULL(message.get()); OLA_ASSERT_EQ(0u, message->FieldCount()); // message with not enough data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, 1)); OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, 2)); // a single instance of a group auto_ptr message2(m_deserializer.InflateMessage( &descriptor, data, 3)); OLA_ASSERT_NOT_NULL(message2.get()); OLA_ASSERT_EQ(1u, message2->FieldCount()); const string expected = ( " {\n uint8: 0\n bar {\n bool: false\n }\n bar {\n" " bool: false\n }\n}\n"); OLA_ASSERT_EQ(expected, m_printer.AsString(message2.get())); // four instances auto_ptr message3(m_deserializer.InflateMessage( &descriptor, data, sizeof(data))); OLA_ASSERT_NOT_NULL(message3.get()); OLA_ASSERT_EQ(4u, message3->FieldCount()); const string expected2 = ( " {\n uint8: 0\n bar {\n bool: false\n }\n bar {\n" " bool: false\n }\n}\n" " {\n uint8: 1\n bar {\n bool: false\n }\n bar {\n" " bool: true\n }\n}\n" " {\n uint8: 2\n bar {\n bool: true\n }\n bar {\n" " bool: false\n }\n}\n" " {\n uint8: 3\n bar {\n bool: true\n }\n bar {\n" " bool: true\n }\n}\n"); OLA_ASSERT_EQ(expected2, m_printer.AsString(message3.get())); // too much data OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, sizeof(data) + 1)); } /* * Test MessageSerializer with nested variable groups, this should never * extract. */ void MessageDeserializerTest::testWithNestedVariableGroups() { vector fields, group_fields, group_fields2; group_fields.push_back(new BoolFieldDescriptor("bool")); group_fields2.push_back(new Int16FieldDescriptor("uint16")); group_fields2.push_back(new FieldDescriptorGroup("bar", group_fields, 0, 2)); fields.push_back(new FieldDescriptorGroup("", group_fields2, 0, 4)); Descriptor descriptor("Test Descriptor", fields); // an empty message would be valid. OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, NULL, 0)); const uint8_t data[] = {0, 1, 0, 1}; // none of these are valid OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, 1)); OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, 2)); OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, 3)); OLA_ASSERT_NULL(m_deserializer.InflateMessage( &descriptor, data, 4)); } ola-0.10.9/common/rdm/OpenLightingEnums.cpp0000664000175000017500000000173214376533110015462 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * OpenLightingEnums.cpp * Copyright (C) 2013 Peter Newman */ #include "ola/rdm/OpenLightingEnums.h" namespace ola { namespace rdm { const char OLA_MANUFACTURER_LABEL[] = "Open Lighting Project"; } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/PidStoreLoader.cpp0000664000175000017500000004330714376533110014747 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PidStoreLoader.cpp * The PidStoreLoader and helper code. * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include #include #include #include "common/rdm/DescriptorConsistencyChecker.h" #include "common/rdm/PidStoreLoader.h" #include "common/rdm/Pids.pb.h" #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/file/Util.h" #include "ola/rdm/PidStore.h" #include "ola/rdm/RDMEnums.h" #include "ola/stl/STLUtils.h" #include "ola/strings/Format.h" namespace ola { namespace rdm { using ola::messaging::Descriptor; using ola::messaging::FieldDescriptor; using std::auto_ptr; using std::map; using std::ostringstream; using std::set; using std::string; using std::vector; const char PidStoreLoader::OVERRIDE_FILE_NAME[] = "overrides.proto"; const uint16_t PidStoreLoader::ESTA_MANUFACTURER_ID = 0; const uint16_t PidStoreLoader::MANUFACTURER_PID_MIN = 0x8000; const uint16_t PidStoreLoader::MANUFACTURER_PID_MAX = 0xffe0; const RootPidStore *PidStoreLoader::LoadFromFile(const string &file, bool validate) { std::ifstream proto_file(file.data()); if (!proto_file.is_open()) { OLA_WARN << "Missing " << file << ": " << strerror(errno); return NULL; } const RootPidStore *store = LoadFromStream(&proto_file, validate); proto_file.close(); return store; } const RootPidStore *PidStoreLoader::LoadFromDirectory( const string &directory, bool validate) { vector files; string override_file; vector all_files; if (!ola::file::ListDirectory(directory, &all_files)) { OLA_WARN << "Failed to list files in " << directory; return NULL; } if (all_files.empty()) { OLA_WARN << "Didn't find any files in " << directory; return NULL; } vector::const_iterator file_iter = all_files.begin(); for (; file_iter != all_files.end(); ++file_iter) { if (ola::file::FilenameFromPath(*file_iter) == OVERRIDE_FILE_NAME) { override_file = *file_iter; } else if (StringEndsWith(*file_iter, ".proto")) { files.push_back(*file_iter); } } if (files.empty() && override_file.empty()) { OLA_WARN << "Didn't find any files to load in " << directory; return NULL; } ola::rdm::pid::PidStore pid_store_pb; vector::const_iterator iter = files.begin(); for (; iter != files.end(); ++iter) { std::ifstream proto_file(iter->data()); if (!proto_file.is_open()) { OLA_WARN << "Failed to open " << *iter << ": " << strerror(errno); return NULL; } google::protobuf::io::IstreamInputStream input_stream(&proto_file); bool ok = google::protobuf::TextFormat::Merge(&input_stream, &pid_store_pb); proto_file.close(); if (!ok) { OLA_WARN << "Failed to load " << *iter; return NULL; } } ola::rdm::pid::PidStore override_pb; if (!override_file.empty()) { if (!ReadFile(override_file, &override_pb)) { return NULL; } } return BuildStore(pid_store_pb, override_pb, validate); } const RootPidStore *PidStoreLoader::LoadFromStream(std::istream *data, bool validate) { ola::rdm::pid::PidStore pid_store_pb; google::protobuf::io::IstreamInputStream input_stream(data); bool ok = google::protobuf::TextFormat::Parse(&input_stream, &pid_store_pb); if (!ok) return NULL; ola::rdm::pid::PidStore override_pb; return BuildStore(pid_store_pb, override_pb, validate); } bool PidStoreLoader::ReadFile(const std::string &file_path, ola::rdm::pid::PidStore *proto) { std::ifstream proto_file(file_path.c_str()); if (!proto_file.is_open()) { OLA_WARN << "Failed to open " << file_path << ": " << strerror(errno); return false; } google::protobuf::io::IstreamInputStream input_stream(&proto_file); bool ok = google::protobuf::TextFormat::Merge(&input_stream, proto); proto_file.close(); if (!ok) { OLA_WARN << "Failed to load " << file_path; } return ok; } /* * Build the RootPidStore from a protocol buffer. */ const RootPidStore *PidStoreLoader::BuildStore( const ola::rdm::pid::PidStore &store_pb, const ola::rdm::pid::PidStore &override_pb, bool validate) { ManufacturerMap pid_data; // Load the overrides first so they get first dibs on each PID. if (!LoadFromProto(&pid_data, override_pb, validate)) { FreeManufacturerMap(&pid_data); return NULL; } // Load the main data if (!LoadFromProto(&pid_data, store_pb, validate)) { FreeManufacturerMap(&pid_data); return NULL; } // Now we need to convert the data structure into a format that the PidStore // understands. auto_ptr esta_store; RootPidStore::ManufacturerMap manufacturer_map; ManufacturerMap::iterator iter = pid_data.begin(); for (; iter != pid_data.end(); ++iter) { // Ownership of the Descriptors is transferred to the vector vector pids; STLValues(*iter->second, &pids); delete iter->second; if (iter->first == ESTA_MANUFACTURER_ID) { esta_store.reset(new PidStore(pids)); } else { STLReplaceAndDelete(&manufacturer_map, iter->first, new PidStore(pids)); } } pid_data.clear(); OLA_DEBUG << "Load Complete"; return new RootPidStore(esta_store.release(), manufacturer_map, store_pb.version()); } /* * @brief Load the data from the PidStore proto into the ManufacturerMap. * @param[out] pid_data the ManufacturerMap to populate. * @param proto the Protobuf data. * @param validate Enables strict validation mode. * * If a collision occurs, the data in the map is not replaced. */ bool PidStoreLoader::LoadFromProto(ManufacturerMap *pid_data, const ola::rdm::pid::PidStore &proto, bool validate) { set seen_manufacturer_ids; ManufacturerMap::iterator iter = STLLookupOrInsertNew( pid_data, ESTA_MANUFACTURER_ID); if (!GetPidList(iter->second, proto, validate, true)) { return false; } for (int i = 0; i < proto.manufacturer_size(); ++i) { const ola::rdm::pid::Manufacturer &manufacturer = proto.manufacturer(i); if (STLContains(seen_manufacturer_ids, manufacturer.manufacturer_id())) { OLA_WARN << "Manufacturer id " << manufacturer.manufacturer_id() << "(" << manufacturer.manufacturer_name() << ") listed more than once in the PIDs file"; return false; } seen_manufacturer_ids.insert(manufacturer.manufacturer_id()); ManufacturerMap::iterator iter = STLLookupOrInsertNew( pid_data, manufacturer.manufacturer_id()); if (!GetPidList(iter->second, manufacturer, validate, false)) { return false; } } return true; } /* * @brief Populate a PidMap from a protobuf object that has a set of repeated * PIDs. */ template bool PidStoreLoader::GetPidList(PidMap *pid_map, const pb_object &store, bool validate, bool limit_pid_values) { set seen_pids; set seen_names; for (int i = 0; i < store.pid_size(); ++i) { const ola::rdm::pid::Pid &pid = store.pid(i); OLA_DEBUG << "Loading " << pid.name(); if (validate) { if (STLContains(seen_pids, pid.value())) { OLA_WARN << "PID " << pid.value() << " exists multiple times in the pid file"; return false; } seen_pids.insert(pid.value()); if (STLContains(seen_names, pid.name())) { OLA_WARN << "PID " << pid.name() << " exists multiple times in the pid file"; return false; } seen_names.insert(pid.name()); if (limit_pid_values && pid.value() > MANUFACTURER_PID_MIN && pid.value() < MANUFACTURER_PID_MAX) { OLA_WARN << "ESTA PID " << pid.name() << " (" << pid.value() << ")" << " is outside acceptable range"; return false; } } PidMap::iterator iter = STLLookupOrInsertNull(pid_map, pid.value()); if (iter->second) { OLA_INFO << "Using " << OVERRIDE_FILE_NAME << " for " << pid.name() << "( " << strings::ToHex(pid.value()) << ")"; continue; } const PidDescriptor *descriptor = PidToDescriptor(pid, validate); if (!descriptor) { return false; } iter->second = descriptor; } return true; } /* * Build a PidDescriptor from a Pid protobuf object */ PidDescriptor *PidStoreLoader::PidToDescriptor(const ola::rdm::pid::Pid &pid, bool validate) { // populate sub device validators PidDescriptor::sub_device_validator get_validator = PidDescriptor::ANY_SUB_DEVICE; if (pid.has_get_sub_device_range()) get_validator = ConvertSubDeviceValidator(pid.get_sub_device_range()); PidDescriptor::sub_device_validator set_validator = PidDescriptor::ANY_SUB_DEVICE; if (pid.has_set_sub_device_range()) set_validator = ConvertSubDeviceValidator(pid.set_sub_device_range()); // yuck, code smell. This should use protobuf reflections instead. const Descriptor *get_request = NULL; if (pid.has_get_request()) { get_request = FrameFormatToDescriptor(pid.get_request(), validate); if (!get_request) return NULL; } const Descriptor *get_response = NULL; if (pid.has_get_response()) { get_response = FrameFormatToDescriptor(pid.get_response(), validate); if (!get_response) { delete get_request; return NULL; } } const Descriptor *set_request = NULL; if (pid.has_set_request()) { set_request = FrameFormatToDescriptor(pid.set_request(), validate); if (!set_request) { delete get_request; delete get_response; return NULL; } } const Descriptor *set_response = NULL; if (pid.has_set_response()) { set_response = FrameFormatToDescriptor(pid.set_response(), validate); if (!set_response) { delete get_request; delete get_response; delete set_request; return NULL; } } PidDescriptor *descriptor = new PidDescriptor( pid.name(), pid.value(), get_request, get_response, set_request, set_response, get_validator, set_validator); return descriptor; } /* * Convert a protobuf frame format to a Descriptor object */ const Descriptor* PidStoreLoader::FrameFormatToDescriptor( const ola::rdm::pid::FrameFormat &format, bool validate) { bool ok = true; vector fields; for (int i = 0; i < format.field_size(); ++i) { const FieldDescriptor *field = FieldToFieldDescriptor(format.field(i)); if (!field) { ok = false; break; } fields.push_back(field); } if (!ok) { vector::iterator iter = fields.begin(); for (; iter != fields.end(); ++iter) { delete *iter; } return NULL; } // we don't give these descriptors names const Descriptor *descriptor = new Descriptor("", fields); if (validate) { if (!m_checker.CheckConsistency(descriptor)) { OLA_WARN << "Invalid frame format"; delete descriptor; return NULL; } } return descriptor; } /* * Convert a protobuf field object to a FieldDescriptor. */ const FieldDescriptor *PidStoreLoader::FieldToFieldDescriptor( const ola::rdm::pid::Field &field) { const FieldDescriptor *descriptor = NULL; switch (field.type()) { case ola::rdm::pid::BOOL: descriptor = new ola::messaging::BoolFieldDescriptor(field.name()); break; case ola::rdm::pid::UINT8: descriptor = IntegerFieldToFieldDescriptor( field); break; case ola::rdm::pid::UINT16: descriptor = IntegerFieldToFieldDescriptor( field); break; case ola::rdm::pid::UINT32: descriptor = IntegerFieldToFieldDescriptor( field); break; case ola::rdm::pid::INT8: descriptor = IntegerFieldToFieldDescriptor( field); break; case ola::rdm::pid::INT16: descriptor = IntegerFieldToFieldDescriptor( field); break; case ola::rdm::pid::INT32: descriptor = IntegerFieldToFieldDescriptor( field); break; case ola::rdm::pid::STRING: descriptor = StringFieldToFieldDescriptor(field); break; case ola::rdm::pid::GROUP: descriptor = GroupFieldToFieldDescriptor(field); break; case ola::rdm::pid::IPV4: descriptor = new ola::messaging::IPV4FieldDescriptor(field.name()); break; case ola::rdm::pid::MAC: descriptor = new ola::messaging::MACFieldDescriptor(field.name()); break; case ola::rdm::pid::UID: descriptor = new ola::messaging::UIDFieldDescriptor(field.name()); break; default: OLA_WARN << "Unknown field type: " << field.type(); } return descriptor; } /* * Convert a integer protobuf field to a FieldDescriptor. */ template const FieldDescriptor *PidStoreLoader::IntegerFieldToFieldDescriptor( const ola::rdm::pid::Field &field) { typename descriptor_class::IntervalVector intervals; typename descriptor_class::LabeledValues labels; for (int i = 0; i < field.range_size(); ++i) { const ola::rdm::pid::Range &range_value = field.range(i); typename descriptor_class::Interval interval(range_value.min(), range_value.max()); intervals.push_back(interval); } // if not intervals were specified, we automatically add all the labels bool intervals_empty = intervals.empty(); for (int i = 0; i < field.label_size(); ++i) { const ola::rdm::pid::LabeledValue &labeled_value = field.label(i); labels[labeled_value.label()] = labeled_value.value(); if (intervals_empty) { typename descriptor_class::Interval interval(labeled_value.value(), labeled_value.value()); intervals.push_back(interval); } } int8_t multiplier = 0; if (field.has_multiplier()) multiplier = field.multiplier(); return new descriptor_class( field.name(), intervals, labels, false, multiplier); } /* * Convert a string protobuf field to a FieldDescriptor. */ const FieldDescriptor *PidStoreLoader::StringFieldToFieldDescriptor( const ola::rdm::pid::Field &field) { uint8_t min = 0; if (field.has_min_size()) min = field.min_size(); if (!field.has_max_size()) { OLA_WARN << "String field failed to specify max size"; return NULL; } return new ola::messaging::StringFieldDescriptor( field.name(), min, field.max_size()); } /* * Convert a group protobuf field to a FieldDescriptor. */ const FieldDescriptor *PidStoreLoader::GroupFieldToFieldDescriptor( const ola::rdm::pid::Field &field) { vector fields; bool ok = true; uint16_t min = 0; int16_t max = ola::messaging::FieldDescriptorGroup::UNLIMITED_BLOCKS; if (field.has_min_size()) min = field.min_size(); if (field.has_max_size()) max = field.max_size(); for (int i = 0; i < field.field_size(); ++i) { const FieldDescriptor *descriptor = FieldToFieldDescriptor(field.field(i)); if (!descriptor) { ok = false; break; } fields.push_back(descriptor); } if (!ok) { vector::iterator iter = fields.begin(); for (; iter != fields.end(); ++iter) { delete *iter; } return NULL; } return new ola::messaging::FieldDescriptorGroup( field.name(), fields, min, max); } /* * Convert a protobuf sub device enum to a PidDescriptor one. */ PidDescriptor::sub_device_validator PidStoreLoader::ConvertSubDeviceValidator( const ola::rdm::pid::SubDeviceRange &sub_device_range) { switch (sub_device_range) { case ola::rdm::pid::ROOT_DEVICE: return PidDescriptor::ROOT_DEVICE; case ola::rdm::pid::ROOT_OR_ALL_SUBDEVICE: return PidDescriptor::ANY_SUB_DEVICE; case ola::rdm::pid::ROOT_OR_SUBDEVICE: return PidDescriptor::NON_BROADCAST_SUB_DEVICE; case ola::rdm::pid::ONLY_SUBDEVICES: return PidDescriptor::SPECIFIC_SUB_DEVICE; default: OLA_WARN << "Unknown sub device validator: " << sub_device_range << ", defaulting to all"; return PidDescriptor::ANY_SUB_DEVICE; } } void PidStoreLoader::FreeManufacturerMap(ManufacturerMap *data) { ManufacturerMap::iterator iter = data->begin(); for (; iter != data->end(); ++iter) { STLDeleteValues(iter->second); delete iter->second; } data->clear(); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/SensorResponder.cpp0000664000175000017500000002034514376533110015217 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SensorResponder.cpp * Copyright (C) 2013 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include "ola/base/Array.h" #include "ola/Constants.h" #include "ola/Logging.h" #include "ola/math/Random.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/OpenLightingEnums.h" #include "ola/rdm/RDMEnums.h" #include "ola/rdm/ResponderHelper.h" #include "ola/rdm/ResponderLoadSensor.h" #include "ola/rdm/ResponderSensor.h" #include "ola/rdm/SensorResponder.h" #include "ola/stl/STLUtils.h" namespace ola { namespace rdm { using ola::network::HostToNetwork; using ola::network::NetworkToHost; using std::string; using std::vector; SensorResponder::RDMOps *SensorResponder::RDMOps::instance = NULL; const ResponderOps::ParamHandler SensorResponder::PARAM_HANDLERS[] = { { PID_DEVICE_INFO, &SensorResponder::GetDeviceInfo, NULL}, { PID_PRODUCT_DETAIL_ID_LIST, &SensorResponder::GetProductDetailList, NULL}, { PID_DEVICE_MODEL_DESCRIPTION, &SensorResponder::GetDeviceModelDescription, NULL}, { PID_MANUFACTURER_LABEL, &SensorResponder::GetManufacturerLabel, NULL}, { PID_DEVICE_LABEL, &SensorResponder::GetDeviceLabel, NULL}, { PID_SOFTWARE_VERSION_LABEL, &SensorResponder::GetSoftwareVersionLabel, NULL}, { PID_SENSOR_DEFINITION, &SensorResponder::GetSensorDefinition, NULL}, { PID_SENSOR_VALUE, &SensorResponder::GetSensorValue, &SensorResponder::SetSensorValue}, { PID_RECORD_SENSORS, NULL, &SensorResponder::RecordSensor}, { PID_IDENTIFY_DEVICE, &SensorResponder::GetIdentify, &SensorResponder::SetIdentify}, { 0, NULL, NULL}, }; /** * A class which represents a sensor. */ class FakeSensor: public Sensor { public: FakeSensor(ola::rdm::rdm_sensor_type type, ola::rdm::rdm_pid_unit unit, ola::rdm::rdm_pid_prefix prefix, const string &description, const SensorOptions &options) : Sensor(type, unit, prefix, description, options) { // set high / low to something Reset(); // Force recorded back to zero m_recorded = 0; } protected: int16_t PollSensor(); }; /** * Fetch a Sensor value */ int16_t FakeSensor::PollSensor() { // This is a fake sensor, so make a value return ola::math::Random(m_range_min, m_range_max); } /** * New SensorResponder */ SensorResponder::SensorResponder(const UID &uid) : m_uid(uid), m_identify_mode(false) { Sensor::SensorOptions fake_temperature_options; fake_temperature_options.recorded_value_support = true; fake_temperature_options.recorded_range_support = true; fake_temperature_options.range_min = 0; fake_temperature_options.range_max = 100; fake_temperature_options.normal_min = 10; fake_temperature_options.normal_max = 20; m_sensors.push_back(new FakeSensor(SENSOR_TEMPERATURE, UNITS_CENTIGRADE, PREFIX_NONE, "Fake Temperature", fake_temperature_options)); Sensor::SensorOptions fake_voltage_options; fake_voltage_options.recorded_value_support = true; fake_voltage_options.recorded_range_support = true; fake_voltage_options.range_min = 110; fake_voltage_options.range_max = 140; fake_voltage_options.normal_min = 119; fake_voltage_options.normal_max = 125; m_sensors.push_back(new FakeSensor(SENSOR_VOLTAGE, UNITS_VOLTS_DC, PREFIX_DECI, "Fake Voltage", fake_voltage_options)); Sensor::SensorOptions fake_beta_particle_counter_options; fake_beta_particle_counter_options.recorded_value_support = true; fake_beta_particle_counter_options.recorded_range_support = true; fake_beta_particle_counter_options.range_min = 0; fake_beta_particle_counter_options.range_max = 100; fake_beta_particle_counter_options.normal_min = 0; fake_beta_particle_counter_options.normal_max = 1; m_sensors.push_back(new FakeSensor(SENSOR_ITEMS, UNITS_NONE, PREFIX_KILO, "Fake Beta Particle Counter", fake_beta_particle_counter_options)); #ifdef HAVE_GETLOADAVG m_sensors.push_back(new LoadSensor(ola::system::LOAD_AVERAGE_1_MIN, "Load Average 1 minute")); m_sensors.push_back(new LoadSensor(ola::system::LOAD_AVERAGE_5_MINS, "Load Average 5 minutes")); m_sensors.push_back(new LoadSensor(ola::system::LOAD_AVERAGE_15_MINS, "Load Average 15 minutes")); #endif // HAVE_GETLOADAVG } SensorResponder::~SensorResponder() { STLDeleteElements(&m_sensors); } /* * Handle an RDM Request */ void SensorResponder::SendRDMRequest(RDMRequest *request, RDMCallback *callback) { RDMOps::Instance()->HandleRDMRequest(this, m_uid, ROOT_RDM_DEVICE, request, callback); } RDMResponse *SensorResponder::GetDeviceInfo( const RDMRequest *request) { return ResponderHelper::GetDeviceInfo( request, OLA_SENSOR_ONLY_MODEL, PRODUCT_CATEGORY_TEST, 2, 0, 1, 1, ZERO_FOOTPRINT_DMX_ADDRESS, 0, m_sensors.size()); } RDMResponse *SensorResponder::GetProductDetailList( const RDMRequest *request) { // Shortcut for only one item in the vector return ResponderHelper::GetProductDetailList( request, vector(1, PRODUCT_DETAIL_TEST)); } RDMResponse *SensorResponder::GetIdentify( const RDMRequest *request) { return ResponderHelper::GetBoolValue(request, m_identify_mode); } RDMResponse *SensorResponder::SetIdentify( const RDMRequest *request) { bool old_value = m_identify_mode; RDMResponse *response = ResponderHelper::SetBoolValue( request, &m_identify_mode); if (m_identify_mode != old_value) { OLA_INFO << "Sensor Device " << m_uid << ", identify mode " << (m_identify_mode ? "on" : "off"); } return response; } RDMResponse *SensorResponder::GetDeviceModelDescription( const RDMRequest *request) { return ResponderHelper::GetString(request, "OLA Sensor Device"); } RDMResponse *SensorResponder::GetManufacturerLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, OLA_MANUFACTURER_LABEL); } RDMResponse *SensorResponder::GetDeviceLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, "Sensor Device"); } RDMResponse *SensorResponder::GetSoftwareVersionLabel( const RDMRequest *request) { return ResponderHelper::GetString(request, string("OLA Version ") + VERSION); } /** * PID_SENSOR_DEFINITION */ RDMResponse *SensorResponder::GetSensorDefinition( const RDMRequest *request) { return ResponderHelper::GetSensorDefinition(request, m_sensors); } /** * PID_SENSOR_VALUE */ RDMResponse *SensorResponder::GetSensorValue(const RDMRequest *request) { return ResponderHelper::GetSensorValue(request, m_sensors); } RDMResponse *SensorResponder::SetSensorValue(const RDMRequest *request) { return ResponderHelper::SetSensorValue(request, m_sensors); } /** * PID_RECORD_SENSORS */ RDMResponse *SensorResponder::RecordSensor(const RDMRequest *request) { return ResponderHelper::RecordSensor(request, m_sensors); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/DimmerResponder.cpp0000664000175000017500000000436314376533110015165 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * DimmerResponder.cpp * A fake dimmer responder for OLA. * Copyright (C) 2013 Simon Newton */ #include #include #include #include "ola/rdm/DimmerResponder.h" #include "ola/rdm/DimmerRootDevice.h" #include "ola/rdm/DimmerSubDevice.h" namespace ola { namespace rdm { /** * Create a new dummy dimmer responder. * @param uid the UID of the responder * @param number_of_subdevices the number of sub devices for this responder. * Valid range is 0 to 512. */ DimmerResponder::DimmerResponder(const UID &uid, uint16_t number_of_subdevices) { uint16_t sub_devices = std::min(MAX_SUBDEVICE_NUMBER, number_of_subdevices); for (uint16_t i = 1; i <= sub_devices; i++) { DimmerSubDevice *sub_device = new DimmerSubDevice(uid, i, sub_devices); STLInsertIfNotPresent(&m_sub_devices, i, sub_device); m_dispatcher.AddSubDevice(i, sub_device); } m_root_device.reset(new DimmerRootDevice(uid, m_sub_devices)); } /** * Cleanup this responder */ DimmerResponder::~DimmerResponder() { STLDeleteValues(&m_sub_devices); } /* * Handle an RDM Request. This just uses the SubDeviceDispatcher to call the * correct sub device. */ void DimmerResponder::SendRDMRequest(RDMRequest *request, RDMCallback *callback) { if (request->SubDevice() == ROOT_RDM_DEVICE) { m_root_device->SendRDMRequest(request, callback); } else { m_dispatcher.SendRDMRequest(request, callback); } } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/MessageDeserializer.cpp0000664000175000017500000001745314376533110016021 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * MessageDeserializer.cpp * Inflate a Message object from raw data. * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include #include #include #include "common/rdm/VariableFieldSizeCalculator.h" namespace ola { namespace rdm { using ola::messaging::MessageFieldInterface; using std::string; using std::vector; MessageDeserializer::MessageDeserializer() : m_data(NULL), m_length(0), m_offset(0), m_variable_field_size(0), m_insufficient_data(false) { } MessageDeserializer::~MessageDeserializer() { CleanUpVector(); } /** * @brief Deserialize a memory location and return a message */ const ola::messaging::Message *MessageDeserializer::InflateMessage( const ola::messaging::Descriptor *descriptor, const uint8_t *data, unsigned int length) { if (!data && length) { return NULL; } m_data = data; m_length = length; m_offset = 0; m_insufficient_data = false; CleanUpVector(); VariableFieldSizeCalculator calculator; VariableFieldSizeCalculator::calculator_state state = calculator.CalculateFieldSize( length, descriptor, &m_variable_field_size); switch (state) { case VariableFieldSizeCalculator::TOO_SMALL: case VariableFieldSizeCalculator::TOO_LARGE: return NULL; case VariableFieldSizeCalculator::FIXED_SIZE: case VariableFieldSizeCalculator::VARIABLE_STRING: case VariableFieldSizeCalculator::VARIABLE_GROUP: break; case VariableFieldSizeCalculator::MULTIPLE_VARIABLE_FIELDS: case VariableFieldSizeCalculator::NESTED_VARIABLE_GROUPS: case VariableFieldSizeCalculator::MISMATCHED_SIZE: return NULL; } message_vector root_messages; m_message_stack.push(root_messages); descriptor->Accept(this); // this should never trigger because we check the length in the // VariableFieldSizeCalculator if (m_insufficient_data) { return NULL; } const ola::messaging::Message *message = new ola::messaging::Message( m_message_stack.top()); m_message_stack.top().clear(); return message; } void MessageDeserializer::Visit( const ola::messaging::BoolFieldDescriptor *descriptor) { if (!CheckForData(descriptor->MaxSize())) { return; } m_message_stack.top().push_back( new ola::messaging::BoolMessageField(descriptor, m_data[m_offset++])); } void MessageDeserializer::Visit( const ola::messaging::IPV4FieldDescriptor *descriptor) { if (!CheckForData(descriptor->MaxSize())) { return; } uint32_t data; memcpy(&data, m_data + m_offset, sizeof(data)); m_offset += sizeof(data); m_message_stack.top().push_back( new ola::messaging::IPV4MessageField( descriptor, ola::network::IPV4Address(data))); } void MessageDeserializer::Visit( const ola::messaging::MACFieldDescriptor *descriptor) { if (!CheckForData(descriptor->MaxSize())) { return; } ola::network::MACAddress mac_address(m_data + m_offset); m_offset += descriptor->MaxSize(); m_message_stack.top().push_back( new ola::messaging::MACMessageField(descriptor, mac_address)); } void MessageDeserializer::Visit( const ola::messaging::UIDFieldDescriptor *descriptor) { if (!CheckForData(descriptor->MaxSize())) { return; } ola::rdm::UID uid(m_data + m_offset); m_offset += descriptor->MaxSize(); m_message_stack.top().push_back( new ola::messaging::UIDMessageField(descriptor, uid)); } void MessageDeserializer::Visit( const ola::messaging::StringFieldDescriptor *descriptor) { unsigned int string_size; if (descriptor->FixedSize()) { string_size = descriptor->MaxSize(); } else { // variable sized string, the length is in m_variable_field_size string_size = m_variable_field_size; } if (!CheckForData(string_size)) { return; } string value(reinterpret_cast(m_data + m_offset), string_size); ShortenString(&value); m_offset += string_size; m_message_stack.top().push_back( new ola::messaging::StringMessageField(descriptor, value)); } void MessageDeserializer::Visit( const ola::messaging::IntegerFieldDescriptor *descriptor) { IntVisit(descriptor); } void MessageDeserializer::Visit( const ola::messaging::IntegerFieldDescriptor *descriptor) { IntVisit(descriptor); } void MessageDeserializer::Visit( const ola::messaging::IntegerFieldDescriptor *descriptor) { IntVisit(descriptor); } void MessageDeserializer::Visit( const ola::messaging::IntegerFieldDescriptor *descriptor) { IntVisit(descriptor); } void MessageDeserializer::Visit( const ola::messaging::IntegerFieldDescriptor *descriptor) { IntVisit(descriptor); } void MessageDeserializer::Visit( const ola::messaging::IntegerFieldDescriptor *descriptor) { IntVisit(descriptor); } /** * @brief Visit a group field */ void MessageDeserializer::Visit( const ola::messaging::FieldDescriptorGroup *descriptor) { unsigned int iterations = descriptor->FixedSize() ? descriptor->MinBlocks() : m_variable_field_size; for (unsigned int i = 0; i < iterations; ++i) { vector fields; m_message_stack.push(fields); for (unsigned int j = 0; j < descriptor->FieldCount(); ++j) { descriptor->GetField(j)->Accept(this); } const vector &populated_fields = m_message_stack.top(); const ola::messaging::MessageFieldInterface *message = new ola::messaging::GroupMessageField(descriptor, populated_fields); m_message_stack.pop(); m_message_stack.top().push_back(message); } } /** * @brief Check that there is at least required_size bytes of data left. */ bool MessageDeserializer::CheckForData(unsigned int required_size) { if (required_size <= m_length - m_offset) { return true; } m_insufficient_data = true; return false; } /** * @brief Remove any old messages from the stack. */ void MessageDeserializer::CleanUpVector() { while (!m_message_stack.empty()) { const message_vector &fields = m_message_stack.top(); message_vector::const_iterator iter = fields.begin(); for (; iter != fields.end(); ++iter) { delete *iter; } m_message_stack.pop(); } } /** * @brief Deserialize an integer value, converting from little endian if needed */ template void MessageDeserializer::IntVisit( const ola::messaging::IntegerFieldDescriptor *descriptor) { if (!CheckForData(sizeof(int_type))) { return; } int_type value; memcpy(reinterpret_cast(&value), m_data + m_offset, sizeof(int_type)); m_offset += sizeof(int_type); if (descriptor->IsLittleEndian()) { value = ola::network::LittleEndianToHost(value); } else { value = ola::network::NetworkToHost(value); } m_message_stack.top().push_back( new ola::messaging::BasicMessageField(descriptor, value)); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/UID.cpp0000664000175000017500000000266114376533110012506 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * UID.cpp * The UID class. * Copyright (C) 2011 Simon Newton */ #include #include #include "ola/StringUtils.h" #include "ola/rdm/UID.h" namespace ola { namespace rdm { using std::string; using std::vector; UID* UID::FromString(const string &uid) { vector tokens; ola::StringSplit(uid, &tokens, ":"); if (tokens.size() != 2 || tokens[0].size() != 4 || tokens[1].size() != 8) { return NULL; } uint16_t esta_id; unsigned int device_id; if (!ola::HexStringToInt(tokens[0], &esta_id)) { return NULL; } if (!ola::HexStringToInt(tokens[1], &device_id)) { return NULL; } return new UID(esta_id, device_id); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/NetworkManager.cpp0000664000175000017500000000364314376533110015012 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * NetworkManager.cpp * Copyright (C) 2013 Peter Newman */ #include "common/rdm/NetworkManager.h" #include #include #include "ola/network/NetworkUtils.h" namespace ola { namespace rdm { using ola::network::Interface; using ola::network::InterfacePicker; using ola::network::IPV4Address; using std::string; using std::vector; const InterfacePicker *NetworkManager::GetInterfacePicker() const { return m_interface_picker.get(); } rdm_dhcp_status NetworkManager::GetDHCPStatus(const Interface&) const { // It's a challenge to determine DHCP state, so we always return // DHCP_STATUS_UNKNOWN. return DHCP_STATUS_UNKNOWN; } bool NetworkManager::GetIPV4DefaultRoute(int32_t *if_index, IPV4Address *default_route) const { return ola::network::DefaultRoute(if_index, default_route); } const string NetworkManager::GetHostname() const { return ola::network::Hostname(); } const string NetworkManager::GetDomainName() const { return ola::network::DomainName(); } bool NetworkManager::GetNameServers(vector *name_servers) const { return ola::network::NameServers(name_servers); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/RDMAPITest.cpp0000664000175000017500000010626114376533110013702 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMAPITest.cpp * Test fixture for the RDM API class * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include "ola/StringUtils.h" #include "ola/base/Macro.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/RDMAPI.h" #include "ola/rdm/UID.h" #include "ola/rdm/RDMAPIImplInterface.h" #include "ola/testing/TestUtils.h" using ola::NewSingleCallback; using ola::network::HostToNetwork; using ola::rdm::RDMAPI; using ola::rdm::ResponseStatus; using ola::rdm::ResponseStatus; using ola::rdm::UID; using std::deque; using std::string; using std::vector; class ExpectedResult { public: unsigned int universe; const UID uid; uint16_t sub_device; uint16_t pid; const string return_data; const uint8_t *data; unsigned int data_length; ExpectedResult(unsigned int universe, const UID &uid, uint16_t sub_device, uint16_t pid, const string &return_data, const uint8_t *data_arg = NULL, unsigned int data_length = 0): universe(universe), uid(uid), sub_device(sub_device), pid(pid), return_data(return_data), data(NULL), data_length(data_length) { if (data_arg) { uint8_t *d = new uint8_t[data_length]; memcpy(d, data_arg, data_length); data = d; } } ~ExpectedResult() { if (data) delete[] data; } }; class MockRDMAPIImpl: public ola::rdm::RDMAPIImplInterface { public: bool RDMGet(rdm_callback *callback, unsigned int universe, const UID &uid, uint16_t sub_device, uint16_t pid, const uint8_t *data = NULL, unsigned int data_length = 0) { OLA_ASSERT_TRUE(m_get_expected.size()); const ExpectedResult *result = m_get_expected.front(); OLA_ASSERT_EQ(result->universe, universe); OLA_ASSERT_EQ(result->uid, uid); OLA_ASSERT_EQ(result->sub_device, sub_device); OLA_ASSERT_EQ(result->pid, pid); (void) data; (void) data_length; ResponseStatus status; status.response_code = uid.IsBroadcast() ? ola::rdm::RDM_WAS_BROADCAST: ola::rdm::RDM_COMPLETED_OK; status.response_type = ola::rdm::RDM_ACK; status.message_count = 0; callback->Run(status, result->return_data); delete result; m_get_expected.pop_front(); return true; } bool RDMGet(rdm_pid_callback *callback, unsigned int universe, const UID &uid, uint16_t sub_device, uint16_t pid, const uint8_t *data = NULL, unsigned int data_length = 0) { OLA_ASSERT_TRUE(m_get_expected.size()); const ExpectedResult *result = m_get_expected.front(); OLA_ASSERT_EQ(result->universe, universe); OLA_ASSERT_EQ(result->uid, uid); OLA_ASSERT_EQ(result->sub_device, sub_device); OLA_ASSERT_EQ(result->pid, pid); (void) data; (void) data_length; ResponseStatus status; status.response_code = uid.IsBroadcast() ? ola::rdm::RDM_WAS_BROADCAST: ola::rdm::RDM_COMPLETED_OK; status.response_type = ola::rdm::RDM_ACK; status.message_count = 0; callback->Run(status, pid, result->return_data); delete result; m_get_expected.pop_front(); return true; } bool RDMSet(rdm_callback *callback, unsigned int universe, const UID &uid, uint16_t sub_device, uint16_t pid, const uint8_t *data = NULL, unsigned int data_length = 0) { OLA_ASSERT_TRUE(m_set_expected.size()); const ExpectedResult *result = m_set_expected.front(); OLA_ASSERT_EQ(result->universe, universe); OLA_ASSERT_EQ(result->uid, uid); OLA_ASSERT_EQ(result->sub_device, sub_device); OLA_ASSERT_EQ(result->pid, pid); if (result->data) { OLA_ASSERT_EQ(result->data_length, data_length); OLA_ASSERT_EQ(0, memcmp(result->data, data, data_length)); } ResponseStatus status; status.response_code = uid.IsBroadcast() ? ola::rdm::RDM_WAS_BROADCAST: ola::rdm::RDM_COMPLETED_OK; status.response_type = ola::rdm::RDM_ACK; status.message_count = 0; callback->Run(status, result->return_data); delete result; m_set_expected.pop_front(); return true; } void AddExpectedGet( // const ResponseStatus &status, const string &return_data, unsigned int universe, const UID &uid, uint16_t sub_device, uint16_t pid, const uint8_t *data = NULL, unsigned int data_length = 0) { ExpectedResult *expected_result = new ExpectedResult(universe, uid, sub_device, pid, return_data, data, data_length); m_get_expected.push_back(expected_result); } void AddExpectedSet(unsigned int universe, const UID &uid, uint16_t sub_device, uint16_t pid, const uint8_t *data = NULL, unsigned int data_length = 0) { string s; ExpectedResult *expected_result = new ExpectedResult(universe, uid, sub_device, pid, s, data, data_length); m_set_expected.push_back(expected_result); } void Verify() { OLA_ASSERT_FALSE(m_get_expected.size()); OLA_ASSERT_FALSE(m_set_expected.size()); } private: deque m_get_expected; deque m_set_expected; }; class RDMAPITest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RDMAPITest); CPPUNIT_TEST(testProxyCommands); CPPUNIT_TEST(testNetworkCommands); CPPUNIT_TEST(testRDMInformation); CPPUNIT_TEST(testProductInformation); CPPUNIT_TEST(testDmxSetup); CPPUNIT_TEST_SUITE_END(); public: RDMAPITest(): m_api(&m_impl), m_uid(1, 2), m_bcast_uid(UID::AllDevices()), m_group_uid(UID::VendorcastAddress(52)), m_test_uid1(4, 5), m_test_uid2(7, 9) { } void testProxyCommands(); void testNetworkCommands(); void testRDMInformation(); void testProductInformation(); void testDmxSetup(); void setUp() {} void tearDown(); private: static const unsigned int UNIVERSE = 1; static const char BROADCAST_ERROR[]; static const char DEVICE_RANGE_ERROR[]; static const char DEVICE_RANGE_BCAST_ERROR[]; static const char TEST_DESCRIPTION[]; MockRDMAPIImpl m_impl; RDMAPI m_api; UID m_uid; UID m_bcast_uid; UID m_group_uid; UID m_test_uid1; UID m_test_uid2; // check that a RDM call failed because we tried to send to the bcast UID void CheckForBroadcastError(string *error) { OLA_ASSERT_EQ(string(BROADCAST_ERROR), *error); error->clear(); } // check that a RDM call failed because we tried to send to all devices void CheckForDeviceRangeError(string *error) { OLA_ASSERT_EQ(string(DEVICE_RANGE_ERROR), *error); error->clear(); } void CheckForDeviceRangeBcastError(string *error) { OLA_ASSERT_EQ(string(DEVICE_RANGE_BCAST_ERROR), *error); error->clear(); } // check that a RDM command was successful void CheckResponseStatus(const ResponseStatus &status) { OLA_ASSERT_EQ(ola::rdm::RDM_COMPLETED_OK, status.response_code); } // check that a RDM command was successful and broadcast void CheckWasBroadcast(const ResponseStatus &status) { OLA_ASSERT_EQ(ola::rdm::RDM_WAS_BROADCAST, status.response_code); } void CheckProxiedDeviceCount(const ResponseStatus &status, uint16_t count, bool changed) { CheckResponseStatus(status); OLA_ASSERT_EQ(static_cast(2), count); OLA_ASSERT_EQ(false, changed); } void CheckProxiedDevices(const ResponseStatus &status, const vector &devices) { CheckResponseStatus(status); OLA_ASSERT_EQ(static_cast(2), devices.size()); OLA_ASSERT_EQ(m_test_uid1, devices[0]); OLA_ASSERT_EQ(m_test_uid2, devices[1]); } void CheckCommsStatus(const ResponseStatus &status, uint16_t short_message, uint16_t length_mismatch, uint16_t checksum_fail) { CheckResponseStatus(status); OLA_ASSERT_EQ(static_cast(14), short_message); OLA_ASSERT_EQ(static_cast(187), length_mismatch); OLA_ASSERT_EQ(static_cast(92), checksum_fail); } void CheckLabel(const ResponseStatus &status, const string &description) { CheckResponseStatus(status); OLA_ASSERT_EQ(string(TEST_DESCRIPTION), description); } void CheckSupportedParams(const ResponseStatus &status, const vector ¶ms) { CheckResponseStatus(status); OLA_ASSERT_EQ(static_cast(3), params.size()); // params are sorted OLA_ASSERT_EQ(static_cast(0x00aa), params[0]); OLA_ASSERT_EQ(static_cast(0x1234), params[1]); OLA_ASSERT_EQ(static_cast(0xabcd), params[2]); } void CheckParameterDescription( const ResponseStatus &status, const ola::rdm::ParameterDescriptor &description) { CheckResponseStatus(status); OLA_ASSERT_EQ(static_cast(0x1234), description.pid); OLA_ASSERT_EQ(static_cast(10), description.pdl_size); OLA_ASSERT_EQ(static_cast(ola::rdm::DS_UNSIGNED_DWORD), description.data_type); OLA_ASSERT_EQ(static_cast(ola::rdm::CC_GET), description.command_class); OLA_ASSERT_EQ(static_cast(ola::rdm::UNITS_METERS), description.unit); OLA_ASSERT_EQ(static_cast(ola::rdm::PREFIX_KILO), description.prefix); OLA_ASSERT_EQ(static_cast(0), description.min_value); OLA_ASSERT_EQ(static_cast(200000), description.max_value); OLA_ASSERT_EQ(static_cast(1000), description.default_value); OLA_ASSERT_EQ(string(TEST_DESCRIPTION).size(), description.description.size()); OLA_ASSERT_EQ(string(TEST_DESCRIPTION), description.description); } void CheckMalformedParameterDescription( const ResponseStatus &status, const ola::rdm::ParameterDescriptor &description) { OLA_ASSERT_EQ(ola::rdm::RDM_COMPLETED_OK, status.response_code); (void) description; } void CheckDeviceInfo(const ResponseStatus &status, const ola::rdm::DeviceDescriptor &descriptor) { CheckResponseStatus(status); OLA_ASSERT_EQ(static_cast(1), descriptor.protocol_version_high); OLA_ASSERT_EQ(static_cast(0), descriptor.protocol_version_low); OLA_ASSERT_EQ(static_cast(2), descriptor.device_model); OLA_ASSERT_EQ(static_cast(3), descriptor.product_category); OLA_ASSERT_EQ(static_cast(0x12345678), descriptor.software_version); OLA_ASSERT_EQ(static_cast(400), descriptor.dmx_footprint); OLA_ASSERT_EQ(static_cast(1), descriptor.current_personality); OLA_ASSERT_EQ(static_cast(2), descriptor.personality_count); OLA_ASSERT_EQ(static_cast(12), descriptor.dmx_start_address); OLA_ASSERT_EQ(static_cast(10), descriptor.sub_device_count); OLA_ASSERT_EQ(static_cast(4), descriptor.sensor_count); } void CheckProductDetailList(const ResponseStatus &status, const vector ¶ms) { CheckResponseStatus(status); OLA_ASSERT_EQ(static_cast(3), params.size()); OLA_ASSERT_EQ(static_cast(0x5678), params[0]); OLA_ASSERT_EQ(static_cast(0xfedc), params[1]); OLA_ASSERT_EQ(static_cast(0xaa00), params[2]); } void CheckDMXStartAddress(const ResponseStatus &status, uint16_t start_address) { CheckResponseStatus(status); OLA_ASSERT_EQ(static_cast(44), start_address); } }; const char RDMAPITest::BROADCAST_ERROR[] = "Cannot send to broadcast address"; const char RDMAPITest::DEVICE_RANGE_ERROR[] = "Sub device must be <= 0x0200"; const char RDMAPITest::DEVICE_RANGE_BCAST_ERROR[] = "Sub device must be <= 0x0200 or 0xffff"; const char RDMAPITest::TEST_DESCRIPTION[] = "This is a description"; void RDMAPITest::tearDown() { m_impl.Verify(); } CPPUNIT_TEST_SUITE_REGISTRATION(RDMAPITest); /* * Test the proxied commands work. */ void RDMAPITest::testProxyCommands() { string error; // get proxied device count OLA_ASSERT_FALSE(m_api.GetProxiedDeviceCount( UNIVERSE, m_bcast_uid, NewSingleCallback(this, &RDMAPITest::CheckProxiedDeviceCount), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetProxiedDeviceCount( UNIVERSE, m_group_uid, NewSingleCallback(this, &RDMAPITest::CheckProxiedDeviceCount), &error)); CheckForBroadcastError(&error); struct { uint16_t count; uint8_t changed; } count_response; count_response.count = HostToNetwork(static_cast(2)); count_response.changed = 0; string s(reinterpret_cast(&count_response), sizeof(count_response)); m_impl.AddExpectedGet(s, UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_PROXIED_DEVICE_COUNT); OLA_ASSERT_TRUE(m_api.GetProxiedDeviceCount( UNIVERSE, m_uid, NewSingleCallback(this, &RDMAPITest::CheckProxiedDeviceCount), &error)); // get proxied devices OLA_ASSERT_FALSE(m_api.GetProxiedDevices( UNIVERSE, m_bcast_uid, NewSingleCallback(this, &RDMAPITest::CheckProxiedDevices), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetProxiedDevices( UNIVERSE, m_group_uid, NewSingleCallback(this, &RDMAPITest::CheckProxiedDevices), &error)); CheckForBroadcastError(&error); struct { uint8_t uid1[UID::UID_SIZE]; uint8_t uid2[UID::UID_SIZE]; } uids_response; m_test_uid1.Pack(uids_response.uid1, UID::UID_SIZE); m_test_uid2.Pack(uids_response.uid2, UID::UID_SIZE); string s2(reinterpret_cast(&uids_response), sizeof(uids_response)); m_impl.AddExpectedGet(s2, UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_PROXIED_DEVICES); OLA_ASSERT_TRUE(m_api.GetProxiedDevices( UNIVERSE, m_uid, NewSingleCallback(this, &RDMAPITest::CheckProxiedDevices), &error)); } /* * test that network commands work */ void RDMAPITest::testNetworkCommands() { string error; // get comms status OLA_ASSERT_FALSE(m_api.GetCommStatus( UNIVERSE, m_bcast_uid, NewSingleCallback(this, &RDMAPITest::CheckCommsStatus), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetCommStatus( UNIVERSE, m_group_uid, NewSingleCallback(this, &RDMAPITest::CheckCommsStatus), &error)); CheckForBroadcastError(&error); struct { uint16_t short_message; uint16_t length_mismatch; uint16_t checksum_fail; } comms_response; comms_response.short_message = HostToNetwork(static_cast(14)); comms_response.length_mismatch = HostToNetwork(static_cast(187)); comms_response.checksum_fail = HostToNetwork(static_cast(92)); string s(reinterpret_cast(&comms_response), sizeof(comms_response)); m_impl.AddExpectedGet(s, UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_COMMS_STATUS); OLA_ASSERT_TRUE(m_api.GetCommStatus( UNIVERSE, m_uid, NewSingleCallback(this, &RDMAPITest::CheckCommsStatus), &error)); // clear comms status m_impl.AddExpectedSet(UNIVERSE, m_bcast_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_COMMS_STATUS); OLA_ASSERT_TRUE(m_api.ClearCommStatus( UNIVERSE, m_bcast_uid, NewSingleCallback(this, &RDMAPITest::CheckWasBroadcast), &error)); m_impl.AddExpectedSet(UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_COMMS_STATUS); OLA_ASSERT_TRUE(m_api.ClearCommStatus( UNIVERSE, m_uid, NewSingleCallback(this, &RDMAPITest::CheckResponseStatus), &error)); // TODO(simon): test status message here // status id description uint16_t status_id = 12; OLA_ASSERT_FALSE(m_api.GetStatusIdDescription( UNIVERSE, m_bcast_uid, status_id, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetStatusIdDescription( UNIVERSE, m_group_uid, status_id, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); m_impl.AddExpectedGet(string(TEST_DESCRIPTION), UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_STATUS_ID_DESCRIPTION); OLA_ASSERT_TRUE(m_api.GetStatusIdDescription( UNIVERSE, m_uid, status_id, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); // clear status id uint16_t sub_device = 3; m_impl.AddExpectedSet(UNIVERSE, m_bcast_uid, sub_device, ola::rdm::PID_CLEAR_STATUS_ID); OLA_ASSERT_TRUE(m_api.ClearStatusId( UNIVERSE, m_bcast_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckWasBroadcast), &error)); m_impl.AddExpectedSet(UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_CLEAR_STATUS_ID); OLA_ASSERT_TRUE(m_api.ClearStatusId( UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMAPITest::CheckResponseStatus), &error)); // TODO(simon): add sub device reporting threshold here } /* * Test RDM Information commands work correctly */ void RDMAPITest::testRDMInformation() { string error; // supported params struct { uint16_t param1; uint16_t param2; uint16_t param3; } pid_list; pid_list.param1 = HostToNetwork(static_cast(0x1234)); pid_list.param2 = HostToNetwork(static_cast(0xabcd)); pid_list.param3 = HostToNetwork(static_cast(0x00aa)); uint16_t sub_device = 1; OLA_ASSERT_FALSE(m_api.GetSupportedParameters( UNIVERSE, m_bcast_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckSupportedParams), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetSupportedParameters( UNIVERSE, m_group_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckSupportedParams), &error)); CheckForBroadcastError(&error); string s(reinterpret_cast(&pid_list), sizeof(pid_list)); m_impl.AddExpectedGet(s, UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_SUPPORTED_PARAMETERS); OLA_ASSERT_TRUE(m_api.GetSupportedParameters( UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMAPITest::CheckSupportedParams), &error)); // parameter description uint16_t pid = 16; OLA_ASSERT_FALSE(m_api.GetParameterDescription( UNIVERSE, m_bcast_uid, pid, NewSingleCallback(this, &RDMAPITest::CheckMalformedParameterDescription), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetParameterDescription( UNIVERSE, m_group_uid, pid, NewSingleCallback(this, &RDMAPITest::CheckMalformedParameterDescription), &error)); CheckForBroadcastError(&error); s = ""; m_impl.AddExpectedGet(s, UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_PARAMETER_DESCRIPTION); OLA_ASSERT_TRUE(m_api.GetParameterDescription( UNIVERSE, m_uid, pid, NewSingleCallback(this, &RDMAPITest::CheckMalformedParameterDescription), &error)); PACK( struct param_info_s { uint16_t pid; uint8_t pdl_size; uint8_t data_type; uint8_t command_class; uint8_t type; uint8_t unit; uint8_t prefix; uint32_t min_value; uint32_t max_value; uint32_t default_value; char label[32]; }); STATIC_ASSERT(sizeof(param_info_s) == 52); struct param_info_s param_info; param_info.pid = HostToNetwork(static_cast(0x1234)); param_info.pdl_size = 10; param_info.data_type = ola::rdm::DS_UNSIGNED_DWORD; param_info.command_class = ola::rdm::CC_GET; param_info.type = 0; param_info.unit = ola::rdm::UNITS_METERS; param_info.prefix = ola::rdm::PREFIX_KILO; param_info.min_value = HostToNetwork(static_cast(0)); param_info.max_value = HostToNetwork(static_cast(200000)); param_info.default_value = HostToNetwork(static_cast(1000)); strncpy(param_info.label, TEST_DESCRIPTION, sizeof(param_info.label)); string s2(reinterpret_cast(¶m_info), sizeof(param_info) - sizeof(param_info.label) + strlen(TEST_DESCRIPTION)); m_impl.AddExpectedGet(s2, UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_PARAMETER_DESCRIPTION); OLA_ASSERT_TRUE(m_api.GetParameterDescription( UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMAPITest::CheckParameterDescription), &error)); } /* * Check that the product information commands work correctly */ void RDMAPITest::testProductInformation() { string error; uint16_t sub_device = 1; // device info PACK( struct device_info_s { uint8_t version_high; uint8_t version_low; uint16_t model; uint16_t product_category; uint32_t software_version; uint16_t dmx_footprint; uint8_t current_personality; uint8_t personality_count; uint16_t dmx_start_address; uint16_t sub_device_count; uint8_t sensor_count; }); STATIC_ASSERT(sizeof(device_info_s) == 19); struct device_info_s device_info; device_info.version_high = 1; device_info.version_low = 0; device_info.model = HostToNetwork(static_cast(2)); device_info.product_category = HostToNetwork(static_cast(3)); device_info.software_version = HostToNetwork( static_cast(0x12345678)); device_info.dmx_footprint = HostToNetwork(static_cast(400)); device_info.current_personality = 1; device_info.personality_count = 2; device_info.dmx_start_address = HostToNetwork(static_cast(12)); device_info.sub_device_count = HostToNetwork(static_cast(10)); device_info.sensor_count = 4; OLA_ASSERT_FALSE(m_api.GetDeviceInfo( UNIVERSE, m_bcast_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckDeviceInfo), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetDeviceInfo( UNIVERSE, m_group_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckDeviceInfo), &error)); CheckForBroadcastError(&error); string s(reinterpret_cast(&device_info), sizeof(device_info)); m_impl.AddExpectedGet(s, UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_DEVICE_INFO); OLA_ASSERT_TRUE(m_api.GetDeviceInfo( UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMAPITest::CheckDeviceInfo), &error)); // product detail id list struct { uint16_t detail1; uint16_t detail2; uint16_t detail3; } detail_list; detail_list.detail1 = HostToNetwork(static_cast(0x5678)); detail_list.detail2 = HostToNetwork(static_cast(0xfedc)); detail_list.detail3 = HostToNetwork(static_cast(0xaa00)); OLA_ASSERT_FALSE(m_api.GetProductDetailIdList( UNIVERSE, m_bcast_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckProductDetailList), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetProductDetailIdList( UNIVERSE, m_group_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckProductDetailList), &error)); CheckForBroadcastError(&error); string s2(reinterpret_cast(&detail_list), sizeof(detail_list)); m_impl.AddExpectedGet(s2, UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_PRODUCT_DETAIL_ID_LIST); OLA_ASSERT_TRUE(m_api.GetProductDetailIdList( UNIVERSE, m_uid, ola::rdm::ROOT_RDM_DEVICE, NewSingleCallback(this, &RDMAPITest::CheckProductDetailList), &error)); // device model description OLA_ASSERT_FALSE(m_api.GetDeviceModelDescription( UNIVERSE, m_bcast_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetDeviceModelDescription( UNIVERSE, m_group_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); m_impl.AddExpectedGet(string(TEST_DESCRIPTION), UNIVERSE, m_uid, sub_device, ola::rdm::PID_DEVICE_MODEL_DESCRIPTION); OLA_ASSERT_TRUE(m_api.GetDeviceModelDescription( UNIVERSE, m_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); // manufacturer label OLA_ASSERT_FALSE(m_api.GetManufacturerLabel( UNIVERSE, m_bcast_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetManufacturerLabel( UNIVERSE, m_group_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); m_impl.AddExpectedGet(string(TEST_DESCRIPTION), UNIVERSE, m_uid, sub_device, ola::rdm::PID_MANUFACTURER_LABEL); OLA_ASSERT_TRUE(m_api.GetManufacturerLabel( UNIVERSE, m_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); // get device label OLA_ASSERT_FALSE(m_api.GetDeviceLabel( UNIVERSE, m_bcast_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetDeviceLabel( UNIVERSE, m_group_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); m_impl.AddExpectedGet(string(TEST_DESCRIPTION), UNIVERSE, m_uid, sub_device, ola::rdm::PID_DEVICE_LABEL); OLA_ASSERT_TRUE(m_api.GetDeviceLabel( UNIVERSE, m_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); // set device label s = TEST_DESCRIPTION; m_impl.AddExpectedSet(UNIVERSE, m_uid, sub_device, ola::rdm::PID_DEVICE_LABEL, reinterpret_cast(s.data()), s.size()); OLA_ASSERT_TRUE(m_api.SetDeviceLabel( UNIVERSE, m_uid, sub_device, s, NewSingleCallback(this, &RDMAPITest::CheckResponseStatus), &error)); // check we can bcast m_impl.AddExpectedSet(UNIVERSE, m_bcast_uid, ola::rdm::ALL_RDM_SUBDEVICES, ola::rdm::PID_DEVICE_LABEL, reinterpret_cast(s.data()), s.size()); OLA_ASSERT_TRUE(m_api.SetDeviceLabel( UNIVERSE, m_bcast_uid, ola::rdm::ALL_RDM_SUBDEVICES, s, NewSingleCallback(this, &RDMAPITest::CheckWasBroadcast), &error)); m_impl.AddExpectedSet(UNIVERSE, m_group_uid, ola::rdm::ALL_RDM_SUBDEVICES, ola::rdm::PID_DEVICE_LABEL, reinterpret_cast(s.data()), s.size()); OLA_ASSERT_TRUE(m_api.SetDeviceLabel( UNIVERSE, m_group_uid, ola::rdm::ALL_RDM_SUBDEVICES, s, NewSingleCallback(this, &RDMAPITest::CheckWasBroadcast), &error)); // check out of range sub devices fail OLA_ASSERT_FALSE(m_api.SetDeviceLabel( UNIVERSE, m_group_uid, 0x0201, s, NewSingleCallback(this, &RDMAPITest::CheckResponseStatus), &error)); CheckForDeviceRangeBcastError(&error); // software version label OLA_ASSERT_FALSE(m_api.GetSoftwareVersionLabel( UNIVERSE, m_bcast_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetSoftwareVersionLabel( UNIVERSE, m_group_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); m_impl.AddExpectedGet(string(TEST_DESCRIPTION), UNIVERSE, m_uid, sub_device, ola::rdm::PID_SOFTWARE_VERSION_LABEL); OLA_ASSERT_TRUE(m_api.GetSoftwareVersionLabel( UNIVERSE, m_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); // Boot software label OLA_ASSERT_FALSE(m_api.GetBootSoftwareVersionLabel( UNIVERSE, m_bcast_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetBootSoftwareVersionLabel( UNIVERSE, m_group_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); CheckForBroadcastError(&error); m_impl.AddExpectedGet(string(TEST_DESCRIPTION), UNIVERSE, m_uid, sub_device, ola::rdm::PID_BOOT_SOFTWARE_VERSION_LABEL); OLA_ASSERT_TRUE(m_api.GetBootSoftwareVersionLabel( UNIVERSE, m_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckLabel), &error)); } /* * Check that DMX commands work */ void RDMAPITest::testDmxSetup() { string error; uint16_t sub_device = 1; // Check get start address OLA_ASSERT_FALSE(m_api.GetDMXAddress( UNIVERSE, m_bcast_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckDMXStartAddress), &error)); CheckForBroadcastError(&error); OLA_ASSERT_FALSE(m_api.GetDMXAddress( UNIVERSE, m_group_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckDMXStartAddress), &error)); CheckForBroadcastError(&error); uint16_t start_address = HostToNetwork(static_cast(44)); string s(reinterpret_cast(&start_address), sizeof(start_address)); m_impl.AddExpectedGet(s, UNIVERSE, m_uid, sub_device, ola::rdm::PID_DMX_START_ADDRESS); OLA_ASSERT_TRUE(m_api.GetDMXAddress( UNIVERSE, m_uid, sub_device, NewSingleCallback(this, &RDMAPITest::CheckDMXStartAddress), &error)); // Check set start address start_address = 64; uint16_t address_data = HostToNetwork(start_address); m_impl.AddExpectedSet(UNIVERSE, m_uid, sub_device, ola::rdm::PID_DMX_START_ADDRESS, reinterpret_cast(&address_data), sizeof(address_data)); OLA_ASSERT_TRUE(m_api.SetDMXAddress( UNIVERSE, m_uid, sub_device, start_address, NewSingleCallback(this, &RDMAPITest::CheckResponseStatus), &error)); // check bcasts work m_impl.AddExpectedSet(UNIVERSE, m_bcast_uid, ola::rdm::ALL_RDM_SUBDEVICES, ola::rdm::PID_DMX_START_ADDRESS, reinterpret_cast(&address_data), sizeof(address_data)); OLA_ASSERT_TRUE(m_api.SetDMXAddress( UNIVERSE, m_bcast_uid, ola::rdm::ALL_RDM_SUBDEVICES, start_address, NewSingleCallback(this, &RDMAPITest::CheckWasBroadcast), &error)); m_impl.AddExpectedSet(UNIVERSE, m_group_uid, 0x0200, ola::rdm::PID_DMX_START_ADDRESS, reinterpret_cast(&address_data), sizeof(address_data)); OLA_ASSERT_TRUE(m_api.SetDMXAddress( UNIVERSE, m_group_uid, 0x0200, start_address, NewSingleCallback(this, &RDMAPITest::CheckWasBroadcast), &error)); OLA_ASSERT_FALSE(m_api.SetDMXAddress( UNIVERSE, m_group_uid, 0x0201, start_address, NewSingleCallback(this, &RDMAPITest::CheckWasBroadcast), &error)); CheckForDeviceRangeBcastError(&error); } ola-0.10.9/common/rdm/RDMCommandSerializerTest.cpp0000664000175000017500000003473014376533110016702 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMCommandSerializerTest.cpp * Test fixture for the RDMCommandSerializer. * Copyright (C) 2010 Simon Newton */ #include #include #include #include #include "common/rdm/TestHelper.h" #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/io/ByteString.h" #include "ola/io/IOStack.h" #include "ola/network/NetworkUtils.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/RDMCommandSerializer.h" #include "ola/rdm/RDMPacket.h" #include "ola/rdm/UID.h" #include "ola/testing/TestUtils.h" #include "ola/util/Utils.h" using ola::io::IOStack; using ola::io::ByteString; using ola::rdm::RDMCommand; using ola::rdm::RDMCommandSerializer; using ola::rdm::RDMDiscoveryRequest; using ola::rdm::RDMGetRequest; using ola::rdm::RDMRequest; using ola::rdm::RDMSetRequest; using ola::rdm::UID; using std::auto_ptr; void UpdateChecksum(uint8_t *expected, unsigned int expected_length) { unsigned int checksum = ola::rdm::START_CODE; for (unsigned int i = 0 ; i < expected_length - 2; i++) checksum += expected[i]; ola::utils::SplitUInt16(checksum, &expected[expected_length - 2], &expected[expected_length - 1]); } class RDMCommandSerializerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RDMCommandSerializerTest); CPPUNIT_TEST(testGetRequest); CPPUNIT_TEST(testRequestOverrides); CPPUNIT_TEST(testPackWithStartCode); CPPUNIT_TEST(testDUB); CPPUNIT_TEST(testMuteRequest); CPPUNIT_TEST(testUnMuteRequest); CPPUNIT_TEST(testPackAndInflate); CPPUNIT_TEST(testIOStack); CPPUNIT_TEST_SUITE_END(); public: RDMCommandSerializerTest() : m_source(1, 2), m_destination(3, 4) { } void setUp(); void testGetRequest(); void testRequestOverrides(); void testPackWithStartCode(); void testDUB(); void testMuteRequest(); void testUnMuteRequest(); void testPackAndInflate(); void testIOStack(); private: UID m_source; UID m_destination; static uint8_t EXPECTED_GET_BUFFER[]; static uint8_t EXPECTED_SET_BUFFER[]; static uint8_t EXPECTED_DISCOVERY_REQUEST[]; static uint8_t EXPECTED_MUTE_REQUEST[]; static uint8_t EXPECTED_UNMUTE_REQUEST[]; static uint8_t MUTE_RESPONSE[]; }; CPPUNIT_TEST_SUITE_REGISTRATION(RDMCommandSerializerTest); uint8_t RDMCommandSerializerTest::EXPECTED_GET_BUFFER[] = { 1, 24, // sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 0, 1, 0, 0, 10, // transaction, port id, msg count & sub device 0x20, 1, 40, 0, // command, param id, param data length 0, 0 // checksum, filled in below }; uint8_t RDMCommandSerializerTest::EXPECTED_SET_BUFFER[] = { 1, 28, // sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 0, 1, 0, 0, 10, // transaction, port id, msg count & sub device 0x30, 1, 40, 4, // command, param id, param data length 0xa5, 0xa5, 0xa5, 0xa5, // param data 0, 0 // checksum, filled in below }; uint8_t RDMCommandSerializerTest::EXPECTED_DISCOVERY_REQUEST[] = { 1, 36, // sub code & length 255, 255, 255, 255, 255, 255, // dst uid 0, 1, 0, 0, 0, 2, // src uid 1, 1, 0, 0, 0, // transaction, port id, msg count & sub device 0x10, 0, 1, 12, // command, param id, param data length 1, 2, 0, 0, 3, 4, // lower uid 5, 6, 0, 0, 7, 8, // upper uid 0, 0 // checksum, filled in below }; uint8_t RDMCommandSerializerTest::EXPECTED_MUTE_REQUEST[] = { 1, 24, // sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 1, 1, 0, 0, 0, // transaction, port id, msg count & sub device 0x10, 0, 2, 0, // command, param id, param data length 0, 0 // checksum, filled in below }; uint8_t RDMCommandSerializerTest::EXPECTED_UNMUTE_REQUEST[] = { 1, 24, // sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 1, 1, 0, 0, 0, // transaction, port id, msg count & sub device 0x10, 0, 3, 0, // command, param id, param data length 0, 0 // checksum, filled in below }; /* * Fill in the checksums */ void RDMCommandSerializerTest::setUp() { UpdateChecksum(EXPECTED_GET_BUFFER, arraysize(EXPECTED_GET_BUFFER)); UpdateChecksum(EXPECTED_SET_BUFFER, arraysize(EXPECTED_SET_BUFFER)); UpdateChecksum(EXPECTED_DISCOVERY_REQUEST, arraysize(EXPECTED_DISCOVERY_REQUEST)); UpdateChecksum(EXPECTED_MUTE_REQUEST, arraysize(EXPECTED_MUTE_REQUEST)); UpdateChecksum(EXPECTED_UNMUTE_REQUEST, arraysize(EXPECTED_UNMUTE_REQUEST)); } void RDMCommandSerializerTest::testGetRequest() { RDMGetRequest request(m_source, m_destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length unsigned int length = RDMCommandSerializer::RequiredSize(request); uint8_t *data = new uint8_t[length]; OLA_ASSERT_TRUE(RDMCommandSerializer::Pack(request, data, &length)); OLA_ASSERT_DATA_EQUALS(EXPECTED_GET_BUFFER, arraysize(EXPECTED_GET_BUFFER), data, length); ByteString output; OLA_ASSERT_TRUE(RDMCommandSerializer::Pack(request, &output)); OLA_ASSERT_DATA_EQUALS(EXPECTED_GET_BUFFER, arraysize(EXPECTED_GET_BUFFER), output.data(), output.length()); delete[] data; } void RDMCommandSerializerTest::testRequestOverrides() { RDMRequest::OverrideOptions options; options.SetMessageLength(10); options.SetChecksum(999); options.sub_start_code = 5; options.message_count = 9; RDMGetRequest request(m_source, m_destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0, // data length options); const uint8_t expected_data[] = { 5, 10, // sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 0, 1, 9, 0, 10, // transaction, port id, msg count & sub device 0x20, 1, 40, 0, // command, param id, param data length 0x3, 0xe7 // checksum, }; unsigned int length = RDMCommandSerializer::RequiredSize(request); uint8_t *data = new uint8_t[length]; OLA_ASSERT_TRUE(RDMCommandSerializer::Pack(request, data, &length)); OLA_ASSERT_DATA_EQUALS(expected_data, arraysize(expected_data), data, length); delete[] data; ByteString output; OLA_ASSERT_TRUE(RDMCommandSerializer::Pack(request, &output)); OLA_ASSERT_DATA_EQUALS(expected_data, arraysize(expected_data), output.data(), output.length()); } void RDMCommandSerializerTest::testPackWithStartCode() { RDMGetRequest request(m_source, m_destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length const uint8_t expected_data[] = { 0xcc, 1, 24, // start code, sub code & length 0, 3, 0, 0, 0, 4, // dst uid 0, 1, 0, 0, 0, 2, // src uid 0, 1, 0, 0, 10, // transaction, port id, msg count & sub device 0x20, 1, 40, 0, // command, param id, param data length 0x1, 0x43 // checksum, }; ByteString output; OLA_ASSERT_TRUE(RDMCommandSerializer::PackWithStartCode(request, &output)); OLA_ASSERT_DATA_EQUALS(expected_data, arraysize(expected_data), output.data(), output.length()); } void RDMCommandSerializerTest::testDUB() { UID lower(0x0102, 0x0304); UID upper(0x0506, 0x0708); auto_ptr request( NewDiscoveryUniqueBranchRequest(m_source, lower, upper, 1)); OLA_ASSERT_EQ(RDMCommand::DISCOVER_COMMAND, request->CommandClass()); OLA_ASSERT_TRUE(request->IsDUB()); // test pack unsigned int length = RDMCommandSerializer::RequiredSize(*request); OLA_ASSERT_EQ(37u, length); uint8_t *data = new uint8_t[length]; OLA_ASSERT_TRUE(RDMCommandSerializer::Pack(*request, data, &length)); OLA_ASSERT_DATA_EQUALS(EXPECTED_DISCOVERY_REQUEST, arraysize(EXPECTED_DISCOVERY_REQUEST), data, length); ByteString output; OLA_ASSERT_TRUE(RDMCommandSerializer::Pack(*request.get(), &output)); OLA_ASSERT_DATA_EQUALS(EXPECTED_DISCOVERY_REQUEST, arraysize(EXPECTED_DISCOVERY_REQUEST), output.data(), output.length()); delete[] data; } void RDMCommandSerializerTest::testMuteRequest() { auto_ptr request( NewMuteRequest(m_source, m_destination, 1)); OLA_ASSERT_EQ(RDMCommand::DISCOVER_COMMAND, request->CommandClass()); // test pack unsigned int length = RDMCommandSerializer::RequiredSize(*request); OLA_ASSERT_EQ(25u, length); uint8_t *data = new uint8_t[length]; OLA_ASSERT_TRUE(RDMCommandSerializer::Pack(*request, data, &length)); OLA_ASSERT_DATA_EQUALS(EXPECTED_MUTE_REQUEST, arraysize(EXPECTED_MUTE_REQUEST), data, length); ByteString output; OLA_ASSERT_TRUE(RDMCommandSerializer::Pack(*request.get(), &output)); OLA_ASSERT_DATA_EQUALS(EXPECTED_MUTE_REQUEST, arraysize(EXPECTED_MUTE_REQUEST), output.data(), output.length()); delete[] data; } void RDMCommandSerializerTest::testUnMuteRequest() { auto_ptr request( NewUnMuteRequest(m_source, m_destination, 1)); OLA_ASSERT_EQ(RDMCommand::DISCOVER_COMMAND, request->CommandClass()); // test pack unsigned int length = RDMCommandSerializer::RequiredSize(*request); OLA_ASSERT_EQ(25u, length); uint8_t *data = new uint8_t[length]; OLA_ASSERT_TRUE(RDMCommandSerializer::Pack(*request, data, &length)); OLA_ASSERT_DATA_EQUALS(EXPECTED_UNMUTE_REQUEST, arraysize(EXPECTED_UNMUTE_REQUEST), data, length); ByteString output; OLA_ASSERT_TRUE(RDMCommandSerializer::Pack(*request.get(), &output)); OLA_ASSERT_DATA_EQUALS(EXPECTED_UNMUTE_REQUEST, arraysize(EXPECTED_UNMUTE_REQUEST), output.data(), output.length()); delete[] data; } void RDMCommandSerializerTest::testPackAndInflate() { RDMGetRequest get_command(m_source, m_destination, 99, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length unsigned int length = RDMCommandSerializer::RequiredSize(get_command); uint8_t *data = new uint8_t[length]; OLA_ASSERT_TRUE(RDMCommandSerializer::Pack(get_command, data, &length)); auto_ptr command(RDMRequest::InflateFromData(data, length)); OLA_ASSERT_NOT_NULL(command.get()); OLA_ASSERT_EQ(m_source, command->SourceUID()); OLA_ASSERT_EQ(m_destination, command->DestinationUID()); OLA_ASSERT_EQ((uint8_t) 99, command->TransactionNumber()); OLA_ASSERT_EQ((uint8_t) 1, command->PortId()); OLA_ASSERT_EQ((uint8_t) 0, command->MessageCount()); OLA_ASSERT_EQ((uint16_t) 10, command->SubDevice()); OLA_ASSERT_EQ(RDMCommand::GET_COMMAND, command->CommandClass()); OLA_ASSERT_EQ((uint16_t) 296, command->ParamId()); OLA_ASSERT_EQ(static_cast(NULL), command->ParamData()); OLA_ASSERT_EQ(0u, command->ParamDataSize()); OLA_ASSERT_EQ(25u, RDMCommandSerializer::RequiredSize(*command)); delete[] data; } /* * Test writing to an IOStack works. */ void RDMCommandSerializerTest::testIOStack() { UID source(1, 2); UID destination(3, 4); RDMGetRequest command(source, destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length IOStack stack; OLA_ASSERT_TRUE(RDMCommandSerializer::Write(command, &stack)); unsigned int raw_command_size = stack.Size(); OLA_ASSERT_EQ(raw_command_size, RDMCommandSerializer::RequiredSize(command)); uint8_t raw_command[raw_command_size]; OLA_ASSERT_EQ(raw_command_size, stack.Read(raw_command, raw_command_size)); OLA_ASSERT_EQ(0u, stack.Size()); OLA_ASSERT_DATA_EQUALS(EXPECTED_GET_BUFFER, arraysize(EXPECTED_GET_BUFFER), raw_command, raw_command_size); // now try a command with data uint32_t data_value = 0xa5a5a5a5; RDMSetRequest command2(source, destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id reinterpret_cast(&data_value), // data sizeof(data_value)); // data length OLA_ASSERT_EQ(29u, RDMCommandSerializer::RequiredSize(command2)); OLA_ASSERT_TRUE(RDMCommandSerializer::Write(command2, &stack)); raw_command_size = stack.Size(); OLA_ASSERT_EQ(raw_command_size, RDMCommandSerializer::RequiredSize(command2)); uint8_t raw_command2[raw_command_size]; OLA_ASSERT_EQ(raw_command_size, stack.Read(raw_command2, raw_command_size)); OLA_ASSERT_EQ(0u, stack.Size()); OLA_ASSERT_DATA_EQUALS(EXPECTED_SET_BUFFER, arraysize(EXPECTED_SET_BUFFER), raw_command2, raw_command_size); } ola-0.10.9/common/rdm/RDMCommandSerializer.cpp0000664000175000017500000001220614376533110016034 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMCommandSerializer.cpp * Write RDMCommands to a memory buffer. * Copyright (C) 2012 Simon Newton */ #include #include #include "ola/io/BigEndianStream.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/RDMCommandSerializer.h" #include "ola/rdm/RDMPacket.h" #include "ola/util/Utils.h" namespace ola { namespace rdm { using ola::utils::SplitUInt16; unsigned int RDMCommandSerializer::RequiredSize( const RDMCommand &command) { if (command.ParamDataSize() > MAX_PARAM_DATA_LENGTH) { return 0; } // Don't use command.MessageLength() here, since it may be overridden. return sizeof(RDMCommandHeader) + command.ParamDataSize() + CHECKSUM_LENGTH; } bool RDMCommandSerializer::Pack(const RDMCommand &command, ola::io::ByteString *output) { const unsigned int packet_length = RequiredSize(command); if (packet_length == 0) { return false; } size_t front = output->size(); RDMCommandHeader header; PopulateHeader(&header, command); output->append(reinterpret_cast(&header), sizeof(header)); output->append(command.ParamData(), command.ParamDataSize()); uint16_t checksum = START_CODE; for (unsigned int i = front; i < output->size(); i++) { checksum += (*output)[i]; } checksum = command.Checksum(checksum); output->push_back(checksum >> 8); output->push_back(checksum & 0xff); return true; } bool RDMCommandSerializer::PackWithStartCode(const RDMCommand &command, ola::io::ByteString *output) { output->push_back(START_CODE); return Pack(command, output); } bool RDMCommandSerializer::Pack(const RDMCommand &command, uint8_t *buffer, unsigned int *size) { const unsigned int packet_length = RequiredSize(command); if (packet_length == 0 || *size < packet_length) { return false; } // The buffer pointer may not be aligned, so we incur a copy here. RDMCommandHeader header; PopulateHeader(&header, command); memcpy(buffer, &header, sizeof(header)); memcpy(buffer + sizeof(RDMCommandHeader), command.ParamData(), command.ParamDataSize()); uint16_t checksum = START_CODE; for (unsigned int i = 0; i < packet_length - CHECKSUM_LENGTH; i++) { checksum += buffer[i]; } checksum = command.Checksum(checksum); buffer[packet_length - CHECKSUM_LENGTH] = checksum >> 8; buffer[packet_length - CHECKSUM_LENGTH + 1] = checksum & 0xff; *size = packet_length; return true; } bool RDMCommandSerializer::Write(const RDMCommand &command, ola::io::IOStack *stack) { const unsigned int packet_length = RequiredSize(command); if (packet_length == 0) { return false; } RDMCommandHeader header; PopulateHeader(&header, command); uint16_t checksum = START_CODE; const uint8_t *ptr = reinterpret_cast(&header); for (unsigned int i = 0; i < sizeof(header); i++) { checksum += ptr[i]; } ptr = command.ParamData(); for (unsigned int i = 0; i < command.ParamDataSize(); i++) { checksum += ptr[i]; } checksum = command.Checksum(checksum); // now perform the write in reverse order (since it's a stack). ola::io::BigEndianOutputStream output(stack); output << checksum; output.Write(command.ParamData(), command.ParamDataSize()); output.Write(reinterpret_cast(&header), sizeof(header)); return true; } /** * Populate the RDMCommandHeader struct. * @param header a pointer to the RDMCommandHeader to populate * @param command the RDMCommand to use */ void RDMCommandSerializer::PopulateHeader(RDMCommandHeader *header, const RDMCommand &command) { header->sub_start_code = command.SubStartCode(); header->message_length = command.MessageLength(); command.DestinationUID().Pack(header->destination_uid, UID::UID_SIZE); command.SourceUID().Pack(header->source_uid, UID::UID_SIZE); header->transaction_number = command.TransactionNumber(); header->port_id = command.PortIdResponseType(); header->message_count = command.MessageCount(); SplitUInt16(command.SubDevice(), &header->sub_device[0], &header->sub_device[1]); header->command_class = command.CommandClass(); SplitUInt16(command.ParamId(), &header->param_id[0], &header->param_id[1]); header->param_data_length = command.ParamDataSize(); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/NetworkManager.h0000664000175000017500000000403714376533110014455 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * NetworkManager.h * Talks to the machine's network systems to get/set data. * Copyright (C) 2013 Peter Newman */ /** * @addtogroup rdm_resp * @{ * @file NetworkManager.h * @brief Gets/sets real config about a network. * @} */ #ifndef COMMON_RDM_NETWORKMANAGER_H_ #define COMMON_RDM_NETWORKMANAGER_H_ #include #include #include #include "ola/rdm/NetworkManagerInterface.h" namespace ola { namespace rdm { /** * @brief A NetworkManager which reflects the actual host network * configuration. */ class NetworkManager : public NetworkManagerInterface { public: NetworkManager() : NetworkManagerInterface() { m_interface_picker.reset(ola::network::InterfacePicker::NewPicker()); } const ola::network::InterfacePicker *GetInterfacePicker() const; rdm_dhcp_status GetDHCPStatus(const ola::network::Interface &iface) const; bool GetIPV4DefaultRoute(int32_t *if_index, ola::network::IPV4Address *default_route) const; const std::string GetHostname() const; const std::string GetDomainName() const; bool GetNameServers( std::vector *name_servers) const; private: std::auto_ptr m_interface_picker; }; } // namespace rdm } // namespace ola #endif // COMMON_RDM_NETWORKMANAGER_H_ ola-0.10.9/common/rdm/Makefile.mk0000664000175000017500000001377014376533110013432 00000000000000built_sources += \ common/rdm/Pids.pb.cc \ common/rdm/Pids.pb.h # LIBRARIES ################################################## common_libolacommon_la_SOURCES += \ common/rdm/AckTimerResponder.cpp \ common/rdm/AdvancedDimmerResponder.cpp \ common/rdm/CommandPrinter.cpp \ common/rdm/DescriptorConsistencyChecker.cpp \ common/rdm/DescriptorConsistencyChecker.h \ common/rdm/DimmerResponder.cpp \ common/rdm/DimmerRootDevice.cpp \ common/rdm/DimmerSubDevice.cpp \ common/rdm/DiscoveryAgent.cpp \ common/rdm/DiscoveryAgentTestHelper.h \ common/rdm/DummyResponder.cpp \ common/rdm/FakeNetworkManager.cpp \ common/rdm/FakeNetworkManager.h \ common/rdm/GroupSizeCalculator.cpp \ common/rdm/GroupSizeCalculator.h \ common/rdm/MessageDeserializer.cpp \ common/rdm/MessageSerializer.cpp \ common/rdm/MovingLightResponder.cpp \ common/rdm/NetworkManager.cpp \ common/rdm/NetworkManager.h \ common/rdm/NetworkResponder.cpp \ common/rdm/OpenLightingEnums.cpp \ common/rdm/PidStore.cpp \ common/rdm/PidStoreHelper.cpp \ common/rdm/PidStoreLoader.cpp \ common/rdm/PidStoreLoader.h \ common/rdm/QueueingRDMController.cpp \ common/rdm/RDMAPI.cpp \ common/rdm/RDMCommand.cpp \ common/rdm/RDMCommandSerializer.cpp \ common/rdm/RDMFrame.cpp \ common/rdm/RDMHelper.cpp \ common/rdm/RDMReply.cpp \ common/rdm/ResponderHelper.cpp \ common/rdm/ResponderLoadSensor.cpp \ common/rdm/ResponderPersonality.cpp \ common/rdm/ResponderSettings.cpp \ common/rdm/ResponderSlotData.cpp \ common/rdm/SensorResponder.cpp \ common/rdm/StringMessageBuilder.cpp \ common/rdm/SubDeviceDispatcher.cpp \ common/rdm/UID.cpp \ common/rdm/VariableFieldSizeCalculator.cpp \ common/rdm/VariableFieldSizeCalculator.h nodist_common_libolacommon_la_SOURCES += common/rdm/Pids.pb.cc common_libolacommon_la_CXXFLAGS += -DPID_DATA_DIR=\"${piddatadir}\" common_libolacommon_la_LIBADD += $(libprotobuf_LIBS) EXTRA_DIST += common/rdm/Pids.proto common/rdm/Pids.pb.cc common/rdm/Pids.pb.h: common/rdm/Makefile.mk common/rdm/Pids.proto $(PROTOC) --cpp_out $(top_builddir)/common/rdm --proto_path $(srcdir)/common/rdm $(srcdir)/common/rdm/Pids.proto # TESTS_DATA ################################################## EXTRA_DIST += \ common/rdm/testdata/duplicate_manufacturer.proto \ common/rdm/testdata/duplicate_pid_name.proto \ common/rdm/testdata/duplicate_pid_value.proto \ common/rdm/testdata/inconsistent_pid.proto \ common/rdm/testdata/invalid_esta_pid.proto \ common/rdm/testdata/pids/overrides.proto \ common/rdm/testdata/pids/pids1.proto \ common/rdm/testdata/pids/pids2.proto \ common/rdm/testdata/test_pids.proto # TESTS ################################################## test_programs += \ common/rdm/DiscoveryAgentTester \ common/rdm/PidStoreTester \ common/rdm/QueueingRDMControllerTester \ common/rdm/RDMAPITester \ common/rdm/RDMCommandSerializerTester \ common/rdm/RDMCommandTester \ common/rdm/RDMFrameTester \ common/rdm/RDMHelperTester \ common/rdm/RDMMessageTester \ common/rdm/RDMReplyTester \ common/rdm/UIDAllocatorTester \ common/rdm/UIDTester common_rdm_DiscoveryAgentTester_SOURCES = common/rdm/DiscoveryAgentTest.cpp common_rdm_DiscoveryAgentTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_DiscoveryAgentTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_PidStoreTester_SOURCES = \ common/rdm/DescriptorConsistencyCheckerTest.cpp \ common/rdm/PidStoreTest.cpp common_rdm_PidStoreTester_CXXFLAGS = $(COMMON_TESTING_PROTOBUF_FLAGS) common_rdm_PidStoreTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMHelperTester_SOURCES = common/rdm/RDMHelperTest.cpp common_rdm_RDMHelperTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMHelperTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMMessageTester_SOURCES = \ common/rdm/GroupSizeCalculatorTest.cpp \ common/rdm/MessageSerializerTest.cpp \ common/rdm/MessageDeserializerTest.cpp \ common/rdm/RDMMessageInterationTest.cpp \ common/rdm/StringMessageBuilderTest.cpp \ common/rdm/VariableFieldSizeCalculatorTest.cpp common_rdm_RDMMessageTester_CXXFLAGS = $(COMMON_TESTING_PROTOBUF_FLAGS) common_rdm_RDMMessageTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMAPITester_SOURCES = \ common/rdm/RDMAPITest.cpp common_rdm_RDMAPITester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMAPITester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMCommandTester_SOURCES = \ common/rdm/RDMCommandTest.cpp \ common/rdm/TestHelper.h common_rdm_RDMCommandTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMCommandTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMFrameTester_SOURCES = \ common/rdm/RDMFrameTest.cpp \ common/rdm/TestHelper.h common_rdm_RDMFrameTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMFrameTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMReplyTester_SOURCES = \ common/rdm/RDMReplyTest.cpp \ common/rdm/TestHelper.h common_rdm_RDMReplyTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMReplyTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_RDMCommandSerializerTester_SOURCES = \ common/rdm/RDMCommandSerializerTest.cpp \ common/rdm/TestHelper.h common_rdm_RDMCommandSerializerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_RDMCommandSerializerTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_QueueingRDMControllerTester_SOURCES = \ common/rdm/QueueingRDMControllerTest.cpp \ common/rdm/TestHelper.h common_rdm_QueueingRDMControllerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_QueueingRDMControllerTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_UIDAllocatorTester_SOURCES = \ common/rdm/UIDAllocatorTest.cpp common_rdm_UIDAllocatorTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_UIDAllocatorTester_LDADD = $(COMMON_TESTING_LIBS) common_rdm_UIDTester_SOURCES = \ common/rdm/UIDTest.cpp common_rdm_UIDTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_rdm_UIDTester_LDADD = $(COMMON_TESTING_LIBS) ola-0.10.9/common/rdm/UIDTest.cpp0000664000175000017500000002256214376533110013350 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * UIDTest.cpp * Test fixture for the UID classes * Copyright (C) 2005 Simon Newton */ #include #include #include #include "ola/StringUtils.h" #include "ola/rdm/UID.h" #include "ola/rdm/UIDSet.h" #include "ola/testing/TestUtils.h" using std::string; using ola::rdm::UID; using ola::rdm::UIDSet; class UIDTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(UIDTest); CPPUNIT_TEST(testUID); CPPUNIT_TEST(testUIDInequalities); CPPUNIT_TEST(testUIDSet); CPPUNIT_TEST(testUIDSetUnion); CPPUNIT_TEST(testUIDParse); CPPUNIT_TEST(testDirectedToUID); CPPUNIT_TEST_SUITE_END(); public: void testUID(); void testUIDInequalities(); void testUIDSet(); void testUIDSetUnion(); void testUIDParse(); void testDirectedToUID(); }; CPPUNIT_TEST_SUITE_REGISTRATION(UIDTest); /* * Test the UIDs work. */ void UIDTest::testUID() { UID uid(1, 2); UID uid2 = uid; OLA_ASSERT_EQ(uid, uid2); OLA_ASSERT_FALSE(uid != uid2); OLA_ASSERT_EQ((uint16_t) 1, uid.ManufacturerId()); OLA_ASSERT_EQ((uint32_t) 2, uid.DeviceId()); UID uid3(2, 10); OLA_ASSERT_NE(uid, uid3); OLA_ASSERT_LT(uid, uid3); OLA_ASSERT_EQ((uint16_t) 2, uid3.ManufacturerId()); OLA_ASSERT_EQ((uint32_t) 10, uid3.DeviceId()); // ToString OLA_ASSERT_EQ(string("0001:00000002"), uid.ToString()); OLA_ASSERT_EQ(string("0002:0000000a"), uid3.ToString()); UID all_devices = UID::AllDevices(); UID manufacturer_devices = UID::VendorcastAddress(0x52); OLA_ASSERT_EQ(string("ffff:ffffffff"), all_devices.ToString()); OLA_ASSERT_EQ(string("0052:ffffffff"), manufacturer_devices.ToString()); OLA_ASSERT_EQ(all_devices.ManufacturerId(), static_cast(0xffff)); OLA_ASSERT_EQ(all_devices.DeviceId(), static_cast(0xffffffff)); OLA_ASSERT_EQ(manufacturer_devices.ManufacturerId(), static_cast(0x0052)); OLA_ASSERT_EQ(manufacturer_devices.DeviceId(), static_cast(0xffffffff)); OLA_ASSERT_TRUE(all_devices.IsBroadcast()); OLA_ASSERT_TRUE(manufacturer_devices.IsBroadcast()); // now test the packing & unpacking unsigned int buffer_size = UID::UID_SIZE; uint8_t *buffer = new uint8_t[buffer_size]; OLA_ASSERT_TRUE(uid.Pack(buffer, buffer_size)); uint8_t expected[] = {0, 1, 0, 0, 0, 2}; OLA_ASSERT_EQ(0, memcmp(expected, buffer, buffer_size)); UID unpacked_uid1(buffer); OLA_ASSERT_EQ(uid, unpacked_uid1); OLA_ASSERT_TRUE(uid3.Pack(buffer, buffer_size)); uint8_t expected2[] = {0, 2, 0, 0, 0, 0x0a}; OLA_ASSERT_EQ(0, memcmp(expected2, buffer, buffer_size)); UID unpacked_uid2(buffer); OLA_ASSERT_EQ(uid3, unpacked_uid2); delete[] buffer; } /* * Test the UIDs inequalities work */ void UIDTest::testUIDInequalities() { uint16_t MOCK_ESTA_ID = 0x7a70; // check comparisons on the device id UID uid1(MOCK_ESTA_ID, 0); UID uid2(MOCK_ESTA_ID, 1); UID uid3(MOCK_ESTA_ID, 2); OLA_ASSERT_TRUE(uid1 < uid2); OLA_ASSERT_TRUE(uid1 < uid3); OLA_ASSERT_TRUE(uid2 < uid3); OLA_ASSERT_TRUE(uid3 > uid1); OLA_ASSERT_TRUE(uid2 > uid1); OLA_ASSERT_TRUE(uid3 > uid2); // check we're using unsigned ints for the device id UID uid4(MOCK_ESTA_ID, 0x80000000); UID uid5(MOCK_ESTA_ID, 0xffffffff); OLA_ASSERT_LT(uid1, uid4); OLA_ASSERT_LT(uid2, uid4); OLA_ASSERT_LT(uid3, uid4); OLA_ASSERT_LT(uid1, uid5); OLA_ASSERT_LT(uid2, uid5); OLA_ASSERT_LT(uid3, uid5); OLA_ASSERT_LT(uid4, uid5); OLA_ASSERT_GT(uid4, uid1); OLA_ASSERT_GT(uid4, uid2); OLA_ASSERT_GT(uid4, uid3); OLA_ASSERT_GT(uid5, uid1); OLA_ASSERT_GT(uid5, uid2); OLA_ASSERT_GT(uid5, uid3); OLA_ASSERT_GT(uid5, uid4); // test the manufacturer ID UID uid6(MOCK_ESTA_ID - 1, 0xffffffff); OLA_ASSERT_LT(uid6, uid1); OLA_ASSERT_LT(uid6, uid4); OLA_ASSERT_LT(uid6, uid5); OLA_ASSERT_GT(uid1, uid6); OLA_ASSERT_GT(uid4, uid6); OLA_ASSERT_GT(uid5, uid6); UID uid7(MOCK_ESTA_ID + 1, 0); OLA_ASSERT_LT(uid1, uid7); OLA_ASSERT_LT(uid4, uid7); OLA_ASSERT_LT(uid5, uid7); OLA_ASSERT_LT(uid6, uid7); OLA_ASSERT_GT(uid7, uid1); OLA_ASSERT_GT(uid7, uid4); OLA_ASSERT_GT(uid7, uid5); OLA_ASSERT_GT(uid7, uid6); // now some tests that would expose problems if we used signed ints UID uid8(0x8000, 0); OLA_ASSERT_LT(uid1, uid8); OLA_ASSERT_LT(uid2, uid8); OLA_ASSERT_LT(uid3, uid8); OLA_ASSERT_LT(uid4, uid8); OLA_ASSERT_LT(uid5, uid8); OLA_ASSERT_LT(uid6, uid8); OLA_ASSERT_GT(uid8, uid1); OLA_ASSERT_GT(uid8, uid4); OLA_ASSERT_GT(uid8, uid5); OLA_ASSERT_GT(uid8, uid6); OLA_ASSERT_GT(uid8, uid7); } /* * Test the UIDSet */ void UIDTest::testUIDSet() { UIDSet set1; OLA_ASSERT_EQ(0u, set1.Size()); UID uid(1, 2); UID uid2(2, 10); set1.AddUID(uid); OLA_ASSERT_EQ(1u, set1.Size()); OLA_ASSERT_EQ(string("0001:00000002"), set1.ToString()); OLA_ASSERT_TRUE(set1.Contains(uid)); OLA_ASSERT_FALSE(set1.Contains(uid2)); set1.AddUID(uid); OLA_ASSERT_EQ(1u, set1.Size()); set1.AddUID(uid2); OLA_ASSERT_EQ(2u, set1.Size()); OLA_ASSERT_EQ(string("0001:00000002,0002:0000000a"), set1.ToString()); OLA_ASSERT_TRUE(set1.Contains(uid)); OLA_ASSERT_TRUE(set1.Contains(uid2)); UIDSet set2(set1); OLA_ASSERT_EQ(set1, set2); UIDSet set3; OLA_ASSERT_EQ(0u, set3.Size()); set3 = set2; OLA_ASSERT_EQ(set1, set2); set3.RemoveUID(uid2); OLA_ASSERT_EQ(1u, set3.Size()); OLA_ASSERT_EQ(string("0001:00000002"), set3.ToString()); UIDSet difference = set1.SetDifference(set3); OLA_ASSERT_EQ(1u, difference.Size()); OLA_ASSERT_TRUE(set1.Contains(uid)); OLA_ASSERT_TRUE(set1.Contains(uid2)); difference = set3.SetDifference(set1); OLA_ASSERT_EQ(0u, difference.Size()); } /* * Test the UIDSet Union method. */ void UIDTest::testUIDSetUnion() { UIDSet set1, set2, expected; UID uid(1, 2); UID uid2(2, 10); UID uid3(3, 10); UID uid4(4, 10); set1.AddUID(uid); set2.AddUID(uid2); set2.AddUID(uid3); set2.AddUID(uid4); UIDSet union_set = set1.Union(set2); OLA_ASSERT_EQ(4u, union_set.Size()); OLA_ASSERT_TRUE(union_set.Contains(uid)); OLA_ASSERT_TRUE(union_set.Contains(uid2)); OLA_ASSERT_TRUE(union_set.Contains(uid3)); OLA_ASSERT_TRUE(union_set.Contains(uid4)); } /* * Test UID parsing */ void UIDTest::testUIDParse() { UID *uid = UID::FromString("ffff:00000000"); OLA_ASSERT_NOT_NULL(uid); OLA_ASSERT_EQ(uid->ManufacturerId(), static_cast(0xffff)); OLA_ASSERT_EQ(uid->DeviceId(), static_cast(0x00)); OLA_ASSERT_EQ(uid->ToString(), string("ffff:00000000")); delete uid; uid = UID::FromString("1234:567890ab"); OLA_ASSERT_NOT_NULL(uid); OLA_ASSERT_EQ(uid->ManufacturerId(), static_cast(0x1234)); OLA_ASSERT_EQ(uid->DeviceId(), static_cast(0x567890ab)); OLA_ASSERT_EQ(uid->ToString(), string("1234:567890ab")); delete uid; uid = UID::FromString("abcd:ef123456"); OLA_ASSERT_NOT_NULL(uid); OLA_ASSERT_EQ(uid->ManufacturerId(), static_cast(0xabcd)); OLA_ASSERT_EQ(uid->DeviceId(), static_cast(0xef123456)); OLA_ASSERT_EQ(uid->ToString(), string("abcd:ef123456")); delete uid; OLA_ASSERT_FALSE(UID::FromString("")); OLA_ASSERT_FALSE(UID::FromString(":")); OLA_ASSERT_FALSE(UID::FromString("0:0")); OLA_ASSERT_FALSE(UID::FromString(":123456")); OLA_ASSERT_FALSE(UID::FromString(":123456")); OLA_ASSERT_FALSE(UID::FromString("abcd:123456")); } /** * Test DirectedToUID() */ void UIDTest::testDirectedToUID() { const uint16_t MANUFACTURER_ID = 0x7a70; UID device_uid(MANUFACTURER_ID, 10); // test a direct match OLA_ASSERT_TRUE(device_uid.DirectedToUID(device_uid)); // test a different device UID other_device(MANUFACTURER_ID, 9); OLA_ASSERT_FALSE(other_device.DirectedToUID(device_uid)); // test broadcast UID broadcast_uid = UID::AllDevices(); OLA_ASSERT_TRUE(broadcast_uid.DirectedToUID(device_uid)); // test vendorcast passing manufacturer ID UID vendorcast_uid = UID::VendorcastAddress(MANUFACTURER_ID); OLA_ASSERT_TRUE(vendorcast_uid.DirectedToUID(device_uid)); // test vendorcast passing UID UID other_device_uid(MANUFACTURER_ID, 11); UID vendorcast_uid_2 = UID::VendorcastAddress(other_device_uid); OLA_ASSERT_TRUE(vendorcast_uid_2.DirectedToUID(device_uid)); // test another vendor passing manufacturer ID UID other_vendorcast_uid = UID::VendorcastAddress(MANUFACTURER_ID - 1); OLA_ASSERT_FALSE(other_vendorcast_uid.DirectedToUID(device_uid)); // test another vendor passing UID UID other_manufacturer_uid(MANUFACTURER_ID - 1, 10); UID other_vendorcast_uid_2 = UID::VendorcastAddress(other_manufacturer_uid); OLA_ASSERT_FALSE(other_vendorcast_uid_2.DirectedToUID(device_uid)); } ola-0.10.9/common/rdm/RDMMessageInterationTest.cpp0000664000175000017500000002137314376533110016712 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * RDMMessageInterationTest.cpp * Test fixture for the StringBuilder classes * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include "common/rdm/PidStoreLoader.h" #include "ola/testing/TestUtils.h" using ola::messaging::Descriptor; using ola::messaging::Message; using ola::rdm::PidDescriptor; using ola::rdm::PidStore; using ola::rdm::StringMessageBuilder; using std::auto_ptr; using std::string; using std::vector; class RDMMessageInterationTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(RDMMessageInterationTest); CPPUNIT_TEST(testProxiedDevices); CPPUNIT_TEST(testDeviceInfoRequest); CPPUNIT_TEST(testParameterDescription); CPPUNIT_TEST(testDeviceModelDescription); CPPUNIT_TEST_SUITE_END(); public: void testProxiedDevices(); void testDeviceInfoRequest(); void testDeviceModelDescription(); void testParameterDescription(); void setUp() { ola::rdm::PidStoreLoader loader; m_store.reset(loader.LoadFromFile( TEST_SRC_DIR "/common/rdm/testdata/test_pids.proto")); OLA_ASSERT_NOT_NULL(m_store.get()); m_esta_store = m_store->EstaStore(); OLA_ASSERT_NOT_NULL(m_esta_store); } private: std::auto_ptr m_store; const ola::rdm::PidStore *m_esta_store; ola::rdm::StringMessageBuilder m_builder; ola::messaging::GenericMessagePrinter m_printer; ola::rdm::MessageSerializer m_serializer; ola::rdm::MessageDeserializer m_deserializer; }; CPPUNIT_TEST_SUITE_REGISTRATION(RDMMessageInterationTest); /** * test PROXIED_DEVICES */ void RDMMessageInterationTest::testProxiedDevices() { const PidDescriptor *device_info_pid = m_esta_store->LookupPID(ola::rdm::PID_PROXIED_DEVICES); OLA_ASSERT_NOT_NULL(device_info_pid); const Descriptor *descriptor = device_info_pid->GetResponse(); OLA_ASSERT_TRUE(descriptor); vector inputs; inputs.push_back("31344"); // manufacturer ID inputs.push_back("1"); // device id inputs.push_back("31344"); // manufacturer ID inputs.push_back("2"); // device id inputs.push_back("21324"); // manufacturer ID inputs.push_back("1"); // device id auto_ptr message(m_builder.GetMessage(inputs, descriptor)); OLA_ASSERT_TRUE(message.get()); unsigned int data_length; const uint8_t *data = m_serializer.SerializeMessage(message.get(), &data_length); OLA_ASSERT_TRUE(data); OLA_ASSERT_EQ(18u, data_length); auto_ptr inflated_message( m_deserializer.InflateMessage(descriptor, data, data_length)); OLA_ASSERT_TRUE(inflated_message.get()); const string input = m_printer.AsString(message.get()); const string output = m_printer.AsString(inflated_message.get()); OLA_ASSERT_EQ(input, output); const string expected = ( "uids {\n manufacturer_id: 31344\n device_id: 1\n}\n" "uids {\n manufacturer_id: 31344\n device_id: 2\n}\n" "uids {\n manufacturer_id: 21324\n device_id: 1\n}\n"); OLA_ASSERT_EQ(expected, output); } /** * test Device Info Request */ void RDMMessageInterationTest::testDeviceInfoRequest() { const PidDescriptor *device_info_pid = m_esta_store->LookupPID(ola::rdm::PID_DEVICE_INFO); OLA_ASSERT_TRUE(device_info_pid); const Descriptor *descriptor = device_info_pid->GetResponse(); OLA_ASSERT_TRUE(descriptor); vector inputs; inputs.push_back("1"); // major inputs.push_back("0"); // minor inputs.push_back("300"); // device model inputs.push_back("400"); // product category inputs.push_back("40000"); // software version inputs.push_back("512"); // dmx footprint inputs.push_back("1"); // current personality inputs.push_back("5"); // personality count inputs.push_back("1"); // dmx start address inputs.push_back("0"); // sub device count inputs.push_back("6"); // sensor count auto_ptr message(m_builder.GetMessage(inputs, descriptor)); OLA_ASSERT_TRUE(message.get()); unsigned int data_length; const uint8_t *data = m_serializer.SerializeMessage(message.get(), &data_length); OLA_ASSERT_TRUE(data); OLA_ASSERT_EQ(19u, data_length); auto_ptr inflated_message( m_deserializer.InflateMessage(descriptor, data, data_length)); OLA_ASSERT_TRUE(inflated_message.get()); const string input = m_printer.AsString(message.get()); const string output = m_printer.AsString(inflated_message.get()); OLA_ASSERT_EQ(input, output); const string expected = ( "protocol_major: 1\nprotocol_minor: 0\ndevice_model: 300\n" "product_category: 400\nsoftware_version: 40000\n" "dmx_footprint: 512\ncurrent_personality: 1\npersonality_count: 5\n" "dmx_start_address: 1\nsub_device_count: 0\nsensor_count: 6\n"); OLA_ASSERT_EQ(expected, output); } /** * test device model description works */ void RDMMessageInterationTest::testDeviceModelDescription() { const PidDescriptor *device_model_pid = m_esta_store->LookupPID(ola::rdm::PID_DEVICE_MODEL_DESCRIPTION); OLA_ASSERT_TRUE(device_model_pid); const Descriptor *descriptor = device_model_pid->GetResponse(); OLA_ASSERT_TRUE(descriptor); vector inputs; inputs.push_back("wigglelight 2000"); // description auto_ptr message(m_builder.GetMessage(inputs, descriptor)); OLA_ASSERT_TRUE(message.get()); unsigned int data_length; const uint8_t *data = m_serializer.SerializeMessage(message.get(), &data_length); OLA_ASSERT_TRUE(data); OLA_ASSERT_EQ(16u, data_length); auto_ptr inflated_message( m_deserializer.InflateMessage(descriptor, data, data_length)); OLA_ASSERT_TRUE(inflated_message.get()); const string input = m_printer.AsString(message.get()); const string output = m_printer.AsString(inflated_message.get()); OLA_ASSERT_EQ(input, output); const string expected = "description: wigglelight 2000\n"; OLA_ASSERT_EQ(expected, output); } /** * test parameter description works */ void RDMMessageInterationTest::testParameterDescription() { const PidDescriptor *param_description_pid = m_esta_store->LookupPID(ola::rdm::PID_PARAMETER_DESCRIPTION); OLA_ASSERT_TRUE(param_description_pid); const Descriptor *descriptor = param_description_pid->GetResponse(); OLA_ASSERT_TRUE(descriptor); vector inputs; inputs.push_back("8000"); // pid inputs.push_back("2"); // pdl size inputs.push_back("6"); // data type inputs.push_back("3"); // command class inputs.push_back("0"); // type (unused) inputs.push_back("1"); // unit inputs.push_back("0"); // prefix inputs.push_back("0"); // min valid value inputs.push_back("400"); // max valid value inputs.push_back("0"); // default value inputs.push_back("room temp"); // description auto_ptr message(m_builder.GetMessage(inputs, descriptor)); OLA_ASSERT_TRUE(message.get()); unsigned int data_length; const uint8_t *data = m_serializer.SerializeMessage(message.get(), &data_length); OLA_ASSERT_TRUE(data); OLA_ASSERT_EQ(29u, data_length); auto_ptr inflated_message( m_deserializer.InflateMessage(descriptor, data, data_length)); OLA_ASSERT_TRUE(inflated_message.get()); const string input = m_printer.AsString(message.get()); const string output = m_printer.AsString(inflated_message.get()); OLA_ASSERT_EQ(input, output); const string expected = ( "pid: 8000\npdl_size: 2\ndata_type: 6\ncommand_class: 3\n" "type: 0\nunit: 1\nprefix: 0\nmin_value: 0\nmax_value: 400\n" "default_value: 0\ndescription: room temp\n"); OLA_ASSERT_EQ(expected, output); } ola-0.10.9/common/rdm/ResponderPersonality.cpp0000664000175000017500000000701014376533110016251 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ResponderPersonality.cpp * Manages personalities for a RDM responder. * Copyright (C) 2013 Simon Newton */ #ifndef COMMON_RDM_RESPONDERPERSONALITY_H_ #define COMMON_RDM_RESPONDERPERSONALITY_H_ #include #include "ola/rdm/ResponderPersonality.h" #include "ola/rdm/ResponderSlotData.h" #include "ola/stl/STLUtils.h" namespace ola { namespace rdm { using std::string; /** * Create a new personality. * @param footprint the number of dmx slots consumed * @param description the personality name (32 chars) */ Personality::Personality(uint16_t footprint, const string &description) : m_footprint(footprint), m_description(description) { } Personality::Personality(uint16_t footprint, const string &description, const SlotDataCollection &slot_data) : m_footprint(footprint), m_description(description), m_slot_data(slot_data) { } /** * Takes ownership of the personalites */ PersonalityCollection::PersonalityCollection( const PersonalityList &personalities) : m_personalities(personalities) { } /** * Clean up */ PersonalityCollection::~PersonalityCollection() { } /** * @returns the number of personalities */ uint8_t PersonalityCollection::PersonalityCount() const { return m_personalities.size(); } /** * Look up a personality by index */ const Personality *PersonalityCollection::Lookup(uint8_t personality) const { if (personality == 0 || personality > m_personalities.size()) return NULL; return &m_personalities[personality - 1]; } PersonalityManager::PersonalityManager( const PersonalityCollection *personalities) : m_personalities(personalities), m_active_personality(1) { } uint8_t PersonalityManager::PersonalityCount() const { return m_personalities->PersonalityCount(); } bool PersonalityManager::SetActivePersonality(uint8_t personality) { if (personality == 0 || personality > m_personalities->PersonalityCount()) return false; m_active_personality = personality; return true; } const Personality *PersonalityManager::ActivePersonality() const { return m_personalities->Lookup(m_active_personality); } uint16_t PersonalityManager::ActivePersonalityFootprint() const { const Personality *personality = m_personalities->Lookup( m_active_personality); return personality ? personality->Footprint() : 0; } string PersonalityManager::ActivePersonalityDescription() const { const Personality *personality = m_personalities->Lookup( m_active_personality); return personality ? personality->Description() : ""; } // Lookup a personality. Personalities are numbers from 1. const Personality *PersonalityManager::Lookup(uint8_t personality) const { return m_personalities->Lookup(personality); } } // namespace rdm } // namespace ola #endif // COMMON_RDM_RESPONDERPERSONALITY_H_ ola-0.10.9/common/rdm/QueueingRDMControllerTest.cpp0000664000175000017500000006112714376533110017120 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * QueueingRDMControllerTest.cpp * Test fixture for the UID classes * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include "ola/Logging.h" #include "ola/base/Array.h" #include "ola/Callback.h" #include "ola/rdm/UID.h" #include "ola/rdm/UIDSet.h" #include "ola/rdm/RDMControllerInterface.h" #include "ola/rdm/QueueingRDMController.h" #include "ola/testing/TestUtils.h" using ola::NewSingleCallback; using ola::rdm::ACK_OVERFLOW; using ola::rdm::RDMCallback; using ola::rdm::RDMDiscoveryCallback; using ola::rdm::RDMFrame; using ola::rdm::RDMFrames; using ola::rdm::RDMGetResponse; using ola::rdm::RDMReply; using ola::rdm::RDMRequest; using ola::rdm::RDMResponse; using ola::rdm::RDM_ACK; using ola::rdm::UID; using ola::rdm::UIDSet; using std::auto_ptr; using std::string; using std::vector; RDMRequest *NewGetRequest(const UID &source, const UID &destination) { return new ola::rdm::RDMGetRequest(source, destination, 0, // transaction # 1, // port id 10, // sub device 296, // param id NULL, // data 0); // data length } RDMResponse *NewGetResponse(const UID &source, const UID &destination) { return new RDMGetResponse(source, destination, 0, // transaction # RDM_ACK, 0, // message count 10, // sub device 296, // param id NULL, // data 0); // data length } class QueueingRDMControllerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(QueueingRDMControllerTest); CPPUNIT_TEST(testSendAndReceive); CPPUNIT_TEST(testDelayedSendAndReceive); CPPUNIT_TEST(testAckOverflows); CPPUNIT_TEST(testPauseAndResume); CPPUNIT_TEST(testQueueOverflow); CPPUNIT_TEST(testDiscovery); CPPUNIT_TEST(testMultipleDiscovery); CPPUNIT_TEST(testReentrantDiscovery); CPPUNIT_TEST(testRequestAndDiscovery); CPPUNIT_TEST_SUITE_END(); public: QueueingRDMControllerTest() : m_source(1, 2), m_destination(3, 4), m_discovery_complete_count(0) { } void testSendAndReceive(); void testDelayedSendAndReceive(); void testAckOverflows(); void testPauseAndResume(); void testQueueOverflow(); void testDiscovery(); void testMultipleDiscovery(); void testReentrantDiscovery(); void testRequestAndDiscovery(); void VerifyResponse(RDMReply *expected_reply, RDMReply *reply) { OLA_ASSERT_EQ(*expected_reply, *reply); } void VerifyDiscoveryComplete(UIDSet *expected_uids, const UIDSet &uids) { OLA_ASSERT_EQ(*expected_uids, uids); m_discovery_complete_count++; } void ReentrantDiscovery( ola::rdm::DiscoverableQueueingRDMController *controller, UIDSet *expected_uids, const UIDSet &uids); private: UID m_source; UID m_destination; int m_discovery_complete_count; static const uint8_t MOCK_FRAME_DATA[]; static const uint8_t MOCK_FRAME_DATA2[]; }; const uint8_t QueueingRDMControllerTest::MOCK_FRAME_DATA[] = { 1, 2, 3, 4 }; const uint8_t QueueingRDMControllerTest::MOCK_FRAME_DATA2[] = { 5, 6, 7, 8 }; CPPUNIT_TEST_SUITE_REGISTRATION(QueueingRDMControllerTest); /** * The MockRDMController, used to verify the behaviour */ class MockRDMController: public ola::rdm::DiscoverableRDMControllerInterface { public: MockRDMController() : m_rdm_callback(NULL), m_discovery_callback(NULL) { } void SendRDMRequest(RDMRequest *request, RDMCallback *on_complete); void ExpectCallAndCapture(RDMRequest *request); /* * Takes ownership of reply. */ void ExpectCallAndReplyWith(RDMRequest *request, RDMReply *reply); void AddExpectedDiscoveryCall(bool full, const UIDSet *uids); void RunFullDiscovery(RDMDiscoveryCallback *callback); void RunIncrementalDiscovery(RDMDiscoveryCallback *callback); void RunRDMCallback(RDMReply *reply); void RunDiscoveryCallback(const UIDSet &uids); void Verify(); private: typedef struct { RDMRequest *request; RDMReply *reply; bool run_callback; } expected_call; typedef struct { bool full; const UIDSet *uids; } expected_discovery_call; std::queue m_expected_calls; std::queue m_expected_discover_calls; RDMCallback *m_rdm_callback; RDMDiscoveryCallback *m_discovery_callback; }; void MockRDMController::SendRDMRequest(RDMRequest *request, RDMCallback *on_complete) { OLA_ASSERT_TRUE(m_expected_calls.size()); expected_call call = m_expected_calls.front(); m_expected_calls.pop(); OLA_ASSERT_TRUE(*call.request == *request); delete request; if (call.run_callback) { on_complete->Run(call.reply); delete call.reply; } else { OLA_ASSERT_FALSE(m_rdm_callback); m_rdm_callback = on_complete; } } void MockRDMController::RunFullDiscovery(RDMDiscoveryCallback *callback) { OLA_ASSERT_TRUE(m_expected_discover_calls.size()); expected_discovery_call call = m_expected_discover_calls.front(); m_expected_discover_calls.pop(); OLA_ASSERT_TRUE(call.full); if (call.uids) { callback->Run(*call.uids); } else { OLA_ASSERT_FALSE(m_discovery_callback); m_discovery_callback = callback; } } void MockRDMController::RunIncrementalDiscovery( RDMDiscoveryCallback *callback) { OLA_ASSERT_TRUE(m_expected_discover_calls.size()); expected_discovery_call call = m_expected_discover_calls.front(); m_expected_discover_calls.pop(); OLA_ASSERT_FALSE(call.full); if (call.uids) { callback->Run(*call.uids); } else { OLA_ASSERT_FALSE(m_discovery_callback); m_discovery_callback = callback; } } void MockRDMController::ExpectCallAndCapture(RDMRequest *request) { expected_call call = { request, NULL, false, }; m_expected_calls.push(call); } void MockRDMController::ExpectCallAndReplyWith(RDMRequest *request, RDMReply *reply) { expected_call call = { request, reply, true, }; m_expected_calls.push(call); } void MockRDMController::AddExpectedDiscoveryCall(bool full, const UIDSet *uids) { expected_discovery_call call = { full, uids, }; m_expected_discover_calls.push(call); } /** * Run the current RDM callback */ void MockRDMController::RunRDMCallback(RDMReply *reply) { OLA_ASSERT_TRUE(m_rdm_callback); RDMCallback *callback = m_rdm_callback; m_rdm_callback = NULL; callback->Run(reply); } /** * Run the current discovery callback */ void MockRDMController::RunDiscoveryCallback(const UIDSet &uids) { OLA_ASSERT_TRUE(m_discovery_callback); RDMDiscoveryCallback *callback = m_discovery_callback; m_discovery_callback = NULL; callback->Run(uids); } /** * Verify no expected calls remain */ void MockRDMController::Verify() { OLA_ASSERT_EQ(static_cast(0), m_expected_calls.size()); OLA_ASSERT_EQ(static_cast(0), m_expected_discover_calls.size()); } void QueueingRDMControllerTest::ReentrantDiscovery( ola::rdm::DiscoverableQueueingRDMController *controller, UIDSet *expected_uids, const UIDSet &uids) { OLA_ASSERT_EQ(*expected_uids, uids); m_discovery_complete_count++; controller->RunFullDiscovery( NewSingleCallback( this, &QueueingRDMControllerTest::VerifyDiscoveryComplete, expected_uids)); } /* * Check that sending RDM commands work. * This runs the RDMCallback immediately. */ void QueueingRDMControllerTest::testSendAndReceive() { MockRDMController mock_controller; ola::rdm::QueueingRDMController controller(&mock_controller, 10); // Some mock frame data. RDMFrame frame(MOCK_FRAME_DATA, arraysize(MOCK_FRAME_DATA)); RDMFrames frames; frames.push_back(frame); // test a simple request/response RDMRequest *get_request = NewGetRequest(m_source, m_destination); RDMReply *expected_reply = new RDMReply( ola::rdm::RDM_COMPLETED_OK, NewGetResponse(m_destination, m_source), frames); mock_controller.ExpectCallAndReplyWith(get_request, expected_reply); controller.SendRDMRequest( get_request, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, expected_reply)); // check a response where we return ok, but pass a null pointer get_request = NewGetRequest(m_source, m_destination); expected_reply = new RDMReply(ola::rdm::RDM_COMPLETED_OK, NULL, frames); mock_controller.ExpectCallAndReplyWith(get_request, expected_reply); controller.SendRDMRequest( get_request, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, expected_reply)); // check a failed command get_request = NewGetRequest(m_source, m_destination); expected_reply = new RDMReply(ola::rdm::RDM_FAILED_TO_SEND); mock_controller.ExpectCallAndReplyWith(get_request, expected_reply); controller.SendRDMRequest( get_request, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, expected_reply)); mock_controller.Verify(); } /* * Check that sending RDM commands work. * This all defer the running of the RDMCallback. */ void QueueingRDMControllerTest::testDelayedSendAndReceive() { MockRDMController mock_controller; ola::rdm::QueueingRDMController controller(&mock_controller, 10); // Some mock frame data. RDMFrame frame(MOCK_FRAME_DATA, arraysize(MOCK_FRAME_DATA)); RDMFrames frames; frames.push_back(frame); // test a simple request/response RDMRequest *get_request = NewGetRequest(m_source, m_destination); mock_controller.ExpectCallAndCapture(get_request); RDMReply expected_reply( ola::rdm::RDM_COMPLETED_OK, NewGetResponse(m_destination, m_source), frames); controller.SendRDMRequest( get_request, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, &expected_reply)); // now run the callback mock_controller.RunRDMCallback(&expected_reply); mock_controller.Verify(); } /* * Check that overflow sequences work. */ void QueueingRDMControllerTest::testAckOverflows() { MockRDMController mock_controller; ola::rdm::QueueingRDMController controller(&mock_controller, 10); // Some mock frame data. RDMFrame frame1(MOCK_FRAME_DATA, arraysize(MOCK_FRAME_DATA)); RDMFrame frame2(MOCK_FRAME_DATA2, arraysize(MOCK_FRAME_DATA2)); // test an ack overflow sequence RDMRequest *get_request = NewGetRequest(m_source, m_destination); uint8_t data[] = {0xaa, 0xbb}; RDMGetResponse *response1 = new RDMGetResponse( m_destination, m_source, 0, // transaction # ACK_OVERFLOW, // response type 0, // message count 10, // sub device 296, // param id data, // data 1); // data length RDMGetResponse *response2 = new RDMGetResponse( m_destination, m_source, 0, // transaction # RDM_ACK, // response type 0, // message count 10, // sub device 296, // param id data + 1, // data 1); // data length RDMGetResponse *expected_response = new RDMGetResponse( m_destination, m_source, 0, // transaction # RDM_ACK, // response type 0, // message count 10, // sub device 296, // param id data, // data 2); // data length RDMFrames frames1; frames1.push_back(frame1); RDMFrames frames2; frames2.push_back(frame2); mock_controller.ExpectCallAndReplyWith( get_request, new RDMReply(ola::rdm::RDM_COMPLETED_OK, response1, frames1)); mock_controller.ExpectCallAndReplyWith( get_request, new RDMReply(ola::rdm::RDM_COMPLETED_OK, response2, frames2)); RDMFrames expected_frames; expected_frames.push_back(frame1); expected_frames.push_back(frame2); RDMReply expected_reply( ola::rdm::RDM_COMPLETED_OK, expected_response, expected_frames); controller.SendRDMRequest( get_request, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, &expected_reply)); // now check an broken transaction. We first ACK, the return a timeout get_request = NewGetRequest(m_source, m_destination); RDMReply timeout_reply(ola::rdm::RDM_TIMEOUT); response1 = new RDMGetResponse( m_destination, m_source, 0, // transaction # ACK_OVERFLOW, // response type 0, // message count 10, // sub device 296, // param id data, // data 1); // data length mock_controller.ExpectCallAndReplyWith( get_request, new RDMReply(ola::rdm::RDM_COMPLETED_OK, response1)); mock_controller.ExpectCallAndReplyWith( get_request, new RDMReply(ola::rdm::RDM_TIMEOUT)); controller.SendRDMRequest( get_request, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, &timeout_reply)); // now test the case where the responses can't be combined get_request = NewGetRequest(m_source, m_destination); response1 = new RDMGetResponse( m_destination, m_source, 0, // transaction # ACK_OVERFLOW, // response type 0, // message count 10, // sub device 296, // param id data, // data 1); // data length response2 = new RDMGetResponse( m_source, m_source, 0, // transaction # RDM_ACK, // response type 0, // message count 10, // sub device 296, // param id data + 1, // data 1); // data length mock_controller.ExpectCallAndReplyWith( get_request, new RDMReply(ola::rdm::RDM_COMPLETED_OK, response1)); mock_controller.ExpectCallAndReplyWith( get_request, new RDMReply(ola::rdm::RDM_COMPLETED_OK, response2)); RDMReply invalid_reply(ola::rdm::RDM_INVALID_RESPONSE); controller.SendRDMRequest( get_request, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, &invalid_reply)); mock_controller.Verify(); } /* * Verify that pausing works. */ void QueueingRDMControllerTest::testPauseAndResume() { MockRDMController mock_controller; ola::rdm::QueueingRDMController controller(&mock_controller, 10); controller.Pause(); // queue up two requests RDMRequest *get_request1 = NewGetRequest(m_source, m_destination); RDMRequest *get_request2 = NewGetRequest(m_source, m_destination); RDMReply *expected_reply1 = new RDMReply( ola::rdm::RDM_COMPLETED_OK, NewGetResponse(m_destination, m_source)); RDMReply *expected_reply2 = new RDMReply( ola::rdm::RDM_FAILED_TO_SEND); // queue up two requests controller.SendRDMRequest( get_request1, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, expected_reply1)); controller.SendRDMRequest( get_request2, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, expected_reply2)); // now resume mock_controller.ExpectCallAndReplyWith(get_request1, expected_reply1); mock_controller.ExpectCallAndReplyWith(get_request2, expected_reply2); controller.Resume(); } /* * Verify that overflowing the queue behaves */ void QueueingRDMControllerTest::testQueueOverflow() { MockRDMController mock_controller; auto_ptr controller( new ola::rdm::QueueingRDMController(&mock_controller, 1)); controller->Pause(); RDMRequest *get_request = NewGetRequest(m_source, m_destination); RDMReply failed_to_send_reply(ola::rdm::RDM_FAILED_TO_SEND); controller->SendRDMRequest( get_request, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, &failed_to_send_reply)); // this one should overflow the queue get_request = NewGetRequest(m_source, m_destination); controller->SendRDMRequest( get_request, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, &failed_to_send_reply)); // now because we're paused the first should fail as well when the control // goes out of scope } /* * Verify discovery works */ void QueueingRDMControllerTest::testDiscovery() { MockRDMController mock_controller; auto_ptr controller( new ola::rdm::DiscoverableQueueingRDMController(&mock_controller, 1)); UIDSet uids, uids2; UID uid1(2, 3); UID uid2(10, 11); UID uid3(20, 22); UID uid4(65, 45); uids.AddUID(uid1); uids.AddUID(uid2); uids2.AddUID(uid3); uids2.AddUID(uid4); // trigger discovery, in this case the callback runs immediately. mock_controller.AddExpectedDiscoveryCall(true, &uids); controller->RunFullDiscovery( NewSingleCallback( this, &QueueingRDMControllerTest::VerifyDiscoveryComplete, &uids)); OLA_ASSERT_TRUE(m_discovery_complete_count); m_discovery_complete_count = 0; mock_controller.Verify(); // now test incremental discovery // trigger discovery, in this case the callback runs immediately. mock_controller.AddExpectedDiscoveryCall(false, &uids); controller->RunIncrementalDiscovery( NewSingleCallback( this, &QueueingRDMControllerTest::VerifyDiscoveryComplete, &uids)); OLA_ASSERT_TRUE(m_discovery_complete_count); m_discovery_complete_count = 0; mock_controller.Verify(); // now check the deferred case mock_controller.AddExpectedDiscoveryCall(true, NULL); controller->RunFullDiscovery( NewSingleCallback( this, &QueueingRDMControllerTest::VerifyDiscoveryComplete, &uids2)); mock_controller.Verify(); OLA_ASSERT_FALSE(m_discovery_complete_count); // now run the callback mock_controller.RunDiscoveryCallback(uids2); OLA_ASSERT_TRUE(m_discovery_complete_count); m_discovery_complete_count = 0; mock_controller.Verify(); // now try an incremental that deferrs the callback mock_controller.AddExpectedDiscoveryCall(false, NULL); controller->RunIncrementalDiscovery( NewSingleCallback( this, &QueueingRDMControllerTest::VerifyDiscoveryComplete, &uids2)); mock_controller.Verify(); OLA_ASSERT_FALSE(m_discovery_complete_count); // now run the callback mock_controller.RunDiscoveryCallback(uids2); OLA_ASSERT_TRUE(m_discovery_complete_count); m_discovery_complete_count = 0; mock_controller.Verify(); } /* * Check that attempting a discovery while another is running fails. */ void QueueingRDMControllerTest::testMultipleDiscovery() { MockRDMController mock_controller; auto_ptr controller( new ola::rdm::DiscoverableQueueingRDMController(&mock_controller, 1)); UIDSet uids, uids2; UID uid1(2, 3); UID uid2(10, 11); UID uid3(20, 22); UID uid4(65, 45); uids.AddUID(uid1); uids.AddUID(uid2); uids2.AddUID(uid3); uids2.AddUID(uid4); // trigger discovery, this doesn't run the callback immediately mock_controller.AddExpectedDiscoveryCall(true, NULL); controller->RunFullDiscovery( NewSingleCallback( this, &QueueingRDMControllerTest::VerifyDiscoveryComplete, &uids)); mock_controller.Verify(); OLA_ASSERT_FALSE(m_discovery_complete_count); // trigger discovery again, this should queue the discovery request controller->RunIncrementalDiscovery( NewSingleCallback( this, &QueueingRDMControllerTest::VerifyDiscoveryComplete, &uids2)); mock_controller.Verify(); // and again controller->RunIncrementalDiscovery( NewSingleCallback( this, &QueueingRDMControllerTest::VerifyDiscoveryComplete, &uids2)); mock_controller.Verify(); // return from the first one, this will trigger the second discovery call mock_controller.AddExpectedDiscoveryCall(false, NULL); mock_controller.RunDiscoveryCallback(uids); OLA_ASSERT_TRUE(m_discovery_complete_count); m_discovery_complete_count = 0; mock_controller.Verify(); // now return from the second one, which should complete the 2nd and 3rd // requests mock_controller.RunDiscoveryCallback(uids2); OLA_ASSERT_EQ(2, m_discovery_complete_count); m_discovery_complete_count = 0; mock_controller.Verify(); } /* * Verify reentrant discovery works */ void QueueingRDMControllerTest::testReentrantDiscovery() { MockRDMController mock_controller; auto_ptr controller( new ola::rdm::DiscoverableQueueingRDMController(&mock_controller, 1)); UIDSet uids; UID uid1(2, 3); UID uid2(10, 11); uids.AddUID(uid1); uids.AddUID(uid2); // trigger discovery, the ReentrantDiscovery starts a new discovery from // within the callback of the first. mock_controller.AddExpectedDiscoveryCall(true, NULL); controller->RunFullDiscovery( NewSingleCallback( this, &QueueingRDMControllerTest::ReentrantDiscovery, controller.get(), &uids)); mock_controller.Verify(); // this will finish the first discovery attempt, and start the second mock_controller.AddExpectedDiscoveryCall(true, NULL); mock_controller.RunDiscoveryCallback(uids); OLA_ASSERT_TRUE(m_discovery_complete_count); m_discovery_complete_count = 0; mock_controller.Verify(); // now unblock the second mock_controller.RunDiscoveryCallback(uids); OLA_ASSERT_TRUE(m_discovery_complete_count); m_discovery_complete_count = 0; mock_controller.Verify(); } /* * Check that interleaving requests and discovery commands work. */ void QueueingRDMControllerTest::testRequestAndDiscovery() { MockRDMController mock_controller; auto_ptr controller( new ola::rdm::DiscoverableQueueingRDMController(&mock_controller, 1)); UIDSet uids; UID uid1(2, 3); UID uid2(10, 11); uids.AddUID(uid1); uids.AddUID(uid2); // Send a request, but don't run the RDM request callback RDMRequest *get_request = NewGetRequest(m_source, m_destination); mock_controller.ExpectCallAndCapture(get_request); RDMReply expected_reply( ola::rdm::RDM_COMPLETED_OK, NewGetResponse(m_destination, m_source)); controller->SendRDMRequest( get_request, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, &expected_reply)); // now queue up a discovery request controller->RunFullDiscovery( NewSingleCallback( this, &QueueingRDMControllerTest::VerifyDiscoveryComplete, &uids)); mock_controller.Verify(); OLA_ASSERT_FALSE(m_discovery_complete_count); // now run the RDM callback, this should unblock the discovery process mock_controller.AddExpectedDiscoveryCall(true, NULL); mock_controller.RunRDMCallback(&expected_reply); mock_controller.Verify(); // now queue another RDM request RDMRequest *get_request2 = NewGetRequest(m_source, m_destination); RDMReply *expected_reply2 = new RDMReply( ola::rdm::RDM_COMPLETED_OK, NewGetResponse(m_destination, m_source)); mock_controller.ExpectCallAndReplyWith(get_request2, expected_reply2); // discovery is still running so this won't send the request just yet. controller->SendRDMRequest( get_request2, ola::NewSingleCallback( this, &QueueingRDMControllerTest::VerifyResponse, expected_reply2)); // now finish the discovery mock_controller.RunDiscoveryCallback(uids); OLA_ASSERT_TRUE(m_discovery_complete_count); mock_controller.Verify(); } ola-0.10.9/common/rdm/VariableFieldSizeCalculator.h0000664000175000017500000000605214376533110017066 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * VariableFieldSizeCalculator.h * Calculate the number of items in a group, given a fixed number of tokens. * Copyright (C) 2011 Simon Newton */ #ifndef COMMON_RDM_VARIABLEFIELDSIZECALCULATOR_H_ #define COMMON_RDM_VARIABLEFIELDSIZECALCULATOR_H_ #include #include #include namespace ola { namespace messaging { class Descriptor; } namespace rdm { /** * Calculate the size of a variable field when unpacking a Message from a raw * data stream. */ class VariableFieldSizeCalculator : public ola::messaging::FieldDescriptorVisitor { public: typedef enum { TOO_SMALL, TOO_LARGE, FIXED_SIZE, VARIABLE_STRING, VARIABLE_GROUP, MULTIPLE_VARIABLE_FIELDS, NESTED_VARIABLE_GROUPS, MISMATCHED_SIZE, } calculator_state; VariableFieldSizeCalculator() : m_fixed_size_sum(0) {} ~VariableFieldSizeCalculator() {} bool Descend() const { return false; } calculator_state CalculateFieldSize( unsigned int data_size, const class ola::messaging::Descriptor*, unsigned int *variable_field_repeat_count); void Visit(const ola::messaging::BoolFieldDescriptor*); void Visit(const ola::messaging::IPV4FieldDescriptor*); void Visit(const ola::messaging::MACFieldDescriptor*); void Visit(const ola::messaging::UIDFieldDescriptor*); void Visit(const ola::messaging::StringFieldDescriptor*); void Visit(const ola::messaging::UInt8FieldDescriptor*); void Visit(const ola::messaging::UInt16FieldDescriptor*); void Visit(const ola::messaging::UInt32FieldDescriptor*); void Visit(const ola::messaging::Int8FieldDescriptor*); void Visit(const ola::messaging::Int16FieldDescriptor*); void Visit(const ola::messaging::Int32FieldDescriptor*); void Visit(const ola::messaging::FieldDescriptorGroup*); void PostVisit(const ola::messaging::FieldDescriptorGroup*) {} private: unsigned int m_fixed_size_sum; std::vector m_variable_string_fields; std::vector m_variable_group_fields; unsigned int DetermineGroupSize(const ola::messaging::FieldDescriptorGroup*); }; } // namespace rdm } // namespace ola #endif // COMMON_RDM_VARIABLEFIELDSIZECALCULATOR_H_ ola-0.10.9/common/rdm/GroupSizeCalculator.cpp0000664000175000017500000002155014376533110016024 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * GroupSizeCalculator.cpp * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include "common/rdm/GroupSizeCalculator.h" namespace ola { namespace rdm { using ola::messaging::FieldDescriptor; using ola::messaging::FieldDescriptorGroup; using std::vector; /** * Figure out the number of group repetitions required. * * This method is *not* re-entrant. * @param token_count the number of tokens supplied * @param descriptor the descriptor to use to build the Message * @param[out] group_repeat_count the number of repeated groups * @returns the state of the calculator as a calculator_state. */ GroupSizeCalculator::calculator_state GroupSizeCalculator::CalculateGroupSize( unsigned int token_count, const ola::messaging::Descriptor *descriptor, unsigned int *group_repeat_count) { m_groups.clear(); m_non_groups.clear(); // split out the fields into singular fields and groups for (unsigned int i = 0; i < descriptor->FieldCount(); ++i) descriptor->GetField(i)->Accept(this); unsigned int required_tokens = m_non_groups.size(); if (required_tokens > token_count) return INSUFFICIENT_TOKENS; // this takes care of the easy case where there are no groups if (m_groups.empty()) { if (required_tokens == token_count) { return NO_VARIABLE_GROUPS; } else { OLA_WARN << "Got an incorrect number of tokens, expecting " << required_tokens << " tokens, got " << token_count; return EXTRA_TOKENS; } } // check all groups, looking for multiple non-fixed sized groups unsigned int variable_group_counter = 0; unsigned int variable_group_token_count = 0; const FieldDescriptorGroup *variable_group = NULL; vector::const_iterator iter = m_groups.begin(); for (; iter != m_groups.end(); ++iter) { unsigned int group_size; if (!m_simple_calculator.CalculateTokensRequired(*iter, &group_size)) return NESTED_VARIABLE_GROUPS; if ((*iter)->FixedSize()) { required_tokens += (*iter)->MinBlocks() * group_size; } else { // variable sized group variable_group_token_count = group_size; variable_group = *iter; if (++variable_group_counter > 1) return MULTIPLE_VARIABLE_GROUPS; } } if (required_tokens > token_count) return INSUFFICIENT_TOKENS; if (!variable_group_counter) { if (required_tokens == token_count) { return NO_VARIABLE_GROUPS; } else { OLA_WARN << "Got an incorrect number of tokens, expecting " << required_tokens << " tokens, got " << token_count; return EXTRA_TOKENS; } } // now we have a single variable sized group and a 0 or more tokens remaining unsigned int remaining_tokens = token_count - required_tokens; // some groups limit the number of blocks, check for that here if (variable_group->MaxBlocks() != FieldDescriptorGroup::UNLIMITED_BLOCKS && variable_group->MaxBlocks() * variable_group_token_count < remaining_tokens) return EXTRA_TOKENS; if (remaining_tokens % variable_group_token_count) return MISMATCHED_TOKENS; *group_repeat_count = remaining_tokens / variable_group_token_count; return SINGLE_VARIABLE_GROUP; } void GroupSizeCalculator::Visit( const ola::messaging::BoolFieldDescriptor *descriptor) { m_non_groups.push_back(descriptor); } void GroupSizeCalculator::Visit( const ola::messaging::IPV4FieldDescriptor *descriptor) { m_non_groups.push_back(descriptor); } void GroupSizeCalculator::Visit( const ola::messaging::MACFieldDescriptor *descriptor) { m_non_groups.push_back(descriptor); } void GroupSizeCalculator::Visit( const ola::messaging::UIDFieldDescriptor *descriptor) { m_non_groups.push_back(descriptor); } void GroupSizeCalculator::Visit( const ola::messaging::StringFieldDescriptor *descriptor) { m_non_groups.push_back(descriptor); } void GroupSizeCalculator::Visit( const ola::messaging::UInt8FieldDescriptor *descriptor) { m_non_groups.push_back(descriptor); } void GroupSizeCalculator::Visit( const ola::messaging::UInt16FieldDescriptor *descriptor) { m_non_groups.push_back(descriptor); } void GroupSizeCalculator::Visit( const ola::messaging::UInt32FieldDescriptor *descriptor) { m_non_groups.push_back(descriptor); } void GroupSizeCalculator::Visit( const ola::messaging::Int8FieldDescriptor *descriptor) { m_non_groups.push_back(descriptor); } void GroupSizeCalculator::Visit( const ola::messaging::Int16FieldDescriptor *descriptor) { m_non_groups.push_back(descriptor); } void GroupSizeCalculator::Visit( const ola::messaging::Int32FieldDescriptor *descriptor) { m_non_groups.push_back(descriptor); } void GroupSizeCalculator::Visit( const ola::messaging::FieldDescriptorGroup *descriptor) { m_groups.push_back(descriptor); } void GroupSizeCalculator::PostVisit( const ola::messaging::FieldDescriptorGroup *descriptor) { (void) descriptor; } // StaticGroupTokenCalculator //----------------------------------------------------------------------------- /** * For a group of fields, figure out the number of inputs required to build a * single instance of the group. This assumes that the group does not contain * any variable-sized groups but it may contain fixed sized nested groups. * @param descriptor the group descriptor * @param token_count the number of inputs required to build a single instance * of this group. * @return true if we could calculate the inputs required, false if this group * was of a variable size. */ bool StaticGroupTokenCalculator::CalculateTokensRequired( const class ola::messaging::FieldDescriptorGroup *descriptor, unsigned int *token_count) { // reset the stack while (!m_token_count.empty()) { m_token_count.pop(); } m_token_count.push(0); m_variable_sized_group_encountered = false; for (unsigned int i = 0; i < descriptor->FieldCount(); ++i) { descriptor->GetField(i)->Accept(this); } if (m_variable_sized_group_encountered) { return false; } *token_count = m_token_count.top(); m_token_count.pop(); return true; } void StaticGroupTokenCalculator::Visit( OLA_UNUSED const ola::messaging::BoolFieldDescriptor *descriptor) { m_token_count.top()++; } void StaticGroupTokenCalculator::Visit( OLA_UNUSED const ola::messaging::IPV4FieldDescriptor *descriptor) { m_token_count.top()++; } void StaticGroupTokenCalculator::Visit( OLA_UNUSED const ola::messaging::MACFieldDescriptor *descriptor) { m_token_count.top()++; } void StaticGroupTokenCalculator::Visit( OLA_UNUSED const ola::messaging::UIDFieldDescriptor *descriptor) { m_token_count.top()++; } void StaticGroupTokenCalculator::Visit( OLA_UNUSED const ola::messaging::StringFieldDescriptor *descriptor) { m_token_count.top()++; } void StaticGroupTokenCalculator::Visit( OLA_UNUSED const ola::messaging::UInt8FieldDescriptor *descriptor) { m_token_count.top()++; } void StaticGroupTokenCalculator::Visit( OLA_UNUSED const ola::messaging::UInt16FieldDescriptor *descriptor) { m_token_count.top()++; } void StaticGroupTokenCalculator::Visit( OLA_UNUSED const ola::messaging::UInt32FieldDescriptor *descriptor) { m_token_count.top()++; } void StaticGroupTokenCalculator::Visit( OLA_UNUSED const ola::messaging::Int8FieldDescriptor *descriptor) { m_token_count.top()++; } void StaticGroupTokenCalculator::Visit( OLA_UNUSED const ola::messaging::Int16FieldDescriptor *descriptor) { m_token_count.top()++; } void StaticGroupTokenCalculator::Visit( OLA_UNUSED const ola::messaging::Int32FieldDescriptor *descriptor) { m_token_count.top()++; } void StaticGroupTokenCalculator::Visit( const ola::messaging::FieldDescriptorGroup *descriptor) { m_token_count.push(0); if (!descriptor->FixedSize()) { m_variable_sized_group_encountered = true; } } void StaticGroupTokenCalculator::PostVisit( const ola::messaging::FieldDescriptorGroup *descriptor) { unsigned int group_length = m_token_count.top(); m_token_count.pop(); m_token_count.top() += group_length * descriptor->MinBlocks(); } } // namespace rdm } // namespace ola ola-0.10.9/common/rdm/UIDAllocatorTest.cpp0000664000175000017500000000502014376533110015177 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * UIDAllocatorTest.cpp * Test fixture for the UIDAllocator * Copyright (C) 2013 Simon Newton */ #include #include #include "ola/rdm/UID.h" #include "ola/rdm/UIDAllocator.h" #include "ola/testing/TestUtils.h" using ola::rdm::UID; using ola::rdm::UIDAllocator; using std::auto_ptr; class UIDAllocatorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(UIDAllocatorTest); CPPUNIT_TEST(testAllocator); CPPUNIT_TEST_SUITE_END(); public: void testAllocator(); }; CPPUNIT_TEST_SUITE_REGISTRATION(UIDAllocatorTest); /* * Test the Allocator works. */ void UIDAllocatorTest::testAllocator() { UID uid(1, 0xffffff00); UIDAllocator allocator(uid); for (unsigned int i = 0xffffff00; i < 0xffffffff; i++) { auto_ptr uid(allocator.AllocateNext()); OLA_ASSERT_NOT_NULL(uid.get()); OLA_ASSERT_EQ(i, uid->DeviceId()); } OLA_ASSERT_NULL(allocator.AllocateNext()); OLA_ASSERT_NULL(allocator.AllocateNext()); OLA_ASSERT_NULL(allocator.AllocateNext()); // try another allocator that has a custom upper bound UIDAllocator bounded_allocator(uid, 0xffffff10); for (unsigned int i = 0xffffff00; i <= 0xffffff10; i++) { auto_ptr uid(bounded_allocator.AllocateNext()); OLA_ASSERT_NOT_NULL(uid.get()); OLA_ASSERT_EQ(i, uid->DeviceId()); } OLA_ASSERT_NULL(bounded_allocator.AllocateNext()); OLA_ASSERT_NULL(bounded_allocator.AllocateNext()); // confirm we never hand out the broadcast id UID uid2(1, 0xfffffff0); UIDAllocator bounded_allocator2(uid2, 0xffffffff); for (unsigned int i = 0xfffffff0; i < 0xffffffff; i++) { auto_ptr uid(bounded_allocator2.AllocateNext()); OLA_ASSERT_NOT_NULL(uid.get()); OLA_ASSERT_EQ(i, uid->DeviceId()); } OLA_ASSERT_NULL(bounded_allocator2.AllocateNext()); } ola-0.10.9/common/web/0000775000175000017500000000000014376533271011437 500000000000000ola-0.10.9/common/web/PointerTest.cpp0000664000175000017500000001377514376533110014350 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PointerTest.cpp * Unittest for the Json Pointer. * Copyright (C) 2014 Simon Newton */ #include #include "ola/web/JsonPointer.h" #include "ola/testing/TestUtils.h" using ola::web::JsonPointer; using std::string; class JsonPointerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(JsonPointerTest); CPPUNIT_TEST(testConstructionFrom); CPPUNIT_TEST(testEscaping); CPPUNIT_TEST(testIteration); CPPUNIT_TEST(testPrefix); CPPUNIT_TEST_SUITE_END(); public: void testConstructionFrom(); void testEscaping(); void testIteration(); void testPrefix(); }; CPPUNIT_TEST_SUITE_REGISTRATION(JsonPointerTest); void JsonPointerTest::testConstructionFrom() { JsonPointer pointer1(""); OLA_ASSERT_TRUE(pointer1.IsValid()); OLA_ASSERT_EQ(1u, pointer1.TokenCount()); OLA_ASSERT_EQ(string(""), pointer1.TokenAt(0)); OLA_ASSERT_EQ(string(""), pointer1.ToString()); JsonPointer pointer2("/foo"); OLA_ASSERT_TRUE(pointer2.IsValid()); OLA_ASSERT_EQ(2u, pointer2.TokenCount()); OLA_ASSERT_EQ(string("foo"), pointer2.TokenAt(0)); OLA_ASSERT_EQ(string(""), pointer2.TokenAt(1)); OLA_ASSERT_EQ(string(""), pointer2.TokenAt(2)); OLA_ASSERT_EQ(string("/foo"), pointer2.ToString()); JsonPointer pointer3("/foo/bar/1"); OLA_ASSERT_TRUE(pointer3.IsValid()); OLA_ASSERT_EQ(4u, pointer3.TokenCount()); OLA_ASSERT_EQ(string("foo"), pointer3.TokenAt(0)); OLA_ASSERT_EQ(string("bar"), pointer3.TokenAt(1)); OLA_ASSERT_EQ(string("1"), pointer3.TokenAt(2)); OLA_ASSERT_EQ(string(""), pointer3.TokenAt(3)); OLA_ASSERT_EQ(string("/foo/bar/1"), pointer3.ToString()); JsonPointer pointer4("/1"); OLA_ASSERT_TRUE(pointer4.IsValid()); OLA_ASSERT_EQ(2u, pointer4.TokenCount()); OLA_ASSERT_EQ(string("1"), pointer4.TokenAt(0)); OLA_ASSERT_EQ(string(""), pointer4.TokenAt(1)); OLA_ASSERT_EQ(string("/1"), pointer4.ToString()); JsonPointer pointer5("/-1"); OLA_ASSERT_TRUE(pointer5.IsValid()); OLA_ASSERT_EQ(2u, pointer5.TokenCount()); OLA_ASSERT_EQ(string("-1"), pointer5.TokenAt(0)); OLA_ASSERT_EQ(string(""), pointer5.TokenAt(1)); OLA_ASSERT_EQ(string("/-1"), pointer5.ToString()); JsonPointer invalid_pointer("foo"); OLA_ASSERT_FALSE(invalid_pointer.IsValid()); JsonPointer empty_pointer; OLA_ASSERT_TRUE(empty_pointer.IsValid()); OLA_ASSERT_EQ(1u, empty_pointer.TokenCount()); OLA_ASSERT_EQ(string(""), empty_pointer.TokenAt(0)); OLA_ASSERT_EQ(string(""), empty_pointer.ToString()); } void JsonPointerTest::testEscaping() { JsonPointer pointer1("/a~1b"); OLA_ASSERT_TRUE(pointer1.IsValid()); OLA_ASSERT_EQ(2u, pointer1.TokenCount()); OLA_ASSERT_EQ(string("a/b"), pointer1.TokenAt(0)); OLA_ASSERT_EQ(string(""), pointer1.TokenAt(1)); OLA_ASSERT_EQ(string("/a~1b"), pointer1.ToString()); JsonPointer pointer2("/m~0n"); OLA_ASSERT_TRUE(pointer2.IsValid()); OLA_ASSERT_EQ(2u, pointer2.TokenCount()); OLA_ASSERT_EQ(string("m~n"), pointer2.TokenAt(0)); OLA_ASSERT_EQ(string(""), pointer2.TokenAt(1)); OLA_ASSERT_EQ(string("/m~0n"), pointer2.ToString()); } void JsonPointerTest::testIteration() { JsonPointer pointer1(""); JsonPointer::Iterator iter = pointer1.begin(); OLA_ASSERT_TRUE(iter.IsValid()); OLA_ASSERT_TRUE(iter.AtEnd()); OLA_ASSERT_EQ(string(""), *iter); iter++; OLA_ASSERT_FALSE(iter.AtEnd()); OLA_ASSERT_FALSE(iter.IsValid()); JsonPointer pointer2("/foo"); iter = pointer2.begin(); OLA_ASSERT_TRUE(iter.IsValid()); OLA_ASSERT_FALSE(iter.AtEnd()); OLA_ASSERT_EQ(string("foo"), *iter); iter++; OLA_ASSERT_TRUE(iter.IsValid()); OLA_ASSERT_TRUE(iter.AtEnd()); OLA_ASSERT_EQ(string(""), *iter); iter++; OLA_ASSERT_FALSE(iter.IsValid()); JsonPointer pointer3("/foo/bar/1/-1"); iter = pointer3.begin(); OLA_ASSERT_TRUE(iter.IsValid()); OLA_ASSERT_FALSE(iter.AtEnd()); OLA_ASSERT_EQ(string("foo"), *iter); iter++; OLA_ASSERT_TRUE(iter.IsValid()); OLA_ASSERT_FALSE(iter.AtEnd()); OLA_ASSERT_EQ(string("bar"), *iter); iter++; OLA_ASSERT_TRUE(iter.IsValid()); OLA_ASSERT_FALSE(iter.AtEnd()); OLA_ASSERT_EQ(string("1"), *iter); iter++; OLA_ASSERT_TRUE(iter.IsValid()); OLA_ASSERT_FALSE(iter.AtEnd()); OLA_ASSERT_EQ(string("-1"), *iter); iter++; OLA_ASSERT_TRUE(iter.IsValid()); OLA_ASSERT_TRUE(iter.AtEnd()); OLA_ASSERT_EQ(string(""), *iter); iter++; OLA_ASSERT_FALSE(iter.IsValid()); } void JsonPointerTest::testPrefix() { JsonPointer invalid_pointer("foo"); JsonPointer pointer1("/foo"); JsonPointer pointer2("/foo/bar"); JsonPointer pointer3("/baz"); JsonPointer pointer4(""); OLA_ASSERT_FALSE(invalid_pointer.IsPrefixOf(invalid_pointer)); OLA_ASSERT_FALSE(invalid_pointer.IsPrefixOf(pointer1)); OLA_ASSERT_FALSE(invalid_pointer.IsPrefixOf(pointer2)); OLA_ASSERT_FALSE(invalid_pointer.IsPrefixOf(pointer3)); OLA_ASSERT_TRUE(pointer1.IsPrefixOf(pointer2)); OLA_ASSERT_TRUE(pointer4.IsPrefixOf(pointer1)); OLA_ASSERT_TRUE(pointer4.IsPrefixOf(pointer3)); OLA_ASSERT_FALSE(pointer1.IsPrefixOf(pointer1)); OLA_ASSERT_FALSE(pointer1.IsPrefixOf(pointer3)); OLA_ASSERT_FALSE(pointer1.IsPrefixOf(pointer4)); OLA_ASSERT_FALSE(pointer2.IsPrefixOf(pointer1)); OLA_ASSERT_FALSE(pointer2.IsPrefixOf(pointer2)); OLA_ASSERT_FALSE(pointer2.IsPrefixOf(pointer3)); OLA_ASSERT_FALSE(pointer2.IsPrefixOf(pointer4)); OLA_ASSERT_FALSE(pointer3.IsPrefixOf(pointer4)); } ola-0.10.9/common/web/SchemaTest.cpp0000664000175000017500000007751214376533110014127 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaTest.cpp * Unittest for the Json Schema. * Copyright (C) 2014 Simon Newton */ #include #include #include #include #include #include "ola/Logging.h" #include "ola/testing/TestUtils.h" #include "ola/web/Json.h" #include "ola/web/JsonParser.h" #include "ola/web/JsonSchema.h" using ola::web::AllOfValidator; using ola::web::AnyOfValidator; using ola::web::ArrayValidator; using ola::web::BoolValidator; using ola::web::ConjunctionValidator; using ola::web::IntegerValidator; using ola::web::JsonBool; using ola::web::JsonDouble; using ola::web::JsonInt; using ola::web::JsonNull; using ola::web::JsonParser; using ola::web::JsonString; using ola::web::JsonString; using ola::web::JsonUInt; using ola::web::JsonUInt; using ola::web::JsonValue; using ola::web::MaximumConstraint; using ola::web::MinimumConstraint; using ola::web::MultipleOfConstraint; using ola::web::NotValidator; using ola::web::NullValidator; using ola::web::NumberValidator; using ola::web::ObjectValidator; using ola::web::OneOfValidator; using ola::web::ReferenceValidator; using ola::web::SchemaDefinitions; using ola::web::StringValidator; using ola::web::WildcardValidator; using std::auto_ptr; using std::set; using std::string; using std::vector; class JsonSchemaTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(JsonSchemaTest); CPPUNIT_TEST(testWildcardValidator); CPPUNIT_TEST(testReferenceValidator); CPPUNIT_TEST(testStringValidator); CPPUNIT_TEST(testBoolValidator); CPPUNIT_TEST(testNullValidator); CPPUNIT_TEST(testIntegerValidator); CPPUNIT_TEST(testNumberValidator); CPPUNIT_TEST(testObjectValidator); CPPUNIT_TEST(testArrayValidator); CPPUNIT_TEST(testAllOfValidator); CPPUNIT_TEST(testAnyOfValidator); CPPUNIT_TEST(testOneOfValidator); CPPUNIT_TEST(testNotValidator); CPPUNIT_TEST(testEnums); CPPUNIT_TEST_SUITE_END(); public: void setUp(); void testWildcardValidator(); void testReferenceValidator(); void testStringValidator(); void testBoolValidator(); void testNullValidator(); void testIntegerValidator(); void testNumberValidator(); void testObjectValidator(); void testArrayValidator(); void testAllOfValidator(); void testAnyOfValidator(); void testOneOfValidator(); void testNotValidator(); void testEnums(); private: auto_ptr m_bool_value; auto_ptr m_empty_array; auto_ptr m_empty_object; auto_ptr m_int_value; auto_ptr m_long_string_value; auto_ptr m_null_value; auto_ptr m_number_value; auto_ptr m_string_value; auto_ptr m_uint_value; }; CPPUNIT_TEST_SUITE_REGISTRATION(JsonSchemaTest); void JsonSchemaTest::setUp() { string error; m_bool_value.reset(new JsonBool(true)); m_empty_array.reset(JsonParser::Parse("[]", &error)); m_empty_object.reset(JsonParser::Parse("{}", &error)); m_int_value.reset(new JsonInt(-12)); m_long_string_value.reset(new JsonString("This is a longer string")); m_null_value.reset(new JsonNull()); m_number_value.reset(new JsonDouble(1.2)); m_string_value.reset(new JsonString("foo")); m_uint_value.reset(new JsonUInt(4)); } void JsonSchemaTest::testWildcardValidator() { WildcardValidator wildcard_validator; m_bool_value->Accept(&wildcard_validator); OLA_ASSERT_TRUE(wildcard_validator.IsValid()); m_empty_array->Accept(&wildcard_validator); OLA_ASSERT_TRUE(wildcard_validator.IsValid()); m_empty_object->Accept(&wildcard_validator); OLA_ASSERT_TRUE(wildcard_validator.IsValid()); m_int_value->Accept(&wildcard_validator); OLA_ASSERT_TRUE(wildcard_validator.IsValid()); m_null_value->Accept(&wildcard_validator); OLA_ASSERT_TRUE(wildcard_validator.IsValid()); m_number_value->Accept(&wildcard_validator); OLA_ASSERT_TRUE(wildcard_validator.IsValid()); m_string_value->Accept(&wildcard_validator); OLA_ASSERT_TRUE(wildcard_validator.IsValid()); m_uint_value->Accept(&wildcard_validator); OLA_ASSERT_TRUE(wildcard_validator.IsValid()); } void JsonSchemaTest::testReferenceValidator() { const string key = "#/definitions/testing"; SchemaDefinitions definitions; definitions.Add(key, new IntegerValidator()); ReferenceValidator validator(&definitions, key); m_int_value->Accept(&validator); OLA_ASSERT_TRUE(validator.IsValid()); m_uint_value->Accept(&validator); OLA_ASSERT_TRUE(validator.IsValid()); m_bool_value->Accept(&validator); OLA_ASSERT_FALSE(validator.IsValid()); m_empty_array->Accept(&validator); OLA_ASSERT_FALSE(validator.IsValid()); m_empty_object->Accept(&validator); OLA_ASSERT_FALSE(validator.IsValid()); m_null_value->Accept(&validator); OLA_ASSERT_FALSE(validator.IsValid()); m_number_value->Accept(&validator); OLA_ASSERT_FALSE(validator.IsValid()); m_string_value->Accept(&validator); OLA_ASSERT_FALSE(validator.IsValid()); } void JsonSchemaTest::testStringValidator() { StringValidator basic_string_validator((StringValidator::Options())); m_string_value->Accept(&basic_string_validator); OLA_ASSERT_TRUE(basic_string_validator.IsValid()); m_long_string_value->Accept(&basic_string_validator); OLA_ASSERT_TRUE(basic_string_validator.IsValid()); m_bool_value->Accept(&basic_string_validator); OLA_ASSERT_FALSE(basic_string_validator.IsValid()); m_empty_array->Accept(&basic_string_validator); OLA_ASSERT_FALSE(basic_string_validator.IsValid()); m_empty_object->Accept(&basic_string_validator); OLA_ASSERT_FALSE(basic_string_validator.IsValid()); m_int_value->Accept(&basic_string_validator); OLA_ASSERT_FALSE(basic_string_validator.IsValid()); m_null_value->Accept(&basic_string_validator); OLA_ASSERT_FALSE(basic_string_validator.IsValid()); m_number_value->Accept(&basic_string_validator); OLA_ASSERT_FALSE(basic_string_validator.IsValid()); m_uint_value->Accept(&basic_string_validator); OLA_ASSERT_FALSE(basic_string_validator.IsValid()); // test a string with a min length StringValidator::Options min_length_options; min_length_options.min_length = 5; StringValidator min_length_string_validator(min_length_options); m_string_value->Accept(&min_length_string_validator); OLA_ASSERT_FALSE(min_length_string_validator.IsValid()); m_long_string_value->Accept(&min_length_string_validator); OLA_ASSERT_TRUE(min_length_string_validator.IsValid()); // test a string with a max length StringValidator::Options max_length_options; max_length_options.max_length = 10; StringValidator max_length_string_validator(max_length_options); m_string_value->Accept(&max_length_string_validator); OLA_ASSERT_TRUE(max_length_string_validator.IsValid()); m_long_string_value->Accept(&max_length_string_validator); OLA_ASSERT_FALSE(max_length_string_validator.IsValid()); } void JsonSchemaTest::testBoolValidator() { BoolValidator bool_validator; m_bool_value->Accept(&bool_validator); OLA_ASSERT_TRUE(bool_validator.IsValid()); m_empty_array->Accept(&bool_validator); OLA_ASSERT_FALSE(bool_validator.IsValid()); m_empty_object->Accept(&bool_validator); OLA_ASSERT_FALSE(bool_validator.IsValid()); m_int_value->Accept(&bool_validator); OLA_ASSERT_FALSE(bool_validator.IsValid()); m_null_value->Accept(&bool_validator); OLA_ASSERT_FALSE(bool_validator.IsValid()); m_number_value->Accept(&bool_validator); OLA_ASSERT_FALSE(bool_validator.IsValid()); m_string_value->Accept(&bool_validator); OLA_ASSERT_FALSE(bool_validator.IsValid()); m_uint_value->Accept(&bool_validator); OLA_ASSERT_FALSE(bool_validator.IsValid()); } void JsonSchemaTest::testNullValidator() { NullValidator null_validator; m_null_value->Accept(&null_validator); OLA_ASSERT_TRUE(null_validator.IsValid()); m_bool_value->Accept(&null_validator); OLA_ASSERT_FALSE(null_validator.IsValid()); m_empty_array->Accept(&null_validator); OLA_ASSERT_FALSE(null_validator.IsValid()); m_empty_object->Accept(&null_validator); OLA_ASSERT_FALSE(null_validator.IsValid()); m_int_value->Accept(&null_validator); OLA_ASSERT_FALSE(null_validator.IsValid()); m_number_value->Accept(&null_validator); OLA_ASSERT_FALSE(null_validator.IsValid()); m_string_value->Accept(&null_validator); OLA_ASSERT_FALSE(null_validator.IsValid()); m_uint_value->Accept(&null_validator); OLA_ASSERT_FALSE(null_validator.IsValid()); } void JsonSchemaTest::testIntegerValidator() { IntegerValidator integer_validator; m_int_value->Accept(&integer_validator); OLA_ASSERT_TRUE(integer_validator.IsValid()); m_uint_value->Accept(&integer_validator); OLA_ASSERT_TRUE(integer_validator.IsValid()); m_bool_value->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); m_empty_array->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); m_empty_object->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); m_null_value->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); m_number_value->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); m_string_value->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); // Now test some constraints. // Maximum IntegerValidator max_int_validator, exclusive_max_int_validator; max_int_validator.AddConstraint(new MaximumConstraint( new JsonInt(4), false)); exclusive_max_int_validator.AddConstraint(new MaximumConstraint( new JsonInt(4), true)); auto_ptr int_value1(new JsonInt(3)); auto_ptr int_value2(new JsonInt(-11)); auto_ptr int_value3(new JsonInt(-13)); auto_ptr uint_value1(new JsonInt(5)); // closed maximum int_value1->Accept(&max_int_validator); OLA_ASSERT_TRUE(max_int_validator.IsValid()); int_value2->Accept(&max_int_validator); OLA_ASSERT_TRUE(max_int_validator.IsValid()); int_value3->Accept(&max_int_validator); OLA_ASSERT_TRUE(max_int_validator.IsValid()); m_int_value->Accept(&max_int_validator); OLA_ASSERT_TRUE(max_int_validator.IsValid()); m_uint_value->Accept(&max_int_validator); OLA_ASSERT_TRUE(max_int_validator.IsValid()); uint_value1->Accept(&max_int_validator); OLA_ASSERT_FALSE(max_int_validator.IsValid()); // open maximum int_value1->Accept(&exclusive_max_int_validator); OLA_ASSERT_TRUE(exclusive_max_int_validator.IsValid()); int_value2->Accept(&exclusive_max_int_validator); OLA_ASSERT_TRUE(exclusive_max_int_validator.IsValid()); int_value3->Accept(&exclusive_max_int_validator); OLA_ASSERT_TRUE(exclusive_max_int_validator.IsValid()); m_int_value->Accept(&exclusive_max_int_validator); OLA_ASSERT_TRUE(exclusive_max_int_validator.IsValid()); m_uint_value->Accept(&exclusive_max_int_validator); OLA_ASSERT_FALSE(exclusive_max_int_validator.IsValid()); uint_value1->Accept(&max_int_validator); OLA_ASSERT_FALSE(max_int_validator.IsValid()); // Minimum IntegerValidator min_int_validator, exclusive_min_int_validator; min_int_validator.AddConstraint(new MinimumConstraint( new JsonInt(-12), false)); exclusive_min_int_validator.AddConstraint(new MinimumConstraint( new JsonInt(-12), true)); // closed minimum int_value1->Accept(&min_int_validator); OLA_ASSERT_TRUE(min_int_validator.IsValid()); int_value2->Accept(&min_int_validator); OLA_ASSERT_TRUE(min_int_validator.IsValid()); int_value3->Accept(&min_int_validator); OLA_ASSERT_FALSE(min_int_validator.IsValid()); m_int_value->Accept(&min_int_validator); OLA_ASSERT_TRUE(min_int_validator.IsValid()); m_uint_value->Accept(&min_int_validator); OLA_ASSERT_TRUE(min_int_validator.IsValid()); // open minimum int_value1->Accept(&exclusive_min_int_validator); OLA_ASSERT_TRUE(exclusive_min_int_validator.IsValid()); int_value2->Accept(&exclusive_min_int_validator); OLA_ASSERT_TRUE(exclusive_min_int_validator.IsValid()); int_value3->Accept(&exclusive_min_int_validator); OLA_ASSERT_FALSE(exclusive_min_int_validator.IsValid()); m_int_value->Accept(&exclusive_min_int_validator); OLA_ASSERT_FALSE(exclusive_min_int_validator.IsValid()); m_uint_value->Accept(&exclusive_min_int_validator); OLA_ASSERT_TRUE(exclusive_min_int_validator.IsValid()); // MultipleOf IntegerValidator multiple_of_validator; multiple_of_validator.AddConstraint( new MultipleOfConstraint(new JsonInt(2))); int_value1->Accept(&multiple_of_validator); OLA_ASSERT_FALSE(multiple_of_validator.IsValid()); int_value2->Accept(&multiple_of_validator); OLA_ASSERT_FALSE(multiple_of_validator.IsValid()); int_value3->Accept(&multiple_of_validator); OLA_ASSERT_FALSE(multiple_of_validator.IsValid()); m_int_value->Accept(&multiple_of_validator); OLA_ASSERT_TRUE(multiple_of_validator.IsValid()); m_uint_value->Accept(&multiple_of_validator); OLA_ASSERT_TRUE(multiple_of_validator.IsValid()); auto_ptr int_value4(new JsonInt(4)); auto_ptr int_value5(new JsonInt(8)); auto_ptr int_value6(new JsonInt(-4)); int_value4->Accept(&multiple_of_validator); OLA_ASSERT_TRUE(multiple_of_validator.IsValid()); int_value5->Accept(&multiple_of_validator); OLA_ASSERT_TRUE(multiple_of_validator.IsValid()); int_value6->Accept(&multiple_of_validator); OLA_ASSERT_TRUE(multiple_of_validator.IsValid()); } void JsonSchemaTest::testNumberValidator() { NumberValidator integer_validator; m_int_value->Accept(&integer_validator); OLA_ASSERT_TRUE(integer_validator.IsValid()); m_uint_value->Accept(&integer_validator); OLA_ASSERT_TRUE(integer_validator.IsValid()); m_number_value->Accept(&integer_validator); OLA_ASSERT_TRUE(integer_validator.IsValid()); m_bool_value->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); m_empty_array->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); m_empty_object->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); m_null_value->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); m_string_value->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); } void JsonSchemaTest::testObjectValidator() { ObjectValidator object_validator((ObjectValidator::Options())); m_empty_object->Accept(&object_validator); OLA_ASSERT_TRUE(object_validator.IsValid()); m_bool_value->Accept(&object_validator); OLA_ASSERT_FALSE(object_validator.IsValid()); m_empty_array->Accept(&object_validator); OLA_ASSERT_FALSE(object_validator.IsValid()); m_int_value->Accept(&object_validator); OLA_ASSERT_FALSE(object_validator.IsValid()); m_number_value->Accept(&object_validator); OLA_ASSERT_FALSE(object_validator.IsValid()); m_number_value->Accept(&object_validator); OLA_ASSERT_FALSE(object_validator.IsValid()); m_string_value->Accept(&object_validator); OLA_ASSERT_FALSE(object_validator.IsValid()); m_uint_value->Accept(&object_validator); OLA_ASSERT_FALSE(object_validator.IsValid()); string error; auto_ptr object1(JsonParser::Parse("{\"a\": 1}", &error)); auto_ptr object2( JsonParser::Parse("{\"a\": 1, \"b\": 2}", &error)); auto_ptr object3( JsonParser::Parse("{\"a\": 1, \"b\": 2, \"c\": 3}", &error)); auto_ptr object4( JsonParser::Parse("{\"a\": 1, \"b\": true, \"c\": 3}", &error)); auto_ptr object5( JsonParser::Parse("{\"a\": 1, \"b\": 2, \"c\": false}", &error)); // test maxProperties ObjectValidator::Options max_properties_options; max_properties_options.max_properties = 1; ObjectValidator max_properties_validator(max_properties_options); m_empty_object->Accept(&max_properties_validator); OLA_ASSERT_TRUE(max_properties_validator.IsValid()); object1->Accept(&max_properties_validator); OLA_ASSERT_TRUE(max_properties_validator.IsValid()); object2->Accept(&max_properties_validator); OLA_ASSERT_FALSE(max_properties_validator.IsValid()); // test minProperties ObjectValidator::Options min_properties_options; min_properties_options.min_properties = 2; ObjectValidator min_properties_validator(min_properties_options); m_empty_object->Accept(&min_properties_validator); OLA_ASSERT_FALSE(min_properties_validator.IsValid()); object1->Accept(&min_properties_validator); OLA_ASSERT_FALSE(min_properties_validator.IsValid()); object2->Accept(&min_properties_validator); OLA_ASSERT_TRUE(min_properties_validator.IsValid()); object3->Accept(&min_properties_validator); OLA_ASSERT_TRUE(min_properties_validator.IsValid()); // test required set required_properties; required_properties.insert("c"); ObjectValidator::Options required_properties_options; required_properties_options.SetRequiredProperties(required_properties); ObjectValidator required_properties_validator(required_properties_options); m_empty_object->Accept(&required_properties_validator); OLA_ASSERT_FALSE(required_properties_validator.IsValid()); object1->Accept(&required_properties_validator); OLA_ASSERT_FALSE(required_properties_validator.IsValid()); object2->Accept(&required_properties_validator); OLA_ASSERT_FALSE(required_properties_validator.IsValid()); object3->Accept(&required_properties_validator); OLA_ASSERT_TRUE(required_properties_validator.IsValid()); // test dependencies // property dependencies first set dependencies; // If we have b, then c is required dependencies.insert("c"); ObjectValidator dependency_validator((ObjectValidator::Options())); dependency_validator.AddPropertyDependency("b", dependencies); m_empty_object->Accept(&dependency_validator); OLA_ASSERT_TRUE(dependency_validator.IsValid()); object1->Accept(&dependency_validator); OLA_ASSERT_TRUE(dependency_validator.IsValid()); object2->Accept(&dependency_validator); OLA_ASSERT_FALSE(dependency_validator.IsValid()); object3->Accept(&dependency_validator); OLA_ASSERT_TRUE(dependency_validator.IsValid()); // schema dependency // If c is present, b must be a bool ObjectValidator *sub_validator = new ObjectValidator((ObjectValidator::Options())); sub_validator->AddValidator("b", new BoolValidator()); ObjectValidator schema_dependency_validator((ObjectValidator::Options())); schema_dependency_validator.AddSchemaDependency("c", sub_validator); m_empty_object->Accept(&schema_dependency_validator); OLA_ASSERT_TRUE(schema_dependency_validator.IsValid()); object1->Accept(&schema_dependency_validator); OLA_ASSERT_TRUE(schema_dependency_validator.IsValid()); object2->Accept(&schema_dependency_validator); OLA_ASSERT_TRUE(schema_dependency_validator.IsValid()); object3->Accept(&schema_dependency_validator); OLA_ASSERT_FALSE(schema_dependency_validator.IsValid()); object4->Accept(&schema_dependency_validator); OLA_ASSERT_TRUE(schema_dependency_validator.IsValid()); // test properties // check b is a int ObjectValidator property_validator((ObjectValidator::Options())); property_validator.AddValidator("b", new IntegerValidator()); m_empty_object->Accept(&property_validator); OLA_ASSERT_TRUE(property_validator.IsValid()); object1->Accept(&property_validator); OLA_ASSERT_TRUE(property_validator.IsValid()); object2->Accept(&property_validator); OLA_ASSERT_TRUE(property_validator.IsValid()); object3->Accept(&property_validator); OLA_ASSERT_TRUE(property_validator.IsValid()); object4->Accept(&property_validator); OLA_ASSERT_FALSE(property_validator.IsValid()); // Now check a is also an int, and prevent any other properties ObjectValidator::Options no_additional_properties_options; no_additional_properties_options.SetAdditionalProperties(false); ObjectValidator property_validator2(no_additional_properties_options); property_validator2.AddValidator("b", new IntegerValidator()); property_validator2.AddValidator("a", new IntegerValidator()); m_empty_object->Accept(&property_validator2); OLA_ASSERT_TRUE(property_validator2.IsValid()); object1->Accept(&property_validator2); OLA_ASSERT_TRUE(property_validator2.IsValid()); object2->Accept(&property_validator2); OLA_ASSERT_TRUE(property_validator2.IsValid()); object3->Accept(&property_validator2); OLA_ASSERT_FALSE(property_validator2.IsValid()); object4->Accept(&property_validator2); OLA_ASSERT_FALSE(property_validator2.IsValid()); ObjectValidator::Options allow_additional_properties_options; allow_additional_properties_options.SetAdditionalProperties(true); ObjectValidator property_validator3(allow_additional_properties_options); property_validator3.AddValidator("b", new IntegerValidator()); property_validator3.AddValidator("a", new IntegerValidator()); m_empty_object->Accept(&property_validator3); OLA_ASSERT_TRUE(property_validator3.IsValid()); object1->Accept(&property_validator3); OLA_ASSERT_TRUE(property_validator3.IsValid()); object2->Accept(&property_validator3); OLA_ASSERT_TRUE(property_validator3.IsValid()); object3->Accept(&property_validator3); OLA_ASSERT_TRUE(property_validator3.IsValid()); object4->Accept(&property_validator3); OLA_ASSERT_FALSE(property_validator3.IsValid()); // try an additionalProperty validator ObjectValidator property_validator4((ObjectValidator::Options())); property_validator4.AddValidator("a", new IntegerValidator()); property_validator4.AddValidator("b", new IntegerValidator()); property_validator4.SetAdditionalValidator(new IntegerValidator()); m_empty_object->Accept(&property_validator4); OLA_ASSERT_TRUE(property_validator4.IsValid()); object1->Accept(&property_validator4); OLA_ASSERT_TRUE(property_validator4.IsValid()); object2->Accept(&property_validator4); OLA_ASSERT_TRUE(property_validator4.IsValid()); object3->Accept(&property_validator4); OLA_ASSERT_TRUE(property_validator4.IsValid()); object4->Accept(&property_validator4); OLA_ASSERT_FALSE(property_validator4.IsValid()); object5->Accept(&property_validator4); OLA_ASSERT_FALSE(property_validator4.IsValid()); } void JsonSchemaTest::testArrayValidator() { ArrayValidator array_validator(NULL, NULL, ArrayValidator::Options()); m_empty_array->Accept(&array_validator); OLA_ASSERT_TRUE(array_validator.IsValid()); m_bool_value->Accept(&array_validator); OLA_ASSERT_FALSE(array_validator.IsValid()); m_empty_object->Accept(&array_validator); OLA_ASSERT_FALSE(array_validator.IsValid()); m_int_value->Accept(&array_validator); OLA_ASSERT_FALSE(array_validator.IsValid()); m_number_value->Accept(&array_validator); OLA_ASSERT_FALSE(array_validator.IsValid()); m_number_value->Accept(&array_validator); OLA_ASSERT_FALSE(array_validator.IsValid()); m_string_value->Accept(&array_validator); OLA_ASSERT_FALSE(array_validator.IsValid()); m_uint_value->Accept(&array_validator); OLA_ASSERT_FALSE(array_validator.IsValid()); string error; auto_ptr small_array(JsonParser::Parse("[1]", &error)); auto_ptr medium_array(JsonParser::Parse("[1, 2]", &error)); auto_ptr large_array(JsonParser::Parse("[1, 2, 3]", &error)); auto_ptr duplicate_items_array( JsonParser::Parse("[1, 2, 1]", &error)); // test maxItems ArrayValidator::Options max_options; max_options.max_items = 2; ArrayValidator max_items_validator(NULL, NULL, max_options); m_empty_array->Accept(&max_items_validator); OLA_ASSERT_TRUE(max_items_validator.IsValid()); small_array->Accept(&max_items_validator); OLA_ASSERT_TRUE(max_items_validator.IsValid()); medium_array->Accept(&max_items_validator); OLA_ASSERT_TRUE(max_items_validator.IsValid()); large_array->Accept(&max_items_validator); OLA_ASSERT_FALSE(max_items_validator.IsValid()); // test minItems ArrayValidator::Options min_options; min_options.min_items = 2; ArrayValidator min_items_validator(NULL, NULL, min_options); m_empty_array->Accept(&min_items_validator); OLA_ASSERT_FALSE(min_items_validator.IsValid()); small_array->Accept(&min_items_validator); OLA_ASSERT_FALSE(min_items_validator.IsValid()); medium_array->Accept(&min_items_validator); OLA_ASSERT_TRUE(min_items_validator.IsValid()); large_array->Accept(&min_items_validator); OLA_ASSERT_TRUE(min_items_validator.IsValid()); // test uniqueItems ArrayValidator::Options unique_items_options; unique_items_options.unique_items = true; ArrayValidator unique_items_validator(NULL, NULL, unique_items_options); m_empty_array->Accept(&unique_items_validator); OLA_ASSERT_TRUE(unique_items_validator.IsValid()); small_array->Accept(&unique_items_validator); OLA_ASSERT_TRUE(unique_items_validator.IsValid()); medium_array->Accept(&unique_items_validator); OLA_ASSERT_TRUE(unique_items_validator.IsValid()); large_array->Accept(&unique_items_validator); OLA_ASSERT_TRUE(unique_items_validator.IsValid()); duplicate_items_array->Accept(&unique_items_validator); OLA_ASSERT_FALSE(unique_items_validator.IsValid()); } void JsonSchemaTest::testAllOfValidator() { // 1 <= x <= 5 IntegerValidator *range1 = new IntegerValidator(); range1->AddConstraint( new MinimumConstraint(new JsonInt(1), false)); range1->AddConstraint( new MaximumConstraint(new JsonInt(5), false)); // 4 <= x <= 8 IntegerValidator *range2 = new IntegerValidator(); range2->AddConstraint( new MinimumConstraint(new JsonInt(4), false)); range2->AddConstraint( new MaximumConstraint(new JsonInt(8), false)); ConjunctionValidator::ValidatorList validators; validators.push_back(range1); validators.push_back(range2); AllOfValidator all_of_validator(&validators); m_string_value->Accept(&all_of_validator); OLA_ASSERT_FALSE(all_of_validator.IsValid()); m_long_string_value->Accept(&all_of_validator); OLA_ASSERT_FALSE(all_of_validator.IsValid()); m_bool_value->Accept(&all_of_validator); OLA_ASSERT_FALSE(all_of_validator.IsValid()); m_empty_array->Accept(&all_of_validator); OLA_ASSERT_FALSE(all_of_validator.IsValid()); m_empty_object->Accept(&all_of_validator); OLA_ASSERT_FALSE(all_of_validator.IsValid()); m_int_value->Accept(&all_of_validator); OLA_ASSERT_FALSE(all_of_validator.IsValid()); m_null_value->Accept(&all_of_validator); OLA_ASSERT_FALSE(all_of_validator.IsValid()); m_number_value->Accept(&all_of_validator); OLA_ASSERT_FALSE(all_of_validator.IsValid()); m_uint_value->Accept(&all_of_validator); OLA_ASSERT_TRUE(all_of_validator.IsValid()); // 4 } void JsonSchemaTest::testAnyOfValidator() { ConjunctionValidator::ValidatorList validators; validators.push_back(new StringValidator((StringValidator::Options()))); validators.push_back(new BoolValidator()); validators.push_back(new NullValidator()); AnyOfValidator any_of_validator(&validators); m_string_value->Accept(&any_of_validator); OLA_ASSERT_TRUE(any_of_validator.IsValid()); m_long_string_value->Accept(&any_of_validator); OLA_ASSERT_TRUE(any_of_validator.IsValid()); m_bool_value->Accept(&any_of_validator); OLA_ASSERT_TRUE(any_of_validator.IsValid()); m_null_value->Accept(&any_of_validator); OLA_ASSERT_TRUE(any_of_validator.IsValid()); m_empty_array->Accept(&any_of_validator); OLA_ASSERT_FALSE(any_of_validator.IsValid()); m_empty_object->Accept(&any_of_validator); OLA_ASSERT_FALSE(any_of_validator.IsValid()); m_int_value->Accept(&any_of_validator); OLA_ASSERT_FALSE(any_of_validator.IsValid()); m_number_value->Accept(&any_of_validator); OLA_ASSERT_FALSE(any_of_validator.IsValid()); m_uint_value->Accept(&any_of_validator); OLA_ASSERT_FALSE(any_of_validator.IsValid()); } void JsonSchemaTest::testOneOfValidator() { // 1 <= x <= 5 IntegerValidator *range1 = new IntegerValidator(); range1->AddConstraint( new MinimumConstraint(new JsonInt(1), false)); range1->AddConstraint( new MaximumConstraint(new JsonInt(5), false)); // 4 <= x <= 8 IntegerValidator *range2 = new IntegerValidator(); range2->AddConstraint( new MinimumConstraint(new JsonInt(4), false)); range2->AddConstraint( new MaximumConstraint(new JsonInt(8), false)); ConjunctionValidator::ValidatorList validators; validators.push_back(range1); validators.push_back(range2); OneOfValidator one_of_validator(&validators); m_bool_value->Accept(&one_of_validator); OLA_ASSERT_FALSE(one_of_validator.IsValid()); m_empty_array->Accept(&one_of_validator); OLA_ASSERT_FALSE(one_of_validator.IsValid()); m_empty_object->Accept(&one_of_validator); OLA_ASSERT_FALSE(one_of_validator.IsValid()); m_int_value->Accept(&one_of_validator); OLA_ASSERT_FALSE(one_of_validator.IsValid()); m_null_value->Accept(&one_of_validator); OLA_ASSERT_FALSE(one_of_validator.IsValid()); m_number_value->Accept(&one_of_validator); OLA_ASSERT_FALSE(one_of_validator.IsValid()); m_string_value->Accept(&one_of_validator); OLA_ASSERT_FALSE(one_of_validator.IsValid()); m_uint_value->Accept(&one_of_validator); OLA_ASSERT_FALSE(one_of_validator.IsValid()); auto_ptr int_value1(new JsonInt(3)); auto_ptr int_value2(new JsonInt(5)); auto_ptr int_value3(new JsonInt(6)); int_value1->Accept(&one_of_validator); OLA_ASSERT_TRUE(one_of_validator.IsValid()); int_value2->Accept(&one_of_validator); OLA_ASSERT_FALSE(one_of_validator.IsValid()); int_value3->Accept(&one_of_validator); OLA_ASSERT_TRUE(one_of_validator.IsValid()); } void JsonSchemaTest::testNotValidator() { NotValidator not_validator(new BoolValidator()); // Anything but a bool m_bool_value->Accept(¬_validator); OLA_ASSERT_FALSE(not_validator.IsValid()); m_empty_array->Accept(¬_validator); OLA_ASSERT_TRUE(not_validator.IsValid()); m_empty_object->Accept(¬_validator); OLA_ASSERT_TRUE(not_validator.IsValid()); m_int_value->Accept(¬_validator); OLA_ASSERT_TRUE(not_validator.IsValid()); m_null_value->Accept(¬_validator); OLA_ASSERT_TRUE(not_validator.IsValid()); m_number_value->Accept(¬_validator); OLA_ASSERT_TRUE(not_validator.IsValid()); m_string_value->Accept(¬_validator); OLA_ASSERT_TRUE(not_validator.IsValid()); m_uint_value->Accept(¬_validator); OLA_ASSERT_TRUE(not_validator.IsValid()); } void JsonSchemaTest::testEnums() { StringValidator string_validator((StringValidator::Options())); string_validator.AddEnumValue(new JsonString("foo")); string_validator.AddEnumValue(new JsonString("bar")); JsonString bar_value("bar"); JsonString baz_value("baz"); m_string_value->Accept(&string_validator); OLA_ASSERT_TRUE(string_validator.IsValid()); m_long_string_value->Accept(&string_validator); OLA_ASSERT_FALSE(string_validator.IsValid()); bar_value.Accept(&string_validator); OLA_ASSERT_TRUE(string_validator.IsValid()); baz_value.Accept(&string_validator); OLA_ASSERT_FALSE(string_validator.IsValid()); IntegerValidator integer_validator; integer_validator.AddEnumValue(new JsonInt(1)); integer_validator.AddEnumValue(new JsonInt(2)); integer_validator.AddEnumValue(new JsonInt(4)); JsonInt int_value1(2); JsonInt int_value2(3); JsonInt uint_value1(2); JsonInt uint_value2(3); m_int_value->Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); m_uint_value->Accept(&integer_validator); OLA_ASSERT_TRUE(integer_validator.IsValid()); int_value1.Accept(&integer_validator); OLA_ASSERT_TRUE(integer_validator.IsValid()); int_value2.Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); uint_value1.Accept(&integer_validator); OLA_ASSERT_TRUE(integer_validator.IsValid()); uint_value2.Accept(&integer_validator); OLA_ASSERT_FALSE(integer_validator.IsValid()); } ola-0.10.9/common/web/SchemaParseContext.h0000664000175000017500000003777614376533110015304 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaParseContext.h * Stores the state required as we walk the JSON schema document. * Copyright (C) 2014 Simon Newton */ #ifndef COMMON_WEB_SCHEMAPARSECONTEXT_H_ #define COMMON_WEB_SCHEMAPARSECONTEXT_H_ #include #include #include #include #include #include #include "common/web/PointerTracker.h" #include "common/web/SchemaErrorLogger.h" #include "common/web/SchemaKeywords.h" #include "ola/web/JsonSchema.h" #include "ola/web/JsonParser.h" #include "ola/web/OptionalItem.h" namespace ola { namespace web { class ArrayOfSchemaContext; class ArrayOfStringsContext; class DefinitionsParseContext; class DependencyParseContext; class JsonValueContext; class PropertiesParseContext; class SchemaParseContext; /** * @brief The interface all SchemaParseContext classes inherit from. */ class SchemaParseContextInterface { public: SchemaParseContextInterface() {} virtual ~SchemaParseContextInterface() {} virtual void String(SchemaErrorLogger *logger, const std::string &value) = 0; virtual void Number(SchemaErrorLogger *logger, uint32_t value) = 0; virtual void Number(SchemaErrorLogger *logger, int32_t value) = 0; virtual void Number(SchemaErrorLogger *logger, uint64_t value) = 0; virtual void Number(SchemaErrorLogger *logger, int64_t value) = 0; virtual void Number(SchemaErrorLogger *logger, double value) = 0; virtual void Bool(SchemaErrorLogger *logger, bool value) = 0; virtual void Null(SchemaErrorLogger *logger) = 0; virtual SchemaParseContextInterface* OpenArray(SchemaErrorLogger *logger) = 0; virtual void CloseArray(SchemaErrorLogger *logger) = 0; virtual SchemaParseContextInterface* OpenObject( SchemaErrorLogger *logger) = 0; virtual void ObjectKey(SchemaErrorLogger *logger, const std::string &key) = 0; virtual void CloseObject(SchemaErrorLogger *logger) = 0; }; /** * @brief A SchemaParseContext that keeps track of the last keyword / property * seen. */ class ObjectParseContext : public SchemaParseContextInterface { public: ObjectParseContext() {} /** * @brief Called when we encounter a property */ void ObjectKey(SchemaErrorLogger*, const std::string &keyword) { m_keyword.Set(keyword); } protected: /** * */ std::string TakeKeyword() { std::string keyword = m_keyword.Value(); m_keyword.Reset(); return keyword; } /** * */ const std::string& Keyword() const { return m_keyword.Value(); } private: OptionalItem m_keyword; }; /** * @brief A SchemaParseContext that reports errors for all types. * * This is intended to be sub-classed for contexts that only accept a subset of * types. */ class StrictTypedParseContext : public ObjectParseContext { public: StrictTypedParseContext() {} void String(SchemaErrorLogger *logger, const std::string &value); void Number(SchemaErrorLogger *logger, uint32_t value); void Number(SchemaErrorLogger *logger, int32_t value); void Number(SchemaErrorLogger *logger, uint64_t value); void Number(SchemaErrorLogger *logger, int64_t value); void Number(SchemaErrorLogger *logger, double value); void Bool(SchemaErrorLogger *logger, bool value); void Null(SchemaErrorLogger *logger); SchemaParseContextInterface* OpenArray(SchemaErrorLogger *logger); void CloseArray(SchemaErrorLogger *logger); SchemaParseContextInterface* OpenObject(SchemaErrorLogger *logger); void CloseObject(SchemaErrorLogger *logger); private: void ReportErrorForType(SchemaErrorLogger *logger, JsonType type); DISALLOW_COPY_AND_ASSIGN(StrictTypedParseContext); }; /** * @brief The context for schema definitions. * * See section 5.5.7 of the draft. Definitions are a way of describing commonly * used elements of a JSON document. */ class DefinitionsParseContext : public StrictTypedParseContext { public: /** * @brief Create a new DefinitionsParseContext. * @param definitions the SchemaDefinitions cache, ownership is not * transferred. * * As each definition is parsed, it's added to the SchemaDefinitions object. */ explicit DefinitionsParseContext(SchemaDefinitions *definitions) : StrictTypedParseContext(), m_schema_defs(definitions) { } SchemaParseContextInterface* OpenObject(SchemaErrorLogger *logger); void CloseObject(SchemaErrorLogger *logger); private: SchemaDefinitions *m_schema_defs; std::auto_ptr m_current_schema; DISALLOW_COPY_AND_ASSIGN(DefinitionsParseContext); }; /** * @brief */ class SchemaParseContext : public SchemaParseContextInterface { public: /** * @brief Create a new SchemaParseContext * @param definitions the SchemaDefinitions cache, ownership is not * transferred. */ explicit SchemaParseContext(SchemaDefinitions *definitions) : m_schema_defs(definitions), m_keyword(SCHEMA_UNKNOWN), m_type(JSON_UNDEFINED) { } /** * @brief Return the ValidatorInterface for this context. * * Ownership of the ValidatorInterface is transferred to the caller. * @returns A new ValidatorInterface or NULL if it was not possible to * construct a validator. */ ValidatorInterface* GetValidator(SchemaErrorLogger *logger); void ObjectKey(SchemaErrorLogger *logger, const std::string &keyword); void String(SchemaErrorLogger *logger, const std::string &value); void Number(SchemaErrorLogger *logger, uint32_t value); void Number(SchemaErrorLogger *logger, int32_t value); void Number(SchemaErrorLogger *logger, uint64_t value); void Number(SchemaErrorLogger *logger, int64_t value); void Number(SchemaErrorLogger *logger, double value); void Bool(SchemaErrorLogger *logger, bool value); void Null(SchemaErrorLogger *logger); SchemaParseContextInterface* OpenArray(SchemaErrorLogger *logger); void CloseArray(SchemaErrorLogger *logger); SchemaParseContextInterface* OpenObject(SchemaErrorLogger *logger); void CloseObject(SchemaErrorLogger *logger); private: SchemaDefinitions *m_schema_defs; // Set to the last keyword reported to ObjectKey() SchemaKeyword m_keyword; // Members are arranged according to the order in which they appear in the // draft standard. // Common keywords OptionalItem m_id; OptionalItem m_schema; // 5.1 Number / integer keywords OptionalItem m_exclusive_maximum; OptionalItem m_exclusive_minimum; std::auto_ptr m_maximum; std::auto_ptr m_minimum; std::auto_ptr m_multiple_of; // 5.2 String keywords // TODO(simon): Implement pattern support? OptionalItem m_pattern; OptionalItem m_max_length; OptionalItem m_min_length; // 5.3 Array keywords // 'additionalItems' can be either a bool or a schema OptionalItem m_additional_items; std::auto_ptr m_additional_items_context; // 'items' can be either a json schema, or an array of json schema. std::auto_ptr m_items_single_context; std::auto_ptr m_items_context_array; OptionalItem m_max_items; OptionalItem m_min_items; OptionalItem m_unique_items; // 5.4 Object keywords OptionalItem m_max_properties; OptionalItem m_min_properties; std::auto_ptr m_required_items; std::auto_ptr m_dependency_context; // 5.5 Keywords for multiple instance types JsonType m_type; std::auto_ptr m_enum_context; std::auto_ptr m_allof_context; std::auto_ptr m_anyof_context; std::auto_ptr m_oneof_context; std::auto_ptr m_not_context; // 6. Metadata keywords OptionalItem m_description; OptionalItem m_title; std::auto_ptr m_default_value; std::auto_ptr m_default_value_context; OptionalItem m_ref_schema; // TODO(simon): Implement format support? OptionalItem m_format; std::auto_ptr m_definitions_context; std::auto_ptr m_properties_context; OptionalItem m_additional_properties; std::auto_ptr m_additional_properties_context; void ProcessPositiveInt(SchemaErrorLogger *logger, uint64_t value); template void ProcessInt(SchemaErrorLogger *logger, T t); bool AddNumberConstraints(IntegerValidator *validator, SchemaErrorLogger *logger); BaseValidator* BuildArrayValidator(SchemaErrorLogger *logger); BaseValidator* BuildObjectValidator(SchemaErrorLogger *logger); BaseValidator* BuildStringValidator(SchemaErrorLogger *logger); static bool ValidTypeForKeyword(SchemaErrorLogger *logger, SchemaKeyword keyword, JsonType type); // Verify that type == expected_type. If it doesn't report an error to the // logger. static bool CheckTypeAndLog(SchemaErrorLogger *logger, SchemaKeyword keyword, JsonType type, JsonType expected_type); // Same as above but the type can be either expected_type1 or expected_type2 static bool CheckTypeAndLog(SchemaErrorLogger *logger, SchemaKeyword keyword, JsonType type, JsonType expected_type1, JsonType expected_type2); DISALLOW_COPY_AND_ASSIGN(SchemaParseContext); }; /** * @brief */ class PropertiesParseContext : public StrictTypedParseContext { public: explicit PropertiesParseContext(SchemaDefinitions *definitions) : StrictTypedParseContext(), m_schema_defs(definitions) { } ~PropertiesParseContext(); void AddPropertyValidators(ObjectValidator *object_validator, SchemaErrorLogger *logger); SchemaParseContextInterface* OpenObject(SchemaErrorLogger *logger); private: typedef std::map SchemaMap; SchemaDefinitions *m_schema_defs; SchemaMap m_property_contexts; DISALLOW_COPY_AND_ASSIGN(PropertiesParseContext); }; /** * @brief Parse the array of objects in an 'items' property. */ class ArrayOfSchemaContext : public StrictTypedParseContext { public: explicit ArrayOfSchemaContext(SchemaDefinitions *definitions) : m_schema_defs(definitions) { } ~ArrayOfSchemaContext(); /** * @brief Populate a vector with validators for the elements in 'items' * @param logger The logger to use. * @param[out] validators A vector fill with new validators. Ownership of the * validators is transferred to the caller. */ void GetValidators(SchemaErrorLogger *logger, ValidatorInterface::ValidatorList *validators); SchemaParseContextInterface* OpenObject(SchemaErrorLogger *logger); private: typedef std::vector ItemSchemas; SchemaDefinitions *m_schema_defs; ItemSchemas m_item_schemas; DISALLOW_COPY_AND_ASSIGN(ArrayOfSchemaContext); }; /** * @brief The context for an array of strings. * * This is used for the required property and for property dependencies. */ class ArrayOfStringsContext : public StrictTypedParseContext { public: typedef std::set StringSet; ArrayOfStringsContext() {} /** * @brief Return the strings in the string array */ void GetStringSet(StringSet *stringd); void String(SchemaErrorLogger *logger, const std::string &value); private: StringSet m_items; DISALLOW_COPY_AND_ASSIGN(ArrayOfStringsContext); }; /** * @brief The context for a default value. * * Default values can be any JSON type. This context simply * passes the events through to a JsonParser in order to construct the * JsonValue. */ class JsonValueContext : public SchemaParseContextInterface { public: JsonValueContext(); const JsonValue* ClaimValue(SchemaErrorLogger *logger); void String(SchemaErrorLogger *logger, const std::string &value); void Number(SchemaErrorLogger *logger, uint32_t value); void Number(SchemaErrorLogger *logger, int32_t value); void Number(SchemaErrorLogger *logger, uint64_t value); void Number(SchemaErrorLogger *logger, int64_t value); void Number(SchemaErrorLogger *logger, double value); void Bool(SchemaErrorLogger *logger, bool value); void Null(SchemaErrorLogger *logger); SchemaParseContextInterface* OpenArray(SchemaErrorLogger *logger); void CloseArray(SchemaErrorLogger *logger); SchemaParseContextInterface* OpenObject(SchemaErrorLogger *logger); void ObjectKey(SchemaErrorLogger *logger, const std::string &key); void CloseObject(SchemaErrorLogger *logger); private: JsonParser m_parser; DISALLOW_COPY_AND_ASSIGN(JsonValueContext); }; /** * @brief The context for an array of JsonValues. * * This is used for the enum property. Items in the array can be any JSON type. */ class ArrayOfJsonValuesContext : public SchemaParseContextInterface { public: ArrayOfJsonValuesContext() {} ~ArrayOfJsonValuesContext(); void AddEnumsToValidator(BaseValidator *validator); void String(SchemaErrorLogger *logger, const std::string &value); void Number(SchemaErrorLogger *logger, uint32_t value); void Number(SchemaErrorLogger *logger, int32_t value); void Number(SchemaErrorLogger *logger, uint64_t value); void Number(SchemaErrorLogger *logger, int64_t value); void Number(SchemaErrorLogger *logger, double value); void Bool(SchemaErrorLogger *logger, bool value); void Null(SchemaErrorLogger *logger); SchemaParseContextInterface* OpenArray(SchemaErrorLogger *logger); void CloseArray(SchemaErrorLogger *logger); SchemaParseContextInterface* OpenObject(SchemaErrorLogger *logger); void ObjectKey(SchemaErrorLogger*, const std::string &) {} void CloseObject(SchemaErrorLogger *logger); bool Empty() const { return m_enums.empty(); } private: std::vector m_enums; std::auto_ptr m_value_context; void CheckForDuplicateAndAdd(SchemaErrorLogger *logger, const JsonValue *value); DISALLOW_COPY_AND_ASSIGN(ArrayOfJsonValuesContext); }; /** * @brief The context for a dependency object. * * A dependency object contains key : value pairs. The key is the name of a * property that may exist in the instance. The value is either an array of * strings or an object. */ class DependencyParseContext : public StrictTypedParseContext { public: explicit DependencyParseContext(SchemaDefinitions *definitions) : m_schema_defs(definitions) {} ~DependencyParseContext(); void AddDependenciesToValidator(ObjectValidator *validator); SchemaParseContextInterface* OpenArray(SchemaErrorLogger *logger); void CloseArray(SchemaErrorLogger *logger); SchemaParseContextInterface* OpenObject(SchemaErrorLogger *logger); void CloseObject(SchemaErrorLogger *logger); private: typedef std::set StringSet; typedef std::map SchemaDependencies; typedef std::map PropertyDependencies; SchemaDefinitions *m_schema_defs; std::auto_ptr m_property_context; std::auto_ptr m_schema_context; PropertyDependencies m_property_dependencies; SchemaDependencies m_schema_dependencies; DISALLOW_COPY_AND_ASSIGN(DependencyParseContext); }; } // namespace web } // namespace ola #endif // COMMON_WEB_SCHEMAPARSECONTEXT_H_ ola-0.10.9/common/web/SchemaKeywords.cpp0000664000175000017500000001232514376533110015006 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaKeywords.cpp * The keywords used in JSON Schema. * Copyright (C) 2014 Simon Newton */ #include "common/web/SchemaKeywords.h" #include namespace ola { namespace web { using std::string; string KeywordToString(SchemaKeyword keyword) { switch (keyword) { case SCHEMA_ID: return "id"; case SCHEMA_SCHEMA: return "$schema"; case SCHEMA_REF: return "$ref"; case SCHEMA_TITLE: return "title"; case SCHEMA_DESCRIPTION: return "description"; case SCHEMA_DEFAULT: return "default"; case SCHEMA_FORMAT: return "format"; case SCHEMA_MULTIPLEOF: return "multipleOf"; case SCHEMA_MAXIMUM: return "maximum"; case SCHEMA_EXCLUSIVE_MAXIMUM: return "exclusiveMaximum"; case SCHEMA_MINIMUM: return "minimum"; case SCHEMA_EXCLUSIVE_MINIMUM: return "exclusiveMinimum"; case SCHEMA_MAX_LENGTH: return "maxLength"; case SCHEMA_MIN_LENGTH: return "minLength"; case SCHEMA_PATTERN: return "pattern"; case SCHEMA_ADDITIONAL_ITEMS: return "additionalItems"; case SCHEMA_ITEMS: return "items"; case SCHEMA_MAX_ITEMS: return "maxItems"; case SCHEMA_MIN_ITEMS: return "minItems"; case SCHEMA_UNIQUE_ITEMS: return "uniqueItems"; case SCHEMA_MAX_PROPERTIES: return "maxProperties"; case SCHEMA_MIN_PROPERTIES: return "minProperties"; case SCHEMA_REQUIRED: return "required"; case SCHEMA_ADDITIONAL_PROPERTIES: return "additionalProperties"; case SCHEMA_DEFINITIONS: return "definitions"; case SCHEMA_PROPERTIES: return "properties"; case SCHEMA_PATTERN_PROPERTIES: return "patternProperties"; case SCHEMA_DEPENDENCIES: return "dependencies"; case SCHEMA_ENUM: return "enum"; case SCHEMA_TYPE: return "type"; case SCHEMA_ALL_OF: return "allOf"; case SCHEMA_ANY_OF: return "anyOf"; case SCHEMA_ONE_OF: return "oneOf"; case SCHEMA_NOT: return "not"; case SCHEMA_UNKNOWN: default: return ""; } } SchemaKeyword LookupKeyword(const string& keyword) { if (keyword == "id") { return SCHEMA_ID; } else if (keyword == "$schema") { return SCHEMA_SCHEMA; } else if (keyword == "$ref") { return SCHEMA_REF; } else if (keyword == "title") { return SCHEMA_TITLE; } else if (keyword == "description") { return SCHEMA_DESCRIPTION; } else if (keyword == "default") { return SCHEMA_DEFAULT; } else if (keyword == "format") { return SCHEMA_FORMAT; } else if (keyword == "multipleOf") { return SCHEMA_MULTIPLEOF; } else if (keyword == "maximum") { return SCHEMA_MAXIMUM; } else if (keyword == "exclusiveMaximum") { return SCHEMA_EXCLUSIVE_MAXIMUM; } else if (keyword == "minimum") { return SCHEMA_MINIMUM; } else if (keyword == "exclusiveMinimum") { return SCHEMA_EXCLUSIVE_MINIMUM; } else if (keyword == "maxLength") { return SCHEMA_MAX_LENGTH; } else if (keyword == "minLength") { return SCHEMA_MIN_LENGTH; } else if (keyword == "pattern") { return SCHEMA_PATTERN; } else if (keyword == "additionalItems") { return SCHEMA_ADDITIONAL_ITEMS; } else if (keyword == "items") { return SCHEMA_ITEMS; } else if (keyword == "maxItems") { return SCHEMA_MAX_ITEMS; } else if (keyword == "minItems") { return SCHEMA_MIN_ITEMS; } else if (keyword == "uniqueItems") { return SCHEMA_UNIQUE_ITEMS; } else if (keyword == "maxProperties") { return SCHEMA_MAX_PROPERTIES; } else if (keyword == "minProperties") { return SCHEMA_MIN_PROPERTIES; } else if (keyword == "required") { return SCHEMA_REQUIRED; } else if (keyword == "additionalProperties") { return SCHEMA_ADDITIONAL_PROPERTIES; } else if (keyword == "definitions") { return SCHEMA_DEFINITIONS; } else if (keyword == "properties") { return SCHEMA_PROPERTIES; } else if (keyword == "patternProperties") { return SCHEMA_PATTERN_PROPERTIES; } else if (keyword == "dependencies") { return SCHEMA_DEPENDENCIES; } else if (keyword == "enum") { return SCHEMA_ENUM; } else if (keyword == "type") { return SCHEMA_TYPE; } else if (keyword == "allOf") { return SCHEMA_ALL_OF; } else if (keyword == "anyOf") { return SCHEMA_ANY_OF; } else if (keyword == "oneOf") { return SCHEMA_ONE_OF; } else if (keyword == "not") { return SCHEMA_NOT; } else { return SCHEMA_UNKNOWN; } } } // namespace web } // namespace ola ola-0.10.9/common/web/Json.cpp0000664000175000017500000005200414376533110012765 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * Json.cpp * A simple set of classes for generating JSON. * See http://www.json.org/ * Copyright (C) 2012 Simon Newton */ #include #include #include #include "ola/stl/STLUtils.h" #include "ola/web/Json.h" namespace ola { namespace web { using std::ostream; using std::ostringstream; using std::string; namespace { class ObjectCastVisitor : public JsonValueVisitorInterface { public: ObjectCastVisitor() : m_obj(NULL) {} void Visit(JsonString *value) { (void) value; } void Visit(JsonBool *value) { (void) value; } void Visit(JsonNull *value) { (void) value; } void Visit(JsonRawValue *value) { (void) value; } void Visit(JsonObject *value) { m_obj = value; } void Visit(JsonArray *value) { (void) value; } void Visit(JsonUInt *value) { (void) value; } void Visit(JsonUInt64 *value) { (void) value; } void Visit(JsonInt *value) { (void) value; } void Visit(JsonInt64 *value) { (void) value; } void Visit(JsonDouble *value) { (void) value; } JsonObject *Object() { return m_obj; } private: JsonObject *m_obj; }; class ArrayCastVisitor : public JsonValueVisitorInterface { public: ArrayCastVisitor() : m_array(NULL) {} void Visit(JsonString *value) { (void) value; } void Visit(JsonBool *value) { (void) value; } void Visit(JsonNull *value) { (void) value; } void Visit(JsonRawValue *value) { (void) value; } void Visit(JsonObject *value) { (void) value; } void Visit(JsonArray *value) { m_array = value; } void Visit(JsonUInt *value) { (void) value; } void Visit(JsonUInt64 *value) { (void) value; } void Visit(JsonInt *value) { (void) value; } void Visit(JsonInt64 *value) { (void) value; } void Visit(JsonDouble *value) { (void) value; } JsonArray *Array() { return m_array; } private: JsonArray *m_array; }; } // namespace JsonValue* JsonValue::LookupElement(const JsonPointer &pointer) { JsonPointer::Iterator iter = pointer.begin(); return LookupElementWithIter(&iter); } JsonValue* JsonLeafValue::LookupElementWithIter( JsonPointer::Iterator *iterator) { if (!iterator->IsValid() || !iterator->AtEnd()) { return NULL; } (*iterator)++; // increment to move past the end. return this; } // Integer equality functions namespace { /* * This isn't pretty but it works. The original version used * numeric_limits::is_signed, numeric_limits::digits & numeric_limits::is_exact * to reduce the amount of code. However I couldn't get it to work without * signed vs unsigned warnings in gcc. */ template int CompareNumbers(T1 a, T2 b); template <> int CompareNumbers(uint32_t a, uint32_t b) { return (a < b) ? -1 : (a > b); } template <> int CompareNumbers(uint32_t a, int32_t b) { if (b < 0) { return 1; } return (a < static_cast(b)) ? -1 : (a > static_cast(b)); } template <> int CompareNumbers(uint32_t a, uint64_t b) { return (static_cast(a) < b) ? -1 : (static_cast(a) > b); } template <> int CompareNumbers(uint32_t a, int64_t b) { if (b < 0) { return 1; } return (static_cast(a) < b) ? -1 : (static_cast(a) > b); } template <> int CompareNumbers(uint32_t a, double b) { return (static_cast(a) < b) ? -1 : (static_cast(a) > b); } template <> int CompareNumbers(int32_t a, uint32_t b) { if (a < 0) { return -1; } return (static_cast(a) < b) ? -1 : (static_cast(a) > b); } template <> int CompareNumbers(int32_t a, int32_t b) { return (a < b) ? -1 : (a > b); } template <> int CompareNumbers(int32_t a, uint64_t b) { if (a < 0) { return -1; } return (static_cast(a) < b) ? -1 : (static_cast(a) > b); } template <> int CompareNumbers(int32_t a, int64_t b) { return (static_cast(a) < b) ? -1 : (static_cast(a) > b); } template <> int CompareNumbers(int32_t a, double b) { return (static_cast(a) < b) ? -1 : (static_cast(a) > b); } template <> int CompareNumbers(uint64_t a, uint32_t b) { return (a < static_cast(b)) ? -1 : (a > static_cast(b)); } template <> int CompareNumbers(uint64_t a, int32_t b) { if (b < 0) { return 1; } return (a < static_cast(b)) ? -1 : (a > static_cast(b)); } template <> int CompareNumbers(uint64_t a, uint64_t b) { return (a < b) ? -1 : (a > b); } template <> int CompareNumbers(uint64_t a, int64_t b) { if (b < 0) { return 1; } return (a < static_cast(b)) ? -1 : (a > static_cast(b)); } template <> int CompareNumbers(uint64_t a, double b) { return (static_cast(a) < b) ? -1 : (static_cast(a) > b); } template <> int CompareNumbers(int64_t a, uint32_t b) { if (a < 0) { return -1; } return (a < static_cast(b)) ? -1 : (a > static_cast(b)); } template <> int CompareNumbers(int64_t a, int32_t b) { return (static_cast(a) < b) ? -1 : (static_cast(a) > b); } template <> int CompareNumbers(int64_t a, uint64_t b) { if (a < 0) { return -1; } return (static_cast(a) < b) ? -1 : (static_cast(a) > b); } template <> int CompareNumbers(int64_t a, int64_t b) { return (a < b) ? -1 : (a > b); } template <> int CompareNumbers(int64_t a, double b) { return (static_cast(a) < b) ? -1 : (static_cast(a) > b); } template <> int CompareNumbers(double a, uint32_t b) { return (a < static_cast(b)) ? -1 : (a > static_cast(b)); } template <> int CompareNumbers(double a, int32_t b) { return (a < static_cast(b)) ? -1 : (a > static_cast(b)); } template <> int CompareNumbers(double a, uint64_t b) { return (a < static_cast(b)) ? -1 : (a > static_cast(b)); } template <> int CompareNumbers(double a, int64_t b) { return (a < static_cast(b)) ? -1 : (a > static_cast(b)); } template <> int CompareNumbers(double a, double b) { return (a < b) ? -1 : (a > b); } } // namespace // Number equality functions bool JsonUInt::Equals(const JsonInt &other) const { return CompareNumbers(m_value, other.Value()) == 0; } bool JsonUInt::Equals(const JsonUInt64 &other) const { return CompareNumbers(m_value, other.Value()) == 0; } bool JsonUInt::Equals(const JsonInt64 &other) const { return CompareNumbers(m_value, other.Value()) == 0; } bool JsonInt::Equals(const JsonUInt &other) const { return CompareNumbers(m_value, other.Value()) == 0; } bool JsonInt::Equals(const JsonUInt64 &other) const { return CompareNumbers(m_value, other.Value()) == 0; } bool JsonInt::Equals(const JsonInt64 &other) const { return CompareNumbers(m_value, other.Value()) == 0; } bool JsonUInt64::Equals(const JsonUInt &other) const { return CompareNumbers(m_value, other.Value()) == 0; } bool JsonUInt64::Equals(const JsonInt &other) const { return CompareNumbers(m_value, other.Value()) == 0; } bool JsonUInt64::Equals(const JsonInt64 &other) const { return CompareNumbers(m_value, other.Value()) == 0; } bool JsonInt64::Equals(const JsonUInt &other) const { return CompareNumbers(m_value, other.Value()) == 0; } bool JsonInt64::Equals(const JsonInt &other) const { return CompareNumbers(m_value, other.Value()) == 0; } bool JsonInt64::Equals(const JsonUInt64 &other) const { return CompareNumbers(m_value, other.Value()) == 0; } // Number inequality functions int JsonUInt::Compare(const JsonUInt &other) const { return CompareNumbers(m_value, other.Value()); } int JsonUInt::Compare(const JsonInt &other) const { return CompareNumbers(m_value, other.Value()); } int JsonUInt::Compare(const JsonUInt64 &other) const { return CompareNumbers(m_value, other.Value()); } int JsonUInt::Compare(const JsonInt64 &other) const { return CompareNumbers(m_value, other.Value()); } int JsonUInt::Compare(const JsonDouble &other) const { return CompareNumbers(m_value, other.Value()); } int JsonInt::Compare(const JsonUInt &other) const { return CompareNumbers(m_value, other.Value()); } int JsonInt::Compare(const JsonInt &other) const { return CompareNumbers(m_value, other.Value()); } int JsonInt::Compare(const JsonUInt64 &other) const { return CompareNumbers(m_value, other.Value()); } int JsonInt::Compare(const JsonInt64 &other) const { return CompareNumbers(m_value, other.Value()); } int JsonInt::Compare(const JsonDouble &other) const { return CompareNumbers(m_value, other.Value()); } int JsonUInt64::Compare(const JsonUInt &other) const { return CompareNumbers(m_value, other.Value()); } int JsonUInt64::Compare(const JsonInt &other) const { return CompareNumbers(m_value, other.Value()); } int JsonUInt64::Compare(const JsonUInt64 &other) const { return CompareNumbers(m_value, other.Value()); } int JsonUInt64::Compare(const JsonInt64 &other) const { return CompareNumbers(m_value, other.Value()); } int JsonUInt64::Compare(const JsonDouble &other) const { return CompareNumbers(m_value, other.Value()); } int JsonInt64::Compare(const JsonUInt &other) const { return CompareNumbers(m_value, other.Value()); } int JsonInt64::Compare(const JsonInt &other) const { return CompareNumbers(m_value, other.Value()); } int JsonInt64::Compare(const JsonUInt64 &other) const { return CompareNumbers(m_value, other.Value()); } int JsonInt64::Compare(const JsonInt64 &other) const { return CompareNumbers(m_value, other.Value()); } int JsonInt64::Compare(const JsonDouble &other) const { return CompareNumbers(m_value, other.Value()); } int JsonDouble::Compare(const JsonUInt &other) const { return CompareNumbers(m_value, other.Value()); } int JsonDouble::Compare(const JsonInt &other) const { return CompareNumbers(m_value, other.Value()); } int JsonDouble::Compare(const JsonUInt64 &other) const { return CompareNumbers(m_value, other.Value()); } int JsonDouble::Compare(const JsonInt64 &other) const { return CompareNumbers(m_value, other.Value()); } int JsonDouble::Compare(const JsonDouble &other) const { return CompareNumbers(m_value, other.Value()); } bool JsonUInt::FactorOf(const JsonUInt &value) const { return value.Value() % m_value == 0; } bool JsonUInt::FactorOf(const JsonInt &value) const { return value.Value() % m_value == 0; } bool JsonUInt::FactorOf(const JsonUInt64 &value) const { return value.Value() % m_value == 0; } bool JsonUInt::FactorOf(const JsonInt64 &value) const { return value.Value() % m_value == 0; } bool JsonUInt::FactorOf(const JsonDouble &value) const { return fmod(value.Value(), m_value) == 0; } bool JsonInt::FactorOf(const JsonUInt &value) const { return value.Value() % m_value == 0; } bool JsonInt::FactorOf(const JsonInt &value) const { return value.Value() % m_value == 0; } bool JsonInt::FactorOf(const JsonUInt64 &value) const { return value.Value() % m_value == 0; } bool JsonInt::FactorOf(const JsonInt64 &value) const { return value.Value() % m_value == 0; } bool JsonInt::FactorOf(const JsonDouble &value) const { return fmod(value.Value(), m_value) == 0; } bool JsonUInt64::FactorOf(const JsonUInt &value) const { return value.Value() % m_value == 0; } bool JsonUInt64::FactorOf(const JsonInt &value) const { return value.Value() % m_value == 0; } bool JsonUInt64::FactorOf(const JsonUInt64 &value) const { return value.Value() % m_value == 0; } bool JsonUInt64::FactorOf(const JsonInt64 &value) const { return value.Value() % m_value == 0; } bool JsonUInt64::FactorOf(const JsonDouble &value) const { return fmod(value.Value(), m_value) == 0; } bool JsonInt64::FactorOf(const JsonUInt &value) const { return value.Value() % m_value == 0; } bool JsonInt64::FactorOf(const JsonInt &value) const { return value.Value() % m_value == 0; } bool JsonInt64::FactorOf(const JsonUInt64 &value) const { return value.Value() % m_value == 0; } bool JsonInt64::FactorOf(const JsonInt64 &value) const { return value.Value() % m_value == 0; } bool JsonInt64::FactorOf(const JsonDouble &value) const { return fmod(value.Value(), m_value) == 0; } bool JsonDouble::FactorOf(const JsonUInt &value) const { return fmod(value.Value(), m_value) == 0; } bool JsonDouble::FactorOf(const JsonInt &value) const { return fmod(value.Value(), m_value) == 0; } bool JsonDouble::FactorOf(const JsonUInt64 &value) const { return fmod(value.Value(), m_value) == 0; } bool JsonDouble::FactorOf(const JsonInt64 &value) const { return fmod(value.Value(), m_value) == 0; } bool JsonDouble::FactorOf(const JsonDouble &value) const { return fmod(value.Value(), m_value) == 0; } JsonDouble::JsonDouble(double value) : m_value(value) { ostringstream str; str << value; m_as_string = str.str(); } JsonDouble::JsonDouble(const DoubleRepresentation &rep) { AsDouble(rep, &m_value); m_as_string = AsString(rep); } bool JsonDouble::AsDouble(const DoubleRepresentation &rep, double *out) { // TODO(simon): Check the limits here. double d = rep.fractional; while (d >= 1.0) { d /= 10.0; } for (unsigned int i = 0; i < rep.leading_fractional_zeros; i++) { d /= 10; } d += rep.full; d *= pow(10, rep.exponent); if (rep.is_negative && d != 0.0) { d *= -1; } *out = d; return true; } string JsonDouble::AsString(const DoubleRepresentation &rep) { // Populate the string member if (rep.full == 0 && rep.fractional == 0) { return "0"; } ostringstream output; if (rep.is_negative) { output << "-"; } output << rep.full; if (rep.fractional) { output << "."; if (rep.leading_fractional_zeros) { output << string(rep.leading_fractional_zeros, '0'); } output << rep.fractional; } if (rep.exponent) { output << "e" << rep.exponent; } return output.str(); } JsonObject::~JsonObject() { STLDeleteValues(&m_members); } JsonValue* JsonObject::LookupElementWithIter(JsonPointer::Iterator *iterator) { if (!iterator->IsValid()) { return NULL; } if (iterator->AtEnd()) { return this; } const string token = **iterator; (*iterator)++; JsonValue *value = STLFindOrNull(m_members, token); if (value) { return value->LookupElementWithIter(iterator); } else { return NULL; } } bool JsonObject::Equals(const JsonObject &other) const { if (m_members.size() != other.m_members.size()) { return false; } MemberMap::const_iterator our_iter = m_members.begin(); MemberMap::const_iterator other_iter = other.m_members.begin(); for (; our_iter != m_members.end() && other_iter != other.m_members.end(); our_iter++, other_iter++) { if (our_iter->first != other_iter->first || *(our_iter->second) != *(other_iter->second)) { return false; } } return true; } void JsonObject::Add(const string &key, const string &value) { STLReplaceAndDelete(&m_members, key, new JsonString(value)); } void JsonObject::Add(const string &key, const char *value) { Add(key, string(value)); } void JsonObject::Add(const string &key, unsigned int i) { STLReplaceAndDelete(&m_members, key, new JsonUInt(i)); } void JsonObject::Add(const string &key, int i) { STLReplaceAndDelete(&m_members, key, new JsonInt(i)); } void JsonObject::Add(const string &key, double d) { STLReplaceAndDelete(&m_members, key, new JsonDouble(d)); } void JsonObject::Add(const string &key, bool value) { STLReplaceAndDelete(&m_members, key, new JsonBool(value)); } void JsonObject::Add(const string &key) { STLReplaceAndDelete(&m_members, key, new JsonNull()); } void JsonObject::AddRaw(const string &key, const string &value) { STLReplaceAndDelete(&m_members, key, new JsonRawValue(value)); } bool JsonObject::Remove(const string &key) { return STLRemoveAndDelete(&m_members, key); } bool JsonObject::ReplaceValue(const string &key, JsonValue *value) { MemberMap::iterator iter = m_members.find(key); if (iter == m_members.end()) { delete value; return false; } else { delete iter->second; iter->second = value; return true; } } JsonObject* JsonObject::AddObject(const string &key) { JsonObject *obj = new JsonObject(); STLReplaceAndDelete(&m_members, key, obj); return obj; } JsonArray* JsonObject::AddArray(const string &key) { JsonArray *array = new JsonArray(); STLReplaceAndDelete(&m_members, key, array); return array; } void JsonObject::AddValue(const string &key, JsonValue *value) { STLReplaceAndDelete(&m_members, key, value); } JsonValue* JsonObject::Clone() const { JsonObject *object = new JsonObject(); MemberMap::const_iterator iter = m_members.begin(); for (; iter != m_members.end(); ++iter) { object->AddValue(iter->first, iter->second->Clone()); } return object; } void JsonObject::VisitProperties(JsonObjectPropertyVisitor *visitor) const { MemberMap::const_iterator iter = m_members.begin(); for (; iter != m_members.end(); ++iter) { visitor->VisitProperty(iter->first, *(iter->second)); } } JsonArray::~JsonArray() { STLDeleteElements(&m_values); } JsonValue* JsonArray::LookupElementWithIter(JsonPointer::Iterator *iterator) { if (!iterator->IsValid()) { return NULL; } if (iterator->AtEnd()) { return this; } unsigned int index; if (!StringToInt(**iterator, &index, true)) { (*iterator)++; return NULL; } (*iterator)++; if (index < m_values.size()) { return m_values[index]->LookupElementWithIter(iterator); } else { return NULL; } } bool JsonArray::Equals(const JsonArray &other) const { if (m_values.size() != other.m_values.size()) { return false; } ValuesVector::const_iterator our_iter = m_values.begin(); ValuesVector::const_iterator other_iter = other.m_values.begin(); for (; our_iter != m_values.end() && other_iter != other.m_values.end(); our_iter++, other_iter++) { if (**our_iter != **other_iter) { return false; } } return true; } bool JsonArray::RemoveElementAt(uint32_t index) { if (index < m_values.size()) { ValuesVector::iterator iter = m_values.begin() + index; delete *iter; m_values.erase(iter); return true; } return false; } bool JsonArray::ReplaceElementAt(uint32_t index, JsonValue *value) { if (index < m_values.size()) { ValuesVector::iterator iter = m_values.begin() + index; delete *iter; *iter = value; return true; } // Ownership is transferred, so it's up to us to delete it. delete value; return false; } bool JsonArray::InsertElementAt(uint32_t index, JsonValue *value) { if (index < m_values.size()) { ValuesVector::iterator iter = m_values.begin() + index; m_values.insert(iter, value); return true; } // Ownership is transferred, so it's up to us to delete it. delete value; return false; } JsonValue* JsonArray::Clone() const { JsonArray *array = new JsonArray(); ValuesVector::const_iterator iter = m_values.begin(); for (; iter != m_values.end(); iter++) { array->AppendValue((*iter)->Clone()); } return array; } const JsonValue *JsonArray::ElementAt(unsigned int i) const { if (i < m_values.size()) { return m_values[i]; } else { return NULL; } } JsonObject* ObjectCast(JsonValue *value) { // Benchmarks for 100M operations // dynamic_cast<> : 1.8s // Type() method & static_cast<>: 0.39s // typeip(value) == .. & static_cast<> : 0.34s // &typeif(value) == .. &static_cast<>: 0.30s // Visitor pattern : 2.18s // // The visitor pattern is more costly since it requires 2 vtable lookups. // If performance becomes an issue we should consider static_cast<> here. ObjectCastVisitor visitor; value->Accept(&visitor); return visitor.Object(); } JsonArray* ArrayCast(JsonValue *value) { ArrayCastVisitor visitor; value->Accept(&visitor); return visitor.Array(); } // operator<< std::ostream& operator<<(std::ostream &os, const JsonString &value) { return os << value.Value(); } std::ostream& operator<<(std::ostream &os, const JsonUInt &value) { return os << value.Value(); } std::ostream& operator<<(std::ostream &os, const JsonInt &value) { return os << value.Value(); } std::ostream& operator<<(std::ostream &os, const JsonUInt64 &value) { return os << value.Value(); } std::ostream& operator<<(std::ostream &os, const JsonInt64 &value) { return os << value.Value(); } std::ostream& operator<<(std::ostream &os, const JsonDouble &value) { return os << value.Value(); } std::ostream& operator<<(std::ostream &os, const JsonBool &value) { return os << value.Value(); } std::ostream& operator<<(std::ostream &os, const JsonNull &) { return os << "null"; } std::ostream& operator<<(std::ostream &os, const JsonRawValue &value) { return os << value.Value(); } } // namespace web } // namespace ola ola-0.10.9/common/web/SchemaParser.cpp0000664000175000017500000001402114376533110014426 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaParser.cpp * A json-schema Parser. * Copyright (C) 2014 Simon Newton */ #include "common/web/SchemaParser.h" #include #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/stl/STLUtils.h" #include "ola/web/Json.h" namespace ola { namespace web { using std::string; SchemaParser::SchemaParser() : JsonParserInterface(), m_pointer_tracker(&m_pointer), m_error_logger(&m_pointer) { } SchemaParser::~SchemaParser() {} void SchemaParser::Begin() { m_schema_defs.reset(); m_root_context.reset(); m_root_validator.reset(); STLEmptyStackAndDelete(&m_context_stack); m_error_logger.Reset(); } void SchemaParser::End() {} void SchemaParser::String(const string &value) { if (m_error_logger.HasError()) { return; } if (!m_root_context.get()) { m_error_logger.Error() << "Invalid string for first element: " << value; return; } m_pointer_tracker.IncrementIndex(); if (m_context_stack.top()) { m_context_stack.top()->String(&m_error_logger, value); } else { OLA_INFO << "In null context, skipping value " << value; } } void SchemaParser::Number(uint32_t value) { return HandleNumber(value); } void SchemaParser::Number(int32_t value) { return HandleNumber(value); } void SchemaParser::Number(uint64_t value) { return HandleNumber(value); } void SchemaParser::Number(int64_t value) { return HandleNumber(value); } void SchemaParser::Number(const JsonDouble::DoubleRepresentation &rep) { double d; JsonDouble::AsDouble(rep, &d); return HandleNumber(d); } void SchemaParser::Number(double value) { return HandleNumber(value); } void SchemaParser::Bool(bool value) { if (m_error_logger.HasError()) { return; } if (!m_root_context.get()) { m_error_logger.Error() << "Invalid bool for first element: " << value; return; } m_pointer_tracker.IncrementIndex(); if (m_context_stack.top()) { m_context_stack.top()->Bool(&m_error_logger, value); } else { OLA_INFO << "In null context, skipping value " << value; } } void SchemaParser::Null() { if (m_error_logger.HasError()) { return; } if (!m_root_context.get()) { m_error_logger.Error() << "Invalid null for first element"; return; } m_pointer_tracker.IncrementIndex(); if (m_context_stack.top()) { m_context_stack.top()->Null(&m_error_logger); } else { OLA_INFO << "In null context, skipping null"; } } void SchemaParser::OpenArray() { if (m_error_logger.HasError()) { return; } if (!m_root_context.get()) { m_error_logger.Error() << "Invalid array for first element"; return; } m_pointer_tracker.OpenArray(); if (m_context_stack.top()) { m_context_stack.push( m_context_stack.top()->OpenArray(&m_error_logger)); } else { OLA_INFO << "In null context, skipping OpenArray"; m_context_stack.push(NULL); } } void SchemaParser::CloseArray() { if (m_error_logger.HasError() || !m_root_context.get()) { return; } m_pointer_tracker.CloseArray(); m_context_stack.pop(); if (m_context_stack.top()) { m_context_stack.top()->CloseArray(&m_error_logger); } else { OLA_INFO << "In null context, skipping CloseArray"; } } void SchemaParser::OpenObject() { if (m_error_logger.HasError()) { return; } m_pointer_tracker.OpenObject(); if (!m_root_context.get()) { m_schema_defs.reset(new SchemaDefinitions()); m_root_context.reset(new SchemaParseContext(m_schema_defs.get())); m_context_stack.push(m_root_context.get()); } else { if (m_context_stack.top()) { m_context_stack.push( m_context_stack.top()->OpenObject(&m_error_logger)); } else { OLA_INFO << "In null context, skipping OpenObject"; m_context_stack.push(NULL); } } } void SchemaParser::ObjectKey(const string &key) { if (m_error_logger.HasError()) { return; } m_pointer_tracker.SetProperty(key); if (m_context_stack.top()) { m_context_stack.top()->ObjectKey(&m_error_logger, key); } else { OLA_INFO << "In null context, skipping key " << key; } } void SchemaParser::CloseObject() { if (m_error_logger.HasError()) { return; } m_pointer_tracker.CloseObject(); m_context_stack.pop(); if (m_context_stack.empty()) { // We're at the root m_root_validator.reset(m_root_context->GetValidator(&m_error_logger)); } else { if (m_context_stack.top()) { m_context_stack.top()->CloseObject(&m_error_logger); } } } void SchemaParser::SetError(const string &error) { m_error_logger.Error() << error; } bool SchemaParser::IsValidSchema() { return m_root_validator.get() != NULL; } string SchemaParser::Error() const { return m_error_logger.ErrorString(); } ValidatorInterface* SchemaParser::ClaimRootValidator() { return m_root_validator.release(); } SchemaDefinitions* SchemaParser::ClaimSchemaDefs() { return m_schema_defs.release(); } template void SchemaParser::HandleNumber(T t) { if (m_error_logger.HasError()) { return; } if (!m_root_context.get()) { m_error_logger.Error() << "Invalid number for first element: " << t; return; } m_pointer_tracker.IncrementIndex(); if (m_context_stack.top()) { m_context_stack.top()->Number(&m_error_logger, t); } else { OLA_INFO << "In null context, skipping number " << t; } } } // namespace web } // namespace ola ola-0.10.9/common/web/ParserTest.cpp0000664000175000017500000005040614376533110014154 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * ParserTest.cpp * Unittest for the Json Parser. * Copyright (C) 2014 Simon Newton */ #include #include #include #include "ola/web/Json.h" #include "ola/web/JsonLexer.h" #include "ola/web/JsonParser.h" #include "ola/web/JsonWriter.h" #include "ola/testing/TestUtils.h" using ola::web::JsonArray; using ola::web::JsonBool; using ola::web::JsonInt; using ola::web::JsonLexer; using ola::web::JsonNull; using ola::web::JsonObject; using ola::web::JsonParser; using ola::web::JsonString; using ola::web::JsonUInt; using ola::web::JsonValue; using ola::web::JsonWriter; using std::auto_ptr; using std::string; class JsonParserTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(JsonParserTest); CPPUNIT_TEST(testParseBool); CPPUNIT_TEST(testParseNull); CPPUNIT_TEST(testParseString); CPPUNIT_TEST(testParseNumber); CPPUNIT_TEST(testArray); CPPUNIT_TEST(testObject); CPPUNIT_TEST(testInvalidInput); CPPUNIT_TEST(testStressTests); CPPUNIT_TEST_SUITE_END(); public: void testParseBool(); void testParseNull(); void testParseString(); void testParseNumber(); void testArray(); void testObject(); void testInvalidInput(); void testStressTests(); }; CPPUNIT_TEST_SUITE_REGISTRATION(JsonParserTest); void JsonParserTest::testParseBool() { string error; auto_ptr value(JsonParser::Parse(" true ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("true"), JsonWriter::AsString(*value.get())); // no whitespace value.reset(JsonParser::Parse("true", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("true"), JsonWriter::AsString(*value.get())); // tabs value.reset(JsonParser::Parse("\ttrue\r\n", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("true"), JsonWriter::AsString(*value.get())); // false values value.reset(JsonParser::Parse("false", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("false"), JsonWriter::AsString(*value.get())); } void JsonParserTest::testParseNull() { string error; auto_ptr value(JsonParser::Parse(" null ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("null"), JsonWriter::AsString(*value.get())); } void JsonParserTest::testParseString() { string error; auto_ptr value(JsonParser::Parse("\"test\"", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("\"test\""), JsonWriter::AsString(*value.get())); // test a missing " value.reset(JsonParser::Parse("\"test", &error)); OLA_ASSERT_NULL(value.get()); // test escaping value.reset(JsonParser::Parse("\"test\\\" escape\"", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("\"test\\\" escape\""), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("\"
\n\\n
\"", &error)); OLA_ASSERT_NOT_NULL(value.get()); /* OLA_ASSERT_EQ(string("\"
\n\\n
\""), JsonWriter::AsString(*value.get())); */ } void JsonParserTest::testParseNumber() { string error; auto_ptr value(JsonParser::Parse(" 0", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("0"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse(" -0", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("0"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse(" 1 ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("1"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("4096 ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("4096"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse(" -1", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("-1"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse(" -345", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("-345"), JsonWriter::AsString(*value.get())); // Decimals value.reset(JsonParser::Parse(" 0.0", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("0"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse(" 0.1", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("0.1"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("0.123456", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("0.123456"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("-0.123456", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("-0.123456"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("3.14159", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("3.14159"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("-3.14159", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("-3.14159"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("-17.079", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("-17.079"), JsonWriter::AsString(*value.get())); // Exponents value.reset(JsonParser::Parse("0e1", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("0"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("0e-2", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("0"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("-0E1", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("0"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("-0e-3", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("0"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("1E4", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("1e4"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("5e-4", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("5e-4"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("912E-2", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("912e-2"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("-23e4", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("-23e4"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("-912E-2", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("-912e-2"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("14e0", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("14"), JsonWriter::AsString(*value.get())); // exponents with decimals value.reset(JsonParser::Parse("-3.1e2", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("-3.1e2"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("3.14E3", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("3.14e3"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("3.14e-1", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("3.14e-1"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("-2.718e-1", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("-2.718e-1"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse(" -0.2718E+2 ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("-0.2718e2"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("-0.2718e-1 ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("-0.2718e-1"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("0.2718e+1", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("0.2718e1"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("0.2718e-2 ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("0.2718e-2"), JsonWriter::AsString(*value.get())); // Invalid inputs value.reset(JsonParser::Parse("-", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("1e", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("1E", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("1e-", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("1E-", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("1e+", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("1E+", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("-", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("a", &error)); OLA_ASSERT_NULL(value.get()); } void JsonParserTest::testArray() { string error; auto_ptr value(JsonParser::Parse(" [ ]", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("[]"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("[ 1] ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("[1]"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("[ true,\tfalse ,null ] ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("[true, false, null]"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("[ 1\n, 2 \t, 3,4 ] ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("[1, 2, 3, 4]"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse( "[\"test]\", 1, [\"nested\"], 4] ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("[\n \"test]\",\n 1,\n [\"nested\"],\n 4\n]"), JsonWriter::AsString(*value.get())); // Invalid input value.reset(JsonParser::Parse("[abc] ", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("[,] ", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse(" [\n, ] ", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse(" [", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse(" [1", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse(" [1,", &error)); OLA_ASSERT_NULL(value.get()); } void JsonParserTest::testObject() { string error; auto_ptr value(JsonParser::Parse("{}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{\"key\" : 1} ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"key\": 1\n}"), JsonWriter::AsString(*value.get())); // Multiple keys value.reset(JsonParser::Parse( "{\"key1\" : 1, \"key2\" : 2} ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"key1\": 1,\n \"key2\": 2\n}"), JsonWriter::AsString(*value.get())); // Nested value.reset(JsonParser::Parse( "{\"key1\" : 1, \"key2\" : {\"age\": 24}} ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ( string("{\n \"key1\": 1,\n \"key2\": {\n \"age\": 24\n }\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse( "{\"key1\" : 1, \"key2\" : [1, 2 ] } ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"key1\": 1,\n \"key2\": [1, 2]\n}"), JsonWriter::AsString(*value.get())); // double key test value.reset(JsonParser::Parse("{\"key\" : 1, \"key\" : 2} ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"key\": 2\n}"), JsonWriter::AsString(*value.get())); // trailing comma test. This is outside the standard, but seems to be // commonly used. /* value.reset(JsonParser::Parse("{\"key\" : 1, } ", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"key\": 2\n}"), JsonWriter::AsString(*value.get())); */ value.reset(JsonParser::Parse("{", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{1", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{true", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{\"", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{\"key", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{\"key\"", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{\"key\":", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{\"key\" : }", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{'key': 1}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse( "{\"default\": {\"pets\": [1, 2, {null}]}}}", &error)); OLA_ASSERT_NULL(value.get()); } void JsonParserTest::testInvalidInput() { string error; auto_ptr value(JsonParser::Parse(" ", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("TRUE", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("FALSE", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("NULL", &error)); OLA_ASSERT_NULL(value.get()); } /** * From https://code.google.com/p/json-smart/wiki/FeaturesTests * Some of these overlap with the ones above. */ void JsonParserTest::testStressTests() { string error; auto_ptr value(JsonParser::Parse("{}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{ \"v\":\"1\"}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"v\": \"1\"\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{ \"v\":\"1\"\r\n}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"v\": \"1\"\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{ \"v\":1}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"v\": 1\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{ \"v\":\"ab'c\"}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"v\": \"ab'c\"\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{ \"PI\":3.141E-10}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"PI\": 3.141e-10\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{ \"PI\":3.141e-10}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"PI\": 3.141e-10\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{ \"v\":12345123456789}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"v\": 12345123456789\n}"), JsonWriter::AsString(*value.get())); /* // We don't pass the big-int test. value.reset(JsonParser::Parse("{ \"v\":123456789123456789123456789}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"v\": 123456789123456789123456789\n}"), JsonWriter::AsString(*value.get())); */ value.reset(JsonParser::Parse("[ 1,2,3,4]", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("[1, 2, 3, 4]"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("[ \"1\",\"2\",\"3\",\"4\"]", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("[\"1\", \"2\", \"3\", \"4\"]"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("[ { }, { }, []]", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("[\n {},\n {},\n []\n]"), JsonWriter::AsString(*value.get())); /* value.reset(JsonParser::Parse("{ \"v\":\"\u2000\u20ff\"}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"v\": \"\"\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{ \"v\":\"\u2000\u20FF\"}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"v\": \"\"\n}"), JsonWriter::AsString(*value.get())); */ value.reset(JsonParser::Parse("{ \"a\":\"hp://foo\"}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"a\": \"hp:\\/\\/foo\"\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{ \"a\":null}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"a\": null\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{ \"a\":true}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"a\": true\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{ \"a\" : true }", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"a\": true\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse( "{ \"v\" : 1.7976931348623157E308}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"v\": 1.7976931348623157e308\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse( "{ \"v\" : 1.79E08}", &error)); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{\n \"v\": 1.79e8\n}"), JsonWriter::AsString(*value.get())); value.reset(JsonParser::Parse("{'X' : 's }", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{\"X\" : \"s }", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{'X", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{\"X", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ \"v\":'ab\"c'}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ \"v\":str}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ \"v\":It's'Work}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ a:1234}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("[ a,bc]", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ \"v\":s1 s2}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ \"v\":s1 s2 }", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ \"a\":\"foo.bar\"}#toto", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ 'value':'string'}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{v:15-55}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{v:15%}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{v:15.06%}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ \"v\":s1' s2}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ \"v\":s1\" \"s2}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ \"NaN\":NaN}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("[ a},b]", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("[ a:,b]", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ a,b:123}", &error)); OLA_ASSERT_NULL(value.get()); value.reset(JsonParser::Parse("{ a]b:123}", &error)); OLA_ASSERT_NULL(value.get()); } ola-0.10.9/common/web/JsonSchema.cpp0000664000175000017500000005640514376533110014117 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * JsonSchema.cpp * Json Schema validation. * See http://www.json-schema.org/ * Copyright (C) 2014 Simon Newton */ #include #include #include #include #include #include "ola/Logging.h" #include "common/web/SchemaParser.h" #include "ola/stl/STLUtils.h" #include "ola/web/JsonLexer.h" #include "ola/web/JsonSchema.h" #include "ola/web/JsonTypes.h" namespace ola { namespace web { using std::auto_ptr; using std::set; using std::string; using std::vector; // BaseValidator // ----------------------------------------------------------------------------- BaseValidator::~BaseValidator() { STLDeleteElements(&m_enums); } JsonObject* BaseValidator::GetSchema() const { JsonObject *schema = new JsonObject(); if (!m_schema.empty()) { schema->Add("$schema", m_schema); } if (!m_id.empty()) { schema->Add("id", m_id); } if (!m_title.empty()) { schema->Add("title", m_title); } if (!m_description.empty()) { schema->Add("description", m_description); } const string type = JsonTypeToString(m_type); if (!type.empty()) { schema->Add("type", type); } if (m_default_value.get()) { schema->AddValue("default", m_default_value.get()->Clone()); } if (!m_enums.empty()) { JsonArray *enum_array = schema->AddArray("enum"); vector::const_iterator iter = m_enums.begin(); for (; iter != m_enums.end(); ++iter) { enum_array->AppendValue((*iter)->Clone()); } } ExtendSchema(schema); return schema; } void BaseValidator::SetSchema(const string &schema) { m_schema = schema; } void BaseValidator::SetId(const string &id) { m_id = id; } void BaseValidator::SetTitle(const string &title) { m_title = title; } void BaseValidator::SetDescription(const string &description) { m_description = description; } void BaseValidator::SetDefaultValue(const JsonValue *value) { m_default_value.reset(value); } const JsonValue *BaseValidator::GetDefaultValue() const { return m_default_value.get(); } void BaseValidator::AddEnumValue(const JsonValue *value) { m_enums.push_back(value); } bool BaseValidator::CheckEnums(const JsonValue &value) { if (m_enums.empty()) { return true; } vector::const_iterator iter = m_enums.begin(); for (; iter != m_enums.end(); ++iter) { if (**iter == value) { return true; } } return false; } // ReferenceValidator // ----------------------------------------------------------------------------- ReferenceValidator::ReferenceValidator(const SchemaDefinitions *definitions, const string &schema) : m_definitions(definitions), m_schema(schema), m_validator(NULL) { } bool ReferenceValidator::IsValid() const { return m_validator ? m_validator->IsValid() : false; } void ReferenceValidator::Visit(const JsonString &value) { Validate(value); } void ReferenceValidator::Visit(const JsonBool &value) { Validate(value); } void ReferenceValidator::Visit(const JsonNull &value) { Validate(value); } void ReferenceValidator::Visit(const JsonRawValue &value) { Validate(value); } void ReferenceValidator::Visit(const JsonObject &value) { Validate(value); } void ReferenceValidator::Visit(const JsonArray &value) { Validate(value); } void ReferenceValidator::Visit(const JsonUInt &value) { Validate(value); } void ReferenceValidator::Visit(const JsonUInt64 &value) { Validate(value); } void ReferenceValidator::Visit(const JsonInt &value) { Validate(value); } void ReferenceValidator::Visit(const JsonInt64 &value) { Validate(value); } void ReferenceValidator::Visit(const JsonDouble &value) { Validate(value); } JsonObject* ReferenceValidator::GetSchema() const { JsonObject *schema = new JsonObject(); schema->Add("$ref", m_schema); return schema; } void ReferenceValidator::SetSchema(const std::string&) {} void ReferenceValidator::SetId(const std::string &) {} void ReferenceValidator::SetTitle(const std::string &) {} void ReferenceValidator::SetDescription(const std::string &) {} void ReferenceValidator::SetDefaultValue(const JsonValue *) {} const JsonValue *ReferenceValidator::GetDefaultValue() const { return NULL; } template void ReferenceValidator::Validate(const T &value) { if (!m_validator) { m_validator = m_definitions->Lookup(m_schema); } if (m_validator) { value.Accept(m_validator); } } // StringValidator // ----------------------------------------------------------------------------- void StringValidator::Visit(const JsonString &str) { const std::string& value = str.Value(); size_t str_size = value.size(); if (str_size < m_options.min_length) { m_is_valid = false; return; } if (m_options.max_length >= 0 && str_size > static_cast(m_options.max_length)) { m_is_valid = false; return; } m_is_valid = CheckEnums(str); } void StringValidator::ExtendSchema(JsonObject *schema) const { if (m_options.min_length > 0) { schema->Add("minLength", m_options.min_length); } if (m_options.max_length >= 0) { schema->Add("maxLength", m_options.max_length); } // TODO(simon): Add pattern here? // TODO(simon): Add format here? } // IntegerValidator // ----------------------------------------------------------------------------- IntegerValidator::~IntegerValidator() { STLDeleteElements(&m_constraints); } void IntegerValidator::AddConstraint(NumberConstraint *constraint) { m_constraints.push_back(constraint); } void IntegerValidator::Visit(const JsonUInt &value) { CheckValue(value); } void IntegerValidator::Visit(const JsonInt &value) { CheckValue(value); } void IntegerValidator::Visit(const JsonUInt64 &value) { CheckValue(value); } void IntegerValidator::Visit(const JsonInt64 &value) { CheckValue(value); } void IntegerValidator::Visit(const JsonDouble &value) { BaseValidator::Visit(value); } void IntegerValidator::ExtendSchema(JsonObject *schema) const { vector::const_iterator iter = m_constraints.begin(); for (; iter != m_constraints.end(); ++iter) { (*iter)->ExtendSchema(schema); } } void IntegerValidator::CheckValue(const JsonNumber &value) { vector::const_iterator iter = m_constraints.begin(); for (; iter != m_constraints.end(); ++iter) { if (!(*iter)->IsValid(value)) { m_is_valid = false; return; } } m_is_valid = CheckEnums(value); } void NumberValidator::Visit(const JsonDouble &value) { CheckValue(value); } // ObjectValidator // ----------------------------------------------------------------------------- ObjectValidator::ObjectValidator(const Options &options) : BaseValidator(JSON_OBJECT), m_options(options) { } ObjectValidator::~ObjectValidator() { STLDeleteValues(&m_property_validators); STLDeleteValues(&m_schema_dependencies); } void ObjectValidator::AddValidator(const std::string &property, ValidatorInterface *validator) { STLReplaceAndDelete(&m_property_validators, property, validator); } void ObjectValidator::SetAdditionalValidator(ValidatorInterface *validator) { m_additional_property_validator.reset(validator); } void ObjectValidator::AddSchemaDependency(const string &property, ValidatorInterface *validator) { STLReplaceAndDelete(&m_schema_dependencies, property, validator); } void ObjectValidator::AddPropertyDependency(const string &property, const StringSet &properties) { m_property_dependencies[property] = properties; } void ObjectValidator::Visit(const JsonObject &obj) { m_is_valid = true; if (obj.Size() < m_options.min_properties) { m_is_valid = false; return; } if (m_options.max_properties > 0 && obj.Size() > static_cast(m_options.max_properties)) { m_is_valid = false; return; } m_seen_properties.clear(); obj.VisitProperties(this); StringSet missing_properties; std::set_difference(m_options.required_properties.begin(), m_options.required_properties.end(), m_seen_properties.begin(), m_seen_properties.end(), std::inserter(missing_properties, missing_properties.end())); if (!missing_properties.empty()) { m_is_valid = false; } // Check PropertyDependencies PropertyDependencies::const_iterator prop_iter = m_property_dependencies.begin(); for (; prop_iter != m_property_dependencies.end() && m_is_valid; ++prop_iter) { if (!STLContains(m_seen_properties, prop_iter->first)) { continue; } StringSet::const_iterator iter = prop_iter->second.begin(); for (; iter != prop_iter->second.end(); ++iter) { if (!STLContains(m_seen_properties, *iter)) { m_is_valid = false; break; } } } // Check Schema Dependencies SchemaDependencies::const_iterator schema_iter = m_schema_dependencies.begin(); for (; schema_iter != m_schema_dependencies.end() && m_is_valid; ++schema_iter) { if (STLContains(m_seen_properties, schema_iter->first)) { obj.Accept(schema_iter->second); if (!schema_iter->second->IsValid()) { m_is_valid = false; break; } } } } void ObjectValidator::VisitProperty(const std::string &property, const JsonValue &value) { m_seen_properties.insert(property); // The algorithm is described in section 8.3.3 ValidatorInterface *validator = STLFindOrNull( m_property_validators, property); // patternProperties would be added here if supported if (!validator) { // try the additional validator validator = m_additional_property_validator.get(); } if (validator) { value.Accept(validator); m_is_valid &= validator->IsValid(); } else { // No validator found if (m_options.has_allow_additional_properties && !m_options.allow_additional_properties) { m_is_valid &= false; } } } void ObjectValidator::ExtendSchema(JsonObject *schema) const { if (m_options.min_properties > 0) { schema->Add("minProperties", m_options.min_properties); } if (m_options.max_properties >= 0) { schema->Add("maxProperties", m_options.max_properties); } if (m_options.has_required_properties) { JsonArray *required_properties = schema->AddArray("required"); StringSet::const_iterator iter = m_options.required_properties.begin(); for (; iter != m_options.required_properties.end(); ++iter) { required_properties->Append(*iter); } } if (!m_property_validators.empty()) { JsonObject *properties = schema->AddObject("properties"); PropertyValidators::const_iterator iter = m_property_validators.begin(); for (; iter != m_property_validators.end(); iter++) { JsonObject *child_schema = iter->second->GetSchema(); properties->AddValue(iter->first, child_schema); } } if (m_options.has_allow_additional_properties) { schema->Add("additionalProperties", m_options.allow_additional_properties); } else if (m_additional_property_validator.get()) { schema->AddValue("additionalProperties", m_additional_property_validator->GetSchema()); } if (!(m_property_dependencies.empty() && m_schema_dependencies.empty())) { JsonObject *dependencies = schema->AddObject("dependencies"); PropertyDependencies::const_iterator prop_iter = m_property_dependencies.begin(); for (; prop_iter != m_property_dependencies.end(); ++prop_iter) { JsonArray *properties = dependencies->AddArray(prop_iter->first); StringSet::const_iterator iter = prop_iter->second.begin(); for (; iter != prop_iter->second.end(); ++iter) { properties->Append(*iter); } } SchemaDependencies::const_iterator schema_iter = m_schema_dependencies.begin(); for (; schema_iter != m_schema_dependencies.end(); ++schema_iter) { dependencies->AddValue(schema_iter->first, schema_iter->second->GetSchema()); } } } // ArrayValidator // ----------------------------------------------------------------------------- ArrayValidator::ArrayValidator(Items *items, AdditionalItems *additional_items, const Options &options) : BaseValidator(JSON_ARRAY), m_items(items), m_additional_items(additional_items), m_options(options), m_wildcard_validator(new WildcardValidator()) { } ArrayValidator::~ArrayValidator() {} // items: array or schema (object) // additionalItems : schema (object) or bool // // items = object // items = array, additional = bool // items = array, additional = schema void ArrayValidator::Visit(const JsonArray &array) { if (array.Size() < m_options.min_items) { m_is_valid = false; return; } if (m_options.max_items > 0 && array.Size() > static_cast(m_options.max_items)) { m_is_valid = false; return; } auto_ptr element_validator( ConstructElementValidator()); for (unsigned int i = 0; i < array.Size(); i++) { array.ElementAt(i)->Accept(element_validator.get()); if (!element_validator->IsValid()) { break; } } m_is_valid = element_validator->IsValid(); if (!m_is_valid) { return; } if (m_options.unique_items) { for (unsigned int i = 0; i < array.Size(); i++) { for (unsigned int j = 0; j < i; j++) { if (*(array.ElementAt(i)) == *(array.ElementAt(j))) { m_is_valid = false; return; } } } } } void ArrayValidator::ExtendSchema(JsonObject *schema) const { if (m_options.min_items > 0) { schema->Add("minItems", m_options.min_items); } if (m_options.max_items >= 0) { schema->Add("maxItems", m_options.max_items); } if (m_options.unique_items) { schema->Add("uniqueItems", m_options.unique_items); } if (m_items.get()) { // items exists if (m_items->Validator()) { // items is an object JsonObject *child_schema = m_items->Validator()->GetSchema(); schema->AddValue("items", child_schema); } else { // items is an array const ValidatorList &validators = m_items->Validators(); JsonArray *items = schema->AddArray("items"); ValidatorList::const_iterator iter = validators.begin(); for (; iter != validators.end(); iter++) { JsonObject *child_schema = (*iter)->GetSchema(); items->Append(child_schema); } } } if (m_additional_items.get()) { // additionalItems exists if (m_additional_items->Validator()) { // additionalItems is an object JsonObject *child_schema = m_additional_items->Validator()->GetSchema(); schema->AddValue("additionalItems", child_schema); } else { // additionalItems is a bool schema->Add("additionalItems", m_additional_items->AllowAdditional()); } } } // TODO(simon): do this once at construction, rather than on every visit? ArrayValidator::ArrayElementValidator* ArrayValidator::ConstructElementValidator() const { if (m_items.get()) { if (m_items->Validator()) { // 8.2.3.1, items is an object. ValidatorList empty_validators; return new ArrayElementValidator(empty_validators, m_items->Validator()); } else { // 8.2.3.3, items is an array. const ValidatorList &validators = m_items->Validators(); ValidatorInterface *default_validator = NULL; // Check to see if additionalItems it defined. if (m_additional_items.get()) { if (m_additional_items->Validator()) { // additionalItems is an object default_validator = m_additional_items->Validator(); } else if (m_additional_items->AllowAdditional()) { // additionalItems is a bool, and true default_validator = m_wildcard_validator.get(); } } else { // additionalItems not provided, so it defaults to the empty schema // (wildcard). default_validator = m_wildcard_validator.get(); } return new ArrayElementValidator(validators, default_validator); } } else { // no items, therefore it defaults to the empty (wildcard) schema. ValidatorList empty_validators; return new ArrayElementValidator( empty_validators, m_wildcard_validator.get()); } } // ArrayValidator::ArrayElementValidator // ----------------------------------------------------------------------------- ArrayValidator::ArrayElementValidator::ArrayElementValidator( const ValidatorList &validators, ValidatorInterface *default_validator) : BaseValidator(JSON_UNDEFINED), m_item_validators(validators.begin(), validators.end()), m_default_validator(default_validator) { } void ArrayValidator::ArrayElementValidator::Visit( const JsonString &value) { ValidateItem(value); } void ArrayValidator::ArrayElementValidator::Visit(const JsonBool &value) { ValidateItem(value); } void ArrayValidator::ArrayElementValidator::Visit(const JsonNull &value) { ValidateItem(value); } void ArrayValidator::ArrayElementValidator::Visit(const JsonRawValue &value) { ValidateItem(value); } void ArrayValidator::ArrayElementValidator::Visit(const JsonObject &value) { ValidateItem(value); } void ArrayValidator::ArrayElementValidator::Visit(const JsonArray &value) { ValidateItem(value); } void ArrayValidator::ArrayElementValidator::Visit(const JsonUInt &value) { ValidateItem(value); } void ArrayValidator::ArrayElementValidator::Visit( const JsonUInt64 &value) { ValidateItem(value); } void ArrayValidator::ArrayElementValidator::Visit(const JsonInt &value) { ValidateItem(value); } void ArrayValidator::ArrayElementValidator::Visit(const JsonInt64 &value) { ValidateItem(value); } void ArrayValidator::ArrayElementValidator::Visit( const JsonDouble &value) { ValidateItem(value); } template void ArrayValidator::ArrayElementValidator::ValidateItem(const T &item) { ValidatorInterface *validator = NULL; if (!m_item_validators.empty()) { validator = m_item_validators.front(); m_item_validators.pop_front(); } else if (!m_default_validator) { // additional items aren't allowed m_is_valid = false; return; } else { validator = m_default_validator; } item.Accept(validator); m_is_valid = validator->IsValid(); } // ConjunctionValidator // ----------------------------------------------------------------------------- ConjunctionValidator::ConjunctionValidator(const string &keyword, ValidatorList *validators) : BaseValidator(JSON_UNDEFINED), m_keyword(keyword), m_validators(*validators) { validators->clear(); } ConjunctionValidator::~ConjunctionValidator() { STLDeleteElements(&m_validators); } void ConjunctionValidator::ExtendSchema(JsonObject *schema) const { JsonArray *items = schema->AddArray(m_keyword); ValidatorList::const_iterator iter = m_validators.begin(); for (; iter != m_validators.end(); ++iter) { JsonObject *child_schema = (*iter)->GetSchema(); items->Append(child_schema); } } // AllOfValidator // ----------------------------------------------------------------------------- void AllOfValidator::Validate(const JsonValue &value) { ValidatorList::iterator iter = m_validators.begin(); for (; iter != m_validators.end(); ++iter) { value.Accept(*iter); if (!(*iter)->IsValid()) { m_is_valid = false; return; } } m_is_valid = true; } // AnyOfValidator // ----------------------------------------------------------------------------- void AnyOfValidator::Validate(const JsonValue &value) { ValidatorList::iterator iter = m_validators.begin(); for (; iter != m_validators.end(); ++iter) { value.Accept(*iter); if ((*iter)->IsValid()) { m_is_valid = true; return; } } m_is_valid = false; } // OneOfValidator // ----------------------------------------------------------------------------- void OneOfValidator::Validate(const JsonValue &value) { bool matched = false; ValidatorList::iterator iter = m_validators.begin(); for (; iter != m_validators.end(); ++iter) { value.Accept(*iter); if ((*iter)->IsValid()) { if (matched) { m_is_valid = false; return; } else { matched = true; } } } m_is_valid = matched; } // NotValidator // ----------------------------------------------------------------------------- void NotValidator::Validate(const JsonValue &value) { value.Accept(m_validator.get()); m_is_valid = !m_validator->IsValid(); } void NotValidator::ExtendSchema(JsonObject *schema) const { JsonObject *child_schema = m_validator->GetSchema(); schema->AddValue("not", child_schema); } // SchemaDefinitions // ----------------------------------------------------------------------------- SchemaDefinitions::~SchemaDefinitions() { STLDeleteValues(&m_validators); } void SchemaDefinitions::Add(const string &schema_name, ValidatorInterface *validator) { STLReplaceAndDelete(&m_validators, schema_name, validator); } ValidatorInterface *SchemaDefinitions::Lookup(const string &schema_name) const { return STLFindOrNull(m_validators, schema_name); } void SchemaDefinitions::AddToJsonObject(JsonObject *json) const { SchemaMap::const_iterator iter = m_validators.begin(); for (; iter != m_validators.end(); ++iter) { JsonObject *schema = iter->second->GetSchema(); json->AddValue(iter->first, schema); } } // JsonSchema // ----------------------------------------------------------------------------- JsonSchema::JsonSchema(const std::string &schema_url, ValidatorInterface *root_validator, SchemaDefinitions *schema_defs) : m_schema_uri(schema_url), m_root_validator(root_validator), m_schema_defs(schema_defs) { } string JsonSchema::SchemaURI() const { return m_schema_uri; } bool JsonSchema::IsValid(const JsonValue &value) { value.Accept(m_root_validator.get()); return m_root_validator->IsValid(); } const JsonObject* JsonSchema::AsJson() const { JsonObject *json = m_root_validator->GetSchema(); if (json && m_schema_defs->HasDefinitions()) { JsonObject *definitions = json->AddObject("definitions"); m_schema_defs->AddToJsonObject(definitions); } return json; } JsonSchema* JsonSchema::FromString(const string& schema_string, string *error) { *error = ""; SchemaParser schema_parser; bool ok = JsonLexer::Parse(schema_string, &schema_parser); if (!ok || !schema_parser.IsValidSchema()) { *error = schema_parser.Error(); return NULL; } return new JsonSchema("", schema_parser.ClaimRootValidator(), schema_parser.ClaimSchemaDefs()); } } // namespace web } // namespace ola ola-0.10.9/common/web/SchemaParseContext.cpp0000664000175000017500000007766714376533110015642 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaParseContext.cpp * Stores the state required as we walk the JSON schema document. * Copyright (C) 2014 Simon Newton */ #include "common/web/SchemaParseContext.h" #include #include #include #include #include #include #include #include "ola/Logging.h" #include "ola/StringUtils.h" #include "ola/stl/STLUtils.h" #include "ola/web/Json.h" #include "ola/web/JsonTypes.h" namespace ola { namespace web { namespace { /* * A cool hack to determine if a type is positive. * We do this to avoid: * comparison of unsigned expression >= 0 is always true * warnings. See http://gcc.gnu.org/ml/gcc-help/2010-08/msg00286.html */ template struct positive { bool operator()(const T &x) { return x >= 0; } }; template struct positive{ bool operator()(const T &) { return true; } }; } // namespace using std::auto_ptr; using std::pair; using std::set; using std::string; using std::vector; // DefinitionsParseContext // Used for parsing an object with key : json schema pairs, within 'definitions' SchemaParseContextInterface* DefinitionsParseContext::OpenObject( OLA_UNUSED SchemaErrorLogger *logger) { m_current_schema.reset(new SchemaParseContext(m_schema_defs)); return m_current_schema.get(); } void DefinitionsParseContext::CloseObject(SchemaErrorLogger *logger) { string key = TakeKeyword(); ValidatorInterface *schema = m_current_schema->GetValidator(logger); m_schema_defs->Add(key, schema); m_current_schema.reset(); } // StrictTypedParseContext // Used as a parent class for many of the other contexts. void StrictTypedParseContext::String(SchemaErrorLogger *logger, const string &value) { ReportErrorForType(logger, TypeFromValue(value)); } void StrictTypedParseContext::Number(SchemaErrorLogger *logger, uint32_t value) { ReportErrorForType(logger, TypeFromValue(value)); } void StrictTypedParseContext::Number(SchemaErrorLogger *logger, int32_t value) { ReportErrorForType(logger, TypeFromValue(value)); } void StrictTypedParseContext::Number(SchemaErrorLogger *logger, uint64_t value) { ReportErrorForType(logger, TypeFromValue(value)); } void StrictTypedParseContext::Number(SchemaErrorLogger *logger, int64_t value) { ReportErrorForType(logger, TypeFromValue(value)); } void StrictTypedParseContext::Number(SchemaErrorLogger *logger, double value) { ReportErrorForType(logger, TypeFromValue(value)); } void StrictTypedParseContext::Bool(SchemaErrorLogger *logger, bool value) { ReportErrorForType(logger, TypeFromValue(value)); } void StrictTypedParseContext::Null(SchemaErrorLogger *logger) { ReportErrorForType(logger, JSON_NULL); } SchemaParseContextInterface* StrictTypedParseContext::OpenArray( SchemaErrorLogger *logger) { ReportErrorForType(logger, JSON_ARRAY); return NULL; } void StrictTypedParseContext::CloseArray( OLA_UNUSED SchemaErrorLogger *logger) { } SchemaParseContextInterface* StrictTypedParseContext::OpenObject( SchemaErrorLogger *logger) { ReportErrorForType(logger, JSON_ARRAY); return NULL; } void StrictTypedParseContext::CloseObject( OLA_UNUSED SchemaErrorLogger *logger) { } void StrictTypedParseContext::ReportErrorForType( SchemaErrorLogger *logger, JsonType type) { logger->Error() << "Invalid type '" << JsonTypeToString(type) << "' in 'required', elements must be strings"; } // SchemaParseContext // Used for parsing an object that describes a JSON schema. ValidatorInterface* SchemaParseContext::GetValidator( SchemaErrorLogger *logger) { if (m_ref_schema.IsSet()) { return new ReferenceValidator(m_schema_defs, m_ref_schema.Value()); } BaseValidator *validator = NULL; auto_ptr int_validator; switch (m_type) { case JSON_UNDEFINED: break; case JSON_ARRAY: validator = BuildArrayValidator(logger); break; case JSON_BOOLEAN: validator = new BoolValidator(); break; case JSON_INTEGER: int_validator.reset(new IntegerValidator()); break; case JSON_NULL: validator = new NullValidator(); break; case JSON_NUMBER: int_validator.reset(new NumberValidator()); break; case JSON_OBJECT: validator = BuildObjectValidator(logger); break; case JSON_STRING: validator = BuildStringValidator(logger); break; default: {} } if (int_validator.get()) { if (!AddNumberConstraints(int_validator.get(), logger)) { return NULL; } validator = int_validator.release(); } if (!validator && m_allof_context.get()) { ValidatorInterface::ValidatorList all_of_validators; m_allof_context->GetValidators(logger, &all_of_validators); if (all_of_validators.empty()) { logger->Error() << "allOf must contain at least one schema"; return NULL; } validator = new AllOfValidator(&all_of_validators); } if (!validator && m_anyof_context.get()) { ValidatorInterface::ValidatorList any_of_validators; m_anyof_context->GetValidators(logger, &any_of_validators); if (any_of_validators.empty()) { logger->Error() << "anyOf must contain at least one schema"; return NULL; } validator = new AnyOfValidator(&any_of_validators); } if (!validator && m_oneof_context.get()) { ValidatorInterface::ValidatorList one_of_validators; m_oneof_context->GetValidators(logger, &one_of_validators); if (one_of_validators.empty()) { logger->Error() << "oneOf must contain at least one schema"; return NULL; } validator = new OneOfValidator(&one_of_validators); } if (!validator && m_not_context.get()) { validator = new NotValidator(m_not_context->GetValidator(logger)); } if (validator == NULL) { if (m_type == JSON_UNDEFINED) { validator = new WildcardValidator(); } else { logger->Error() << "Unknown type: " << JsonTypeToString(m_type); return NULL; } } if (m_schema.IsSet()) { validator->SetSchema(m_schema.Value()); m_schema.Reset(); } if (m_id.IsSet()) { validator->SetId(m_id.Value()); m_id.Reset(); } if (m_title.IsSet()) { validator->SetTitle(m_title.Value()); m_title.Reset(); } if (m_description.IsSet()) { validator->SetDescription(m_description.Value()); m_description.Reset(); } if (m_default_value.get()) { validator->SetDefaultValue(m_default_value.release()); } if (m_enum_context.get()) { m_enum_context->AddEnumsToValidator(validator); } return validator; } void SchemaParseContext::ObjectKey(OLA_UNUSED SchemaErrorLogger *logger, const string &keyword) { m_keyword = LookupKeyword(keyword); } void SchemaParseContext::String(SchemaErrorLogger *logger, const string &value) { if (!ValidTypeForKeyword(logger, m_keyword, TypeFromValue(value))) { return; } switch (m_keyword) { case SCHEMA_REF: m_ref_schema.Set(value); break; case SCHEMA_SCHEMA: m_schema.Set(value); break; case SCHEMA_DESCRIPTION: m_description.Set(value); break; case SCHEMA_DEFAULT: m_default_value.reset(new JsonString(value)); break; case SCHEMA_FORMAT: m_format.Set(value); break; case SCHEMA_ID: m_id.Set(value); break; case SCHEMA_TITLE: m_title.Set(value); break; case SCHEMA_TYPE: m_type = StringToJsonType(value); if (m_type == JSON_UNDEFINED) { logger->Error() << "Invalid type: " << value; } break; default: // Nothing, we ignore keywords we don't support. {} } } void SchemaParseContext::Number(SchemaErrorLogger *logger, uint32_t value) { ProcessInt(logger, value); } void SchemaParseContext::Number(SchemaErrorLogger *logger, int32_t value) { ProcessInt(logger, value); } void SchemaParseContext::Number(SchemaErrorLogger *logger, uint64_t value) { ProcessInt(logger, value); } void SchemaParseContext::Number(SchemaErrorLogger *logger, int64_t value) { ProcessInt(logger, value); } void SchemaParseContext::Number(SchemaErrorLogger *logger, double value) { ValidTypeForKeyword(logger, m_keyword, TypeFromValue(value)); switch (m_keyword) { case SCHEMA_DEFAULT: m_default_value.reset(new JsonDouble(value)); break; case SCHEMA_MAXIMUM: m_maximum.reset(JsonValue::NewNumberValue(value)); break; case SCHEMA_MINIMUM: m_minimum.reset(JsonValue::NewNumberValue(value)); break; case SCHEMA_MULTIPLEOF: if (value <= 0) { logger->Error() << KeywordToString(m_keyword) << " can't be negative"; } else { m_multiple_of.reset(JsonValue::NewNumberValue(value)); } return; default: {} } } void SchemaParseContext::Bool(SchemaErrorLogger *logger, bool value) { if (!ValidTypeForKeyword(logger, m_keyword, TypeFromValue(value))) { OLA_INFO << "type was not valid"; return; } switch (m_keyword) { case SCHEMA_DEFAULT: m_default_value.reset(new JsonBool(value)); break; case SCHEMA_EXCLUSIVE_MAXIMUM: m_exclusive_maximum.Set(value); break; case SCHEMA_EXCLUSIVE_MINIMUM: m_exclusive_minimum.Set(value); break; case SCHEMA_UNIQUE_ITEMS: m_unique_items.Set(value); break; case SCHEMA_ADDITIONAL_ITEMS: m_additional_items.Set(value); break; case SCHEMA_ADDITIONAL_PROPERTIES: m_additional_properties.Set(value); default: {} } } void SchemaParseContext::Null(SchemaErrorLogger *logger) { ValidTypeForKeyword(logger, m_keyword, JSON_NULL); switch (m_keyword) { case SCHEMA_DEFAULT: m_default_value.reset(new JsonNull()); break; default: {} } } SchemaParseContextInterface* SchemaParseContext::OpenArray( SchemaErrorLogger *logger) { if (!ValidTypeForKeyword(logger, m_keyword, JSON_ARRAY)) { return NULL; } switch (m_keyword) { case SCHEMA_DEFAULT: m_default_value_context.reset(new JsonValueContext()); m_default_value_context->OpenArray(logger); return m_default_value_context.get(); case SCHEMA_ITEMS: m_items_context_array.reset(new ArrayOfSchemaContext(m_schema_defs)); return m_items_context_array.get(); case SCHEMA_REQUIRED: m_required_items.reset(new ArrayOfStringsContext()); return m_required_items.get(); case SCHEMA_ENUM: m_enum_context.reset(new ArrayOfJsonValuesContext()); return m_enum_context.get(); case SCHEMA_ALL_OF: m_allof_context.reset(new ArrayOfSchemaContext(m_schema_defs)); return m_allof_context.get(); case SCHEMA_ANY_OF: m_anyof_context.reset(new ArrayOfSchemaContext(m_schema_defs)); return m_anyof_context.get(); case SCHEMA_ONE_OF: m_oneof_context.reset(new ArrayOfSchemaContext(m_schema_defs)); return m_oneof_context.get(); default: {} } return NULL; } void SchemaParseContext::CloseArray(SchemaErrorLogger *logger) { if (m_default_value_context.get()) { m_default_value_context->CloseArray(logger); m_default_value.reset(m_default_value_context->ClaimValue(logger)); m_default_value_context.reset(); } if (m_keyword == SCHEMA_ENUM) { if (m_enum_context->Empty()) { logger->Error() << "enum must contain at least one value"; } } } SchemaParseContextInterface* SchemaParseContext::OpenObject( SchemaErrorLogger *logger) { if (!ValidTypeForKeyword(logger, m_keyword, JSON_OBJECT)) { return NULL; } switch (m_keyword) { case SCHEMA_DEFAULT: m_default_value_context.reset(new JsonValueContext()); m_default_value_context->OpenObject(logger); return m_default_value_context.get(); case SCHEMA_DEFINITIONS: m_definitions_context.reset(new DefinitionsParseContext(m_schema_defs)); return m_definitions_context.get(); case SCHEMA_PROPERTIES: m_properties_context.reset(new PropertiesParseContext(m_schema_defs)); return m_properties_context.get(); case SCHEMA_ADDITIONAL_PROPERTIES: m_additional_properties_context.reset( new SchemaParseContext(m_schema_defs)); return m_additional_properties_context.get(); case SCHEMA_ITEMS: m_items_single_context.reset(new SchemaParseContext(m_schema_defs)); return m_items_single_context.get(); case SCHEMA_ADDITIONAL_ITEMS: m_additional_items_context.reset(new SchemaParseContext(m_schema_defs)); return m_additional_items_context.get(); case SCHEMA_DEPENDENCIES: m_dependency_context.reset(new DependencyParseContext(m_schema_defs)); return m_dependency_context.get(); case SCHEMA_NOT: m_not_context.reset(new SchemaParseContext(m_schema_defs)); return m_not_context.get(); default: {} } return NULL; } void SchemaParseContext::CloseObject(SchemaErrorLogger *logger) { if (m_default_value_context.get()) { m_default_value_context->CloseObject(logger); m_default_value.reset(m_default_value_context->ClaimValue(logger)); m_default_value_context.reset(); } } void SchemaParseContext::ProcessPositiveInt( OLA_UNUSED SchemaErrorLogger *logger, uint64_t value) { switch (m_keyword) { case SCHEMA_MULTIPLEOF: m_multiple_of.reset(JsonValue::NewNumberValue(value)); return; case SCHEMA_MIN_ITEMS: m_min_items.Set(value); break; case SCHEMA_MAX_ITEMS: m_max_items.Set(value); break; case SCHEMA_MAX_LENGTH: m_max_length.Set(value); break; case SCHEMA_MIN_LENGTH: m_min_length.Set(value); break; case SCHEMA_MAX_PROPERTIES: m_max_properties.Set(value); break; case SCHEMA_MIN_PROPERTIES: m_min_properties.Set(value); break; default: {} } } template void SchemaParseContext::ProcessInt(SchemaErrorLogger *logger, T value) { if (!ValidTypeForKeyword(logger, m_keyword, TypeFromValue(value))) { return; } switch (m_keyword) { case SCHEMA_DEFAULT: m_default_value.reset(JsonValue::NewValue(value)); return; case SCHEMA_MAXIMUM: m_maximum.reset(JsonValue::NewNumberValue(value)); return; case SCHEMA_MINIMUM: m_minimum.reset(JsonValue::NewNumberValue(value)); return; default: {} } if (positive::is_signed>()(value)) { ProcessPositiveInt(logger, static_cast(value)); return; } logger->Error() << KeywordToString(m_keyword) << " can't be negative"; } bool SchemaParseContext::AddNumberConstraints(IntegerValidator *validator, SchemaErrorLogger *logger) { if (m_exclusive_maximum.IsSet() && !m_maximum.get()) { logger->Error() << "exclusiveMaximum requires maximum to be defined"; return false; } if (m_maximum.get()) { if (m_exclusive_maximum.IsSet()) { validator->AddConstraint(new MaximumConstraint( m_maximum.release(), m_exclusive_maximum.Value())); } else { validator->AddConstraint(new MaximumConstraint(m_maximum.release())); } } if (m_exclusive_minimum.IsSet() && !m_minimum.get()) { logger->Error() << "exclusiveMinimum requires minimum to be defined"; return false; } if (m_minimum.get()) { if (m_exclusive_minimum.IsSet()) { validator->AddConstraint(new MinimumConstraint( m_minimum.release(), m_exclusive_minimum.Value())); } else { validator->AddConstraint(new MinimumConstraint(m_minimum.release())); } } if (m_multiple_of.get()) { validator->AddConstraint(new MultipleOfConstraint(m_multiple_of.release())); } return true; } BaseValidator* SchemaParseContext::BuildArrayValidator( SchemaErrorLogger *logger) { ArrayValidator::Options options; if (m_min_items.IsSet()) { options.min_items = m_min_items.Value(); } if (m_max_items.IsSet()) { options.max_items = m_max_items.Value(); } if (m_unique_items.IsSet()) { options.unique_items = m_unique_items.Value(); } auto_ptr items; auto_ptr additional_items; // items if (m_items_single_context.get() && m_items_context_array.get()) { logger->Error() << "'items' is somehow both a schema and an array!"; return NULL; } else if (m_items_single_context.get()) { // 8.2.3.1 items.reset(new ArrayValidator::Items( m_items_single_context->GetValidator(logger))); } else if (m_items_context_array.get()) { // 8.2.3.2 ValidatorInterface::ValidatorList item_validators; m_items_context_array->GetValidators(logger, &item_validators); items.reset(new ArrayValidator::Items(&item_validators)); } // additionalItems if (m_additional_items_context.get()) { additional_items.reset(new ArrayValidator::AdditionalItems( m_additional_items_context->GetValidator(logger))); } else if (m_additional_items.IsSet()) { additional_items.reset( new ArrayValidator::AdditionalItems(m_additional_items.Value())); } return new ArrayValidator(items.release(), additional_items.release(), options); } BaseValidator* SchemaParseContext::BuildObjectValidator( SchemaErrorLogger* logger) { ObjectValidator::Options options; if (m_max_properties.IsSet()) { options.max_properties = m_max_properties.Value(); } if (m_min_properties.IsSet()) { options.min_properties = m_min_properties.Value(); } if (m_required_items.get()) { set required_properties; m_required_items->GetStringSet(&required_properties); options.SetRequiredProperties(required_properties); } if (m_additional_properties.IsSet()) { options.SetAdditionalProperties(m_additional_properties.Value()); } ObjectValidator *object_validator = new ObjectValidator(options); if (m_additional_properties_context.get()) { object_validator->SetAdditionalValidator( m_additional_properties_context->GetValidator(logger)); } if (m_properties_context.get()) { m_properties_context->AddPropertyValidators(object_validator, logger); } if (m_dependency_context.get()) { m_dependency_context->AddDependenciesToValidator(object_validator); } return object_validator; } BaseValidator* SchemaParseContext::BuildStringValidator( OLA_UNUSED SchemaErrorLogger *logger) { StringValidator::Options options; if (m_max_length.IsSet()) { options.max_length = m_max_length.Value(); } if (m_min_length.IsSet()) { options.min_length = m_min_length.Value(); } return new StringValidator(options); } /* * Verify the type is valid for the given keyword. * If the type isn't valid, an error is logged. * @returns false if the type isn't valid or if the keyword is SCHEMA_UNKNOWN. */ bool SchemaParseContext::ValidTypeForKeyword(SchemaErrorLogger *logger, SchemaKeyword keyword, JsonType type) { switch (keyword) { case SCHEMA_UNKNOWN: return false; case SCHEMA_ID: return CheckTypeAndLog(logger, keyword, type, JSON_STRING); case SCHEMA_SCHEMA: return CheckTypeAndLog(logger, keyword, type, JSON_STRING); case SCHEMA_REF: return CheckTypeAndLog(logger, keyword, type, JSON_STRING); case SCHEMA_TITLE: return CheckTypeAndLog(logger, keyword, type, JSON_STRING); case SCHEMA_DESCRIPTION: return CheckTypeAndLog(logger, keyword, type, JSON_STRING); case SCHEMA_DEFAULT: return true; case SCHEMA_MULTIPLEOF: return CheckTypeAndLog(logger, keyword, type, JSON_INTEGER, JSON_NUMBER); case SCHEMA_MAXIMUM: return CheckTypeAndLog(logger, keyword, type, JSON_INTEGER, JSON_NUMBER); case SCHEMA_EXCLUSIVE_MAXIMUM: return CheckTypeAndLog(logger, keyword, type, JSON_BOOLEAN); case SCHEMA_MINIMUM: return CheckTypeAndLog(logger, keyword, type, JSON_INTEGER, JSON_NUMBER); case SCHEMA_EXCLUSIVE_MINIMUM: return CheckTypeAndLog(logger, keyword, type, JSON_BOOLEAN); case SCHEMA_MAX_LENGTH: return CheckTypeAndLog(logger, keyword, type, JSON_INTEGER); case SCHEMA_MIN_LENGTH: return CheckTypeAndLog(logger, keyword, type, JSON_INTEGER); case SCHEMA_PATTERN: return CheckTypeAndLog(logger, keyword, type, JSON_STRING); case SCHEMA_ADDITIONAL_ITEMS: return CheckTypeAndLog(logger, keyword, type, JSON_BOOLEAN, JSON_OBJECT); case SCHEMA_ITEMS: return CheckTypeAndLog(logger, keyword, type, JSON_ARRAY, JSON_OBJECT); case SCHEMA_MAX_ITEMS: return CheckTypeAndLog(logger, keyword, type, JSON_INTEGER); case SCHEMA_MIN_ITEMS: return CheckTypeAndLog(logger, keyword, type, JSON_INTEGER); case SCHEMA_UNIQUE_ITEMS: return CheckTypeAndLog(logger, keyword, type, JSON_BOOLEAN); case SCHEMA_MAX_PROPERTIES: return CheckTypeAndLog(logger, keyword, type, JSON_INTEGER); case SCHEMA_MIN_PROPERTIES: return CheckTypeAndLog(logger, keyword, type, JSON_INTEGER); case SCHEMA_REQUIRED: return CheckTypeAndLog(logger, keyword, type, JSON_ARRAY); case SCHEMA_ADDITIONAL_PROPERTIES: return CheckTypeAndLog(logger, keyword, type, JSON_BOOLEAN, JSON_OBJECT); case SCHEMA_DEFINITIONS: return CheckTypeAndLog(logger, keyword, type, JSON_OBJECT); case SCHEMA_PROPERTIES: return CheckTypeAndLog(logger, keyword, type, JSON_OBJECT); case SCHEMA_PATTERN_PROPERTIES: return CheckTypeAndLog(logger, keyword, type, JSON_OBJECT); case SCHEMA_DEPENDENCIES: return CheckTypeAndLog(logger, keyword, type, JSON_OBJECT); case SCHEMA_ENUM: return CheckTypeAndLog(logger, keyword, type, JSON_ARRAY); case SCHEMA_TYPE: return CheckTypeAndLog(logger, keyword, type, JSON_STRING, JSON_ARRAY); case SCHEMA_ALL_OF: return CheckTypeAndLog(logger, keyword, type, JSON_ARRAY); case SCHEMA_ANY_OF: return CheckTypeAndLog(logger, keyword, type, JSON_ARRAY); case SCHEMA_ONE_OF: return CheckTypeAndLog(logger, keyword, type, JSON_ARRAY); case SCHEMA_NOT: return CheckTypeAndLog(logger, keyword, type, JSON_OBJECT); default: return false; } } bool SchemaParseContext::CheckTypeAndLog( SchemaErrorLogger *logger, SchemaKeyword keyword, JsonType type, JsonType expected_type) { if (type == expected_type) { return true; } else { logger->Error() << "Invalid type for " << KeywordToString(keyword) << ", got " << JsonTypeToString(type) << ", expected " << JsonTypeToString(expected_type); return false; } } bool SchemaParseContext::CheckTypeAndLog( SchemaErrorLogger *logger, SchemaKeyword keyword, JsonType type, JsonType expected_type1, JsonType expected_type2) { if (type == expected_type1 || type == expected_type2) { return true; } else { logger->Error() << "Invalid type for " << KeywordToString(keyword) << ", got " << JsonTypeToString(type) << ", expected " << JsonTypeToString(expected_type1) << " or " << JsonTypeToString(expected_type2); return false; } } // PropertiesParseContext // Used for parsing an object with key : json schema pairs, within 'properties' void PropertiesParseContext::AddPropertyValidators( ObjectValidator *object_validator, SchemaErrorLogger *logger) { SchemaMap::iterator iter = m_property_contexts.begin(); for (; iter != m_property_contexts.end(); ++iter) { ValidatorInterface *validator = iter->second->GetValidator(logger); if (validator) { object_validator->AddValidator(iter->first, validator); } } } PropertiesParseContext::~PropertiesParseContext() { STLDeleteValues(&m_property_contexts); } SchemaParseContextInterface* PropertiesParseContext::OpenObject( SchemaErrorLogger *logger) { const string key = TakeKeyword(); pair r = m_property_contexts.insert( pair(key, NULL)); if (r.second) { r.first->second = new SchemaParseContext(m_schema_defs); } else { logger->Error() << "Duplicate key " << key; } return r.first->second; } // ArrayOfSchemaContext // Used for parsing an array of JSON schema within 'items' ArrayOfSchemaContext::~ArrayOfSchemaContext() { STLDeleteElements(&m_item_schemas); } void ArrayOfSchemaContext::GetValidators( SchemaErrorLogger *logger, ValidatorInterface::ValidatorList *validators) { ItemSchemas::iterator iter = m_item_schemas.begin(); for (; iter != m_item_schemas.end(); ++iter) { validators->push_back((*iter)->GetValidator(logger)); } } SchemaParseContextInterface* ArrayOfSchemaContext::OpenObject( OLA_UNUSED SchemaErrorLogger *logger) { m_item_schemas.push_back(new SchemaParseContext(m_schema_defs)); return m_item_schemas.back(); } // ArrayOfStringsContext // Used for parsing an array of strings. void ArrayOfStringsContext::GetStringSet(StringSet *items) { *items = m_items; } void ArrayOfStringsContext::String(SchemaErrorLogger *logger, const string &value) { if (!m_items.insert(value).second) { logger->Error() << value << " appeared more than once in the array"; } } // JsonValueContext // Used for parsing a default value. JsonValueContext::JsonValueContext() : SchemaParseContextInterface() { m_parser.Begin(); } const JsonValue* JsonValueContext::ClaimValue(SchemaErrorLogger *logger) { m_parser.End(); const JsonValue *value = m_parser.ClaimRoot(); if (!value) { logger->Error() << " is invalid: " << m_parser.GetError(); } return value; } void JsonValueContext::String(SchemaErrorLogger *, const string &value) { m_parser.String(value); } void JsonValueContext::Number(SchemaErrorLogger *, uint32_t value) { m_parser.Number(value); } void JsonValueContext::Number(SchemaErrorLogger *, int32_t value) { m_parser.Number(value); } void JsonValueContext::Number(SchemaErrorLogger *, uint64_t value) { m_parser.Number(value); } void JsonValueContext::Number(SchemaErrorLogger *, int64_t value) { m_parser.Number(value); } void JsonValueContext::Number(SchemaErrorLogger *, double value) { m_parser.Number(value); } void JsonValueContext::Bool(SchemaErrorLogger *, bool value) { m_parser.Bool(value); } void JsonValueContext::Null(OLA_UNUSED SchemaErrorLogger *logger) { m_parser.Null(); } SchemaParseContextInterface* JsonValueContext::OpenArray( SchemaErrorLogger *) { m_parser.OpenArray(); return this; } void JsonValueContext::CloseArray(OLA_UNUSED SchemaErrorLogger *logger) { m_parser.CloseArray(); } SchemaParseContextInterface* JsonValueContext::OpenObject( SchemaErrorLogger *) { m_parser.OpenObject(); return this; } void JsonValueContext::ObjectKey(SchemaErrorLogger *, const string &key) { m_parser.ObjectKey(key); } void JsonValueContext::CloseObject(OLA_UNUSED SchemaErrorLogger *logger) { m_parser.CloseObject(); } // ArrayOfJsonValuesContext // Used for parsing a list of enums. ArrayOfJsonValuesContext::~ArrayOfJsonValuesContext() { STLDeleteElements(&m_enums); } void ArrayOfJsonValuesContext::AddEnumsToValidator(BaseValidator *validator) { vector::const_iterator iter = m_enums.begin(); for (; iter != m_enums.end(); ++iter) { validator->AddEnumValue(*iter); } m_enums.clear(); } void ArrayOfJsonValuesContext::String(SchemaErrorLogger *logger, const string &value) { CheckForDuplicateAndAdd(logger, JsonValue::NewValue(value)); } void ArrayOfJsonValuesContext::Number(SchemaErrorLogger *logger, uint32_t value) { CheckForDuplicateAndAdd(logger, JsonValue::NewValue(value)); } void ArrayOfJsonValuesContext::Number(SchemaErrorLogger *logger, int32_t value) { CheckForDuplicateAndAdd(logger, JsonValue::NewValue(value)); } void ArrayOfJsonValuesContext::Number(SchemaErrorLogger *logger, uint64_t value) { CheckForDuplicateAndAdd(logger, JsonValue::NewValue(value)); } void ArrayOfJsonValuesContext::Number(SchemaErrorLogger *logger, int64_t value) { CheckForDuplicateAndAdd(logger, JsonValue::NewValue(value)); } void ArrayOfJsonValuesContext::Number(SchemaErrorLogger *logger, double value) { CheckForDuplicateAndAdd(logger, JsonValue::NewValue(value)); } void ArrayOfJsonValuesContext::Bool(SchemaErrorLogger *logger, bool value) { CheckForDuplicateAndAdd(logger, JsonValue::NewValue(value)); } void ArrayOfJsonValuesContext::Null(SchemaErrorLogger *logger) { CheckForDuplicateAndAdd(logger, new JsonNull()); } SchemaParseContextInterface* ArrayOfJsonValuesContext::OpenArray( OLA_UNUSED SchemaErrorLogger *logger) { m_value_context.reset(new JsonValueContext()); return m_value_context.get(); } void ArrayOfJsonValuesContext::CloseArray(SchemaErrorLogger *logger) { CheckForDuplicateAndAdd(logger, m_value_context->ClaimValue(logger)); } SchemaParseContextInterface* ArrayOfJsonValuesContext::OpenObject( OLA_UNUSED SchemaErrorLogger *logger) { m_value_context.reset(new JsonValueContext()); return m_value_context.get(); } void ArrayOfJsonValuesContext::CloseObject(SchemaErrorLogger *logger) { CheckForDuplicateAndAdd(logger, m_value_context->ClaimValue(logger)); } void ArrayOfJsonValuesContext::CheckForDuplicateAndAdd( SchemaErrorLogger *logger, const JsonValue *value) { vector::const_iterator iter = m_enums.begin(); for (; iter != m_enums.end(); ++iter) { if (**iter == *value) { logger->Error() << "Duplicate entries in enum array: " << value; delete value; return; } } m_enums.push_back(value); } // ArrayOfJsonValuesContext // Used for parsing a list of enums. DependencyParseContext::~DependencyParseContext() { STLDeleteValues(&m_schema_dependencies); } void DependencyParseContext::AddDependenciesToValidator( ObjectValidator *validator) { PropertyDependencies::const_iterator prop_iter = m_property_dependencies.begin(); for (; prop_iter != m_property_dependencies.end(); ++prop_iter) { validator->AddPropertyDependency(prop_iter->first, prop_iter->second); } // Check Schema Dependencies SchemaDependencies::const_iterator schema_iter = m_schema_dependencies.begin(); for (; schema_iter != m_schema_dependencies.end(); ++schema_iter) { validator->AddSchemaDependency(schema_iter->first, schema_iter->second); } m_schema_dependencies.clear(); } SchemaParseContextInterface* DependencyParseContext::OpenArray( OLA_UNUSED SchemaErrorLogger *logger) { m_property_context.reset(new ArrayOfStringsContext()); return m_property_context.get(); } void DependencyParseContext::CloseArray(SchemaErrorLogger *logger) { StringSet &properties = m_property_dependencies[Keyword()]; m_property_context->GetStringSet(&properties); if (properties.empty()) { logger->Error() << " property dependency lists must contain at least one item"; } m_property_context.reset(); } SchemaParseContextInterface* DependencyParseContext::OpenObject( OLA_UNUSED SchemaErrorLogger *logger) { m_schema_context.reset(new SchemaParseContext(m_schema_defs)); return m_schema_context.get(); } void DependencyParseContext::CloseObject(SchemaErrorLogger *logger) { STLReplaceAndDelete(&m_schema_dependencies, Keyword(), m_schema_context->GetValidator(logger)); m_schema_context.reset(); } } // namespace web } // namespace ola ola-0.10.9/common/web/SchemaErrorLogger.h0000664000175000017500000000425114376533110015074 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaErrorLogger.h * Captures errors while parsing the schema. * Copyright (C) 2014 Simon Newton */ #ifndef COMMON_WEB_SCHEMAERRORLOGGER_H_ #define COMMON_WEB_SCHEMAERRORLOGGER_H_ #include #include #include #include "ola/web/JsonPointer.h" namespace ola { namespace web { /** * @brief The SchemaErrorLogger captures errors while parsing the schema. * * The SchemaErrorLogger allows schema parsing errors to be logged. It prepends * the error with the value of the JsonPointer so users have a decent idea of * where the error occurred in the JSON document. */ class SchemaErrorLogger { public: /** * @brief Create a new SchemaErrorLogger. * @param pointer the JsonPointer to use when logging error messages */ explicit SchemaErrorLogger(JsonPointer *pointer) : m_pointer(pointer) {} /** * @brief Check if there was an error logged. */ bool HasError() const; /** * @brief Return the first error * @returns The first error, or the empty string if no error was reported. */ std::string ErrorString() const; /** * @brief Log an error. */ std::ostream& Error(); /** * @brief Clear the saved errors. */ void Reset(); private: std::ostringstream m_first_error; std::ostringstream m_extra_errors; JsonPointer *m_pointer; DISALLOW_COPY_AND_ASSIGN(SchemaErrorLogger); }; } // namespace web } // namespace ola #endif // COMMON_WEB_SCHEMAERRORLOGGER_H_ ola-0.10.9/common/web/JsonPatchParser.cpp0000664000175000017500000002026614376533110015127 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * JsonPatchParser.cpp * Create a JsonPatchSet from a string. * Copyright (C) 2014 Simon Newton */ #include "ola/web/JsonPatchParser.h" #define __STDC_LIMIT_MACROS // for UINT8_MAX & friends #include #include #include "ola/Logging.h" #include "ola/stl/STLUtils.h" #include "ola/web/Json.h" #include "ola/web/JsonLexer.h" #include "ola/base/Macro.h" namespace ola { namespace web { using std::string; const char JsonPatchParser::kPatchListError[] = "A JSON Patch document must be an array"; const char JsonPatchParser::kPatchElementError[] = "Elements within a JSON Patch array must be objects"; const char JsonPatchParser::kMissingPath[] = "Missing path specifier"; const char JsonPatchParser::kMissingValue[] = "Missing or invalid value"; const char JsonPatchParser::kMissingFrom[] = "Missing from specifier"; const char JsonPatchParser::kAddOp[] = "add"; const char JsonPatchParser::kCopyOp[] = "copy"; const char JsonPatchParser::kFromKey[] = "from"; const char JsonPatchParser::kMoveOp[] = "move"; const char JsonPatchParser::kOpKey[] = "op"; const char JsonPatchParser::kPathKey[] = "path"; const char JsonPatchParser::kRemoveOp[] = "remove"; const char JsonPatchParser::kReplaceOp[] = "replace"; const char JsonPatchParser::kTestOp[] = "test"; const char JsonPatchParser::kValueKey[] = "value"; void JsonPatchParser::Begin() { m_parser_depth = 0; m_error = ""; m_key = ""; m_state = TOP; m_parser.Begin(); } void JsonPatchParser::End() { if (m_state != TOP) { SetError("Invalid JSON data"); } } void JsonPatchParser::String(const string &value) { switch (m_state) { case TOP: SetError(kPatchListError); break; case PATCH_LIST: SetError(kPatchElementError); break; case PATCH: HandlePatchString(value); break; case VALUE: m_parser.String(value); break; } } void JsonPatchParser::Number(uint32_t value) { HandleNumber(value); } void JsonPatchParser::Number(int32_t value) { HandleNumber(value); } void JsonPatchParser::Number(uint64_t value) { HandleNumber(value); } void JsonPatchParser::Number(int64_t value) { HandleNumber(value); } void JsonPatchParser::Number(const JsonDouble::DoubleRepresentation &rep) { HandleNumber(rep); } void JsonPatchParser::Number(double value) { HandleNumber(value); } void JsonPatchParser::Bool(bool value) { switch (m_state) { case TOP: SetError(kPatchListError); break; case PATCH_LIST: SetError(kPatchElementError); break; case PATCH: if (m_key == kValueKey) { m_value.reset(new JsonBool(value)); } break; case VALUE: m_parser.Bool(value); break; } } void JsonPatchParser::Null() { switch (m_state) { case TOP: SetError(kPatchListError); break; case PATCH_LIST: SetError(kPatchElementError); break; case PATCH: if (m_key == kValueKey) { m_value.reset(new JsonNull()); } break; case VALUE: m_parser.Null(); break; } } void JsonPatchParser::OpenArray() { switch (m_state) { case TOP: m_state = PATCH_LIST; break; case PATCH_LIST: SetError(kPatchElementError); break; case PATCH: m_parser_depth = 0; m_state = VALUE; // fall through OLA_FALLTHROUGH case VALUE: m_parser_depth++; m_parser.OpenArray(); break; } } void JsonPatchParser::CloseArray() { switch (m_state) { case TOP: break; case PATCH_LIST: m_state = TOP; break; case PATCH: break; case VALUE: m_parser.CloseArray(); m_parser_depth--; if (m_parser_depth == 0) { if (m_key == kValueKey) { m_value.reset(m_parser.ClaimRoot()); } m_state = PATCH; } } } void JsonPatchParser::OpenObject() { switch (m_state) { case TOP: SetError(kPatchListError); break; case PATCH_LIST: m_state = PATCH; m_value.reset(); m_path.Reset(); m_op = ""; m_from.Reset(); break; case PATCH: m_parser_depth = 0; m_state = VALUE; // fall through OLA_FALLTHROUGH case VALUE: m_parser_depth++; m_parser.OpenObject(); break; } } void JsonPatchParser::ObjectKey(const std::string &key) { if (m_state == VALUE) { m_parser.ObjectKey(key); } else { m_key = key; } } void JsonPatchParser::CloseObject() { switch (m_state) { case TOP: break; case PATCH_LIST: break; case PATCH: m_state = PATCH_LIST; HandlePatch(); break; case VALUE: m_parser.CloseObject(); m_parser_depth--; if (m_parser_depth == 0) { if (m_key == kValueKey) { m_value.reset(m_parser.ClaimRoot()); } m_state = PATCH; } break; } } void JsonPatchParser::SetError(const string &error) { if (m_error.empty()) { m_error = error; } } string JsonPatchParser::GetError() const { return m_error; } bool JsonPatchParser::IsValid() const { return m_error.empty(); } template void JsonPatchParser::HandleNumber(const T &value) { switch (m_state) { case TOP: SetError(kPatchListError); break; case PATCH_LIST: SetError(kPatchElementError); break; case PATCH: if (m_key == kValueKey) { m_value.reset(JsonValue::NewValue(value)); } break; case VALUE: m_parser.Number(value); break; } } void JsonPatchParser::HandlePatchString(const std::string &value) { if (m_key == kOpKey) { m_op = value; } else if (m_key == kFromKey) { m_from.Set(value); } else if (m_key == kPathKey) { m_path.Set(value); } else if (m_key == kValueKey) { m_value.reset(new JsonString(value)); } } void JsonPatchParser::HandlePatch() { if (!m_path.IsSet()) { SetError(kMissingPath); return; } if (m_op == kAddOp) { if (!m_value.get()) { SetError(kMissingValue); return; } m_patch_set->AddOp( new JsonPatchAddOp(JsonPointer(m_path.Value()), m_value.release())); } else if (m_op == kRemoveOp) { m_patch_set->AddOp(new JsonPatchRemoveOp(JsonPointer(m_path.Value()))); } else if (m_op == kReplaceOp) { if (!m_value.get()) { SetError(kMissingValue); return; } m_patch_set->AddOp( new JsonPatchReplaceOp(JsonPointer(m_path.Value()), m_value.release())); } else if (m_op == kMoveOp) { if (!m_from.IsSet()) { SetError(kMissingFrom); return; } m_patch_set->AddOp( new JsonPatchMoveOp(JsonPointer(m_from.Value()), JsonPointer(m_path.Value()))); } else if (m_op == kCopyOp) { if (!m_from.IsSet()) { SetError(kMissingFrom); return; } m_patch_set->AddOp( new JsonPatchCopyOp(JsonPointer(m_from.Value()), JsonPointer(m_path.Value()))); } else if (m_op == kTestOp) { if (!m_value.get()) { SetError(kMissingValue); return; } m_patch_set->AddOp( new JsonPatchTestOp(JsonPointer(m_path.Value()), m_value.release())); } else { SetError("Invalid or missing 'op'"); } } bool JsonPatchParser::Parse(const std::string &input, JsonPatchSet *patch_set, std::string *error) { JsonPatchParser parser(patch_set); bool ok = JsonLexer::Parse(input, &parser) && parser.IsValid(); if (!ok) { *error = parser.GetError(); } return ok; } } // namespace web } // namespace ola ola-0.10.9/common/web/JsonSections.cpp0000664000175000017500000000645514376533110014506 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * JsonSections.cpp * This builds the json string for the web UI. * Copyright (C) 2010 Simon Newton */ #include #include #include #include #include #include "ola/web/JsonSections.h" #include "ola/Logging.h" #include "ola/web/Json.h" #include "ola/web/JsonWriter.h" #include "ola/StringUtils.h" namespace ola { namespace web { using std::endl; using std::pair; using std::string; using std::vector; using ola::EscapeString; void GenericItem::PopulateItem(JsonObject *item) const { if (!m_button_text.empty()) item->Add("button", m_button_text); if (!m_id.empty()) item->Add("id", m_id); item->Add("description", m_description); item->Add("type", Type()); SetValue(item); SetExtraProperties(item); } void UIntItem::SetExtraProperties(JsonObject *item) const { if (m_min_set) item->Add("min", m_min); if (m_max_set) item->Add("max", m_max); } void SelectItem::AddItem(const string &label, const string &value) { pair p(label, value); m_values.push_back(p); } void SelectItem::AddItem(const string &label, unsigned int value) { AddItem(label, IntToString(value)); } void SelectItem::SetValue(JsonObject *item) const { JsonArray *options = item->AddArray("value"); vector >::const_iterator iter = m_values.begin(); for (; iter != m_values.end(); ++iter) { JsonObject *option = options->AppendObject(); option->Add("label", iter->first); option->Add("value", iter->second); } } /** * Create a new section response */ JsonSection::JsonSection(bool allow_refresh) : m_allow_refresh(allow_refresh), m_error(""), m_save_button_text("") { } /** * Cleanup */ JsonSection::~JsonSection() { vector::const_iterator iter = m_items.begin(); for (; iter != m_items.end(); ++iter) { delete *iter; } } /** * Add an item to this section, ownership is transferred. */ void JsonSection::AddItem(const GenericItem *item) { m_items.push_back(item); } /* * Return the section as a string. */ string JsonSection::AsString() const { JsonObject json; json.Add("refresh", m_allow_refresh); json.Add("error", m_error); if (!m_save_button_text.empty()) json.Add("save_button", m_save_button_text); JsonArray *items = json.AddArray("items"); vector::const_iterator iter = m_items.begin(); for (; iter != m_items.end(); ++iter) { JsonObject *item = items->AppendObject(); (*iter)->PopulateItem(item); } return JsonWriter::AsString(json); } } // namespace web } // namespace ola ola-0.10.9/common/web/SchemaErrorLogger.cpp0000664000175000017500000000267614376533110015440 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaErrorLogger.cpp * Captures errors while parsing the schema. * Copyright (C) 2014 Simon Newton */ #include "common/web/SchemaErrorLogger.h" #include #include namespace ola { namespace web { bool SchemaErrorLogger::HasError() const { return !m_first_error.str().empty(); } std::string SchemaErrorLogger::ErrorString() const { return m_first_error.str(); } std::ostream& SchemaErrorLogger::Error() { if (m_first_error.str().empty()) { m_first_error << m_pointer->ToString() << ": "; return m_first_error; } else { return m_extra_errors; } } void SchemaErrorLogger::Reset() { m_first_error.str(""); m_extra_errors.str(""); } } // namespace web } // namespace ola ola-0.10.9/common/web/testdata/0000775000175000017500000000000014376533267013255 500000000000000ola-0.10.9/common/web/testdata/misc.test0000664000175000017500000000027114376533110015014 00000000000000=== POSITIVE === // Verify we strip keys we don't recognise / support, even if they are in the // standard. { "pattern": "[cat]", "type": "string" } -------- { "type": "string" } ola-0.10.9/common/web/testdata/oneof.test0000664000175000017500000000101414376533110015163 00000000000000=== POSITIVE === // An int between 1 and 10 or 99 and 101 { "oneOf": [ { "maximum": 10, "minimum": 1, "type": "integer" }, { "maximum": 101, "minimum": 99, "type": "integer" } ] } === NEGATIVE === { "oneOf": [] } === NEGATIVE === { "oneOf": null } === NEGATIVE === { "oneOf": false } === NEGATIVE === { "oneOf": "foo" } === NEGATIVE === { "oneOf": 1 } === NEGATIVE === { "oneOf": -1 } === NEGATIVE === { "oneOf": 1.2 } === NEGATIVE === { "oneOf": {} } ola-0.10.9/common/web/testdata/not.test0000664000175000017500000000050114376533110014655 00000000000000=== POSITIVE === // Anything but an int. { "not": { "type": "integer" } } === NEGATIVE === { "not": [] } === NEGATIVE === { "not": null } === NEGATIVE === { "not": false } === NEGATIVE === { "not": "foo" } === NEGATIVE === { "not": 1 } === NEGATIVE === { "not": -1 } === NEGATIVE === { "not": 1.2 } ola-0.10.9/common/web/testdata/integers.test0000664000175000017500000000726614376533110015714 00000000000000=== POSITIVE === { "type": "integer" } // maximum & exclusiveMaximum === POSITIVE === { "maximum": 10, "type": "integer" } === POSITIVE === { "exclusiveMaximum": true, "maximum": -10, "type": "integer" } === POSITIVE === { "exclusiveMaximum": false, "maximum": 2.1, "type": "integer" } === NEGATIVE === { "exclusiveMaximum": 1, "maximum": 2.1, "type": "integer" } === NEGATIVE === { "exclusiveMaximum": null, "maximum": 2.1, "type": "integer" } === NEGATIVE === { "exclusiveMaximum": 1.2, "maximum": 2.1, "type": "integer" } === NEGATIVE === { "exclusiveMaximum": "foo", "maximum": 2.1, "type": "integer" } === NEGATIVE === { "exclusiveMaximum": [], "maximum": 2.1, "type": "integer" } === NEGATIVE === { "exclusiveMaximum": {}, "maximum": 2.1, "type": "integer" } === NEGATIVE === { "maximum": null, "type": "integer" } === NEGATIVE === { "maximum": false, "type": "integer" } === NEGATIVE === { "maximum": "foo", "type": "integer" } === NEGATIVE === { "maximum": [], "type": "integer" } === NEGATIVE === { "maximum": {}, "type": "integer" } // exclusiveMaximum without maximum isn't valid === NEGATIVE === { "exclusiveMaximum": true, "type": "integer" } // minimum & exclusiveMinimum === POSITIVE === { "minimum": 10, "type": "integer" } === POSITIVE === { "exclusiveMinimum": true, "minimum": -10, "type": "integer" } === POSITIVE === { "exclusiveMinimum": false, "minimum": 2.1, "type": "integer" } === NEGATIVE === { "exclusiveMinimum": null, "minimum": 2.1, "type": "integer" } === NEGATIVE === { "exclusiveMinimum": 1, "minimum": 2.1, "type": "integer" } === NEGATIVE === { "exclusiveMinimum": [], "minimum": 2.1, "type": "integer" } === NEGATIVE === { "exclusiveMinimum": {}, "minimum": 2.1, "type": "integer" } === NEGATIVE === { "exclusiveMinimum": "foo", "minimum": 2.1, "type": "integer" } === NEGATIVE === { "minimum": null, "type": "integer" } === NEGATIVE === { "minimum": false, "type": "integer" } === NEGATIVE === { "minimum": "foo", "type": "integer" } === NEGATIVE === { "minimum": [], "type": "integer" } === NEGATIVE === { "minimum": {}, "type": "integer" } // exclusiveMinimum without minimum isn't valid === NEGATIVE === { "exclusiveMinimum": true, "type": "integer" } // multipleOf === POSITIVE === { "multipleOf": 10, "type": "integer" } === POSITIVE === { "multipleOf": 2.1, "type": "integer" } === NEGATIVE === { "multipleOf": -1, "type": "integer" } === NEGATIVE === { "multipleOf": -1.1, "type": "integer" } === NEGATIVE === { "multipleOf": null, "type": "integer" } === NEGATIVE === { "multipleOf": false, "type": "integer" } === NEGATIVE === { "multipleOf": [], "type": "integer" } === NEGATIVE === { "multipleOf": {}, "type": "integer" } === NEGATIVE === { "multipleOf": "foo", "type": "integer" } // Enums === POSITIVE === { "enum": [1, 2, 4], "type": "integer" } === POSITIVE === { "enum": [true, false], "type": "boolean" } === POSITIVE === { "enum": ["cat", "dog", "rat"], "type": "string" } === NEGATIVE === { "enum": null, "type": "integer" } === NEGATIVE === { "enum": "foo", "type": "integer" } === NEGATIVE === { "enum": 1, "type": "integer" } === NEGATIVE === { "enum": -1, "type": "integer" } === NEGATIVE === { "enum": 1.2, "type": "integer" } === NEGATIVE === { "enum": false, "type": "integer" } === NEGATIVE === { "enum": {}, "type": "integer" } === NEGATIVE === // enum must have at least one item { "enum": [], "type": "integer" } // duplicates aren't allowed === NEGATIVE === { "enum": [1, 1, 0], "type": "integer" } === NEGATIVE === { "enum": ["cat", "cat"], "type": "string" } ola-0.10.9/common/web/testdata/strings.test0000664000175000017500000000230614376533110015553 00000000000000=== POSITIVE === { "type": "string" } // Test maxLength === POSITIVE === { "maxLength": 0, "type": "string" } === POSITIVE === { "maxLength": 1, "type": "string" } === POSITIVE === { "maxLength": 32, "type": "string" } === NEGATIVE === { "type": "string", "maxLength": null } === NEGATIVE === { "type": "string", "maxLength": -1 } === NEGATIVE === { "type": "string", "maxLength": 1.2 } === NEGATIVE === { "type": "string", "maxLength": "foo" } === NEGATIVE === { "type": "string", "maxLength": [] } === NEGATIVE === { "type": "string", "maxLength": {} } // Test minLength === POSITIVE === { "minLength": 0, "type": "string" } -------- // minLength defaults to 0, so we remove it { "type": "string" } === POSITIVE === { "minLength": 1, "type": "string" } === POSITIVE === { "minLength": 32, "type": "string" } === NEGATIVE === { "type": "string", "minLength": null } === NEGATIVE === { "type": "string", "minLength": -1 } === NEGATIVE === { "type": "string", "minLength": 1.2 } === NEGATIVE === { "type": "string", "minLength": "foo" } === NEGATIVE === { "type": "string", "minLength": [] } === NEGATIVE === { "type": "string", "minLength": {} } ola-0.10.9/common/web/testdata/type.test0000664000175000017500000000101414376533110015036 00000000000000=== POSITIVE === { "type": "array" } === POSITIVE === { "type": "boolean" } === POSITIVE === { "type": "integer" } === POSITIVE === { "type": "null" } === POSITIVE === { "type": "number" } === POSITIVE === { "type": "object" } === POSITIVE === { "type": "string" } === NEGATIVE === { "type": null } === NEGATIVE === { "type": "foo" } === NEGATIVE === { "type": true } === NEGATIVE === { "type": 1 } === NEGATIVE === { "type": -1 } === NEGATIVE === { "type": 1.2 } === NEGATIVE === { "type": {} } ola-0.10.9/common/web/testdata/objects.test0000664000175000017500000001151414376533110015514 00000000000000=== POSITIVE === { "type": "object" } === POSITIVE === { "maxProperties": 3, "minProperties": 1, "type": "object" } // Max properties tests === POSITIVE === { "maxProperties": 3, "type": "object" } // Negative Max properties tests === NEGATIVE === { "maxProperties": false, "type": "object" } === NEGATIVE === { "maxProperties": -1, "type": "object" } === NEGATIVE === { "maxProperties": 1.2, "type": "object" } === NEGATIVE === { "maxProperties": "foo", "type": "object" } === NEGATIVE === { "maxProperties": null, "type": "object" } === NEGATIVE === { "maxProperties": [], "type": "object" } === NEGATIVE === { "maxProperties": {}, "type": "object" } // Min properties tests === POSITIVE === { "minProperties": 1, "type": "object" } // Negative Min properties tests === NEGATIVE === { "minProperties": false, "type": "object" } === NEGATIVE === { "minProperties": -1, "type": "object" } === NEGATIVE === { "minProperties": 1.2, "type": "object" } === NEGATIVE === { "minProperties": "foo", "type": "object" } === NEGATIVE === { "minProperties": null, "type": "object" } === NEGATIVE === { "minProperties": [], "type": "object" } === NEGATIVE === { "minProperties": {}, "type": "object" } // Required tests === POSITIVE === { "required": [], "type": "object" } === POSITIVE === { "required": ["foo"], "type": "object" } // Negative required tests === NEGATIVE === { "required": null, "type": "object" } === NEGATIVE === { "required": true, "type": "object" } === NEGATIVE === { "required": "foo", "type": "object" } === NEGATIVE === { "required": 1, "type": "object" } === NEGATIVE === { "required": -1, "type": "object" } === NEGATIVE === { "required": 1.2, "type": "object" } === NEGATIVE === { "required": {}, "type": "object" } === NEGATIVE === { "required": [1], "type": "object" } === NEGATIVE === { "required": ["foo", "foo"], "type": "object" } // dependency tesets // First up is property dependencies. === POSITIVE === { "dependencies": { "foo": ["bar"] }, "type": "object" } === POSITIVE === { "dependencies": { "foo": ["bar", "baz"] }, "type": "object" } // Now test schema dependencies. === POSITIVE === { "dependencies": { "foo": {} }, "type": "object" } === POSITIVE === { "dependencies": { "foo": { "maxProperties": 2, "type": "object" } }, "type": "object" } // Negative dependencies tests === NEGATIVE === { "dependencies": 1, "type": "object" } === NEGATIVE === { "dependencies": -1, "type": "object" } === NEGATIVE === { "dependencies": 1.2, "type": "object" } === NEGATIVE === { "dependencies": null "type": "object" } === NEGATIVE === { "dependencies": false, "type": "object" } === NEGATIVE === { "dependencies": [], "type": "object" } === NEGATIVE === { "dependencies": { "foo": [] }, "type": "object" } === NEGATIVE === { "dependencies": { "foo": ["bar", "bar"] }, "type": "object" } // properties test === POSITIVE === { "properties": { "name": {} }, "type": "object" } === POSITIVE === { "properties": { "age": { "type": "integer" }, "name": { "type": "string" } }, "type": "object" } // Negative properties test === NEGATIVE === { "properties": null, "type": "object" } === NEGATIVE === { "properties": "foo", "type": "object" } === NEGATIVE === { "properties": 1, "type": "object" } === NEGATIVE === { "properties": -1, "type": "object" } === NEGATIVE === { "properties": 1.2, "type": "object" } === NEGATIVE === { "properties": [], "type": "object" } === NEGATIVE === { "properties": { "name": null }, "type": "object" } === NEGATIVE === { "properties": { "name": "foo" }, "type": "object" } === NEGATIVE === { "properties": { "name": 1 }, "type": "object" } === NEGATIVE === { "properties": { "name": -1 }, "type": "object" } === NEGATIVE === { "properties": { "name": 1.2 }, "type": "object" } === NEGATIVE === { "properties": { "name": [] }, "type": "object" } // additionalProperties test === POSITIVE === { "additionalProperties": true, "type": "object" } === POSITIVE === { "additionalProperties": false, "type": "object" } === POSITIVE === { "additionalProperties": {}, "type": "object" } === POSITIVE === { "additionalProperties": { "type": "number" }, "type": "object" } // Negative additionalProperties test === NEGATIVE === { "additionalProperties": null, "type": "object" } === NEGATIVE === { "additionalProperties": "foo", "type": "object" } === NEGATIVE === { "additionalProperties": 1, "type": "object" } === NEGATIVE === { "additionalProperties": -1, "type": "object" } === NEGATIVE === { "additionalProperties": 1.2, "type": "object" } === NEGATIVE === { "additionalProperties": [], "type": "object" } ola-0.10.9/common/web/testdata/basic-keywords.test0000664000175000017500000000647314376533110017021 00000000000000=== POSITIVE === { "$schema": "http:\\\\json-schema.org\\draft-04\\schema#", "description": "just testing", "id": "http:\/\/x.y.z\/rootschema.json#", "title": "test" } === POSITIVE === { "$schema": "http:\\\\json-schema.org\\draft-04\\schema#", "description": "just testing", "id": "http:\/\/x.y.z\/rootschema.json#", "title": "test", "type": "array" } === POSITIVE === { "$schema": "http:\\\\json-schema.org\\draft-04\\schema#", "description": "just testing", "id": "http:\/\/x.y.z\/rootschema.json#", "title": "test", "type": "boolean" } === POSITIVE === { "$schema": "http:\\\\json-schema.org\\draft-04\\schema#", "description": "just testing", "id": "http:\/\/x.y.z\/rootschema.json#", "title": "test", "type": "integer" } === POSITIVE === { "$schema": "http:\\\\json-schema.org\\draft-04\\schema#", "description": "just testing", "id": "http:\/\/x.y.z\/rootschema.json#", "title": "test", "type": "null" } === POSITIVE === { "$schema": "http:\\\\json-schema.org\\draft-04\\schema#", "description": "just testing", "id": "http:\/\/x.y.z\/rootschema.json#", "title": "test", "type": "number" } === POSITIVE === { "$schema": "http:\\\\json-schema.org\\draft-04\\schema#", "description": "just testing", "id": "http:\/\/x.y.z\/rootschema.json#", "title": "test", "type": "object" } === POSITIVE === { "$schema": "http:\\\\json-schema.org\\draft-04\\schema#", "description": "just testing", "id": "http:\/\/x.y.z\/rootschema.json#", "title": "test", "type": "string" } // Negative 'id' tests === NEGATIVE === { "id": [] } === NEGATIVE === { "id": false } === NEGATIVE === { "id": 1 } === NEGATIVE === { "id": -1 } === NEGATIVE === { "id": null } === NEGATIVE === { "id": 1.0 } === NEGATIVE === { "id": {} } // Negative 'schema' tests === NEGATIVE === { "$schema": [] } === NEGATIVE === { "$schema": false } === NEGATIVE === { "$schema": 1 } === NEGATIVE === { "$schema": -1 } === NEGATIVE === { "$schema": null } === NEGATIVE === { "$schema": 1.0 } === NEGATIVE === { "$schema": {} } // Negative 'title' tests === NEGATIVE === { "title": [] } === NEGATIVE === { "title": false } === NEGATIVE === { "title": 1 } === NEGATIVE === { "title": -1 } === NEGATIVE === { "title": null } === NEGATIVE === { "title": 1.0 } === NEGATIVE === { "title": {} } // Negative 'description' tests === NEGATIVE === { "description": [] } === NEGATIVE === { "description": false } === NEGATIVE === { "description": 1 } === NEGATIVE === { "description": -1 } === NEGATIVE === { "description": null } === NEGATIVE === { "description": 1.0 } === NEGATIVE === { "description": {} } // Positive 'default' tests === POSITIVE === { "default": "foo" } === POSITIVE === { "default": true } === POSITIVE === { "default": null } === POSITIVE === { "default": 1 } === POSITIVE === { "default": -1 } === POSITIVE === { "default": 1.2 } === POSITIVE === { "default": [] } === POSITIVE === { "default": [1, 2, 3, null] } === POSITIVE === { "default": {} } === POSITIVE === { "default": { "name": null } } === POSITIVE === { "default": { "pets": [1, 2, {}] } } === NEGATIVE === { "default": foo } === NEGATIVE === { "default": [bar] } === NEGATIVE === { "default": { "foo": } } === NEGATIVE === { "default": { "pets": [1, 2, {null}] } } ola-0.10.9/common/web/testdata/schema.json0000664000175000017500000000766514376533110015331 00000000000000=== POSITIVE === { "$schema": "http:\/\/json-schema.org\/draft-04\/schema#", "default": {}, "definitions": { "positiveInteger": { "minimum": 0, "type": "integer" }, "positiveIntegerDefault0": { "allOf": [ { "$ref": "#\/definitions\/positiveInteger" }, { "default": 0 } ] }, "schemaArray": { "items": { "$ref": "#" }, "minItems": 1, "type": "array" }, "simpleTypes": { "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] }, "stringArray": { "items": { "type": "string" }, "minItems": 1, "type": "array", "uniqueItems": true } }, "dependencies": { "exclusiveMaximum": ["maximum"], "exclusiveMinimum": ["minimum"] }, "description": "Core schema meta-schema", "id": "http:\/\/json-schema.org\/draft-04\/schema#", "properties": { "$schema": { "type": "string" }, "additionalItems": { "anyOf": [ { "type": "boolean" }, { "$ref": "#" } ], "default": {} }, "additionalProperties": { "anyOf": [ { "type": "boolean" }, { "$ref": "#" } ], "default": {} }, "allOf": { "$ref": "#\/definitions\/schemaArray" }, "anyOf": { "$ref": "#\/definitions\/schemaArray" }, "default": {}, "definitions": { "additionalProperties": { "$ref": "#" }, "default": {}, "type": "object" }, "dependencies": { "additionalProperties": { "anyOf": [ { "$ref": "#" }, { "$ref": "#\/definitions\/stringArray" } ] }, "type": "object" }, "description": { "type": "string" }, "enum": { "minItems": 1, "type": "array", "uniqueItems": true }, "exclusiveMaximum": { "default": false, "type": "boolean" }, "exclusiveMinimum": { "default": false, "type": "boolean" }, "id": { "type": "string" }, "items": { "anyOf": [ { "$ref": "#" }, { "$ref": "#\/definitions\/schemaArray" } ], "default": {} }, "maxItems": { "$ref": "#\/definitions\/positiveInteger" }, "maxLength": { "$ref": "#\/definitions\/positiveInteger" }, "maxProperties": { "$ref": "#\/definitions\/positiveInteger" }, "maximum": { "type": "number" }, "minItems": { "$ref": "#\/definitions\/positiveIntegerDefault0" }, "minLength": { "$ref": "#\/definitions\/positiveIntegerDefault0" }, "minProperties": { "$ref": "#\/definitions\/positiveIntegerDefault0" }, "minimum": { "type": "number" }, "multipleOf": { "exclusiveMinimum": true, "minimum": 0, "type": "number" }, "not": { "$ref": "#" }, "oneOf": { "$ref": "#\/definitions\/schemaArray" }, "pattern": { "type": "string" }, "patternProperties": { "additionalProperties": { "$ref": "#" }, "default": {}, "type": "object" }, "properties": { "additionalProperties": { "$ref": "#" }, "default": {}, "type": "object" }, "required": { "$ref": "#\/definitions\/stringArray" }, "title": { "type": "string" }, "type": { "anyOf": [ { "$ref": "#\/definitions\/simpleTypes" }, { "items": { "$ref": "#\/definitions\/simpleTypes" }, "minItems": 1, "type": "array", "uniqueItems": true } ] }, "uniqueItems": { "default": false, "type": "boolean" } }, "type": "object" } ola-0.10.9/common/web/testdata/arrays.test0000664000175000017500000001003714376533110015363 00000000000000// Items === NEGATIVE === { "type": "array", "items": null } === NEGATIVE === { "type": "array", "items": true } === NEGATIVE === { "type": "array", "items": false } === NEGATIVE === { "type": "array", "items": "foo" } === NEGATIVE === { "type": "array", "items": 1 } === NEGATIVE === { "type": "array", "items": -1 } === NEGATIVE === { "type": "array", "items": [null] } === NEGATIVE === { "type": "array", "items": [false] } === NEGATIVE === { "type": "array", "items": ["foo"] } === NEGATIVE === { "type": "array", "items": [1] } === NEGATIVE === { "type": "array", "items": [-1] } === NEGATIVE === { "type": "array", "items": [[]] } === POSITIVE === // Tests with 'items' missing and 'additionalItems' taking various values { "type": "array" } === POSITIVE === { "additionalItems": true, "type": "array" } === POSITIVE === { "additionalItems": false, "type": "array" } === POSITIVE === { "additionalItems": {}, "type": "array" } === POSITIVE === { "additionalItems": { "type": "number" }, "type": "array" } // Tests with 'items' present as an object === POSITIVE === { "items": {}, "type": "array" } === POSITIVE === { "additionalItems": true, "items": {}, "type": "array" } === POSITIVE === { "additionalItems": false, "items": {}, "type": "array" } === POSITIVE === { "additionalItems": { "type": "string" }, "items": { "type": "number" }, "type": "array" } // Tests with 'items' as an array === POSITIVE === { "items": [], "type": "array" } === POSITIVE === { "items": [{}, {}, {}], "type": "array" } === POSITIVE === { "additionalItems": false, "items": [], "type": "array" } === POSITIVE === { "additionalItems": false, "items": [{}, {}], "type": "array" } === POSITIVE === { "additionalItems": true, "items": [], "type": "array" } === POSITIVE === { "additionalItems": {}, "items": [{}, {}, {}], "type": "array" } === POSITIVE === { "items": { "$ref": "#" }, "type": "array" } === POSITIVE === // Nested Arrays { "items": { "items": [ { "type": "boolean" } ], "type": "array" }, "maxItems": 1, "minItems": 5, "type": "array" } // min / max Items === POSITIVE === { "description": "List of names", "items": {}, "maxItems": 1, "minItems": 5, "title": "names", "type": "array" } === POSITIVE === { "items": {}, "minItems": 0, "type": "array" } -------- { "items": {}, "type": "array" } === NEGATIVE === { "items": {}, "maxItems": null, "type": "array" } === NEGATIVE === { "items": {}, "maxItems": 1.2, "type": "array" } === NEGATIVE === { "items": {}, "maxItems": -2, "type": "array" } === NEGATIVE === { "items": {}, "maxItems": "foo", "type": "array" } === NEGATIVE === { "items": {}, "maxItems": [], "type": "array" } === NEGATIVE === { "items": {}, "maxItems": {}, "type": "array" } === NEGATIVE === { "items": {}, "minItems": null, "type": "array" } === NEGATIVE === { "items": {}, "minItems": 1.2, "type": "array" } === NEGATIVE === { "items": {}, "minItems": -1, "type": "array" } === NEGATIVE === { "items": {}, "minItems": "foo", "type": "array" } === NEGATIVE === { "items": {}, "minItems": [], "type": "array" } === NEGATIVE === { "items": {}, "minItems": {}, "type": "array" } // uniqueItems === POSITIVE === { "items": {}, "type": "array", "uniqueItems": true } === POSITIVE === { "items": {}, "type": "array", "uniqueItems": false } -------- { "items": {}, "type": "array" } === NEGATIVE === { "items": {}, "type": "array", "uniqueItems": 2 } === NEGATIVE === { "items": {}, "type": "array", "uniqueItems": -1 } === NEGATIVE === { "items": {}, "type": "array", "uniqueItems": 1.2 } === NEGATIVE === { "items": {}, "type": "array", "uniqueItems": null } === NEGATIVE === { "items": {}, "type": "array", "uniqueItems": "foo" } === NEGATIVE === { "items": {}, "type": "array", "uniqueItems": [] } === NEGATIVE === { "items": {}, "type": "array", "uniqueItems": {} } ola-0.10.9/common/web/testdata/definitions.test0000664000175000017500000000171514376533110016400 00000000000000=== POSITIVE === { "definitions": { "positiveInteger": { "minimum": 0, "type": "integer" }, "positiveIntegerDefault0": { "allOf": [ { "$ref": "#\/definitions\/positiveInteger" }, { "default": 0 } ] }, "schemaArray": { "items": { "$ref": "#" }, "minItems": 1, "type": "array" }, "simpleTypes": { "enum": ["array", "boolean", "integer", "null", "number", "object", "string"] }, "stringArray": { "items": { "type": "string" }, "minItems": 1, "type": "array", "uniqueItems": true } } } === NEGATIVE === { "definitions": [] } === NEGATIVE === { "definitions": null } === NEGATIVE === { "definitions": false } === NEGATIVE === { "definitions": "foo" } === NEGATIVE === { "definitions": 1 } === NEGATIVE === { "definitions": -1 } === NEGATIVE === { "definitions": 1.2 } ola-0.10.9/common/web/testdata/anyof.test0000664000175000017500000000077114376533110015202 00000000000000=== POSITIVE === // This value can be a bool or a string with the value "true" or "false". { "anyOf": [ { "type": "boolean" }, { "enum": ["true", "false"], "type": "string" } ] } === NEGATIVE === { "anyOf": [] } === NEGATIVE === { "anyOf": null } === NEGATIVE === { "anyOf": false } === NEGATIVE === { "anyOf": "foo" } === NEGATIVE === { "anyOf": 1 } === NEGATIVE === { "anyOf": -1 } === NEGATIVE === { "anyOf": 1.2 } === NEGATIVE === { "anyOf": {} } ola-0.10.9/common/web/testdata/allof.test0000664000175000017500000000072714376533110015164 00000000000000=== POSITIVE === // This value can be a bool or a string with the value "true" or "false". { "allOf": [ { "type": "string" }, { "default": "foo" } ] } === NEGATIVE === { "allOf": [] } === NEGATIVE === { "allOf": null } === NEGATIVE === { "allOf": false } === NEGATIVE === { "allOf": "foo" } === NEGATIVE === { "allOf": 1 } === NEGATIVE === { "allOf": -1 } === NEGATIVE === { "allOf": 1.2 } === NEGATIVE === { "allOf": {} } ola-0.10.9/common/web/PatchTest.cpp0000664000175000017500000006273214376533110013764 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PatchTest.cpp * Unittest for the Json Patch. * Copyright (C) 2014 Simon Newton */ #include #include "ola/testing/TestUtils.h" #include "ola/web/Json.h" #include "ola/web/JsonData.h" #include "ola/web/JsonPatch.h" #include "ola/web/JsonParser.h" #include "ola/web/JsonWriter.h" #include "ola/web/JsonPointer.h" #include "ola/Logging.h" using ola::web::JsonArray; using ola::web::JsonBool; using ola::web::JsonInt; using ola::web::JsonNull; using ola::web::JsonObject; using ola::web::JsonParser; using ola::web::JsonPatchAddOp; using ola::web::JsonPatchCopyOp; using ola::web::JsonPatchMoveOp; using ola::web::JsonPatchRemoveOp; using ola::web::JsonPatchReplaceOp; using ola::web::JsonPatchSet; using ola::web::JsonPatchTestOp; using ola::web::JsonPointer; using ola::web::JsonString; using ola::web::JsonData; using ola::web::JsonValue; using ola::web::JsonWriter; using std::auto_ptr; using std::string; class JsonPatchTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(JsonPatchTest); CPPUNIT_TEST(testAddOp); CPPUNIT_TEST(testRemoveOp); CPPUNIT_TEST(testReplaceOp); CPPUNIT_TEST(testCopyOp); CPPUNIT_TEST(testMoveOp); CPPUNIT_TEST(testTestOp); CPPUNIT_TEST(testAtomicUpdates); CPPUNIT_TEST_SUITE_END(); public: void testAddOp(); void testRemoveOp(); void testReplaceOp(); void testCopyOp(); void testMoveOp(); void testTestOp(); void testAtomicUpdates(); private: void CheckValuesMatch(const std::string &, const JsonValue *actual); void BuildSampleText(JsonData *text); }; void JsonPatchTest::CheckValuesMatch(const std::string &input, const JsonValue *actual) { string error; auto_ptr expected_value(JsonParser::Parse(input, &error)); if (expected_value.get()) { if (*actual != *expected_value.get()) { OLA_ASSERT_EQ(JsonWriter::AsString(*(expected_value.get())), JsonWriter::AsString(*actual)); } } else { OLA_ASSERT_EQ(expected_value.get(), actual); } } void JsonPatchTest::BuildSampleText(JsonData *text) { auto_ptr object(new JsonObject()); object->Add("foo", "bar"); object->Add("baz", false); JsonObject *child_object = new JsonObject(); child_object->Add("bat", 1); object->AddValue("object", child_object); JsonArray *child_array = new JsonArray(); child_array->Append(1); child_array->Append(2); child_array->Append(3); object->AddValue("array", child_array); text->SetValue(object.release()); } CPPUNIT_TEST_SUITE_REGISTRATION(JsonPatchTest); void JsonPatchTest::testAddOp() { JsonData text(NULL); { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp(JsonPointer("/foo"), new JsonNull())); OLA_ASSERT_FALSE(text.Apply(patch)); } { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp(JsonPointer(""), new JsonObject())); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("{}", text.Value()); } { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp( JsonPointer("/name"), new JsonString("simon"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("{\"name\": \"simon\"}", text.Value()); } // test replace { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp( JsonPointer("/name"), new JsonString("james"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("{\"name\": \"james\"}", text.Value()); } { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp( JsonPointer("/numbers"), new JsonArray())); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("{\"name\": \"james\", \"numbers\": []}", text.Value()); } // Append { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp( JsonPointer("/numbers/-"), new JsonInt(1))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("{\"name\": \"james\", \"numbers\": [1]}", text.Value()); } // Array replace. { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp( JsonPointer("/numbers/0"), new JsonInt(2))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("{\"name\": \"james\", \"numbers\": [2, 1]}", text.Value()); } // out of bounds { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp( JsonPointer("/numbers/2"), new JsonInt(3))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch("{\"name\": \"james\", \"numbers\": [2, 1]}", text.Value()); } // non-int array index { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp( JsonPointer("/numbers/bar"), new JsonInt(3))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch("{\"name\": \"james\", \"numbers\": [2, 1]}", text.Value()); } // missing parent { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp( JsonPointer("/pets/fluffy"), new JsonObject())); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch("{\"name\": \"james\", \"numbers\": [2, 1]}", text.Value()); } // add to a leaf node { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp( JsonPointer("/name/middle"), new JsonNull())); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch("{\"name\": \"james\", \"numbers\": [2, 1]}", text.Value()); } // Add a null to an object, this isn't allowed. { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp(JsonPointer("/foo"), NULL)); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch("{\"name\": \"james\", \"numbers\": [2, 1]}", text.Value()); } // Add a null { JsonPatchSet patch; patch.AddOp(new JsonPatchAddOp(JsonPointer(""), NULL)); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("", text.Value()); } } void JsonPatchTest::testRemoveOp() { JsonData text(NULL); BuildSampleText(&text); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); // Try removing /object/bat { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/object/bat"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {}, \"array\": [1,2,3] }", text.Value()); } // Try removing /array/1 { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/array/1"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {}, \"array\": [1,3] }", text.Value()); } // Try removing /array/- { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/array/-"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {}, \"array\": [1] }", text.Value()); } // Try removing /array/1 { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/array/1"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {}, \"array\": [1] }", text.Value()); } // Try removing /array/- { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/array/-"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {}, \"array\": [] }", text.Value()); } // Try removing /array/- { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/array/1"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {}, \"array\": [] }", text.Value()); } // Try removing /foo { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/foo"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"baz\": false, \"object\": {}, \"array\": [] }", text.Value()); } // Try removing /array & /object { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/array"))); patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/object"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("{\"baz\": false }", text.Value()); } // Try removing something that doesn't exist { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/foo"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch("{\"baz\": false }", text.Value()); } // Finally remove the entire value. { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer(""))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("", text.Value()); } OLA_ASSERT_NULL(text.Value()); // Test we don't crash if we try to remove on an empty value { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/foo"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch("", text.Value()); } } void JsonPatchTest::testReplaceOp() { JsonData text(NULL); BuildSampleText(&text); // Invalid pointer { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer("foo"), new JsonString("test"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Simple key replace { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer("/foo"), new JsonString("test"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"test\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Replace an array index { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer("/array/1"), new JsonInt(4))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"test\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,4,3] }", text.Value()); } // Replace the last item in the array { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer("/array/-"), new JsonInt(5))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"test\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,4,5] }", text.Value()); } // Non-int index { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer("/array/foo"), new JsonInt(5))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"test\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,4,5] }", text.Value()); } // Out-of-range index { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer("/array/3"), new JsonInt(5))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"test\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,4,5] }", text.Value()); } // Missing parent { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer("/missing/3"), new JsonInt(5))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"test\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,4,5] }", text.Value()); } // 2 level path { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer("/object/bat"), new JsonInt(4))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"test\", \"baz\": false, " " \"object\": {\"bat\": 4}, \"array\": [1,4,5] }", text.Value()); } // Missing element { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer("/object/barrrr"), new JsonInt(4))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"test\", \"baz\": false, " " \"object\": {\"bat\": 4}, \"array\": [1,4,5] }", text.Value()); } // Replace entire array { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer("/array"), new JsonArray())); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"test\", \"baz\": false, " " \"object\": {\"bat\": 4}, \"array\": [] }", text.Value()); } // Another out-of-range { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer("/array/0"), new JsonArray())); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"test\", \"baz\": false, " " \"object\": {\"bat\": 4}, \"array\": [] }", text.Value()); } // Replace the entire text { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer(""), new JsonObject())); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("{}", text.Value()); } // Replace with a NULL { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer(""), NULL)); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("", text.Value()); } // Replace a NULL { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp(JsonPointer(""), new JsonObject())); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("{}", text.Value()); } } void JsonPatchTest::testMoveOp() { JsonData text(NULL); // Move a null value { JsonPatchSet patch; patch.AddOp(new JsonPatchMoveOp(JsonPointer("/foo"), JsonPointer("/foo"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("", text.Value()); } BuildSampleText(&text); // Invalid src pointer { JsonPatchSet patch; patch.AddOp(new JsonPatchMoveOp(JsonPointer("foo"), JsonPointer("/foo"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Invalid dst pointer { JsonPatchSet patch; patch.AddOp(new JsonPatchMoveOp(JsonPointer("/foo"), JsonPointer("baz"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Identity move { JsonPatchSet patch; patch.AddOp(new JsonPatchMoveOp(JsonPointer("/foo"), JsonPointer("/foo"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Test prefix handling, you can't move an object into itself { JsonPatchSet patch; patch.AddOp(new JsonPatchMoveOp( JsonPointer("/object"), JsonPointer("/object/bat"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Simple move (add) { JsonPatchSet patch; patch.AddOp(new JsonPatchMoveOp(JsonPointer("/foo"), JsonPointer("/bar"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"bar\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Simple move (replace) { JsonPatchSet patch; patch.AddOp(new JsonPatchMoveOp(JsonPointer("/bar"), JsonPointer("/baz"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"baz\": \"bar\", " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Replace an inner value with an outer (array) { JsonPatchSet patch; patch.AddOp(new JsonPatchMoveOp( JsonPointer("/array/1"), JsonPointer("/array"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"baz\": \"bar\", " " \"object\": {\"bat\": 1}, \"array\": 2 }", text.Value()); } // Replace an inner value with an outer (object) { JsonPatchSet patch; patch.AddOp(new JsonPatchMoveOp( JsonPointer("/object/bat"), JsonPointer("/object"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"baz\": \"bar\", " " \"object\": 1, \"array\": 2 }", text.Value()); } // Replace the root { JsonPatchSet patch; patch.AddOp(new JsonPatchMoveOp( JsonPointer("/baz"), JsonPointer(""))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("\"bar\"", text.Value()); } } void JsonPatchTest::testCopyOp() { JsonData text(NULL); // Copy a null value { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp(JsonPointer("/foo"), JsonPointer("/foo"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch("", text.Value()); } BuildSampleText(&text); // Invalid src pointer { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp(JsonPointer("foo"), JsonPointer("/foo"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Invalid dst pointer { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp(JsonPointer("/foo"), JsonPointer("baz"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Identity copy { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp(JsonPointer("/foo"), JsonPointer("/foo"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Basic copy (replace) { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp(JsonPointer("/foo"), JsonPointer("/baz"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": \"bar\", " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Basic copy (add) { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp(JsonPointer("/foo"), JsonPointer("/qux"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": \"bar\", \"qux\": \"bar\", " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Copy into array { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp( JsonPointer("/foo"), JsonPointer("/array/1"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": \"bar\", \"qux\": \"bar\", " " \"object\": {\"bat\": 1}, \"array\": [1,\"bar\",2, 3] }", text.Value()); } // Copy into object (add) { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp( JsonPointer("/foo"), JsonPointer("/object/bar"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": \"bar\", \"qux\": \"bar\", " " \"object\": {\"bat\": 1, \"bar\": \"bar\"}, " " \"array\": [1,\"bar\",2, 3] }", text.Value()); } // Copy into object (replace) { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp( JsonPointer("/foo"), JsonPointer("/object/bat"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": \"bar\", \"qux\": \"bar\", " " \"object\": {\"bat\": \"bar\", \"bar\": \"bar\"}, " " \"array\": [1,\"bar\",2, 3] }", text.Value()); } // Replace an inner value with the object itself { // First some cleanup { JsonPatchSet patch; patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/object/bar"))); patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/array/1"))); patch.AddOp(new JsonPatchRemoveOp(JsonPointer("/qux"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": \"bar\", " " \"object\": {\"bat\": \"bar\"}, " " \"array\": [1,2, 3] }", text.Value()); } JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp( JsonPointer("/object"), JsonPointer("/object/bat"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": \"bar\", " " \"object\": {\"bat\": { \"bat\": \"bar\"} }, " " \"array\": [1,2, 3] }", text.Value()); } // Replace an object with an inner value. { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp( JsonPointer("/object/bat"), JsonPointer("/object"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": \"bar\", " " \"object\": { \"bat\": \"bar\"}, " " \"array\": [1,2, 3] }", text.Value()); } // Copy an array to itself { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp( JsonPointer("/array"), JsonPointer("/array/-"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": \"bar\", " " \"object\": { \"bat\": \"bar\"}, " " \"array\": [1,2, 3, [1,2,3]] }", text.Value()); } // Replace an array with an inner element { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp( JsonPointer("/array/3"), JsonPointer("/array"))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": \"bar\", " " \"object\": { \"bat\": \"bar\"}, " " \"array\": [1,2, 3] }", text.Value()); } // Point to an invalid element (one past the end) { JsonPatchSet patch; patch.AddOp(new JsonPatchCopyOp( JsonPointer("/array/-"), JsonPointer("/array/1"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": \"bar\", " " \"object\": { \"bat\": \"bar\"}, " " \"array\": [1,2, 3] }", text.Value()); } } void JsonPatchTest::testTestOp() { auto_ptr object(new JsonObject()); object->Add("foo", "bar"); object->Add("baz", true); object->Add("bat", false); auto_ptr original_object(object->Clone()); JsonData text(object.release()); JsonPointer pointer1(""); JsonPointer pointer2("/foo"); JsonPointer pointer3("/baz"); JsonPointer pointer4("/bat"); JsonPatchSet patch1; patch1.AddOp(new JsonPatchTestOp(pointer1, new JsonNull())); OLA_ASSERT_FALSE(text.Apply(patch1)); JsonPatchSet patch2; patch2.AddOp(new JsonPatchTestOp(pointer2, new JsonBool(true))); OLA_ASSERT_FALSE(text.Apply(patch2)); JsonPatchSet patch3; patch3.AddOp(new JsonPatchTestOp(pointer3, new JsonBool(true))); OLA_ASSERT_TRUE(text.Apply(patch3)); JsonPatchSet patch4; patch4.AddOp(new JsonPatchTestOp(pointer4, new JsonBool(true))); OLA_ASSERT_FALSE(text.Apply(patch4)); JsonPatchSet patch5; patch5.AddOp(new JsonPatchTestOp(pointer3, new JsonBool(false))); OLA_ASSERT_FALSE(text.Apply(patch5)); // Now try a multi-element patch JsonPatchSet patch6; patch6.AddOp(new JsonPatchTestOp(pointer3, new JsonBool(true))); patch6.AddOp(new JsonPatchTestOp(pointer4, new JsonBool(false))); OLA_ASSERT_TRUE(text.Apply(patch6)); JsonPatchSet patch7; patch7.AddOp(new JsonPatchTestOp(pointer3, new JsonBool(true))); patch7.AddOp(new JsonPatchTestOp(pointer4, new JsonBool(true))); OLA_ASSERT_FALSE(text.Apply(patch7)); JsonPatchSet patch8; patch8.AddOp(new JsonPatchTestOp(pointer3, new JsonNull())); patch8.AddOp(new JsonPatchTestOp(pointer4, new JsonBool(false))); OLA_ASSERT_FALSE(text.Apply(patch8)); // Finally check an invalid pointer JsonPointer invalid_pointer("foo"); JsonPatchSet patch9; patch9.AddOp(new JsonPatchTestOp(invalid_pointer, new JsonNull())); OLA_ASSERT_FALSE(text.Apply(patch9)); // Check no changes were made OLA_ASSERT_TRUE(*(original_object.get()) == *(text.Value())); } void JsonPatchTest::testAtomicUpdates() { JsonData text(NULL); BuildSampleText(&text); // Test a patch which will never pass. This is from section 5 of the RFC. { JsonPatchSet patch; patch.AddOp(new JsonPatchReplaceOp( JsonPointer("/foo"), new JsonInt(42))); patch.AddOp(new JsonPatchTestOp( JsonPointer("/foo"), new JsonString("C"))); OLA_ASSERT_FALSE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } // Now try a test-and-patch sequence { JsonPatchSet patch; patch.AddOp(new JsonPatchTestOp( JsonPointer("/foo"), new JsonString("bar"))); patch.AddOp(new JsonPatchReplaceOp( JsonPointer("/baz"), new JsonBool(true))); OLA_ASSERT_TRUE(text.Apply(patch)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": true, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } } ola-0.10.9/common/web/JsonParser.cpp0000664000175000017500000001304414376533110014143 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * JsonParser.cpp * A Json Parser. * Copyright (C) 2014 Simon Newton */ #include "ola/web/JsonParser.h" #define __STDC_LIMIT_MACROS // for UINT8_MAX & friends #include #include #include "ola/Logging.h" #include "ola/stl/STLUtils.h" #include "ola/web/Json.h" #include "ola/web/JsonLexer.h" namespace ola { namespace web { using std::string; void JsonParser::Begin() { m_error = ""; m_root.reset(); m_key = ""; STLEmptyStack(&m_container_stack); STLEmptyStack(&m_array_stack); STLEmptyStack(&m_object_stack); } void JsonParser::End() { if (!m_container_stack.empty()) { OLA_WARN << "Json container stack is not empty"; } STLEmptyStack(&m_container_stack); if (!m_array_stack.empty()) { OLA_WARN << "JsonArray stack is not empty"; } STLEmptyStack(&m_array_stack); if (!m_object_stack.empty()) { OLA_WARN << "JsonObject stack is not empty"; } STLEmptyStack(&m_object_stack); } void JsonParser::String(const string &value) { AddValue(new JsonString(value)); } void JsonParser::Number(uint32_t value) { AddValue(new JsonUInt(value)); } void JsonParser::Number(int32_t value) { AddValue(new JsonInt(value)); } void JsonParser::Number(uint64_t value) { AddValue(new JsonUInt64(value)); } void JsonParser::Number(int64_t value) { AddValue(new JsonInt64(value)); } void JsonParser::Number(const JsonDouble::DoubleRepresentation &rep) { AddValue(new JsonDouble(rep)); } void JsonParser::Number(double value) { AddValue(new JsonDouble(value)); } void JsonParser::Bool(bool value) { AddValue(new JsonBool(value)); } void JsonParser::Null() { AddValue(new JsonNull()); } void JsonParser::OpenArray() { if (m_container_stack.empty()) { m_array_stack.push(new JsonArray()); m_root.reset(m_array_stack.top()); } else if (m_container_stack.top() == ARRAY && !m_array_stack.empty()) { m_array_stack.push(m_array_stack.top()->AppendArray()); } else if (m_container_stack.top() == OBJECT && !m_object_stack.empty()) { m_array_stack.push(m_object_stack.top()->AddArray(m_key)); m_key = ""; } else { OLA_WARN << "Can't find where to start array"; m_error = "Internal error"; } m_container_stack.push(ARRAY); } void JsonParser::CloseArray() { if (m_container_stack.empty() || m_container_stack.top() != ARRAY || m_array_stack.empty()) { OLA_WARN << "Mismatched CloseArray()"; m_error = "Internal error"; return; } m_container_stack.pop(); m_array_stack.pop(); } void JsonParser::OpenObject() { if (m_container_stack.empty()) { m_object_stack.push(new JsonObject()); m_root.reset(m_object_stack.top()); } else if (m_container_stack.top() == ARRAY && !m_array_stack.empty()) { m_object_stack.push(m_array_stack.top()->AppendObject()); } else if (m_container_stack.top() == OBJECT && !m_object_stack.empty()) { m_object_stack.push(m_object_stack.top()->AddObject(m_key)); m_key = ""; } else { OLA_WARN << "Can't find where to start object"; m_error = "Internal error"; } m_container_stack.push(OBJECT); } void JsonParser::ObjectKey(const string &key) { if (!m_key.empty()) { OLA_WARN << "Json Key should be empty, was " << key; } m_key = key; } void JsonParser::CloseObject() { if (m_container_stack.empty() || m_container_stack.top() != OBJECT || m_object_stack.empty()) { OLA_WARN << "Mismatched CloseObject()"; m_error = "Internal error"; return; } m_container_stack.pop(); m_object_stack.pop(); } void JsonParser::SetError(const string &error) { m_error = error; } string JsonParser::GetError() const { return m_error; } JsonValue *JsonParser::GetRoot() { return m_root.get(); } JsonValue *JsonParser::ClaimRoot() { if (m_error.empty()) { return m_root.release(); } else { return NULL; } } void JsonParser::AddValue(JsonValue *value) { if (!m_container_stack.empty() && m_container_stack.top() == ARRAY) { if (m_array_stack.empty()) { OLA_WARN << "Missing JsonArray, parsing is broken!"; m_error = "Internal error"; delete value; } else { m_array_stack.top()->Append(value); } } else if (!m_container_stack.empty() && m_container_stack.top() == OBJECT) { if (m_object_stack.empty()) { OLA_WARN << "Missing JsonObject, parsing is broken!"; m_error = "Internal error"; delete value; } else { m_object_stack.top()->AddValue(m_key, value); m_key = ""; } } else if (!m_root.get()) { m_root.reset(value); return; } else { OLA_WARN << "Parse stack broken"; m_error = "Internal error"; delete value; } } JsonValue* JsonParser::Parse(const string &input, string *error) { JsonParser parser; if (JsonLexer::Parse(input, &parser)) { return parser.ClaimRoot(); } else { *error = parser.GetError(); return NULL; } } } // namespace web } // namespace ola ola-0.10.9/common/web/JsonPatch.cpp0000664000175000017500000001724414376533110013754 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * JsonPatch.cpp * Implementation of RFC 6902. * Copyright (C) 2014 Simon Newton */ #include "ola/web/JsonPatch.h" #include #include #include #include "ola/Logging.h" #include "ola/stl/STLUtils.h" #include "ola/web/Json.h" #include "ola/web/JsonPointer.h" namespace ola { namespace web { using std::string; namespace { string LastToken(const JsonPointer &pointer) { return pointer.TokenAt(pointer.TokenCount() - 2); } JsonValue *GetParent(JsonValue *value, const JsonPointer &pointer) { JsonPointer parent_pointer(pointer); parent_pointer.Pop(); return value->LookupElement(parent_pointer); } /** * Most ops have an if-object-then, else-if-array-then clause. This puts all * the grunt work in a single method */ class ObjectOrArrayAction { public: virtual ~ObjectOrArrayAction() {} bool TakeActionOn(JsonValue *value, const JsonPointer &target); // Implement these with the specific actions virtual bool Object(JsonObject *object, const string &key) = 0; virtual bool ArrayIndex(JsonArray *array, uint32_t index) = 0; // Called when the index is '-' virtual bool ArrayLast(JsonArray *array) = 0; }; bool ObjectOrArrayAction::TakeActionOn(JsonValue *value, const JsonPointer &target) { JsonValue *parent = GetParent(value, target); if (!parent) { return false; } const string key = LastToken(target); JsonObject *object = ObjectCast(parent); if (object) { return Object(object, key); } JsonArray *array = ArrayCast(parent); if (array) { if (key == "-") { return ArrayLast(array); } uint32_t index; if (!StringToInt(key, &index)) { return false; } return ArrayIndex(array, index); } return false; } class AddAction : public ObjectOrArrayAction { public: explicit AddAction(const JsonValue *value_to_clone) : m_value(value_to_clone) {} bool Object(JsonObject *object, const string &key) { object->AddValue(key, m_value->Clone()); return true; } bool ArrayIndex(JsonArray *array, uint32_t index) { return array->InsertElementAt(index, m_value->Clone()); } bool ArrayLast(JsonArray *array) { array->AppendValue(m_value->Clone()); return true; } private: const JsonValue *m_value; }; class RemoveAction : public ObjectOrArrayAction { public: bool Object(JsonObject *object, const string &key) { return object->Remove(key); } bool ArrayIndex(JsonArray *array, uint32_t index) { return array->RemoveElementAt(index); } bool ArrayLast(JsonArray *array) { if (array->IsEmpty()) { return false; } array->RemoveElementAt(array->Size() - 1); return true; } }; class ReplaceAction : public ObjectOrArrayAction { public: explicit ReplaceAction(const JsonValue *value) : m_value(value) {} bool Object(JsonObject *object, const string &key) { return object->ReplaceValue(key, m_value->Clone()); } bool ArrayIndex(JsonArray *array, uint32_t index) { return array->ReplaceElementAt(index, m_value->Clone()); } bool ArrayLast(JsonArray *array) { if (array->IsEmpty()) { return false; } array->ReplaceElementAt(array->Size() - 1, m_value->Clone()); return true; } private: const JsonValue *m_value; }; bool AddOp(const JsonPointer &target, JsonValue **root, const JsonValue *value_to_clone) { if (!target.IsValid()) { return false; } if (target.TokenCount() == 1) { // Add also operates as replace as per the spec. // Make a copy before we delete, since the value_to_clone may be within the // root. JsonValue *new_value = value_to_clone ? value_to_clone->Clone() : NULL; if (*root) { delete *root; } *root = new_value; return true; } // If we're not operating on the root, NULLs aren't allowed. if (*root == NULL || value_to_clone == NULL) { return false; } AddAction action(value_to_clone); return action.TakeActionOn(*root, target); } } // namespace bool JsonPatchAddOp::Apply(JsonValue **value) const { return AddOp(m_pointer, value, m_value.get()); } bool JsonPatchRemoveOp::Apply(JsonValue **value) const { if (!m_pointer.IsValid()) { return false; } if (m_pointer.TokenCount() == 1) { delete *value; *value = NULL; return true; } if (*value == NULL) { return false; } RemoveAction action; return action.TakeActionOn(*value, m_pointer); } bool JsonPatchReplaceOp::Apply(JsonValue **value) const { if (!m_pointer.IsValid()) { return false; } if (m_pointer.TokenCount() == 1) { delete *value; *value = m_value.get() ? m_value->Clone() : NULL; return true; } // If we're not operating on the root, NULLs aren't allowed. if (*value == NULL || m_value.get() == NULL) { return false; } ReplaceAction action(m_value.get()); return action.TakeActionOn(*value, m_pointer); } bool JsonPatchMoveOp::Apply(JsonValue **value) const { if (!m_to.IsValid() || !m_from.IsValid()) { return false; } if (m_from == m_to) { return true; } if (m_from.IsPrefixOf(m_to)) { return false; } JsonValue *src_parent = GetParent(*value, m_from); if (!src_parent) { return false; } const string last_token = LastToken(m_from); JsonPointer child_ptr("/" + last_token); JsonValue *source = src_parent->LookupElement(child_ptr); if (!source) { return false; } if (!AddOp(m_to, value, source)) { return false; } if (m_to.IsPrefixOf(m_from)) { // At this point the original has already been destroyed during the Add return true; } RemoveAction action; if (!action.TakeActionOn(src_parent, child_ptr)) { OLA_WARN << "Remove-after-move returned false!"; } return true; } bool JsonPatchCopyOp::Apply(JsonValue **value) const { if (!m_to.IsValid() || !m_from.IsValid()) { return false; } if (m_from == m_to) { return true; } if (*value == NULL) { return false; } JsonValue *src_parent = GetParent(*value, m_from); if (!src_parent) { return false; } const string last_token = LastToken(m_from); JsonPointer child_ptr("/" + last_token); JsonValue *source = src_parent->LookupElement(child_ptr); if (!source) { return false; } return AddOp(m_to, value, source); } bool JsonPatchTestOp::Apply(JsonValue **value) const { if (!m_pointer.IsValid()) { return false; } if (*value == NULL) { return m_pointer.TokenCount() == 1 && m_value.get() == NULL; } JsonValue *target = (*value)->LookupElement(m_pointer); if (!target) { return false; } return *target == *m_value.get(); } JsonPatchSet::~JsonPatchSet() { STLDeleteElements(&m_patch_ops); } void JsonPatchSet::AddOp(JsonPatchOp *op) { m_patch_ops.push_back(op); } bool JsonPatchSet::Apply(JsonValue **value) const { PatchOps::const_iterator iter = m_patch_ops.begin(); for (; iter != m_patch_ops.end(); ++iter) { if (!(*iter)->Apply(value)) { return false; } } return true; } } // namespace web } // namespace ola ola-0.10.9/common/web/SchemaParser.h0000664000175000017500000000713314376533110014101 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaParser.h * Constructs a JsonSchema. * Copyright (C) 2014 Simon Newton */ #ifndef COMMON_WEB_SCHEMAPARSER_H_ #define COMMON_WEB_SCHEMAPARSER_H_ #include #include #include #include "common/web/PointerTracker.h" #include "common/web/SchemaErrorLogger.h" #include "common/web/SchemaParseContext.h" #include "ola/base/Macro.h" #include "ola/web/JsonLexer.h" #include "ola/web/JsonPointer.h" namespace ola { namespace web { /** * @brief Build the tree of validators and a SchemaDefinitions object from a * JSON Schema. * * The SchemaParser is an implementation of JsonParserInterface. As the * JsonLexer encounters each token, it calls the appropriate method on the * SchemaParser. The SchemaParser maintains a stack of contexts, each of which * corresponds to a different part of the JSON schema. As objects / arrays are * opened / closed, new contexts are added / removed from the context stack. */ class SchemaParser : public JsonParserInterface { public: /** * @brief Create a new SchemaParser. */ SchemaParser(); /** * @brief Clean up */ ~SchemaParser(); // Methods from JsonParserInterface void Begin(); void End(); void String(const std::string &value); void Number(uint32_t value); void Number(int32_t value); void Number(uint64_t value); void Number(int64_t value); void Number(const JsonDouble::DoubleRepresentation &rep); void Number(double value); void Bool(bool value); void Null(); void OpenArray(); void CloseArray(); void OpenObject(); void ObjectKey(const std::string &key); void CloseObject(); void SetError(const std::string &error); /** * @brief Check if the schema was valid. * @return true if the schema was valid, false otherwise. */ bool IsValidSchema(); /** * @brief Get the error message. */ std::string Error() const; /** * @brief Claim the RootValidator that was created by parsing the schema. * @returns A new Validator, or NULL if the schema wasn't valid. Ownership of * the validtor is transferred to the caller. */ ValidatorInterface* ClaimRootValidator(); /** * @brief Claim the SchemaDefinitions that were created by parsing the schema. * @returns A SchemaDefinitions object, or NULL if the schema wasn't valid. * Ownership of the SchemaDefinitions is transferred to the caller. */ SchemaDefinitions* ClaimSchemaDefs(); private: std::auto_ptr m_schema_defs; std::auto_ptr m_root_context; std::auto_ptr m_root_validator; std::stack m_context_stack; JsonPointer m_pointer; PointerTracker m_pointer_tracker; SchemaErrorLogger m_error_logger; template void HandleNumber(T t); DISALLOW_COPY_AND_ASSIGN(SchemaParser); }; } // namespace web } // namespace ola #endif // COMMON_WEB_SCHEMAPARSER_H_ ola-0.10.9/common/web/JsonTest.cpp0000664000175000017500000004355014376533110013633 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * JsonTest.cpp * Unittest for Json classes. * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include "ola/testing/TestUtils.h" #include "ola/web/Json.h" #include "ola/web/JsonPointer.h" #include "ola/web/JsonWriter.h" using ola::web::JsonArray; using ola::web::JsonBool; using ola::web::JsonDouble; using ola::web::JsonInt64; using ola::web::JsonInt; using ola::web::JsonNull; using ola::web::JsonObject; using ola::web::JsonPointer; using ola::web::JsonRawValue; using ola::web::JsonString; using ola::web::JsonUInt64; using ola::web::JsonUInt; using ola::web::JsonValue; using ola::web::JsonWriter; using std::string; using std::vector; class JsonTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(JsonTest); CPPUNIT_TEST(testString); CPPUNIT_TEST(testIntegerValues); CPPUNIT_TEST(testNumberValues); CPPUNIT_TEST(testRaw); CPPUNIT_TEST(testBool); CPPUNIT_TEST(testNull); CPPUNIT_TEST(testSimpleArray); CPPUNIT_TEST(testEmptyObject); CPPUNIT_TEST(testSimpleObject); CPPUNIT_TEST(testComplexObject); CPPUNIT_TEST(testEquality); CPPUNIT_TEST(testIntInequality); CPPUNIT_TEST(testMultipleOf); CPPUNIT_TEST(testLookups); CPPUNIT_TEST(testClone); CPPUNIT_TEST_SUITE_END(); public: void testString(); void testIntegerValues(); void testNumberValues(); void testRaw(); void testBool(); void testNull(); void testSimpleArray(); void testEmptyObject(); void testSimpleObject(); void testComplexObject(); void testEquality(); void testIntInequality(); void testMultipleOf(); void testLookups(); void testClone(); }; CPPUNIT_TEST_SUITE_REGISTRATION(JsonTest); /* * Test a string. */ void JsonTest::testString() { JsonString value("foo"); string expected = "\"foo\""; OLA_ASSERT_EQ(expected, JsonWriter::AsString(value)); // test escaping JsonString value2("foo\"bar\""); expected = "\"foo\\\"bar\\\"\""; OLA_ASSERT_EQ(expected, JsonWriter::AsString(value2)); } /* * Test ints. */ void JsonTest::testIntegerValues() { JsonUInt uint_value(10); string expected = "10"; OLA_ASSERT_EQ(expected, JsonWriter::AsString(uint_value)); JsonInt int_value(-10); expected = "-10"; OLA_ASSERT_EQ(expected, JsonWriter::AsString(int_value)); } /* * Test numbers (doubles). */ void JsonTest::testNumberValues() { // For JsonDouble constructed with a double, the string representation // depends on the platform. For example 1.23-e2 could be any of 1.23-e2, // 0.00123 or 1.23e-002. // So we skip this test. JsonDouble d1(12.234); OLA_ASSERT_EQ(12.234, d1.Value()); JsonDouble d2(-1.23e-12); OLA_ASSERT_EQ(-1.23e-12, d2.Value()); // For JsonDouble created using DoubleRepresentation, the string will be // well defined, but the Value() may differ. Just do our best here. JsonDouble::DoubleRepresentation rep1 = { false, 12, 1, 345, 0 }; JsonDouble d3(rep1); OLA_ASSERT_EQ(string("12.0345"), JsonWriter::AsString(d3)); OLA_ASSERT_EQ(12.0345, d3.Value()); JsonDouble::DoubleRepresentation rep2 = { true, 345, 3, 789, 2 }; JsonDouble d4(rep2); OLA_ASSERT_EQ(string("-345.000789e2"), JsonWriter::AsString(d4)); OLA_ASSERT_DOUBLE_EQ(-345.000789e2, d4.Value(), 0.001); JsonDouble::DoubleRepresentation rep3 = { true, 345, 3, 0, -2 }; JsonDouble d5(rep3); OLA_ASSERT_EQ(string("-345e-2"), JsonWriter::AsString(d5)); OLA_ASSERT_EQ(-3.45, d5.Value()); JsonDouble::DoubleRepresentation rep4 = { false, 2, 0, 1, 0 }; JsonDouble d6(rep4); OLA_ASSERT_EQ(string("2.1"), JsonWriter::AsString(d6)); OLA_ASSERT_EQ(2.1, d6.Value()); } /* * Test raw. * This is used by the web DMX console */ void JsonTest::testRaw() { // A printable character JsonRawValue value("\x41"); string expected = "\x41"; OLA_ASSERT_EQ(expected, JsonWriter::AsString(value)); // And an unprintable one JsonRawValue value2("\x7f"); expected = "\x7f"; OLA_ASSERT_EQ(expected, JsonWriter::AsString(value2)); } /* * Test bools. */ void JsonTest::testBool() { JsonBool true_value(true); string expected = "true"; OLA_ASSERT_EQ(expected, JsonWriter::AsString(true_value)); JsonBool false_value(false); expected = "false"; OLA_ASSERT_EQ(expected, JsonWriter::AsString(false_value)); } /* * Test a null. */ void JsonTest::testNull() { JsonNull value; string expected = "null"; OLA_ASSERT_EQ(expected, JsonWriter::AsString(value)); } /* * Test a simple array. * Json arrays can be mixed types. */ void JsonTest::testSimpleArray() { JsonArray array; array.Append(); array.Append(true); array.Append(1); array.Append("foo"); array.Append(10); array.Append(-10); string expected = "[null, true, 1, \"foo\", 10, -10]"; OLA_ASSERT_EQ(expected, JsonWriter::AsString(array)); } /* * Test an empty object. */ void JsonTest::testEmptyObject() { JsonObject object; string expected = "{}"; OLA_ASSERT_EQ(expected, JsonWriter::AsString(object)); } /* * Test a simple object. */ void JsonTest::testSimpleObject() { JsonObject object; object.Add("age", 10); object.Add("name", "simon"); object.Add("male", true); string expected = ( "{\n" " \"age\": 10,\n" " \"male\": true,\n" " \"name\": \"simon\"\n" "}"); OLA_ASSERT_EQ(expected, JsonWriter::AsString(object)); } /* * Test a complex object. */ void JsonTest::testComplexObject() { JsonObject object; object.Add("age", 10); object.Add("name", "simon"); object.Add("male", true); JsonArray *array = object.AddArray("lucky numbers"); array->Append(2); array->Append(5); string expected = ( "{\n" " \"age\": 10,\n" " \"lucky numbers\": [2, 5],\n" " \"male\": true,\n" " \"name\": \"simon\"\n" "}"); OLA_ASSERT_EQ(expected, JsonWriter::AsString(object)); } /* * Test for equality. */ void JsonTest::testEquality() { JsonString string1("foo"); JsonString string2("foo"); JsonString string3("bar"); JsonBool bool1(true); JsonBool bool2(false); JsonNull null1; JsonDouble double1(1.0); JsonDouble double2(1.0); JsonDouble double3(2.1); JsonUInt uint1(10); JsonUInt uint2(99); JsonInt int1(10); JsonInt int2(99); JsonInt int3(-99); JsonInt64 int64_1(-99); JsonInt64 int64_2(10); JsonInt64 int64_3(99); JsonUInt64 uint64_1(10); JsonUInt64 uint64_2(99); vector all_values; all_values.push_back(&string1); all_values.push_back(&string2); all_values.push_back(&string3); all_values.push_back(&bool1); all_values.push_back(&bool2); all_values.push_back(&null1); all_values.push_back(&double1); all_values.push_back(&double2); all_values.push_back(&double3); all_values.push_back(&uint1); all_values.push_back(&uint2); all_values.push_back(&int1); all_values.push_back(&int2); all_values.push_back(&int3); all_values.push_back(&int64_1); all_values.push_back(&int64_2); all_values.push_back(&int64_3); all_values.push_back(&uint64_1); all_values.push_back(&uint64_2); OLA_ASSERT_EQ(string1, string2); OLA_ASSERT_NE(string1, string3); OLA_ASSERT_NE(bool1, bool2); OLA_ASSERT_EQ(double1, double2); OLA_ASSERT_NE(double1, double3); OLA_ASSERT_NE(uint1, uint2); OLA_ASSERT_NE(uint1, uint2); // Test the tricky cases: OLA_ASSERT(int1 == uint1); OLA_ASSERT(int2 == uint2); OLA_ASSERT(uint1 == int64_2); OLA_ASSERT(uint2 == int64_3); OLA_ASSERT(int3 == int64_1); OLA_ASSERT(uint1 == uint64_1); OLA_ASSERT(uint2 == uint64_2); OLA_ASSERT(int1 == uint64_1); OLA_ASSERT(int2 == uint64_2); OLA_ASSERT(int64_2 == uint64_1); OLA_ASSERT(int64_3 == uint64_2); // Test Array equality. JsonArray array1; array1.Append(true); array1.Append(1); array1.Append("foo"); JsonArray array2; array2.Append(true); array2.Append(1); array2.Append("foo"); array2.Append(-1); JsonArray array3; array3.Append(true); array3.Append(1); array3.Append("bar"); all_values.push_back(&array1); all_values.push_back(&array2); all_values.push_back(&array3); OLA_ASSERT_FALSE(array1 == array2); OLA_ASSERT_FALSE(array1 == array3); // Object equality JsonObject object1; object1.Add("age", 10); object1.Add("name", "simon"); object1.Add("male", true); JsonObject object2; object1.Add("age", 10); object1.Add("name", "simon"); object1.Add("male", true); object1.Add("nationality", "Australia"); JsonObject object3; object3.Add("age", 10); object3.Add("name", "james"); object3.Add("male", true); all_values.push_back(&object1); all_values.push_back(&object2); all_values.push_back(&object3); OLA_ASSERT_FALSE(object1 == object2); OLA_ASSERT_FALSE(object1 == object3); // verify identity equality for (unsigned int i = 0; i < all_values.size(); ++i) { OLA_ASSERT(*(all_values[i]) == *(all_values[i])); } } /* * Test for integer / number inequality. */ void JsonTest::testIntInequality() { JsonDouble double1(1.0); JsonDouble double2(1.0); JsonDouble double3(11.1); JsonUInt uint1(10); JsonUInt uint2(99); JsonInt int1(10); JsonInt int2(99); JsonInt int3(-99); JsonInt64 int64_1(-99); JsonInt64 int64_2(10); JsonInt64 int64_3(99); JsonUInt64 uint64_1(10); JsonUInt64 uint64_2(99); OLA_ASSERT_LT(double1, double3); OLA_ASSERT_LTE(double1, double2); OLA_ASSERT_LTE(double1, double3); OLA_ASSERT_GT(double3, double1); OLA_ASSERT_GTE(double3, double1); OLA_ASSERT_GTE(double2, double1); OLA_ASSERT_LT(double1, uint1); OLA_ASSERT_LT(double1, int1); OLA_ASSERT_LT(double1, int64_2); OLA_ASSERT_LT(double1, uint64_1); OLA_ASSERT_LT(uint1, double3); OLA_ASSERT_LT(int1, double3); OLA_ASSERT_LT(int64_1, double3); OLA_ASSERT_LT(int64_2, double3); OLA_ASSERT_LT(uint64_1, double3); OLA_ASSERT_LT(uint1, uint2); OLA_ASSERT_LTE(uint1, uint1); OLA_ASSERT_LT(int1, int2); OLA_ASSERT_LTE(int1, int1); OLA_ASSERT_LT(int3, int1); OLA_ASSERT_LT(uint64_1, uint64_2); OLA_ASSERT_LTE(uint64_1, uint64_1); OLA_ASSERT_LT(int64_1, int64_2); OLA_ASSERT_LTE(int64_1, int64_1); OLA_ASSERT_LT(int64_2, int64_3); OLA_ASSERT_LT(uint64_1, uint2); OLA_ASSERT_LTE(uint64_1, uint1); OLA_ASSERT_LT(int64_1, int1); OLA_ASSERT_LTE(int64_1, int3); OLA_ASSERT_LT(uint1, uint64_2); OLA_ASSERT_LTE(uint1, uint64_1); OLA_ASSERT_LT(int3, int64_2); OLA_ASSERT_LTE(int3, int64_1); OLA_ASSERT_LT(int3, uint1); OLA_ASSERT_LTE(int1, uint1); OLA_ASSERT_LT(int64_1, uint1); OLA_ASSERT_LTE(int64_2, uint1); OLA_ASSERT_LT(uint1, int2); OLA_ASSERT_LTE(uint1, int1); OLA_ASSERT_LT(uint64_1, int2); OLA_ASSERT_LTE(uint64_1, int1); OLA_ASSERT_LT(int3, uint64_1); OLA_ASSERT_LTE(int1, uint64_1); OLA_ASSERT_LT(int64_1, uint64_1); OLA_ASSERT_LTE(int64_2, uint64_1); OLA_ASSERT_LT(uint1, int64_3); OLA_ASSERT_LTE(uint1, int64_2); OLA_ASSERT_LT(uint64_1, int64_3); OLA_ASSERT_LTE(uint64_1, int64_2); } /* * Test for mulitpleOf */ void JsonTest::testMultipleOf() { JsonDouble double1(10.0); JsonDouble double2(5); JsonDouble double3(11.0); JsonUInt uint1(10); JsonUInt uint2(5); JsonUInt uint3(11); JsonInt int1(10); JsonInt int2(5); JsonInt int3(11); JsonInt64 int64_1(10); JsonInt64 int64_2(5); JsonInt64 int64_3(11); JsonUInt64 uint64_1(10); JsonUInt64 uint64_2(5); JsonUInt64 uint64_3(11); OLA_ASSERT(double1.MultipleOf(double2)); OLA_ASSERT(double1.MultipleOf(uint2)); OLA_ASSERT(double1.MultipleOf(int2)); OLA_ASSERT(double1.MultipleOf(uint64_2)); OLA_ASSERT(double1.MultipleOf(int64_2)); OLA_ASSERT(uint1.MultipleOf(double2)); OLA_ASSERT(uint1.MultipleOf(uint2)); OLA_ASSERT(uint1.MultipleOf(int2)); OLA_ASSERT(uint1.MultipleOf(uint64_2)); OLA_ASSERT(uint1.MultipleOf(int64_2)); OLA_ASSERT(int1.MultipleOf(double2)); OLA_ASSERT(int1.MultipleOf(uint2)); OLA_ASSERT(int1.MultipleOf(int2)); OLA_ASSERT(int1.MultipleOf(uint64_2)); OLA_ASSERT(int1.MultipleOf(int64_2)); OLA_ASSERT(int64_1.MultipleOf(double2)); OLA_ASSERT(int64_1.MultipleOf(uint2)); OLA_ASSERT(int64_1.MultipleOf(int2)); OLA_ASSERT(int64_1.MultipleOf(uint64_2)); OLA_ASSERT(int64_1.MultipleOf(int64_2)); OLA_ASSERT(uint64_1.MultipleOf(double2)); OLA_ASSERT(uint64_1.MultipleOf(uint2)); OLA_ASSERT(uint64_1.MultipleOf(int2)); OLA_ASSERT(uint64_1.MultipleOf(uint64_2)); OLA_ASSERT(uint64_1.MultipleOf(int64_2)); OLA_ASSERT_FALSE(double3.MultipleOf(double2)); OLA_ASSERT_FALSE(double3.MultipleOf(uint2)); OLA_ASSERT_FALSE(double3.MultipleOf(int2)); OLA_ASSERT_FALSE(double3.MultipleOf(uint64_2)); OLA_ASSERT_FALSE(double3.MultipleOf(int64_2)); OLA_ASSERT_FALSE(uint3.MultipleOf(double2)); OLA_ASSERT_FALSE(uint3.MultipleOf(uint2)); OLA_ASSERT_FALSE(uint3.MultipleOf(int2)); OLA_ASSERT_FALSE(uint3.MultipleOf(uint64_2)); OLA_ASSERT_FALSE(uint3.MultipleOf(int64_2)); OLA_ASSERT_FALSE(int3.MultipleOf(double2)); OLA_ASSERT_FALSE(int3.MultipleOf(uint2)); OLA_ASSERT_FALSE(int3.MultipleOf(int2)); OLA_ASSERT_FALSE(int3.MultipleOf(uint64_2)); OLA_ASSERT_FALSE(int3.MultipleOf(int64_2)); OLA_ASSERT_FALSE(int64_3.MultipleOf(double2)); OLA_ASSERT_FALSE(int64_3.MultipleOf(uint2)); OLA_ASSERT_FALSE(int64_3.MultipleOf(int2)); OLA_ASSERT_FALSE(int64_3.MultipleOf(uint64_2)); OLA_ASSERT_FALSE(int64_3.MultipleOf(int64_2)); OLA_ASSERT_FALSE(uint64_3.MultipleOf(double2)); OLA_ASSERT_FALSE(uint64_3.MultipleOf(uint2)); OLA_ASSERT_FALSE(uint64_3.MultipleOf(int2)); OLA_ASSERT_FALSE(uint64_3.MultipleOf(uint64_2)); OLA_ASSERT_FALSE(uint64_3.MultipleOf(int64_2)); } /* * Test looking up a value with a pointer. */ void JsonTest::testLookups() { JsonPointer empty_pointer; JsonPointer invalid_pointer("/invalid/path"); JsonPointer name_pointer("/name"); JsonString string1("foo"); OLA_ASSERT_EQ(reinterpret_cast(&string1), string1.LookupElement(empty_pointer)); #ifdef __FreeBSD__ OLA_ASSERT_EQ(reinterpret_cast(0), #else OLA_ASSERT_EQ(reinterpret_cast(NULL), #endif // __FreeBSD__ string1.LookupElement(invalid_pointer)); // Now try an object JsonString *name_value = new JsonString("simon"); JsonObject object; object.Add("age", 10); object.AddValue("name", name_value); object.Add("male", true); object.Add("", "foo"); OLA_ASSERT_EQ(reinterpret_cast(&object), object.LookupElement(empty_pointer)); OLA_ASSERT_EQ(reinterpret_cast(name_value), object.LookupElement(name_pointer)); #ifdef __FreeBSD__ OLA_ASSERT_EQ(reinterpret_cast(0), #else OLA_ASSERT_EQ(reinterpret_cast(NULL), #endif // __FreeBSD__ object.LookupElement(invalid_pointer)); // Now try an array JsonArray *array = new JsonArray(); JsonString *string2 = new JsonString("cat"); JsonString *string3 = new JsonString("dog"); JsonString *string4 = new JsonString("mouse"); array->AppendValue(string2); array->AppendValue(string3); array->AppendValue(string4); JsonPointer first("/0"); JsonPointer middle("/1"); JsonPointer last("/2"); JsonPointer one_past_last("/-"); JsonPointer invalid("/a"); OLA_ASSERT_EQ(reinterpret_cast(array), array->LookupElement(empty_pointer)); #ifdef __FreeBSD__ OLA_ASSERT_EQ(reinterpret_cast(0), #else OLA_ASSERT_EQ(reinterpret_cast(NULL), #endif // __FreeBSD__ array->LookupElement(invalid_pointer)); OLA_ASSERT_EQ(reinterpret_cast(string2), array->LookupElement(first)); OLA_ASSERT_EQ(reinterpret_cast(string3), array->LookupElement(middle)); OLA_ASSERT_EQ(reinterpret_cast(string4), array->LookupElement(last)); #ifdef __FreeBSD__ OLA_ASSERT_EQ(reinterpret_cast(0), #else OLA_ASSERT_EQ(reinterpret_cast(NULL), #endif // __FreeBSD__ array->LookupElement(one_past_last)); #ifdef __FreeBSD__ OLA_ASSERT_EQ(reinterpret_cast(0), #else OLA_ASSERT_EQ(reinterpret_cast(NULL), #endif // __FreeBSD__ array->LookupElement(invalid)); // now a nested case object.AddValue("pets", array); JsonPointer first_pet("/pets/0"); OLA_ASSERT_EQ(reinterpret_cast(string2), object.LookupElement(first_pet)); } /* * Test that clone() works. */ void JsonTest::testClone() { JsonString string1("foo"); JsonBool bool1(true); JsonNull null1; JsonDouble double1(1.0); JsonUInt uint1(10); JsonInt int1(10); JsonInt64 int64_1(-99); JsonUInt64 uint64_1(10); JsonObject object; object.Add("age", 10); object.Add("name", "simon"); object.Add("male", true); object.Add("", "foo"); JsonArray array; array.Append(true); array.Append(1); array.Append("bar"); vector all_values; all_values.push_back(&string1); all_values.push_back(&bool1); all_values.push_back(&null1); all_values.push_back(&double1); all_values.push_back(&uint1); all_values.push_back(&int1); all_values.push_back(&int64_1); all_values.push_back(&uint64_1); all_values.push_back(&object); all_values.push_back(&array); for (unsigned int i = 0; i < all_values.size(); ++i) { std::auto_ptr value(all_values[i]->Clone()); OLA_ASSERT(*(value.get()) == *(all_values[i])); } } ola-0.10.9/common/web/PointerTrackerTest.cpp0000664000175000017500000001741114376533110015653 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PointerTrackerTest.cpp * Unittest for the PointerTracker. * Copyright (C) 2014 Simon Newton */ #include #include #include #include #include "ola/testing/TestUtils.h" #include "ola/web/JsonPointer.h" #include "common/web/PointerTracker.h" using ola::web::JsonPointer; using ola::web::PointerTracker; using std::string; class PointerTrackerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(PointerTrackerTest); CPPUNIT_TEST(testPointer); CPPUNIT_TEST(testErrorConditions); CPPUNIT_TEST(testEscaping); CPPUNIT_TEST_SUITE_END(); public: void testPointer(); void testErrorConditions(); void testEscaping(); }; CPPUNIT_TEST_SUITE_REGISTRATION(PointerTrackerTest); void PointerTrackerTest::testPointer() { JsonPointer pointer; PointerTracker tracker(&pointer); // Basic tests first // {} OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.OpenObject(); OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.CloseObject(); // [] tracker.OpenArray(); OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.CloseArray(); OLA_ASSERT_EQ(string(""), pointer.ToString()); // [ {}, {} ] tracker.OpenArray(); OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.OpenObject(); OLA_ASSERT_EQ(string("/0"), pointer.ToString()); tracker.CloseObject(); OLA_ASSERT_EQ(string("/0"), pointer.ToString()); tracker.OpenObject(); OLA_ASSERT_EQ(string("/1"), pointer.ToString()); tracker.CloseObject(); OLA_ASSERT_EQ(string("/1"), pointer.ToString()); tracker.CloseArray(); OLA_ASSERT_EQ(string(""), pointer.ToString()); // {"foo": {}} OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.OpenObject(); OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.SetProperty("foo"); OLA_ASSERT_EQ(string("/foo"), pointer.ToString()); tracker.OpenObject(); OLA_ASSERT_EQ(string("/foo"), pointer.ToString()); tracker.CloseObject(); OLA_ASSERT_EQ(string("/foo"), pointer.ToString()); tracker.CloseObject(); // {"foo": {"bar": {} } } OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.OpenObject(); OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.SetProperty("foo"); OLA_ASSERT_EQ(string("/foo"), pointer.ToString()); tracker.OpenObject(); OLA_ASSERT_EQ(string("/foo"), pointer.ToString()); tracker.SetProperty("bar"); OLA_ASSERT_EQ(string("/foo/bar"), pointer.ToString()); tracker.OpenObject(); OLA_ASSERT_EQ(string("/foo/bar"), pointer.ToString()); tracker.CloseObject(); OLA_ASSERT_EQ(string("/foo/bar"), pointer.ToString()); tracker.CloseObject(); OLA_ASSERT_EQ(string("/foo"), pointer.ToString()); tracker.CloseObject(); OLA_ASSERT_EQ(string(""), pointer.ToString()); /* * The call sequence is based on the following JSON data: * * { * "foo": [ 0, 1, { "bar": null}, true], * "baz": { "bat" : null }, * "cat": [[0, 1], [], false], * } */ OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.OpenObject(); OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.SetProperty("foo"); OLA_ASSERT_EQ(string("/foo"), pointer.ToString()); tracker.OpenArray(); OLA_ASSERT_EQ(string("/foo"), pointer.ToString()); tracker.IncrementIndex(); OLA_ASSERT_EQ(string("/foo/0"), pointer.ToString()); tracker.IncrementIndex(); OLA_ASSERT_EQ(string("/foo/1"), pointer.ToString()); tracker.OpenObject(); OLA_ASSERT_EQ(string("/foo/2"), pointer.ToString()); tracker.SetProperty("bar"); OLA_ASSERT_EQ(string("/foo/2/bar"), pointer.ToString()); // No effect, but makes the implementation in the JsonHandler simpler. tracker.IncrementIndex(); OLA_ASSERT_EQ(string("/foo/2/bar"), pointer.ToString()); tracker.CloseObject(); OLA_ASSERT_EQ(string("/foo/2"), pointer.ToString()); tracker.IncrementIndex(); OLA_ASSERT_EQ(string("/foo/3"), pointer.ToString()); tracker.CloseArray(); OLA_ASSERT_EQ(string("/foo"), pointer.ToString()); tracker.SetProperty("baz"); OLA_ASSERT_EQ(string("/baz"), pointer.ToString()); tracker.OpenObject(); OLA_ASSERT_EQ(string("/baz"), pointer.ToString()); tracker.SetProperty("bat"); OLA_ASSERT_EQ(string("/baz/bat"), pointer.ToString()); // No effect, but makes the implementation in the JsonHandler simpler. tracker.IncrementIndex(); OLA_ASSERT_EQ(string("/baz/bat"), pointer.ToString()); tracker.CloseObject(); OLA_ASSERT_EQ(string("/baz"), pointer.ToString()); tracker.SetProperty("cat"); OLA_ASSERT_EQ(string("/cat"), pointer.ToString()); tracker.OpenArray(); OLA_ASSERT_EQ(string("/cat"), pointer.ToString()); tracker.OpenArray(); OLA_ASSERT_EQ(string("/cat/0"), pointer.ToString()); tracker.IncrementIndex(); OLA_ASSERT_EQ(string("/cat/0/0"), pointer.ToString()); tracker.IncrementIndex(); OLA_ASSERT_EQ(string("/cat/0/1"), pointer.ToString()); tracker.CloseArray(); OLA_ASSERT_EQ(string("/cat/0"), pointer.ToString()); tracker.OpenArray(); OLA_ASSERT_EQ(string("/cat/1"), pointer.ToString()); tracker.CloseArray(); OLA_ASSERT_EQ(string("/cat/1"), pointer.ToString()); tracker.IncrementIndex(); OLA_ASSERT_EQ(string("/cat/2"), pointer.ToString()); tracker.CloseArray(); OLA_ASSERT_EQ(string("/cat"), pointer.ToString()); tracker.CloseObject(); OLA_ASSERT_EQ(string(""), pointer.ToString()); } void PointerTrackerTest::testErrorConditions() { JsonPointer pointer; PointerTracker tracker(&pointer); // Close without Opens OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.CloseObject(); OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.CloseArray(); OLA_ASSERT_EQ(string(""), pointer.ToString()); // Mismatched open / close types. tracker.OpenObject(); OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.SetProperty("foo"); OLA_ASSERT_EQ(string("/foo"), pointer.ToString()); tracker.CloseArray(); OLA_ASSERT_EQ(string("/foo"), pointer.ToString()); tracker.CloseObject(); OLA_ASSERT_EQ(string(""), pointer.ToString()); // SetProperty while in an array tracker.OpenArray(); OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.SetProperty("foo"); OLA_ASSERT_EQ(string(""), pointer.ToString()); tracker.IncrementIndex(); OLA_ASSERT_EQ(string("/0"), pointer.ToString()); } void PointerTrackerTest::testEscaping() { JsonPointer pointer; PointerTracker tracker(&pointer); tracker.OpenObject(); // Examples from RFC 6901 tracker.SetProperty(""); OLA_ASSERT_EQ(string("/"), pointer.ToString()); tracker.SetProperty("a/b"); OLA_ASSERT_EQ(string("/a~1b"), pointer.ToString()); tracker.SetProperty("c%d"); OLA_ASSERT_EQ(string("/c%d"), pointer.ToString()); tracker.SetProperty("e^f"); OLA_ASSERT_EQ(string("/e^f"), pointer.ToString()); tracker.SetProperty("g|h"); OLA_ASSERT_EQ(string("/g|h"), pointer.ToString()); tracker.SetProperty("i\\\\j"); OLA_ASSERT_EQ(string("/i\\\\j"), pointer.ToString()); tracker.SetProperty("k\"l"); OLA_ASSERT_EQ(string("/k\"l"), pointer.ToString()); tracker.SetProperty(" "); OLA_ASSERT_EQ(string("/ "), pointer.ToString()); tracker.SetProperty("m~n"); OLA_ASSERT_EQ(string("/m~0n"), pointer.ToString()); } ola-0.10.9/common/web/SectionsTest.cpp0000664000175000017500000001445214376533110014510 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SectionsTest.cpp * Unittest for JsonSections classes. * Copyright (C) 2010 Simon Newton */ #include #include #include "ola/web/Json.h" #include "ola/web/JsonWriter.h" #include "ola/web/JsonSections.h" #include "ola/testing/TestUtils.h" using std::string; using std::vector; using ola::web::BoolItem; using ola::web::GenericItem; using ola::web::HiddenItem; using ola::web::JsonObject; using ola::web::JsonSection; using ola::web::JsonWriter; using ola::web::SelectItem; using ola::web::StringItem; using ola::web::UIntItem; class JsonSectionsTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(JsonSectionsTest); CPPUNIT_TEST(testStringItem); CPPUNIT_TEST(testUIntItem); CPPUNIT_TEST(testSelectItem); CPPUNIT_TEST(testBoolItem); CPPUNIT_TEST(testHiddenItem); CPPUNIT_TEST(testSection); CPPUNIT_TEST_SUITE_END(); public: void testStringItem(); void testUIntItem(); void testSelectItem(); void testBoolItem(); void testHiddenItem(); void testSection(); private: string ConvertToString(const GenericItem &item); }; CPPUNIT_TEST_SUITE_REGISTRATION(JsonSectionsTest); string JsonSectionsTest::ConvertToString(const GenericItem &item) { JsonObject object; item.PopulateItem(&object); return JsonWriter::AsString(object); } /* * Test the string item */ void JsonSectionsTest::testStringItem() { StringItem item("Foo", "bar"); string expected = "{\n" " \"description\": \"Foo\",\n" " \"type\": \"string\",\n" " \"value\": \"bar\"\n" "}"; OLA_ASSERT_EQ(expected, ConvertToString(item)); StringItem item2("Foo", "bar", "baz"); item2.SetButtonText("Action"); string expected2 = "{\n" " \"button\": \"Action\",\n" " \"description\": \"Foo\",\n" " \"id\": \"baz\",\n" " \"type\": \"string\",\n" " \"value\": \"bar\"\n" "}"; OLA_ASSERT_EQ(expected2, ConvertToString(item2)); StringItem item3("Foo\" bar", "baz\\"); item3.SetButtonText("Action\n"); string expected3 = "{\n" " \"button\": \"Action\\\\x0a\",\n" " \"description\": \"Foo\\\" bar\",\n" " \"type\": \"string\",\n" " \"value\": \"baz\\\\\"\n" "}"; OLA_ASSERT_EQ(expected3, ConvertToString(item3)); } /* * Test the uint item */ void JsonSectionsTest::testUIntItem() { UIntItem item("Foo", 10); string expected = "{\n" " \"description\": \"Foo\",\n" " \"type\": \"uint\",\n" " \"value\": 10\n" "}"; OLA_ASSERT_EQ(expected, ConvertToString(item)); UIntItem item2("Foo", 20, "baz"); item2.SetButtonText("Action"); item2.SetMin(10); string expected2 = "{\n" " \"button\": \"Action\",\n" " \"description\": \"Foo\",\n" " \"id\": \"baz\",\n" " \"min\": 10,\n" " \"type\": \"uint\",\n" " \"value\": 20\n" "}"; OLA_ASSERT_EQ(expected2, ConvertToString(item2)); UIntItem item3("Foo", 20); item3.SetMax(30); string expected3 = "{\n" " \"description\": \"Foo\",\n" " \"max\": 30,\n" " \"type\": \"uint\",\n" " \"value\": 20\n" "}"; OLA_ASSERT_EQ(expected3, ConvertToString(item3)); UIntItem item4("Foo", 20); item4.SetMin(10); item4.SetMax(30); string expected4 = "{\n" " \"description\": \"Foo\",\n" " \"max\": 30,\n" " \"min\": 10,\n" " \"type\": \"uint\",\n" " \"value\": 20\n" "}"; OLA_ASSERT_EQ(expected4, ConvertToString(item4)); } /* * Test the select item */ void JsonSectionsTest::testSelectItem() { SelectItem item("Language", "lang"); item.AddItem("English", "EN"); item.AddItem("German", 2); item.SetSelectedOffset(1); string expected = "{\n" " \"description\": \"Language\",\n" " \"id\": \"lang\",\n" " \"selected_offset\": 1,\n" " \"type\": \"select\",\n" " \"value\": [\n" " {\n" " \"label\": \"English\",\n" " \"value\": \"EN\"\n" " },\n" " {\n" " \"label\": \"German\",\n" " \"value\": \"2\"\n" " }\n" " ]\n" "}"; OLA_ASSERT_EQ(expected, ConvertToString(item)); } /* * Test the bool item */ void JsonSectionsTest::testBoolItem() { BoolItem item("Foo", true, "baz"); string expected = "{\n" " \"description\": \"Foo\",\n" " \"id\": \"baz\",\n" " \"type\": \"bool\",\n" " \"value\": true\n" "}"; OLA_ASSERT_EQ(expected, ConvertToString(item)); BoolItem item2("Foo", false, "baz"); string expected2 = "{\n" " \"description\": \"Foo\",\n" " \"id\": \"baz\",\n" " \"type\": \"bool\",\n" " \"value\": false\n" "}"; OLA_ASSERT_EQ(expected2, ConvertToString(item2)); } /* * Test the hidden item */ void JsonSectionsTest::testHiddenItem() { HiddenItem item("bar", "baz"); item.SetButtonText("Action"); string expected = "{\n" " \"button\": \"Action\",\n" " \"description\": \"\",\n" " \"id\": \"baz\",\n" " \"type\": \"hidden\",\n" " \"value\": \"bar\"\n" "}"; OLA_ASSERT_EQ(expected, ConvertToString(item)); } /* * Test the entire section */ void JsonSectionsTest::testSection() { JsonSection section(false); HiddenItem *item = new HiddenItem("bar\r", "baz"); section.AddItem(item); section.SetSaveButton("Action\\"); string expected = "{\n" " \"error\": \"\",\n" " \"items\": [\n" " {\n" " \"description\": \"\",\n" " \"id\": \"baz\",\n" " \"type\": \"hidden\",\n" " \"value\": \"bar\\\\x0d\"\n" " }\n" " ],\n" " \"refresh\": false,\n" " \"save_button\": \"Action\\\\\"\n" "}"; OLA_ASSERT_EQ(expected, section.AsString()); } ola-0.10.9/common/web/JsonWriter.cpp0000664000175000017500000000653414376533110014171 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * JsonWriter.cpp * Serialize JSON data. * Copyright (C) 2012 Simon Newton */ #include #include "ola/StringUtils.h" #include "ola/stl/STLUtils.h" #include "ola/web/JsonWriter.h" namespace ola { namespace web { using std::ostream; using std::ostringstream; using std::string; void JsonWriter::Write(ostream *output, const JsonValue &obj) { JsonWriter writer(output); obj.Accept(&writer); } string JsonWriter::AsString(const JsonValue &obj) { ostringstream str; JsonWriter writer(&str); obj.Accept(&writer); return str.str(); } void JsonWriter::Visit(const JsonString &value) { *m_output << '"' << EscapeString(EncodeString(value.Value())) << '"'; } void JsonWriter::Visit(const JsonBool &value) { *m_output << (value.Value() ? "true" : "false"); } void JsonWriter::Visit(const JsonNull &) { *m_output << "null"; } void JsonWriter::Visit(const JsonRawValue &value) { *m_output << value.Value(); } void JsonWriter::Visit(const JsonObject &value) { if (value.IsEmpty()) { *m_output << "{}"; return; } string old_separator = m_separator; m_separator = ""; m_indent += DEFAULT_INDENT; *m_output << "{\n"; value.VisitProperties(this); m_indent -= DEFAULT_INDENT; *m_output << "\n" << string(m_indent, ' '); *m_output << "}"; m_separator = old_separator; } void JsonWriter::Visit(const JsonArray &value) { *m_output << "["; string default_separator = ", "; if (value.IsComplexType()) { m_indent += DEFAULT_INDENT; *m_output << "\n" << string(m_indent, ' '); default_separator = ",\n"; default_separator.append(m_indent, ' '); } string separator; for (unsigned int i = 0; i < value.Size(); i++) { *m_output << separator; value.ElementAt(i)->Accept(this); separator = default_separator; } if (value.IsComplexType()) { *m_output << "\n"; m_indent -= DEFAULT_INDENT; *m_output << string(m_indent, ' '); } *m_output << "]"; } void JsonWriter::Visit(const JsonUInt &value) { *m_output << value.Value(); } void JsonWriter::Visit(const JsonUInt64 &value) { *m_output << value.Value(); } void JsonWriter::Visit(const JsonInt &value) { *m_output << value.Value(); } void JsonWriter::Visit(const JsonInt64 &value) { *m_output << value.Value(); } void JsonWriter::Visit(const JsonDouble &value) { *m_output << value.ToString(); } void JsonWriter::VisitProperty(const string &property, const JsonValue &value) { *m_output << m_separator << string(m_indent, ' ') << "\"" << EscapeString(property) << "\": "; value.Accept(this); m_separator = ",\n"; } } // namespace web } // namespace ola ola-0.10.9/common/web/JsonPointer.cpp0000664000175000017500000000710414376533110014327 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * JsonPointer.cpp * An implementation of RFC 6901. * Copyright (C) 2014 Simon Newton */ #include #include "ola/web/JsonPointer.h" #include "ola/StringUtils.h" namespace ola { namespace web { using std::string; using std::vector; JsonPointer::JsonPointer() : m_is_valid(true) { } JsonPointer::JsonPointer(const JsonPointer &other) : m_is_valid(other.m_is_valid), m_tokens(other.m_tokens) { } JsonPointer::JsonPointer(const string &path) : m_is_valid(true) { if (path.empty()) { return; } if (path[0] != '/') { m_is_valid = false; return; } Tokens escaped_tokens; StringSplit(path.substr(1), &escaped_tokens, "/"); Tokens::const_iterator iter = escaped_tokens.begin(); for (; iter != escaped_tokens.end(); ++iter) { m_tokens.push_back(UnEscapeString(*iter)); } } bool JsonPointer::operator==(const JsonPointer &other) const { return m_tokens == other.m_tokens; } void JsonPointer::Push(const string &token) { m_tokens.push_back(token); } void JsonPointer::Pop() { if (!m_tokens.empty()) { m_tokens.pop_back(); } } string JsonPointer::ToString() const { string path; if (!m_tokens.empty()) { Tokens::const_iterator iter = m_tokens.begin(); path.push_back('/'); while (iter != m_tokens.end()) { path.append(EscapeString(*iter++)); if (iter != m_tokens.end()) { path.push_back('/'); } } } return path; } bool JsonPointer::IsPrefixOf(const JsonPointer &other) const { if (!(IsValid() && other.IsValid())) { return false; } Tokens::const_iterator our_iter = m_tokens.begin(); Tokens::const_iterator other_iter = other.m_tokens.begin(); for (; our_iter != m_tokens.end() && other_iter != other.m_tokens.end(); our_iter++, other_iter++) { if (*our_iter != *other_iter) { return false; } } return other_iter != other.m_tokens.end(); } string JsonPointer::EscapeString(const string &input) { string escaped_property; escaped_property.reserve(input.size()); for (string::const_iterator iter = input.begin(); iter != input.end(); ++iter) { switch (*iter) { case '~': escaped_property.push_back(*iter); escaped_property.push_back('0'); break; case '/': escaped_property.push_back('~'); escaped_property.push_back('1'); break; default: escaped_property.push_back(*iter); } } return escaped_property; } string JsonPointer::UnEscapeString(const string &input) { string token = input; size_t pos = 0; // Section 4 of the RFC explains why we do it in this order. while ((pos = token.find("~1")) != string::npos) { token[pos] = '/'; token.erase(pos + 1, 1); } while ((pos = token.find("~0")) != string::npos) { token[pos] = '~'; token.erase(pos + 1, 1); } return token; } } // namespace web } // namespace ola ola-0.10.9/common/web/JsonData.cpp0000664000175000017500000000314514376533110013561 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * JsonData.cpp * Copyright (C) 2014 Simon Newton */ #include "ola/web/JsonData.h" #include #include "ola/web/Json.h" #include "ola/web/JsonPatch.h" namespace ola { namespace web { using std::string; bool JsonData::SetValue(JsonValue *value) { if (IsValid(value)) { m_value.reset(value); return true; } else { delete value; return false; } } bool JsonData::Apply(const JsonPatchSet &patch) { JsonValue *new_value = NULL; if (m_value.get()) { new_value = m_value->Clone(); } // now apply the patch bool ok = patch.Apply(&new_value) && IsValid(new_value); if (ok) { m_value.reset(new_value); } else { delete new_value; } return ok; } bool JsonData::IsValid(const JsonValue *value) { if (!m_schema) { return true; } value->Accept(m_schema); return m_schema->IsValid(); } } // namespace web } // namespace ola ola-0.10.9/common/web/Makefile.mk0000664000175000017500000000717214376533110013424 00000000000000dist_noinst_DATA += \ common/web/testdata/allof.test \ common/web/testdata/anyof.test \ common/web/testdata/arrays.test \ common/web/testdata/basic-keywords.test \ common/web/testdata/definitions.test \ common/web/testdata/integers.test \ common/web/testdata/misc.test \ common/web/testdata/not.test \ common/web/testdata/objects.test \ common/web/testdata/oneof.test \ common/web/testdata/schema.json \ common/web/testdata/strings.test \ common/web/testdata/type.test # LIBRARIES ################################################ noinst_LTLIBRARIES += common/web/libolaweb.la common_web_libolaweb_la_SOURCES = \ common/web/Json.cpp \ common/web/JsonData.cpp \ common/web/JsonLexer.cpp \ common/web/JsonParser.cpp \ common/web/JsonPatch.cpp \ common/web/JsonPatchParser.cpp \ common/web/JsonPointer.cpp \ common/web/JsonSchema.cpp \ common/web/JsonSections.cpp \ common/web/JsonTypes.cpp \ common/web/JsonWriter.cpp \ common/web/PointerTracker.cpp \ common/web/PointerTracker.h \ common/web/SchemaErrorLogger.cpp \ common/web/SchemaErrorLogger.h \ common/web/SchemaKeywords.cpp \ common/web/SchemaKeywords.h \ common/web/SchemaParseContext.cpp \ common/web/SchemaParseContext.h \ common/web/SchemaParser.cpp \ common/web/SchemaParser.h if USING_WIN32 #Work around limitations with Windows library linking common_web_libolaweb_la_LIBADD = common/libolacommon.la endif # TESTS ################################################ # Patch test names are abbreviated to prevent Windows' UAC from blocking them. test_programs += \ common/web/JsonTester \ common/web/ParserTester \ common/web/PtchParserTester \ common/web/PtchTester \ common/web/PointerTester \ common/web/PointerTrackerTester \ common/web/SchemaParserTester \ common/web/SchemaTester \ common/web/SectionsTester COMMON_WEB_TEST_LDADD = $(COMMON_TESTING_LIBS) \ common/web/libolaweb.la common_web_JsonTester_SOURCES = common/web/JsonTest.cpp common_web_JsonTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_JsonTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_ParserTester_SOURCES = common/web/ParserTest.cpp common_web_ParserTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_ParserTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_PtchParserTester_SOURCES = common/web/PatchParserTest.cpp common_web_PtchParserTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_PtchParserTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_PtchTester_SOURCES = common/web/PatchTest.cpp common_web_PtchTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_PtchTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_PointerTester_SOURCES = common/web/PointerTest.cpp common_web_PointerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_PointerTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_PointerTrackerTester_SOURCES = common/web/PointerTrackerTest.cpp common_web_PointerTrackerTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_PointerTrackerTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_SchemaParserTester_SOURCES = common/web/SchemaParserTest.cpp common_web_SchemaParserTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_SchemaParserTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_SchemaTester_SOURCES = common/web/SchemaTest.cpp common_web_SchemaTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_SchemaTester_LDADD = $(COMMON_WEB_TEST_LDADD) common_web_SectionsTester_SOURCES = common/web/SectionsTest.cpp common_web_SectionsTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) common_web_SectionsTester_LDADD = $(COMMON_WEB_TEST_LDADD) ola-0.10.9/common/web/JsonTypes.cpp0000664000175000017500000000360714376533110014017 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * JsonTypes.cpp * Utils for dealing with JsonTypes. * Copyright (C) 2014 Simon Newton */ #include #include "ola/web/JsonTypes.h" namespace ola { namespace web { using std::string; string JsonTypeToString(JsonType type) { switch (type) { case JSON_ARRAY: return "array"; case JSON_BOOLEAN: return "boolean"; case JSON_INTEGER: return "integer"; case JSON_NULL: return "null"; case JSON_NUMBER: return "number"; case JSON_OBJECT: return "object"; case JSON_STRING: return "string"; case JSON_UNDEFINED: return ""; default: return "Unknown type"; } } JsonType StringToJsonType(const string &type) { if (type == "array") { return JSON_ARRAY; } else if (type == "boolean") { return JSON_BOOLEAN; } else if (type == "integer") { return JSON_INTEGER; } else if (type == "null") { return JSON_NULL; } else if (type == "number") { return JSON_NUMBER; } else if (type == "object") { return JSON_OBJECT; } else if (type == "string") { return JSON_STRING; } else { return JSON_UNDEFINED; } } } // namespace web } // namespace ola ola-0.10.9/common/web/JsonLexer.cpp0000664000175000017500000002546614376533110014001 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * JsonLexer.cpp * A Json Lexer. * See http://www.json.org/ * Copyright (C) 2014 Simon Newton */ #define __STDC_LIMIT_MACROS // for UINT8_MAX & friends #include "ola/web/JsonLexer.h" #include #include #include #include #include #include "ola/Logging.h" #include "ola/web/Json.h" #include "ola/base/Macro.h" namespace ola { namespace web { using std::auto_ptr; using std::string; static bool ParseTrimmedInput(const char **input, JsonParserInterface *parser); /** * @brief Trim leading whitespace from a string. * @param input A pointer to a pointer with the data. This is updated to point * to the first non-whitespace character. * @returns true if more data remains, false if the string is now empty. * @note This is static within JsonLexer.cpp because we should be using * strings rather than char[]s. The only reason this doesn't use a string is * because I think we'll need a wchar on Windows. */ static bool TrimWhitespace(const char **input) { while (**input != 0 && (**input == ' ' || **input == '\t' || **input == '\r' || **input == '\n')) { (*input)++; } return **input != 0; } /** * @brief Extract a string token from the input. * @param input A pointer to a pointer with the data. This should point to the * first character after the quote (") character. * @param str A string object to store the extracted string. * @param parser the JsonParserInterface to pass tokens to. * @returns true if the string was extracted correctly, false otherwise. */ static bool ParseString(const char **input, string* str, JsonParserInterface *parser) { while (true) { size_t size = strcspn(*input, "\"\\"); char c = (*input)[size]; if (c == 0) { parser->SetError("Unterminated string"); str->clear(); return false; } str->append(*input, size); *input += size + 1; if (c == '"') { return true; } if (c == '\\') { // escape character char append_char = 0; switch (**input) { case '"': case '\\': case '/': append_char = **input; break; case 'b': append_char = '\b'; break; case 'f': append_char = '\f'; break; case 'n': append_char = '\n'; break; case 'r': append_char = '\r'; break; case 't': append_char = '\t'; break; case 'u': // TODO(simonn): handle unicode OLA_INFO << "unicode character found"; break; default: OLA_WARN << "Invalid escape character: \\" << **input; parser->SetError("Invalid string escape sequence"); return false; } str->push_back(append_char); (*input)++; } } return true; } bool ExtractDigits(const char **input, uint64_t *i, unsigned int *leading_zeros = NULL) { *i = 0; bool at_start = true; unsigned int zeros = 0; while (isdigit(**input)) { if (at_start && **input == '0') { zeros++; } else if (at_start) { at_start = false; } *i *= 10; *i += **input - '0'; (*input)++; } if (leading_zeros) { *leading_zeros = zeros; } return true; } /** * Parse a JsonNumber */ static bool ParseNumber(const char **input, JsonParserInterface *parser) { // The number is in the form .e // full and exponent are signed but we track the sign separate from the // value. // Only full is required. uint64_t full = 0; uint64_t fractional = 0; int64_t signed_exponent = 0; uint32_t leading_fractional_zeros = 0; bool has_fractional = false; bool has_exponent = false; bool is_negative = (**input == '-'); if (is_negative) { (*input)++; if (**input == 0) { return false; } } if (**input == '0') { (*input)++; } else if (isdigit(**input)) { ExtractDigits(input, &full); } else { return false; } if (**input == '.') { (*input)++; ExtractDigits(input, &fractional, &leading_fractional_zeros); has_fractional = true; } if (**input == 'e' || **input == 'E') { bool negative_exponent = false; // Handle the exponent (*input)++; switch (**input) { case '-': negative_exponent = true; // fall through OLA_FALLTHROUGH case '+': (*input)++; break; default: {}; } if (**input == 0) { return false; } uint64_t exponent; if (isdigit(**input)) { ExtractDigits(input, &exponent); } else { return false; } signed_exponent = (negative_exponent ? -1 : 1) * exponent; has_exponent = true; } // Now we have all the components, run the correct callback. if (has_fractional || has_exponent) { JsonDouble::DoubleRepresentation double_rep; double_rep.is_negative = is_negative; double_rep.full = full; double_rep.leading_fractional_zeros = leading_fractional_zeros; double_rep.fractional = fractional; double_rep.exponent = signed_exponent; parser->Number(double_rep); return true; } if (is_negative) { int64_t value = -1 * full; if (value < INT32_MIN || value > INT32_MAX) { parser->Number(value); } else { parser->Number(static_cast(value)); } } else { if (full > UINT32_MAX) { parser->Number(full); } else { parser->Number(static_cast(full)); } } return true; } /** * Starts from the first character after the '['. */ static bool ParseArray(const char **input, JsonParserInterface *parser) { if (!TrimWhitespace(input)) { parser->SetError("Unterminated array"); return false; } parser->OpenArray(); if (**input == ']') { (*input)++; parser->CloseArray(); return true; } while (true) { if (!TrimWhitespace(input)) { parser->SetError("Unterminated array"); return false; } bool result = ParseTrimmedInput(input, parser); if (!result) { OLA_INFO << "Invalid input"; return false; } if (!TrimWhitespace(input)) { parser->SetError("Unterminated array"); return false; } switch (**input) { case ']': (*input)++; // move past the ] parser->CloseArray(); return true; case ',': break; default: parser->SetError("Expected either , or ] after an array element"); return false; } (*input)++; // move past the , } } /** * Starts from the first character after the '{'. */ static bool ParseObject(const char **input, JsonParserInterface *parser) { if (!TrimWhitespace(input)) { parser->SetError("Unterminated object"); return false; } parser->OpenObject(); if (**input == '}') { (*input)++; parser->CloseObject(); return true; } while (true) { if (!TrimWhitespace(input)) { parser->SetError("Unterminated object"); return false; } if (**input != '"') { parser->SetError("Expected key for object"); OLA_INFO << "Expected string"; return false; } (*input)++; string key; if (!ParseString(input, &key, parser)) { return false; } parser->ObjectKey(key); if (!TrimWhitespace(input)) { parser->SetError("Missing : after key"); return false; } if (**input != ':') { parser->SetError("Incorrect character after key, should be :"); return false; } (*input)++; if (!TrimWhitespace(input)) { parser->SetError("Unterminated object"); return false; } bool result = ParseTrimmedInput(input, parser); if (!result) { return false; } if (!TrimWhitespace(input)) { parser->SetError("Unterminated object"); return false; } switch (**input) { case '}': (*input)++; // move past the } parser->CloseObject(); return true; case ',': break; default: parser->SetError("Expected either , or } after an object value"); return false; } (*input)++; // move past the , } } static bool ParseTrimmedInput(const char **input, JsonParserInterface *parser) { static const char TRUE_STR[] = "true"; static const char FALSE_STR[] = "false"; static const char NULL_STR[] = "null"; if (**input == '"') { (*input)++; string str; if (ParseString(input, &str, parser)) { parser->String(str); return true; } return false; } else if (strncmp(*input, TRUE_STR, sizeof(TRUE_STR) - 1) == 0) { *input += sizeof(TRUE_STR) - 1; parser->Bool(true); return true; } else if (strncmp(*input, FALSE_STR, sizeof(FALSE_STR) - 1) == 0) { *input += sizeof(FALSE_STR) - 1; parser->Bool(false); return true; } else if (strncmp(*input, NULL_STR, sizeof(NULL_STR) - 1) == 0) { *input += sizeof(NULL_STR) - 1; parser->Null(); return true; } else if (**input == '-' || isdigit(**input)) { return ParseNumber(input, parser); } else if (**input == '[') { (*input)++; return ParseArray(input, parser); } else if (**input == '{') { (*input)++; return ParseObject(input, parser); } parser->SetError("Invalid JSON value"); return false; } bool ParseRaw(const char *input, JsonParserInterface *parser) { if (!TrimWhitespace(&input)) { parser->SetError("No JSON data found"); return false; } parser->Begin(); bool result = ParseTrimmedInput(&input, parser); if (!result) { return false; } parser->End(); return !TrimWhitespace(&input); } bool JsonLexer::Parse(const string &input, JsonParserInterface *parser) { // TODO(simon): Do we need to convert to unicode here? I think this may be // an issue on Windows. Consider mbstowcs. // Copying the input sucks though, so we should use input.c_str() if we can. char* input_data = new char[input.size() + 1]; strncpy(input_data, input.c_str(), input.size() + 1); bool result = ParseRaw(input_data, parser); delete[] input_data; return result; } } // namespace web } // namespace ola ola-0.10.9/common/web/PatchParserTest.cpp0000664000175000017500000003564214376533110015141 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PatchParserTest.cpp * Unittest for the JSON Patch Parser. * Copyright (C) 2014 Simon Newton */ #include #include "ola/testing/TestUtils.h" #include "ola/web/Json.h" #include "ola/web/JsonData.h" #include "ola/web/JsonParser.h" #include "ola/web/JsonPatch.h" #include "ola/web/JsonPatchParser.h" #include "ola/web/JsonPointer.h" #include "ola/web/JsonWriter.h" #include "ola/Logging.h" using ola::web::JsonArray; using ola::web::JsonObject; using ola::web::JsonParser; using ola::web::JsonPatchAddOp; using ola::web::JsonPatchCopyOp; using ola::web::JsonPatchMoveOp; using ola::web::JsonPatchParser; using ola::web::JsonPatchRemoveOp; using ola::web::JsonPatchReplaceOp; using ola::web::JsonPatchSet; using ola::web::JsonPatchTestOp; using ola::web::JsonData; using ola::web::JsonValue; using ola::web::JsonWriter; using std::auto_ptr; using std::string; class JsonPatchParserTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(JsonPatchParserTest); CPPUNIT_TEST(testInvalid); CPPUNIT_TEST(testAdd); CPPUNIT_TEST(testRemove); CPPUNIT_TEST(testReplace); CPPUNIT_TEST(testMove); CPPUNIT_TEST(testCopy); CPPUNIT_TEST(testTest); CPPUNIT_TEST_SUITE_END(); public: void testInvalid(); void testAdd(); void testRemove(); void testReplace(); void testMove(); void testCopy(); void testTest(); private: void CheckValuesMatch(const std::string &input, const JsonValue *actual); void BuildSampleText(JsonData *text); void CheckInvalid(const string &input); void CheckValid(const string &input, JsonPatchSet *patch_set); }; void JsonPatchParserTest::CheckValuesMatch(const std::string &input, const JsonValue *actual) { string error; auto_ptr expected_value(JsonParser::Parse(input, &error)); if (expected_value.get()) { if (*actual != *expected_value.get()) { OLA_ASSERT_EQ(JsonWriter::AsString(*(expected_value.get())), JsonWriter::AsString(*actual)); } } else { OLA_ASSERT_EQ(expected_value.get(), actual); } } void JsonPatchParserTest::BuildSampleText(JsonData *text) { auto_ptr object(new JsonObject()); object->Add("foo", "bar"); object->Add("baz", false); JsonObject *child_object = new JsonObject(); child_object->Add("bat", 1); object->AddValue("object", child_object); JsonArray *child_array = new JsonArray(); child_array->Append(1); child_array->Append(2); child_array->Append(3); object->AddValue("array", child_array); text->SetValue(object.release()); } void JsonPatchParserTest::CheckInvalid(const string &input) { JsonPatchSet patch_set; string error; OLA_ASSERT_FALSE(JsonPatchParser::Parse(input, &patch_set, &error)); OLA_ASSERT_TRUE(patch_set.Empty()); OLA_ASSERT_NE(string(""), error); } void JsonPatchParserTest::CheckValid(const string &input, JsonPatchSet *patch_set) { string error; OLA_ASSERT_TRUE(JsonPatchParser::Parse(input, patch_set, &error)); OLA_ASSERT_FALSE(patch_set->Empty()); OLA_ASSERT_EQ(string(""), error); } CPPUNIT_TEST_SUITE_REGISTRATION(JsonPatchParserTest); void JsonPatchParserTest::testInvalid() { CheckInvalid(""); CheckInvalid("{}"); CheckInvalid("null"); CheckInvalid("1"); CheckInvalid("\"foo\""); CheckInvalid("true"); CheckInvalid("[null]"); CheckInvalid("[1]"); CheckInvalid("[1.2]"); CheckInvalid("[\"foo\"]"); CheckInvalid("[[]]"); CheckInvalid("[{}]"); CheckInvalid("[{\"op\": \"\"}]"); CheckInvalid("[{\"op\": \"foo\"}]"); } void JsonPatchParserTest::testAdd() { CheckInvalid("[{\"op\": \"add\"}]"); // Invalid and missing paths CheckInvalid("[{\"op\": \"add\", \"path\": null, \"value\": {}}]"); CheckInvalid("[{\"op\": \"add\", \"path\": true, \"value\": {}}]"); CheckInvalid("[{\"op\": \"add\", \"path\": 1, \"value\": {}}]"); CheckInvalid("[{\"op\": \"add\", \"path\": 1.2, \"value\": {}}]"); CheckInvalid("[{\"op\": \"add\", \"path\": {}, \"value\": {}}]"); CheckInvalid("[{\"op\": \"add\", \"path\": [], \"value\": {}}]"); CheckInvalid("[{\"op\": \"add\", \"value\": {}}]"); // Missing value CheckInvalid("[{\"op\": \"add\", \"path\": \"/foo\"}]"); // Valid patches { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"add\", \"path\": \"/foo\", \"value\": {}}]", &patch_set); JsonData text(new JsonObject()); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": {}}", text.Value()); } // Complex nested value { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"add\", \"path\": \"/foo\", " "\"value\": [{\"foo\": [[]]}] }]", &patch_set); JsonData text(new JsonObject()); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": [{\"foo\": [[]]}] }", text.Value()); } } void JsonPatchParserTest::testRemove() { CheckInvalid("[{\"op\": \"remove\"}]"); // Invalid and missing paths CheckInvalid("[{\"op\": \"remove\", \"path\": null}]"); CheckInvalid("[{\"op\": \"remove\", \"path\": true}]"); CheckInvalid("[{\"op\": \"remove\", \"path\": 1}]"); CheckInvalid("[{\"op\": \"remove\", \"path\": 1.2}]"); CheckInvalid("[{\"op\": \"remove\", \"path\": {}}]"); CheckInvalid("[{\"op\": \"remove\", \"path\": []}]"); CheckInvalid("[{\"op\": \"remove\"}]"); JsonData text(NULL); BuildSampleText(&text); // Valid patches { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"remove\", \"path\": \"/foo\"}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"remove\", \"path\": \"/object\"}," " {\"op\": \"remove\", \"path\": \"/array\"}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch("{\"baz\": false }", text.Value()); } } void JsonPatchParserTest::testReplace() { CheckInvalid("[{\"op\": \"replace\"}]"); // Invalid and missing paths CheckInvalid("[{\"op\": \"replace\", \"path\": null, \"value\": {}}]"); CheckInvalid("[{\"op\": \"replace\", \"path\": true, \"value\": {}}]"); CheckInvalid("[{\"op\": \"replace\", \"path\": 1, \"value\": {}}]"); CheckInvalid("[{\"op\": \"replace\", \"path\": 1.2, \"value\": {}}]"); CheckInvalid("[{\"op\": \"replace\", \"path\": {}, \"value\": {}}]"); CheckInvalid("[{\"op\": \"replace\", \"path\": [], \"value\": {}}]"); CheckInvalid("[{\"op\": \"replace\", \"value\": {}}]"); // Missing value CheckInvalid("[{\"op\": \"replace\", \"path\": \"/foo\"}]"); JsonData text(NULL); BuildSampleText(&text); { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"replace\", \"path\": \"/foo\", \"value\": 42}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": 42, \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"replace\", \"path\": \"/foo\", \"value\": true}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": true, \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"replace\", \"path\": \"/foo\", \"value\": \"bar\"}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"replace\", \"path\": \"/foo\", \"value\": []}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": [], \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"replace\", \"path\": \"/foo\", \"value\": {}}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": {}, \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } } void JsonPatchParserTest::testMove() { CheckInvalid("[{\"op\": \"move\"}]"); // Invalid and missing paths CheckInvalid("[{\"op\": \"move\", \"path\": null, \"from\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"move\", \"path\": true, \"from\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"move\", \"path\": 1, \"from\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"move\", \"path\": {}, \"from\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"move\", \"path\": [], \"from\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"move\", \"from\": {}}]"); // Missing or invalid from CheckInvalid("[{\"op\": \"move\", \"path\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"move\", \"path\": \"/foo\", \"from\": null}]"); CheckInvalid("[{\"op\": \"move\", \"path\": \"/foo\", \"from\": true}]"); CheckInvalid("[{\"op\": \"move\", \"path\": \"/foo\", \"from\": 1}]"); CheckInvalid("[{\"op\": \"move\", \"path\": \"/foo\", \"from\": []}]"); CheckInvalid("[{\"op\": \"move\", \"path\": \"/foo\", \"from\": {}}]"); JsonData text(NULL); BuildSampleText(&text); { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"move\", \"path\": \"/foo\", \"from\": \"/baz\"}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"move\", \"path\": \"/foo\", \"from\": \"/array/1\"}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": 2, " " \"object\": {\"bat\": 1}, \"array\": [1,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"move\", \"path\": \"/foo\", \"from\": \"/object/bat\"}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": 1, " " \"object\": {}, \"array\": [1,3] }", text.Value()); } } void JsonPatchParserTest::testCopy() { CheckInvalid("[{\"op\": \"copy\"}]"); // Invalid and missing paths CheckInvalid("[{\"op\": \"copy\", \"path\": null, \"from\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"copy\", \"path\": true, \"from\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"copy\", \"path\": 1, \"from\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"copy\", \"path\": {}, \"from\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"copy\", \"path\": [], \"from\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"copy\", \"from\": {}}]"); // Missing or invalid from CheckInvalid("[{\"op\": \"copy\", \"path\": \"/foo\"}]"); CheckInvalid("[{\"op\": \"copy\", \"path\": \"/foo\", \"from\": null}]"); CheckInvalid("[{\"op\": \"copy\", \"path\": \"/foo\", \"from\": true}]"); CheckInvalid("[{\"op\": \"copy\", \"path\": \"/foo\", \"from\": 1}]"); CheckInvalid("[{\"op\": \"copy\", \"path\": \"/foo\", \"from\": []}]"); CheckInvalid("[{\"op\": \"copy\", \"path\": \"/foo\", \"from\": {}}]"); JsonData text(NULL); BuildSampleText(&text); { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"copy\", \"path\": \"/foo\", \"from\": \"/baz\"}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": false, \"baz\": false," " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"copy\", \"path\": \"/foo\", \"from\": \"/array/1\"}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": 2, \"baz\": false," " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"copy\", \"path\": \"/foo\", \"from\": \"/object/bat\"}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": 1, \"baz\": false," " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } } void JsonPatchParserTest::testTest() { CheckInvalid("[{\"op\": \"test\"}]"); // Invalid and missing paths CheckInvalid("[{\"op\": \"test\", \"path\": null, \"value\": {}}]"); CheckInvalid("[{\"op\": \"test\", \"path\": true, \"value\": {}}]"); CheckInvalid("[{\"op\": \"test\", \"path\": 1, \"value\": {}}]"); CheckInvalid("[{\"op\": \"test\", \"path\": 1.2, \"value\": {}}]"); CheckInvalid("[{\"op\": \"test\", \"path\": {}, \"value\": {}}]"); CheckInvalid("[{\"op\": \"test\", \"path\": [], \"value\": {}}]"); CheckInvalid("[{\"op\": \"test\", \"value\": {}}]"); // Missing value CheckInvalid("[{\"op\": \"test\", \"path\": \"/foo\"}]"); JsonData text(NULL); BuildSampleText(&text); { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"test\", \"path\": \"/foo\", \"value\": \"bar\"}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"test\", \"path\": \"/array\", \"value\": [1,2,3]}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"test\", \"path\": \"/object/bat\", \"value\": 1}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } { JsonPatchSet patch_set; CheckValid( "[{\"op\": \"test\", \"path\": \"/baz\", \"value\": false}]", &patch_set); OLA_ASSERT_TRUE(text.Apply(patch_set)); CheckValuesMatch( "{\"foo\": \"bar\", \"baz\": false, " " \"object\": {\"bat\": 1}, \"array\": [1,2,3] }", text.Value()); } } ola-0.10.9/common/web/PointerTracker.h0000664000175000017500000000663514376533110014466 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PointerTracker.h * Maintains a JsonPointer from a series of parse events. * Copyright (C) 2014 Simon Newton */ #ifndef COMMON_WEB_POINTERTRACKER_H_ #define COMMON_WEB_POINTERTRACKER_H_ #include #include #include #include #include namespace ola { namespace web { /** * @brief Maintains a Json Pointer (RFC 6901) given a set of Json parse events. * * Given the JSON: * ~~~~~~~~~~~~~~~~~~~~~ { "foo": { "bar": 1, "baz": true }, "bat": [0, 1, 2] } ~~~~~~~~~~~~~~~~~~~~~ * * It has the pointers: * - "" * - "/foo" * - "/foo/bar" * - "/foo/baz" * - "/bat" * - "/bat/0" * - "/bat/1" * - "/bat/2" * * When parsing this example, the order of method invocation should be: * @code JsonPointer pointer; PointerTracker tracker(&pointer); tracker.OpenObject() tracker.SetProperty("foo"); tracker.OpenObject(); tracker.SetProperty("bar"); tracker.SetProperty("baz"); tracker.CloseObject(); tracker.SetProperty("bat"); tracker.OpenArray(); tracker.IncrementIndex(); tracker.IncrementIndex(); tracker.IncrementIndex(); tracker.CloseArray(); tracker.CloseObject(); @endcode */ class PointerTracker { public: explicit PointerTracker(JsonPointer *pointer) : m_pointer(pointer) { } /** * @brief Open a new Object Element */ void OpenObject(); /** * @brief Set the property name within an Object element. * Note if we're not currently in an object element this has no effect. */ void SetProperty(const std::string &property); /** * @brief Close an Object element. * Note if we're not currently in an object element this has no effect. */ void CloseObject(); /** * @brief Open a new Array Element * Note that until IncrementIndex() is called, the array index will be -1. * This is so you can call IncrementIndex() on each element. */ void OpenArray(); /** * @brief Close an Array Element * If we're not currently in an array this doesn't do anything. */ void CloseArray(); /** * @brief Increment an array index. * If we're not current in an array this doesn't do anything. */ void IncrementIndex(); private: enum TokenType { TOKEN_OBJECT, TOKEN_ARRAY, }; struct Token { public: TokenType type; int index; bool property_set; explicit Token(TokenType type) : type(type), index(-1), property_set(false) {} }; JsonPointer *m_pointer; std::vector m_tokens; DISALLOW_COPY_AND_ASSIGN(PointerTracker); }; } // namespace web } // namespace ola #endif // COMMON_WEB_POINTERTRACKER_H_ ola-0.10.9/common/web/SchemaParserTest.cpp0000664000175000017500000002426414376533110015300 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaParserTest.cpp * Unittests for the Json Schema Parser. * This uses testcases from the testdata directory. * Copyright (C) 2014 Simon Newton */ #include #include #include #include #include #include "ola/Logging.h" #include "ola/file/Util.h" #include "ola/testing/TestUtils.h" #include "ola/web/JsonSchema.h" #include "ola/web/JsonWriter.h" using ola::web::JsonObject; using ola::web::JsonSchema; using std::auto_ptr; using std::ostringstream; using std::string; using std::vector; class JsonSchemaParserTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(JsonSchemaParserTest); CPPUNIT_TEST(testPrimitiveTypes); CPPUNIT_TEST(testEmptySchema); CPPUNIT_TEST(testBasicKeywords); CPPUNIT_TEST(testTypes); CPPUNIT_TEST(testIntegers); CPPUNIT_TEST(testStrings); CPPUNIT_TEST(testArrays); CPPUNIT_TEST(testObjects); CPPUNIT_TEST(testMisc); CPPUNIT_TEST(testAllOf); CPPUNIT_TEST(testAnyOf); CPPUNIT_TEST(testOneOf); CPPUNIT_TEST(testNot); CPPUNIT_TEST(testDefinitions); CPPUNIT_TEST(testSchema); CPPUNIT_TEST_SUITE_END(); public: void testPrimitiveTypes(); void testEmptySchema(); void testBasicKeywords(); void testTypes(); void testIntegers(); void testStrings(); void testArrays(); void testObjects(); void testMisc(); void testAllOf(); void testAnyOf(); void testOneOf(); void testNot(); void testDefinitions(); void testSchema(); private: struct TestCase { string input; string expected; }; typedef vector PositiveTests; typedef vector NegativeTests; void ReadTestCases(const string& filename, PositiveTests *positive_tests, NegativeTests *negative_tests); void FinalizePositiveCase(TestCase *test, PositiveTests *positive_tests); void FinalizeNegativeCase(string *test, NegativeTests *negative_tests); void ParseSchemaAndConvertToJson(const string &input, const string &expected); void VerifyFailure(const string &input); void RunTestsInFile(const string &test_file); }; CPPUNIT_TEST_SUITE_REGISTRATION(JsonSchemaParserTest); void JsonSchemaParserTest::FinalizePositiveCase( TestCase *test, PositiveTests *positive_tests) { if (test->input.empty()) { return; } // If no expected string was supplied, it defaults to the input string. if (test->expected.empty()) { test->expected = test->input; } positive_tests->push_back(*test); test->input.clear(); test->expected.clear(); } void JsonSchemaParserTest::FinalizeNegativeCase( string *test, NegativeTests *negative_tests) { if (!test->empty()) { negative_tests->push_back(*test); test->clear(); } } /** * * TestCases are separated by ======== (8 x =) * The input and expected result is separated by -------- (8 x -) * If the input and the expected is the same the -------- can be omitted. */ void JsonSchemaParserTest::ReadTestCases(const string& filename, PositiveTests *positive_tests, NegativeTests *negative_tests) { string file_path; file_path.append(TEST_SRC_DIR); file_path.push_back(ola::file::PATH_SEPARATOR); file_path.append("common"); file_path.push_back(ola::file::PATH_SEPARATOR); file_path.append("web"); file_path.push_back(ola::file::PATH_SEPARATOR); file_path.append("testdata"); file_path.push_back(ola::file::PATH_SEPARATOR); file_path.append(filename); std::ifstream in(file_path.data(), std::ios::in); OLA_ASSERT_TRUE_MSG(in.is_open(), file_path); enum Mode { NEGATIVE_INPUT, POSITIVE_INPUT, POSITIVE_EXPECTED, }; TestCase test_case; string negative_test; Mode mode = POSITIVE_INPUT; const string comment_prefix = "//"; string line; while (getline(in, line)) { // erase trailing \r for source trees from windows docker host line.erase(line.find_last_not_of("\r")+1); if (line.compare(0, comment_prefix.size(), comment_prefix) == 0) { continue; } else if (line == "--------") { mode = POSITIVE_EXPECTED; } else if (line == "=== POSITIVE ===") { FinalizePositiveCase(&test_case, positive_tests); FinalizeNegativeCase(&negative_test, negative_tests); mode = POSITIVE_INPUT; } else if (line == "=== NEGATIVE ===") { FinalizePositiveCase(&test_case, positive_tests); FinalizeNegativeCase(&negative_test, negative_tests); mode = NEGATIVE_INPUT; } else if (mode == POSITIVE_INPUT) { test_case.input.append(line); test_case.input.push_back('\n'); } else if (mode == POSITIVE_EXPECTED) { test_case.expected.append(line); test_case.expected.push_back('\n'); } else if (mode == NEGATIVE_INPUT) { negative_test.append(line); negative_test.push_back('\n'); } } FinalizePositiveCase(&test_case, positive_tests); FinalizeNegativeCase(&negative_test, negative_tests); in.close(); } /** * Parse a JSON schema, confirm there are no errors, serialize back to JSON and * compare with the expected schema. */ void JsonSchemaParserTest::ParseSchemaAndConvertToJson(const string &input, const string &expected) { string error; auto_ptr schema(JsonSchema::FromString(input, &error)); OLA_ASSERT_EQ(string(""), error); OLA_ASSERT_NOT_NULL(schema.get()); auto_ptr schema_json(schema->AsJson()); string actual = ola::web::JsonWriter::AsString(*schema_json); actual.push_back('\n'); OLA_ASSERT_EQ(expected, actual); } /** * Verify that the given schema is invalid */ void JsonSchemaParserTest::VerifyFailure(const string &input) { string error; auto_ptr schema(JsonSchema::FromString(input, &error)); bool failed = !error.empty(); if (!failed) { ostringstream str; str << "Expected schema to fail parsing:\n" << input; OLA_FAIL(str.str()); } } void JsonSchemaParserTest::RunTestsInFile(const string &test_file) { PositiveTests positive_tests; NegativeTests negative_tests; ReadTestCases(test_file, &positive_tests, &negative_tests); OLA_INFO << "Read " << positive_tests.size() << " positive tests, " << negative_tests.size() << " negative tests from " << test_file; PositiveTests::const_iterator iter = positive_tests.begin(); for (; iter != positive_tests.end(); ++iter) { ParseSchemaAndConvertToJson(iter->input, iter->expected); } NegativeTests::const_iterator neg_iter = negative_tests.begin(); for (; neg_iter != negative_tests.end(); ++neg_iter) { VerifyFailure(*neg_iter); } } void JsonSchemaParserTest::testPrimitiveTypes() { string error; auto_ptr schema(JsonSchema::FromString("null", &error)); OLA_ASSERT_NULL(schema.get()); OLA_ASSERT_FALSE(error.empty()); schema.reset(JsonSchema::FromString("1", &error)); OLA_ASSERT_NULL(schema.get()); OLA_ASSERT_FALSE(error.empty()); schema.reset(JsonSchema::FromString("-1", &error)); OLA_ASSERT_NULL(schema.get()); OLA_ASSERT_FALSE(error.empty()); schema.reset(JsonSchema::FromString("true", &error)); OLA_ASSERT_NULL(schema.get()); OLA_ASSERT_FALSE(error.empty()); schema.reset(JsonSchema::FromString("[1, 2]", &error)); OLA_ASSERT_NULL(schema.get()); OLA_ASSERT_FALSE(error.empty()); schema.reset(JsonSchema::FromString("\"foo\"", &error)); OLA_ASSERT_NULL(schema.get()); OLA_ASSERT_FALSE(error.empty()); schema.reset(JsonSchema::FromString("[null, [1], {} ]", &error)); OLA_ASSERT_NULL(schema.get()); OLA_ASSERT_FALSE(error.empty()); } void JsonSchemaParserTest::testEmptySchema() { string error; auto_ptr schema(JsonSchema::FromString("{}", &error)); OLA_ASSERT_NOT_NULL(schema.get()); OLA_ASSERT_TRUE(error.empty()); auto_ptr value(schema->AsJson()); OLA_ASSERT_NOT_NULL(value.get()); OLA_ASSERT_EQ(string("{}"), ola::web::JsonWriter::AsString(*value)); } /** * Verify basic keywords like 'id', '$schema', 'title' & 'description' work * correctly. */ void JsonSchemaParserTest::testBasicKeywords() { RunTestsInFile("basic-keywords.test"); } void JsonSchemaParserTest::testTypes() { RunTestsInFile("type.test"); } /** * Verify integers parse correctly. */ void JsonSchemaParserTest::testIntegers() { RunTestsInFile("integers.test"); } /** * Verify strings parse correctly. */ void JsonSchemaParserTest::testStrings() { RunTestsInFile("strings.test"); } /** * Verify arrays parse correctly. */ void JsonSchemaParserTest::testArrays() { // Test the various combinations of 'items' & 'additionalItems' // items can be either a schema (object) or an array // additionalItems can be either a bool or a schema. RunTestsInFile("arrays.test"); } /** * Verify objects parse correctly. */ void JsonSchemaParserTest::testObjects() { RunTestsInFile("objects.test"); } /** * Various other test cases. */ void JsonSchemaParserTest::testMisc() { RunTestsInFile("misc.test"); } /** * Test allOf */ void JsonSchemaParserTest::testAllOf() { RunTestsInFile("allof.test"); } /** * Test anyOf */ void JsonSchemaParserTest::testAnyOf() { RunTestsInFile("anyof.test"); } /** * Test oneOf */ void JsonSchemaParserTest::testOneOf() { RunTestsInFile("oneof.test"); } /** * Test not */ void JsonSchemaParserTest::testNot() { RunTestsInFile("not.test"); } /** * Test definitions. */ void JsonSchemaParserTest::testDefinitions() { RunTestsInFile("definitions.test"); } void JsonSchemaParserTest::testSchema() { RunTestsInFile("schema.json"); } ola-0.10.9/common/web/SchemaKeywords.h0000664000175000017500000000417514376533110014457 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * SchemaKeywords.h * The keywords used in JSON Schema. * Copyright (C) 2014 Simon Newton */ #ifndef COMMON_WEB_SCHEMAKEYWORDS_H_ #define COMMON_WEB_SCHEMAKEYWORDS_H_ #include namespace ola { namespace web { /** * @brief The list of valid JSon Schema keywords. */ enum SchemaKeyword { SCHEMA_UNKNOWN, /**< Keywords we don't understand */ SCHEMA_ID, SCHEMA_SCHEMA, SCHEMA_REF, SCHEMA_TITLE, SCHEMA_DESCRIPTION, SCHEMA_DEFAULT, SCHEMA_FORMAT, SCHEMA_MULTIPLEOF, SCHEMA_MAXIMUM, SCHEMA_EXCLUSIVE_MAXIMUM, SCHEMA_MINIMUM, SCHEMA_EXCLUSIVE_MINIMUM, SCHEMA_MAX_LENGTH, SCHEMA_MIN_LENGTH, SCHEMA_PATTERN, SCHEMA_ADDITIONAL_ITEMS, SCHEMA_ITEMS, SCHEMA_MAX_ITEMS, SCHEMA_MIN_ITEMS, SCHEMA_UNIQUE_ITEMS, SCHEMA_MAX_PROPERTIES, SCHEMA_MIN_PROPERTIES, SCHEMA_REQUIRED, SCHEMA_ADDITIONAL_PROPERTIES, SCHEMA_DEFINITIONS, SCHEMA_PROPERTIES, SCHEMA_PATTERN_PROPERTIES, SCHEMA_DEPENDENCIES, SCHEMA_ENUM, SCHEMA_TYPE, SCHEMA_ALL_OF, SCHEMA_ANY_OF, SCHEMA_ONE_OF, SCHEMA_NOT, }; /** * Return the string used by the SchemaKeyword. */ std::string KeywordToString(SchemaKeyword keyword); /** * @brief Map a string to a SchemaKeyword. * @returns the SchemaKeyword corresponding to the string, or SCHEMA_UNDEFINED. */ SchemaKeyword LookupKeyword(const std::string& keyword); } // namespace web } // namespace ola #endif // COMMON_WEB_SCHEMAKEYWORDS_H_ ola-0.10.9/common/web/PointerTracker.cpp0000664000175000017500000000454114376533110015013 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * PointerTracker.cpp * Maintains a Json pointer from a series of parse events. * Copyright (C) 2014 Simon Newton */ #include #include #include "ola/strings/Format.h" #include "common/web/PointerTracker.h" namespace ola { namespace web { using std::string; using std::vector; void PointerTracker::OpenObject() { IncrementIndex(); Token token(TOKEN_OBJECT); m_tokens.push_back(token); } void PointerTracker::SetProperty(const string &property) { if (m_tokens.empty()) { return; } Token &token = m_tokens.back(); if (token.type != TOKEN_OBJECT) { return; } if (token.property_set) { m_pointer->Pop(); } else { token.property_set = true; } m_pointer->Push(property); } void PointerTracker::CloseObject() { if (m_tokens.empty()) { return; } Token &token = m_tokens.back(); if (token.type == TOKEN_OBJECT) { if (token.property_set) { m_pointer->Pop(); } m_tokens.pop_back(); } } void PointerTracker::OpenArray() { IncrementIndex(); Token token(TOKEN_ARRAY); m_tokens.push_back(token); } void PointerTracker::CloseArray() { if (m_tokens.empty()) { return; } if (m_tokens.back().type == TOKEN_ARRAY) { if (m_tokens.back().index >= 0) { m_pointer->Pop(); } m_tokens.pop_back(); } } void PointerTracker::IncrementIndex() { if (m_tokens.empty()) { return; } Token &token = m_tokens.back(); if (token.type != TOKEN_ARRAY) { return; } if (token.index >= 0) { m_pointer->Pop(); } token.index++; m_pointer->Push(ola::strings::IntToString(token.index)); } } // namespace web } // namespace ola ola-0.10.9/protoc/0000775000175000017500000000000014376533271010700 500000000000000ola-0.10.9/protoc/CppFileGenerator.h0000664000175000017500000000543014376533110014154 00000000000000// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Author: kenton@google.com (Kenton Varda) // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. // // Edited by Simon Newton for OLA #ifndef PROTOC_CPPFILEGENERATOR_H_ #define PROTOC_CPPFILEGENERATOR_H_ #include #include #include #include #include "protoc/ServiceGenerator.h" namespace ola { using google::protobuf::io::Printer; class FileGenerator { public: FileGenerator(const google::protobuf::FileDescriptor *file, const std::string &output_name); ~FileGenerator(); void GenerateHeader(Printer *printer); void GenerateImplementation(Printer *printer); private: typedef std::vector ServiceGenerators; const google::protobuf::FileDescriptor *m_file; const std::string m_output_name; std::vector package_parts_; ServiceGenerators m_service_generators; void GenerateBuildDescriptors(Printer* printer); void GenerateNamespaceOpeners(Printer* printer); void GenerateNamespaceClosers(Printer* printer); }; } // namespace ola #endif // PROTOC_CPPFILEGENERATOR_H_ ola-0.10.9/protoc/StrUtil.cpp0000664000175000017500000004276614376533110012741 00000000000000// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // from google3/strings/strutil.cc #include #include // FLT_DIG and DBL_DIG #include #include #include #include #include #include #include "protoc/StrUtil.h" #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H // Required for Protobuf 3.7 onwards #ifdef HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H #include #endif // HAVE_GOOGLE_PROTOBUF_IO_STRTOD_H #ifdef HAVE_GOOGLE_PROTOBUF_STUBS_LOGGING_H #include #endif // HAVE_GOOGLE_PROTOBUF_STUBS_LOGGING_H #ifdef HAVE_GOOGLE_PROTOBUF_STUBS_STL_UTIL_H #include #endif // HAVE_GOOGLE_PROTOBUF_STUBS_STL_UTIL_H #ifdef _WIN32 // MSVC has only _snprintf, not snprintf. // // MinGW has both snprintf and _snprintf, but they appear to be different // functions. The former is buggy. When invoked like so: // char buffer[32]; // snprintf(buffer, 32, "%.*g\n", FLT_DIG, 1.23e10f); // it prints "1.23000e+10". This is plainly wrong: %g should never print // trailing zeros after the decimal point. For some reason this bug only // occurs with some input values, not all. In any case, _snprintf does the // right thing, so we use it. #define snprintf _snprintf #endif // _WIN32 namespace ola { // ---------------------------------------------------------------------- // StringReplace() // Replace the "old" pattern with the "new" pattern in a string, // and append the result to "res". If replace_all is false, // it only replaces the first instance of "old." // ---------------------------------------------------------------------- void StringReplace(const string& s, const string& oldsub, const string& newsub, bool replace_all, string* res) { if (oldsub.empty()) { res->append(s); // if empty, append the given string. return; } string::size_type start_pos = 0; string::size_type pos; do { pos = s.find(oldsub, start_pos); if (pos == string::npos) { break; } res->append(s, start_pos, pos - start_pos); res->append(newsub); start_pos = pos + oldsub.size(); // start searching again after the "old" } while (replace_all); res->append(s, start_pos, s.length() - start_pos); } // ---------------------------------------------------------------------- // StringReplace() // Give me a string and two patterns "old" and "new", and I replace // the first instance of "old" in the string with "new", if it // exists. If "global" is true; call this repeatedly until it // fails. RETURN a new string, regardless of whether the replacement // happened or not. // ---------------------------------------------------------------------- string StringReplace(const string& s, const string& oldsub, const string& newsub, bool replace_all) { string ret; StringReplace(s, oldsub, newsub, replace_all, &ret); return ret; } // ---------------------------------------------------------------------- // SplitStringUsing() // Split a string using a character delimiter. Append the components // to 'result'. // // Note: For multi-character delimiters, this routine will split on *ANY* of // the characters in the string, not the entire string as a single delimiter. // ---------------------------------------------------------------------- template static inline void SplitStringToIteratorUsing(const string& full, const char* delim, ITR* result) { // Optimize the common case where delim is a single character. if (delim[0] != '\0' && delim[1] == '\0') { char c = delim[0]; const char* p = full.data(); const char* end = p + full.size(); while (p != end) { if (*p == c) { ++p; } else { const char* start = p; while (++p != end && *p != c) { } *(*result)++ = string(start, p - start); } } return; } string::size_type begin_index, end_index; begin_index = full.find_first_not_of(delim); while (begin_index != string::npos) { end_index = full.find_first_of(delim, begin_index); if (end_index == string::npos) { *(*result)++ = full.substr(begin_index); return; } *(*result)++ = full.substr(begin_index, (end_index - begin_index)); begin_index = full.find_first_not_of(delim, end_index); } } void SplitStringUsing(const string& full, const char* delim, vector* result) { std::back_insert_iterator< vector > it(*result); SplitStringToIteratorUsing(full, delim, &it); } // Protocol buffers doesn't ever care about errors, but I don't want to remove // the code. #define LOG_STRING(LEVEL, VECTOR) GOOGLE_LOG_IF(LEVEL, false) // ---------------------------------------------------------------------- // FastIntToBuffer() // FastInt64ToBuffer() // FastHexToBuffer() // FastHex64ToBuffer() // FastHex32ToBuffer() // ---------------------------------------------------------------------- // Offset into buffer where FastInt64ToBuffer places the end of string // null character. Also used by FastInt64ToBufferLeft. static const int kFastInt64ToBufferOffset = 21; char *FastInt64ToBuffer(int64_t i, char* buffer) { // We could collapse the positive and negative sections, but that // would be slightly slower for positive numbers... // 22 bytes is enough to store -2**64, -18446744073709551616. char* p = buffer + kFastInt64ToBufferOffset; *p-- = '\0'; if (i >= 0) { do { *p-- = '0' + i % 10; i /= 10; } while (i > 0); return p + 1; } else { // On different platforms, % and / have different behaviors for // negative numbers, so we need to jump through hoops to make sure // we don't divide negative numbers. if (i > -10) { i = -i; *p-- = '0' + i; *p = '-'; return p; } else { // Make sure we aren't at MIN_INT, in which case we can't say i = -i i = i + 10; i = -i; *p-- = '0' + i % 10; // Undo what we did a moment ago i = i / 10 + 1; do { *p-- = '0' + i % 10; i /= 10; } while (i > 0); *p = '-'; return p; } } } // Offset into buffer where FastInt32ToBuffer places the end of string // null character. Also used by FastInt32ToBufferLeft static const int kFastInt32ToBufferOffset = 11; // Yes, this is a duplicate of FastInt64ToBuffer. But, we need this for the // compiler to generate 32 bit arithmetic instructions. It's much faster, at // least with 32 bit binaries. char *FastInt32ToBuffer(int32_t i, char* buffer) { // We could collapse the positive and negative sections, but that // would be slightly slower for positive numbers... // 12 bytes is enough to store -2**32, -4294967296. char* p = buffer + kFastInt32ToBufferOffset; *p-- = '\0'; if (i >= 0) { do { *p-- = '0' + i % 10; i /= 10; } while (i > 0); return p + 1; } else { // On different platforms, % and / have different behaviors for // negative numbers, so we need to jump through hoops to make sure // we don't divide negative numbers. if (i > -10) { i = -i; *p-- = '0' + i; *p = '-'; return p; } else { // Make sure we aren't at MIN_INT, in which case we can't say i = -i i = i + 10; i = -i; *p-- = '0' + i % 10; // Undo what we did a moment ago i = i / 10 + 1; do { *p-- = '0' + i % 10; i /= 10; } while (i > 0); *p = '-'; return p; } } } char *FastHexToBuffer(int i, char* buffer) { GOOGLE_CHECK(i >= 0) << "FastHexToBuffer() wants non-negative integers, not " << i; static const char *hexdigits = "0123456789abcdef"; char *p = buffer + 21; *p-- = '\0'; do { *p-- = hexdigits[i & 15]; // mod by 16 i >>= 4; // divide by 16 } while (i > 0); return p + 1; } char *InternalFastHexToBuffer(uint64_t value, char* buffer, int num_byte) { static const char *hexdigits = "0123456789abcdef"; buffer[num_byte] = '\0'; for (int i = num_byte - 1; i >= 0; i--) { #ifdef _M_X64 // MSVC x64 platform has a bug optimizing the uint32_t(value) in the #else // block. Given that the uint32_t cast was to improve performance on 32-bit // platforms, we use 64-bit '&' directly. buffer[i] = hexdigits[value & 0xf]; #else buffer[i] = hexdigits[uint32_t(value) & 0xf]; #endif // _M_X64 value >>= 4; } return buffer; } char *FastHex64ToBuffer(uint64_t value, char* buffer) { return InternalFastHexToBuffer(value, buffer, 16); } char *FastHex32ToBuffer(uint32_t value, char* buffer) { return InternalFastHexToBuffer(value, buffer, 8); } // ---------------------------------------------------------------------- // FastInt32ToBufferLeft() // FastUInt32ToBufferLeft() // FastInt64ToBufferLeft() // FastUInt64ToBufferLeft() // // Like the Fast*ToBuffer() functions above, these are intended for speed. // Unlike the Fast*ToBuffer() functions, however, these functions write // their output to the beginning of the buffer (hence the name, as the // output is left-aligned). The caller is responsible for ensuring that // the buffer has enough space to hold the output. // // Returns a pointer to the end of the string (i.e. the null character // terminating the string). // ---------------------------------------------------------------------- static const char two_ASCII_digits[100][2] = { {'0', '0'}, {'0', '1'}, {'0', '2'}, {'0', '3'}, {'0', '4'}, {'0', '5'}, {'0', '6'}, {'0', '7'}, {'0', '8'}, {'0', '9'}, {'1', '0'}, {'1', '1'}, {'1', '2'}, {'1', '3'}, {'1', '4'}, {'1', '5'}, {'1', '6'}, {'1', '7'}, {'1', '8'}, {'1', '9'}, {'2', '0'}, {'2', '1'}, {'2', '2'}, {'2', '3'}, {'2', '4'}, {'2', '5'}, {'2', '6'}, {'2', '7'}, {'2', '8'}, {'2', '9'}, {'3', '0'}, {'3', '1'}, {'3', '2'}, {'3', '3'}, {'3', '4'}, {'3', '5'}, {'3', '6'}, {'3', '7'}, {'3', '8'}, {'3', '9'}, {'4', '0'}, {'4', '1'}, {'4', '2'}, {'4', '3'}, {'4', '4'}, {'4', '5'}, {'4', '6'}, {'4', '7'}, {'4', '8'}, {'4', '9'}, {'5', '0'}, {'5', '1'}, {'5', '2'}, {'5', '3'}, {'5', '4'}, {'5', '5'}, {'5', '6'}, {'5', '7'}, {'5', '8'}, {'5', '9'}, {'6', '0'}, {'6', '1'}, {'6', '2'}, {'6', '3'}, {'6', '4'}, {'6', '5'}, {'6', '6'}, {'6', '7'}, {'6', '8'}, {'6', '9'}, {'7', '0'}, {'7', '1'}, {'7', '2'}, {'7', '3'}, {'7', '4'}, {'7', '5'}, {'7', '6'}, {'7', '7'}, {'7', '8'}, {'7', '9'}, {'8', '0'}, {'8', '1'}, {'8', '2'}, {'8', '3'}, {'8', '4'}, {'8', '5'}, {'8', '6'}, {'8', '7'}, {'8', '8'}, {'8', '9'}, {'9', '0'}, {'9', '1'}, {'9', '2'}, {'9', '3'}, {'9', '4'}, {'9', '5'}, {'9', '6'}, {'9', '7'}, {'9', '8'}, {'9', '9'} }; char* FastUInt32ToBufferLeft(uint32_t u, char* buffer) { int digits; const char *ASCII_digits = NULL; // The idea of this implementation is to trim the number of divides to as few // as possible by using multiplication and subtraction rather than mod (%), // and by outputting two digits at a time rather than one. // The huge-number case is first, in the hopes that the compiler will output // that case in one branch-free block of code, and only output conditional // branches into it from below. if (u >= 1000000000) { // >= 1,000,000,000 digits = u / 100000000; // 100,000,000 ASCII_digits = two_ASCII_digits[digits]; buffer[0] = ASCII_digits[0]; buffer[1] = ASCII_digits[1]; buffer += 2; sublt100_000_000: u -= digits * 100000000; // 100,000,000 lt100_000_000: digits = u / 1000000; // 1,000,000 ASCII_digits = two_ASCII_digits[digits]; buffer[0] = ASCII_digits[0]; buffer[1] = ASCII_digits[1]; buffer += 2; sublt1_000_000: u -= digits * 1000000; // 1,000,000 lt1_000_000: digits = u / 10000; // 10,000 ASCII_digits = two_ASCII_digits[digits]; buffer[0] = ASCII_digits[0]; buffer[1] = ASCII_digits[1]; buffer += 2; sublt10_000: u -= digits * 10000; // 10,000 lt10_000: digits = u / 100; ASCII_digits = two_ASCII_digits[digits]; buffer[0] = ASCII_digits[0]; buffer[1] = ASCII_digits[1]; buffer += 2; sublt100: u -= digits * 100; lt100: digits = u; ASCII_digits = two_ASCII_digits[digits]; buffer[0] = ASCII_digits[0]; buffer[1] = ASCII_digits[1]; buffer += 2; done: *buffer = 0; return buffer; } if (u < 100) { digits = u; if (u >= 10) goto lt100; *buffer++ = '0' + digits; goto done; } if (u < 10000) { // 10,000 if (u >= 1000) goto lt10_000; digits = u / 100; *buffer++ = '0' + digits; goto sublt100; } if (u < 1000000) { // 1,000,000 if (u >= 100000) goto lt1_000_000; digits = u / 10000; // 10,000 *buffer++ = '0' + digits; goto sublt10_000; } if (u < 100000000) { // 100,000,000 if (u >= 10000000) goto lt100_000_000; digits = u / 1000000; // 1,000,000 *buffer++ = '0' + digits; goto sublt1_000_000; } // we already know that u < 1,000,000,000 digits = u / 100000000; // 100,000,000 *buffer++ = '0' + digits; goto sublt100_000_000; } char* FastInt32ToBufferLeft(int32_t i, char* buffer) { uint32_t u = i; if (i < 0) { *buffer++ = '-'; u = -i; } return FastUInt32ToBufferLeft(u, buffer); } char* FastUInt64ToBufferLeft(uint64_t u64, char* buffer) { int digits; const char *ASCII_digits = NULL; uint32_t u = static_cast(u64); if (u == u64) return FastUInt32ToBufferLeft(u, buffer); uint64_t top_11_digits = u64 / 1000000000; buffer = FastUInt64ToBufferLeft(top_11_digits, buffer); u = u64 - (top_11_digits * 1000000000); digits = u / 10000000; // 10,000,000 GOOGLE_DCHECK_LT(digits, 100); ASCII_digits = two_ASCII_digits[digits]; buffer[0] = ASCII_digits[0]; buffer[1] = ASCII_digits[1]; buffer += 2; u -= digits * 10000000; // 10,000,000 digits = u / 100000; // 100,000 ASCII_digits = two_ASCII_digits[digits]; buffer[0] = ASCII_digits[0]; buffer[1] = ASCII_digits[1]; buffer += 2; u -= digits * 100000; // 100,000 digits = u / 1000; // 1,000 ASCII_digits = two_ASCII_digits[digits]; buffer[0] = ASCII_digits[0]; buffer[1] = ASCII_digits[1]; buffer += 2; u -= digits * 1000; // 1,000 digits = u / 10; ASCII_digits = two_ASCII_digits[digits]; buffer[0] = ASCII_digits[0]; buffer[1] = ASCII_digits[1]; buffer += 2; u -= digits * 10; digits = u; *buffer++ = '0' + digits; *buffer = 0; return buffer; } char* FastInt64ToBufferLeft(int64_t i, char* buffer) { uint64_t u = i; if (i < 0) { *buffer++ = '-'; u = -i; } return FastUInt64ToBufferLeft(u, buffer); } // ---------------------------------------------------------------------- // SimpleItoa() // Description: converts an integer to a string. // // Return value: string // ---------------------------------------------------------------------- string SimpleItoa(int i) { char buffer[kFastToBufferSize]; return (sizeof(i) == 4) ? FastInt32ToBuffer(i, buffer) : FastInt64ToBuffer(i, buffer); } string SimpleItoa(unsigned int i) { char buffer[kFastToBufferSize]; return string(buffer, (sizeof(i) == 4) ? FastUInt32ToBufferLeft(i, buffer) : FastUInt64ToBufferLeft(i, buffer)); } string SimpleItoa(long i) { // NOLINT(runtime/int) char buffer[kFastToBufferSize]; return (sizeof(i) == 4) ? FastInt32ToBuffer(i, buffer) : FastInt64ToBuffer(i, buffer); } string SimpleItoa(unsigned long i) { // NOLINT(runtime/int) char buffer[kFastToBufferSize]; return string(buffer, (sizeof(i) == 4) ? FastUInt32ToBufferLeft(i, buffer) : FastUInt64ToBufferLeft(i, buffer)); } string SimpleItoa(long long i) { // NOLINT(runtime/int) char buffer[kFastToBufferSize]; return (sizeof(i) == 4) ? FastInt32ToBuffer(i, buffer) : FastInt64ToBuffer(i, buffer); } string SimpleItoa(unsigned long long i) { // NOLINT(runtime/int) char buffer[kFastToBufferSize]; return string(buffer, (sizeof(i) == 4) ? FastUInt32ToBufferLeft(i, buffer) : FastUInt64ToBufferLeft(i, buffer)); } } // namespace ola ola-0.10.9/protoc/ola-protoc-generator-plugin.cpp0000664000175000017500000000424214376533110016655 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-protoc-generator-plugin.cpp * Copyright (C) 2013 Simon Newton */ /** * @brief OLA protocol buffer compiler. * * Generates the service & stub code for an RPC service based on a protocol * buffer description. * * The original open source Protocol Buffers library came with a protoc that * would generate Service & Stub classes for services defined in a .proto file. * * From https://developers.google.com/protocol-buffers/docs/proto#services, as * of version 2.3.0 (January 2010), it is considered preferable for RPC * implementations to provide their own code to generate these files. * * The main advantage to generating the code ourselves is that we can define * the type of the RpcController, rather than inheriting the interface from * google::protobuf::RpcController. This is important because the * google::protobuf::RpcController has no method to determine the peer so it * has to be worked around with another layer of indirection on the server * side. * * This code should not depend on anything in libola*, since we need the * generated service & stub code to build libolacommon. Maybe one day someone * will sort out the dependency mess... */ #include #include "protoc/CppGenerator.h" int main(int argc, char *argv[]) { ola::CppGenerator cpp_service_generator; return google::protobuf::compiler::PluginMain(argc, argv, &cpp_service_generator); } ola-0.10.9/protoc/CppGenerator.h0000664000175000017500000000277614376533110013366 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * CppGenerator.h * Copyright (C) 2013 Simon Newton */ #ifndef PROTOC_CPPGENERATOR_H_ #define PROTOC_CPPGENERATOR_H_ #include #include namespace ola { class CppGenerator : public google::protobuf::compiler::CodeGenerator { public: CppGenerator() {} ~CppGenerator() {} // implements CodeGenerator ---------------------------------------- bool Generate(const google::protobuf::FileDescriptor *file, const std::string ¶meter, google::protobuf::compiler::OutputDirectory *generator_context, std::string *error) const; private: CppGenerator(const CppGenerator&); CppGenerator& operator=(const CppGenerator&); }; } // namespace ola #endif // PROTOC_CPPGENERATOR_H_ ola-0.10.9/protoc/ServiceGenerator.cpp0000664000175000017500000003174114376533110014571 00000000000000// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Author: kenton@google.com (Kenton Varda) // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. // // Edited by Simon Newton for OLA #include #include #include #include "protoc/GeneratorHelpers.h" #include "protoc/ServiceGenerator.h" #include "protoc/StrUtil.h" namespace ola { using google::protobuf::ServiceDescriptor; using google::protobuf::MethodDescriptor; using google::protobuf::io::Printer; using std::map; using std::string; ServiceGenerator::ServiceGenerator(const ServiceDescriptor* descriptor, const Options& options) : descriptor_(descriptor) { vars_["classname"] = descriptor_->name(); vars_["full_name"] = descriptor_->full_name(); if (options.dllexport_decl.empty()) { vars_["dllexport"] = ""; } else { vars_["dllexport"] = options.dllexport_decl + " "; } } ServiceGenerator::~ServiceGenerator() {} void ServiceGenerator::GenerateDeclarations(Printer* printer) { // Forward-declare the stub type. printer->Print(vars_, "class $classname$_Stub;\n" "\n"); GenerateInterface(printer); GenerateStubDefinition(printer); } void ServiceGenerator::GenerateInterface(Printer* printer) { printer->Print(vars_, "class $dllexport$$classname$ : public ola::rpc::RpcService {\n" " protected:\n" " // This class should be treated as an abstract interface.\n" " inline $classname$() {}\n" "\n" " public:\n" " virtual ~$classname$();\n"); printer->Indent(); // Don't indent blank lines printer->Outdent(); printer->PrintRaw("\n"); printer->Indent(); printer->Print(vars_, "static const ::google::protobuf::ServiceDescriptor* descriptor();\n"); // Don't indent blank lines printer->Outdent(); printer->PrintRaw("\n"); printer->Indent(); GenerateMethodSignatures(VIRTUAL, printer); // Don't indent blank lines printer->Outdent(); printer->PrintRaw("\n"); printer->Indent(); printer->PrintRaw( "// implements Service ----------------------------------------------\n"); // Don't indent blank lines printer->Outdent(); printer->PrintRaw("\n"); printer->Indent(); printer->Print( "const ::google::protobuf::ServiceDescriptor* GetDescriptor();\n" "void CallMethod(const ::google::protobuf::MethodDescriptor* method,\n" " ola::rpc::RpcController* controller,\n" " const ::google::protobuf::Message* request,\n" " ::google::protobuf::Message* response,\n" " ola::rpc::RpcService::CompletionCallback* done);\n" "const ::google::protobuf::Message& GetRequestPrototype(\n" " const ::google::protobuf::MethodDescriptor* method) const;\n" "const ::google::protobuf::Message& GetResponsePrototype(\n" " const ::google::protobuf::MethodDescriptor* method) const;\n"); printer->Outdent(); printer->Print(vars_, "\n" " private:\n" " GOOGLE_DISALLOW_EVIL_CONSTRUCTORS($classname$);\n" "};\n" "\n"); } void ServiceGenerator::GenerateStubDefinition(Printer* printer) { printer->Print(vars_, "class $dllexport$$classname$_Stub : public $classname$ {\n" " public:\n"); printer->Indent(); printer->Print(vars_, "explicit $classname$_Stub(ola::rpc::RpcChannel* channel);\n" "$classname$_Stub(ola::rpc::RpcChannel* channel,\n" " ::google::protobuf::Service::ChannelOwnership ownership" ");\n" "~$classname$_Stub();\n"); // Don't indent blank lines printer->Outdent(); printer->PrintRaw("\n"); printer->Indent(); printer->PrintRaw( "inline ola::rpc::RpcChannel* channel() { return channel_; }\n"); // Don't indent blank lines printer->Outdent(); printer->PrintRaw("\n"); printer->Indent(); printer->PrintRaw( "// implements $classname$ ------------------------------------------\n"); // Don't indent blank lines printer->Outdent(); printer->PrintRaw("\n"); printer->Indent(); GenerateMethodSignatures(NON_VIRTUAL, printer); printer->Outdent(); printer->Print(vars_, "\n" " private:\n" " ola::rpc::RpcChannel* channel_;\n" " bool owns_channel_;\n" " GOOGLE_DISALLOW_EVIL_CONSTRUCTORS($classname$_Stub);\n" "};\n" "\n"); } void ServiceGenerator::GenerateMethodSignatures( VirtualOrNon virtual_or_non, Printer* printer) { for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); map sub_vars; sub_vars["name"] = method->name(); sub_vars["input_type"] = ClassName(method->input_type(), true); sub_vars["output_type"] = ClassName(method->output_type(), true); sub_vars["virtual"] = virtual_or_non == VIRTUAL ? "virtual " : ""; printer->Print(sub_vars, "$virtual$void $name$(ola::rpc::RpcController* controller,\n" " const $input_type$* request,\n" " $output_type$* response,\n" " ola::rpc::RpcService::CompletionCallback* done" ");\n"); } } // =================================================================== void ServiceGenerator::GenerateDescriptorInitializer( Printer* printer, int index) { map vars; vars["classname"] = descriptor_->name(); vars["index"] = SimpleItoa(index); printer->Print(vars, "$classname$_descriptor_ = file->service($index$);\n"); } // =================================================================== void ServiceGenerator::GenerateImplementation(Printer* printer) { printer->Print(vars_, "$classname$::~$classname$() {}\n" "\n" "const ::google::protobuf::ServiceDescriptor* $classname$::descriptor() {\n" " protobuf_AssignDescriptorsOnce();\n" " return $classname$_descriptor_;\n" "}\n" "\n" "const ::google::protobuf::ServiceDescriptor* $classname$::GetDescriptor()" " {\n" " protobuf_AssignDescriptorsOnce();\n" " return $classname$_descriptor_;\n" "}\n" "\n"); // Generate methods of the interface. GenerateNotImplementedMethods(printer); GenerateCallMethod(printer); GenerateGetPrototype(REQUEST, printer); GenerateGetPrototype(RESPONSE, printer); // Generate stub implementation. printer->Print(vars_, "$classname$_Stub::$classname$_Stub(ola::rpc::RpcChannel* channel)\n" " : channel_(channel), owns_channel_(false) {}\n" "\n" "$classname$_Stub::$classname$_Stub(\n" " ola::rpc::RpcChannel* channel,\n" " ::google::protobuf::Service::ChannelOwnership ownership)\n" " : channel_(channel),\n" " owns_channel_(ownership ==\n" " ::google::protobuf::Service::STUB_OWNS_CHANNEL) {}\n" "\n" "$classname$_Stub::~$classname$_Stub() {\n" " if (owns_channel_) {\n" " delete channel_;\n" " }\n" "}\n" "\n"); GenerateStubMethods(printer); } void ServiceGenerator::GenerateNotImplementedMethods(Printer* printer) { for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); map sub_vars; sub_vars["classname"] = descriptor_->name(); sub_vars["name"] = method->name(); sub_vars["index"] = SimpleItoa(i); sub_vars["input_type"] = ClassName(method->input_type(), true); sub_vars["output_type"] = ClassName(method->output_type(), true); printer->Print(sub_vars, "void $classname$::$name$(\n" " ola::rpc::RpcController* controller,\n" " const $input_type$*,\n" " $output_type$*,\n" " ola::rpc::RpcService::CompletionCallback* done) {\n" " controller->SetFailed(\"Method $name$() not implemented.\");\n" " done->Run();\n" "}\n" "\n"); } } void ServiceGenerator::GenerateCallMethod(Printer* printer) { printer->Print(vars_, "void $classname$::CallMethod(\n" " const ::google::protobuf::MethodDescriptor* method,\n" " ola::rpc::RpcController* controller,\n" " const ::google::protobuf::Message* request,\n" " ::google::protobuf::Message* response,\n" " ola::rpc::RpcService::CompletionCallback* done) {\n" " GOOGLE_DCHECK_EQ(method->service(), $classname$_descriptor_);\n" " switch (method->index()) {\n"); for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); map sub_vars; sub_vars["name"] = method->name(); sub_vars["index"] = SimpleItoa(i); sub_vars["input_type"] = ClassName(method->input_type(), true); sub_vars["output_type"] = ClassName(method->output_type(), true); // Note: down_cast does not work here because it only works on pointers, // not references. printer->Print(sub_vars, " case $index$:\n" " $name$(\n" " controller,\n" " ::google::protobuf::down_cast<\n" " const $input_type$*>(request),\n" " ::google::protobuf::down_cast<\n" " $output_type$*>(response),\n" " done);\n" " break;\n"); } printer->Print(vars_, " default:\n" " GOOGLE_LOG(FATAL) << \"Bad method index; this should never " "happen.\";\n" " break;\n" " }\n" "}\n" "\n"); } void ServiceGenerator::GenerateGetPrototype(RequestOrResponse which, Printer* printer) { if (which == REQUEST) { printer->Print(vars_, "const ::google::protobuf::Message& $classname$::GetRequestPrototype(\n"); } else { printer->Print(vars_, "const ::google::protobuf::Message& $classname$::GetResponsePrototype" "(\n"); } printer->Print(vars_, " const ::google::protobuf::MethodDescriptor* method) const {\n" " GOOGLE_DCHECK_EQ(method->service(), descriptor());\n" " switch (method->index()) {\n"); for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); const google::protobuf::Descriptor* type = (which == REQUEST) ? method->input_type() : method->output_type(); map sub_vars; sub_vars["index"] = SimpleItoa(i); sub_vars["type"] = ClassName(type, true); printer->Print(sub_vars, " case $index$:\n" " return $type$::default_instance();\n"); } printer->Print(vars_, " default:\n" " GOOGLE_LOG(FATAL) << \"Bad method index; this should never happen." "\";\n" " return *static_cast< ::google::protobuf::Message*>(NULL);\n" " }\n" "}\n" "\n"); } void ServiceGenerator::GenerateStubMethods(Printer* printer) { for (int i = 0; i < descriptor_->method_count(); i++) { const MethodDescriptor* method = descriptor_->method(i); map sub_vars; sub_vars["classname"] = descriptor_->name(); sub_vars["name"] = method->name(); sub_vars["index"] = SimpleItoa(i); sub_vars["input_type"] = ClassName(method->input_type(), true); sub_vars["output_type"] = ClassName(method->output_type(), true); printer->Print(sub_vars, "void $classname$_Stub::$name$(\n" " ola::rpc::RpcController* controller,\n" " const $input_type$* request,\n" " $output_type$* response,\n" " ola::rpc::RpcService::CompletionCallback* done) {\n" " channel_->CallMethod(descriptor()->method($index$),\n" " controller, request, response, done);\n" "}\n"); } } } // namespace ola ola-0.10.9/protoc/GeneratorHelpers.h0000664000175000017500000000665414376533110014245 00000000000000// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Author: kenton@google.com (Kenton Varda) // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. // // Edited by Simon Newton for OLA #ifndef PROTOC_GENERATORHELPERS_H_ #define PROTOC_GENERATORHELPERS_H_ #include #include #include namespace ola { using std::string; // Commonly-used separator comments. Thick is a line of '=', thin is a line // of '-'. extern const char kThickSeparator[]; extern const char kThinSeparator[]; // Returns the non-nested type name for the given type. If "qualified" is // true, prefix the type with the full namespace. For example, if you had: // package foo.bar; // message Baz { message Qux {} } // Then the qualified ClassName for Qux would be: // ::foo::bar::Baz_Qux // While the non-qualified version would be: // Baz_Qux string ClassName(const google::protobuf::Descriptor* descriptor, bool qualified); // Strips ".proto" or ".protodevel" from the end of a filename. string StripProto(const string& filename); // Convert a file name into a valid identifier. string FilenameIdentifier(const string& filename); // No longer needed since protobuf 3.2 #if GOOGLE_PROTOBUF_VERSION < 3002000 // Return the name of the AddDescriptors() function for a given file. string GlobalAddDescriptorsName(const string& filename); #endif // Return the name of the AssignDescriptors() function for a given file. string GlobalAssignDescriptorsName(const string& filename); // Do message classes in this file have descriptor and reflection methods? inline bool HasDescriptorMethods(const google::protobuf::FileDescriptor* file) { return file->options().optimize_for() != google::protobuf::FileOptions::LITE_RUNTIME; } } // namespace ola #endif // PROTOC_GENERATORHELPERS_H_ ola-0.10.9/protoc/GeneratorHelpers.cpp0000664000175000017500000001032114376533110014562 00000000000000// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Author: kenton@google.com (Kenton Varda) // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. // // Edited by Simon Newton for OLA #include #include #include "protoc/GeneratorHelpers.h" #include "protoc/StrUtil.h" using std::string; using google::protobuf::Descriptor; namespace ola { namespace { string DotsToUnderscores(const string& name) { return StringReplace(name, ".", "_", true); } string DotsToColons(const string& name) { return StringReplace(name, ".", "::", true); } } // namespace const char kThickSeparator[] = "// ===================================================================\n"; const char kThinSeparator[] = "// -------------------------------------------------------------------\n"; string ClassName(const Descriptor* descriptor, bool qualified) { // Find "outer", the descriptor of the top-level message in which // "descriptor" is embedded. const Descriptor* outer = descriptor; while (outer->containing_type() != NULL) outer = outer->containing_type(); const string& outer_name = outer->full_name(); string inner_name = descriptor->full_name().substr(outer_name.size()); if (qualified) { return "::" + DotsToColons(outer_name) + DotsToUnderscores(inner_name); } else { return outer->name() + DotsToUnderscores(inner_name); } } string StripProto(const string& filename) { if (HasSuffixString(filename, ".protodevel")) { return StripSuffixString(filename, ".protodevel"); } else { return StripSuffixString(filename, ".proto"); } } // Convert a file name into a valid identifier. string FilenameIdentifier(const string& filename) { string result; for (unsigned int i = 0; i < filename.size(); i++) { if (ascii_isalnum(filename[i])) { result.push_back(filename[i]); } else { // Not alphanumeric. To avoid any possibility of name conflicts we // use the hex code for the character. result.push_back('_'); char buffer[kFastToBufferSize]; result.append(FastHexToBuffer(static_cast(filename[i]), buffer)); } } return result; } // No longer needed since protobuf 3.2 #if GOOGLE_PROTOBUF_VERSION < 3002000 // Return the name of the AddDescriptors() function for a given file. string GlobalAddDescriptorsName(const string& filename) { return "protobuf_AddDesc_" + FilenameIdentifier(filename); } #endif // Return the name of the AssignDescriptors() function for a given file. string GlobalAssignDescriptorsName(const string& filename) { return "protobuf_AssignDesc_" + FilenameIdentifier(filename); } } // namespace ola ola-0.10.9/protoc/ServiceGenerator.h0000664000175000017500000001021614376533110014230 00000000000000// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Author: kenton@google.com (Kenton Varda) // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. // // Edited by Simon Newton for OLA #ifndef PROTOC_SERVICEGENERATOR_H_ #define PROTOC_SERVICEGENERATOR_H_ #include #include #include #include #include namespace ola { using google::protobuf::ServiceDescriptor; using google::protobuf::io::Printer; using std::string; class ServiceGenerator { public: // Generator options: struct Options { Options() : safe_boundary_check(false) { } string dllexport_decl; bool safe_boundary_check; }; // See generator.cc for the meaning of dllexport_decl. explicit ServiceGenerator(const ServiceDescriptor* descriptor, const Options& options); ~ServiceGenerator(); // Header stuff. // Generate the class definitions for the service's interface and the // stub implementation. void GenerateDeclarations(Printer* printer); // Source file stuff. // Generate code that initializes the global variable storing the service's // descriptor. void GenerateDescriptorInitializer(Printer* printer, int index); // Generate implementations of everything declared by GenerateDeclarations(). void GenerateImplementation(Printer* printer); private: enum RequestOrResponse { REQUEST, RESPONSE }; enum VirtualOrNon { VIRTUAL, NON_VIRTUAL }; // Header stuff. // Generate the service abstract interface. void GenerateInterface(Printer* printer); // Generate the stub class definition. void GenerateStubDefinition(Printer* printer); // Prints signatures for all methods in the void GenerateMethodSignatures(VirtualOrNon virtual_or_non, Printer* printer); // Source file stuff. // Generate the default implementations of the service methods, which // produce a "not implemented" error. void GenerateNotImplementedMethods(Printer* printer); // Generate the CallMethod() method of the service. void GenerateCallMethod(Printer* printer); // Generate the Get{Request,Response}Prototype() methods. void GenerateGetPrototype(RequestOrResponse which, Printer* printer); // Generate the stub's implementations of the service methods. void GenerateStubMethods(Printer* printer); const ServiceDescriptor* descriptor_; std::map vars_; GOOGLE_DISALLOW_EVIL_CONSTRUCTORS(ServiceGenerator); }; } // namespace ola #endif // PROTOC_SERVICEGENERATOR_H_ ola-0.10.9/protoc/CppFileGenerator.cpp0000664000175000017500000002337714376533110014521 00000000000000// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // Author: kenton@google.com (Kenton Varda) // Based on original Protocol Buffers design by // Sanjay Ghemawat, Jeff Dean, and others. // // Edited by Simon Newton for OLA #include #include #include #include #include #include "protoc/CppFileGenerator.h" #include "protoc/GeneratorHelpers.h" #include "protoc/ServiceGenerator.h" #include "protoc/StrUtil.h" namespace ola { using google::protobuf::FileDescriptor; using google::protobuf::ServiceDescriptor; using google::protobuf::io::Printer; using std::auto_ptr; using std::string; FileGenerator::FileGenerator(const FileDescriptor *file, const string &output_name) : m_file(file), m_output_name(output_name) { SplitStringUsing(file->package(), ".", &package_parts_); ServiceGenerator::Options options; for (int i = 0; i < file->service_count(); i++) { m_service_generators.push_back( new ServiceGenerator(file->service(i), options)); } } FileGenerator::~FileGenerator() { ServiceGenerators::iterator iter = m_service_generators.begin(); for (; iter != m_service_generators.end(); ++iter) { delete *iter; } } void FileGenerator::GenerateHeader(Printer *printer) { const string filename_identifier = FilenameIdentifier(m_output_name); std::map var_map; var_map["basename"] = StripProto(m_file->name()); var_map["filename"] = m_file->name(); var_map["filename_identifier"] = filename_identifier; // Generate top of header. printer->Print( var_map, "// Generated by the protocol buffer compiler. DO NOT EDIT!\n" "// source: $filename$\n" "\n" "#ifndef PROTOBUF_$filename_identifier$__INCLUDED " "// NOLINT(build/header_guard)\n" "#define PROTOBUF_$filename_identifier$__INCLUDED\n" "\n" "#include \n" "\n" "#include \"$basename$.pb.h\"\n" "#include \"common/rpc/RpcService.h\"\n" "\n" "namespace ola {\n" "namespace rpc {\n" "class RpcController;\n" "class RpcChannel;\n" "} // rpc\n" "} // ola\n" "\n"); GenerateNamespaceOpeners(printer); ServiceGenerators::iterator iter = m_service_generators.begin(); for (; iter != m_service_generators.end(); ++iter) { (*iter)->GenerateDeclarations(printer); } GenerateNamespaceClosers(printer); printer->Print( "#endif // PROTOBUF_$filename_identifier$__INCLUDED\n", "filename_identifier", filename_identifier); } void FileGenerator::GenerateImplementation(Printer *printer) { printer->Print( "// Generated by the protocol buffer compiler. DO NOT EDIT!\n" "// source: $filename$\n" "\n" // TODO(Peter): This should be a full path to remove the lint error "#include \"$file$.pb.h\"\n" "\n" "#include // NOLINT(build/include)\n" "#include \n" "\n" "#include \"common/rpc/RpcChannel.h\"\n" "#include \"common/rpc/RpcController.h\"\n" "\n", "file", m_output_name, "filename", m_file->name()); GenerateNamespaceOpeners(printer); printer->Print( "\n" "namespace {\n" "\n"); for (int i = 0; i < m_file->service_count(); i++) { printer->Print( "const ::google::protobuf::ServiceDescriptor* $name$_descriptor_ =\n" " NULL;\n", "name", m_file->service(i)->name()); } printer->Print( "\n" "} // namespace\n" "\n"); // Define our externally-visible BuildDescriptors() function. (For the lite // library, all this does is initialize default instances.) GenerateBuildDescriptors(printer); printer->Print("\n"); printer->Print(kThickSeparator); printer->Print("\n"); ServiceGenerators::iterator iter = m_service_generators.begin(); for (; iter != m_service_generators.end(); ++iter) { (*iter)->GenerateImplementation(printer); } GenerateNamespaceClosers(printer); } void FileGenerator::GenerateBuildDescriptors(Printer* printer) { // AddDescriptors() is a file-level procedure which adds the encoded // FileDescriptorProto for this .proto file to the global DescriptorPool for // generated files (DescriptorPool::generated_pool()). It either runs at // static initialization time (by default) or when default_instance() is // called for the first time (in LITE_RUNTIME mode with // GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER flag enabled). This procedure also // constructs default instances and registers extensions. // // Its sibling, AssignDescriptors(), actually pulls the compiled // FileDescriptor from the DescriptorPool and uses it to populate all of // the global variables which store pointers to the descriptor objects. // It also constructs the reflection objects. It is called the first time // anyone calls descriptor() or GetReflection() on one of the types defined // in the file. // In optimize_for = LITE_RUNTIME mode, we don't generate AssignDescriptors() // and we only use AddDescriptors() to allocate default instances. if (HasDescriptorMethods(m_file)) { printer->Print( "\n" "void $assigndescriptorsname$() {\n", "assigndescriptorsname", GlobalAssignDescriptorsName(m_output_name)); printer->Indent(); // No longer needed since protobuf 3.2 #if GOOGLE_PROTOBUF_VERSION < 3002000 // Make sure the file has found its way into the pool. If a descriptor // is requested *during* static init then AddDescriptors() may not have // been called yet, so we call it manually. Note that it's fine if // AddDescriptors() is called multiple times. printer->Print( "$adddescriptorsname$();\n", "adddescriptorsname", GlobalAddDescriptorsName(m_file->name())); #endif // Get the file's descriptor from the pool. printer->Print( "const ::google::protobuf::FileDescriptor* file =\n" " ::google::protobuf::DescriptorPool::generated_pool()->FindFileByName(" "\n" " \"$filename$\");\n" // Note that this GOOGLE_CHECK is necessary to prevent a warning about // "file" being unused when compiling an empty .proto file. "GOOGLE_CHECK(file != NULL);\n", "filename", m_file->name()); for (int i = 0; i < m_file->service_count(); i++) { m_service_generators[i]->GenerateDescriptorInitializer(printer, i); } printer->Outdent(); printer->Print( "}\n" "\n"); // --------------------------------------------------------------- // protobuf_AssignDescriptorsOnce(): The first time it is called, calls // AssignDescriptors(). All later times, waits for the first call to // complete and then returns. // We need to generate different code, depending on the version // of protobuf we compile against #if GOOGLE_PROTOBUF_VERSION < 3007000 printer->Print( "namespace {\n" "\n" "GOOGLE_PROTOBUF_DECLARE_ONCE(protobuf_AssignDescriptors_once_);\n" "inline void protobuf_AssignDescriptorsOnce() {\n" " ::google::protobuf::GoogleOnceInit(&protobuf_AssignDescriptors_once_," "\n" " &$assigndescriptorsname$);\n" "}\n" "\n", "assigndescriptorsname", GlobalAssignDescriptorsName(m_output_name)); printer->Print("} // namespace\n"); #else printer->Print( "namespace {\n" "\n" "inline void protobuf_AssignDescriptorsOnce() {\n" " static ::google::protobuf::internal::once_flag once;\n" " ::google::protobuf::internal::call_once(once,\n" " &$assigndescriptorsname$);\n" "}\n" "\n", "assigndescriptorsname", GlobalAssignDescriptorsName(m_output_name)); printer->Print("} // namespace\n"); #endif } } void FileGenerator::GenerateNamespaceOpeners(Printer* printer) { if (package_parts_.size() > 0) printer->Print("\n"); for (unsigned int i = 0; i < package_parts_.size(); i++) { printer->Print("namespace $part$ {\n", "part", package_parts_[i]); } } void FileGenerator::GenerateNamespaceClosers(Printer* printer) { if (package_parts_.size() > 0) printer->Print("\n"); for (int i = package_parts_.size() - 1; i >= 0; i--) { printer->Print("} // namespace $part$\n", "part", package_parts_[i]); } } } // namespace ola ola-0.10.9/protoc/Makefile.mk0000664000175000017500000000152414376533110012660 00000000000000# Programs ######################### if BUILD_OLA_PROTOC_PLUGIN noinst_PROGRAMS += protoc/ola_protoc_plugin protoc_ola_protoc_plugin_SOURCES = \ protoc/CppFileGenerator.cpp \ protoc/CppFileGenerator.h \ protoc/CppGenerator.cpp \ protoc/CppGenerator.h \ protoc/GeneratorHelpers.cpp \ protoc/GeneratorHelpers.h \ protoc/ServiceGenerator.cpp \ protoc/ServiceGenerator.h \ protoc/StrUtil.cpp \ protoc/StrUtil.h \ protoc/ola-protoc-generator-plugin.cpp protoc_ola_protoc_plugin_CXXFLAGS = $(COMMON_PROTOBUF_CXXFLAGS) protoc_ola_protoc_plugin_LDADD = $(libprotobuf_LIBS) -lprotoc else # If we're using a different ola_protoc_plugin, we need to provide a rule to # create this file since the generated service configs depend on it. protoc/ola_protoc_plugin$(EXEEXT): touch protoc/ola_protoc_plugin$(EXEEXT) endif ola-0.10.9/protoc/StrUtil.h0000664000175000017500000002016014376533110012366 00000000000000// Protocol Buffers - Google's data interchange format // Copyright 2008 Google Inc. All rights reserved. // http://code.google.com/p/protobuf/ // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: // // * Redistributions of source code must retain the above copyright // notice, this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above // copyright notice, this list of conditions and the following disclaimer // in the documentation and/or other materials provided with the // distribution. // * Neither the name of Google Inc. nor the names of its // contributors may be used to endorse or promote products derived from // this software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS // "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT // LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR // A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT // OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, // SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT // LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, // DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY // THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT // (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. // from google3/strings/strutil.h #ifndef PROTOC_STRUTIL_H_ #define PROTOC_STRUTIL_H_ #include #include #include #include #include namespace ola { using std::vector; using std::string; #ifdef _MSC_VER #define strtoll _strtoi64 #define strtoull _strtoui64 #elif defined(__DECCXX) && defined(__osf__) // HP C++ on Tru64 does not have strtoll, but strtol is already 64-bit. #define strtoll strtol #define strtoull strtoul #endif // _MSC_VER // ---------------------------------------------------------------------- // ascii_isalnum() // Check if an ASCII character is alphanumeric. We can't use ctype's // isalnum() because it is affected by locale. This function is applied // to identifiers in the protocol buffer language, not to natural-language // strings, so locale should not be taken into account. // ascii_isdigit() // Like above, but only accepts digits. // ---------------------------------------------------------------------- inline bool ascii_isalnum(char c) { return ('a' <= c && c <= 'z') || ('A' <= c && c <= 'Z') || ('0' <= c && c <= '9'); } inline bool ascii_isdigit(char c) { return ('0' <= c && c <= '9'); } // ---------------------------------------------------------------------- // HasSuffixString() // Return true if str ends in suffix. // StripSuffixString() // Given a string and a putative suffix, returns the string minus the // suffix string if the suffix matches, otherwise the original // string. // ---------------------------------------------------------------------- inline bool HasSuffixString(const string& str, const string& suffix) { return str.size() >= suffix.size() && str.compare(str.size() - suffix.size(), suffix.size(), suffix) == 0; } inline string StripSuffixString(const string& str, const string& suffix) { if (HasSuffixString(str, suffix)) { return str.substr(0, str.size() - suffix.size()); } else { return str; } } // ---------------------------------------------------------------------- // StringReplace() // Give me a string and two patterns "old" and "new", and I replace // the first instance of "old" in the string with "new", if it // exists. RETURN a new string, regardless of whether the replacement // happened or not. // ---------------------------------------------------------------------- LIBPROTOBUF_EXPORT string StringReplace(const string& s, const string& oldsub, const string& newsub, bool replace_all); // ---------------------------------------------------------------------- // SplitStringUsing() // Split a string using a character delimiter. Append the components // to 'result'. If there are consecutive delimiters, this function skips // over all of them. // ---------------------------------------------------------------------- LIBPROTOBUF_EXPORT void SplitStringUsing(const string& full, const char* delim, vector* res); // ---------------------------------------------------------------------- // FastIntToBuffer() // FastHexToBuffer() // FastHex64ToBuffer() // FastHex32ToBuffer() // FastTimeToBuffer() // These are intended for speed. FastIntToBuffer() assumes the // integer is non-negative. FastHexToBuffer() puts output in // hex rather than decimal. FastTimeToBuffer() puts the output // into RFC822 format. // // FastHex64ToBuffer() puts a 64-bit unsigned value in hex-format, // padded to exactly 16 bytes (plus one byte for '\0') // // FastHex32ToBuffer() puts a 32-bit unsigned value in hex-format, // padded to exactly 8 bytes (plus one byte for '\0') // // All functions take the output buffer as an arg. // They all return a pointer to the beginning of the output, // which may not be the beginning of the input buffer. // ---------------------------------------------------------------------- // Suggested buffer size for FastToBuffer functions. Also works with // DoubleToBuffer() and FloatToBuffer(). static const int kFastToBufferSize = 32; LIBPROTOBUF_EXPORT char* FastInt32ToBuffer(int32_t i, char* buffer); LIBPROTOBUF_EXPORT char* FastInt64ToBuffer(int64_t i, char* buffer); char* FastUInt32ToBuffer(uint32_t i, char* buffer); // inline below char* FastUInt64ToBuffer(uint64_t i, char* buffer); // inline below LIBPROTOBUF_EXPORT char* FastHexToBuffer(int i, char* buffer); LIBPROTOBUF_EXPORT char* FastHex64ToBuffer(uint64_t i, char* buffer); LIBPROTOBUF_EXPORT char* FastHex32ToBuffer(uint32_t i, char* buffer); // ---------------------------------------------------------------------- // FastInt32ToBufferLeft() // FastUInt32ToBufferLeft() // FastInt64ToBufferLeft() // FastUInt64ToBufferLeft() // // Like the Fast*ToBuffer() functions above, these are intended for speed. // Unlike the Fast*ToBuffer() functions, however, these functions write // their output to the beginning of the buffer (hence the name, as the // output is left-aligned). The caller is responsible for ensuring that // the buffer has enough space to hold the output. // // Returns a pointer to the end of the string (i.e. the null character // terminating the string). // ---------------------------------------------------------------------- LIBPROTOBUF_EXPORT char* FastInt32ToBufferLeft(int32_t i, char* buffer); LIBPROTOBUF_EXPORT char* FastUInt32ToBufferLeft(uint32_t i, char* buffer); LIBPROTOBUF_EXPORT char* FastInt64ToBufferLeft(int64_t i, char* buffer); LIBPROTOBUF_EXPORT char* FastUInt64ToBufferLeft(uint64_t i, char* buffer); // Just define these in terms of the above. inline char* FastUInt32ToBuffer(uint32_t i, char* buffer) { FastUInt32ToBufferLeft(i, buffer); return buffer; } inline char* FastUInt64ToBuffer(uint64_t i, char* buffer) { FastUInt64ToBufferLeft(i, buffer); return buffer; } // ---------------------------------------------------------------------- // SimpleItoa() // Description: converts an integer to a string. // // Return value: string // ---------------------------------------------------------------------- LIBPROTOBUF_EXPORT string SimpleItoa(int i); LIBPROTOBUF_EXPORT string SimpleItoa(unsigned int i); LIBPROTOBUF_EXPORT string SimpleItoa(long i); // NOLINT(runtime/int) LIBPROTOBUF_EXPORT string SimpleItoa(unsigned long i); // NOLINT(runtime/int) LIBPROTOBUF_EXPORT string SimpleItoa(long long i); // NOLINT(runtime/int) LIBPROTOBUF_EXPORT string SimpleItoa( unsigned long long i); // NOLINT(runtime/int) } // namespace ola #endif // PROTOC_STRUTIL_H_ ola-0.10.9/protoc/CppGenerator.cpp0000664000175000017500000000430314376533110013705 00000000000000/* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA * * CppGenerator.cpp * Copyright (C) 2013 Simon Newton */ #include #include #include #include #include #include "protoc/CppGenerator.h" #include "protoc/CppFileGenerator.h" #include "protoc/GeneratorHelpers.h" #include "protoc/ServiceGenerator.h" #include "protoc/StrUtil.h" namespace ola { using google::protobuf::FileDescriptor; using google::protobuf::ServiceDescriptor; using google::protobuf::compiler::OutputDirectory; using google::protobuf::io::Printer; using std::auto_ptr; using std::string; bool CppGenerator::Generate(const FileDescriptor *file, const string&, OutputDirectory *generator_context, string*) const { string basename = StripProto(file->name()) + "Service"; string header_name = basename + ".pb.h"; string code_name = basename + ".pb.cpp"; FileGenerator file_generator(file, basename); auto_ptr header_output( generator_context->Open(header_name)); Printer header_printer(header_output.get(), '$'); file_generator.GenerateHeader(&header_printer); auto_ptr code_output( generator_context->Open(code_name)); Printer code_printer(code_output.get(), '$'); file_generator.GenerateImplementation(&code_printer); return true; } } // namespace ola ola-0.10.9/ola.spec.in0000664000175000017500000001224714376533110011344 00000000000000#python2_sitelib macro shim %{!?python2_sitelib:%global python2_sitelib %(python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()")} #udev macro shim %{!?_udevrulesdir:%global _udevrulesdir %{_sysconfdir}/udev/rules.d/ } Name: ola Version: @VERSION@ Release: 1%{?dist} Summary: Open Lighting Architecture Group: Applications/Multimedia License: GPLv2 and LGPLv2 URL: https://github.com/OpenLightingProject/ola Source: https://github.com/OpenLightingProject/ola/releases/download/%{version}/%{name}-%{version}.tar.gz BuildRequires: pkgconfig,pkgconfig(cppunit),pkgconfig(uuid),pkgconfig(avahi-client) BuildRequires: pkgconfig(libusb-1.0) >= 1.0.2,pkgconfig(libmicrohttpd) >= 0.4.0%{!?el6:,pkgconfig(systemd)} BuildRequires: libtool,bison,flex,python2-devel,openslp-devel,pkgconfig(libftdi%{!?el6:1}) >= 0.18 BuildRequires: protobuf-devel >= 0.2,protobuf-compiler,protobuf-python,numpy %if 0%{?fedora} >= 21 BuildRequires: liblo-devel %endif Requires: %{name}-data = %{version}-%{release} %description The Open Lighting Architecture is a framework for lighting control information. It supports a range of protocols and over a dozen USB devices. It can run as a standalone service, which is useful for converting signals between protocols, or alternatively using the OLA API, it can be used as the back-end for lighting control software. OLA runs on many different platforms including ARM, which makes it a perfect fit for low cost Ethernet to DMX gateways. %package devel Requires: %{name}%{?_isa} = %{version}-%{release} Group: Development/Libraries Summary: C/C++ Development files for OLA %description devel The OLA C/C++ library %package -n python2-%{name} Requires: %{name} = %{version}-%{release}, protobuf-python Group: Development/Libraries Summary: Python Development files for OLA BuildArch: noarch %{?python_provide:%python_provide python2-%{name}} %description -n python2-%{name} The OLA python library %package rdm-tests Requires: %{name} = %{version}-%{release}, python2-%{name}, numpy Group: Development/Libraries BuildArch: noarch Summary: RDM test suite using OLA and python Provides: bundled(jquery) = 1.7.2, bundled(jquery-ui) = 1.8.21 %description rdm-tests The rdm test suite for OLA %package data Group: Development/Libraries BuildArch: noarch Summary: data for OLA Provides: bundled(bootstrap) = 3.3.2, bundled(jquery) = 2.1.3 Provides: bundled(angularjs) = 1.3.14, bundled(angular-route) = 1.3.14 %description data HTML, CSS, JS and RDM PIDs files for OLA %prep %setup -q -n %{name}-%{version} %build export LD_LIBRARY_PATH="%buildroot%{_libdir}" autoreconf -i %configure --enable-rdm-tests --enable-shared --disable-static #only link as needed sed -i -e 's! -shared ! -Wl,--as-needed\0!g' libtool #rpath, please die sed -i 's|^hardcode_libdir_flag_spec=.*|hardcode_libdir_flag_spec=""|g' libtool sed -i 's|^runpath_var=LD_RUN_PATH|runpath_var=DIE_RPATH_DIE|g' libtool #we can't fix this upstream (I think) sed -i "s|\$(LN_S) -f \$(bindir)\/|\$(LN_S) -f |g" Makefile make %{!?el6:%{?_smp_mflags}} #el6 has problems with parallel building %check export LD_LIBRARY_PATH="%buildroot%{_libdir}" make check %{!?el6:%{?_smp_mflags}} #el6 has problems with parallel building find %buildroot -name "*\.la" -delete find %buildroot -name "*\.a" -delete %install export LD_LIBRARY_PATH="%buildroot%{_libdir}" %make_install mkdir -p %buildroot/%{_udevrulesdir} cp debian/ola.udev %buildroot/%{_udevrulesdir} %post -p /sbin/ldconfig %postun -p /sbin/ldconfig %files #license shim %{!?_licensedir:%global license %doc} %doc AUTHORS NEWS README %{_bindir}/ola* %{_bindir}/rdmpro_sniffer %{_bindir}/usbpro_firmware %{_libdir}/libola*\.so\.* %{_mandir}/man1/** %{_udevrulesdir}/ola.udev %license LICENCE tools/rdm/static/MIT-LICENSE.txt javascript/new-src/README.md COPYING %files devel %doc README.developer %{_includedir}/ola** %{_libdir}/libola*\.so %{_libdir}/pkgconfig/* %files -n python2-%{name} %dir %{python2_sitelib}/ola %{python2_sitelib}/ola/*\.py* %{python2_sitelib}/ola/rpc %files rdm-tests %{_bindir}/rdm_model_collector.py* %{_bindir}/rdm_responder_test.py* %{_bindir}/rdm_test_server.py* %{_datadir}/ola/rdm-server %{python2_sitelib}/ola/testing %files data %{_datadir}/olad %dir %{_datadir}/ola %{_datadir}/ola/pids %changelog * Thu Nov 12 2015 Dave Olsthoorn - 0.9.8-1 - update to 0.9.8 full changelog here: https://github.com/OpenLightingProject/ola/releases/tag/0.9.8 * Sat Sep 19 2015 Dave Olsthoorn - 0.9.7-1 - update to 0.9.7 - OLA now requires libusb * Thu Aug 27 2009 Kevin Deldycke 0.3.1.trunk.20090827-1mdv2009.1 - Rename all project from lla to OLA - Upgrade to the latest OLA 0.3.1 from the master branch of the git repository - OLA now requires libmicrohttpd, libcppunit, protobuf and libctemplate - Disable the --no-undefined option and make all undefined symbols weakly bound - Add check step - Rebuild RPM for Mandriva 2009.1 * Mon May 12 2008 Kevin Deldycke 0.2.3.200710210908-1mdv2008.1 - Ported from Fedora Core 8 ( http://rpms.netmindz.net/FC8/SRPMS.netmindz/lla-0.2.3.200710210908-1.fc8.src.rpm ) to Mandriva 2008.1 * Sun Apr 29 2007 Will Tatam 0.1.3-1 - First Build ola-0.10.9/ChangeLog0000664000175000017500000000477014376533110011064 0000000000000011/21/2009 Simon Newton * OLA v0.5.0 10/18/2009 Simon Newton * OLA v0.4.0 8/26/2009 Simon Newton * OLA v0.3.1 8/8/2009 Simon Newton * OLA v0.3 14/10/2007 Simon Newton < * refactored the plugins and cleaned up all the plugin code * added 'enable' and 'debug' parameters for the plugins * bugfixes to the python buildfiles 15/9/2007 Simon Newton < * fixed a memory leak * fixed a bug in calling upload_plugins multiple times * added the dmx4linux plugin * fixed the bug that triggered on usb pro removal 15/9/2007 Simon Newton < * stageprofi plugin * fixed the bug with the DMX USB Pro 3/3/2007 Simon Newton < * initial thread support in the client libraries 26/2/2007 Simon Newton < * Integrated the python libs into autotools * Minor bugfix * Wrote port patching regression tests 16/2/2007 Simon Newton < * reduced memory usage in plugins * started on test framework 14/1/2007 Simon Newton < * Pathport plugin added 13/1/2007 Simon Newton < * Added a plugin for the Stage Profi USB Device 1/1/2007 Simon Newton < * fixed the problem on the USB Pro when changing modes 30/12/2006 Simon Newton < * Fixed the Usb Pro last-channel-corrupt bug 30/12/2006 Simon Newton < * Fixed problems so that it would actually compile again 25/12/2006 Simon Newton < * universes now save names and merge mode * fixed a bunch of memory leaks 24/12/2006 Simon Newton < * Got device config messages working * Add configuration commands to the Pro Device * Added universe merge capability * Improved the tool to autogen protocol messages * Added merge mode for universes with device sources (no client support yet) 28/11/2006 Simon Newton < * Started on a general RPC framework * Changed the client to C++, events are now handled asynchronously 27/4/2006 Simon Newton < * Art-Net plugin bug fix 17/4/2006 Simon Newton < * Added support for multiple preference values per key * Pro Plugin now supports multiple devices 16/4/2006 Simon Newton < * USR1 signals now used to change logging levels ola-0.10.9/scripts/0000775000175000017500000000000014376533270011060 500000000000000ola-0.10.9/scripts/Makefile.mk0000664000175000017500000000013414376533110013035 00000000000000PYTHON_BUILD_DIRS += scripts CLEANFILES += \ scripts/*.pyc \ scripts/__pycache__/* ola-0.10.9/README.developer0000664000175000017500000002032014376533110012143 00000000000000 Developer Information ############################################################################### This file provides some information for developers looking to submit patches to OLA. The first section contains some general notes, and the latter sections address particular languages. Also take a look at README which includes some relevant information for developers too. General =============================================================================== Code Reviews ------------ To have patches reviewed please push your changes to GitHub and create a Pull Request from within your fork. If you're using Google Code please enable comments on the repo. Under Administer -> Source check: Enable code reviews Allow non-members to review code Licensing --------- Think carefully about the license for each file. Code to be used by clients (./ola , ./python) should be under the LGPL, so that it may be used in commercial projects. Plugins and code used solely in olad should be under the GPL. scripts/enforce_licence.py will look for a LICENCE file in each directory, and ensure that all source files in the directory ( & subdirectories) start with the LICENCE. You can pass --fix to automatically add the licence. Unittests --------- Unittests are *highly* encouraged. At the very least please make sure any changes don't break the tests. The tests are performed with `make check` in the root ola directory. The same command can be run within a sub directory to only run a particular set of tests (although you may experience issues with this method, running from the root ola directory is guaranteed to work). Branches, Versioning & Releases ------------------------------- Version numbers take the form MAJOR.MINOR.PATCH based on http://semver.org/. The release lifecycle is: - New feature work occurs on the master branch. - Once the new features are considered stable or enough time has passed, a new minor release branch will be created, e.g. 0.10. - The minor release branch will be stablized with bugfixes, these bug fixes will also be merged back into master. - Once declared stable, a new patch branch 0 will be created e.g. 0.10.0 - Release specific changes like the version number, debian files etc. will be pushed to the patch branch. - The release will occur. - Changes on the release branch will be merged back into the minor version branch. - Bug fixes will continue on the minor version branch, leading to another patch release. What this means for you as a developer is that depending on the scope of your change, we may request that you merge it into the minor release branch rather than master. This allows us to get your change out to end uses faster than if it was merged into master directly. C++ =============================================================================== The bulk of OLA code is written in C++. This includes the daemon olad, and plugins. https://wiki.openlighting.org/index.php/OLA_developer_info describes many of the underlying classes used. C++ 11 ------ As much as we'd like to start using C++11, Ubuntu 12.04 still comes with g++ 4.6 which has partial support. Once 12.04 is end-of-lifed, we'll consider using C++ 11 constructs. Endian Issues ------------- Be aware that OLA runs on big endian systems. When dealing with wire formats always use the functions in include/ola/network/NetworkUtils.h to convert or use the BigEndianOutputStream to manage this automatically for you. Structure Packing ----------------- Structure packing syntax differs between platforms and compilers. If you declare a struct or class that needs to be packed, use the PACK() macro from ola/base/Macro.h . See below for an example of PACK() usage. Note that this macro doesn't work for enums. See plugins/espnet/EspNetPackets.h for an example of how to pack an enum. Non x86 platforms ----------------- OLA also runs on more than just x86. Some platforms like ARM can't de-reference pointers which aren't aligned. For example: PACK(struct f { uint8_t value1; uint16_t value2; }); struct f foo = {1, 2}; uint16_t *ptr = &foo.value2; // Bug! Will not be true on all platforms. if (*ptr == 2) http://netwinder.osuosl.org/users/b/brianbr/public_html/alignment.html has a good explanation. Style / Coding Standards ------------------------ We use the Google C++ Style Guide: https://google.github.io/styleguide/cppguide.html We provide formatting configuration files for some IDEs at https://github.com/OpenLightingProject/editor-configs . If you use an IDE which isn't listed there please consider submitting the formatting configuration files. Please run the cpplint.py script on all files before requesting a review, alternatively it will be run automatically by Travis CI on pull requests. cpplint.py can be downloaded here: https://github.com/google/styleguide/tree/gh-pages/cpplint Run it with: --filter=-legal/copyright,-readability/streams,-runtime/arrays Doxygen ------- The code is documented using Doxygen. There is an automatically generated version available from: https://docs.openlighting.org/ola/doc/latest/ If you want to build it yourself, install Doxygen, run ./configure in the ola root directory, then run make doxygen-doc. The files will be generated into html/ Race Conditions --------------- If possible, code should be tested with slower machines (embedded platforms, virtual machines etc.). This has discovered race conditions in the past. Valgrind -------- All code must be tested with valgrind to ensure it doesn't leak memory. Coverage (gcov) --------------- To enable the coverage tools, you need lcov and gcov installed. To enable run ./configure --enable-gcov and then build as normal. To generate the HTML pages run: mkdir /tmp/lcov tmpdir=`mktemp -d /tmp/lcov.XXXXXX` coverage="${tmpdir}/coverage.info" lcov --capture --directory ./ --output-file $coverage genhtml $coverage --output-directory /tmp/lcov Java =============================================================================== An experimental Java API is provided. Style / Coding Standards ------------------------ Please follow the Sun Java style guide. Javascript =============================================================================== Javascript is used for the olad web UI. Instructions for building the javascript can be found in javascript/README. Closure Compiler ---------------- The closure compiler catches many errors. The javascript code should build cleanly. Style / Coding Standards ------------------------ We use the Google Javascript style guide: https://google.github.io/styleguide/javascriptguide.xml A javascript linter can be downloaded from: https://developers.google.com/closure/utilities/docs/linter_howto?csw=1 Please make sure all Javascript code is lint clean. Python =============================================================================== Python is used for tools like the RDM responder tests and the device model collector. To enable these a OLA Python API is provided. Style / Coding Standards ------------------------ We use the Google Python style guide: https://google.github.io/styleguide/pyguide.html However we deviate from the standard and use 2 space indents, so it's consistent with the C++ code. It's linted and static analysis is performed using flake8, you can either run it yourself or await the Travis CI results of your pull request. flake8 can be installed following the instructions here: https://gitlab.com/pycqa/flake8/ Run it as: flake8 It takes its config from the .flake8 file in the root of the repository. Build System =============================================================================== Autotools is a complex beast. Even after reading two books and a using it for a decade I still feel like I hardly understand it. Useful tips ----------- * Run `make distcheck` to ensure you haven't broken anything. * Use $(srcdir), $(top_srcdir) to reference files where required. This is to support VPATH builds: http://www.gnu.org/software/automake/manual/html_node/VPATH-Builds.html * Prefer manual dependencies over BUILT_SOURCES where possible, see http://www.gnu.org/software/automake/manual/html_node/Built-Sources-Example.html However this doesn't work in some cases (libraries?) because it overrides the automake generated rules. ola-0.10.9/configure0000775000175000017500000335227214376533145011237 00000000000000#! /bin/sh # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for OLA 0.10.9. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test \$(( 1 + 1 )) = 2 || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: open-lighting@googlegroups.com about your system, $0: including any error possibly output before this $0: message. Then install a modern shell, or manually run $0: the script under such a shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='OLA' PACKAGE_TARNAME='ola' PACKAGE_VERSION='0.10.9' PACKAGE_STRING='OLA 0.10.9' PACKAGE_BUGREPORT='open-lighting@googlegroups.com' PACKAGE_URL='' ac_unique_file="libola.pc.in" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS FOUND_CPPLINT_FALSE FOUND_CPPLINT_TRUE cpplint BUILD_JA_RULE_FALSE BUILD_JA_RULE_TRUE OLA_CLIENT_LIBS piddatadir www_datadir OLA_SERVER_LIBS PLUGIN_LIBS USE_USBPRO_FALSE USE_USBPRO_TRUE USE_LIBUSB_FALSE USE_LIBUSB_TRUE USE_UART_FALSE USE_UART_TRUE USE_STAGEPROFI_FALSE USE_STAGEPROFI_TRUE USE_SPI_FALSE USE_SPI_TRUE USE_SHOWNET_FALSE USE_SHOWNET_TRUE USE_SANDNET_FALSE USE_SANDNET_TRUE USE_RENARD_FALSE USE_RENARD_TRUE USE_PATHPORT_FALSE USE_PATHPORT_TRUE USE_OSC_FALSE USE_OSC_TRUE USE_OPENPIXELCONTROL_FALSE USE_OPENPIXELCONTROL_TRUE USE_OPENDMX_FALSE USE_OPENDMX_TRUE USE_MILINST_FALSE USE_MILINST_TRUE USE_KINET_FALSE USE_KINET_TRUE USE_KARATE_FALSE USE_KARATE_TRUE USE_GPIO_FALSE USE_GPIO_TRUE USE_FTDI_FALSE USE_FTDI_TRUE USE_ESPNET_FALSE USE_ESPNET_TRUE USE_E131_FALSE USE_E131_TRUE USE_DUMMY_FALSE USE_DUMMY_TRUE USE_DMX4LINUX_FALSE USE_DMX4LINUX_TRUE USE_ARTNET_FALSE USE_ARTNET_TRUE DOXYGEN_PAPER_SIZE DX_COND_latex_FALSE DX_COND_latex_TRUE DX_COND_pdf_FALSE DX_COND_pdf_TRUE DX_PDFLATEX DX_FLAG_pdf DX_COND_ps_FALSE DX_COND_ps_TRUE DX_EGREP DX_DVIPS DX_MAKEINDEX DX_LATEX DX_FLAG_ps DX_COND_html_FALSE DX_COND_html_TRUE DX_FLAG_html DX_COND_chi_FALSE DX_COND_chi_TRUE DX_FLAG_chi DX_COND_chm_FALSE DX_COND_chm_TRUE DX_HHC DX_FLAG_chm DX_COND_xml_FALSE DX_COND_xml_TRUE DX_FLAG_xml DX_COND_rtf_FALSE DX_COND_rtf_TRUE DX_FLAG_rtf DX_COND_man_FALSE DX_COND_man_TRUE DX_FLAG_man DX_COND_dot_FALSE DX_COND_dot_TRUE DX_DOT DX_FLAG_dot DX_COND_doc_FALSE DX_COND_doc_TRUE DX_PERL DX_DOXYGEN DX_FLAG_doc DX_DOCDIR DX_CONFIG DX_PROJECT DX_ENV DX_COND_verbose_FALSE DX_COND_verbose_TRUE DX_FLAG_verbose BUILD_OLA_PROTOC_PLUGIN_FALSE BUILD_OLA_PROTOC_PLUGIN_TRUE OLA_PROTOC PROTOC libprotobuf_LIBS libprotobuf_CFLAGS FOUND_FLAKE8_FALSE FOUND_FLAKE8_TRUE flake8 pkgpyexecdir pyexecdir pkgpythondir pythondir PYTHON_PLATFORM PYTHON_EXEC_PREFIX PYTHON_PREFIX PYTHON_VERSION PYTHON BUILD_PYTHON_LIBS_FALSE BUILD_PYTHON_LIBS_TRUE INSTALL_RDM_TESTS_FALSE INSTALL_RDM_TESTS_TRUE liblo_LIBS liblo_CFLAGS HAVE_LIBUSB_SET_OPTION_FALSE HAVE_LIBUSB_SET_OPTION_TRUE libusb_set_option_LIBS libusb_set_option_CFLAGS HAVE_LIBUSB_HOTPLUG_API_FALSE HAVE_LIBUSB_HOTPLUG_API_TRUE libusb_hotplug_api_LIBS libusb_hotplug_api_CFLAGS libusb_error_name_LIBS libusb_error_name_CFLAGS libusb_LIBS libusb_CFLAGS HAVE_LIBFTDI1_FALSE HAVE_LIBFTDI1_TRUE libftdi1_LIBS libftdi1_CFLAGS HAVE_LIBFTDI0_FALSE HAVE_LIBFTDI0_TRUE libftdi0_LIBS libftdi0_CFLAGS BUILD_JAVA_LIBS_FALSE BUILD_JAVA_LIBS_TRUE MAVEN JAVA_CC_OPTS GCJ_OPTS JAVA_CC_FLAGS JAVA_CC HAVE_LIBMICROHTTPD_FALSE HAVE_LIBMICROHTTPD_TRUE libmicrohttpd_LIBS libmicrohttpd_CFLAGS FATAL_WARNINGS_FALSE FATAL_WARNINGS_TRUE BUILD_EXAMPLES_FALSE BUILD_EXAMPLES_TRUE INSTALL_E133_FALSE INSTALL_E133_TRUE INSTALL_ACN_FALSE INSTALL_ACN_TRUE BUILD_TESTS_FALSE BUILD_TESTS_TRUE CPPUNIT_LIBS CPPUNIT_CFLAGS HAVE_SALEAE_LOGIC_FALSE HAVE_SALEAE_LOGIC_TRUE libSaleaeDevice_LIBS HAVE_AVAHI_FALSE HAVE_AVAHI_TRUE HAVE_DNSSD_FALSE HAVE_DNSSD_TRUE avahi_LIBS avahi_CFLAGS uuid_LIBS uuid_CFLAGS ossp_uuid_LIBS ossp_uuid_CFLAGS base_uuid_LIBS base_uuid_CFLAGS RESOLV_LIBS PTHREAD_CXXFLAGS PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CXX PTHREAD_CC acx_pthread_config HAVE_NCURSES_PKGCONFIG_FALSE HAVE_NCURSES_PKGCONFIG_TRUE libncurses_LIBS libncurses_CFLAGS HAVE_NCURSES_FALSE HAVE_NCURSES_TRUE HAVE_LIBFTD2XX_FALSE HAVE_LIBFTD2XX_TRUE HAVE_DLOPEN_FALSE HAVE_DLOPEN_TRUE LEXLIB LEX_OUTPUT_ROOT LEX BISON SUPPORTS_RDYNAMIC_FALSE SUPPORTS_RDYNAMIC_TRUE HAVE_KQUEUE_FALSE HAVE_KQUEUE_TRUE HAVE_EPOLL_FALSE HAVE_EPOLL_TRUE USING_WIN32_FALSE USING_WIN32_TRUE LT_SYS_LIBRARY_PATH OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR NM ac_ct_DUMPBIN DUMPBIN LD FGREP SED host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBTOOL OBJDUMP DLLTOOL AS LIBOBJS GNU_PLUS_PLUS_11_DEPRECATIONS_FALSE GNU_PLUS_PLUS_11_DEPRECATIONS_TRUE CPPUNIT2_LIBS CPPUNIT2_CFLAGS CPPUNIT1_LIBS CPPUNIT1_CFLAGS PROTOBUF1_LIBS PROTOBUF1_CFLAGS PKG_CONFIG EGREP GREP CXXCPP SUPPORTS_GNU_PLUS_PLUS_11_FALSE SUPPORTS_GNU_PLUS_PLUS_11_TRUE SUPPORTS_GNU_PLUS_PLUS_98_FALSE SUPPORTS_GNU_PLUS_PLUS_98_TRUE LN_S CPP am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE ac_ct_CC CFLAGS CC am__fastdepCXX_FALSE am__fastdepCXX_TRUE CXXDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CXX CPPFLAGS LDFLAGS CXXFLAGS CXX OLA_REVISION_VERSION ola_revision_version OLA_MINOR_VERSION ola_minor_version OLA_MAJOR_VERSION ola_major_version AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM ac_aux_dir target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir runstatedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_aix_soname with_gnu_ld with_sysroot enable_libtool_lock with_dns_sd enable_unittests enable_e133 enable_examples enable_fatal_warnings enable_gcov enable_http enable_java_libs enable_ja_rule enable_libftdi enable_libusb enable_uart enable_osc enable_python_libs enable_rdm_tests enable_root_check enable_tcmalloc enable_doxygen_version with_uucp_lock with_protoc with_ola_protoc_plugin enable_doxygen_verbose enable_doxygen_doc enable_doxygen_dot enable_doxygen_man enable_doxygen_rtf enable_doxygen_xml enable_doxygen_chm enable_doxygen_chi enable_doxygen_html enable_doxygen_ps enable_doxygen_pdf enable_all_plugins enable_artnet enable_dmx4linux enable_dummy enable_e131 enable_espnet enable_ftdidmx enable_gpio enable_karate enable_kinet enable_milinst enable_opendmx enable_openpixelcontrol enable_pathport enable_renard enable_sandnet enable_shownet enable_spi enable_stageprofi enable_uartdmx enable_usbdmx enable_usbpro ' ac_precious_vars='build_alias host_alias target_alias CXX CXXFLAGS LDFLAGS LIBS CPPFLAGS CCC CC CFLAGS CPP CXXCPP PKG_CONFIG PROTOBUF1_CFLAGS PROTOBUF1_LIBS CPPUNIT1_CFLAGS CPPUNIT1_LIBS CPPUNIT2_CFLAGS CPPUNIT2_LIBS LT_SYS_LIBRARY_PATH libncurses_CFLAGS libncurses_LIBS base_uuid_CFLAGS base_uuid_LIBS ossp_uuid_CFLAGS ossp_uuid_LIBS avahi_CFLAGS avahi_LIBS CPPUNIT_CFLAGS CPPUNIT_LIBS libmicrohttpd_CFLAGS libmicrohttpd_LIBS JAVA_CC JAVA_CC_FLAGS libftdi0_CFLAGS libftdi0_LIBS libftdi1_CFLAGS libftdi1_LIBS libusb_CFLAGS libusb_LIBS libusb_error_name_CFLAGS libusb_error_name_LIBS libusb_hotplug_api_CFLAGS libusb_hotplug_api_LIBS libusb_set_option_CFLAGS libusb_set_option_LIBS liblo_CFLAGS liblo_LIBS PYTHON libprotobuf_CFLAGS libprotobuf_LIBS DOXYGEN_PAPER_SIZE' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' runstatedir='${localstatedir}/run' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -runstatedir | --runstatedir | --runstatedi | --runstated \ | --runstate | --runstat | --runsta | --runst | --runs \ | --run | --ru | --r) ac_prev=runstatedir ;; -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \ | --runstate=* | --runstat=* | --runsta=* | --runst=* | --runs=* \ | --run=* | --ru=* | --r=*) runstatedir=$ac_optarg ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir runstatedir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # Omit some internal or obsolete options to make the list less imposing. # This message is too long to be a string in the A/UX 3.1 sh. cat <<_ACEOF \`configure' configures OLA 0.10.9 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --runstatedir=DIR modifiable per-process data [LOCALSTATEDIR/run] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/ola] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of OLA 0.10.9:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --disable-unittests Disable all unittests --enable-e133 Install the E1.33 library --disable-examples Disable the OLA example client programs --disable-fatal-warnings Make compiler warnings non-fatal --enable-gcov Turn on code coverage analysis tools --disable-http Disable the built in HTTP server --enable-java-libs Build the Java interface --enable-ja-rule Build the Ja Rule test tool --disable-libftdi Avoid using libftdi0 or libftdi1 even if either exists --disable-libusb Avoid using libusb even if it exists --disable-uart Avoid using native uart support even if it exists --disable-osc Disable the OSC plugin even if liblo exists --enable-python-libs Build the Python API Module --enable-rdm-tests Install the RDM responder tests, adds --enable-python-libs --disable-root-check Disable the check that prevents olad from running as root --enable-tcmalloc Use tcmalloc --disable-doxygen-version Substitute the Doxygen version with latest, for the website --enable-doxygen-verbose Verbose doxygen output --disable-doxygen-doc don't generate any doxygen documentation --disable-doxygen-dot don't generate graphics for doxygen documentation --enable-doxygen-man generate doxygen manual pages --enable-doxygen-rtf generate doxygen RTF documentation --enable-doxygen-xml generate doxygen XML documentation --enable-doxygen-chm generate doxygen compressed HTML help documentation --enable-doxygen-chi generate doxygen separate compressed HTML help index file --disable-doxygen-html don't generate doxygen plain HTML documentation --enable-doxygen-ps generate doxygen PostScript documentation --enable-doxygen-pdf generate doxygen PDF documentation --disable-all-plugins Disable all plugins, then enable the specific ones you want --disable-artnet Disable the artnet plugin --disable-dmx4linux Disable the dmx4linux plugin --disable-dummy Disable the dummy plugin --disable-e131 Disable the e131 plugin --disable-espnet Disable the espnet plugin --disable-ftdidmx Disable the ftdidmx plugin --disable-gpio Disable the gpio plugin --disable-karate Disable the karate plugin --disable-kinet Disable the kinet plugin --disable-milinst Disable the milinst plugin --disable-opendmx Disable the opendmx plugin --disable-openpixelcontrol Disable the openpixelcontrol plugin --disable-osc Disable the osc plugin --disable-pathport Disable the pathport plugin --disable-renard Disable the renard plugin --disable-sandnet Disable the sandnet plugin --disable-shownet Disable the shownet plugin --disable-spi Disable the spi plugin --disable-stageprofi Disable the stageprofi plugin --disable-uartdmx Disable the uartdmx plugin --disable-usbdmx Disable the usbdmx plugin --disable-usbpro Disable the usbpro plugin Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-aix-soname=aix|svr4|both shared library versioning (aka "SONAME") variant to provide on AIX, [default=aix]. --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --without-dns-sd disable DNS-SD support --with-uucp-lock The directory to use for UUCP lock files --with-protoc=COMMAND use the given protoc command instead of searching $PATH (useful for cross-compiling) --with-ola-protoc-plugin=COMMAND use the given ola_protoc_plugin instead of building one (useful for cross-compiling) Some influential environment variables: CXX C++ compiler command CXXFLAGS C++ compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CC C compiler command CFLAGS C compiler flags CPP C preprocessor CXXCPP C++ preprocessor PKG_CONFIG path to pkg-config utility PROTOBUF1_CFLAGS C compiler flags for PROTOBUF1, overriding pkg-config PROTOBUF1_LIBS linker flags for PROTOBUF1, overriding pkg-config CPPUNIT1_CFLAGS C compiler flags for CPPUNIT1, overriding pkg-config CPPUNIT1_LIBS linker flags for CPPUNIT1, overriding pkg-config CPPUNIT2_CFLAGS C compiler flags for CPPUNIT2, overriding pkg-config CPPUNIT2_LIBS linker flags for CPPUNIT2, overriding pkg-config LT_SYS_LIBRARY_PATH User-defined run-time library search path. libncurses_CFLAGS C compiler flags for libncurses, overriding pkg-config libncurses_LIBS linker flags for libncurses, overriding pkg-config base_uuid_CFLAGS C compiler flags for base_uuid, overriding pkg-config base_uuid_LIBS linker flags for base_uuid, overriding pkg-config ossp_uuid_CFLAGS C compiler flags for ossp_uuid, overriding pkg-config ossp_uuid_LIBS linker flags for ossp_uuid, overriding pkg-config avahi_CFLAGS C compiler flags for avahi, overriding pkg-config avahi_LIBS linker flags for avahi, overriding pkg-config CPPUNIT_CFLAGS C compiler flags for CPPUNIT, overriding pkg-config CPPUNIT_LIBS linker flags for CPPUNIT, overriding pkg-config libmicrohttpd_CFLAGS C compiler flags for libmicrohttpd, overriding pkg-config libmicrohttpd_LIBS linker flags for libmicrohttpd, overriding pkg-config JAVA_CC java compiler command JAVA_CC_FLAGS java compiler flags libftdi0_CFLAGS C compiler flags for libftdi0, overriding pkg-config libftdi0_LIBS linker flags for libftdi0, overriding pkg-config libftdi1_CFLAGS C compiler flags for libftdi1, overriding pkg-config libftdi1_LIBS linker flags for libftdi1, overriding pkg-config libusb_CFLAGS C compiler flags for libusb, overriding pkg-config libusb_LIBS linker flags for libusb, overriding pkg-config libusb_error_name_CFLAGS C compiler flags for libusb_error_name, overriding pkg-config libusb_error_name_LIBS linker flags for libusb_error_name, overriding pkg-config libusb_hotplug_api_CFLAGS C compiler flags for libusb_hotplug_api, overriding pkg-config libusb_hotplug_api_LIBS linker flags for libusb_hotplug_api, overriding pkg-config libusb_set_option_CFLAGS C compiler flags for libusb_set_option, overriding pkg-config libusb_set_option_LIBS linker flags for libusb_set_option, overriding pkg-config liblo_CFLAGS C compiler flags for liblo, overriding pkg-config liblo_LIBS linker flags for liblo, overriding pkg-config PYTHON the Python interpreter libprotobuf_CFLAGS C compiler flags for libprotobuf, overriding pkg-config libprotobuf_LIBS linker flags for libprotobuf, overriding pkg-config DOXYGEN_PAPER_SIZE a4wide (default), a4, letter, legal or executive Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF OLA configure 0.10.9 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_cxx_try_compile LINENO # ---------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_compile # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_cxx_try_cpp LINENO # ------------------------ # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_cpp # ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_cxx_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## --------------------------------------------- ## ## Report this to open-lighting@googlegroups.com ## ## --------------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_mongrel # ac_fn_cxx_try_run LINENO # ------------------------ # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_cxx_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_run # ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES # --------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_cxx_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_header_compile # ac_fn_cxx_try_link LINENO # ------------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_cxx_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_cxx_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_cxx_try_link # ac_fn_cxx_check_type LINENO TYPE VAR INCLUDES # --------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_cxx_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_type # ac_fn_c_find_intX_t LINENO BITS VAR # ----------------------------------- # Finds a signed integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_intX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for int$2_t" >&5 $as_echo_n "checking for int$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in int$2_t 'int' 'long int' \ 'long long int' 'short int' 'signed char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(0 < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default enum { N = $2 / 2 - 1 }; int main () { static int test_array [1 - 2 * !(($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 1) < ($ac_type) ((((($ac_type) 1 << N) << N) - 1) * 2 + 2))]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else case $ac_type in #( int$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_intX_t # ac_fn_c_find_uintX_t LINENO BITS VAR # ------------------------------------ # Finds an unsigned integer type with width BITS, setting cache variable VAR # accordingly. ac_fn_c_find_uintX_t () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uint$2_t" >&5 $as_echo_n "checking for uint$2_t... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" # Order is important - never check a type that is potentially smaller # than half of the expected target width. for ac_type in uint$2_t 'unsigned int' 'unsigned long int' \ 'unsigned long long int' 'unsigned short int' 'unsigned char'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { static int test_array [1 - 2 * !((($ac_type) -1 >> ($2 / 2 - 1)) >> ($2 / 2 - 1) == 3)]; test_array [0] = 0; return test_array [0]; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : case $ac_type in #( uint$2_t) : eval "$3=yes" ;; #( *) : eval "$3=\$ac_type" ;; esac fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if eval test \"x\$"$3"\" = x"no"; then : else break fi done fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_find_uintX_t # ac_fn_cxx_check_func LINENO FUNC VAR # ------------------------------------ # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_cxx_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_func # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_cxx_check_member LINENO AGGR MEMBER VAR INCLUDES # ------------------------------------------------------ # Tries to find if the field MEMBER exists in type AGGR, after including # INCLUDES, setting cache variable VAR accordingly. ac_fn_cxx_check_member () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2.$3" >&5 $as_echo_n "checking for $2.$3... " >&6; } if eval \${$4+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$4=yes" else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $5 int main () { static $2 ac_aggr; if (sizeof ac_aggr.$3) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$4=yes" else eval "$4=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$4 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_member # ac_fn_cxx_check_decl LINENO SYMBOL VAR INCLUDES # ----------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_cxx_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_cxx_check_decl cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by OLA $as_me 0.10.9, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. ac_config_headers="$ac_config_headers config.h" # Make us require Automake 1.11.1 am__api_version='1.15' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # Expand $ac_aux_dir to an absolute path. am_aux_dir=`cd "$ac_aux_dir" && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh+set}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='ola' VERSION='0.10.9' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target (and possibly the TAP driver). The # system "awk" is bad on some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar pax cpio none' am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -' # POSIX will say in a future version that running "rm -f" with no argument # is OK; and we want to be able to make that assumption in our Makefile # recipes. So use an aggressive probe to check that the usage we want is # actually supported "in the wild" to an acceptable degree. # See automake bug#10828. # To make any issue more visible, cause the running configure to be aborted # by default if the 'rm' program in use doesn't match our expectations; the # user can still override this though. if rm -f && rm -fr && rm -rf; then : OK; else cat >&2 <<'END' Oops! Your 'rm' program seems unable to run without file operands specified on the command line, even when the '-f' option is present. This is contrary to the behaviour of most rm programs out there, and not conforming with the upcoming POSIX standard: Please tell bug-automake@gnu.org about your system, including the value of your $PATH and any error possibly output before this message. This can help us improve future automake versions. END if test x"$ACCEPT_INFERIOR_RM_PROGRAM" = x"yes"; then echo 'Configuration will proceed anyway, since you have set the' >&2 echo 'ACCEPT_INFERIOR_RM_PROGRAM variable to "yes"' >&2 echo >&2 else cat >&2 <<'END' Aborting the configuration process, to ensure you take notice of the issue. You can download and install GNU coreutils to get an 'rm' implementation that behaves properly: . If you want to complete the configuration process using your problematic 'rm' anyway, export the environment variable ACCEPT_INFERIOR_RM_PROGRAM to "yes", and re-run configure. END as_fn_error $? "Your 'rm' program is bad, sorry." "$LINENO" 5 fi fi # OLA version variables OLA_MAJOR_VERSION=0 OLA_MINOR_VERSION=10 OLA_REVISION_VERSION=9 # Checks for programs. ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu if test -z "$CXX"; then if test -n "$CCC"; then CXX=$CCC else if test -n "$ac_tool_prefix"; then for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CXX"; then ac_cv_prog_CXX="$CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CXX="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CXX=$ac_cv_prog_CXX if test -n "$CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5 $as_echo "$CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CXX" && break done fi if test -z "$CXX"; then ac_ct_CXX=$CXX for ac_prog in g++ c++ gpp aCC CC cxx cc++ cl.exe FCC KCC RCC xlC_r xlC do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CXX"; then ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CXX=$ac_cv_prog_ac_ct_CXX if test -n "$ac_ct_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5 $as_echo "$ac_ct_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CXX" && break done if test "x$ac_ct_CXX" = x; then CXX="g++" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CXX=$ac_ct_CXX fi fi fi fi # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C++ compiler works" >&5 $as_echo_n "checking whether the C++ compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C++ compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler default output file name" >&5 $as_echo_n "checking for C++ compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C++ compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5 $as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; } if ${ac_cv_cxx_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_cxx_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5 $as_echo "$ac_cv_cxx_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GXX=yes else GXX= fi ac_test_CXXFLAGS=${CXXFLAGS+set} ac_save_CXXFLAGS=$CXXFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5 $as_echo_n "checking whether $CXX accepts -g... " >&6; } if ${ac_cv_prog_cxx_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_cxx_werror_flag=$ac_cxx_werror_flag ac_cxx_werror_flag=yes ac_cv_prog_cxx_g=no CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes else CXXFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : else ac_cxx_werror_flag=$ac_save_cxx_werror_flag CXXFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_prog_cxx_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cxx_werror_flag=$ac_save_cxx_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5 $as_echo "$ac_cv_prog_cxx_g" >&6; } if test "$ac_test_CXXFLAGS" = set; then CXXFLAGS=$ac_save_CXXFLAGS elif test $ac_cv_prog_cxx_g = yes; then if test "$GXX" = yes; then CXXFLAGS="-g -O2" else CXXFLAGS="-g" fi else if test "$GXX" = yes; then CXXFLAGS="-O2" else CXXFLAGS= fi fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CXX" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CXX_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CXX_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CXX_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CXX_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CXX_dependencies_compiler_type" >&5 $as_echo "$am_cv_CXX_dependencies_compiler_type" >&6; } CXXDEPMODE=depmode=$am_cv_CXX_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CXX_dependencies_compiler_type" = gcc3; then am__fastdepCXX_TRUE= am__fastdepCXX_FALSE='#' else am__fastdepCXX_TRUE='#' am__fastdepCXX_FALSE= fi for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC understands -c and -o together" >&5 $as_echo_n "checking whether $CC understands -c and -o together... " >&6; } if ${am_cv_prog_cc_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # Following AC_PROG_CC_C_O, we do the test twice because some # compilers refuse to overwrite an existing .o file with -o, # though they will create one. am_cv_prog_cc_c_o=yes for am_i in 1 2; do if { echo "$as_me:$LINENO: $CC -c conftest.$ac_ext -o conftest2.$ac_objext" >&5 ($CC -c conftest.$ac_ext -o conftest2.$ac_objext) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } \ && test -f conftest2.$ac_objext; then : OK else am_cv_prog_cc_c_o=no break fi done rm -f core conftest* unset am_i fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_cc_c_o" >&5 $as_echo "$am_cv_prog_cc_c_o" >&6; } if test "$am_cv_prog_cc_c_o" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi # check if the compiler supports -std=gnu++98 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -std=gnu++98 support" >&5 $as_echo_n "checking for -std=gnu++98 support... " >&6; } old_cxxflags=$CXXFLAGS CXXFLAGS="${CXXFLAGS} -std=gnu++98 -Wall -Werror" if ${ac_cv_gnu_plus_plus_98+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_gnu_plus_plus_98=yes else ac_cv_gnu_plus_plus_98=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CXXFLAGS=$old_cxxflags { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_plus_plus_98" >&5 $as_echo "$ac_cv_gnu_plus_plus_98" >&6; } if test "x$ac_cv_gnu_plus_plus_98" = xyes; then SUPPORTS_GNU_PLUS_PLUS_98_TRUE= SUPPORTS_GNU_PLUS_PLUS_98_FALSE='#' else SUPPORTS_GNU_PLUS_PLUS_98_TRUE='#' SUPPORTS_GNU_PLUS_PLUS_98_FALSE= fi # check if the compiler supports -std=gnu++11 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -std=gnu++11 support" >&5 $as_echo_n "checking for -std=gnu++11 support... " >&6; } old_cxxflags=$CXXFLAGS CXXFLAGS="${CXXFLAGS} -std=gnu++11 -Wall -Werror" if ${ac_cv_gnu_plus_plus_11+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_gnu_plus_plus_11=yes else ac_cv_gnu_plus_plus_11=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CXXFLAGS=$old_cxxflags { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_gnu_plus_plus_11" >&5 $as_echo "$ac_cv_gnu_plus_plus_11" >&6; } if test "x$ac_cv_gnu_plus_plus_11" = xyes; then SUPPORTS_GNU_PLUS_PLUS_11_TRUE= SUPPORTS_GNU_PLUS_PLUS_11_FALSE='#' else SUPPORTS_GNU_PLUS_PLUS_11_TRUE='#' SUPPORTS_GNU_PLUS_PLUS_11_FALSE= fi # This checks whether random needs gnu++11 or not, it doesn't set HAVE_RANDOM # (as it's using AC_CHECK_HEADER not HEADERS), we do that later as normal # We don't pass the compiler flag to the preprocessor (CPPFLAGS) because that # variable is used by the C preprocessor too, and some of the pthread checks # test for C code, which complains it doesn't understand gnu++. We may # therefore generate some warnings in configure, but it should all work! ac_cv_header_random_98="no" ac_cv_header_random_11="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for random gnu++98 compatibility" >&5 $as_echo "$as_me: checking for random gnu++98 compatibility" >&6;} old_cxxflags=$CXXFLAGS CXXFLAGS="${CXXFLAGS} -std=gnu++98 -Wall -Werror" # Manually purge the cache { ac_cv_header_random=; unset ac_cv_header_random;} ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done ac_fn_cxx_check_header_mongrel "$LINENO" "random" "ac_cv_header_random" "$ac_includes_default" if test "x$ac_cv_header_random" = xyes; then : ac_cv_header_random_98="yes" else ac_cv_header_random_98="no" fi # Manually purge the cache { ac_cv_header_random=; unset ac_cv_header_random;} CXXFLAGS=$old_cxxflags if test "x$ac_cv_gnu_plus_plus_11" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for random gnu++11 compatibility" >&5 $as_echo "$as_me: checking for random gnu++11 compatibility" >&6;} old_cxxflags=$CXXFLAGS CXXFLAGS="${CXXFLAGS} -std=gnu++11 -Wall -Werror" # Manually purge the cache { ac_cv_header_random=; unset ac_cv_header_random;} ac_fn_cxx_check_header_mongrel "$LINENO" "random" "ac_cv_header_random" "$ac_includes_default" if test "x$ac_cv_header_random" = xyes; then : ac_cv_header_random_11=yes else ac_cv_header_random_11=no fi # Manually purge the cache { ac_cv_header_random=; unset ac_cv_header_random;} CXXFLAGS=$old_cxxflags fi # force us into gnu++98 mode if necessary # If gnu++11 and gnu++98 then # If random works with gnu++98 # If protobuf < 3.6 # If no unit tests, force to gnu++98 # Else we have unit tests # If cppunit < 1.14.0, force to gnu++98 # Else turn off deprecation messages for std::auto_ptr and run gnu++11 # Else assume we have protobuf >= 3.6 (later checks will confirm that for certain), turn off deprecation messages for std::auto_ptr and run gnu++11 # Else turn off deprecation messages for std::auto_ptr and run gnu++11 require_gnu_plus_plus_11="no" if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi if test "x$ac_cv_gnu_plus_plus_11" = xyes; then : if test "x$ac_cv_gnu_plus_plus_98" = xyes; then : if test "x$ac_cv_header_random_98" = xyes; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PROTOBUF1" >&5 $as_echo_n "checking for PROTOBUF1... " >&6; } if test -n "$PROTOBUF1_CFLAGS"; then pkg_cv_PROTOBUF1_CFLAGS="$PROTOBUF1_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"protobuf < 3.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "protobuf < 3.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PROTOBUF1_CFLAGS=`$PKG_CONFIG --cflags "protobuf < 3.6" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$PROTOBUF1_LIBS"; then pkg_cv_PROTOBUF1_LIBS="$PROTOBUF1_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"protobuf < 3.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "protobuf < 3.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_PROTOBUF1_LIBS=`$PKG_CONFIG --libs "protobuf < 3.6" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then PROTOBUF1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "protobuf < 3.6" 2>&1` else PROTOBUF1_PKG_ERRORS=`$PKG_CONFIG --print-errors "protobuf < 3.6" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$PROTOBUF1_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } require_gnu_plus_plus_11="yes" elif test $pkg_failed = untried; then require_gnu_plus_plus_11="yes" else PROTOBUF1_CFLAGS=$pkg_cv_PROTOBUF1_CFLAGS PROTOBUF1_LIBS=$pkg_cv_PROTOBUF1_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } if test "x$enable_unittests" = xno; then : CXXFLAGS="$CXXFLAGS -std=gnu++98" else pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPPUNIT1" >&5 $as_echo_n "checking for CPPUNIT1... " >&6; } if test -n "$CPPUNIT1_CFLAGS"; then pkg_cv_CPPUNIT1_CFLAGS="$CPPUNIT1_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit < 1.14.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "cppunit < 1.14.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CPPUNIT1_CFLAGS=`$PKG_CONFIG --cflags "cppunit < 1.14.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CPPUNIT1_LIBS"; then pkg_cv_CPPUNIT1_LIBS="$CPPUNIT1_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit < 1.14.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "cppunit < 1.14.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CPPUNIT1_LIBS=`$PKG_CONFIG --libs "cppunit < 1.14.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CPPUNIT1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "cppunit < 1.14.0" 2>&1` else CPPUNIT1_PKG_ERRORS=`$PKG_CONFIG --print-errors "cppunit < 1.14.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CPPUNIT1_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPPUNIT2" >&5 $as_echo_n "checking for CPPUNIT2... " >&6; } if test -n "$CPPUNIT2_CFLAGS"; then pkg_cv_CPPUNIT2_CFLAGS="$CPPUNIT2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.14.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "cppunit >= 1.14.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CPPUNIT2_CFLAGS=`$PKG_CONFIG --cflags "cppunit >= 1.14.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CPPUNIT2_LIBS"; then pkg_cv_CPPUNIT2_LIBS="$CPPUNIT2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.14.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "cppunit >= 1.14.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CPPUNIT2_LIBS=`$PKG_CONFIG --libs "cppunit >= 1.14.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CPPUNIT2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "cppunit >= 1.14.0" 2>&1` else CPPUNIT2_PKG_ERRORS=`$PKG_CONFIG --print-errors "cppunit >= 1.14.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CPPUNIT2_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OLA requires std::auto_ptr support." >&5 $as_echo "$as_me: WARNING: OLA requires std::auto_ptr support." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OLA requires std::auto_ptr support." >&5 $as_echo "$as_me: WARNING: OLA requires std::auto_ptr support." >&2;} else CPPUNIT2_CFLAGS=$pkg_cv_CPPUNIT2_CFLAGS CPPUNIT2_LIBS=$pkg_cv_CPPUNIT2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } require_gnu_plus_plus_11="yes" fi elif test $pkg_failed = untried; then pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPPUNIT2" >&5 $as_echo_n "checking for CPPUNIT2... " >&6; } if test -n "$CPPUNIT2_CFLAGS"; then pkg_cv_CPPUNIT2_CFLAGS="$CPPUNIT2_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.14.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "cppunit >= 1.14.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CPPUNIT2_CFLAGS=`$PKG_CONFIG --cflags "cppunit >= 1.14.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CPPUNIT2_LIBS"; then pkg_cv_CPPUNIT2_LIBS="$CPPUNIT2_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.14.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "cppunit >= 1.14.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CPPUNIT2_LIBS=`$PKG_CONFIG --libs "cppunit >= 1.14.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CPPUNIT2_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "cppunit >= 1.14.0" 2>&1` else CPPUNIT2_PKG_ERRORS=`$PKG_CONFIG --print-errors "cppunit >= 1.14.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CPPUNIT2_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OLA requires std::auto_ptr support." >&5 $as_echo "$as_me: WARNING: OLA requires std::auto_ptr support." >&2;} elif test $pkg_failed = untried; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: OLA requires std::auto_ptr support." >&5 $as_echo "$as_me: WARNING: OLA requires std::auto_ptr support." >&2;} else CPPUNIT2_CFLAGS=$pkg_cv_CPPUNIT2_CFLAGS CPPUNIT2_LIBS=$pkg_cv_CPPUNIT2_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } require_gnu_plus_plus_11="yes" fi else CPPUNIT1_CFLAGS=$pkg_cv_CPPUNIT1_CFLAGS CPPUNIT1_LIBS=$pkg_cv_CPPUNIT1_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } CXXFLAGS="$CXXFLAGS -std=gnu++98" fi fi fi else require_gnu_plus_plus_11="yes" fi fi fi if test "x$require_gnu_plus_plus_11" = xyes; then : CXXFLAGS="$CXXFLAGS -std=gnu++11" fi if test "x$require_gnu_plus_plus_11" = xyes; then GNU_PLUS_PLUS_11_DEPRECATIONS_TRUE= GNU_PLUS_PLUS_11_DEPRECATIONS_FALSE='#' else GNU_PLUS_PLUS_11_DEPRECATIONS_TRUE='#' GNU_PLUS_PLUS_11_DEPRECATIONS_FALSE= fi # Checks for header files. ac_header_dirent=no for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do as_ac_Header=`$as_echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_hdr that defines DIR" >&5 $as_echo_n "checking for $ac_hdr that defines DIR... " >&6; } if eval \${$as_ac_Header+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include <$ac_hdr> int main () { if ((DIR *) 0) return 0; ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : eval "$as_ac_Header=yes" else eval "$as_ac_Header=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$as_ac_Header { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_hdr" | $as_tr_cpp` 1 _ACEOF ac_header_dirent=$ac_hdr; break fi done # Two versions of opendir et al. are in -ldir and -lx on SCO Xenix. if test $ac_header_dirent = dirent.h; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' dir; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing opendir" >&5 $as_echo_n "checking for library containing opendir... " >&6; } if ${ac_cv_search_opendir+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char opendir (); int main () { return opendir (); ; return 0; } _ACEOF for ac_lib in '' x; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_opendir=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_opendir+:} false; then : break fi done if ${ac_cv_search_opendir+:} false; then : else ac_cv_search_opendir=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_opendir" >&5 $as_echo "$ac_cv_search_opendir" >&6; } ac_res=$ac_cv_search_opendir if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi fi for ac_header in sys/types.h netinet/in.h arpa/nameser.h netdb.h resolv.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_NETINET_IN_H # include /* inet_ functions / structs */ #endif #ifdef HAVE_ARPA_NAMESER_H # include /* DNS HEADER struct */ #endif #ifdef HAVE_NETDB_H # include #endif " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # Required headers (we cannot work without these) for ac_header in errno.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "errno.h" "ac_cv_header_errno_h" "$ac_includes_default" if test "x$ac_cv_header_errno_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ERRNO_H 1 _ACEOF else as_fn_error $? "Missing a required header" "$LINENO" 5 fi done # Other headers (we can work without these, but may need to modify things slightly) for ac_header in arpa/inet.h bits/sockaddr.h fcntl.h float.h limits.h \ malloc.h netinet/in.h stdint.h stdlib.h string.h strings.h \ sys/file.h sys/ioctl.h sys/socket.h sys/time.h sys/timeb.h \ syslog.h termios.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in asm/termbits.h asm/termios.h assert.h dlfcn.h endian.h \ execinfo.h linux/if_packet.h math.h net/ethernet.h \ stropts.h sys/ioctl.h sys/param.h sys/types.h sys/uio.h \ sysexits.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in winsock2.h winerror.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in random do : ac_fn_cxx_check_header_mongrel "$LINENO" "random" "ac_cv_header_random" "$ac_includes_default" if test "x$ac_cv_header_random" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_RANDOM 1 _ACEOF fi done # This needs stuff in sys/param.h on OpenBSD for ac_header in sys/sysctl.h do : ac_fn_cxx_check_header_compile "$LINENO" "sys/sysctl.h" "ac_cv_header_sys_sysctl_h" "#ifdef HAVE_SYS_PARAM_H #include #endif " if test "x$ac_cv_header_sys_sysctl_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_SYSCTL_H 1 _ACEOF fi done # These all need stuff in sys/types.h and sys/socket.h on FreeBSD/OpenBSD # OpenBSD is fussy about the ordering for ac_header in net/if.h net/if_arp.h net/route.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # This needs stuff in net/if.h on NetBSD for ac_header in net/if_ether.h do : ac_fn_cxx_check_header_compile "$LINENO" "net/if_ether.h" "ac_cv_header_net_if_ether_h" "#ifdef HAVE_NET_IF_H #include #endif " if test "x$ac_cv_header_net_if_ether_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NET_IF_ETHER_H 1 _ACEOF fi done # This needs stuff in lots of headers on OpenBSD for ac_header in netinet/if_ether.h do : ac_fn_cxx_check_header_compile "$LINENO" "netinet/if_ether.h" "ac_cv_header_netinet_if_ether_h" "#ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NET_IF_H #include #endif #ifdef HAVE_NET_IF_ARP_H #include #endif #ifdef HAVE_ARPA_INET_H #include #endif " if test "x$ac_cv_header_netinet_if_ether_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_NETINET_IF_ETHER_H 1 _ACEOF fi done # These both need sa_family_t from bits/sockaddr.h for ac_header in linux/netlink.h linux/rtnetlink.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "#ifdef HAVE_BITS_SOCKADDR_H #include #endif " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Checks for typedefs, structures, and compiler characteristics. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for stdbool.h that conforms to C99" >&5 $as_echo_n "checking for stdbool.h that conforms to C99... " >&6; } if ${ac_cv_header_stdbool_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifndef bool "error: bool is not defined" #endif #ifndef false "error: false is not defined" #endif #if false "error: false is not 0" #endif #ifndef true "error: true is not defined" #endif #if true != 1 "error: true is not 1" #endif #ifndef __bool_true_false_are_defined "error: __bool_true_false_are_defined is not defined" #endif struct s { _Bool s: 1; _Bool t; } s; char a[true == 1 ? 1 : -1]; char b[false == 0 ? 1 : -1]; char c[__bool_true_false_are_defined == 1 ? 1 : -1]; char d[(bool) 0.5 == true ? 1 : -1]; /* See body of main program for 'e'. */ char f[(_Bool) 0.0 == false ? 1 : -1]; char g[true]; char h[sizeof (_Bool)]; char i[sizeof s.t]; enum { j = false, k = true, l = false * true, m = true * 256 }; /* The following fails for HP aC++/ANSI C B3910B A.05.55 [Dec 04 2003]. */ _Bool n[m]; char o[sizeof n == m * sizeof n[0] ? 1 : -1]; char p[-1 - (_Bool) 0 < 0 && -1 - (bool) 0 < 0 ? 1 : -1]; /* Catch a bug in an HP-UX C compiler. See http://gcc.gnu.org/ml/gcc-patches/2003-12/msg02303.html http://lists.gnu.org/archive/html/bug-coreutils/2005-11/msg00161.html */ _Bool q = true; _Bool *pq = &q; int main () { bool e = &s; *pq |= q; *pq |= ! q; /* Refer to every declared value, to avoid compiler optimizations. */ return (!a + !b + !c + !d + !e + !f + !g + !h + !i + !!j + !k + !!l + !m + !n + !o + !p + !q + !pq); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_header_stdbool_h=yes else ac_cv_header_stdbool_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdbool_h" >&5 $as_echo "$ac_cv_header_stdbool_h" >&6; } ac_fn_cxx_check_type "$LINENO" "_Bool" "ac_cv_type__Bool" "$ac_includes_default" if test "x$ac_cv_type__Bool" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE__BOOL 1 _ACEOF fi if test $ac_cv_header_stdbool_h = yes; then $as_echo "#define HAVE_STDBOOL_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uid_t in sys/types.h" >&5 $as_echo_n "checking for uid_t in sys/types.h... " >&6; } if ${ac_cv_type_uid_t+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "uid_t" >/dev/null 2>&1; then : ac_cv_type_uid_t=yes else ac_cv_type_uid_t=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_type_uid_t" >&5 $as_echo "$ac_cv_type_uid_t" >&6; } if test $ac_cv_type_uid_t = no; then $as_echo "#define uid_t int" >>confdefs.h $as_echo "#define gid_t int" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "16" "ac_cv_c_int16_t" case $ac_cv_c_int16_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int16_t $ac_cv_c_int16_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "32" "ac_cv_c_int32_t" case $ac_cv_c_int32_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int32_t $ac_cv_c_int32_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "64" "ac_cv_c_int64_t" case $ac_cv_c_int64_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int64_t $ac_cv_c_int64_t _ACEOF ;; esac ac_fn_c_find_intX_t "$LINENO" "8" "ac_cv_c_int8_t" case $ac_cv_c_int8_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define int8_t $ac_cv_c_int8_t _ACEOF ;; esac ac_fn_cxx_check_type "$LINENO" "pid_t" "ac_cv_type_pid_t" "$ac_includes_default" if test "x$ac_cv_type_pid_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define pid_t int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C/C++ restrict keyword" >&5 $as_echo_n "checking for C/C++ restrict keyword... " >&6; } if ${ac_cv_c_restrict+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_restrict=no # The order here caters to the fact that C++ does not require restrict. for ac_kw in __restrict __restrict__ _Restrict restrict; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ typedef int * int_ptr; int foo (int_ptr $ac_kw ip) { return ip[0]; } int main () { int s[1]; int * $ac_kw t = s; t[0] = 0; return foo(t) ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_c_restrict=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_restrict" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_restrict" >&5 $as_echo "$ac_cv_c_restrict" >&6; } case $ac_cv_c_restrict in restrict) ;; no) $as_echo "#define restrict /**/" >>confdefs.h ;; *) cat >>confdefs.h <<_ACEOF #define restrict $ac_cv_c_restrict _ACEOF ;; esac ac_fn_cxx_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi ac_fn_cxx_check_type "$LINENO" "ssize_t" "ac_cv_type_ssize_t" "$ac_includes_default" if test "x$ac_cv_type_ssize_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define ssize_t int _ACEOF fi ac_fn_c_find_uintX_t "$LINENO" "16" "ac_cv_c_uint16_t" case $ac_cv_c_uint16_t in #( no|yes) ;; #( *) cat >>confdefs.h <<_ACEOF #define uint16_t $ac_cv_c_uint16_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "32" "ac_cv_c_uint32_t" case $ac_cv_c_uint32_t in #( no|yes) ;; #( *) $as_echo "#define _UINT32_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint32_t $ac_cv_c_uint32_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "64" "ac_cv_c_uint64_t" case $ac_cv_c_uint64_t in #( no|yes) ;; #( *) $as_echo "#define _UINT64_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint64_t $ac_cv_c_uint64_t _ACEOF ;; esac ac_fn_c_find_uintX_t "$LINENO" "8" "ac_cv_c_uint8_t" case $ac_cv_c_uint8_t in #( no|yes) ;; #( *) $as_echo "#define _UINT8_T 1" >>confdefs.h cat >>confdefs.h <<_ACEOF #define uint8_t $ac_cv_c_uint8_t _ACEOF ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking the location of hash_map" >&5 $as_echo_n "checking the location of hash_map... " >&6; } ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_cv_cxx_hash_map="" # First try unordered_map, but not on gcc's before 4.2 -- I've # seen unexplainable unordered_map bugs with -O2 on older gcc's. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)) # error GCC too old for unordered_map #endif int main () { /* no program body necessary */ ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : stl_hash_old_gcc=no else stl_hash_old_gcc=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext for location in unordered_map tr1/unordered_map; do for namespace in std std::tr1; do if test -z "$ac_cv_cxx_hash_map" -a "$stl_hash_old_gcc" != yes; then # Some older gcc's have a buggy tr1, so test a bit of code. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$location> int main () { const ${namespace}::unordered_map t; return t.find(5) == t.end(); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_hash_map="<$location>"; ac_cv_cxx_hash_namespace="$namespace"; ac_cv_cxx_hash_map_class="unordered_map"; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi done done # Now try hash_map for location in ext/hash_map hash_map; do for namespace in __gnu_cxx "" std stdext; do if test -z "$ac_cv_cxx_hash_map"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$location> int main () { ${namespace}::hash_map t ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_cxx_hash_map="<$location>"; ac_cv_cxx_hash_namespace="$namespace"; ac_cv_cxx_hash_map_class="hash_map"; fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi done done ac_cv_cxx_hash_set=`echo "$ac_cv_cxx_hash_map" | sed s/map/set/`; ac_cv_cxx_hash_set_class=`echo "$ac_cv_cxx_hash_map_class" | sed s/map/set/`; if test -n "$ac_cv_cxx_hash_map"; then $as_echo "#define HAVE_HASH_MAP 1" >>confdefs.h $as_echo "#define HAVE_HASH_SET 1" >>confdefs.h if test "$ac_cv_cxx_hash_map_class" = "unordered_map"; then $as_echo "#define HAVE_UNORDERED_MAP 1" >>confdefs.h fi cat >>confdefs.h <<_ACEOF #define HASH_MAP_H $ac_cv_cxx_hash_map _ACEOF cat >>confdefs.h <<_ACEOF #define HASH_SET_H $ac_cv_cxx_hash_set _ACEOF cat >>confdefs.h <<_ACEOF #define HASH_NAMESPACE $ac_cv_cxx_hash_namespace _ACEOF cat >>confdefs.h <<_ACEOF #define HASH_MAP_CLASS $ac_cv_cxx_hash_map_class _ACEOF cat >>confdefs.h <<_ACEOF #define HASH_SET_CLASS $ac_cv_cxx_hash_set_class _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_hash_map" >&5 $as_echo "$ac_cv_cxx_hash_map" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: " >&5 $as_echo "" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: could not find an STL hash_map" >&5 $as_echo "$as_me: WARNING: could not find an STL hash_map" >&2;} fi # hash_map # Checks for library functions. for ac_header in vfork.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "vfork.h" "ac_cv_header_vfork_h" "$ac_includes_default" if test "x$ac_cv_header_vfork_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VFORK_H 1 _ACEOF fi done for ac_func in fork vfork do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done if test "x$ac_cv_func_fork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working fork" >&5 $as_echo_n "checking for working fork... " >&6; } if ${ac_cv_func_fork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_fork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* By Ruediger Kuhlmann. */ return fork () < 0; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_fork_works=yes else ac_cv_func_fork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_fork_works" >&5 $as_echo "$ac_cv_func_fork_works" >&6; } else ac_cv_func_fork_works=$ac_cv_func_fork fi if test "x$ac_cv_func_fork_works" = xcross; then case $host in *-*-amigaos* | *-*-msdosdjgpp*) # Override, as these systems have only a dummy fork() stub ac_cv_func_fork_works=no ;; *) ac_cv_func_fork_works=yes ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_fork_works guessed because of cross compilation" >&2;} fi ac_cv_func_vfork_works=$ac_cv_func_vfork if test "x$ac_cv_func_vfork" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working vfork" >&5 $as_echo_n "checking for working vfork... " >&6; } if ${ac_cv_func_vfork_works+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_vfork_works=cross else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Thanks to Paul Eggert for this test. */ $ac_includes_default #include #ifdef HAVE_VFORK_H # include #endif /* On some sparc systems, changes by the child to local and incoming argument registers are propagated back to the parent. The compiler is told about this with #include , but some compilers (e.g. gcc -O) don't grok . Test for this by using a static variable whose address is put into a register that is clobbered by the vfork. */ static void #ifdef __cplusplus sparc_address_test (int arg) # else sparc_address_test (arg) int arg; #endif { static pid_t child; if (!child) { child = vfork (); if (child < 0) { perror ("vfork"); _exit(2); } if (!child) { arg = getpid(); write(-1, "", 0); _exit (arg); } } } int main () { pid_t parent = getpid (); pid_t child; sparc_address_test (0); child = vfork (); if (child == 0) { /* Here is another test for sparc vfork register problems. This test uses lots of local variables, at least as many local variables as main has allocated so far including compiler temporaries. 4 locals are enough for gcc 1.40.3 on a Solaris 4.1.3 sparc, but we use 8 to be safe. A buggy compiler should reuse the register of parent for one of the local variables, since it will think that parent can't possibly be used any more in this routine. Assigning to the local variable will thus munge parent in the parent process. */ pid_t p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(), p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid(); /* Convince the compiler that p..p7 are live; otherwise, it might use the same hardware register for all 8 local variables. */ if (p != p1 || p != p2 || p != p3 || p != p4 || p != p5 || p != p6 || p != p7) _exit(1); /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent from child file descriptors. If the child closes a descriptor before it execs or exits, this munges the parent's descriptor as well. Test for this by closing stdout in the child. */ _exit(close(fileno(stdout)) != 0); } else { int status; struct stat st; while (wait(&status) != child) ; return ( /* Was there some problem with vforking? */ child < 0 /* Did the child fail? (This shouldn't happen.) */ || status /* Did the vfork/compiler bug occur? */ || parent != getpid() /* Did the file descriptor bug occur? */ || fstat(fileno(stdout), &st) != 0 ); } } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_vfork_works=yes else ac_cv_func_vfork_works=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_vfork_works" >&5 $as_echo "$ac_cv_func_vfork_works" >&6; } fi; if test "x$ac_cv_func_fork_works" = xcross; then ac_cv_func_vfork_works=$ac_cv_func_vfork { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&5 $as_echo "$as_me: WARNING: result $ac_cv_func_vfork_works guessed because of cross compilation" >&2;} fi if test "x$ac_cv_func_vfork_works" = xyes; then $as_echo "#define HAVE_WORKING_VFORK 1" >>confdefs.h else $as_echo "#define vfork fork" >>confdefs.h fi if test "x$ac_cv_func_fork_works" = xyes; then $as_echo "#define HAVE_WORKING_FORK 1" >>confdefs.h fi for ac_header in stdlib.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible malloc" >&5 $as_echo_n "checking for GNU libc compatible malloc... " >&6; } if ${ac_cv_func_malloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_malloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *malloc (); #endif int main () { return ! malloc (0); ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_malloc_0_nonnull=yes else ac_cv_func_malloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_malloc_0_nonnull" >&5 $as_echo "$ac_cv_func_malloc_0_nonnull" >&6; } if test $ac_cv_func_malloc_0_nonnull = yes; then : $as_echo "#define HAVE_MALLOC 1" >>confdefs.h else $as_echo "#define HAVE_MALLOC 0" >>confdefs.h case " $LIBOBJS " in *" malloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS malloc.$ac_objext" ;; esac $as_echo "#define malloc rpl_malloc" >>confdefs.h fi for ac_header in stdlib.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "stdlib.h" "ac_cv_header_stdlib_h" "$ac_includes_default" if test "x$ac_cv_header_stdlib_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_STDLIB_H 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU libc compatible realloc" >&5 $as_echo_n "checking for GNU libc compatible realloc... " >&6; } if ${ac_cv_func_realloc_0_nonnull+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_realloc_0_nonnull=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined STDC_HEADERS || defined HAVE_STDLIB_H # include #else char *realloc (); #endif int main () { return ! realloc (0, 0); ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_realloc_0_nonnull=yes else ac_cv_func_realloc_0_nonnull=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_realloc_0_nonnull" >&5 $as_echo "$ac_cv_func_realloc_0_nonnull" >&6; } if test $ac_cv_func_realloc_0_nonnull = yes; then : $as_echo "#define HAVE_REALLOC 1" >>confdefs.h else $as_echo "#define HAVE_REALLOC 0" >>confdefs.h case " $LIBOBJS " in *" realloc.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS realloc.$ac_objext" ;; esac $as_echo "#define realloc rpl_realloc" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working memcmp" >&5 $as_echo_n "checking for working memcmp... " >&6; } if ${ac_cv_func_memcmp_working+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_memcmp_working=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Some versions of memcmp are not 8-bit clean. */ char c0 = '\100', c1 = '\200', c2 = '\201'; if (memcmp(&c0, &c2, 1) >= 0 || memcmp(&c1, &c2, 1) >= 0) return 1; /* The Next x86 OpenStep bug shows up only when comparing 16 bytes or more and with at least one buffer not starting on a 4-byte boundary. William Lewis provided this test program. */ { char foo[21]; char bar[21]; int i; for (i = 0; i < 4; i++) { char *a = foo + i; char *b = bar + i; strcpy (a, "--------01111111"); strcpy (b, "--------10000000"); if (memcmp (a, b, 16) >= 0) return 1; } return 0; } ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_memcmp_working=yes else ac_cv_func_memcmp_working=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_memcmp_working" >&5 $as_echo "$ac_cv_func_memcmp_working" >&6; } test $ac_cv_func_memcmp_working = no && case " $LIBOBJS " in *" memcmp.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS memcmp.$ac_objext" ;; esac for ac_header in sys/select.h sys/socket.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking types of arguments for select" >&5 $as_echo_n "checking types of arguments for select... " >&6; } if ${ac_cv_func_select_args+:} false; then : $as_echo_n "(cached) " >&6 else for ac_arg234 in 'fd_set *' 'int *' 'void *'; do for ac_arg1 in 'int' 'size_t' 'unsigned long int' 'unsigned int'; do for ac_arg5 in 'struct timeval *' 'const struct timeval *'; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #ifdef HAVE_SYS_SELECT_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include #endif int main () { extern int select ($ac_arg1, $ac_arg234, $ac_arg234, $ac_arg234, $ac_arg5); ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_func_select_args="$ac_arg1,$ac_arg234,$ac_arg5"; break 3 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext done done done # Provide a safe default value. : "${ac_cv_func_select_args=int,int *,struct timeval *}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_select_args" >&5 $as_echo "$ac_cv_func_select_args" >&6; } ac_save_IFS=$IFS; IFS=',' set dummy `echo "$ac_cv_func_select_args" | sed 's/\*/\*/g'` IFS=$ac_save_IFS shift cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG1 $1 _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG234 ($2) _ACEOF cat >>confdefs.h <<_ACEOF #define SELECT_TYPE_ARG5 ($3) _ACEOF rm -f conftest* { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether lstat correctly handles trailing slash" >&5 $as_echo_n "checking whether lstat correctly handles trailing slash... " >&6; } if ${ac_cv_func_lstat_dereferences_slashed_symlink+:} false; then : $as_echo_n "(cached) " >&6 else rm -f conftest.sym conftest.file echo >conftest.file if test "$as_ln_s" = "ln -s" && ln -s conftest.file conftest.sym; then if test "$cross_compiling" = yes; then : ac_cv_func_lstat_dereferences_slashed_symlink=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; /* Linux will dereference the symlink and fail, as required by POSIX. That is better in the sense that it means we will not have to compile and use the lstat wrapper. */ return lstat ("conftest.sym/", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_lstat_dereferences_slashed_symlink=yes else ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi else # If the `ln -s' command failed, then we probably don't even # have an lstat function. ac_cv_func_lstat_dereferences_slashed_symlink=no fi rm -f conftest.sym conftest.file fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_lstat_dereferences_slashed_symlink" >&5 $as_echo "$ac_cv_func_lstat_dereferences_slashed_symlink" >&6; } test $ac_cv_func_lstat_dereferences_slashed_symlink = yes && cat >>confdefs.h <<_ACEOF #define LSTAT_FOLLOWS_SLASHED_SYMLINK 1 _ACEOF if test "x$ac_cv_func_lstat_dereferences_slashed_symlink" = xno; then case " $LIBOBJS " in *" lstat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS lstat.$ac_objext" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stat accepts an empty string" >&5 $as_echo_n "checking whether stat accepts an empty string... " >&6; } if ${ac_cv_func_stat_empty_string_bug+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_stat_empty_string_bug=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { struct stat sbuf; return stat ("", &sbuf) == 0; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_stat_empty_string_bug=no else ac_cv_func_stat_empty_string_bug=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_stat_empty_string_bug" >&5 $as_echo "$ac_cv_func_stat_empty_string_bug" >&6; } if test $ac_cv_func_stat_empty_string_bug = yes; then case " $LIBOBJS " in *" stat.$ac_objext "* ) ;; *) LIBOBJS="$LIBOBJS stat.$ac_objext" ;; esac cat >>confdefs.h <<_ACEOF #define HAVE_STAT_EMPTY_STRING_BUG 1 _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether closedir returns void" >&5 $as_echo_n "checking whether closedir returns void... " >&6; } if ${ac_cv_func_closedir_void+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_closedir_void=yes else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default #include <$ac_header_dirent> #ifndef __cplusplus int closedir (); #endif int main () { return closedir (opendir (".")) != 0; ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_func_closedir_void=no else ac_cv_func_closedir_void=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_closedir_void" >&5 $as_echo "$ac_cv_func_closedir_void" >&6; } if test $ac_cv_func_closedir_void = yes; then $as_echo "#define CLOSEDIR_VOID 1" >>confdefs.h fi for ac_func in vprintf do : ac_fn_cxx_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_cxx_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi fi done for ac_func in bzero gettimeofday memmove memset mkdir strdup strrchr \ if_nametoindex inet_ntoa inet_ntop inet_aton inet_pton select \ socket strerror getifaddrs getloadavg getpwnam_r getpwuid_r \ getgrnam_r getgrgid_r secure_getenv clock_gettime do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_cxx_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.6' macro_revision='2.4.6' ltmain=$ac_aux_dir/ltmain.sh # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case $ECHO in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n "$lt_cv_sys_max_cmd_len"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test yes != "$GCC"; then reload_cmds=false fi ;; darwin*) if test yes = "$GCC"; then reload_cmds='$LTCC $LTCFLAGS -nostdlib $wl-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_sysroot" >&5 $as_echo "$with_sysroot" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a working dd" >&5 $as_echo_n "checking for a working dd... " >&6; } if ${ac_cv_path_lt_DD+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} if test -z "$lt_DD"; then ac_path_lt_DD_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in dd; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_lt_DD="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_lt_DD" || continue if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi $ac_path_lt_DD_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_lt_DD"; then : fi else ac_cv_path_lt_DD=$lt_DD fi rm -f conftest.i conftest2.i conftest.out fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_lt_DD" >&5 $as_echo "$ac_cv_path_lt_DD" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to truncate binary pipes" >&5 $as_echo_n "checking how to truncate binary pipes... " >&6; } if ${lt_cv_truncate_bin+:} false; then : $as_echo_n "(cached) " >&6 else printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_truncate_bin" >&5 $as_echo "$lt_cv_truncate_bin" >&6; } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[012][,.]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done func_stripname_cnf () { case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED "s%^$1%%; s%$2\$%%"`;; esac } # func_stripname_cnf # Set options enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}as", so it can be a program name with args. set dummy ${ac_tool_prefix}as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AS"; then ac_cv_prog_AS="$AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AS="${ac_tool_prefix}as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AS=$ac_cv_prog_AS if test -n "$AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5 $as_echo "$AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_AS"; then ac_ct_AS=$AS # Extract the first word of "as", so it can be a program name with args. set dummy as; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AS+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AS"; then ac_cv_prog_ac_ct_AS="$ac_ct_AS" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AS="as" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AS=$ac_cv_prog_ac_ct_AS if test -n "$ac_ct_AS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AS" >&5 $as_echo "$ac_ct_AS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_AS" = x; then AS="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AS=$ac_ct_AS fi else AS="$ac_cv_prog_AS" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi ;; esac test -z "$AS" && AS=as test -z "$DLLTOOL" && DLLTOOL=dlltool test -z "$OBJDUMP" && OBJDUMP=objdump enable_dlopen=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac else pic_mode=default fi # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac else enable_fast_install=yes fi shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[5-9]*,yes) { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of shared library versioning to provide" >&5 $as_echo_n "checking which variant of shared library versioning to provide... " >&6; } # Check whether --with-aix-soname was given. if test "${with_aix_soname+set}" = set; then : withval=$with_aix_soname; case $withval in aix|svr4|both) ;; *) as_fn_error $? "Unknown argument to --with-aix-soname" "$LINENO" 5 ;; esac lt_cv_with_aix_soname=$with_aix_soname else if ${lt_cv_with_aix_soname+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_with_aix_soname=aix fi with_aix_soname=$lt_cv_with_aix_soname fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $with_aix_soname" >&5 $as_echo "$with_aix_soname" >&6; } if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o func_cc_basename $compiler cc_basename=$func_cc_basename_result # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/${ac_tool_prefix}file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/file"; then lt_cv_path_MAGIC_CMD=$ac_dir/"file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac fi MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC=$CC ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test yes = "$GCC"; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test yes = "$lt_cv_prog_compiler_rtti_exceptions"; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test yes = "$GCC"; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi lt_prog_compiler_pic='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works"; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test yes = "$lt_cv_prog_compiler_static_works"; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' export_dynamic_flag_spec='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/(^)\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='$wl--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs=yes ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) export_dynamic_flag_spec='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test no = "$ld_shlibs"; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct=no hardcode_direct_absolute=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' $wl-bernotok' allow_undefined_flag=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes archive_expsym_cmds='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds="$archive_expsym_cmds"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds="$archive_expsym_cmds"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds="$archive_expsym_cmds"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test yes = "$GCC"; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test yes = "$lt_cv_prog_compiler__b"; then archive_cmds='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec='$wl+b $wl$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test yes = "$lt_cv_irix_exported_symbol"; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi link_all_deplibs=no else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler ld_shlibs=yes archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='$wl-rpath,$libdir' export_dynamic_flag_spec='$wl-E' else archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='$wl-rpath,$libdir' fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported shrext_cmds=.dll archive_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes=yes ;; osf3*) if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then allow_undefined_flag=' $wl-expect_unresolved $wl\*' archive_cmds='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec='$wl-rpath $wl$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test yes = "$GCC"; then wlarc='$wl' archive_cmds='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' archive_cmds='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then whole_archive_flag_spec='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='$wl-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='$wl-z,text' allow_undefined_flag='$wl-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='$wl-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then archive_cmds='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='$wl-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test no = "$ld_shlibs" && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([A-Za-z]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([A-Za-z]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test yes = "$hardcode_automatic"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, )" && test no != "$hardcode_minus_L"; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test relink = "$hardcode_action" || test yes = "$inherit_rpath"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen=shl_load else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen=dlopen else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld fi fi fi fi fi fi ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test yes = "$cross_compiling"; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report what library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu CC=$lt_save_CC if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5 $as_echo_n "checking how to run the C++ preprocessor... " >&6; } if test -z "$CXXCPP"; then if ${ac_cv_prog_CXXCPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CXXCPP needs to be expanded for CXXCPP in "$CXX -E" "/lib/cpp" do ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CXXCPP=$CXXCPP fi CXXCPP=$ac_cv_prog_CXXCPP else ac_cv_prog_CXXCPP=$CXXCPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5 $as_echo "$CXXCPP" >&6; } ac_preproc_ok=false for ac_cxx_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_cxx_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu else _lt_caught_CXX_error=yes fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu archive_cmds_need_lc_CXX=no allow_undefined_flag_CXX= always_export_symbols_CXX=no archive_expsym_cmds_CXX= compiler_needs_object_CXX=no export_dynamic_flag_spec_CXX= hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no hardcode_libdir_flag_spec_CXX= hardcode_libdir_separator_CXX= hardcode_minus_L_CXX=no hardcode_shlibpath_var_CXX=unsupported hardcode_automatic_CXX=no inherit_rpath_CXX=no module_cmds_CXX= module_expsym_cmds_CXX= link_all_deplibs_CXX=unknown old_archive_cmds_CXX=$old_archive_cmds reload_flag_CXX=$reload_flag reload_cmds_CXX=$reload_cmds no_undefined_flag_CXX= whole_archive_flag_spec_CXX= enable_shared_with_static_runtimes_CXX=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o objext_CXX=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC compiler_CXX=$CC func_cc_basename $compiler cc_basename=$func_cc_basename_result if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then lt_prog_compiler_no_builtin_flag_CXX=' -fno-builtin' else lt_prog_compiler_no_builtin_flag_CXX= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test no = "$withval" || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then archive_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else whole_archive_flag_spec_CXX= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } ld_shlibs_CXX=yes case $host_os in aix3*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aix[4-9]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds_CXX='' hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes file_list_spec_CXX='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. hardcode_direct_CXX=no hardcode_direct_absolute_CXX=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct_CXX=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L_CXX=yes hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_libdir_separator_CXX= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi export_dynamic_flag_spec_CXX='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. always_export_symbols_CXX=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. no_undefined_flag_CXX='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then hardcode_libdir_flag_spec_CXX='$wl-R $libdir:/usr/lib:/lib' allow_undefined_flag_CXX="-z nodefs" archive_expsym_cmds_CXX="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath__CXX+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath__CXX=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath__CXX"; then lt_cv_aix_libpath__CXX=/usr/lib:/lib fi fi aix_libpath=$lt_cv_aix_libpath__CXX fi hardcode_libdir_flag_spec_CXX='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag_CXX=' $wl-bernotok' allow_undefined_flag_CXX=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec_CXX='$convenience' fi archive_cmds_need_lc_CXX=yes archive_expsym_cmds_CXX='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([, ]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi archive_expsym_cmds_CXX="$archive_expsym_cmds_CXX"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag_CXX=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds_CXX='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else ld_shlibs_CXX=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. hardcode_libdir_flag_spec_CXX=' ' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=yes file_list_spec_CXX='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. archive_cmds_CXX='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, CXX)='true' enable_shared_with_static_runtimes_CXX=yes # Don't use ranlib old_postinstall_cmds_CXX='chmod 644 $oldlib' postlink_cmds_CXX='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, CXX) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec_CXX='-L$libdir' export_dynamic_flag_spec_CXX='$wl--export-all-symbols' allow_undefined_flag_CXX=unsupported always_export_symbols_CXX=no enable_shared_with_static_runtimes_CXX=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds_CXX='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... archive_expsym_cmds_CXX='if test DEF = "`$SED -n -e '\''s/^[ ]*//'\'' -e '\''/^\(;.*\)*$/d'\'' -e '\''s/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p'\'' -e q $export_symbols`" ; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs_CXX=no fi ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc_CXX=no hardcode_direct_CXX=no hardcode_automatic_CXX=yes hardcode_shlibpath_var_CXX=unsupported if test yes = "$lt_cv_ld_force_load"; then whole_archive_flag_spec_CXX='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec_CXX='' fi link_all_deplibs_CXX=yes allow_undefined_flag_CXX=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all archive_cmds_CXX="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" module_cmds_CXX="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" module_expsym_cmds_CXX="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" if test yes != "$lt_cv_apple_cc_single_mod"; then archive_cmds_CXX="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" archive_expsym_cmds_CXX="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi else ld_shlibs_CXX=no fi ;; os2*) hardcode_libdir_flag_spec_CXX='-L$libdir' hardcode_minus_L_CXX=yes allow_undefined_flag_CXX=unsupported shrext_cmds=.dll archive_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' archive_expsym_cmds_CXX='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' old_archive_From_new_cmds_CXX='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' enable_shared_with_static_runtimes_CXX=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF ld_shlibs_CXX=no ;; freebsd-elf*) archive_cmds_need_lc_CXX=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions ld_shlibs_CXX=yes ;; haiku*) archive_cmds_CXX='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' link_all_deplibs_CXX=yes ;; hpux9*) hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: export_dynamic_flag_spec_CXX='$wl-E' hardcode_direct_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) archive_cmds_CXX='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then archive_cmds_CXX='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then hardcode_libdir_flag_spec_CXX='$wl+b $wl$libdir' hardcode_libdir_separator_CXX=: case $host_cpu in hppa*64*|ia64*) ;; *) export_dynamic_flag_spec_CXX='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no ;; *) hardcode_direct_CXX=yes hardcode_direct_absolute_CXX=yes hardcode_minus_L_CXX=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; aCC*) case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) archive_cmds_CXX='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; interix[3-9]*) hardcode_direct_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds_CXX='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds_CXX='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ archive_cmds_CXX='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi link_all_deplibs_CXX=yes ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: inherit_rpath_CXX=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' archive_expsym_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac archive_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac archive_cmds_need_lc_CXX=no hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [1-5].* | *pgcpp\ [1-5].*) prelink_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' old_archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' archive_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl--rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' whole_archive_flag_spec_CXX='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' archive_expsym_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec_CXX='-rpath $libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' export_dynamic_flag_spec_CXX='$wl--export-dynamic' archive_cmds_CXX='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then archive_expsym_cmds_CXX='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' hardcode_libdir_flag_spec_CXX='-R$libdir' whole_archive_flag_spec_CXX='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' compiler_needs_object_CXX=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; m88k*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds_CXX='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) ld_shlibs_CXX=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then hardcode_direct_CXX=yes hardcode_shlibpath_var_CXX=no hardcode_direct_absolute_CXX=yes archive_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then archive_expsym_cmds_CXX='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' export_dynamic_flag_spec_CXX='$wl-E' whole_archive_flag_spec_CXX=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else ld_shlibs_CXX=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. archive_cmds_CXX='tempext=`echo $shared_ext | $SED -e '\''s/\([^()0-9A-Za-z{}]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath,$libdir' hardcode_libdir_separator_CXX=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) old_archive_cmds_CXX='$CC -Bstatic -o $oldlib $oldobjs' ;; *) old_archive_cmds_CXX='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; cxx*) case $host in osf3*) allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' ;; *) allow_undefined_flag_CXX=' -expect_unresolved \*' archive_cmds_CXX='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' archive_expsym_cmds_CXX='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' hardcode_libdir_flag_spec_CXX='-rpath $libdir' ;; esac hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then allow_undefined_flag_CXX=' $wl-expect_unresolved $wl\*' case $host in osf3*) archive_cmds_CXX='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac hardcode_libdir_flag_spec_CXX='$wl-rpath $wl$libdir' hardcode_libdir_separator_CXX=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support ld_shlibs_CXX=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ archive_cmds_need_lc_CXX=yes no_undefined_flag_CXX=' -zdefs' archive_cmds_CXX='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' hardcode_libdir_flag_spec_CXX='-R$libdir' hardcode_shlibpath_var_CXX=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) whole_archive_flag_spec_CXX='-z allextract$convenience -z defaultextract' ;; esac link_all_deplibs_CXX=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. old_archive_cmds_CXX='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler archive_cmds_CXX='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. old_archive_cmds_CXX='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then no_undefined_flag_CXX=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then archive_cmds_CXX='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. archive_cmds_CXX='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' archive_expsym_cmds_CXX='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi hardcode_libdir_flag_spec_CXX='$wl-R $wl$libdir' case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) whole_archive_flag_spec_CXX='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag_CXX='$wl-z,text' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag_CXX='$wl-z,text' allow_undefined_flag_CXX='$wl-z,nodefs' archive_cmds_need_lc_CXX=no hardcode_shlibpath_var_CXX=no hardcode_libdir_flag_spec_CXX='$wl-R,$libdir' hardcode_libdir_separator_CXX=':' link_all_deplibs_CXX=yes export_dynamic_flag_spec_CXX='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) archive_cmds_CXX='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' old_archive_cmds_CXX='$CC -Tprelink_objects $oldobjs~ '"$old_archive_cmds_CXX" reload_cmds_CXX='$CC -Tprelink_objects $reload_objs~ '"$reload_cmds_CXX" ;; *) archive_cmds_CXX='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds_CXX='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; *) # FIXME: insert proper C++ library support ld_shlibs_CXX=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no GCC_CXX=$GXX LD_CXX=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... # Dependencies to place before and after the object being linked: predep_objects_CXX= postdep_objects_CXX= predeps_CXX= postdeps_CXX= compiler_lib_search_path_CXX= cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$compiler_lib_search_path_CXX"; then compiler_lib_search_path_CXX=$prev$p else compiler_lib_search_path_CXX="${compiler_lib_search_path_CXX} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$postdeps_CXX"; then postdeps_CXX=$prev$p else postdeps_CXX="${postdeps_CXX} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$predep_objects_CXX"; then predep_objects_CXX=$p else predep_objects_CXX="$predep_objects_CXX $p" fi else if test -z "$postdep_objects_CXX"; then postdep_objects_CXX=$p else postdep_objects_CXX="$postdep_objects_CXX $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling CXX test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken case $host_os in interix[3-9]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. predep_objects_CXX= postdep_objects_CXX= postdeps_CXX= ;; esac case " $postdeps_CXX " in *" -lc "*) archive_cmds_need_lc_CXX=no ;; esac compiler_lib_search_dirs_CXX= if test -n "${compiler_lib_search_path_CXX}"; then compiler_lib_search_dirs_CXX=`echo " ${compiler_lib_search_path_CXX}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi lt_prog_compiler_wl_CXX= lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX= # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' fi lt_prog_compiler_pic_CXX='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic_CXX='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. lt_prog_compiler_pic_CXX='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic_CXX='-DDLL_EXPORT' case $host_os in os2*) lt_prog_compiler_static_CXX='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic_CXX='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all lt_prog_compiler_pic_CXX= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static_CXX= ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic_CXX=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; *) lt_prog_compiler_pic_CXX='-fPIC' ;; esac else case $host_os in aix[4-9]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor lt_prog_compiler_static_CXX='-Bstatic' else lt_prog_compiler_static_CXX='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, CXX)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic_CXX='-DDLL_EXPORT' ;; dgux*) case $cc_basename in ec++*) lt_prog_compiler_pic_CXX='-KPIC' ;; ghcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then lt_prog_compiler_pic_CXX='+Z' fi ;; aCC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic_CXX='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_static_CXX='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler lt_prog_compiler_wl_CXX='--backend -Wl,' lt_prog_compiler_pic_CXX='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fPIC' lt_prog_compiler_static_CXX='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-fpic' lt_prog_compiler_static_CXX='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; xlc* | xlC* | bgxl[cC]* | mpixl[cC]*) # IBM XL 8.0, 9.0 on PPC and BlueGene lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-qpic' lt_prog_compiler_static_CXX='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) lt_prog_compiler_pic_CXX='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic_CXX='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) lt_prog_compiler_wl_CXX='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 lt_prog_compiler_pic_CXX='-pic' ;; cxx*) # Digital/Compaq C++ lt_prog_compiler_wl_CXX='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. lt_prog_compiler_pic_CXX= lt_prog_compiler_static_CXX='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' lt_prog_compiler_wl_CXX='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler lt_prog_compiler_pic_CXX='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x lt_prog_compiler_pic_CXX='-pic' lt_prog_compiler_static_CXX='-Bstatic' ;; lcc*) # Lucid lt_prog_compiler_pic_CXX='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) lt_prog_compiler_wl_CXX='-Wl,' lt_prog_compiler_pic_CXX='-KPIC' lt_prog_compiler_static_CXX='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 lt_prog_compiler_pic_CXX='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) lt_prog_compiler_can_build_shared_CXX=no ;; esac fi case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic_CXX= ;; *) lt_prog_compiler_pic_CXX="$lt_prog_compiler_pic_CXX -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_CXX=$lt_prog_compiler_pic_CXX fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_CXX" >&6; } lt_prog_compiler_pic_CXX=$lt_cv_prog_compiler_pic_CXX # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic_CXX works... " >&6; } if ${lt_cv_prog_compiler_pic_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works_CXX=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic_CXX -DPIC" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works_CXX=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_pic_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_pic_works_CXX"; then case $lt_prog_compiler_pic_CXX in "" | " "*) ;; *) lt_prog_compiler_pic_CXX=" $lt_prog_compiler_pic_CXX" ;; esac else lt_prog_compiler_pic_CXX= lt_prog_compiler_can_build_shared_CXX=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl_CXX eval lt_tmp_static_flag=\"$lt_prog_compiler_static_CXX\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works_CXX=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works_CXX=yes fi else lt_cv_prog_compiler_static_works_CXX=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works_CXX" >&5 $as_echo "$lt_cv_prog_compiler_static_works_CXX" >&6; } if test yes = "$lt_cv_prog_compiler_static_works_CXX"; then : else lt_prog_compiler_static_CXX= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o_CXX+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o_CXX=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o_CXX=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o_CXX" >&5 $as_echo "$lt_cv_prog_compiler_c_o_CXX" >&6; } hard_links=nottested if test no = "$lt_cv_prog_compiler_c_o_CXX" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test no = "$hard_links"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: '$CC' does not support '-c -o', so 'make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' case $host_os in aix[4-9]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds_CXX='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else export_symbols_cmds_CXX='`func_echo_all $NM | $SED -e '\''s/B\([^B]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && (substr(\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) export_symbols_cmds_CXX=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) exclude_expsyms_CXX='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms_CXX='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' ;; esac ;; linux* | k*bsd*-gnu | gnu*) link_all_deplibs_CXX=no ;; *) export_symbols_cmds_CXX='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs_CXX" >&5 $as_echo "$ld_shlibs_CXX" >&6; } test no = "$ld_shlibs_CXX" && can_build_shared=no with_gnu_ld_CXX=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc_CXX" in x|xyes) # Assume -lc should be added archive_cmds_need_lc_CXX=yes if test yes,yes = "$GCC,$enable_shared"; then case $archive_cmds_CXX in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc_CXX+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl_CXX pic_flag=$lt_prog_compiler_pic_CXX compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag_CXX allow_undefined_flag_CXX= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds_CXX 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc_CXX=no else lt_cv_archive_cmds_need_lc_CXX=yes fi allow_undefined_flag_CXX=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc_CXX" >&5 $as_echo "$lt_cv_archive_cmds_need_lc_CXX" >&6; } archive_cmds_need_lc_CXX=$lt_cv_archive_cmds_need_lc_CXX ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a(lib.so.V)' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V($shared_archive_member_spec.o), lib.a(lib.so.V)" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a(lib.so.V), lib.so.V($shared_archive_member_spec.o)" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[.]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. hardcode_libdir_flag_spec_CXX='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl_CXX\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec_CXX\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action_CXX= if test -n "$hardcode_libdir_flag_spec_CXX" || test -n "$runpath_var_CXX" || test yes = "$hardcode_automatic_CXX"; then # We can hardcode non-existent directories. if test no != "$hardcode_direct_CXX" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, CXX)" && test no != "$hardcode_minus_L_CXX"; then # Linking always hardcodes the temporary library directory. hardcode_action_CXX=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action_CXX=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action_CXX=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action_CXX" >&5 $as_echo "$hardcode_action_CXX" >&6; } if test relink = "$hardcode_action_CXX" || test yes = "$inherit_rpath_CXX"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu ac_config_commands="$ac_config_commands libtool" # Only expand once: # Decide if we're building on Windows early on. if test "x$host_os" = xmingw32; then USING_WIN32_TRUE= USING_WIN32_FALSE='#' else USING_WIN32_TRUE='#' USING_WIN32_FALSE= fi have_not_win32="yes" if test "x$host_os" = xmingw32; then have_not_win32="no" fi # Epoll ax_have_epoll_cppflags="${CPPFLAGS}" ac_fn_cxx_check_header_mongrel "$LINENO" "linux/version.h" "ac_cv_header_linux_version_h" "$ac_includes_default" if test "x$ac_cv_header_linux_version_h" = xyes; then : CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Linux epoll(7) interface" >&5 $as_echo_n "checking for Linux epoll(7) interface... " >&6; } if ${ax_cv_have_epoll+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) # error linux kernel version is too old to have epoll # endif #endif int main () { int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ax_cv_have_epoll=yes else ax_cv_have_epoll=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi CPPFLAGS="${ax_have_epoll_cppflags}" if test "${ax_cv_have_epoll}" = "yes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } $as_echo "#define HAVE_EPOLL 1" >>confdefs.h else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "${ax_cv_have_epoll}" = "yes"; then HAVE_EPOLL_TRUE= HAVE_EPOLL_FALSE='#' else HAVE_EPOLL_TRUE='#' HAVE_EPOLL_FALSE= fi # kqueue for ac_func in kqueue do : ac_fn_cxx_check_func "$LINENO" "kqueue" "ac_cv_func_kqueue" if test "x$ac_cv_func_kqueue" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_KQUEUE 1 _ACEOF fi done if test "${ac_cv_func_kqueue}" = "yes"; then HAVE_KQUEUE_TRUE= HAVE_KQUEUE_FALSE='#' else HAVE_KQUEUE_TRUE='#' HAVE_KQUEUE_FALSE= fi # check if the compiler supports -rdynamic { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -rdynamic support" >&5 $as_echo_n "checking for -rdynamic support... " >&6; } old_cppflags=$CPPFLAGS CPPFLAGS="${CPPFLAGS} -rdynamic -Wall -Werror" if ${ac_cv_rdynamic+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_cxx_try_compile "$LINENO"; then : ac_cv_rdynamic=yes else ac_cv_rdynamic=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi CPPFLAGS=$old_cppflags { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_rdynamic" >&5 $as_echo "$ac_cv_rdynamic" >&6; } if test "x$ac_cv_rdynamic" = xyes; then SUPPORTS_RDYNAMIC_TRUE= SUPPORTS_RDYNAMIC_FALSE='#' else SUPPORTS_RDYNAMIC_TRUE='#' SUPPORTS_RDYNAMIC_FALSE= fi # check for ipv6 support - taken from unp { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IPv6 support" >&5 $as_echo_n "checking for IPv6 support... " >&6; } if ${ac_cv_ipv6+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_ipv6=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { /* Make sure the definitions for AF_INET6 and struct sockaddr_in6 * are defined, and that we can actually create an IPv6 TCP socket. */ main() { int fd; struct sockaddr_in6 foo; fd = socket(AF_INET6, SOCK_STREAM, 0); exit(fd >= 0 ? 0 : 1); } ; return 0; } _ACEOF if ac_fn_cxx_try_run "$LINENO"; then : ac_cv_ipv6=yes else ac_cv_ipv6=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_ipv6" >&5 $as_echo "$ac_cv_ipv6" >&6; } if test "x$ac_cv_ipv6" = xyes; then : $as_echo "#define IPV6 1" >>confdefs.h fi # Check if sockaddr{} has sa_len member. ac_fn_cxx_check_member "$LINENO" "struct sockaddr" "sa_len" "ac_cv_member_struct_sockaddr_sa_len" "#include #include " if test "x$ac_cv_member_struct_sockaddr_sa_len" = xyes; then : $as_echo "#define HAVE_SOCKADDR_SA_LEN 1" >>confdefs.h fi ac_fn_cxx_check_member "$LINENO" "struct sockaddr_dl" "sdl_family" "ac_cv_member_struct_sockaddr_dl_sdl_family" "#include #include " if test "x$ac_cv_member_struct_sockaddr_dl_sdl_family" = xyes; then : $as_echo "#define HAVE_SOCKADDR_DL_STRUCT 1" >>confdefs.h fi # check for time_t and suseconds_t ac_fn_cxx_check_type "$LINENO" "time_t" "ac_cv_type_time_t" "#include " if test "x$ac_cv_type_time_t" = xyes; then : $as_echo "#define HAVE_TIME_T 1" >>confdefs.h fi ac_fn_cxx_check_type "$LINENO" "suseconds_t" "ac_cv_type_suseconds_t" "#include " if test "x$ac_cv_type_suseconds_t" = xyes; then : $as_echo "#define HAVE_SUSECONDS_T 1" >>confdefs.h fi # check for SO_NOSIGPIPE or MSG_NOSIGNAL ac_fn_cxx_check_decl "$LINENO" "MSG_NOSIGNAL" "ac_cv_have_decl_MSG_NOSIGNAL" "#include #include " if test "x$ac_cv_have_decl_MSG_NOSIGNAL" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_MSG_NOSIGNAL $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : else have_msg_no_signal=no fi ac_fn_cxx_check_decl "$LINENO" "SO_NOSIGPIPE" "ac_cv_have_decl_SO_NOSIGPIPE" "#include #include " if test "x$ac_cv_have_decl_SO_NOSIGPIPE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SO_NOSIGPIPE $ac_have_decl _ACEOF if test $ac_have_decl = 1; then : else have_so_no_pipe=no fi ac_fn_cxx_check_decl "$LINENO" "PF_ROUTE" "ac_cv_have_decl_PF_ROUTE" "#include #include " if test "x$ac_cv_have_decl_PF_ROUTE" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PF_ROUTE $ac_have_decl _ACEOF ac_fn_cxx_check_decl "$LINENO" "NET_RT_DUMP" "ac_cv_have_decl_NET_RT_DUMP" "#include #include " if test "x$ac_cv_have_decl_NET_RT_DUMP" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_NET_RT_DUMP $ac_have_decl _ACEOF ac_fn_cxx_check_decl "$LINENO" "RLIMIT_RTPRIO" "ac_cv_have_decl_RLIMIT_RTPRIO" "#include " if test "x$ac_cv_have_decl_RLIMIT_RTPRIO" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_RLIMIT_RTPRIO $ac_have_decl _ACEOF ac_fn_cxx_check_decl "$LINENO" "RLIMIT_RTTIME" "ac_cv_have_decl_RLIMIT_RTTIME" "#include " if test "x$ac_cv_have_decl_RLIMIT_RTTIME" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_RLIMIT_RTTIME $ac_have_decl _ACEOF ac_fn_cxx_check_decl "$LINENO" "SO_REUSEADDR" "ac_cv_have_decl_SO_REUSEADDR" "#include #include " if test "x$ac_cv_have_decl_SO_REUSEADDR" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SO_REUSEADDR $ac_have_decl _ACEOF ac_fn_cxx_check_decl "$LINENO" "SO_REUSEPORT" "ac_cv_have_decl_SO_REUSEPORT" "#include #include " if test "x$ac_cv_have_decl_SO_REUSEPORT" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SO_REUSEPORT $ac_have_decl _ACEOF if test -z "${USING_WIN32_FALSE}" && test "${have_msg_no_signal}" = "no" && \ test "${have_so_no_pipe}" = "no"; then as_fn_error $? "Your system needs either MSG_NOSIGNAL or SO_NOSIGPIPE" "$LINENO" 5 fi ac_fn_cxx_check_type "$LINENO" "termios2" "ac_cv_type_termios2" "#include " if test "x$ac_cv_type_termios2" = xyes; then : $as_echo "#define HAVE_TERMIOS2 1" >>confdefs.h fi # Headers. ##################################################### ac_fn_cxx_check_header_mongrel "$LINENO" "linux/spi/spidev.h" "ac_cv_header_linux_spi_spidev_h" "$ac_includes_default" if test "x$ac_cv_header_linux_spi_spidev_h" = xyes; then : have_spi="yes" else have_spi="no" fi # Programs. ##################################################### # bison BISON="" # Extract the first word of "bison -V", so it can be a program name with args. set dummy bison -V; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_BISON+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$BISON"; then ac_cv_prog_BISON="$BISON" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_BISON="bison" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi BISON=$ac_cv_prog_BISON if test -n "$BISON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BISON" >&5 $as_echo "$BISON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$BISON" != xbison; then : as_fn_error $? "bison not found, please install it" "$LINENO" 5 fi # lex for ac_prog in flex lex do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LEX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LEX"; then ac_cv_prog_LEX="$LEX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LEX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LEX=$ac_cv_prog_LEX if test -n "$LEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LEX" >&5 $as_echo "$LEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$LEX" && break done test -n "$LEX" || LEX=":" if test "x$LEX" != "x:"; then cat >conftest.l <<_ACEOF %% a { ECHO; } b { REJECT; } c { yymore (); } d { yyless (1); } e { /* IRIX 6.5 flex 2.5.4 underquotes its yyless argument. */ yyless ((input () != 0)); } f { unput (yytext[0]); } . { BEGIN INITIAL; } %% #ifdef YYTEXT_POINTER extern char *yytext; #endif int main (void) { return ! yylex () + ! yywrap (); } _ACEOF { { ac_try="$LEX conftest.l" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$LEX conftest.l") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex output file root" >&5 $as_echo_n "checking lex output file root... " >&6; } if ${ac_cv_prog_lex_root+:} false; then : $as_echo_n "(cached) " >&6 else if test -f lex.yy.c; then ac_cv_prog_lex_root=lex.yy elif test -f lexyy.c; then ac_cv_prog_lex_root=lexyy else as_fn_error $? "cannot find output from $LEX; giving up" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_root" >&5 $as_echo "$ac_cv_prog_lex_root" >&6; } LEX_OUTPUT_ROOT=$ac_cv_prog_lex_root if test -z "${LEXLIB+set}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking lex library" >&5 $as_echo_n "checking lex library... " >&6; } if ${ac_cv_lib_lex+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_LIBS=$LIBS ac_cv_lib_lex='none needed' for ac_lib in '' -lfl -ll; do LIBS="$ac_lib $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_lex=$ac_lib fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext test "$ac_cv_lib_lex" != 'none needed' && break done LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_lex" >&5 $as_echo "$ac_cv_lib_lex" >&6; } test "$ac_cv_lib_lex" != 'none needed' && LEXLIB=$ac_cv_lib_lex fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether yytext is a pointer" >&5 $as_echo_n "checking whether yytext is a pointer... " >&6; } if ${ac_cv_prog_lex_yytext_pointer+:} false; then : $as_echo_n "(cached) " >&6 else # POSIX says lex can declare yytext either as a pointer or an array; the # default is implementation-dependent. Figure out which it is, since # not all implementations provide the %pointer and %array declarations. ac_cv_prog_lex_yytext_pointer=no ac_save_LIBS=$LIBS LIBS="$LEXLIB $ac_save_LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #define YYTEXT_POINTER 1 `cat $LEX_OUTPUT_ROOT.c` _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_prog_lex_yytext_pointer=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_lex_yytext_pointer" >&5 $as_echo "$ac_cv_prog_lex_yytext_pointer" >&6; } if test $ac_cv_prog_lex_yytext_pointer = yes; then $as_echo "#define YYTEXT_POINTER 1" >>confdefs.h fi rm -f conftest.l $LEX_OUTPUT_ROOT.c fi if test "x$LEX" = "x:"; then : as_fn_error $? "lex not found, please install flex or lex" "$LINENO" 5 fi # pkg-config if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi if test -z "$PKG_CONFIG"; then : as_fn_error $? "Missing pkg-config, please install it" "$LINENO" 5 fi # Libraries. ##################################################### # dlopen { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing dlopen" >&5 $as_echo_n "checking for library containing dlopen... " >&6; } if ${ac_cv_search_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF for ac_lib in '' dl; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_dlopen=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_dlopen+:} false; then : break fi done if ${ac_cv_search_dlopen+:} false; then : else ac_cv_search_dlopen=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_dlopen" >&5 $as_echo "$ac_cv_search_dlopen" >&6; } ac_res=$ac_cv_search_dlopen if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_dlopen="yes" fi if test "x$have_dlopen" = xyes; then HAVE_DLOPEN_TRUE= HAVE_DLOPEN_FALSE='#' else HAVE_DLOPEN_TRUE='#' HAVE_DLOPEN_FALSE= fi # dmx4linux have_dmx4linux="no" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DMXdev in -ldmx4linux" >&5 $as_echo_n "checking for DMXdev in -ldmx4linux... " >&6; } if ${ac_cv_lib_dmx4linux_DMXdev+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldmx4linux $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char DMXdev (); int main () { return DMXdev (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_dmx4linux_DMXdev=yes else ac_cv_lib_dmx4linux_DMXdev=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dmx4linux_DMXdev" >&5 $as_echo "$ac_cv_lib_dmx4linux_DMXdev" >&6; } if test "x$ac_cv_lib_dmx4linux_DMXdev" = xyes; then : have_dmx4linux="yes" fi ac_fn_cxx_check_header_mongrel "$LINENO" "dmx/dmxioctl.h" "ac_cv_header_dmx_dmxioctl_h" "$ac_includes_default" if test "x$ac_cv_header_dmx_dmxioctl_h" = xyes; then : else have_dmx4linux="no" fi if test "x$have_dmx4linux" = xyes; then : $as_echo "#define HAVE_DMX4LINUX 1" >>confdefs.h fi # librt - may be separate or part of libc { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing clock_gettime" >&5 $as_echo_n "checking for library containing clock_gettime... " >&6; } if ${ac_cv_search_clock_gettime+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char clock_gettime (); int main () { return clock_gettime (); ; return 0; } _ACEOF for ac_lib in '' rt; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_clock_gettime=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_clock_gettime+:} false; then : break fi done if ${ac_cv_search_clock_gettime+:} false; then : else ac_cv_search_clock_gettime=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_clock_gettime" >&5 $as_echo "$ac_cv_search_clock_gettime" >&6; } ac_res=$ac_cv_search_clock_gettime if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" fi # libexecinfo # FreeBSD required -lexecinfo to call backtrace - checking for presence of # header execinfo.h isn't enough { $as_echo "$as_me:${as_lineno-$LINENO}: checking for backtrace in -lexecinfo" >&5 $as_echo_n "checking for backtrace in -lexecinfo... " >&6; } if ${ac_cv_lib_execinfo_backtrace+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lexecinfo $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char backtrace (); int main () { return backtrace (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_execinfo_backtrace=yes else ac_cv_lib_execinfo_backtrace=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_execinfo_backtrace" >&5 $as_echo "$ac_cv_lib_execinfo_backtrace" >&6; } if test "x$ac_cv_lib_execinfo_backtrace" = xyes; then : use_lexecinfo="yes" fi # TODO(Peter): This should really be AC_COMPILE_IFELSE and AC_LANG_PROGRAM case "${host_os}" in *freebsd* | *netbsd* | *dragonfly*) LIBS="$LIBS -lexecinfo" ;; esac # libftd2xx (for now this is intentionally disabled, TODO) have_libftd2xx="no" if test "x$have_libftd2xx" = xyes; then HAVE_LIBFTD2XX_TRUE= HAVE_LIBFTD2XX_FALSE='#' else HAVE_LIBFTD2XX_TRUE='#' HAVE_LIBFTD2XX_FALSE= fi # ncurses # Location is ncurses/curses.h on DragonFly for ac_header in curses.h ncurses/curses.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for initscr in -lncurses" >&5 $as_echo_n "checking for initscr in -lncurses... " >&6; } if ${ac_cv_lib_ncurses_initscr+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lncurses $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char initscr (); int main () { return initscr (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_ncurses_initscr=yes else ac_cv_lib_ncurses_initscr=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ncurses_initscr" >&5 $as_echo "$ac_cv_lib_ncurses_initscr" >&6; } if test "x$ac_cv_lib_ncurses_initscr" = xyes; then : have_ncurses="yes" fi if test "x$have_ncurses" = xyes; then HAVE_NCURSES_TRUE= HAVE_NCURSES_FALSE='#' else HAVE_NCURSES_TRUE='#' HAVE_NCURSES_FALSE= fi # Defines libncurses_LIBS that we can use to link against ncurses # Needed since >=ncurses-6 where -ltinfo is needed in addition to -lncurses pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libncurses" >&5 $as_echo_n "checking for libncurses... " >&6; } if test -n "$libncurses_CFLAGS"; then pkg_cv_libncurses_CFLAGS="$libncurses_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses >= 5\""; } >&5 ($PKG_CONFIG --exists --print-errors "ncurses >= 5") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libncurses_CFLAGS=`$PKG_CONFIG --cflags "ncurses >= 5" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libncurses_LIBS"; then pkg_cv_libncurses_LIBS="$libncurses_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ncurses >= 5\""; } >&5 ($PKG_CONFIG --exists --print-errors "ncurses >= 5") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libncurses_LIBS=`$PKG_CONFIG --libs "ncurses >= 5" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libncurses_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ncurses >= 5" 2>&1` else libncurses_PKG_ERRORS=`$PKG_CONFIG --print-errors "ncurses >= 5" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libncurses_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } have_ncurses_pkgconfig="no" elif test $pkg_failed = untried; then have_ncurses_pkgconfig="no" else libncurses_CFLAGS=$pkg_cv_libncurses_CFLAGS libncurses_LIBS=$pkg_cv_libncurses_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_ncurses_pkgconfig="yes" fi if test "x$have_ncurses_pkgconfig" = xyes; then HAVE_NCURSES_PKGCONFIG_TRUE= HAVE_NCURSES_PKGCONFIG_FALSE='#' else HAVE_NCURSES_PKGCONFIG_TRUE='#' HAVE_NCURSES_PKGCONFIG_FALSE= fi # pthread ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS$PTHREAD_CXXFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CXXFLAGS and CXXFLAGS=$PTHREAD_CXXFLAGS" >&5 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CXXFLAGS and CXXFLAGS=$PTHREAD_CXXFLAGS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : acx_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 $as_echo "$acx_pthread_ok" >&6; } if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" PTHREAD_CXXFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 $as_echo_n "checking whether pthreads work without any flags... " >&6; } ;; -*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 $as_echo_n "checking whether pthreads work with $flag... " >&6; } PTHREAD_CFLAGS="$flag" PTHREAD_CXXFLAGS="$flag" ;; pthread-config) # Extract the first word of "pthread-config", so it can be a program name with args. set dummy pthread-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_acx_pthread_config+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$acx_pthread_config"; then ac_cv_prog_acx_pthread_config="$acx_pthread_config" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_acx_pthread_config="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_acx_pthread_config" && ac_cv_prog_acx_pthread_config="no" fi fi acx_pthread_config=$ac_cv_prog_acx_pthread_config if test -n "$acx_pthread_config"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_config" >&5 $as_echo "$acx_pthread_config" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_CXXFLAGS="`pthread-config --cxxflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 $as_echo_n "checking for the pthreads library -l$flag... " >&6; } PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : acx_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 $as_echo "$acx_pthread_ok" >&6; } if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" PTHREAD_CXXFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 $as_echo_n "checking for joinable pthread attribute... " >&6; } attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int attr=$attr; return attr; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : attr_name=$attr; break fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext done { $as_echo "$as_me:${as_lineno-$LINENO}: result: $attr_name" >&5 $as_echo "$attr_name" >&6; } if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then cat >>confdefs.h <<_ACEOF #define PTHREAD_CREATE_JOINABLE $attr_name _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 $as_echo_n "checking if more special flags are required for pthreads... " >&6; } flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 $as_echo "${flag}" >&6; } if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" PTHREAD_CXXFLAGS="$flag $PTHREAD_CXXFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" # More AIX lossage: must compile with xlc_r, xlC_r, or cc_r if test x"$GCC" != xyes; then for ac_prog in xlc_r cc_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PTHREAD_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 $as_echo "$PTHREAD_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PTHREAD_CC" && break done test -n "$PTHREAD_CC" || PTHREAD_CC="${CC}" for ac_prog in xlC_r do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PTHREAD_CXX+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PTHREAD_CXX"; then ac_cv_prog_PTHREAD_CXX="$PTHREAD_CXX" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CXX="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi PTHREAD_CXX=$ac_cv_prog_PTHREAD_CXX if test -n "$PTHREAD_CXX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CXX" >&5 $as_echo "$PTHREAD_CXX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$PTHREAD_CXX" && break done test -n "$PTHREAD_CXX" || PTHREAD_CXX="${CXX}" else PTHREAD_CC=$CC PTHREAD_CXX=$CXX fi else PTHREAD_CC="$CC" PTHREAD_CXX="$CXX" fi # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS" CC="$PTHREAD_CC" CXX="$PTHREAD_CXX" : else acx_pthread_ok=no as_fn_error $? "Missing pthread, please install it" "$LINENO" 5 fi ac_ext=cpp ac_cpp='$CXXCPP $CPPFLAGS' ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_cxx_compiler_gnu # pthread_setname_np can take either 1 or 2 arguments. # pthread setname (4 non-portable variants...) for ac_header in pthread_np.h do : ac_fn_cxx_check_header_compile "$LINENO" "pthread_np.h" "ac_cv_header_pthread_np_h" "#include " if test "x$ac_cv_header_pthread_np_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_PTHREAD_NP_H 1 _ACEOF fi done # 2-arg setname (e.g. Linux/glibc, QNX, IBM) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 2-arg pthread_setname_np" >&5 $as_echo_n "checking for 2-arg pthread_setname_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_PTHREAD_NP_H # include #endif int main () { pthread_setname_np(pthread_self(), "foo") ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define HAVE_PTHREAD_SETNAME_NP_2 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # 2-arg set_name (e.g. FreeBSD, OpenBSD) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 2-arg pthread_set_name_np" >&5 $as_echo_n "checking for 2-arg pthread_set_name_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_PTHREAD_NP_H # include #endif int main () { return pthread_set_name_np(pthread_self(), "foo"); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define HAVE_PTHREAD_SET_NAME_NP_2 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # 2-arg void set_name (e.g. FreeBSD, OpenBSD) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 2-arg void pthread_set_name_np" >&5 $as_echo_n "checking for 2-arg void pthread_set_name_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_PTHREAD_NP_H # include #endif int main () { pthread_set_name_np(pthread_self(), "foo"); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define HAVE_PTHREAD_SET_NAME_NP_2_VOID 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # 1-arg setname (e.g. Darwin) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 1-arg pthread_setname_np" >&5 $as_echo_n "checking for 1-arg pthread_setname_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_PTHREAD_NP_H # include #endif int main () { return pthread_setname_np("foo"); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define HAVE_PTHREAD_SETNAME_NP_1 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } # 3-arg setname (e.g. NetBSD) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for 3-arg pthread_setname_np" >&5 $as_echo_n "checking for 3-arg pthread_setname_np... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if HAVE_PTHREAD_NP_H # include #endif int main () { return pthread_setname_np(pthread_self(), "foo", NULL); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : $as_echo "#define HAVE_PTHREAD_SETNAME_NP_3 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext # resolv if test -z "${USING_WIN32_FALSE}"; then : for ac_header in resolv.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "resolv.h" "ac_cv_header_resolv_h" "$ac_includes_default" if test "x$ac_cv_header_resolv_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_RESOLV_H 1 _ACEOF fi done am_save_LDFLAGS="$LDFLAGS" RESOLV_LIBS="" acx_resolv_libs="-lresolv -resolv -lc" for lib in $acx_resolv_libs; do acx_resolv_ok=no LDFLAGS="$am_save_LDFLAGS $lib" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for res_init() in $lib" >&5 $as_echo_n "checking for res_init() in $lib... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { res_init() ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : acx_resolv_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_resolv_ok" >&5 $as_echo "$acx_resolv_ok" >&6; } if test x"$acx_resolv_ok" = xyes; then RESOLV_LIBS="$lib" break; fi done if test -z "$RESOLV_LIBS"; then as_fn_error $? "Missing resolv, please install it" "$LINENO" 5 fi # Check for res_ninit ac_fn_cxx_check_decl "$LINENO" "res_ninit" "ac_cv_have_decl_res_ninit" " #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include /* inet_ functions / structs */ #endif #ifdef HAVE_NETINET_IN_H # include /* inet_ functions / structs */ #endif #ifdef HAVE_ARPA_NAMESER_H # include /* DNS HEADER struct */ #endif #ifdef HAVE_RESOLV_H # include #endif " if test "x$ac_cv_have_decl_res_ninit" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_RES_NINIT $ac_have_decl _ACEOF LDFLAGS="$am_save_LDFLAGS" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -lIphlpapi" >&5 $as_echo_n "checking for main in -lIphlpapi... " >&6; } if ${ac_cv_lib_Iphlpapi_main+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lIphlpapi $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { return main (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_Iphlpapi_main=yes else ac_cv_lib_Iphlpapi_main=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_Iphlpapi_main" >&5 $as_echo "$ac_cv_lib_Iphlpapi_main" >&6; } if test "x$ac_cv_lib_Iphlpapi_main" = xyes; then : have_iphlpapi="yes" fi fi # Use equivalent library on windows # uuid # We've had to revert to os matching here because ossp uuid conflicts with the # built in uuid on OS X. # On other platforms, we can use either the OSSP uuid or the one # with e2fsprogs. On top of that the header file is different on different # platforms :(. # default values for everything uuid_CFLAGS= uuid_LIBS= use_ossp_uuid="no" case "${host_os}" in *darwin*) # Running on mac, just use the built in UUID # If we try to use ossp/uuid then we can get conflicts with , if # is #include'd before ossp/uuid.h. The errors take the form: # /opt/local/include/ossp/uuid.h:94: error: conflicting declaration # 'typedef struct uuid_st uuid_t' # /usr/include/unistd.h:133: error: 'uuid_t' has a previous declaration as # 'typedef unsigned char uuid_t [16]' for ac_header in uuid/uuid.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default" if test "x$ac_cv_header_uuid_uuid_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UUID_UUID_H 1 _ACEOF else as_fn_error $? "Missing the uuid library" "$LINENO" 5 fi done ;; *) # non-mac, first look for uuid using pkg-config pkg_config_found_uuid="no" pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for base_uuid" >&5 $as_echo_n "checking for base_uuid... " >&6; } if test -n "$base_uuid_CFLAGS"; then pkg_cv_base_uuid_CFLAGS="$base_uuid_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_base_uuid_CFLAGS=`$PKG_CONFIG --cflags "uuid" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$base_uuid_LIBS"; then pkg_cv_base_uuid_LIBS="$base_uuid_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"uuid\""; } >&5 ($PKG_CONFIG --exists --print-errors "uuid") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_base_uuid_LIBS=`$PKG_CONFIG --libs "uuid" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then base_uuid_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "uuid" 2>&1` else base_uuid_PKG_ERRORS=`$PKG_CONFIG --print-errors "uuid" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$base_uuid_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } true elif test $pkg_failed = untried; then true else base_uuid_CFLAGS=$pkg_cv_base_uuid_CFLAGS base_uuid_LIBS=$pkg_cv_base_uuid_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } pkg_config_found_uuid="yes" fi if test ${pkg_config_found_uuid} = "yes"; then # uuid was found, now we need to determine which uuid library it is. # First modify the CPPFLAGS to use the correct include location. old_cppflags=$CPPFLAGS old_libs=$LIBS CPPFLAGS="${CPPFLAGS} ${base_uuid_CFLAGS}" LIBS="${LIBS} ${base_uuid_LIBS}" # see if we need to include uuid/uuid.h or just uuid.h for ac_header in uuid/uuid.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "uuid/uuid.h" "ac_cv_header_uuid_uuid_h" "$ac_includes_default" if test "x$ac_cv_header_uuid_uuid_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_UUID_UUID_H 1 _ACEOF else true fi done # check if this is actually ossp uuid (this is true in win32) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for uuid_generate in -luuid" >&5 $as_echo_n "checking for uuid_generate in -luuid... " >&6; } if ${ac_cv_lib_uuid_uuid_generate+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-luuid $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char uuid_generate (); int main () { return uuid_generate (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_uuid_uuid_generate=yes else ac_cv_lib_uuid_uuid_generate=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_uuid_uuid_generate" >&5 $as_echo "$ac_cv_lib_uuid_uuid_generate" >&6; } if test "x$ac_cv_lib_uuid_uuid_generate" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBUUID 1 _ACEOF LIBS="-luuid $LIBS" else use_ossp_uuid="yes" fi # restore CPPFLAGS CPPFLAGS=$old_cppflags LIBS=$old_libs uuid_CFLAGS="${base_uuid_CFLAGS}" uuid_LIBS="${base_uuid_LIBS}" else # the uuid pkg wasn't found, let's try ossp-uuid instead pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ossp_uuid" >&5 $as_echo_n "checking for ossp_uuid... " >&6; } if test -n "$ossp_uuid_CFLAGS"; then pkg_cv_ossp_uuid_CFLAGS="$ossp_uuid_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ossp-uuid\""; } >&5 ($PKG_CONFIG --exists --print-errors "ossp-uuid") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ossp_uuid_CFLAGS=`$PKG_CONFIG --cflags "ossp-uuid" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$ossp_uuid_LIBS"; then pkg_cv_ossp_uuid_LIBS="$ossp_uuid_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"ossp-uuid\""; } >&5 ($PKG_CONFIG --exists --print-errors "ossp-uuid") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_ossp_uuid_LIBS=`$PKG_CONFIG --libs "ossp-uuid" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then ossp_uuid_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "ossp-uuid" 2>&1` else ossp_uuid_PKG_ERRORS=`$PKG_CONFIG --print-errors "ossp-uuid" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$ossp_uuid_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "Missing the uuid library" "$LINENO" 5 elif test $pkg_failed = untried; then as_fn_error $? "Missing the uuid library" "$LINENO" 5 else ossp_uuid_CFLAGS=$pkg_cv_ossp_uuid_CFLAGS ossp_uuid_LIBS=$pkg_cv_ossp_uuid_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } use_ossp_uuid="yes" fi # see if we need to include ossp/uuid.h, otherwise fall back to uuid.h for ac_header in ossp/uuid.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "ossp/uuid.h" "ac_cv_header_ossp_uuid_h" "$ac_includes_default" if test "x$ac_cv_header_ossp_uuid_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_OSSP_UUID_H 1 _ACEOF else true fi done uuid_CFLAGS="${ossp_uuid_CFLAGS}" uuid_LIBS="${ossp_uuid_LIBS}" fi ;; esac # now create the variables we actually use. if test "x$use_ossp_uuid" = xyes; then : $as_echo "#define USE_OSSP_UUID 1" >>confdefs.h fi # DNS-SD support # We use either avahi or the Apple DNS-SD library. # Check whether --with-dns-sd was given. if test "${with_dns_sd+set}" = set; then : withval=$with_dns_sd; fi if test "x$with_dns_sd" != "xno"; then # dns_sd ac_fn_cxx_check_header_mongrel "$LINENO" "dns_sd.h" "ac_cv_header_dns_sd_h" "$ac_includes_default" if test "x$ac_cv_header_dns_sd_h" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for library containing DNSServiceRegister" >&5 $as_echo_n "checking for library containing DNSServiceRegister... " >&6; } if ${ac_cv_search_DNSServiceRegister+:} false; then : $as_echo_n "(cached) " >&6 else ac_func_search_save_LIBS=$LIBS cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char DNSServiceRegister (); int main () { return DNSServiceRegister (); ; return 0; } _ACEOF for ac_lib in '' dns_sd; do if test -z "$ac_lib"; then ac_res="none required" else ac_res=-l$ac_lib LIBS="-l$ac_lib $ac_func_search_save_LIBS" fi if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_search_DNSServiceRegister=$ac_res fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext if ${ac_cv_search_DNSServiceRegister+:} false; then : break fi done if ${ac_cv_search_DNSServiceRegister+:} false; then : else ac_cv_search_DNSServiceRegister=no fi rm conftest.$ac_ext LIBS=$ac_func_search_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_search_DNSServiceRegister" >&5 $as_echo "$ac_cv_search_DNSServiceRegister" >&6; } ac_res=$ac_cv_search_DNSServiceRegister if test "$ac_res" != no; then : test "$ac_res" = "none required" || LIBS="$ac_res $LIBS" have_dnssd="yes" fi fi # avahi pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for avahi" >&5 $as_echo_n "checking for avahi... " >&6; } if test -n "$avahi_CFLAGS"; then pkg_cv_avahi_CFLAGS="$avahi_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"avahi-client\""; } >&5 ($PKG_CONFIG --exists --print-errors "avahi-client") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_avahi_CFLAGS=`$PKG_CONFIG --cflags "avahi-client" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$avahi_LIBS"; then pkg_cv_avahi_LIBS="$avahi_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"avahi-client\""; } >&5 ($PKG_CONFIG --exists --print-errors "avahi-client") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_avahi_LIBS=`$PKG_CONFIG --libs "avahi-client" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then avahi_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "avahi-client" 2>&1` else avahi_PKG_ERRORS=`$PKG_CONFIG --print-errors "avahi-client" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$avahi_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } true elif test $pkg_failed = untried; then true else avahi_CFLAGS=$pkg_cv_avahi_CFLAGS avahi_LIBS=$pkg_cv_avahi_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_avahi="yes" fi fi if test "x$have_dnssd" = xyes; then : $as_echo "#define HAVE_DNSSD 1" >>confdefs.h fi if test "x$have_dnssd" = xyes; then HAVE_DNSSD_TRUE= HAVE_DNSSD_FALSE='#' else HAVE_DNSSD_TRUE='#' HAVE_DNSSD_FALSE= fi if test "x$have_avahi" = xyes; then : $as_echo "#define HAVE_AVAHI 1" >>confdefs.h fi if test "x$have_avahi" = xyes; then HAVE_AVAHI_TRUE= HAVE_AVAHI_FALSE='#' else HAVE_AVAHI_TRUE='#' HAVE_AVAHI_FALSE= fi # Look for -lSaleaeDevice, if we have it we build the logic sniffer. for ac_header in SaleaeDeviceApi.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "SaleaeDeviceApi.h" "ac_cv_header_SaleaeDeviceApi_h" "$ac_includes_default" if test "x$ac_cv_header_SaleaeDeviceApi_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SALEAEDEVICEAPI_H 1 _ACEOF fi done libSaleaeDevice_LIBS="-lSaleaeDevice" old_libs=$LIBS LIBS="${LIBS} ${libSaleaeDevice_LIBS}" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { DevicesManagerInterface::RegisterOnConnect(NULL) ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : have_saleae=yes else have_saleae=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$old_libs if test "x$have_saleae" = xno; then : { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: SaleaeDevice library is not usable." >&5 $as_echo "$as_me: WARNING: SaleaeDevice library is not usable." >&2;} fi if test "${have_saleae}" = "yes"; then HAVE_SALEAE_LOGIC_TRUE= HAVE_SALEAE_LOGIC_FALSE='#' else HAVE_SALEAE_LOGIC_TRUE='#' HAVE_SALEAE_LOGIC_FALSE= fi # Features ##################################################### # Cppunit, which is used by the tests. # Check whether --enable-unittests was given. if test "${enable_unittests+set}" = set; then : enableval=$enable_unittests; fi if test "x$enable_unittests" != xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPPUNIT" >&5 $as_echo_n "checking for CPPUNIT... " >&6; } if test -n "$CPPUNIT_CFLAGS"; then pkg_cv_CPPUNIT_CFLAGS="$CPPUNIT_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.9.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "cppunit >= 1.9.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CPPUNIT_CFLAGS=`$PKG_CONFIG --cflags "cppunit >= 1.9.6" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$CPPUNIT_LIBS"; then pkg_cv_CPPUNIT_LIBS="$CPPUNIT_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"cppunit >= 1.9.6\""; } >&5 ($PKG_CONFIG --exists --print-errors "cppunit >= 1.9.6") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_CPPUNIT_LIBS=`$PKG_CONFIG --libs "cppunit >= 1.9.6" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "cppunit >= 1.9.6" 2>&1` else CPPUNIT_PKG_ERRORS=`$PKG_CONFIG --print-errors "cppunit >= 1.9.6" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$CPPUNIT_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "Missing cppunit, please install >= 1.9.6" "$LINENO" 5 elif test $pkg_failed = untried; then as_fn_error $? "Missing cppunit, please install >= 1.9.6" "$LINENO" 5 else CPPUNIT_CFLAGS=$pkg_cv_CPPUNIT_CFLAGS CPPUNIT_LIBS=$pkg_cv_CPPUNIT_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi fi if test "x$enable_unittests" != xno; then BUILD_TESTS_TRUE= BUILD_TESTS_FALSE='#' else BUILD_TESTS_TRUE='#' BUILD_TESTS_FALSE= fi # Optionally install the E1.33 library. # Check whether --enable-e133 was given. if test "${enable_e133+set}" = set; then : enableval=$enable_e133; fi # For now we install the ACN lib if the E1.33 lib is requested if test "x$enable_e133" = xyes; then INSTALL_ACN_TRUE= INSTALL_ACN_FALSE='#' else INSTALL_ACN_TRUE='#' INSTALL_ACN_FALSE= fi if test "x$enable_e133" = xyes; then INSTALL_E133_TRUE= INSTALL_E133_FALSE='#' else INSTALL_E133_TRUE='#' INSTALL_E133_FALSE= fi # Decide if we should build the example programs. # Check whether --enable-examples was given. if test "${enable_examples+set}" = set; then : enableval=$enable_examples; fi if test "x$enable_examples" != xno; then BUILD_EXAMPLES_TRUE= BUILD_EXAMPLES_FALSE='#' else BUILD_EXAMPLES_TRUE='#' BUILD_EXAMPLES_FALSE= fi # Make -Werror non-fatal. By default errors cause the build to abort. We do # this to catch problems early so lets be nice and give the user a work around. # Check whether --enable-fatal-warnings was given. if test "${enable_fatal_warnings+set}" = set; then : enableval=$enable_fatal_warnings; fi if test "x$enable_fatal_warnings" != xno; then FATAL_WARNINGS_TRUE= FATAL_WARNINGS_FALSE='#' else FATAL_WARNINGS_TRUE='#' FATAL_WARNINGS_FALSE= fi # Enable gcov to produce coverage data. # Check whether --enable-gcov was given. if test "${enable_gcov+set}" = set; then : enableval=$enable_gcov; fi if test "x$enable_gcov" = xyes; then : CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage" LIBS="$LIBS -lgcov" fi # Enable HTTP support. This requires libmicrohttpd. # Check whether --enable-http was given. if test "${enable_http+set}" = set; then : enableval=$enable_http; fi have_microhttpd="no" if test "x$enable_http" != xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libmicrohttpd" >&5 $as_echo_n "checking for libmicrohttpd... " >&6; } if test -n "$libmicrohttpd_CFLAGS"; then pkg_cv_libmicrohttpd_CFLAGS="$libmicrohttpd_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmicrohttpd\""; } >&5 ($PKG_CONFIG --exists --print-errors "libmicrohttpd") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libmicrohttpd_CFLAGS=`$PKG_CONFIG --cflags "libmicrohttpd" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libmicrohttpd_LIBS"; then pkg_cv_libmicrohttpd_LIBS="$libmicrohttpd_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libmicrohttpd\""; } >&5 ($PKG_CONFIG --exists --print-errors "libmicrohttpd") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libmicrohttpd_LIBS=`$PKG_CONFIG --libs "libmicrohttpd" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libmicrohttpd_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libmicrohttpd" 2>&1` else libmicrohttpd_PKG_ERRORS=`$PKG_CONFIG --print-errors "libmicrohttpd" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libmicrohttpd_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } true elif test $pkg_failed = untried; then true else libmicrohttpd_CFLAGS=$pkg_cv_libmicrohttpd_CFLAGS libmicrohttpd_LIBS=$pkg_cv_libmicrohttpd_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_microhttpd="yes" fi fi if test "x$enable_http" = xyes && test "x$have_microhttpd" != xyes; then : as_fn_error $? "--enable-http was given but libmicrohttpd was not found." "$LINENO" 5 fi if test "x$have_microhttpd" = xyes; then HAVE_LIBMICROHTTPD_TRUE= HAVE_LIBMICROHTTPD_FALSE='#' else HAVE_LIBMICROHTTPD_TRUE='#' HAVE_LIBMICROHTTPD_FALSE= fi if test "x$have_microhttpd" = xyes; then : $as_echo "#define HAVE_LIBMICROHTTPD 1" >>confdefs.h fi if test "x$have_microhttpd" = xyes; then # Check if we have MHD_create_response_from_buffer old_cflags=$CFLAGS old_libs=$LIBS CFLAGS="${CPPFLAGS} ${libmicrohttpd_CFLAGS}" LIBS="${LIBS} ${libmicrohttpd_LIBS}" for ac_func in MHD_create_response_from_buffer do : ac_fn_cxx_check_func "$LINENO" "MHD_create_response_from_buffer" "ac_cv_func_MHD_create_response_from_buffer" if test "x$ac_cv_func_MHD_create_response_from_buffer" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_MHD_CREATE_RESPONSE_FROM_BUFFER 1 _ACEOF fi done # restore CFLAGS CFLAGS=$old_cflags LIBS=$old_libs fi # Java API, this requires Maven # Check whether --enable-java-libs was given. if test "${enable_java_libs+set}" = set; then : enableval=$enable_java_libs; else enable_java_libs="no" fi if test "x$enable_java_libs" = xyes; then : if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcj", so it can be a program name with args. set dummy ${ac_tool_prefix}gcj; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_JAVA_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVA_CC"; then ac_cv_prog_JAVA_CC="$JAVA_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVA_CC="${ac_tool_prefix}gcj" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi JAVA_CC=$ac_cv_prog_JAVA_CC if test -n "$JAVA_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CC" >&5 $as_echo "$JAVA_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_JAVA_CC"; then ac_ct_JAVA_CC=$JAVA_CC # Extract the first word of "gcj", so it can be a program name with args. set dummy gcj; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_JAVA_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_JAVA_CC"; then ac_cv_prog_ac_ct_JAVA_CC="$ac_ct_JAVA_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_JAVA_CC="gcj" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_JAVA_CC=$ac_cv_prog_ac_ct_JAVA_CC if test -n "$ac_ct_JAVA_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_JAVA_CC" >&5 $as_echo "$ac_ct_JAVA_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_JAVA_CC" = x; then JAVA_CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac JAVA_CC=$ac_ct_JAVA_CC fi else JAVA_CC="$ac_cv_prog_JAVA_CC" fi if test -z "$JAVA_CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}javac", so it can be a program name with args. set dummy ${ac_tool_prefix}javac; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_JAVA_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVA_CC"; then ac_cv_prog_JAVA_CC="$JAVA_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVA_CC="${ac_tool_prefix}javac" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi JAVA_CC=$ac_cv_prog_JAVA_CC if test -n "$JAVA_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CC" >&5 $as_echo "$JAVA_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_JAVA_CC"; then ac_ct_JAVA_CC=$JAVA_CC # Extract the first word of "javac", so it can be a program name with args. set dummy javac; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_JAVA_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_JAVA_CC"; then ac_cv_prog_ac_ct_JAVA_CC="$ac_ct_JAVA_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_JAVA_CC="javac" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_JAVA_CC=$ac_cv_prog_ac_ct_JAVA_CC if test -n "$ac_ct_JAVA_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_JAVA_CC" >&5 $as_echo "$ac_ct_JAVA_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_JAVA_CC" = x; then JAVA_CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac JAVA_CC=$ac_ct_JAVA_CC fi else JAVA_CC="$ac_cv_prog_JAVA_CC" fi fi if test -z "$JAVA_CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}jikes", so it can be a program name with args. set dummy ${ac_tool_prefix}jikes; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_JAVA_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$JAVA_CC"; then ac_cv_prog_JAVA_CC="$JAVA_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_JAVA_CC="${ac_tool_prefix}jikes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi JAVA_CC=$ac_cv_prog_JAVA_CC if test -n "$JAVA_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CC" >&5 $as_echo "$JAVA_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_JAVA_CC"; then ac_ct_JAVA_CC=$JAVA_CC # Extract the first word of "jikes", so it can be a program name with args. set dummy jikes; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_JAVA_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_JAVA_CC"; then ac_cv_prog_ac_ct_JAVA_CC="$ac_ct_JAVA_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_JAVA_CC="jikes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_JAVA_CC=$ac_cv_prog_ac_ct_JAVA_CC if test -n "$ac_ct_JAVA_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_JAVA_CC" >&5 $as_echo "$ac_ct_JAVA_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_JAVA_CC" = x; then JAVA_CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac JAVA_CC=$ac_ct_JAVA_CC fi else JAVA_CC="$ac_cv_prog_JAVA_CC" fi fi if test "$JAVA_CC" = "gcj"; then if test "$GCJ_OPTS" = ""; then GCJ_OPTS=-C fi JAVA_CC_OPTS=@GCJ_OPTS@ fi test -z "$JAVA_CC" && as_fn_error $? "no acceptable java compiler found in \$PATH" "$LINENO" 5 # Extract the first word of "mvn", so it can be a program name with args. set dummy mvn; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_MAVEN+:} false; then : $as_echo_n "(cached) " >&6 else case $MAVEN in [\\/]* | ?:[\\/]*) ac_cv_path_MAVEN="$MAVEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_MAVEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi MAVEN=$ac_cv_path_MAVEN if test -n "$MAVEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAVEN" >&5 $as_echo "$MAVEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$MAVEN" ; then as_fn_error $? "cannot find 'mvn' program, you need to install Maven" "$LINENO" 5; elif test -n "2.2.1" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking mvn version" >&5 $as_echo_n "checking mvn version... " >&6; } maven_version=`$MAVEN --version 2> /dev/null | head -n 1 | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'` required=2.2.1 required_major=`echo $required | sed 's/[^0-9].*//'` required_minor=`echo $required | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'` required_patch=`echo $required | sed 's/^.*[^0-9]//'` actual_major=`echo $maven_version | sed 's/[^0-9].*//'` actual_minor=`echo $maven_version | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'` actual_patch=`echo $maven_version | sed 's/^.*[^0-9]//'` maven_version_proper=`expr \ $actual_major \> $required_major \| \ $actual_major \= $required_major \& \ $actual_minor \> $required_minor \| \ $actual_major \= $required_major \& \ $actual_minor \= $required_minor \& \ $actual_patch \>= $required_patch ` if test "$maven_version_proper" = "1" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $maven_version" >&5 $as_echo "$maven_version" >&6; } else as_fn_error $? "mvn version too old $mavaen_version < $required" "$LINENO" 5; fi fi fi if test "x$enable_java_libs" = xyes; then BUILD_JAVA_LIBS_TRUE= BUILD_JAVA_LIBS_FALSE='#' else BUILD_JAVA_LIBS_TRUE='#' BUILD_JAVA_LIBS_FALSE= fi # Optionally build the Ja Rule tool # Check whether --enable-ja-rule was given. if test "${enable_ja_rule+set}" = set; then : enableval=$enable_ja_rule; fi # libftdi0: this requires libusb-0.1.4+ don't know if I should also # check for it, since the libusb check above is not for 0.1.4 but for libusb-1 # Check whether --enable-libftdi was given. if test "${enable_libftdi+set}" = set; then : enableval=$enable_libftdi; fi have_libftdi0="no" if test "x$enable_libftdi" != xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libftdi0" >&5 $as_echo_n "checking for libftdi0... " >&6; } if test -n "$libftdi0_CFLAGS"; then pkg_cv_libftdi0_CFLAGS="$libftdi0_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libftdi >= 0.18\""; } >&5 ($PKG_CONFIG --exists --print-errors "libftdi >= 0.18") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libftdi0_CFLAGS=`$PKG_CONFIG --cflags "libftdi >= 0.18" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libftdi0_LIBS"; then pkg_cv_libftdi0_LIBS="$libftdi0_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libftdi >= 0.18\""; } >&5 ($PKG_CONFIG --exists --print-errors "libftdi >= 0.18") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libftdi0_LIBS=`$PKG_CONFIG --libs "libftdi >= 0.18" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libftdi0_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libftdi >= 0.18" 2>&1` else libftdi0_PKG_ERRORS=`$PKG_CONFIG --print-errors "libftdi >= 0.18" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libftdi0_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } true elif test $pkg_failed = untried; then true else libftdi0_CFLAGS=$pkg_cv_libftdi0_CFLAGS libftdi0_LIBS=$pkg_cv_libftdi0_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_libftdi0="yes" fi fi if test "x$have_libftdi0" = xyes; then HAVE_LIBFTDI0_TRUE= HAVE_LIBFTDI0_FALSE='#' else HAVE_LIBFTDI0_TRUE='#' HAVE_LIBFTDI0_FALSE= fi if test "x$have_libftdi0" = xyes; then : $as_echo "#define HAVE_LIBFTDI0 1" >>confdefs.h fi have_libftdi1="no" if test "x$enable_libftdi" != xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libftdi1" >&5 $as_echo_n "checking for libftdi1... " >&6; } if test -n "$libftdi1_CFLAGS"; then pkg_cv_libftdi1_CFLAGS="$libftdi1_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libftdi1 >= 1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libftdi1 >= 1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libftdi1_CFLAGS=`$PKG_CONFIG --cflags "libftdi1 >= 1.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libftdi1_LIBS"; then pkg_cv_libftdi1_LIBS="$libftdi1_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libftdi1 >= 1.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "libftdi1 >= 1.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libftdi1_LIBS=`$PKG_CONFIG --libs "libftdi1 >= 1.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libftdi1_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libftdi1 >= 1.0" 2>&1` else libftdi1_PKG_ERRORS=`$PKG_CONFIG --print-errors "libftdi1 >= 1.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libftdi1_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } true elif test $pkg_failed = untried; then true else libftdi1_CFLAGS=$pkg_cv_libftdi1_CFLAGS libftdi1_LIBS=$pkg_cv_libftdi1_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_libftdi1="yes" fi fi if test "x$have_libftdi1" = xyes; then HAVE_LIBFTDI1_TRUE= HAVE_LIBFTDI1_FALSE='#' else HAVE_LIBFTDI1_TRUE='#' HAVE_LIBFTDI1_FALSE= fi if test "x$have_libftdi1" = xyes; then : $as_echo "#define HAVE_LIBFTDI1 1" >>confdefs.h fi have_libftdi="no" if test "x$have_libftdi0" = xyes || test "x$have_libftdi1" = xyes; then have_libftdi="yes" fi if test "x$have_libftdi" = xyes; then : $as_echo "#define HAVE_LIBFTDI 1" >>confdefs.h fi # libusb # Check whether --enable-libusb was given. if test "${enable_libusb+set}" = set; then : enableval=$enable_libusb; fi have_libusb="no" if test "x$enable_libusb" != xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb" >&5 $as_echo_n "checking for libusb... " >&6; } if test -n "$libusb_CFLAGS"; then pkg_cv_libusb_CFLAGS="$libusb_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0 >= 1.0.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "libusb-1.0 >= 1.0.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libusb_CFLAGS=`$PKG_CONFIG --cflags "libusb-1.0 >= 1.0.2" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libusb_LIBS"; then pkg_cv_libusb_LIBS="$libusb_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0 >= 1.0.2\""; } >&5 ($PKG_CONFIG --exists --print-errors "libusb-1.0 >= 1.0.2") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libusb_LIBS=`$PKG_CONFIG --libs "libusb-1.0 >= 1.0.2" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libusb_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libusb-1.0 >= 1.0.2" 2>&1` else libusb_PKG_ERRORS=`$PKG_CONFIG --print-errors "libusb-1.0 >= 1.0.2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libusb_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } true elif test $pkg_failed = untried; then true else libusb_CFLAGS=$pkg_cv_libusb_CFLAGS libusb_LIBS=$pkg_cv_libusb_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_libusb="yes" fi fi if test "x$have_libusb" = xyes; then : $as_echo "#define HAVE_LIBUSB 1" >>confdefs.h fi have_libusb_error_name="no" if test "x$enable_libusb" != xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb_error_name" >&5 $as_echo_n "checking for libusb_error_name... " >&6; } if test -n "$libusb_error_name_CFLAGS"; then pkg_cv_libusb_error_name_CFLAGS="$libusb_error_name_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0 >= 1.0.9\""; } >&5 ($PKG_CONFIG --exists --print-errors "libusb-1.0 >= 1.0.9") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libusb_error_name_CFLAGS=`$PKG_CONFIG --cflags "libusb-1.0 >= 1.0.9" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libusb_error_name_LIBS"; then pkg_cv_libusb_error_name_LIBS="$libusb_error_name_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0 >= 1.0.9\""; } >&5 ($PKG_CONFIG --exists --print-errors "libusb-1.0 >= 1.0.9") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libusb_error_name_LIBS=`$PKG_CONFIG --libs "libusb-1.0 >= 1.0.9" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libusb_error_name_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libusb-1.0 >= 1.0.9" 2>&1` else libusb_error_name_PKG_ERRORS=`$PKG_CONFIG --print-errors "libusb-1.0 >= 1.0.9" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libusb_error_name_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } true elif test $pkg_failed = untried; then true else libusb_error_name_CFLAGS=$pkg_cv_libusb_error_name_CFLAGS libusb_error_name_LIBS=$pkg_cv_libusb_error_name_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_libusb_error_name="yes" fi fi if test "x$have_libusb_error_name" = xyes; then : $as_echo "#define HAVE_LIBUSB_ERROR_NAME 1" >>confdefs.h fi have_libusb_hotplug_api="no" if test "x$enable_libusb" != xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb_hotplug_api" >&5 $as_echo_n "checking for libusb_hotplug_api... " >&6; } if test -n "$libusb_hotplug_api_CFLAGS"; then pkg_cv_libusb_hotplug_api_CFLAGS="$libusb_hotplug_api_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0 >= 1.0.16\""; } >&5 ($PKG_CONFIG --exists --print-errors "libusb-1.0 >= 1.0.16") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libusb_hotplug_api_CFLAGS=`$PKG_CONFIG --cflags "libusb-1.0 >= 1.0.16" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libusb_hotplug_api_LIBS"; then pkg_cv_libusb_hotplug_api_LIBS="$libusb_hotplug_api_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0 >= 1.0.16\""; } >&5 ($PKG_CONFIG --exists --print-errors "libusb-1.0 >= 1.0.16") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libusb_hotplug_api_LIBS=`$PKG_CONFIG --libs "libusb-1.0 >= 1.0.16" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libusb_hotplug_api_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libusb-1.0 >= 1.0.16" 2>&1` else libusb_hotplug_api_PKG_ERRORS=`$PKG_CONFIG --print-errors "libusb-1.0 >= 1.0.16" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libusb_hotplug_api_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } true elif test $pkg_failed = untried; then true else libusb_hotplug_api_CFLAGS=$pkg_cv_libusb_hotplug_api_CFLAGS libusb_hotplug_api_LIBS=$pkg_cv_libusb_hotplug_api_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_libusb_hotplug_api="yes" fi fi if test "x$have_libusb_hotplug_api" = xyes; then : $as_echo "#define HAVE_LIBUSB_HOTPLUG_API 1" >>confdefs.h fi if test "x$have_libusb_hotplug_api" = xyes; then HAVE_LIBUSB_HOTPLUG_API_TRUE= HAVE_LIBUSB_HOTPLUG_API_FALSE='#' else HAVE_LIBUSB_HOTPLUG_API_TRUE='#' HAVE_LIBUSB_HOTPLUG_API_FALSE= fi have_libusb_set_option="no" if test "x$enable_libusb" != xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libusb_set_option" >&5 $as_echo_n "checking for libusb_set_option... " >&6; } if test -n "$libusb_set_option_CFLAGS"; then pkg_cv_libusb_set_option_CFLAGS="$libusb_set_option_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0 >= 1.0.22\""; } >&5 ($PKG_CONFIG --exists --print-errors "libusb-1.0 >= 1.0.22") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libusb_set_option_CFLAGS=`$PKG_CONFIG --cflags "libusb-1.0 >= 1.0.22" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libusb_set_option_LIBS"; then pkg_cv_libusb_set_option_LIBS="$libusb_set_option_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libusb-1.0 >= 1.0.22\""; } >&5 ($PKG_CONFIG --exists --print-errors "libusb-1.0 >= 1.0.22") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libusb_set_option_LIBS=`$PKG_CONFIG --libs "libusb-1.0 >= 1.0.22" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libusb_set_option_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libusb-1.0 >= 1.0.22" 2>&1` else libusb_set_option_PKG_ERRORS=`$PKG_CONFIG --print-errors "libusb-1.0 >= 1.0.22" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libusb_set_option_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } true elif test $pkg_failed = untried; then true else libusb_set_option_CFLAGS=$pkg_cv_libusb_set_option_CFLAGS libusb_set_option_LIBS=$pkg_cv_libusb_set_option_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_libusb_set_option="yes" fi fi if test "x$have_libusb_set_option" = xyes; then : $as_echo "#define HAVE_LIBUSB_SET_OPTION 1" >>confdefs.h fi if test "x$have_libusb_set_option" = xyes; then HAVE_LIBUSB_SET_OPTION_TRUE= HAVE_LIBUSB_SET_OPTION_FALSE='#' else HAVE_LIBUSB_SET_OPTION_TRUE='#' HAVE_LIBUSB_SET_OPTION_FALSE= fi # UART direct plugin # Check whether --enable-uart was given. if test "${enable_uart+set}" = set; then : enableval=$enable_uart; fi have_uart="no" if test "x$enable_uart" != xno; then : for ac_header in asm/termios.h do : ac_fn_cxx_check_header_mongrel "$LINENO" "asm/termios.h" "ac_cv_header_asm_termios_h" "$ac_includes_default" if test "x$ac_cv_header_asm_termios_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ASM_TERMIOS_H 1 _ACEOF have_uart="yes" else true fi done fi if test "x$have_uart" = xyes; then : $as_echo "#define HAVE_UART 1" >>confdefs.h fi # OSC Support. # look for liblo if the user asked us to # Check whether --enable-osc was given. if test "${enable_osc+set}" = set; then : enableval=$enable_osc; fi have_liblo="no" if test "x$enable_osc" != xno; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for liblo" >&5 $as_echo_n "checking for liblo... " >&6; } if test -n "$liblo_CFLAGS"; then pkg_cv_liblo_CFLAGS="$liblo_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblo >= 0.26\""; } >&5 ($PKG_CONFIG --exists --print-errors "liblo >= 0.26") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_liblo_CFLAGS=`$PKG_CONFIG --cflags "liblo >= 0.26" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$liblo_LIBS"; then pkg_cv_liblo_LIBS="$liblo_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"liblo >= 0.26\""; } >&5 ($PKG_CONFIG --exists --print-errors "liblo >= 0.26") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_liblo_LIBS=`$PKG_CONFIG --libs "liblo >= 0.26" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then liblo_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "liblo >= 0.26" 2>&1` else liblo_PKG_ERRORS=`$PKG_CONFIG --print-errors "liblo >= 0.26" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$liblo_PKG_ERRORS" >&5 { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } true elif test $pkg_failed = untried; then true else liblo_CFLAGS=$pkg_cv_liblo_CFLAGS liblo_LIBS=$pkg_cv_liblo_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } have_liblo="yes" fi fi if test "x$have_liblo" = xyes; then : $as_echo "#define HAVE_LIBLO 1" >>confdefs.h fi # Python API # Check whether --enable-python-libs was given. if test "${enable_python_libs+set}" = set; then : enableval=$enable_python_libs; else enable_python_libs="no" fi # RDM tests, if requested this enables the Python API as well. # Check whether --enable-rdm-tests was given. if test "${enable_rdm_tests+set}" = set; then : enableval=$enable_rdm_tests; else enable_rdm_tests="no" fi if test "x$enable_rdm_tests" = xyes; then : enable_python_libs="yes" fi if test "x$enable_rdm_tests" = xyes; then INSTALL_RDM_TESTS_TRUE= INSTALL_RDM_TESTS_FALSE='#' else INSTALL_RDM_TESTS_TRUE='#' INSTALL_RDM_TESTS_FALSE= fi # By default olad refuses to run as root. However some people want to use root # for embedded platforms so we give them an option. # Check whether --enable-root-check was given. if test "${enable_root_check+set}" = set; then : enableval=$enable_root_check; fi if test "x$enable_root_check" = xno; then : $as_echo "#define OLAD_SKIP_ROOT_CHECK 1" >>confdefs.h fi # Use tcmalloc. This is used by the buildbot leak checks. # Check whether --enable-tcmalloc was given. if test "${enable_tcmalloc+set}" = set; then : enableval=$enable_tcmalloc; fi if test "x$enable_tcmalloc" = xyes; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for malloc in -ltcmalloc" >&5 $as_echo_n "checking for malloc in -ltcmalloc... " >&6; } if ${ac_cv_lib_tcmalloc_malloc+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ltcmalloc $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char malloc (); int main () { return malloc (); ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : ac_cv_lib_tcmalloc_malloc=yes else ac_cv_lib_tcmalloc_malloc=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_tcmalloc_malloc" >&5 $as_echo "$ac_cv_lib_tcmalloc_malloc" >&6; } if test "x$ac_cv_lib_tcmalloc_malloc" = xyes; then : LDFLAGS="$LDFLAGS -ltcmalloc" else as_fn_error $? "tcmalloc not found, but enabled on command line" "$LINENO" 5 fi fi # Optionally set the Doxygen version to "Latest Git" for website latest # version. # Check whether --enable-doxygen-version was given. if test "${enable_doxygen_version+set}" = set; then : enableval=$enable_doxygen_version; fi # UUCP Lock directory # Check whether --with-uucp-lock was given. if test "${with_uucp_lock+set}" = set; then : withval=$with_uucp_lock; fi # Try to locate the UUCP lock path. UUCPLOCK="" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for serial port lock directory" >&5 $as_echo_n "checking for serial port lock directory... " >&6; } # This list is from the minicom configs, The Filesystem Hierarchy Standard says # /var/lock is the one true source. for ac_uucplock in /var/lock /etc/locks /usr/spool/locks /var/spool/locks /var/spool/lock /usr/spool/uucp /var/spool/uucp /var/run; do if test -d $ac_uucplock; then : UUCPLOCK=$ac_uucplock; break fi done # Mac stores the lock files in /tmp case "${host_os}" in *darwin*) UUCPLOCK=/tmp ;; esac if test "x$with_uucp_lock" != x; then : UUCPLOCK=$with_uucp_lock fi if test -d $UUCPLOCK; then : cat >>confdefs.h <<_ACEOF #define UUCP_LOCK_DIR "$UUCPLOCK" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UUCPLOCK" >&5 $as_echo "$UUCPLOCK" >&6; } else as_fn_error $? "no suitable lock directory" "$LINENO" 5 fi # Python wrappers & RDM Responder tests. ##################################################### if test "x$enable_python_libs" = xyes; then BUILD_PYTHON_LIBS_TRUE= BUILD_PYTHON_LIBS_FALSE='#' else BUILD_PYTHON_LIBS_TRUE='#' BUILD_PYTHON_LIBS_FALSE= fi if test "${enable_python_libs}" = "yes"; then : if test -n "$PYTHON"; then # If the user set $PYTHON, use it and don't search something else. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $PYTHON version is >= 2.6" >&5 $as_echo_n "checking whether $PYTHON version is >= 2.6... " >&6; } prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $PYTHON -c "$prog"" >&5 ($PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } as_fn_error $? "Python interpreter is too old" "$LINENO" 5 fi am_display_PYTHON=$PYTHON else # Otherwise, try each interpreter until we find one that satisfies # VERSION. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a Python interpreter with version >= 2.6" >&5 $as_echo_n "checking for a Python interpreter with version >= 2.6... " >&6; } if ${am_cv_pathless_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else for am_cv_pathless_PYTHON in python python2 python3 python3.3 python3.2 python3.1 python3.0 python2.7 python2.6 python2.5 python2.4 python2.3 python2.2 python2.1 python2.0 none; do test "$am_cv_pathless_PYTHON" = none && break prog="import sys # split strings by '.' and convert to numeric. Append some zeros # because we need at least 4 digits for the hex conversion. # map returns an iterator in Python 3.0 and a list in 2.x minver = list(map(int, '2.6'.split('.'))) + [0, 0, 0] minverhex = 0 # xrange is not present in Python 3.0 and range returns an iterator for i in list(range(0, 4)): minverhex = (minverhex << 8) + minver[i] sys.exit(sys.hexversion < minverhex)" if { echo "$as_me:$LINENO: $am_cv_pathless_PYTHON -c "$prog"" >&5 ($am_cv_pathless_PYTHON -c "$prog") >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); }; then : break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_pathless_PYTHON" >&5 $as_echo "$am_cv_pathless_PYTHON" >&6; } # Set $PYTHON to the absolute path of $am_cv_pathless_PYTHON. if test "$am_cv_pathless_PYTHON" = none; then PYTHON=: else # Extract the first word of "$am_cv_pathless_PYTHON", so it can be a program name with args. set dummy $am_cv_pathless_PYTHON; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PYTHON+:} false; then : $as_echo_n "(cached) " >&6 else case $PYTHON in [\\/]* | ?:[\\/]*) ac_cv_path_PYTHON="$PYTHON" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PYTHON="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PYTHON=$ac_cv_path_PYTHON if test -n "$PYTHON"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PYTHON" >&5 $as_echo "$PYTHON" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi am_display_PYTHON=$am_cv_pathless_PYTHON fi if test "$PYTHON" = :; then as_fn_error $? "no suitable Python interpreter found" "$LINENO" 5 else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON version" >&5 $as_echo_n "checking for $am_display_PYTHON version... " >&6; } if ${am_cv_python_version+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_version=`$PYTHON -c "import sys; sys.stdout.write(sys.version[:3])"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_version" >&5 $as_echo "$am_cv_python_version" >&6; } PYTHON_VERSION=$am_cv_python_version PYTHON_PREFIX='${prefix}' PYTHON_EXEC_PREFIX='${exec_prefix}' { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON platform" >&5 $as_echo_n "checking for $am_display_PYTHON platform... " >&6; } if ${am_cv_python_platform+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_python_platform=`$PYTHON -c "import sys; sys.stdout.write(sys.platform)"` fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_platform" >&5 $as_echo "$am_cv_python_platform" >&6; } PYTHON_PLATFORM=$am_cv_python_platform # Just factor out some code duplication. am_python_setup_sysconfig="\ import sys # Prefer sysconfig over distutils.sysconfig, for better compatibility # with python 3.x. See automake bug#10227. try: import sysconfig except ImportError: can_use_sysconfig = 0 else: can_use_sysconfig = 1 # Can't use sysconfig in CPython 2.7, since it's broken in virtualenvs: # try: from platform import python_implementation if python_implementation() == 'CPython' and sys.version[:3] == '2.7': can_use_sysconfig = 0 except ImportError: pass" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON script directory" >&5 $as_echo_n "checking for $am_display_PYTHON script directory... " >&6; } if ${am_cv_python_pythondir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$prefix" = xNONE then am_py_prefix=$ac_default_prefix else am_py_prefix=$prefix fi am_cv_python_pythondir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('purelib', vars={'base':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(0, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pythondir in $am_py_prefix*) am__strip_prefix=`echo "$am_py_prefix" | sed 's|.|.|g'` am_cv_python_pythondir=`echo "$am_cv_python_pythondir" | sed "s,^$am__strip_prefix,$PYTHON_PREFIX,"` ;; *) case $am_py_prefix in /usr|/System*) ;; *) am_cv_python_pythondir=$PYTHON_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pythondir" >&5 $as_echo "$am_cv_python_pythondir" >&6; } pythondir=$am_cv_python_pythondir pkgpythondir=\${pythondir}/$PACKAGE { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $am_display_PYTHON extension module directory" >&5 $as_echo_n "checking for $am_display_PYTHON extension module directory... " >&6; } if ${am_cv_python_pyexecdir+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$exec_prefix" = xNONE then am_py_exec_prefix=$am_py_prefix else am_py_exec_prefix=$exec_prefix fi am_cv_python_pyexecdir=`$PYTHON -c " $am_python_setup_sysconfig if can_use_sysconfig: sitedir = sysconfig.get_path('platlib', vars={'platbase':'$am_py_prefix'}) else: from distutils import sysconfig sitedir = sysconfig.get_python_lib(1, 0, prefix='$am_py_prefix') sys.stdout.write(sitedir)"` case $am_cv_python_pyexecdir in $am_py_exec_prefix*) am__strip_prefix=`echo "$am_py_exec_prefix" | sed 's|.|.|g'` am_cv_python_pyexecdir=`echo "$am_cv_python_pyexecdir" | sed "s,^$am__strip_prefix,$PYTHON_EXEC_PREFIX,"` ;; *) case $am_py_exec_prefix in /usr|/System*) ;; *) am_cv_python_pyexecdir=$PYTHON_EXEC_PREFIX/lib/python$PYTHON_VERSION/site-packages ;; esac ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_python_pyexecdir" >&5 $as_echo "$am_cv_python_pyexecdir" >&6; } pyexecdir=$am_cv_python_pyexecdir pkgpyexecdir=\${pyexecdir}/$PACKAGE fi if test -z $PYTHON; then : PYTHON="python" fi PYTHON_NAME=`basename $PYTHON` { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON_NAME module: google.protobuf" >&5 $as_echo_n "checking for $PYTHON_NAME module: google.protobuf... " >&6; } if ${ac_cv_have_pymod_google_protobuf+:} false; then : $as_echo_n "(cached) " >&6 else $PYTHON -c "import google.protobuf" 2>/dev/null if test $? -eq 0; then eval HAVE_PYMOD_GOOGLE_PROTOBUF=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } eval HAVE_PYMOD_GOOGLE_PROTOBUF=no # if test -n "fatal" then as_fn_error $? "failed to find required module google.protobuf" "$LINENO" 5 fi fi eval ac_cv_have_pymod_google_protobuf=\$HAVE_PYMOD_GOOGLE_PROTOBUF fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pymod_google_protobuf" >&5 $as_echo "$ac_cv_have_pymod_google_protobuf" >&6; } fi if test "${enable_rdm_tests}" = "yes"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $PYTHON_NAME module: numpy" >&5 $as_echo_n "checking for $PYTHON_NAME module: numpy... " >&6; } if ${ac_cv_have_pymod_numpy+:} false; then : $as_echo_n "(cached) " >&6 else $PYTHON -c "import numpy" 2>/dev/null if test $? -eq 0; then eval HAVE_PYMOD_NUMPY=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } eval HAVE_PYMOD_NUMPY=no # if test -n "fatal" then as_fn_error $? "failed to find required module numpy" "$LINENO" 5 fi fi eval ac_cv_have_pymod_numpy=\$HAVE_PYMOD_NUMPY fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_have_pymod_numpy" >&5 $as_echo "$ac_cv_have_pymod_numpy" >&6; } fi # Check if the flake8 python linter is available # Extract the first word of "flake8", so it can be a program name with args. set dummy flake8; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_flake8+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$flake8"; then ac_cv_prog_flake8="$flake8" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_flake8="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_flake8" && ac_cv_prog_flake8="no" fi fi flake8=$ac_cv_prog_flake8 if test -n "$flake8"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flake8" >&5 $as_echo "$flake8" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$flake8" = xyes; then FOUND_FLAKE8_TRUE= FOUND_FLAKE8_FALSE='#' else FOUND_FLAKE8_TRUE='#' FOUND_FLAKE8_FALSE= fi # Libraries, that depend on the feature args above. ##################################################### # LIBRARY: protobuf # We require 2.4.0 for the java libs if test "x$build_java_libs" = xyes; then : pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libprotobuf" >&5 $as_echo_n "checking for libprotobuf... " >&6; } if test -n "$libprotobuf_CFLAGS"; then pkg_cv_libprotobuf_CFLAGS="$libprotobuf_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"protobuf >= 2.4.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "protobuf >= 2.4.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libprotobuf_CFLAGS=`$PKG_CONFIG --cflags "protobuf >= 2.4.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libprotobuf_LIBS"; then pkg_cv_libprotobuf_LIBS="$libprotobuf_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"protobuf >= 2.4.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "protobuf >= 2.4.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libprotobuf_LIBS=`$PKG_CONFIG --libs "protobuf >= 2.4.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libprotobuf_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "protobuf >= 2.4.0" 2>&1` else libprotobuf_PKG_ERRORS=`$PKG_CONFIG --print-errors "protobuf >= 2.4.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libprotobuf_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (protobuf >= 2.4.0) were not met: $libprotobuf_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables libprotobuf_CFLAGS and libprotobuf_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables libprotobuf_CFLAGS and libprotobuf_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else libprotobuf_CFLAGS=$pkg_cv_libprotobuf_CFLAGS libprotobuf_LIBS=$pkg_cv_libprotobuf_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi # Check whether --with-protoc was given. if test "${with_protoc+set}" = set; then : withval=$with_protoc; else with_protoc=no fi if test "$with_protoc" != "no"; then PROTOC=$with_protoc; echo "set protoc to $with_protoc" else # Extract the first word of "protoc", so it can be a program name with args. set dummy protoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PROTOC+:} false; then : $as_echo_n "(cached) " >&6 else case $PROTOC in [\\/]* | ?:[\\/]*) ac_cv_path_PROTOC="$PROTOC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PROTOC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PROTOC=$ac_cv_path_PROTOC if test -n "$PROTOC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC" >&5 $as_echo "$PROTOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$PROTOC" ; then as_fn_error $? "cannot find 'protoc' program" "$LINENO" 5; elif test -n "2.4.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking protoc version" >&5 $as_echo_n "checking protoc version... " >&6; } protoc_version=`$PROTOC --version 2>&1 | grep 'libprotoc' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'` required=2.4.0 required_major=`echo $required | sed 's/[^0-9].*//'` required_minor=`echo $required | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'` required_patch=`echo $required | sed 's/^.*[^0-9]//'` actual_major=`echo $protoc_version | sed 's/[^0-9].*//'` actual_minor=`echo $protoc_version | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'` actual_patch=`echo $protoc_version | sed 's/^.*[^0-9]//'` protoc_version_proper=`expr \ $actual_major \> $required_major \| \ $actual_major \= $required_major \& \ $actual_minor \> $required_minor \| \ $actual_major \= $required_major \& \ $actual_minor \= $required_minor \& \ $actual_patch \>= $required_patch ` if test "$protoc_version_proper" = "1" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $protoc_version" >&5 $as_echo "$protoc_version" >&6; } else as_fn_error $? "protoc version too old $protoc_version < $required" "$LINENO" 5; fi fi # Check whether --with-ola-protoc-plugin was given. if test "${with_ola_protoc_plugin+set}" = set; then : withval=$with_ola_protoc_plugin; else with_ola_protoc_plugin=no fi if test "$with_ola_protoc_plugin" != "no"; then OLA_PROTOC="$PROTOC --plugin=protoc-gen-cppservice=${with_ola_protoc_plugin}"; echo "set ola_protoc to $OLA_PROTOC" else OLA_PROTOC="$PROTOC --plugin=protoc-gen-cppservice=\$(top_builddir)/protoc/ola_protoc_plugin${EXEEXT}"; ac_fn_cxx_check_header_mongrel "$LINENO" "google/protobuf/compiler/command_line_interface.h" "ac_cv_header_google_protobuf_compiler_command_line_interface_h" "$ac_includes_default" if test "x$ac_cv_header_google_protobuf_compiler_command_line_interface_h" = xyes; then : else as_fn_error $? "Cannot find the protoc header files" "$LINENO" 5 fi SAVED_LIBS=$LIBS LIBS="$LIBS -lprotoc" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { google::protobuf::compiler::CommandLineInterface cli ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : TEST_LIBS="$TEST_LIBS -lprotoc" else as_fn_error $? "cannot find libprotoc" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$SAVED_LIBS fi if test "${with_ola_protoc_plugin}" = "no"; then BUILD_OLA_PROTOC_PLUGIN_TRUE= BUILD_OLA_PROTOC_PLUGIN_FALSE='#' else BUILD_OLA_PROTOC_PLUGIN_TRUE='#' BUILD_OLA_PROTOC_PLUGIN_FALSE= fi else pkg_failed=no { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libprotobuf" >&5 $as_echo_n "checking for libprotobuf... " >&6; } if test -n "$libprotobuf_CFLAGS"; then pkg_cv_libprotobuf_CFLAGS="$libprotobuf_CFLAGS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"protobuf >= 2.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "protobuf >= 2.3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libprotobuf_CFLAGS=`$PKG_CONFIG --cflags "protobuf >= 2.3.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test -n "$libprotobuf_LIBS"; then pkg_cv_libprotobuf_LIBS="$libprotobuf_LIBS" elif test -n "$PKG_CONFIG"; then if test -n "$PKG_CONFIG" && \ { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"protobuf >= 2.3.0\""; } >&5 ($PKG_CONFIG --exists --print-errors "protobuf >= 2.3.0") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then pkg_cv_libprotobuf_LIBS=`$PKG_CONFIG --libs "protobuf >= 2.3.0" 2>/dev/null` else pkg_failed=yes fi else pkg_failed=untried fi if test $pkg_failed = yes; then if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi if test $_pkg_short_errors_supported = yes; then libprotobuf_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "protobuf >= 2.3.0" 2>&1` else libprotobuf_PKG_ERRORS=`$PKG_CONFIG --print-errors "protobuf >= 2.3.0" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$libprotobuf_PKG_ERRORS" >&5 as_fn_error $? "Package requirements (protobuf >= 2.3.0) were not met: $libprotobuf_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. Alternatively, you may set the environment variables libprotobuf_CFLAGS and libprotobuf_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. " "$LINENO" 5 elif test $pkg_failed = untried; then { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. Alternatively, you may set the environment variables libprotobuf_CFLAGS and libprotobuf_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details. To get pkg-config, see . See \`config.log' for more details" "$LINENO" 5; } else libprotobuf_CFLAGS=$pkg_cv_libprotobuf_CFLAGS libprotobuf_LIBS=$pkg_cv_libprotobuf_LIBS { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } : fi # Check whether --with-protoc was given. if test "${with_protoc+set}" = set; then : withval=$with_protoc; else with_protoc=no fi if test "$with_protoc" != "no"; then PROTOC=$with_protoc; echo "set protoc to $with_protoc" else # Extract the first word of "protoc", so it can be a program name with args. set dummy protoc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PROTOC+:} false; then : $as_echo_n "(cached) " >&6 else case $PROTOC in [\\/]* | ?:[\\/]*) ac_cv_path_PROTOC="$PROTOC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PROTOC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PROTOC=$ac_cv_path_PROTOC if test -n "$PROTOC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PROTOC" >&5 $as_echo "$PROTOC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$PROTOC" ; then as_fn_error $? "cannot find 'protoc' program" "$LINENO" 5; elif test -n "2.3.0" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking protoc version" >&5 $as_echo_n "checking protoc version... " >&6; } protoc_version=`$PROTOC --version 2>&1 | grep 'libprotoc' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'` required=2.3.0 required_major=`echo $required | sed 's/[^0-9].*//'` required_minor=`echo $required | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'` required_patch=`echo $required | sed 's/^.*[^0-9]//'` actual_major=`echo $protoc_version | sed 's/[^0-9].*//'` actual_minor=`echo $protoc_version | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'` actual_patch=`echo $protoc_version | sed 's/^.*[^0-9]//'` protoc_version_proper=`expr \ $actual_major \> $required_major \| \ $actual_major \= $required_major \& \ $actual_minor \> $required_minor \| \ $actual_major \= $required_major \& \ $actual_minor \= $required_minor \& \ $actual_patch \>= $required_patch ` if test "$protoc_version_proper" = "1" ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $protoc_version" >&5 $as_echo "$protoc_version" >&6; } else as_fn_error $? "protoc version too old $protoc_version < $required" "$LINENO" 5; fi fi # Check whether --with-ola-protoc-plugin was given. if test "${with_ola_protoc_plugin+set}" = set; then : withval=$with_ola_protoc_plugin; else with_ola_protoc_plugin=no fi if test "$with_ola_protoc_plugin" != "no"; then OLA_PROTOC="$PROTOC --plugin=protoc-gen-cppservice=${with_ola_protoc_plugin}"; echo "set ola_protoc to $OLA_PROTOC" else OLA_PROTOC="$PROTOC --plugin=protoc-gen-cppservice=\$(top_builddir)/protoc/ola_protoc_plugin${EXEEXT}"; ac_fn_cxx_check_header_mongrel "$LINENO" "google/protobuf/compiler/command_line_interface.h" "ac_cv_header_google_protobuf_compiler_command_line_interface_h" "$ac_includes_default" if test "x$ac_cv_header_google_protobuf_compiler_command_line_interface_h" = xyes; then : else as_fn_error $? "Cannot find the protoc header files" "$LINENO" 5 fi SAVED_LIBS=$LIBS LIBS="$LIBS -lprotoc" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { google::protobuf::compiler::CommandLineInterface cli ; return 0; } _ACEOF if ac_fn_cxx_try_link "$LINENO"; then : TEST_LIBS="$TEST_LIBS -lprotoc" else as_fn_error $? "cannot find libprotoc" "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$SAVED_LIBS fi if test "${with_ola_protoc_plugin}" = "no"; then BUILD_OLA_PROTOC_PLUGIN_TRUE= BUILD_OLA_PROTOC_PLUGIN_FALSE='#' else BUILD_OLA_PROTOC_PLUGIN_TRUE='#' BUILD_OLA_PROTOC_PLUGIN_FALSE= fi fi # Version 3.7 and above of protoc require some additional includes for ac_header in google/protobuf/io/strtod.h google/protobuf/stubs/logging.h \ google/protobuf/stubs/stl_util.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done # Doxygen ##################################################### # Check whether --enable-doxygen-verbose was given. if test "${enable_doxygen_verbose+set}" = set; then : enableval=$enable_doxygen_verbose; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_verbose=1 ;; #( n|N|no|No|NO) DX_FLAG_verbose=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-verbose" "$LINENO" 5 ;; esac else DX_FLAG_verbose=0 fi if test "$DX_FLAG_verbose" = 1; then : fi if test "$DX_FLAG_verbose" = 1; then DX_COND_verbose_TRUE= DX_COND_verbose_FALSE='#' else DX_COND_verbose_TRUE='#' DX_COND_verbose_FALSE= fi if test "$DX_FLAG_verbose" = 1; then DX_ENV="$DX_ENV QUIET='NO'" : else DX_ENV="$DX_ENV QUIET='YES'" : fi doxygen_project_number=$PACKAGE_VERSION if test "x$enable_doxygen_version" = xno; then : doxygen_project_number="Latest Git" fi DX_ENV="$DX_ENV PROJECT_NUMBER='$doxygen_project_number'" # Files: DX_PROJECT=$PACKAGE_NAME DX_CONFIG=Doxyfile DX_DOCDIR=doxygen-doc # Environment variables used inside doxygen.cfg: DX_ENV="$DX_ENV SRCDIR='$srcdir'" DX_ENV="$DX_ENV PROJECT='$DX_PROJECT'" DX_ENV="$DX_ENV DOCDIR='$DX_DOCDIR'" DX_ENV="$DX_ENV VERSION='$PACKAGE_VERSION'" # Doxygen itself: # Check whether --enable-doxygen-doc was given. if test "${enable_doxygen_doc+set}" = set; then : enableval=$enable_doxygen_doc; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_doc=1 ;; #( n|N|no|No|NO) DX_FLAG_doc=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-doc" "$LINENO" 5 ;; esac else DX_FLAG_doc=1 fi if test "$DX_FLAG_doc" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}doxygen", so it can be a program name with args. set dummy ${ac_tool_prefix}doxygen; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOXYGEN="$DX_DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_DOXYGEN=$ac_cv_path_DX_DOXYGEN if test -n "$DX_DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DOXYGEN" >&5 $as_echo "$DX_DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_DOXYGEN"; then ac_pt_DX_DOXYGEN=$DX_DOXYGEN # Extract the first word of "doxygen", so it can be a program name with args. set dummy doxygen; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_DOXYGEN+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_DOXYGEN in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOXYGEN="$ac_pt_DX_DOXYGEN" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_DOXYGEN="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_DOXYGEN=$ac_cv_path_ac_pt_DX_DOXYGEN if test -n "$ac_pt_DX_DOXYGEN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOXYGEN" >&5 $as_echo "$ac_pt_DX_DOXYGEN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_DOXYGEN" = x; then DX_DOXYGEN="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_DOXYGEN=$ac_pt_DX_DOXYGEN fi else DX_DOXYGEN="$ac_cv_path_DX_DOXYGEN" fi if test "$DX_FLAG_doc$DX_DOXYGEN" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: doxygen not found - will not generate any doxygen documentation" >&5 $as_echo "$as_me: WARNING: doxygen not found - will not generate any doxygen documentation" >&2;} DX_FLAG_doc=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}perl", so it can be a program name with args. set dummy ${ac_tool_prefix}perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PERL="$DX_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_PERL=$ac_cv_path_DX_PERL if test -n "$DX_PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_PERL" >&5 $as_echo "$DX_PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_PERL"; then ac_pt_DX_PERL=$DX_PERL # Extract the first word of "perl", so it can be a program name with args. set dummy perl; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_PERL+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_PERL in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PERL="$ac_pt_DX_PERL" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_PERL="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_PERL=$ac_cv_path_ac_pt_DX_PERL if test -n "$ac_pt_DX_PERL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PERL" >&5 $as_echo "$ac_pt_DX_PERL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_PERL" = x; then DX_PERL="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_PERL=$ac_pt_DX_PERL fi else DX_PERL="$ac_cv_path_DX_PERL" fi if test "$DX_FLAG_doc$DX_PERL" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: perl not found - will not generate any doxygen documentation" >&5 $as_echo "$as_me: WARNING: perl not found - will not generate any doxygen documentation" >&2;} DX_FLAG_doc=0 fi : fi if test "$DX_FLAG_doc" = 1; then DX_COND_doc_TRUE= DX_COND_doc_FALSE='#' else DX_COND_doc_TRUE='#' DX_COND_doc_FALSE= fi if test "$DX_FLAG_doc" = 1; then DX_ENV="$DX_ENV PERL_PATH='$DX_PERL'" : else : fi # Dot for graphics: # Check whether --enable-doxygen-dot was given. if test "${enable_doxygen_dot+set}" = set; then : enableval=$enable_doxygen_dot; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_dot=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-dot requires doxygen-dot" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_dot=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-dot" "$LINENO" 5 ;; esac else DX_FLAG_dot=1 test "$DX_FLAG_doc" = "1" || DX_FLAG_dot=0 fi if test "$DX_FLAG_dot" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dot", so it can be a program name with args. set dummy ${ac_tool_prefix}dot; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_DOT+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DOT="$DX_DOT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_DOT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_DOT=$ac_cv_path_DX_DOT if test -n "$DX_DOT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DOT" >&5 $as_echo "$DX_DOT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_DOT"; then ac_pt_DX_DOT=$DX_DOT # Extract the first word of "dot", so it can be a program name with args. set dummy dot; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_DOT+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_DOT in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DOT="$ac_pt_DX_DOT" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_DOT="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_DOT=$ac_cv_path_ac_pt_DX_DOT if test -n "$ac_pt_DX_DOT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DOT" >&5 $as_echo "$ac_pt_DX_DOT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_DOT" = x; then DX_DOT="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_DOT=$ac_pt_DX_DOT fi else DX_DOT="$ac_cv_path_DX_DOT" fi if test "$DX_FLAG_dot$DX_DOT" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dot not found - will not generate graphics for doxygen documentation" >&5 $as_echo "$as_me: WARNING: dot not found - will not generate graphics for doxygen documentation" >&2;} DX_FLAG_dot=0 fi : fi if test "$DX_FLAG_dot" = 1; then DX_COND_dot_TRUE= DX_COND_dot_FALSE='#' else DX_COND_dot_TRUE='#' DX_COND_dot_FALSE= fi if test "$DX_FLAG_dot" = 1; then DX_ENV="$DX_ENV HAVE_DOT='YES'" DX_ENV="$DX_ENV DOT_PATH='`expr ".$DX_DOT" : '\(\.\)[^/]*$' \| "x$DX_DOT" : 'x\(.*\)/[^/]*$'`'" : else DX_ENV="$DX_ENV HAVE_DOT='NO'" : fi # Man pages generation: # Check whether --enable-doxygen-man was given. if test "${enable_doxygen_man+set}" = set; then : enableval=$enable_doxygen_man; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_man=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-man requires doxygen-man" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_man=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-man" "$LINENO" 5 ;; esac else DX_FLAG_man=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_man=0 fi if test "$DX_FLAG_man" = 1; then : fi if test "$DX_FLAG_man" = 1; then DX_COND_man_TRUE= DX_COND_man_FALSE='#' else DX_COND_man_TRUE='#' DX_COND_man_FALSE= fi if test "$DX_FLAG_man" = 1; then DX_ENV="$DX_ENV GENERATE_MAN='YES'" : else DX_ENV="$DX_ENV GENERATE_MAN='NO'" : fi # RTF file generation: # Check whether --enable-doxygen-rtf was given. if test "${enable_doxygen_rtf+set}" = set; then : enableval=$enable_doxygen_rtf; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_rtf=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-rtf requires doxygen-rtf" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_rtf=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-rtf" "$LINENO" 5 ;; esac else DX_FLAG_rtf=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_rtf=0 fi if test "$DX_FLAG_rtf" = 1; then : fi if test "$DX_FLAG_rtf" = 1; then DX_COND_rtf_TRUE= DX_COND_rtf_FALSE='#' else DX_COND_rtf_TRUE='#' DX_COND_rtf_FALSE= fi if test "$DX_FLAG_rtf" = 1; then DX_ENV="$DX_ENV GENERATE_RTF='YES'" : else DX_ENV="$DX_ENV GENERATE_RTF='NO'" : fi # XML file generation: # Check whether --enable-doxygen-xml was given. if test "${enable_doxygen_xml+set}" = set; then : enableval=$enable_doxygen_xml; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_xml=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-xml requires doxygen-xml" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_xml=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-xml" "$LINENO" 5 ;; esac else DX_FLAG_xml=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_xml=0 fi if test "$DX_FLAG_xml" = 1; then : fi if test "$DX_FLAG_xml" = 1; then DX_COND_xml_TRUE= DX_COND_xml_FALSE='#' else DX_COND_xml_TRUE='#' DX_COND_xml_FALSE= fi if test "$DX_FLAG_xml" = 1; then DX_ENV="$DX_ENV GENERATE_XML='YES'" : else DX_ENV="$DX_ENV GENERATE_XML='NO'" : fi # (Compressed) HTML help generation: # Check whether --enable-doxygen-chm was given. if test "${enable_doxygen_chm+set}" = set; then : enableval=$enable_doxygen_chm; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_chm=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-chm requires doxygen-chm" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_chm=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-chm" "$LINENO" 5 ;; esac else DX_FLAG_chm=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_chm=0 fi if test "$DX_FLAG_chm" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}hhc", so it can be a program name with args. set dummy ${ac_tool_prefix}hhc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_HHC+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_DX_HHC="$DX_HHC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_HHC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_HHC=$ac_cv_path_DX_HHC if test -n "$DX_HHC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_HHC" >&5 $as_echo "$DX_HHC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_HHC"; then ac_pt_DX_HHC=$DX_HHC # Extract the first word of "hhc", so it can be a program name with args. set dummy hhc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_HHC+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_HHC in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_HHC="$ac_pt_DX_HHC" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_HHC="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_HHC=$ac_cv_path_ac_pt_DX_HHC if test -n "$ac_pt_DX_HHC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_HHC" >&5 $as_echo "$ac_pt_DX_HHC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_HHC" = x; then DX_HHC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_HHC=$ac_pt_DX_HHC fi else DX_HHC="$ac_cv_path_DX_HHC" fi if test "$DX_FLAG_chm$DX_HHC" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&5 $as_echo "$as_me: WARNING: hhc not found - will not generate doxygen compressed HTML help documentation" >&2;} DX_FLAG_chm=0 fi : fi if test "$DX_FLAG_chm" = 1; then DX_COND_chm_TRUE= DX_COND_chm_FALSE='#' else DX_COND_chm_TRUE='#' DX_COND_chm_FALSE= fi if test "$DX_FLAG_chm" = 1; then DX_ENV="$DX_ENV HHC_PATH='$DX_HHC'" DX_ENV="$DX_ENV GENERATE_HTML='YES'" DX_ENV="$DX_ENV GENERATE_HTMLHELP='YES'" : else DX_ENV="$DX_ENV GENERATE_HTMLHELP='NO'" : fi # Separate CHI file generation. # Check whether --enable-doxygen-chi was given. if test "${enable_doxygen_chi+set}" = set; then : enableval=$enable_doxygen_chi; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_chi=1 test "$DX_FLAG_chm" = "1" \ || as_fn_error $? "doxygen-chi requires doxygen-chi" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_chi=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-chi" "$LINENO" 5 ;; esac else DX_FLAG_chi=0 test "$DX_FLAG_chm" = "1" || DX_FLAG_chi=0 fi if test "$DX_FLAG_chi" = 1; then : fi if test "$DX_FLAG_chi" = 1; then DX_COND_chi_TRUE= DX_COND_chi_FALSE='#' else DX_COND_chi_TRUE='#' DX_COND_chi_FALSE= fi if test "$DX_FLAG_chi" = 1; then DX_ENV="$DX_ENV GENERATE_CHI='YES'" : else DX_ENV="$DX_ENV GENERATE_CHI='NO'" : fi # Plain HTML pages generation: # Check whether --enable-doxygen-html was given. if test "${enable_doxygen_html+set}" = set; then : enableval=$enable_doxygen_html; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_html=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-html requires doxygen-html" "$LINENO" 5 test "$DX_FLAG_chm" = "0" \ || as_fn_error $? "doxygen-html contradicts doxygen-html" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_html=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-html" "$LINENO" 5 ;; esac else DX_FLAG_html=1 test "$DX_FLAG_doc" = "1" || DX_FLAG_html=0 test "$DX_FLAG_chm" = "0" || DX_FLAG_html=0 fi if test "$DX_FLAG_html" = 1; then : fi if test "$DX_FLAG_html" = 1; then DX_COND_html_TRUE= DX_COND_html_FALSE='#' else DX_COND_html_TRUE='#' DX_COND_html_FALSE= fi if test "$DX_FLAG_html" = 1; then DX_ENV="$DX_ENV GENERATE_HTML='YES'" : else test "$DX_FLAG_chm" = 1 || DX_ENV="$DX_ENV GENERATE_HTML='NO'" : fi # PostScript file generation: # Check whether --enable-doxygen-ps was given. if test "${enable_doxygen_ps+set}" = set; then : enableval=$enable_doxygen_ps; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_ps=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-ps requires doxygen-ps" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_ps=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-ps" "$LINENO" 5 ;; esac else DX_FLAG_ps=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_ps=0 fi if test "$DX_FLAG_ps" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}latex", so it can be a program name with args. set dummy ${ac_tool_prefix}latex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_LATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_LATEX="$DX_LATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_LATEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_LATEX=$ac_cv_path_DX_LATEX if test -n "$DX_LATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_LATEX" >&5 $as_echo "$DX_LATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_LATEX"; then ac_pt_DX_LATEX=$DX_LATEX # Extract the first word of "latex", so it can be a program name with args. set dummy latex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_LATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_LATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_LATEX="$ac_pt_DX_LATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_LATEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_LATEX=$ac_cv_path_ac_pt_DX_LATEX if test -n "$ac_pt_DX_LATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_LATEX" >&5 $as_echo "$ac_pt_DX_LATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_LATEX" = x; then DX_LATEX="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_LATEX=$ac_pt_DX_LATEX fi else DX_LATEX="$ac_cv_path_DX_LATEX" fi if test "$DX_FLAG_ps$DX_LATEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: latex not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: latex not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5 $as_echo "$DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5 $as_echo "$ac_pt_DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_MAKEINDEX" = x; then DX_MAKEINDEX="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX fi else DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX" fi if test "$DX_FLAG_ps$DX_MAKEINDEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: makeindex not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dvips", so it can be a program name with args. set dummy ${ac_tool_prefix}dvips; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_DVIPS+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_DX_DVIPS="$DX_DVIPS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_DVIPS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_DVIPS=$ac_cv_path_DX_DVIPS if test -n "$DX_DVIPS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_DVIPS" >&5 $as_echo "$DX_DVIPS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_DVIPS"; then ac_pt_DX_DVIPS=$DX_DVIPS # Extract the first word of "dvips", so it can be a program name with args. set dummy dvips; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_DVIPS+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_DVIPS in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_DVIPS="$ac_pt_DX_DVIPS" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_DVIPS="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_DVIPS=$ac_cv_path_ac_pt_DX_DVIPS if test -n "$ac_pt_DX_DVIPS"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_DVIPS" >&5 $as_echo "$ac_pt_DX_DVIPS" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_DVIPS" = x; then DX_DVIPS="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_DVIPS=$ac_pt_DX_DVIPS fi else DX_DVIPS="$ac_cv_path_DX_DVIPS" fi if test "$DX_FLAG_ps$DX_DVIPS" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: dvips not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5 $as_echo "$DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5 $as_echo "$ac_pt_DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_EGREP" = x; then DX_EGREP="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_EGREP=$ac_pt_DX_EGREP fi else DX_EGREP="$ac_cv_path_DX_EGREP" fi if test "$DX_FLAG_ps$DX_EGREP" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&5 $as_echo "$as_me: WARNING: egrep not found - will not generate doxygen PostScript documentation" >&2;} DX_FLAG_ps=0 fi : fi if test "$DX_FLAG_ps" = 1; then DX_COND_ps_TRUE= DX_COND_ps_FALSE='#' else DX_COND_ps_TRUE='#' DX_COND_ps_FALSE= fi if test "$DX_FLAG_ps" = 1; then : else : fi # PDF file generation: # Check whether --enable-doxygen-pdf was given. if test "${enable_doxygen_pdf+set}" = set; then : enableval=$enable_doxygen_pdf; case "$enableval" in #( y|Y|yes|Yes|YES) DX_FLAG_pdf=1 test "$DX_FLAG_doc" = "1" \ || as_fn_error $? "doxygen-pdf requires doxygen-pdf" "$LINENO" 5 ;; #( n|N|no|No|NO) DX_FLAG_pdf=0 ;; #( *) as_fn_error $? "invalid value '$enableval' given to doxygen-pdf" "$LINENO" 5 ;; esac else DX_FLAG_pdf=0 test "$DX_FLAG_doc" = "1" || DX_FLAG_pdf=0 fi if test "$DX_FLAG_pdf" = 1; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pdflatex", so it can be a program name with args. set dummy ${ac_tool_prefix}pdflatex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_PDFLATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_PDFLATEX="$DX_PDFLATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_PDFLATEX=$ac_cv_path_DX_PDFLATEX if test -n "$DX_PDFLATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_PDFLATEX" >&5 $as_echo "$DX_PDFLATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_PDFLATEX"; then ac_pt_DX_PDFLATEX=$DX_PDFLATEX # Extract the first word of "pdflatex", so it can be a program name with args. set dummy pdflatex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_PDFLATEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_PDFLATEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_PDFLATEX="$ac_pt_DX_PDFLATEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_PDFLATEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_PDFLATEX=$ac_cv_path_ac_pt_DX_PDFLATEX if test -n "$ac_pt_DX_PDFLATEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_PDFLATEX" >&5 $as_echo "$ac_pt_DX_PDFLATEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_PDFLATEX" = x; then DX_PDFLATEX="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_PDFLATEX=$ac_pt_DX_PDFLATEX fi else DX_PDFLATEX="$ac_cv_path_DX_PDFLATEX" fi if test "$DX_FLAG_pdf$DX_PDFLATEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&5 $as_echo "$as_me: WARNING: pdflatex not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}makeindex", so it can be a program name with args. set dummy ${ac_tool_prefix}makeindex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_DX_MAKEINDEX="$DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_MAKEINDEX=$ac_cv_path_DX_MAKEINDEX if test -n "$DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_MAKEINDEX" >&5 $as_echo "$DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_MAKEINDEX"; then ac_pt_DX_MAKEINDEX=$DX_MAKEINDEX # Extract the first word of "makeindex", so it can be a program name with args. set dummy makeindex; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_MAKEINDEX+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_MAKEINDEX in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_MAKEINDEX="$ac_pt_DX_MAKEINDEX" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_MAKEINDEX="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_MAKEINDEX=$ac_cv_path_ac_pt_DX_MAKEINDEX if test -n "$ac_pt_DX_MAKEINDEX"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_MAKEINDEX" >&5 $as_echo "$ac_pt_DX_MAKEINDEX" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_MAKEINDEX" = x; then DX_MAKEINDEX="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_MAKEINDEX=$ac_pt_DX_MAKEINDEX fi else DX_MAKEINDEX="$ac_cv_path_DX_MAKEINDEX" fi if test "$DX_FLAG_pdf$DX_MAKEINDEX" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&5 $as_echo "$as_me: WARNING: makeindex not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}egrep", so it can be a program name with args. set dummy ${ac_tool_prefix}egrep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_DX_EGREP="$DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi DX_EGREP=$ac_cv_path_DX_EGREP if test -n "$DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DX_EGREP" >&5 $as_echo "$DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_DX_EGREP"; then ac_pt_DX_EGREP=$DX_EGREP # Extract the first word of "egrep", so it can be a program name with args. set dummy egrep; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_DX_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_DX_EGREP in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_DX_EGREP="$ac_pt_DX_EGREP" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_DX_EGREP="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_DX_EGREP=$ac_cv_path_ac_pt_DX_EGREP if test -n "$ac_pt_DX_EGREP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_DX_EGREP" >&5 $as_echo "$ac_pt_DX_EGREP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_DX_EGREP" = x; then DX_EGREP="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DX_EGREP=$ac_pt_DX_EGREP fi else DX_EGREP="$ac_cv_path_DX_EGREP" fi if test "$DX_FLAG_pdf$DX_EGREP" = 1; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: egrep not found - will not generate doxygen PDF documentation" >&5 $as_echo "$as_me: WARNING: egrep not found - will not generate doxygen PDF documentation" >&2;} DX_FLAG_pdf=0 fi : fi if test "$DX_FLAG_pdf" = 1; then DX_COND_pdf_TRUE= DX_COND_pdf_FALSE='#' else DX_COND_pdf_TRUE='#' DX_COND_pdf_FALSE= fi if test "$DX_FLAG_pdf" = 1; then : else : fi # LaTeX generation for PS and/or PDF: if test "$DX_FLAG_ps" = 1 || test "$DX_FLAG_pdf" = 1; then DX_COND_latex_TRUE= DX_COND_latex_FALSE='#' else DX_COND_latex_TRUE='#' DX_COND_latex_FALSE= fi if test "$DX_FLAG_ps" = 1 || test "$DX_FLAG_pdf" = 1; then DX_ENV="$DX_ENV GENERATE_LATEX='YES'" else DX_ENV="$DX_ENV GENERATE_LATEX='NO'" fi # Paper size for PS and/or PDF: case "$DOXYGEN_PAPER_SIZE" in #( "") DOXYGEN_PAPER_SIZE="" ;; #( a4wide|a4|letter|legal|executive) DX_ENV="$DX_ENV PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" ;; #( *) as_fn_error $? "unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE'" "$LINENO" 5 ;; esac #For debugging: #echo DX_FLAG_doc=$DX_FLAG_doc #echo DX_FLAG_dot=$DX_FLAG_dot #echo DX_FLAG_man=$DX_FLAG_man #echo DX_FLAG_html=$DX_FLAG_html #echo DX_FLAG_chm=$DX_FLAG_chm #echo DX_FLAG_chi=$DX_FLAG_chi #echo DX_FLAG_rtf=$DX_FLAG_rtf #echo DX_FLAG_xml=$DX_FLAG_xml #echo DX_FLAG_pdf=$DX_FLAG_pdf #echo DX_FLAG_ps=$DX_FLAG_ps #echo DX_ENV=$DX_ENV # Plugins ##################################################### # Check whether --enable-all-plugins was given. if test "${enable_all_plugins+set}" = set; then : enableval=$enable_all_plugins; fi # We build a list of plugins that we're going to compile here so the olad # knows what to link against. PLUGINS="" # Force enable_usbdmx to yes when Ja Rule is explicitly requested. if test "x$enable_ja_rule" = xyes; then : $as_echo "Ja Rule is enabled, enabling the usbdmx plugin." enable_usbdmx="yes" fi plugin_key=artnet enable_arg="enable_${plugin_key}" # Check whether --enable-artnet was given. if test "${enable_artnet+set}" = set; then : enableval=$enable_artnet; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_ARTNET 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_ARTNET_TRUE= USE_ARTNET_FALSE='#' else USE_ARTNET_TRUE='#' USE_ARTNET_FALSE= fi plugin_key=dmx4linux enable_arg="enable_${plugin_key}" # Check whether --enable-dmx4linux was given. if test "${enable_dmx4linux+set}" = set; then : enableval=$enable_dmx4linux; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "$have_dmx4linux" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_DMX4LINUX 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_DMX4LINUX_TRUE= USE_DMX4LINUX_FALSE='#' else USE_DMX4LINUX_TRUE='#' USE_DMX4LINUX_FALSE= fi plugin_key=dummy enable_arg="enable_${plugin_key}" # Check whether --enable-dummy was given. if test "${enable_dummy+set}" = set; then : enableval=$enable_dummy; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_DUMMY 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_DUMMY_TRUE= USE_DUMMY_FALSE='#' else USE_DUMMY_TRUE='#' USE_DUMMY_FALSE= fi plugin_key=e131 enable_arg="enable_${plugin_key}" # Check whether --enable-e131 was given. if test "${enable_e131+set}" = set; then : enableval=$enable_e131; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_E131 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_E131_TRUE= USE_E131_FALSE='#' else USE_E131_TRUE='#' USE_E131_FALSE= fi plugin_key=espnet enable_arg="enable_${plugin_key}" # Check whether --enable-espnet was given. if test "${enable_espnet+set}" = set; then : enableval=$enable_espnet; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_ESPNET 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_ESPNET_TRUE= USE_ESPNET_FALSE='#' else USE_ESPNET_TRUE='#' USE_ESPNET_FALSE= fi plugin_key=ftdidmx enable_arg="enable_${plugin_key}" # Check whether --enable-ftdidmx was given. if test "${enable_ftdidmx+set}" = set; then : enableval=$enable_ftdidmx; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "$have_libftdi" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_FTDI 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_FTDI_TRUE= USE_FTDI_FALSE='#' else USE_FTDI_TRUE='#' USE_FTDI_FALSE= fi plugin_key=gpio enable_arg="enable_${plugin_key}" # Check whether --enable-gpio was given. if test "${enable_gpio+set}" = set; then : enableval=$enable_gpio; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_GPIO 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_GPIO_TRUE= USE_GPIO_FALSE='#' else USE_GPIO_TRUE='#' USE_GPIO_FALSE= fi plugin_key=karate enable_arg="enable_${plugin_key}" # Check whether --enable-karate was given. if test "${enable_karate+set}" = set; then : enableval=$enable_karate; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_KARATE 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_KARATE_TRUE= USE_KARATE_FALSE='#' else USE_KARATE_TRUE='#' USE_KARATE_FALSE= fi plugin_key=kinet enable_arg="enable_${plugin_key}" # Check whether --enable-kinet was given. if test "${enable_kinet+set}" = set; then : enableval=$enable_kinet; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_KINET 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_KINET_TRUE= USE_KINET_FALSE='#' else USE_KINET_TRUE='#' USE_KINET_FALSE= fi plugin_key=milinst enable_arg="enable_${plugin_key}" # Check whether --enable-milinst was given. if test "${enable_milinst+set}" = set; then : enableval=$enable_milinst; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_MILINST 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_MILINST_TRUE= USE_MILINST_FALSE='#' else USE_MILINST_TRUE='#' USE_MILINST_FALSE= fi plugin_key=opendmx enable_arg="enable_${plugin_key}" # Check whether --enable-opendmx was given. if test "${enable_opendmx+set}" = set; then : enableval=$enable_opendmx; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "$have_not_win32" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_OPENDMX 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_OPENDMX_TRUE= USE_OPENDMX_FALSE='#' else USE_OPENDMX_TRUE='#' USE_OPENDMX_FALSE= fi plugin_key=openpixelcontrol enable_arg="enable_${plugin_key}" # Check whether --enable-openpixelcontrol was given. if test "${enable_openpixelcontrol+set}" = set; then : enableval=$enable_openpixelcontrol; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_OPENPIXELCONTROL 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_OPENPIXELCONTROL_TRUE= USE_OPENPIXELCONTROL_FALSE='#' else USE_OPENPIXELCONTROL_TRUE='#' USE_OPENPIXELCONTROL_FALSE= fi plugin_key=osc enable_arg="enable_${plugin_key}" # Check whether --enable-osc was given. if test "${enable_osc+set}" = set; then : enableval=$enable_osc; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "$have_liblo" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_OSC 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_OSC_TRUE= USE_OSC_FALSE='#' else USE_OSC_TRUE='#' USE_OSC_FALSE= fi plugin_key=pathport enable_arg="enable_${plugin_key}" # Check whether --enable-pathport was given. if test "${enable_pathport+set}" = set; then : enableval=$enable_pathport; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_PATHPORT 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_PATHPORT_TRUE= USE_PATHPORT_FALSE='#' else USE_PATHPORT_TRUE='#' USE_PATHPORT_FALSE= fi plugin_key=renard enable_arg="enable_${plugin_key}" # Check whether --enable-renard was given. if test "${enable_renard+set}" = set; then : enableval=$enable_renard; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_RENARD 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_RENARD_TRUE= USE_RENARD_FALSE='#' else USE_RENARD_TRUE='#' USE_RENARD_FALSE= fi plugin_key=sandnet enable_arg="enable_${plugin_key}" # Check whether --enable-sandnet was given. if test "${enable_sandnet+set}" = set; then : enableval=$enable_sandnet; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_SANDNET 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_SANDNET_TRUE= USE_SANDNET_FALSE='#' else USE_SANDNET_TRUE='#' USE_SANDNET_FALSE= fi plugin_key=shownet enable_arg="enable_${plugin_key}" # Check whether --enable-shownet was given. if test "${enable_shownet+set}" = set; then : enableval=$enable_shownet; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_SHOWNET 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_SHOWNET_TRUE= USE_SHOWNET_FALSE='#' else USE_SHOWNET_TRUE='#' USE_SHOWNET_FALSE= fi plugin_key=spi enable_arg="enable_${plugin_key}" # Check whether --enable-spi was given. if test "${enable_spi+set}" = set; then : enableval=$enable_spi; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "$have_spi" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_SPI 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_SPI_TRUE= USE_SPI_FALSE='#' else USE_SPI_TRUE='#' USE_SPI_FALSE= fi plugin_key=stageprofi enable_arg="enable_${plugin_key}" # Check whether --enable-stageprofi was given. if test "${enable_stageprofi+set}" = set; then : enableval=$enable_stageprofi; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_STAGEPROFI 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_STAGEPROFI_TRUE= USE_STAGEPROFI_FALSE='#' else USE_STAGEPROFI_TRUE='#' USE_STAGEPROFI_FALSE= fi plugin_key=uartdmx enable_arg="enable_${plugin_key}" # Check whether --enable-uartdmx was given. if test "${enable_uartdmx+set}" = set; then : enableval=$enable_uartdmx; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "$have_uart" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_UART 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_UART_TRUE= USE_UART_FALSE='#' else USE_UART_TRUE='#' USE_UART_FALSE= fi plugin_key=usbdmx enable_arg="enable_${plugin_key}" # Check whether --enable-usbdmx was given. if test "${enable_usbdmx+set}" = set; then : enableval=$enable_usbdmx; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "$have_libusb" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_LIBUSB 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_LIBUSB_TRUE= USE_LIBUSB_FALSE='#' else USE_LIBUSB_TRUE='#' USE_LIBUSB_FALSE= fi plugin_key=usbpro enable_arg="enable_${plugin_key}" # Check whether --enable-usbpro was given. if test "${enable_usbpro+set}" = set; then : enableval=$enable_usbpro; else eval $enable_arg=auto fi eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then as_fn_error $? "Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto." "$LINENO" 5 fi # If dependencies are not met... if test "" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then as_fn_error $? "Dependencies for plugin ${plugin_key} are not met." "$LINENO" 5 fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; cat >>confdefs.h <<_ACEOF #define USE_USBPRO 1 _ACEOF fi if test "${enable_plugin}" != "no"; then USE_USBPRO_TRUE= USE_USBPRO_FALSE='#' else USE_USBPRO_TRUE='#' USE_USBPRO_FALSE= fi # Finally build a list of the required plugin libs. PLUGIN_LIBS='' OLA_SERVER_LIBS='' for p in $PLUGINS; do PLUGIN_LIBS="$PLUGIN_LIBS plugins/${p}/libola${p}.la" OLA_SERVER_LIBS="$OLA_SERVER_LIBS -lola${p}" done if test -z "${USING_WIN32_TRUE}"; then OLA_SERVER_LIBS="$OLA_SERVER_LIBS -lWs2_32 -lIphlpapi -lpthread" fi # HTML & data directories ola_datadir=$datadir/olad www_datadir=$ola_datadir/www piddatadir=$datadir/ola/pids # Additional libraries needed by Windows clients OLA_CLIENT_LIBS='' if test -z "${USING_WIN32_TRUE}"; then OLA_CLIENT_LIBS="-lWs2_32 -lIphlpapi -lpthread" fi # Extra tools ##################################################### if test "x$enable_ja_rule" = xyes && test "x$enable_usbdmx" = xno; then : as_fn_error $? "Ja Rule requires the usbdmx plugin, but it could not be enabled." "$LINENO" 5 fi if test "x$enable_ja_rule" = xyes && test "x$have_libusb" = xno; then : as_fn_error $? "Ja Rule requires libusb, but it was not found on your system." "$LINENO" 5 fi if test "x$enable_ja_rule" = xyes; then BUILD_JA_RULE_TRUE= BUILD_JA_RULE_FALSE='#' else BUILD_JA_RULE_TRUE='#' BUILD_JA_RULE_FALSE= fi # Status just for configure BUILDING_JA_RULE='no' if test "x$enable_ja_rule" = xyes; then BUILDING_JA_RULE='yes' fi # Linters # Extract the first word of "flake8", so it can be a program name with args. set dummy flake8; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_flake8+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$flake8"; then ac_cv_prog_flake8="$flake8" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_flake8="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_flake8" && ac_cv_prog_flake8="no" fi fi flake8=$ac_cv_prog_flake8 if test -n "$flake8"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $flake8" >&5 $as_echo "$flake8" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$flake8" = xyes; then FOUND_FLAKE8_TRUE= FOUND_FLAKE8_FALSE='#' else FOUND_FLAKE8_TRUE='#' FOUND_FLAKE8_FALSE= fi # Extract the first word of "cpplint", so it can be a program name with args. set dummy cpplint; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_cpplint+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$cpplint"; then ac_cv_prog_cpplint="$cpplint" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_cpplint="yes" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_cpplint" && ac_cv_prog_cpplint="no" fi fi cpplint=$ac_cv_prog_cpplint if test -n "$cpplint"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cpplint" >&5 $as_echo "$cpplint" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$cpplint" = xyes; then FOUND_CPPLINT_TRUE= FOUND_CPPLINT_FALSE='#' else FOUND_CPPLINT_TRUE='#' FOUND_CPPLINT_FALSE= fi # Output ##################################################### # Hack alert! # Python modules can't be split over two directories. This is a problem when # doing VPATH builds since the generated files like # ${builddir}/python/ola/Ola_pb.py will be in a separate path ( $builddir ) from # the non-generated files $srcdir/python/ols/PidStore.py). To get the tests # to pass we symlink the files we need for the tests from the builddir to the # srcdir and set PYTHONPATH=${top_builddir}/python in data/rdm/Makefile.am ac_config_links="$ac_config_links python/ola/__init__.py:python/ola/__init__.py python/ola/ClientWrapper.py:python/ola/ClientWrapper.py python/ola/DMXConstants.py:python/ola/DMXConstants.py python/ola/DUBDecoder.py:python/ola/DUBDecoder.py python/ola/MACAddress.py:python/ola/MACAddress.py python/ola/OlaClient.py:python/ola/OlaClient.py python/ola/PidStore.py:python/ola/PidStore.py python/ola/RDMAPI.py:python/ola/RDMAPI.py python/ola/RDMConstants.py:python/ola/RDMConstants.py python/ola/StringUtils.py:python/ola/StringUtils.py python/ola/TestUtils.py:python/ola/TestUtils.py python/ola/UID.py:python/ola/UID.py python/ola/rpc/__init__.py:python/ola/rpc/__init__.py python/ola/rpc/SimpleRpcController.py:python/ola/rpc/SimpleRpcController.py python/ola/rpc/StreamRpcChannel.py:python/ola/rpc/StreamRpcChannel.py tools/rdm/__init__.py:tools/rdm/__init__.py tools/rdm/ExpectedResults.py:tools/rdm/ExpectedResults.py tools/rdm/ResponderTest.py:tools/rdm/ResponderTest.py tools/rdm/TestCategory.py:tools/rdm/TestCategory.py tools/rdm/TestDefinitions.py:tools/rdm/TestDefinitions.py tools/rdm/TestHelpers.py:tools/rdm/TestHelpers.py tools/rdm/TestMixins.py:tools/rdm/TestMixins.py tools/rdm/TestRunner.py:tools/rdm/TestRunner.py tools/rdm/TestState.py:tools/rdm/TestState.py tools/rdm/TimingStats.py:tools/rdm/TimingStats.py" # Non-makefile generated files. ac_config_files="$ac_config_files include/ola/base/Version.h libola.pc libolaserver.pc libs/acn/libolaacn.pc ola.spec plugins/artnet/messages/libolaartnetconf.pc plugins/e131/messages/libolae131conf.pc plugins/usbpro/messages/libolausbproconf.pc tools/e133/libolae133common.pc tools/e133/libolae133controller.pc" # Makefiles ac_config_files="$ac_config_files Makefile java/Makefile" cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCXX_TRUE}" && test -z "${am__fastdepCXX_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCXX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SUPPORTS_GNU_PLUS_PLUS_98_TRUE}" && test -z "${SUPPORTS_GNU_PLUS_PLUS_98_FALSE}"; then as_fn_error $? "conditional \"SUPPORTS_GNU_PLUS_PLUS_98\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SUPPORTS_GNU_PLUS_PLUS_11_TRUE}" && test -z "${SUPPORTS_GNU_PLUS_PLUS_11_FALSE}"; then as_fn_error $? "conditional \"SUPPORTS_GNU_PLUS_PLUS_11\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${GNU_PLUS_PLUS_11_DEPRECATIONS_TRUE}" && test -z "${GNU_PLUS_PLUS_11_DEPRECATIONS_FALSE}"; then as_fn_error $? "conditional \"GNU_PLUS_PLUS_11_DEPRECATIONS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USING_WIN32_TRUE}" && test -z "${USING_WIN32_FALSE}"; then as_fn_error $? "conditional \"USING_WIN32\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_EPOLL_TRUE}" && test -z "${HAVE_EPOLL_FALSE}"; then as_fn_error $? "conditional \"HAVE_EPOLL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_KQUEUE_TRUE}" && test -z "${HAVE_KQUEUE_FALSE}"; then as_fn_error $? "conditional \"HAVE_KQUEUE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${SUPPORTS_RDYNAMIC_TRUE}" && test -z "${SUPPORTS_RDYNAMIC_FALSE}"; then as_fn_error $? "conditional \"SUPPORTS_RDYNAMIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DLOPEN_TRUE}" && test -z "${HAVE_DLOPEN_FALSE}"; then as_fn_error $? "conditional \"HAVE_DLOPEN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBFTD2XX_TRUE}" && test -z "${HAVE_LIBFTD2XX_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBFTD2XX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_NCURSES_TRUE}" && test -z "${HAVE_NCURSES_FALSE}"; then as_fn_error $? "conditional \"HAVE_NCURSES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_NCURSES_PKGCONFIG_TRUE}" && test -z "${HAVE_NCURSES_PKGCONFIG_FALSE}"; then as_fn_error $? "conditional \"HAVE_NCURSES_PKGCONFIG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_DNSSD_TRUE}" && test -z "${HAVE_DNSSD_FALSE}"; then as_fn_error $? "conditional \"HAVE_DNSSD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_AVAHI_TRUE}" && test -z "${HAVE_AVAHI_FALSE}"; then as_fn_error $? "conditional \"HAVE_AVAHI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SALEAE_LOGIC_TRUE}" && test -z "${HAVE_SALEAE_LOGIC_FALSE}"; then as_fn_error $? "conditional \"HAVE_SALEAE_LOGIC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_TESTS_TRUE}" && test -z "${BUILD_TESTS_FALSE}"; then as_fn_error $? "conditional \"BUILD_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_ACN_TRUE}" && test -z "${INSTALL_ACN_FALSE}"; then as_fn_error $? "conditional \"INSTALL_ACN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_E133_TRUE}" && test -z "${INSTALL_E133_FALSE}"; then as_fn_error $? "conditional \"INSTALL_E133\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_EXAMPLES_TRUE}" && test -z "${BUILD_EXAMPLES_FALSE}"; then as_fn_error $? "conditional \"BUILD_EXAMPLES\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FATAL_WARNINGS_TRUE}" && test -z "${FATAL_WARNINGS_FALSE}"; then as_fn_error $? "conditional \"FATAL_WARNINGS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBMICROHTTPD_TRUE}" && test -z "${HAVE_LIBMICROHTTPD_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBMICROHTTPD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_JAVA_LIBS_TRUE}" && test -z "${BUILD_JAVA_LIBS_FALSE}"; then as_fn_error $? "conditional \"BUILD_JAVA_LIBS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBFTDI0_TRUE}" && test -z "${HAVE_LIBFTDI0_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBFTDI0\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBFTDI1_TRUE}" && test -z "${HAVE_LIBFTDI1_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBFTDI1\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBUSB_HOTPLUG_API_TRUE}" && test -z "${HAVE_LIBUSB_HOTPLUG_API_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBUSB_HOTPLUG_API\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_LIBUSB_SET_OPTION_TRUE}" && test -z "${HAVE_LIBUSB_SET_OPTION_FALSE}"; then as_fn_error $? "conditional \"HAVE_LIBUSB_SET_OPTION\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${INSTALL_RDM_TESTS_TRUE}" && test -z "${INSTALL_RDM_TESTS_FALSE}"; then as_fn_error $? "conditional \"INSTALL_RDM_TESTS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_PYTHON_LIBS_TRUE}" && test -z "${BUILD_PYTHON_LIBS_FALSE}"; then as_fn_error $? "conditional \"BUILD_PYTHON_LIBS\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FOUND_FLAKE8_TRUE}" && test -z "${FOUND_FLAKE8_FALSE}"; then as_fn_error $? "conditional \"FOUND_FLAKE8\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_OLA_PROTOC_PLUGIN_TRUE}" && test -z "${BUILD_OLA_PROTOC_PLUGIN_FALSE}"; then as_fn_error $? "conditional \"BUILD_OLA_PROTOC_PLUGIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_OLA_PROTOC_PLUGIN_TRUE}" && test -z "${BUILD_OLA_PROTOC_PLUGIN_FALSE}"; then as_fn_error $? "conditional \"BUILD_OLA_PROTOC_PLUGIN\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_verbose_TRUE}" && test -z "${DX_COND_verbose_FALSE}"; then as_fn_error $? "conditional \"DX_COND_verbose\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_doc_TRUE}" && test -z "${DX_COND_doc_FALSE}"; then as_fn_error $? "conditional \"DX_COND_doc\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_dot_TRUE}" && test -z "${DX_COND_dot_FALSE}"; then as_fn_error $? "conditional \"DX_COND_dot\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_man_TRUE}" && test -z "${DX_COND_man_FALSE}"; then as_fn_error $? "conditional \"DX_COND_man\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_rtf_TRUE}" && test -z "${DX_COND_rtf_FALSE}"; then as_fn_error $? "conditional \"DX_COND_rtf\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_xml_TRUE}" && test -z "${DX_COND_xml_FALSE}"; then as_fn_error $? "conditional \"DX_COND_xml\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_chm_TRUE}" && test -z "${DX_COND_chm_FALSE}"; then as_fn_error $? "conditional \"DX_COND_chm\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_chi_TRUE}" && test -z "${DX_COND_chi_FALSE}"; then as_fn_error $? "conditional \"DX_COND_chi\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_html_TRUE}" && test -z "${DX_COND_html_FALSE}"; then as_fn_error $? "conditional \"DX_COND_html\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_ps_TRUE}" && test -z "${DX_COND_ps_FALSE}"; then as_fn_error $? "conditional \"DX_COND_ps\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_pdf_TRUE}" && test -z "${DX_COND_pdf_FALSE}"; then as_fn_error $? "conditional \"DX_COND_pdf\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${DX_COND_latex_TRUE}" && test -z "${DX_COND_latex_FALSE}"; then as_fn_error $? "conditional \"DX_COND_latex\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_ARTNET_TRUE}" && test -z "${USE_ARTNET_FALSE}"; then as_fn_error $? "conditional \"USE_ARTNET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_DMX4LINUX_TRUE}" && test -z "${USE_DMX4LINUX_FALSE}"; then as_fn_error $? "conditional \"USE_DMX4LINUX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_DUMMY_TRUE}" && test -z "${USE_DUMMY_FALSE}"; then as_fn_error $? "conditional \"USE_DUMMY\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_E131_TRUE}" && test -z "${USE_E131_FALSE}"; then as_fn_error $? "conditional \"USE_E131\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_ESPNET_TRUE}" && test -z "${USE_ESPNET_FALSE}"; then as_fn_error $? "conditional \"USE_ESPNET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_FTDI_TRUE}" && test -z "${USE_FTDI_FALSE}"; then as_fn_error $? "conditional \"USE_FTDI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_GPIO_TRUE}" && test -z "${USE_GPIO_FALSE}"; then as_fn_error $? "conditional \"USE_GPIO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_KARATE_TRUE}" && test -z "${USE_KARATE_FALSE}"; then as_fn_error $? "conditional \"USE_KARATE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_KINET_TRUE}" && test -z "${USE_KINET_FALSE}"; then as_fn_error $? "conditional \"USE_KINET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_MILINST_TRUE}" && test -z "${USE_MILINST_FALSE}"; then as_fn_error $? "conditional \"USE_MILINST\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_OPENDMX_TRUE}" && test -z "${USE_OPENDMX_FALSE}"; then as_fn_error $? "conditional \"USE_OPENDMX\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_OPENPIXELCONTROL_TRUE}" && test -z "${USE_OPENPIXELCONTROL_FALSE}"; then as_fn_error $? "conditional \"USE_OPENPIXELCONTROL\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_OSC_TRUE}" && test -z "${USE_OSC_FALSE}"; then as_fn_error $? "conditional \"USE_OSC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_PATHPORT_TRUE}" && test -z "${USE_PATHPORT_FALSE}"; then as_fn_error $? "conditional \"USE_PATHPORT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_RENARD_TRUE}" && test -z "${USE_RENARD_FALSE}"; then as_fn_error $? "conditional \"USE_RENARD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_SANDNET_TRUE}" && test -z "${USE_SANDNET_FALSE}"; then as_fn_error $? "conditional \"USE_SANDNET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_SHOWNET_TRUE}" && test -z "${USE_SHOWNET_FALSE}"; then as_fn_error $? "conditional \"USE_SHOWNET\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_SPI_TRUE}" && test -z "${USE_SPI_FALSE}"; then as_fn_error $? "conditional \"USE_SPI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_STAGEPROFI_TRUE}" && test -z "${USE_STAGEPROFI_FALSE}"; then as_fn_error $? "conditional \"USE_STAGEPROFI\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_UART_TRUE}" && test -z "${USE_UART_FALSE}"; then as_fn_error $? "conditional \"USE_UART\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_LIBUSB_TRUE}" && test -z "${USE_LIBUSB_FALSE}"; then as_fn_error $? "conditional \"USE_LIBUSB\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${USE_USBPRO_TRUE}" && test -z "${USE_USBPRO_FALSE}"; then as_fn_error $? "conditional \"USE_USBPRO\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${BUILD_JA_RULE_TRUE}" && test -z "${BUILD_JA_RULE_FALSE}"; then as_fn_error $? "conditional \"BUILD_JA_RULE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FOUND_FLAKE8_TRUE}" && test -z "${FOUND_FLAKE8_FALSE}"; then as_fn_error $? "conditional \"FOUND_FLAKE8\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${FOUND_CPPLINT_TRUE}" && test -z "${FOUND_CPPLINT_FALSE}"; then as_fn_error $? "conditional \"FOUND_CPPLINT\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by OLA $as_me 0.10.9, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_links="$ac_config_links" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration links: $config_links Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ OLA config.status 0.10.9 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' AS='`$ECHO "$AS" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' shared_archive_member_spec='`$ECHO "$shared_archive_member_spec" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_import='`$ECHO "$lt_cv_sys_global_symbol_to_import" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' lt_cv_nm_interface='`$ECHO "$lt_cv_nm_interface" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' lt_cv_truncate_bin='`$ECHO "$lt_cv_truncate_bin" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' configure_time_dlsearch_path='`$ECHO "$configure_time_dlsearch_path" | $SED "$delay_single_quote_subst"`' configure_time_lt_sys_library_path='`$ECHO "$configure_time_lt_sys_library_path" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs='`$ECHO "$compiler_lib_search_dirs" | $SED "$delay_single_quote_subst"`' predep_objects='`$ECHO "$predep_objects" | $SED "$delay_single_quote_subst"`' postdep_objects='`$ECHO "$postdep_objects" | $SED "$delay_single_quote_subst"`' predeps='`$ECHO "$predeps" | $SED "$delay_single_quote_subst"`' postdeps='`$ECHO "$postdeps" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path='`$ECHO "$compiler_lib_search_path" | $SED "$delay_single_quote_subst"`' LD_CXX='`$ECHO "$LD_CXX" | $SED "$delay_single_quote_subst"`' reload_flag_CXX='`$ECHO "$reload_flag_CXX" | $SED "$delay_single_quote_subst"`' reload_cmds_CXX='`$ECHO "$reload_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_cmds_CXX='`$ECHO "$old_archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' compiler_CXX='`$ECHO "$compiler_CXX" | $SED "$delay_single_quote_subst"`' GCC_CXX='`$ECHO "$GCC_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag_CXX='`$ECHO "$lt_prog_compiler_no_builtin_flag_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic_CXX='`$ECHO "$lt_prog_compiler_pic_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl_CXX='`$ECHO "$lt_prog_compiler_wl_CXX" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static_CXX='`$ECHO "$lt_prog_compiler_static_CXX" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o_CXX='`$ECHO "$lt_cv_prog_compiler_c_o_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc_CXX='`$ECHO "$archive_cmds_need_lc_CXX" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes_CXX='`$ECHO "$enable_shared_with_static_runtimes_CXX" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec_CXX='`$ECHO "$export_dynamic_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec_CXX='`$ECHO "$whole_archive_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' compiler_needs_object_CXX='`$ECHO "$compiler_needs_object_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds_CXX='`$ECHO "$old_archive_from_new_cmds_CXX" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds_CXX='`$ECHO "$old_archive_from_expsyms_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_cmds_CXX='`$ECHO "$archive_cmds_CXX" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds_CXX='`$ECHO "$archive_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_cmds_CXX='`$ECHO "$module_cmds_CXX" | $SED "$delay_single_quote_subst"`' module_expsym_cmds_CXX='`$ECHO "$module_expsym_cmds_CXX" | $SED "$delay_single_quote_subst"`' with_gnu_ld_CXX='`$ECHO "$with_gnu_ld_CXX" | $SED "$delay_single_quote_subst"`' allow_undefined_flag_CXX='`$ECHO "$allow_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' no_undefined_flag_CXX='`$ECHO "$no_undefined_flag_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec_CXX='`$ECHO "$hardcode_libdir_flag_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator_CXX='`$ECHO "$hardcode_libdir_separator_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_CXX='`$ECHO "$hardcode_direct_CXX" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute_CXX='`$ECHO "$hardcode_direct_absolute_CXX" | $SED "$delay_single_quote_subst"`' hardcode_minus_L_CXX='`$ECHO "$hardcode_minus_L_CXX" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var_CXX='`$ECHO "$hardcode_shlibpath_var_CXX" | $SED "$delay_single_quote_subst"`' hardcode_automatic_CXX='`$ECHO "$hardcode_automatic_CXX" | $SED "$delay_single_quote_subst"`' inherit_rpath_CXX='`$ECHO "$inherit_rpath_CXX" | $SED "$delay_single_quote_subst"`' link_all_deplibs_CXX='`$ECHO "$link_all_deplibs_CXX" | $SED "$delay_single_quote_subst"`' always_export_symbols_CXX='`$ECHO "$always_export_symbols_CXX" | $SED "$delay_single_quote_subst"`' export_symbols_cmds_CXX='`$ECHO "$export_symbols_cmds_CXX" | $SED "$delay_single_quote_subst"`' exclude_expsyms_CXX='`$ECHO "$exclude_expsyms_CXX" | $SED "$delay_single_quote_subst"`' include_expsyms_CXX='`$ECHO "$include_expsyms_CXX" | $SED "$delay_single_quote_subst"`' prelink_cmds_CXX='`$ECHO "$prelink_cmds_CXX" | $SED "$delay_single_quote_subst"`' postlink_cmds_CXX='`$ECHO "$postlink_cmds_CXX" | $SED "$delay_single_quote_subst"`' file_list_spec_CXX='`$ECHO "$file_list_spec_CXX" | $SED "$delay_single_quote_subst"`' hardcode_action_CXX='`$ECHO "$hardcode_action_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_dirs_CXX='`$ECHO "$compiler_lib_search_dirs_CXX" | $SED "$delay_single_quote_subst"`' predep_objects_CXX='`$ECHO "$predep_objects_CXX" | $SED "$delay_single_quote_subst"`' postdep_objects_CXX='`$ECHO "$postdep_objects_CXX" | $SED "$delay_single_quote_subst"`' predeps_CXX='`$ECHO "$predeps_CXX" | $SED "$delay_single_quote_subst"`' postdeps_CXX='`$ECHO "$postdeps_CXX" | $SED "$delay_single_quote_subst"`' compiler_lib_search_path_CXX='`$ECHO "$compiler_lib_search_path_CXX" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in AS \ DLLTOOL \ OBJDUMP \ SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_import \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ lt_cv_nm_interface \ nm_file_list_spec \ lt_cv_truncate_bin \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib \ compiler_lib_search_dirs \ predep_objects \ postdep_objects \ predeps \ postdeps \ compiler_lib_search_path \ LD_CXX \ reload_flag_CXX \ compiler_CXX \ lt_prog_compiler_no_builtin_flag_CXX \ lt_prog_compiler_pic_CXX \ lt_prog_compiler_wl_CXX \ lt_prog_compiler_static_CXX \ lt_cv_prog_compiler_c_o_CXX \ export_dynamic_flag_spec_CXX \ whole_archive_flag_spec_CXX \ compiler_needs_object_CXX \ with_gnu_ld_CXX \ allow_undefined_flag_CXX \ no_undefined_flag_CXX \ hardcode_libdir_flag_spec_CXX \ hardcode_libdir_separator_CXX \ exclude_expsyms_CXX \ include_expsyms_CXX \ file_list_spec_CXX \ compiler_lib_search_dirs_CXX \ predep_objects_CXX \ postdep_objects_CXX \ predeps_CXX \ postdeps_CXX \ compiler_lib_search_path_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ configure_time_dlsearch_path \ configure_time_lt_sys_library_path \ reload_cmds_CXX \ old_archive_cmds_CXX \ old_archive_from_new_cmds_CXX \ old_archive_from_expsyms_cmds_CXX \ archive_cmds_CXX \ archive_expsym_cmds_CXX \ module_cmds_CXX \ module_expsym_cmds_CXX \ export_symbols_cmds_CXX \ prelink_cmds_CXX \ postlink_cmds_CXX; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config.h") CONFIG_HEADERS="$CONFIG_HEADERS config.h" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; "python/ola/__init__.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/__init__.py:python/ola/__init__.py" ;; "python/ola/ClientWrapper.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/ClientWrapper.py:python/ola/ClientWrapper.py" ;; "python/ola/DMXConstants.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/DMXConstants.py:python/ola/DMXConstants.py" ;; "python/ola/DUBDecoder.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/DUBDecoder.py:python/ola/DUBDecoder.py" ;; "python/ola/MACAddress.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/MACAddress.py:python/ola/MACAddress.py" ;; "python/ola/OlaClient.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/OlaClient.py:python/ola/OlaClient.py" ;; "python/ola/PidStore.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/PidStore.py:python/ola/PidStore.py" ;; "python/ola/RDMAPI.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/RDMAPI.py:python/ola/RDMAPI.py" ;; "python/ola/RDMConstants.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/RDMConstants.py:python/ola/RDMConstants.py" ;; "python/ola/StringUtils.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/StringUtils.py:python/ola/StringUtils.py" ;; "python/ola/TestUtils.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/TestUtils.py:python/ola/TestUtils.py" ;; "python/ola/UID.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/UID.py:python/ola/UID.py" ;; "python/ola/rpc/__init__.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/rpc/__init__.py:python/ola/rpc/__init__.py" ;; "python/ola/rpc/SimpleRpcController.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/rpc/SimpleRpcController.py:python/ola/rpc/SimpleRpcController.py" ;; "python/ola/rpc/StreamRpcChannel.py") CONFIG_LINKS="$CONFIG_LINKS python/ola/rpc/StreamRpcChannel.py:python/ola/rpc/StreamRpcChannel.py" ;; "tools/rdm/__init__.py") CONFIG_LINKS="$CONFIG_LINKS tools/rdm/__init__.py:tools/rdm/__init__.py" ;; "tools/rdm/ExpectedResults.py") CONFIG_LINKS="$CONFIG_LINKS tools/rdm/ExpectedResults.py:tools/rdm/ExpectedResults.py" ;; "tools/rdm/ResponderTest.py") CONFIG_LINKS="$CONFIG_LINKS tools/rdm/ResponderTest.py:tools/rdm/ResponderTest.py" ;; "tools/rdm/TestCategory.py") CONFIG_LINKS="$CONFIG_LINKS tools/rdm/TestCategory.py:tools/rdm/TestCategory.py" ;; "tools/rdm/TestDefinitions.py") CONFIG_LINKS="$CONFIG_LINKS tools/rdm/TestDefinitions.py:tools/rdm/TestDefinitions.py" ;; "tools/rdm/TestHelpers.py") CONFIG_LINKS="$CONFIG_LINKS tools/rdm/TestHelpers.py:tools/rdm/TestHelpers.py" ;; "tools/rdm/TestMixins.py") CONFIG_LINKS="$CONFIG_LINKS tools/rdm/TestMixins.py:tools/rdm/TestMixins.py" ;; "tools/rdm/TestRunner.py") CONFIG_LINKS="$CONFIG_LINKS tools/rdm/TestRunner.py:tools/rdm/TestRunner.py" ;; "tools/rdm/TestState.py") CONFIG_LINKS="$CONFIG_LINKS tools/rdm/TestState.py:tools/rdm/TestState.py" ;; "tools/rdm/TimingStats.py") CONFIG_LINKS="$CONFIG_LINKS tools/rdm/TimingStats.py:tools/rdm/TimingStats.py" ;; "include/ola/base/Version.h") CONFIG_FILES="$CONFIG_FILES include/ola/base/Version.h" ;; "libola.pc") CONFIG_FILES="$CONFIG_FILES libola.pc" ;; "libolaserver.pc") CONFIG_FILES="$CONFIG_FILES libolaserver.pc" ;; "libs/acn/libolaacn.pc") CONFIG_FILES="$CONFIG_FILES libs/acn/libolaacn.pc" ;; "ola.spec") CONFIG_FILES="$CONFIG_FILES ola.spec" ;; "plugins/artnet/messages/libolaartnetconf.pc") CONFIG_FILES="$CONFIG_FILES plugins/artnet/messages/libolaartnetconf.pc" ;; "plugins/e131/messages/libolae131conf.pc") CONFIG_FILES="$CONFIG_FILES plugins/e131/messages/libolae131conf.pc" ;; "plugins/usbpro/messages/libolausbproconf.pc") CONFIG_FILES="$CONFIG_FILES plugins/usbpro/messages/libolausbproconf.pc" ;; "tools/e133/libolae133common.pc") CONFIG_FILES="$CONFIG_FILES tools/e133/libolae133common.pc" ;; "tools/e133/libolae133controller.pc") CONFIG_FILES="$CONFIG_FILES tools/e133/libolae133controller.pc" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "java/Makefile") CONFIG_FILES="$CONFIG_FILES java/Makefile" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_LINKS+set}" = set || CONFIG_LINKS=$config_links test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :L $CONFIG_LINKS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :L) # # CONFIG_LINK # if test "$ac_source" = "$ac_file" && test "$srcdir" = '.'; then : else # Prefer the file from the source tree if names are identical. if test "$ac_source" = "$ac_file" || test ! -r "$ac_source"; then ac_source=$srcdir/$ac_source fi { $as_echo "$as_me:${as_lineno-$LINENO}: linking $ac_source to $ac_file" >&5 $as_echo "$as_me: linking $ac_source to $ac_file" >&6;} if test ! -r "$ac_source"; then as_fn_error $? "$ac_source: file not found" "$LINENO" 5 fi rm -f "$ac_file" # Try a relative symlink, then a hard link, then a copy. case $ac_source in [\\/$]* | ?:[\\/]* ) ac_rel_source=$ac_source ;; *) ac_rel_source=$ac_top_build_prefix$ac_source ;; esac ln -s "$ac_rel_source" "$ac_file" 2>/dev/null || ln "$ac_source" "$ac_file" 2>/dev/null || cp -p "$ac_source" "$ac_file" || as_fn_error $? "cannot link or copy $ac_source to $ac_file" "$LINENO" 5 fi ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # The names of the tagged configurations supported by this script. available_tags='CXX ' # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Assembler program. AS=$lt_AS # DLL creation program. DLLTOOL=$lt_DLLTOOL # Object dumper program. OBJDUMP=$lt_OBJDUMP # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shared archive member basename,for filename based shared library versioning on AIX. shared_archive_member_spec=$shared_archive_member_spec # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm into a list of symbols to manually relocate. global_symbol_to_import=$lt_lt_cv_sys_global_symbol_to_import # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # The name lister interface. nm_interface=$lt_lt_cv_nm_interface # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and where our libraries should be installed. lt_sysroot=$lt_sysroot # Command to truncate a binary pipe. lt_truncate_bin=$lt_lt_cv_truncate_bin # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Detected run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_configure_time_dlsearch_path # Explicit LT_SYS_LIBRARY_PATH set during ./configure time. configure_time_lt_sys_library_path=$lt_configure_time_lt_sys_library_path # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects postdep_objects=$lt_postdep_objects predeps=$lt_predeps postdeps=$lt_postdeps # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE # func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x$2 in x) ;; *:) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'` \$$1\" ;; x:*) eval $1=\"\$$1 `$ECHO $2 | $SED 's/:/ /g'`\" ;; *::*) eval $1=\"\$$1\ `$ECHO $2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval $1=\"`$ECHO $2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \$$1\" ;; *) eval $1=\"`$ECHO $2 | $SED 's/:/ /g'`\" ;; esac } # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in $*""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain=$ac_aux_dir/ltmain.sh # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" cat <<_LT_EOF >> "$ofile" # ### BEGIN LIBTOOL TAG CONFIG: CXX # The linker used to build libraries. LD=$lt_LD_CXX # How to create reloadable object files. reload_flag=$lt_reload_flag_CXX reload_cmds=$lt_reload_cmds_CXX # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds_CXX # A language specific compiler. CC=$lt_compiler_CXX # Is the compiler the GNU compiler? with_gcc=$GCC_CXX # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag_CXX # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic_CXX # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl_CXX # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static_CXX # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o_CXX # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc_CXX # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes_CXX # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec_CXX # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec_CXX # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object_CXX # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds_CXX # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds_CXX # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds_CXX archive_expsym_cmds=$lt_archive_expsym_cmds_CXX # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds_CXX module_expsym_cmds=$lt_module_expsym_cmds_CXX # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld_CXX # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag_CXX # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag_CXX # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec_CXX # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct_CXX # Set to "yes" if using DIR/libNAME\$shared_ext during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \$shlibpath_var if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute_CXX # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L_CXX # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var_CXX # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic_CXX # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath_CXX # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs_CXX # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols_CXX # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds_CXX # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms_CXX # Symbols that must always be exported. include_expsyms=$lt_include_expsyms_CXX # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds_CXX # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds_CXX # Specify filename containing input files. file_list_spec=$lt_file_list_spec_CXX # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action_CXX # The directories searched by this compiler when creating a shared library. compiler_lib_search_dirs=$lt_compiler_lib_search_dirs_CXX # Dependencies to place before and after the objects being linked to # create a shared library. predep_objects=$lt_predep_objects_CXX postdep_objects=$lt_postdep_objects_CXX predeps=$lt_predeps_CXX postdeps=$lt_postdeps_CXX # The library search path used internally by the compiler when linking # a shared library. compiler_lib_search_path=$lt_compiler_lib_search_path_CXX # ### END LIBTOOL TAG CONFIG: CXX _LT_EOF ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi echo \ "------------------------------------------------------- ${PACKAGE_NAME} Version ${PACKAGE_VERSION} Prefix: '${prefix}' Compiler: '${CXX} ${CXXFLAGS} ${CPPFLAGS}' Linker: '${LD} ${LDFLAGS} ${LIBS}' Python: ${PYTHON} Python API: ${enable_python_libs} Java API: ${enable_java_libs} Enable HTTP Server: ${have_microhttpd} RDM Responder Tests: ${enable_rdm_tests} Ja Rule: ${BUILDING_JA_RULE} Enabled Plugins:${PLUGINS} UUCP Lock Directory: $UUCPLOCK Now type 'make []' where the optional is: all - build everything check - run the tests doxygen-doc - generate the HTML documentation lint - run the linters -------------------------------------------------------" ola-0.10.9/libola.pc.in0000664000175000017500000000041614376533110011476 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libola Version: @VERSION@ Description: Open Lighting Architecture Client Requires: protobuf Libs: -L${libdir} -lola -lolacommon @OLA_CLIENT_LIBS@ Cflags: -I${includedir} ola-0.10.9/config/0000775000175000017500000000000014376533272010640 500000000000000ola-0.10.9/config/install-sh0000755000175000017500000003546314376533146012575 00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2014-09-12.12; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to # deal in the Software without restriction, including without limitation the # rights to use, copy, modify, merge, publish, distribute, sublicense, and/or # sell copies of the Software, and to permit persons to whom the Software is # furnished to do so, subject to the following conditions: # # The above copyright notice and this permission notice shall be included in # all copies or substantial portions of the Software. # # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR # IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, # FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. tab=' ' nl=' ' IFS=" $tab$nl" # Set DOITPROG to "echo" to test this script. doit=${DOITPROG-} doit_exec=${doit:-exec} # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false is_target_a_directory=possibly usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *"$tab"* | *"$nl"* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) is_target_a_directory=always dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) is_target_a_directory=never;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done # We allow the use of options -d and -T together, by making -d # take the precedence; this is for compatibility with GNU install. if test -n "$dir_arg"; then if test -n "$dst_arg"; then echo "$0: target directory not allowed when installing a directory." >&2 exit 1 fi fi if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then if test $# -gt 1 || test "$is_target_a_directory" = always; then if test ! -d "$dst_arg"; then echo "$0: $dst_arg: Is not a directory." >&2 exit 1 fi fi fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test "$is_target_a_directory" = never; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else dstdir=`dirname "$dst"` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) # $RANDOM is not portable (e.g. dash); use it when possible to # lower collision chance tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" 2>/dev/null; exit $ret' 0 # As "mkdir -p" follows symlinks and we work in /tmp possibly; so # create the $tmpdir first (and fail if unsuccessful) to make sure # that nobody tries to guess the $tmpdir name. if (umask $mkdir_umask && $mkdirprog $mkdir_mode "$tmpdir" && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/a/b") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. test_tmpdir="$tmpdir/a" ls_ld_tmpdir=`ls -ld "$test_tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$test_tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$test_tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/a/b" "$tmpdir/a" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- "$tmpdir" 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac oIFS=$IFS IFS=/ set -f set fnord $dstdir shift set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ola-0.10.9/config/compile0000755000175000017500000001624514376533146012144 00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ola-0.10.9/config/config.sub0000755000175000017500000010646014376533146012550 00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-08-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches to . # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | netbsd*-eabi* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | ba \ | be32 | be64 \ | bfin \ | c4x | c8051 | clipper \ | d10v | d30v | dlx | dsp16xx \ | e2k | epiphany \ | fido | fr30 | frv | ft32 \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | k1om \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa32r6 | mipsisa32r6el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64r6 | mipsisa64r6el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 | or1k | or1knd | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | riscv32 | riscv64 \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[234]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | visium \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; leon|leon[3-9]) basic_machine=sparc-$basic_machine ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | nvptx | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | ba-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | c8051-* | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | e2k-* | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | k1om-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa32r6-* | mipsisa32r6el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64r6-* | mipsisa64r6el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | or1k*-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | riscv32-* | riscv64-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx*-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | visium-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; asmjs) basic_machine=asmjs-unknown ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; leon-*|leon[3-9]-*) basic_machine=sparc-`echo $basic_machine | sed 's/-.*//'` ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i686-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; moxiebox) basic_machine=moxie-unknown os=-moxiebox ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i686-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* | -cloudabi* | -sortix* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* | -moxiebox* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es* | -tirtos*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; c8051-*) os=-elf ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ola-0.10.9/config/lt~obsolete.m40000644000175000017500000001377414376533141013401 00000000000000# lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007, 2009, 2011-2015 Free Software # Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN), # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) ola-0.10.9/config/ax_have_epoll.m40000664000175000017500000000705514376533110013626 00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_have_epoll.html # =========================================================================== # # SYNOPSIS # # AX_HAVE_EPOLL([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # AX_HAVE_EPOLL_PWAIT([ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # DESCRIPTION # # This macro determines whether the system supports the epoll I/O event # interface. A neat usage example would be: # # AX_HAVE_EPOLL( # [AX_CONFIG_FEATURE_ENABLE(epoll)], # [AX_CONFIG_FEATURE_DISABLE(epoll)]) # AX_CONFIG_FEATURE( # [epoll], [This platform supports epoll(7)], # [HAVE_EPOLL], [This platform supports epoll(7).]) # # The epoll interface was added to the Linux kernel in version 2.5.45, and # the macro verifies that a kernel newer than this is installed. This # check is somewhat unreliable if doesn't match the # running kernel, but it is necessary regardless, because glibc comes with # stubs for the epoll_create(), epoll_wait(), etc. that allow programs to # compile and link even if the kernel is too old; the problem would then # be detected only at runtime. # # Linux kernel version 2.6.19 adds the epoll_pwait() call in addition to # epoll_wait(). The availability of that function can be tested with the # second macro. Generally speaking, it is safe to assume that # AX_HAVE_EPOLL would succeed if AX_HAVE_EPOLL_PWAIT has, but not the # other way round. # # LICENSE # # Copyright (c) 2008 Peter Simons # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 10 AC_DEFUN([AX_HAVE_EPOLL], [dnl ax_have_epoll_cppflags="${CPPFLAGS}" AC_CHECK_HEADER([linux/version.h], [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"]) AC_MSG_CHECKING([for Linux epoll(7) interface]) AC_CACHE_VAL([ax_cv_have_epoll], [dnl AC_LINK_IFELSE([dnl AC_LANG_PROGRAM([dnl #include #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,5,45) # error linux kernel version is too old to have epoll # endif #endif ], [dnl int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0);])], [ax_cv_have_epoll=yes], [ax_cv_have_epoll=no])]) CPPFLAGS="${ax_have_epoll_cppflags}" AS_IF([test "${ax_cv_have_epoll}" = "yes"], [AC_MSG_RESULT([yes]) $1],[AC_MSG_RESULT([no]) $2]) ])dnl AC_DEFUN([AX_HAVE_EPOLL_PWAIT], [dnl ax_have_epoll_cppflags="${CPPFLAGS}" AC_CHECK_HEADER([linux/version.h], [CPPFLAGS="${CPPFLAGS} -DHAVE_LINUX_VERSION_H"]) AC_MSG_CHECKING([for Linux epoll(7) interface with signals extension]) AC_CACHE_VAL([ax_cv_have_epoll_pwait], [dnl AC_LINK_IFELSE([dnl AC_LANG_PROGRAM([dnl #ifdef HAVE_LINUX_VERSION_H # include # if LINUX_VERSION_CODE < KERNEL_VERSION(2,6,19) # error linux kernel version is too old to have epoll_pwait # endif #endif #include #include ], [dnl int fd, rc; struct epoll_event ev; fd = epoll_create(128); rc = epoll_wait(fd, &ev, 1, 0); rc = epoll_pwait(fd, &ev, 1, 0, (sigset_t const *)(0));])], [ax_cv_have_epoll_pwait=yes], [ax_cv_have_epoll_pwait=no])]) CPPFLAGS="${ax_have_epoll_cppflags}" AS_IF([test "${ax_cv_have_epoll_pwait}" = "yes"], [AC_MSG_RESULT([yes]) $1],[AC_MSG_RESULT([no]) $2]) ])dnl ola-0.10.9/config/ax_prog_doxygen.m40000664000175000017500000004272414376533110014216 00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_prog_doxygen.html # =========================================================================== # # SYNOPSIS # # DX_INIT_DOXYGEN(PROJECT-NAME, DOXYFILE-PATH, [OUTPUT-DIR]) # DX_DOXYGEN_FEATURE(ON|OFF) # DX_DOT_FEATURE(ON|OFF) # DX_HTML_FEATURE(ON|OFF) # DX_CHM_FEATURE(ON|OFF) # DX_CHI_FEATURE(ON|OFF) # DX_MAN_FEATURE(ON|OFF) # DX_RTF_FEATURE(ON|OFF) # DX_XML_FEATURE(ON|OFF) # DX_PDF_FEATURE(ON|OFF) # DX_PS_FEATURE(ON|OFF) # # DESCRIPTION # # The DX_*_FEATURE macros control the default setting for the given # Doxygen feature. Supported features are 'DOXYGEN' itself, 'DOT' for # generating graphics, 'HTML' for plain HTML, 'CHM' for compressed HTML # help (for MS users), 'CHI' for generating a separate .chi file by the # .chm file, and 'MAN', 'RTF', 'XML', 'PDF' and 'PS' for the appropriate # output formats. The environment variable DOXYGEN_PAPER_SIZE may be # specified to override the default 'a4wide' paper size. # # By default, HTML, PDF and PS documentation is generated as this seems to # be the most popular and portable combination. MAN pages created by # Doxygen are usually problematic, though by picking an appropriate subset # and doing some massaging they might be better than nothing. CHM and RTF # are specific for MS (note that you can't generate both HTML and CHM at # the same time). The XML is rather useless unless you apply specialized # post-processing to it. # # The macros mainly control the default state of the feature. The use can # override the default by specifying --enable or --disable. The macros # ensure that contradictory flags are not given (e.g., # --enable-doxygen-html and --enable-doxygen-chm, # --enable-doxygen-anything with --disable-doxygen, etc.) Finally, each # feature will be automatically disabled (with a warning) if the required # programs are missing. # # Once all the feature defaults have been specified, call DX_INIT_DOXYGEN # with the following parameters: a one-word name for the project for use # as a filename base etc., an optional configuration file name (the # default is 'Doxyfile', the same as Doxygen's default), and an optional # output directory name (the default is 'doxygen-doc'). # # Automake Support # # The following is a template aminclude.am file for use with Automake. # Make targets and variables values are controlled by the various # DX_COND_* conditionals set by autoconf. # # The provided targets are: # # doxygen-doc: Generate all doxygen documentation. # # doxygen-run: Run doxygen, which will generate some of the # documentation (HTML, CHM, CHI, MAN, RTF, XML) # but will not do the post processing required # for the rest of it (PS, PDF, and some MAN). # # doxygen-man: Rename some doxygen generated man pages. # # doxygen-ps: Generate doxygen PostScript documentation. # # doxygen-pdf: Generate doxygen PDF documentation. # # Note that by default these are not integrated into the automake targets. # If doxygen is used to generate man pages, you can achieve this # integration by setting man3_MANS to the list of man pages generated and # then adding the dependency: # # $(man3_MANS): doxygen-doc # # This will cause make to run doxygen and generate all the documentation. # # The following variable is intended for use in Makefile.am: # # DX_CLEANFILES = everything to clean. # # Then add this variable to MOSTLYCLEANFILES. # # ----- begin aminclude.am ------------------------------------- # # ## --------------------------------- ## # ## Format-independent Doxygen rules. ## # ## --------------------------------- ## # # if DX_COND_doc # # ## ------------------------------- ## # ## Rules specific for HTML output. ## # ## ------------------------------- ## # # if DX_COND_html # # DX_CLEAN_HTML = @DX_DOCDIR@/html # # endif DX_COND_html # # ## ------------------------------ ## # ## Rules specific for CHM output. ## # ## ------------------------------ ## # # if DX_COND_chm # # DX_CLEAN_CHM = @DX_DOCDIR@/chm # # if DX_COND_chi # # DX_CLEAN_CHI = @DX_DOCDIR@/@PACKAGE@.chi # # endif DX_COND_chi # # endif DX_COND_chm # # ## ------------------------------ ## # ## Rules specific for MAN output. ## # ## ------------------------------ ## # # if DX_COND_man # # DX_CLEAN_MAN = @DX_DOCDIR@/man # # endif DX_COND_man # # ## ------------------------------ ## # ## Rules specific for RTF output. ## # ## ------------------------------ ## # # if DX_COND_rtf # # DX_CLEAN_RTF = @DX_DOCDIR@/rtf # # endif DX_COND_rtf # # ## ------------------------------ ## # ## Rules specific for XML output. ## # ## ------------------------------ ## # # if DX_COND_xml # # DX_CLEAN_XML = @DX_DOCDIR@/xml # # endif DX_COND_xml # # ## ----------------------------- ## # ## Rules specific for PS output. ## # ## ----------------------------- ## # # if DX_COND_ps # # DX_CLEAN_PS = @DX_DOCDIR@/@PACKAGE@.ps # # DX_PS_GOAL = doxygen-ps # # doxygen-ps: @DX_DOCDIR@/@PACKAGE@.ps # # @DX_DOCDIR@/@PACKAGE@.ps: @DX_DOCDIR@/@PACKAGE@.tag # cd @DX_DOCDIR@/latex; \ # rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ # $(DX_LATEX) refman.tex; \ # $(MAKEINDEX_PATH) refman.idx; \ # $(DX_LATEX) refman.tex; \ # countdown=5; \ # while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ # refman.log > /dev/null 2>&1 \ # && test $$countdown -gt 0; do \ # $(DX_LATEX) refman.tex; \ # countdown=`expr $$countdown - 1`; \ # done; \ # $(DX_DVIPS) -o ../@PACKAGE@.ps refman.dvi # # endif DX_COND_ps # # ## ------------------------------ ## # ## Rules specific for PDF output. ## # ## ------------------------------ ## # # if DX_COND_pdf # # DX_CLEAN_PDF = @DX_DOCDIR@/@PACKAGE@.pdf # # DX_PDF_GOAL = doxygen-pdf # # doxygen-pdf: @DX_DOCDIR@/@PACKAGE@.pdf # # @DX_DOCDIR@/@PACKAGE@.pdf: @DX_DOCDIR@/@PACKAGE@.tag # cd @DX_DOCDIR@/latex; \ # rm -f *.aux *.toc *.idx *.ind *.ilg *.log *.out; \ # $(DX_PDFLATEX) refman.tex; \ # $(DX_MAKEINDEX) refman.idx; \ # $(DX_PDFLATEX) refman.tex; \ # countdown=5; \ # while $(DX_EGREP) 'Rerun (LaTeX|to get cross-references right)' \ # refman.log > /dev/null 2>&1 \ # && test $$countdown -gt 0; do \ # $(DX_PDFLATEX) refman.tex; \ # countdown=`expr $$countdown - 1`; \ # done; \ # mv refman.pdf ../@PACKAGE@.pdf # # endif DX_COND_pdf # # ## ------------------------------------------------- ## # ## Rules specific for LaTeX (shared for PS and PDF). ## # ## ------------------------------------------------- ## # # if DX_COND_latex # # DX_CLEAN_LATEX = @DX_DOCDIR@/latex # # endif DX_COND_latex # # .PHONY: doxygen-run doxygen-doc $(DX_PS_GOAL) $(DX_PDF_GOAL) # # .INTERMEDIATE: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) # # doxygen-run: @DX_DOCDIR@/@PACKAGE@.tag # # doxygen-doc: doxygen-run $(DX_PS_GOAL) $(DX_PDF_GOAL) # # @DX_DOCDIR@/@PACKAGE@.tag: $(DX_CONFIG) $(pkginclude_HEADERS) # rm -rf @DX_DOCDIR@ # $(DX_ENV) $(DX_DOXYGEN) $(srcdir)/$(DX_CONFIG) # # DX_CLEANFILES = \ # @DX_DOCDIR@/@PACKAGE@.tag \ # -r \ # $(DX_CLEAN_HTML) \ # $(DX_CLEAN_CHM) \ # $(DX_CLEAN_CHI) \ # $(DX_CLEAN_MAN) \ # $(DX_CLEAN_RTF) \ # $(DX_CLEAN_XML) \ # $(DX_CLEAN_PS) \ # $(DX_CLEAN_PDF) \ # $(DX_CLEAN_LATEX) # # endif DX_COND_doc # # ----- end aminclude.am --------------------------------------- # # LICENSE # # Copyright (c) 2009 Oren Ben-Kiki # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 12 ## ----------## ## Defaults. ## ## ----------## DX_ENV="" AC_DEFUN([DX_FEATURE_doc], ON) AC_DEFUN([DX_FEATURE_dot], ON) AC_DEFUN([DX_FEATURE_man], OFF) AC_DEFUN([DX_FEATURE_html], ON) AC_DEFUN([DX_FEATURE_chm], OFF) AC_DEFUN([DX_FEATURE_chi], OFF) AC_DEFUN([DX_FEATURE_rtf], OFF) AC_DEFUN([DX_FEATURE_xml], OFF) AC_DEFUN([DX_FEATURE_pdf], ON) AC_DEFUN([DX_FEATURE_ps], ON) ## --------------- ## ## Private macros. ## ## --------------- ## # DX_ENV_APPEND(VARIABLE, VALUE) # ------------------------------ # Append VARIABLE="VALUE" to DX_ENV for invoking doxygen. AC_DEFUN([DX_ENV_APPEND], [AC_SUBST([DX_ENV], ["$DX_ENV $1='$2'"])]) # DX_DIRNAME_EXPR # --------------- # Expand into a shell expression prints the directory part of a path. AC_DEFUN([DX_DIRNAME_EXPR], [[expr ".$1" : '\(\.\)[^/]*$' \| "x$1" : 'x\(.*\)/[^/]*$']]) # DX_IF_FEATURE(FEATURE, IF-ON, IF-OFF) # ------------------------------------- # Expands according to the M4 (static) status of the feature. AC_DEFUN([DX_IF_FEATURE], [ifelse(DX_FEATURE_$1, ON, [$2], [$3])]) # DX_REQUIRE_PROG(VARIABLE, PROGRAM) # ---------------------------------- # Require the specified program to be found for the DX_CURRENT_FEATURE to work. AC_DEFUN([DX_REQUIRE_PROG], [ AC_PATH_TOOL([$1], [$2]) if test "$DX_FLAG_[]DX_CURRENT_FEATURE$$1" = 1; then AC_MSG_WARN([$2 not found - will not DX_CURRENT_DESCRIPTION]) AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0) fi ]) # DX_TEST_FEATURE(FEATURE) # ------------------------ # Expand to a shell expression testing whether the feature is active. AC_DEFUN([DX_TEST_FEATURE], [test "$DX_FLAG_$1" = 1]) # DX_CHECK_DEPEND(REQUIRED_FEATURE, REQUIRED_STATE) # ------------------------------------------------- # Verify that a required features has the right state before trying to turn on # the DX_CURRENT_FEATURE. AC_DEFUN([DX_CHECK_DEPEND], [ test "$DX_FLAG_$1" = "$2" \ || AC_MSG_ERROR([doxygen-DX_CURRENT_FEATURE ifelse([$2], 1, requires, contradicts) doxygen-DX_CURRENT_FEATURE]) ]) # DX_CLEAR_DEPEND(FEATURE, REQUIRED_FEATURE, REQUIRED_STATE) # ---------------------------------------------------------- # Turn off the DX_CURRENT_FEATURE if the required feature is off. AC_DEFUN([DX_CLEAR_DEPEND], [ test "$DX_FLAG_$1" = "$2" || AC_SUBST(DX_FLAG_[]DX_CURRENT_FEATURE, 0) ]) # DX_FEATURE_ARG(FEATURE, DESCRIPTION, # CHECK_DEPEND, CLEAR_DEPEND, # REQUIRE, DO-IF-ON, DO-IF-OFF) # -------------------------------------------- # Parse the command-line option controlling a feature. CHECK_DEPEND is called # if the user explicitly turns the feature on (and invokes DX_CHECK_DEPEND), # otherwise CLEAR_DEPEND is called to turn off the default state if a required # feature is disabled (using DX_CLEAR_DEPEND). REQUIRE performs additional # requirement tests (DX_REQUIRE_PROG). Finally, an automake flag is set and # DO-IF-ON or DO-IF-OFF are called according to the final state of the feature. AC_DEFUN([DX_ARG_ABLE], [ AC_DEFUN([DX_CURRENT_FEATURE], [$1]) AC_DEFUN([DX_CURRENT_DESCRIPTION], [$2]) AC_ARG_ENABLE(doxygen-$1, [AS_HELP_STRING(DX_IF_FEATURE([$1], [--disable-doxygen-$1], [--enable-doxygen-$1]), DX_IF_FEATURE([$1], [don't $2], [$2]))], [ case "$enableval" in #( y|Y|yes|Yes|YES) AC_SUBST([DX_FLAG_$1], 1) $3 ;; #( n|N|no|No|NO) AC_SUBST([DX_FLAG_$1], 0) ;; #( *) AC_MSG_ERROR([invalid value '$enableval' given to doxygen-$1]) ;; esac ], [ AC_SUBST([DX_FLAG_$1], [DX_IF_FEATURE([$1], 1, 0)]) $4 ]) if DX_TEST_FEATURE([$1]); then $5 : fi AM_CONDITIONAL(DX_COND_$1, DX_TEST_FEATURE([$1])) if DX_TEST_FEATURE([$1]); then $6 : else $7 : fi ]) ## -------------- ## ## Public macros. ## ## -------------- ## # DX_XXX_FEATURE(DEFAULT_STATE) # ----------------------------- AC_DEFUN([DX_DOXYGEN_FEATURE], [AC_DEFUN([DX_FEATURE_doc], [$1])]) AC_DEFUN([DX_DOT_FEATURE], [AC_DEFUN([DX_FEATURE_dot], [$1])]) AC_DEFUN([DX_MAN_FEATURE], [AC_DEFUN([DX_FEATURE_man], [$1])]) AC_DEFUN([DX_HTML_FEATURE], [AC_DEFUN([DX_FEATURE_html], [$1])]) AC_DEFUN([DX_CHM_FEATURE], [AC_DEFUN([DX_FEATURE_chm], [$1])]) AC_DEFUN([DX_CHI_FEATURE], [AC_DEFUN([DX_FEATURE_chi], [$1])]) AC_DEFUN([DX_RTF_FEATURE], [AC_DEFUN([DX_FEATURE_rtf], [$1])]) AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) AC_DEFUN([DX_XML_FEATURE], [AC_DEFUN([DX_FEATURE_xml], [$1])]) AC_DEFUN([DX_PDF_FEATURE], [AC_DEFUN([DX_FEATURE_pdf], [$1])]) AC_DEFUN([DX_PS_FEATURE], [AC_DEFUN([DX_FEATURE_ps], [$1])]) # DX_INIT_DOXYGEN(PROJECT, [CONFIG-FILE], [OUTPUT-DOC-DIR]) # --------------------------------------------------------- # PROJECT also serves as the base name for the documentation files. # The default CONFIG-FILE is "Doxyfile" and OUTPUT-DOC-DIR is "doxygen-doc". AC_DEFUN([DX_INIT_DOXYGEN], [ # Files: AC_SUBST([DX_PROJECT], [$1]) AC_SUBST([DX_CONFIG], [ifelse([$2], [], Doxyfile, [$2])]) AC_SUBST([DX_DOCDIR], [ifelse([$3], [], doxygen-doc, [$3])]) # Environment variables used inside doxygen.cfg: DX_ENV_APPEND(SRCDIR, $srcdir) DX_ENV_APPEND(PROJECT, $DX_PROJECT) DX_ENV_APPEND(DOCDIR, $DX_DOCDIR) DX_ENV_APPEND(VERSION, $PACKAGE_VERSION) # Doxygen itself: DX_ARG_ABLE(doc, [generate any doxygen documentation], [], [], [DX_REQUIRE_PROG([DX_DOXYGEN], doxygen) DX_REQUIRE_PROG([DX_PERL], perl)], [DX_ENV_APPEND(PERL_PATH, $DX_PERL)]) # Dot for graphics: DX_ARG_ABLE(dot, [generate graphics for doxygen documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_DOT], dot)], [DX_ENV_APPEND(HAVE_DOT, YES) DX_ENV_APPEND(DOT_PATH, [`DX_DIRNAME_EXPR($DX_DOT)`])], [DX_ENV_APPEND(HAVE_DOT, NO)]) # Man pages generation: DX_ARG_ABLE(man, [generate doxygen manual pages], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_MAN, YES)], [DX_ENV_APPEND(GENERATE_MAN, NO)]) # RTF file generation: DX_ARG_ABLE(rtf, [generate doxygen RTF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_RTF, YES)], [DX_ENV_APPEND(GENERATE_RTF, NO)]) # XML file generation: DX_ARG_ABLE(xml, [generate doxygen XML documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [], [DX_ENV_APPEND(GENERATE_XML, YES)], [DX_ENV_APPEND(GENERATE_XML, NO)]) # (Compressed) HTML help generation: DX_ARG_ABLE(chm, [generate doxygen compressed HTML help documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_HHC], hhc)], [DX_ENV_APPEND(HHC_PATH, $DX_HHC) DX_ENV_APPEND(GENERATE_HTML, YES) DX_ENV_APPEND(GENERATE_HTMLHELP, YES)], [DX_ENV_APPEND(GENERATE_HTMLHELP, NO)]) # Separate CHI file generation. DX_ARG_ABLE(chi, [generate doxygen separate compressed HTML help index file], [DX_CHECK_DEPEND(chm, 1)], [DX_CLEAR_DEPEND(chm, 1)], [], [DX_ENV_APPEND(GENERATE_CHI, YES)], [DX_ENV_APPEND(GENERATE_CHI, NO)]) # Plain HTML pages generation: DX_ARG_ABLE(html, [generate doxygen plain HTML documentation], [DX_CHECK_DEPEND(doc, 1) DX_CHECK_DEPEND(chm, 0)], [DX_CLEAR_DEPEND(doc, 1) DX_CLEAR_DEPEND(chm, 0)], [], [DX_ENV_APPEND(GENERATE_HTML, YES)], [DX_TEST_FEATURE(chm) || DX_ENV_APPEND(GENERATE_HTML, NO)]) # PostScript file generation: DX_ARG_ABLE(ps, [generate doxygen PostScript documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_LATEX], latex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_DVIPS], dvips) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # PDF file generation: DX_ARG_ABLE(pdf, [generate doxygen PDF documentation], [DX_CHECK_DEPEND(doc, 1)], [DX_CLEAR_DEPEND(doc, 1)], [DX_REQUIRE_PROG([DX_PDFLATEX], pdflatex) DX_REQUIRE_PROG([DX_MAKEINDEX], makeindex) DX_REQUIRE_PROG([DX_EGREP], egrep)]) # LaTeX generation for PS and/or PDF: AM_CONDITIONAL(DX_COND_latex, DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf)) if DX_TEST_FEATURE(ps) || DX_TEST_FEATURE(pdf); then DX_ENV_APPEND(GENERATE_LATEX, YES) else DX_ENV_APPEND(GENERATE_LATEX, NO) fi # Paper size for PS and/or PDF: AC_ARG_VAR(DOXYGEN_PAPER_SIZE, [a4wide (default), a4, letter, legal or executive]) case "$DOXYGEN_PAPER_SIZE" in #( "") AC_SUBST(DOXYGEN_PAPER_SIZE, "") ;; #( a4wide|a4|letter|legal|executive) DX_ENV_APPEND(PAPER_SIZE, $DOXYGEN_PAPER_SIZE) ;; #( *) AC_MSG_ERROR([unknown DOXYGEN_PAPER_SIZE='$DOXYGEN_PAPER_SIZE']) ;; esac #For debugging: #echo DX_FLAG_doc=$DX_FLAG_doc #echo DX_FLAG_dot=$DX_FLAG_dot #echo DX_FLAG_man=$DX_FLAG_man #echo DX_FLAG_html=$DX_FLAG_html #echo DX_FLAG_chm=$DX_FLAG_chm #echo DX_FLAG_chi=$DX_FLAG_chi #echo DX_FLAG_rtf=$DX_FLAG_rtf #echo DX_FLAG_xml=$DX_FLAG_xml #echo DX_FLAG_pdf=$DX_FLAG_pdf #echo DX_FLAG_ps=$DX_FLAG_ps #echo DX_ENV=$DX_ENV ]) ola-0.10.9/config/ola.m40000664000175000017500000001364414376533110011574 00000000000000## ola.m4 -- macros for OLA ## Copyright (C) 2009 Simon Newton ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # PROTOBUF_SUPPORT(version) # Check that the protobuf headers are installed and that protoc is the correct # version # ----------------------------------------------------------------------------- AC_DEFUN([PROTOBUF_SUPPORT], [ AC_REQUIRE_CPP() PKG_CHECK_MODULES(libprotobuf, [protobuf >= $1]) AC_SUBST([libprotobuf_CFLAGS]) AC_ARG_WITH([protoc], [AS_HELP_STRING([--with-protoc=COMMAND], [use the given protoc command instead of searching $PATH (useful for cross-compiling)])], [],[with_protoc=no]) if test "$with_protoc" != "no"; then PROTOC=$with_protoc; echo "set protoc to $with_protoc" AC_SUBST([PROTOC]) else AC_PATH_PROG([PROTOC],[protoc]) fi if test -z "$PROTOC" ; then AC_MSG_ERROR([cannot find 'protoc' program]); elif test -n "$1" ; then AC_MSG_CHECKING([protoc version]) [protoc_version=`$PROTOC --version 2>&1 | grep 'libprotoc' | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] [required=$1] [required_major=`echo $required | sed 's/[^0-9].*//'`] [required_minor=`echo $required | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`] [required_patch=`echo $required | sed 's/^.*[^0-9]//'`] [actual_major=`echo $protoc_version | sed 's/[^0-9].*//'`] [actual_minor=`echo $protoc_version | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`] [actual_patch=`echo $protoc_version | sed 's/^.*[^0-9]//'`] protoc_version_proper=`expr \ $actual_major \> $required_major \| \ $actual_major \= $required_major \& \ $actual_minor \> $required_minor \| \ $actual_major \= $required_major \& \ $actual_minor \= $required_minor \& \ $actual_patch \>= $required_patch ` if test "$protoc_version_proper" = "1" ; then AC_MSG_RESULT([$protoc_version]) else AC_MSG_ERROR([protoc version too old $protoc_version < $required]); fi fi AC_ARG_WITH([ola-protoc-plugin], [AS_HELP_STRING([--with-ola-protoc-plugin=COMMAND], [use the given ola_protoc_plugin instead of building one (useful for cross-compiling)])], [],[with_ola_protoc_plugin=no]) if test "$with_ola_protoc_plugin" != "no"; then OLA_PROTOC="$PROTOC --plugin=protoc-gen-cppservice=${with_ola_protoc_plugin}"; echo "set ola_protoc to $OLA_PROTOC" else OLA_PROTOC="$PROTOC --plugin=protoc-gen-cppservice=\$(top_builddir)/protoc/ola_protoc_plugin${EXEEXT}"; AC_CHECK_HEADER( [google/protobuf/compiler/command_line_interface.h], [], AC_MSG_ERROR([Cannot find the protoc header files])) SAVED_LIBS=$LIBS LIBS="$LIBS -lprotoc" AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include ], [google::protobuf::compiler::CommandLineInterface cli])], [TEST_LIBS="$TEST_LIBS -lprotoc"] [], [AC_MSG_ERROR([cannot find libprotoc])]) LIBS=$SAVED_LIBS fi AC_SUBST([OLA_PROTOC]) AM_CONDITIONAL(BUILD_OLA_PROTOC_PLUGIN, test "${with_ola_protoc_plugin}" = "no") ]) # PLUGIN_SUPPORT(plugin_key, conditional, prerequisites_found) # # Build the specified plugin if requested and its dependencies are met. # # Each plugin specified with PLUGIN_SUPPORT gets its own configure switches # --enable-X/--disable-X, which translate to the enable_X variable. The three # acceptable states for this variable are: # # - auto: Build the plugin if its dependencies are met, otherwise # don't. This is the default state used when the user does not specify # anything regarding this plugin. # - yes: Build the plugin and error out if its dependencies are not met. # - no: Never build the plugin. # # If the input value of enable_X is "auto" and EITHER of the following is true: # # - --disable-all-plugins is specified # - the plugin's dependencies are not met # # then PLUGIN_SUPPORT will overwrite the value of enable_X to "no". In all # other cases, the original value is preserved. # # This means that after PLUGIN_SUPPORT has "run" for a particular plugin, a value # of "auto" or "yes" means that the plugin will get built, while a value of "no" # means that it won't. AC_DEFUN([PLUGIN_SUPPORT], [ plugin_key=$1 enable_arg="enable_${plugin_key}" AC_ARG_ENABLE( [$1], AS_HELP_STRING([--disable-$1], [Disable the $1 plugin]), [], [eval $enable_arg=auto]) eval enable_plugin=\$$enable_arg; # Input validation. if test "${enable_plugin}" != "yes" -a \ "${enable_plugin}" != "no" -a \ "${enable_plugin}" != "auto"; then AC_MSG_ERROR([Invalid value for --enable-${plugin_key}/\ --disable-${plugin_key}. Valid values are yes, no and auto.]) fi # If dependencies are not met... if test "$3" = "no"; then # ...and the user has explicitly requested this plugin to be enabled, # error out. if test "${enable_plugin}" = "yes"; then AC_MSG_ERROR([Dependencies for plugin ${plugin_key} are not met.]) fi # Otherwise, silently force disable the plugin. enable_plugin="no"; fi # If we've disabled all plugins, disable this one unless it has been # explicitly enabled. if test "${enable_all_plugins}" = "no" -a "${enable_plugin}" = "auto"; then enable_plugin="no"; fi if test "${enable_plugin}" != "no"; then PLUGINS="${PLUGINS} ${plugin_key}"; AC_DEFINE_UNQUOTED($2, [1], [define if $1 is to be used]) fi AM_CONDITIONAL($2, test "${enable_plugin}" != "no") ]) ola-0.10.9/config/ola_version.m40000664000175000017500000000207614376533110013336 00000000000000## ola_version.m4 -- Defines for OLA Versioning ## Copyright (C) 2014 Peter Newman ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # Define the version information # ----------------------------------------------------------------------------- m4_define([ola_major_version], [0]) m4_define([ola_minor_version], [10]) m4_define([ola_revision_version], [9]) m4_define([ola_version], [ola_major_version.ola_minor_version.ola_revision_version]) ola-0.10.9/config/ltoptions.m40000644000175000017500000003426214376533141013055 00000000000000# Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004-2005, 2007-2009, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 8 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option '$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl 'shared' nor 'disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) _LT_UNLESS_OPTIONS([LT_INIT], [aix-soname=aix aix-soname=both aix-soname=svr4], [_LT_WITH_AIX_SONAME([aix])]) ]) ])# _LT_SET_OPTIONS ## --------------------------------- ## ## Macros to handle LT_INIT options. ## ## --------------------------------- ## # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the 'shared' and # 'disable-shared' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS=$lt_save_ifs ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the 'static' and # 'disable-static' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS=$lt_save_ifs ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the 'fast-install' # and 'disable-fast-install' LT_INIT options. # DEFAULT is either 'yes' or 'no'. If omitted, it defaults to 'yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for pkg in $enableval; do IFS=$lt_save_ifs if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS=$lt_save_ifs ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_AIX_SONAME([DEFAULT]) # ---------------------------------- # implement the --with-aix-soname flag, and support the `aix-soname=aix' # and `aix-soname=both' and `aix-soname=svr4' LT_INIT options. DEFAULT # is either `aix', `both' or `svr4'. If omitted, it defaults to `aix'. m4_define([_LT_WITH_AIX_SONAME], [m4_define([_LT_WITH_AIX_SONAME_DEFAULT], [m4_if($1, svr4, svr4, m4_if($1, both, both, aix))])dnl shared_archive_member_spec= case $host,$enable_shared in power*-*-aix[[5-9]]*,yes) AC_MSG_CHECKING([which variant of shared library versioning to provide]) AC_ARG_WITH([aix-soname], [AS_HELP_STRING([--with-aix-soname=aix|svr4|both], [shared library versioning (aka "SONAME") variant to provide on AIX, @<:@default=]_LT_WITH_AIX_SONAME_DEFAULT[@:>@.])], [case $withval in aix|svr4|both) ;; *) AC_MSG_ERROR([Unknown argument to --with-aix-soname]) ;; esac lt_cv_with_aix_soname=$with_aix_soname], [AC_CACHE_VAL([lt_cv_with_aix_soname], [lt_cv_with_aix_soname=]_LT_WITH_AIX_SONAME_DEFAULT) with_aix_soname=$lt_cv_with_aix_soname]) AC_MSG_RESULT([$with_aix_soname]) if test aix != "$with_aix_soname"; then # For the AIX way of multilib, we name the shared archive member # based on the bitwidth used, traditionally 'shr.o' or 'shr_64.o', # and 'shr.imp' or 'shr_64.imp', respectively, for the Import File. # Even when GNU compilers ignore OBJECT_MODE but need '-maix64' flag, # the AIX toolchain works better with OBJECT_MODE set (default 32). if test 64 = "${OBJECT_MODE-32}"; then shared_archive_member_spec=shr_64 else shared_archive_member_spec=shr fi fi ;; *) with_aix_soname=aix ;; esac _LT_DECL([], [shared_archive_member_spec], [0], [Shared archive member basename, for filename based shared library versioning on AIX])dnl ])# _LT_WITH_AIX_SONAME LT_OPTION_DEFINE([LT_INIT], [aix-soname=aix], [_LT_WITH_AIX_SONAME([aix])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=both], [_LT_WITH_AIX_SONAME([both])]) LT_OPTION_DEFINE([LT_INIT], [aix-soname=svr4], [_LT_WITH_AIX_SONAME([svr4])]) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the 'pic-only' and 'no-pic' # LT_INIT options. # MODE is either 'yes' or 'no'. If omitted, it defaults to 'both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs=$IFS; IFS=$IFS$PATH_SEPARATOR, for lt_pkg in $withval; do IFS=$lt_save_ifs if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS=$lt_save_ifs ;; esac], [pic_mode=m4_default([$1], [default])]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the 'pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) ## ----------------- ## ## LTDL_INIT Options ## ## ----------------- ## m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) ola-0.10.9/config/ac_python_devel.m40000664000175000017500000002177514376533110014170 00000000000000# =========================================================================== # http://autoconf-archive.cryp.to/ac_python_devel.html # =========================================================================== # # SYNOPSIS # # AC_PYTHON_DEVEL([version]) # # DESCRIPTION # # Note: Defines as a precious variable "PYTHON_VERSION". Don't override it # in your configure.ac. # # This macro checks for Python and tries to get the include path to # 'Python.h'. It provides the $(PYTHON_CPPFLAGS) and $(PYTHON_LDFLAGS) # output variables. It also exports $(PYTHON_EXTRA_LIBS) and # $(PYTHON_EXTRA_LDFLAGS) for embedding Python in your code. # # You can search for some particular version of Python by passing a # parameter to this macro, for example ">= '2.3.1'", or "== '2.4'". Please # note that you *have* to pass also an operator along with the version to # match, and pay special attention to the single quotes surrounding the # version number. Don't use "PYTHON_VERSION" for this: that environment # variable is declared as precious and thus reserved for the end-user. # # This macro should work for all versions of Python >= 2.1.0. As an end # user, you can disable the check for the python version by setting the # PYTHON_NOVERSIONCHECK environment variable to something else than the # empty string. # # If you need to use this macro for an older Python version, please # contact the authors. We're always open for feedback. # # LAST MODIFICATION # # 2008-04-12 # # COPYLEFT # # Copyright (c) 2008 Sebastian Huber # Copyright (c) 2008 Alan W. Irwin # Copyright (c) 2008 Rafael Laboissiere # Copyright (c) 2008 Andrew Collier # Copyright (c) 2008 Matteo Settenvini # Copyright (c) 2008 Horst Knorr # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Macro Archive. When you make and # distribute a modified version of the Autoconf Macro, you may extend this # special exception to the GPL to apply to your modified version as well. AC_DEFUN([AC_PYTHON_DEVEL],[ # # Allow the use of a (user set) custom python version # AC_ARG_VAR([PYTHON_VERSION],[The installed Python version to use, for example '2.3'. This string will be appended to the Python interpreter canonical name.]) AC_PATH_PROG([PYTHON],[python[$PYTHON_VERSION]]) if test -z "$PYTHON"; then AC_MSG_ERROR([Cannot find python$PYTHON_VERSION in your system path]) PYTHON_VERSION="" fi # # Check for a version of Python >= 2.1.0 # AC_MSG_CHECKING([for a version of Python >= '2.1.0']) ac_supports_python_ver=`$PYTHON -c "import sys, string; \ ver = string.split(sys.version)[[0]]; \ print ver >= '2.1.0'"` if test "$ac_supports_python_ver" != "True"; then if test -z "$PYTHON_NOVERSIONCHECK"; then AC_MSG_RESULT([no]) AC_MSG_FAILURE([ This version of the AC@&t@_PYTHON_DEVEL macro doesn't work properly with versions of Python before 2.1.0. You may need to re-run configure, setting the variables PYTHON_CPPFLAGS, PYTHON_LDFLAGS, PYTHON_SITE_PKG, PYTHON_EXTRA_LIBS and PYTHON_EXTRA_LDFLAGS by hand. Moreover, to disable this check, set PYTHON_NOVERSIONCHECK to something else than an empty string. ]) else AC_MSG_RESULT([skip at user request]) fi else AC_MSG_RESULT([yes]) fi # # if the macro parameter ``version'' is set, honour it # if test -n "$1"; then AC_MSG_CHECKING([for a version of Python $1]) ac_supports_python_ver=`$PYTHON -c "import sys, string; \ ver = string.split(sys.version)[[0]]; \ print ver $1"` if test "$ac_supports_python_ver" = "True"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) AC_MSG_ERROR([this package requires Python $1. If you have it installed, but it isn't the default Python interpreter in your system path, please pass the PYTHON_VERSION variable to configure. See ``configure --help'' for reference. ]) PYTHON_VERSION="" fi fi # # Check if you have distutils, else fail # AC_MSG_CHECKING([for the distutils Python package]) ac_distutils_result=`$PYTHON -c "import distutils" 2>&1` if test -z "$ac_distutils_result"; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) AC_MSG_ERROR([cannot import Python module "distutils". Please check your Python installation. The error was: $ac_distutils_result]) PYTHON_VERSION="" fi # # Check for Python include path # AC_MSG_CHECKING([for Python include path]) if test -z "$PYTHON_CPPFLAGS"; then python_path=`$PYTHON -c "import distutils.sysconfig; \ print distutils.sysconfig.get_python_inc();"` if test -n "${python_path}"; then python_path="-I$python_path" fi PYTHON_CPPFLAGS=$python_path fi AC_MSG_RESULT([$PYTHON_CPPFLAGS]) AC_SUBST([PYTHON_CPPFLAGS]) # # Check for Python library path # AC_MSG_CHECKING([for Python library path]) if test -z "$PYTHON_LDFLAGS"; then # (makes two attempts to ensure we've got a version number # from the interpreter) py_version=`$PYTHON -c "from distutils.sysconfig import *; \ from string import join; \ print join(get_config_vars('VERSION'))"` if test "$py_version" = "[None]"; then if test -n "$PYTHON_VERSION"; then py_version=$PYTHON_VERSION else py_version=`$PYTHON -c "import sys; \ print sys.version[[:3]]"` fi fi PYTHON_LDFLAGS=`$PYTHON -c "from distutils.sysconfig import *; \ from string import join; \ print '-L' + get_python_lib(0,1), \ '-lpython';"`$py_version fi AC_MSG_RESULT([$PYTHON_LDFLAGS]) AC_SUBST([PYTHON_LDFLAGS]) # # Check for site packages # AC_MSG_CHECKING([for Python site-packages path]) if test -z "$PYTHON_SITE_PKG"; then PYTHON_SITE_PKG=`$PYTHON -c "import distutils.sysconfig; \ print distutils.sysconfig.get_python_lib(0,0);"` fi AC_MSG_RESULT([$PYTHON_SITE_PKG]) AC_SUBST([PYTHON_SITE_PKG]) # # libraries which must be linked in when embedding # AC_MSG_CHECKING(python extra libraries) if test -z "$PYTHON_EXTRA_LIBS"; then PYTHON_EXTRA_LIBS=`$PYTHON -c "import distutils.sysconfig; \ conf = distutils.sysconfig.get_config_var; \ print conf('LOCALMODLIBS'), conf('LIBS')"` fi AC_MSG_RESULT([$PYTHON_EXTRA_LIBS]) AC_SUBST(PYTHON_EXTRA_LIBS) # # linking flags needed when embedding # AC_MSG_CHECKING(python extra linking flags) if test -z "$PYTHON_EXTRA_LDFLAGS"; then PYTHON_EXTRA_LDFLAGS=`$PYTHON -c "import distutils.sysconfig; \ conf = distutils.sysconfig.get_config_var; \ print conf('LINKFORSHARED')"` fi AC_MSG_RESULT([$PYTHON_EXTRA_LDFLAGS]) AC_SUBST(PYTHON_EXTRA_LDFLAGS) # # final check to see if everything compiles alright # AC_MSG_CHECKING([consistency of all components of python development environment]) AC_LANG_PUSH([C]) # save current global flags ac_save_CPPFLAGS="$CPPFLAGS" ac_save_LIBS="$LIBS" LIBS="$ac_save_LIBS $PYTHON_LDFLAGS" CPPFLAGS="$ac_save_CPPFLAGS $PYTHON_CPPFLAGS" AC_TRY_LINK([ #include ],[ Py_Initialize(); ],[pythonexists=yes],[pythonexists=no]) AC_MSG_RESULT([$pythonexists]) if test ! "$pythonexists" = "yes"; then AC_MSG_ERROR([ Could not link test program to Python. Maybe the main Python library has been installed in some non-standard library path. If so, pass it to configure, via the LDFLAGS environment variable. Example: ./configure LDFLAGS="-L/usr/non-standard-path/python/lib" ============================================================================ ERROR! You probably have to install the development version of the Python package for your distribution. The exact name of this package varies among them. ============================================================================ ]) PYTHON_VERSION="" fi AC_LANG_POP # turn back to default flags CPPFLAGS="$ac_save_CPPFLAGS" LIBS="$ac_save_LIBS" # # all done! # ]) ola-0.10.9/config/ltmain.sh0000644000175000017500000117146414376533141012407 00000000000000#! /bin/sh ## DO NOT EDIT - This file generated from ./build-aux/ltmain.in ## by inline-source v2014-01-03.01 # libtool (GNU libtool) 2.4.6 # Provide generalized library-building support services. # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . PROGRAM=libtool PACKAGE=libtool VERSION="2.4.6 Debian-2.4.6-0.1" package_revision=2.4.6 ## ------ ## ## Usage. ## ## ------ ## # Run './libtool --help' for help with using this script from the # command line. ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # After configure completes, it has a better idea of some of the # shell tools we need than the defaults used by the functions shared # with bootstrap, so set those here where they can still be over- # ridden by the user, but otherwise take precedence. : ${AUTOCONF="autoconf"} : ${AUTOMAKE="automake"} ## -------------------------- ## ## Source external libraries. ## ## -------------------------- ## # Much of our low-level functionality needs to be sourced from external # libraries, which are installed to $pkgauxdir. # Set a version string for this script. scriptversion=2015-01-20.17; # UTC # General shell script boiler plate, and helper functions. # Written by Gary V. Vaughan, 2004 # Copyright (C) 2004-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # As a special exception to the GNU General Public License, if you distribute # this file as part of a program or library that is built using GNU Libtool, # you may include this file under the same distribution terms that you use # for the rest of that program. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNES FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # Evaluate this file near the top of your script to gain access to # the functions and variables defined here: # # . `echo "$0" | ${SED-sed} 's|[^/]*$||'`/build-aux/funclib.sh # # If you need to override any of the default environment variable # settings, do that before evaluating this file. ## -------------------- ## ## Shell normalisation. ## ## -------------------- ## # Some shells need a little help to be as Bourne compatible as possible. # Before doing anything else, make sure all that help has been provided! DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix ;; esac fi # NLS nuisances: We save the old values in case they are required later. _G_user_locale= _G_safe_locale= for _G_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test set = \"\${$_G_var+set}\"; then save_$_G_var=\$$_G_var $_G_var=C export $_G_var _G_user_locale=\"$_G_var=\\\$save_\$_G_var; \$_G_user_locale\" _G_safe_locale=\"$_G_var=C; \$_G_safe_locale\" fi" done # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Make sure IFS has a sensible default sp=' ' nl=' ' IFS="$sp $nl" # There are apparently some retarded systems that use ';' as a PATH separator! if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi ## ------------------------- ## ## Locate command utilities. ## ## ------------------------- ## # func_executable_p FILE # ---------------------- # Check that FILE is an executable regular file. func_executable_p () { test -f "$1" && test -x "$1" } # func_path_progs PROGS_LIST CHECK_FUNC [PATH] # -------------------------------------------- # Search for either a program that responds to --version with output # containing "GNU", or else returned by CHECK_FUNC otherwise, by # trying all the directories in PATH with each of the elements of # PROGS_LIST. # # CHECK_FUNC should accept the path to a candidate program, and # set $func_check_prog_result if it truncates its output less than # $_G_path_prog_max characters. func_path_progs () { _G_progs_list=$1 _G_check_func=$2 _G_PATH=${3-"$PATH"} _G_path_prog_max=0 _G_path_prog_found=false _G_save_IFS=$IFS; IFS=${PATH_SEPARATOR-:} for _G_dir in $_G_PATH; do IFS=$_G_save_IFS test -z "$_G_dir" && _G_dir=. for _G_prog_name in $_G_progs_list; do for _exeext in '' .EXE; do _G_path_prog=$_G_dir/$_G_prog_name$_exeext func_executable_p "$_G_path_prog" || continue case `"$_G_path_prog" --version 2>&1` in *GNU*) func_path_progs_result=$_G_path_prog _G_path_prog_found=: ;; *) $_G_check_func $_G_path_prog func_path_progs_result=$func_check_prog_result ;; esac $_G_path_prog_found && break 3 done done done IFS=$_G_save_IFS test -z "$func_path_progs_result" && { echo "no acceptable sed could be found in \$PATH" >&2 exit 1 } } # We want to be able to use the functions in this file before configure # has figured out where the best binaries are kept, which means we have # to search for them ourselves - except when the results are already set # where we skip the searches. # Unless the user overrides by setting SED, search the path for either GNU # sed, or the sed that truncates its output the least. test -z "$SED" && { _G_sed_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for _G_i in 1 2 3 4 5 6 7; do _G_sed_script=$_G_sed_script$nl$_G_sed_script done echo "$_G_sed_script" 2>/dev/null | sed 99q >conftest.sed _G_sed_script= func_check_prog_sed () { _G_path_prog=$1 _G_count=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo '' >> conftest.nl "$_G_path_prog" -f conftest.sed conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "sed gsed" func_check_prog_sed $PATH:/usr/xpg4/bin rm -f conftest.sed SED=$func_path_progs_result } # Unless the user overrides by setting GREP, search the path for either GNU # grep, or the grep that truncates its output the least. test -z "$GREP" && { func_check_prog_grep () { _G_path_prog=$1 _G_count=0 _G_path_prog_max=0 printf 0123456789 >conftest.in while : do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo 'GREP' >> conftest.nl "$_G_path_prog" -e 'GREP$' -e '-(cannot match)-' conftest.out 2>/dev/null || break diff conftest.out conftest.nl >/dev/null 2>&1 || break _G_count=`expr $_G_count + 1` if test "$_G_count" -gt "$_G_path_prog_max"; then # Best one so far, save it but keep looking for a better one func_check_prog_result=$_G_path_prog _G_path_prog_max=$_G_count fi # 10*(2^10) chars as input seems more than enough test 10 -lt "$_G_count" && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out } func_path_progs "grep ggrep" func_check_prog_grep $PATH:/usr/xpg4/bin GREP=$func_path_progs_result } ## ------------------------------- ## ## User overridable command paths. ## ## ------------------------------- ## # All uppercase variable names are used for environment variables. These # variables can be overridden by the user before calling a script that # uses them if a suitable command of that name is not already available # in the command search PATH. : ${CP="cp -f"} : ${ECHO="printf %s\n"} : ${EGREP="$GREP -E"} : ${FGREP="$GREP -F"} : ${LN_S="ln -s"} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} ## -------------------- ## ## Useful sed snippets. ## ## -------------------- ## sed_dirname='s|/[^/]*$||' sed_basename='s|^.*/||' # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='s|\([`"$\\]\)|\\\1|g' # Same as above, but do not quote variable references. sed_double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s|[].[^$\\*\/]|\\&|g' # Sed substitution that converts a w32 file name or path # that contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-'\' parameter expansions in output of sed_double_quote_subst that # were '\'-ed in input to the same. If an odd number of '\' preceded a # '$' in input to sed_double_quote_subst, that '$' was protected from # expansion. Since each input '\' is now two '\'s, look for any number # of runs of four '\'s followed by two '\'s and then a '$'. '\' that '$'. _G_bs='\\' _G_bs2='\\\\' _G_bs4='\\\\\\\\' _G_dollar='\$' sed_double_backslash="\ s/$_G_bs4/&\\ /g s/^$_G_bs2$_G_dollar/$_G_bs&/ s/\\([^$_G_bs]\\)$_G_bs2$_G_dollar/\\1$_G_bs2$_G_bs$_G_dollar/g s/\n//g" ## ----------------- ## ## Global variables. ## ## ----------------- ## # Except for the global variables explicitly listed below, the following # functions in the '^func_' namespace, and the '^require_' namespace # variables initialised in the 'Resource management' section, sourcing # this file will not pollute your global namespace with anything # else. There's no portable way to scope variables in Bourne shell # though, so actually running these functions will sometimes place # results into a variable named after the function, and often use # temporary variables in the '^_G_' namespace. If you are careful to # avoid using those namespaces casually in your sourcing script, things # should continue to work as you expect. And, of course, you can freely # overwrite any of the functions or variables defined here before # calling anything to customize them. EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. # Allow overriding, eg assuming that you follow the convention of # putting '$debug_cmd' at the start of all your functions, you can get # bash to show function call trace with: # # debug_cmd='eval echo "${FUNCNAME[0]} $*" >&2' bash your-script-name debug_cmd=${debug_cmd-":"} exit_cmd=: # By convention, finish your script with: # # exit $exit_status # # so that you can set exit_status to non-zero if you want to indicate # something went wrong during execution without actually bailing out at # the point of failure. exit_status=$EXIT_SUCCESS # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath=$0 # The name of this program. progname=`$ECHO "$progpath" |$SED "$sed_basename"` # Make sure we have an absolute progpath for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=`$ECHO "$progpath" |$SED "$sed_dirname"` progdir=`cd "$progdir" && pwd` progpath=$progdir/$progname ;; *) _G_IFS=$IFS IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS=$_G_IFS test -x "$progdir/$progname" && break done IFS=$_G_IFS test -n "$progdir" || progdir=`pwd` progpath=$progdir/$progname ;; esac ## ----------------- ## ## Standard options. ## ## ----------------- ## # The following options affect the operation of the functions defined # below, and should be set appropriately depending on run-time para- # meters passed on the command line. opt_dry_run=false opt_quiet=false opt_verbose=false # Categories 'all' and 'none' are always available. Append any others # you will pass as the first argument to func_warning from your own # code. warning_categories= # By default, display warnings according to 'opt_warning_types'. Set # 'warning_func' to ':' to elide all warnings, or func_fatal_error to # treat the next displayed warning as a fatal error. warning_func=func_warn_and_continue # Set to 'all' to display all warnings, 'none' to suppress all # warnings, or a space delimited list of some subset of # 'warning_categories' to display only the listed warnings. opt_warning_types=all ## -------------------- ## ## Resource management. ## ## -------------------- ## # This section contains definitions for functions that each ensure a # particular resource (a file, or a non-empty configuration variable for # example) is available, and if appropriate to extract default values # from pertinent package files. Call them using their associated # 'require_*' variable to ensure that they are executed, at most, once. # # It's entirely deliberate that calling these functions can set # variables that don't obey the namespace limitations obeyed by the rest # of this file, in order that that they be as useful as possible to # callers. # require_term_colors # ------------------- # Allow display of bold text on terminals that support it. require_term_colors=func_require_term_colors func_require_term_colors () { $debug_cmd test -t 1 && { # COLORTERM and USE_ANSI_COLORS environment variables take # precedence, because most terminfo databases neglect to describe # whether color sequences are supported. test -n "${COLORTERM+set}" && : ${USE_ANSI_COLORS="1"} if test 1 = "$USE_ANSI_COLORS"; then # Standard ANSI escape sequences tc_reset='' tc_bold=''; tc_standout='' tc_red=''; tc_green='' tc_blue=''; tc_cyan='' else # Otherwise trust the terminfo database after all. test -n "`tput sgr0 2>/dev/null`" && { tc_reset=`tput sgr0` test -n "`tput bold 2>/dev/null`" && tc_bold=`tput bold` tc_standout=$tc_bold test -n "`tput smso 2>/dev/null`" && tc_standout=`tput smso` test -n "`tput setaf 1 2>/dev/null`" && tc_red=`tput setaf 1` test -n "`tput setaf 2 2>/dev/null`" && tc_green=`tput setaf 2` test -n "`tput setaf 4 2>/dev/null`" && tc_blue=`tput setaf 4` test -n "`tput setaf 5 2>/dev/null`" && tc_cyan=`tput setaf 5` } fi } require_term_colors=: } ## ----------------- ## ## Function library. ## ## ----------------- ## # This section contains a variety of useful functions to call in your # scripts. Take note of the portable wrappers for features provided by # some modern shells, which will fall back to slower equivalents on # less featureful shells. # func_append VAR VALUE # --------------------- # Append VALUE onto the existing contents of VAR. # We should try to minimise forks, especially on Windows where they are # unreasonably slow, so skip the feature probes when bash or zsh are # being used: if test set = "${BASH_VERSION+set}${ZSH_VERSION+set}"; then : ${_G_HAVE_ARITH_OP="yes"} : ${_G_HAVE_XSI_OPS="yes"} # The += operator was introduced in bash 3.1 case $BASH_VERSION in [12].* | 3.0 | 3.0*) ;; *) : ${_G_HAVE_PLUSEQ_OP="yes"} ;; esac fi # _G_HAVE_PLUSEQ_OP # Can be empty, in which case the shell is probed, "yes" if += is # useable or anything else if it does not work. test -z "$_G_HAVE_PLUSEQ_OP" \ && (eval 'x=a; x+=" b"; test "a b" = "$x"') 2>/dev/null \ && _G_HAVE_PLUSEQ_OP=yes if test yes = "$_G_HAVE_PLUSEQ_OP" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_append () { $debug_cmd eval "$1+=\$2" }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_append () { $debug_cmd eval "$1=\$$1\$2" } fi # func_append_quoted VAR VALUE # ---------------------------- # Quote VALUE and append to the end of shell variable VAR, separated # by a space. if test yes = "$_G_HAVE_PLUSEQ_OP"; then eval 'func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1+=\\ \$func_quote_for_eval_result" }' else func_append_quoted () { $debug_cmd func_quote_for_eval "$2" eval "$1=\$$1\\ \$func_quote_for_eval_result" } fi # func_append_uniq VAR VALUE # -------------------------- # Append unique VALUE onto the existing contents of VAR, assuming # entries are delimited by the first character of VALUE. For example: # # func_append_uniq options " --another-option option-argument" # # will only append to $options if " --another-option option-argument " # is not already present somewhere in $options already (note spaces at # each end implied by leading space in second argument). func_append_uniq () { $debug_cmd eval _G_current_value='`$ECHO $'$1'`' _G_delim=`expr "$2" : '\(.\)'` case $_G_delim$_G_current_value$_G_delim in *"$2$_G_delim"*) ;; *) func_append "$@" ;; esac } # func_arith TERM... # ------------------ # Set func_arith_result to the result of evaluating TERMs. test -z "$_G_HAVE_ARITH_OP" \ && (eval 'test 2 = $(( 1 + 1 ))') 2>/dev/null \ && _G_HAVE_ARITH_OP=yes if test yes = "$_G_HAVE_ARITH_OP"; then eval 'func_arith () { $debug_cmd func_arith_result=$(( $* )) }' else func_arith () { $debug_cmd func_arith_result=`expr "$@"` } fi # func_basename FILE # ------------------ # Set func_basename_result to FILE with everything up to and including # the last / stripped. if test yes = "$_G_HAVE_XSI_OPS"; then # If this shell supports suffix pattern removal, then use it to avoid # forking. Hide the definitions single quotes in case the shell chokes # on unsupported syntax... _b='func_basename_result=${1##*/}' _d='case $1 in */*) func_dirname_result=${1%/*}$2 ;; * ) func_dirname_result=$3 ;; esac' else # ...otherwise fall back to using sed. _b='func_basename_result=`$ECHO "$1" |$SED "$sed_basename"`' _d='func_dirname_result=`$ECHO "$1" |$SED "$sed_dirname"` if test "X$func_dirname_result" = "X$1"; then func_dirname_result=$3 else func_append func_dirname_result "$2" fi' fi eval 'func_basename () { $debug_cmd '"$_b"' }' # func_dirname FILE APPEND NONDIR_REPLACEMENT # ------------------------------------------- # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. eval 'func_dirname () { $debug_cmd '"$_d"' }' # func_dirname_and_basename FILE APPEND NONDIR_REPLACEMENT # -------------------------------------------------------- # Perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # For efficiency, we do not delegate to the functions above but instead # duplicate the functionality here. eval 'func_dirname_and_basename () { $debug_cmd '"$_b"' '"$_d"' }' # func_echo ARG... # ---------------- # Echo program name prefixed message. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname: $_G_line" done IFS=$func_echo_IFS } # func_echo_all ARG... # -------------------- # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_echo_infix_1 INFIX ARG... # ------------------------------ # Echo program name, followed by INFIX on the first line, with any # additional lines not showing INFIX. func_echo_infix_1 () { $debug_cmd $require_term_colors _G_infix=$1; shift _G_indent=$_G_infix _G_prefix="$progname: $_G_infix: " _G_message=$* # Strip color escape sequences before counting printable length for _G_tc in "$tc_reset" "$tc_bold" "$tc_standout" "$tc_red" "$tc_green" "$tc_blue" "$tc_cyan" do test -n "$_G_tc" && { _G_esc_tc=`$ECHO "$_G_tc" | $SED "$sed_make_literal_regex"` _G_indent=`$ECHO "$_G_indent" | $SED "s|$_G_esc_tc||g"` } done _G_indent="$progname: "`echo "$_G_indent" | $SED 's|.| |g'`" " ## exclude from sc_prohibit_nested_quotes func_echo_infix_1_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_infix_1_IFS $ECHO "$_G_prefix$tc_bold$_G_line$tc_reset" >&2 _G_prefix=$_G_indent done IFS=$func_echo_infix_1_IFS } # func_error ARG... # ----------------- # Echo program name prefixed message to standard error. func_error () { $debug_cmd $require_term_colors func_echo_infix_1 " $tc_standout${tc_red}error$tc_reset" "$*" >&2 } # func_fatal_error ARG... # ----------------------- # Echo program name prefixed message to standard error, and exit. func_fatal_error () { $debug_cmd func_error "$*" exit $EXIT_FAILURE } # func_grep EXPRESSION FILENAME # ----------------------------- # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $debug_cmd $GREP "$1" "$2" >/dev/null 2>&1 } # func_len STRING # --------------- # Set func_len_result to the length of STRING. STRING may not # start with a hyphen. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_len () { $debug_cmd func_len_result=${#1} }' else func_len () { $debug_cmd func_len_result=`expr "$1" : ".*" 2>/dev/null || echo $max_cmd_len` } fi # func_mkdir_p DIRECTORY-PATH # --------------------------- # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { $debug_cmd _G_directory_path=$1 _G_dir_list= if test -n "$_G_directory_path" && test : != "$opt_dry_run"; then # Protect directory names starting with '-' case $_G_directory_path in -*) _G_directory_path=./$_G_directory_path ;; esac # While some portion of DIR does not yet exist... while test ! -d "$_G_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. _G_dir_list=$_G_directory_path:$_G_dir_list # If the last portion added has no slash in it, the list is done case $_G_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop _G_directory_path=`$ECHO "$_G_directory_path" | $SED -e "$sed_dirname"` done _G_dir_list=`$ECHO "$_G_dir_list" | $SED 's|:*$||'` func_mkdir_p_IFS=$IFS; IFS=: for _G_dir in $_G_dir_list; do IFS=$func_mkdir_p_IFS # mkdir can fail with a 'File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$_G_dir" 2>/dev/null || : done IFS=$func_mkdir_p_IFS # Bail out if we (or some other process) failed to create a directory. test -d "$_G_directory_path" || \ func_fatal_error "Failed to create '$1'" fi } # func_mktempdir [BASENAME] # ------------------------- # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, BASENAME is the basename for that directory. func_mktempdir () { $debug_cmd _G_template=${TMPDIR-/tmp}/${1-$progname} if test : = "$opt_dry_run"; then # Return a directory name, but don't create it in dry-run mode _G_tmpdir=$_G_template-$$ else # If mktemp works, use that first and foremost _G_tmpdir=`mktemp -d "$_G_template-XXXXXXXX" 2>/dev/null` if test ! -d "$_G_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race _G_tmpdir=$_G_template-${RANDOM-0}$$ func_mktempdir_umask=`umask` umask 0077 $MKDIR "$_G_tmpdir" umask $func_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$_G_tmpdir" || \ func_fatal_error "cannot create temporary directory '$_G_tmpdir'" fi $ECHO "$_G_tmpdir" } # func_normal_abspath PATH # ------------------------ # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. func_normal_abspath () { $debug_cmd # These SED scripts presuppose an absolute path with a trailing slash. _G_pathcar='s|^/\([^/]*\).*$|\1|' _G_pathcdr='s|^/[^/]*||' _G_removedotparts=':dotsl s|/\./|/|g t dotsl s|/\.$|/|' _G_collapseslashes='s|/\{1,\}|/|g' _G_finalslash='s|/*$|/|' # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_removedotparts" -e "$_G_collapseslashes" -e "$_G_finalslash"` while :; do # Processed it all yet? if test / = "$func_normal_abspath_tpath"; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result"; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$_G_pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_append func_normal_abspath_result "/$func_normal_abspath_tcomponent" ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_notquiet ARG... # -------------------- # Echo program name prefixed message only when not in quiet mode. func_notquiet () { $debug_cmd $opt_quiet || func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_relative_path SRCDIR DSTDIR # -------------------------------- # Set func_relative_path_result to the relative path from SRCDIR to DSTDIR. func_relative_path () { $debug_cmd func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=$func_dirname_result if test -z "$func_relative_path_tlibdir"; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test -n "$func_stripname_result"; then func_append func_relative_path_result "/$func_stripname_result" fi # Normalisation. If bindir is libdir, return '.' else relative path. if test -n "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result" func_relative_path_result=$func_stripname_result fi test -n "$func_relative_path_result" || func_relative_path_result=. : } # func_quote_for_eval ARG... # -------------------------- # Aesthetically quote ARGs to be evaled later. # This function returns two values: # i) func_quote_for_eval_result # double-quoted, suitable for a subsequent eval # ii) func_quote_for_eval_unquoted_result # has all characters that are still active within double # quotes backslashified. func_quote_for_eval () { $debug_cmd func_quote_for_eval_unquoted_result= func_quote_for_eval_result= while test 0 -lt $#; do case $1 in *[\\\`\"\$]*) _G_unquoted_arg=`printf '%s\n' "$1" |$SED "$sed_quote_subst"` ;; *) _G_unquoted_arg=$1 ;; esac if test -n "$func_quote_for_eval_unquoted_result"; then func_append func_quote_for_eval_unquoted_result " $_G_unquoted_arg" else func_append func_quote_for_eval_unquoted_result "$_G_unquoted_arg" fi case $_G_unquoted_arg in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and variable expansion # for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_quoted_arg=\"$_G_unquoted_arg\" ;; *) _G_quoted_arg=$_G_unquoted_arg ;; esac if test -n "$func_quote_for_eval_result"; then func_append func_quote_for_eval_result " $_G_quoted_arg" else func_append func_quote_for_eval_result "$_G_quoted_arg" fi shift done } # func_quote_for_expand ARG # ------------------------- # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { $debug_cmd case $1 in *[\\\`\"]*) _G_arg=`$ECHO "$1" | $SED \ -e "$sed_double_quote_subst" -e "$sed_double_backslash"` ;; *) _G_arg=$1 ;; esac case $_G_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") _G_arg=\"$_G_arg\" ;; esac func_quote_for_expand_result=$_G_arg } # func_stripname PREFIX SUFFIX NAME # --------------------------------- # strip PREFIX and SUFFIX from NAME, and store in func_stripname_result. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_stripname () { $debug_cmd # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary variable first. func_stripname_result=$3 func_stripname_result=${func_stripname_result#"$1"} func_stripname_result=${func_stripname_result%"$2"} }' else func_stripname () { $debug_cmd case $2 in .*) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%\\\\$2\$%%"`;; *) func_stripname_result=`$ECHO "$3" | $SED -e "s%^$1%%" -e "s%$2\$%%"`;; esac } fi # func_show_eval CMD [FAIL_EXP] # ----------------------------- # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} func_quote_for_expand "$_G_cmd" eval "func_notquiet $func_quote_for_expand_result" $opt_dry_run || { eval "$_G_cmd" _G_status=$? if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_show_eval_locale CMD [FAIL_EXP] # ------------------------------------ # Unless opt_quiet is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { $debug_cmd _G_cmd=$1 _G_fail_exp=${2-':'} $opt_quiet || { func_quote_for_expand "$_G_cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || { eval "$_G_user_locale $_G_cmd" _G_status=$? eval "$_G_safe_locale" if test 0 -ne "$_G_status"; then eval "(exit $_G_status); $_G_fail_exp" fi } } # func_tr_sh # ---------- # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { $debug_cmd case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED -e 's/^\([0-9]\)/_\1/' -e 's/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_verbose ARG... # ------------------- # Echo program name prefixed message in verbose mode only. func_verbose () { $debug_cmd $opt_verbose && func_echo "$*" : } # func_warn_and_continue ARG... # ----------------------------- # Echo program name prefixed warning message to standard error. func_warn_and_continue () { $debug_cmd $require_term_colors func_echo_infix_1 "${tc_red}warning$tc_reset" "$*" >&2 } # func_warning CATEGORY ARG... # ---------------------------- # Echo program name prefixed warning message to standard error. Warning # messages can be filtered according to CATEGORY, where this function # elides messages where CATEGORY is not listed in the global variable # 'opt_warning_types'. func_warning () { $debug_cmd # CATEGORY must be in the warning_categories list! case " $warning_categories " in *" $1 "*) ;; *) func_internal_error "invalid warning category '$1'" ;; esac _G_category=$1 shift case " $opt_warning_types " in *" $_G_category "*) $warning_func ${1+"$@"} ;; esac } # func_sort_ver VER1 VER2 # ----------------------- # 'sort -V' is not generally available. # Note this deviates from the version comparison in automake # in that it treats 1.5 < 1.5.0, and treats 1.4.4a < 1.4-p3a # but this should suffice as we won't be specifying old # version formats or redundant trailing .0 in bootstrap.conf. # If we did want full compatibility then we should probably # use m4_version_compare from autoconf. func_sort_ver () { $debug_cmd printf '%s\n%s\n' "$1" "$2" \ | sort -t. -k 1,1n -k 2,2n -k 3,3n -k 4,4n -k 5,5n -k 6,6n -k 7,7n -k 8,8n -k 9,9n } # func_lt_ver PREV CURR # --------------------- # Return true if PREV and CURR are in the correct order according to # func_sort_ver, otherwise false. Use it like this: # # func_lt_ver "$prev_ver" "$proposed_ver" || func_fatal_error "..." func_lt_ver () { $debug_cmd test "x$1" = x`func_sort_ver "$1" "$2" | $SED 1q` } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: #! /bin/sh # Set a version string for this script. scriptversion=2014-01-07.03; # UTC # A portable, pluggable option parser for Bourne shell. # Written by Gary V. Vaughan, 2010 # Copyright (C) 2010-2015 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # Please report bugs or propose patches to gary@gnu.org. ## ------ ## ## Usage. ## ## ------ ## # This file is a library for parsing options in your shell scripts along # with assorted other useful supporting features that you can make use # of too. # # For the simplest scripts you might need only: # # #!/bin/sh # . relative/path/to/funclib.sh # . relative/path/to/options-parser # scriptversion=1.0 # func_options ${1+"$@"} # eval set dummy "$func_options_result"; shift # ...rest of your script... # # In order for the '--version' option to work, you will need to have a # suitably formatted comment like the one at the top of this file # starting with '# Written by ' and ending with '# warranty; '. # # For '-h' and '--help' to work, you will also need a one line # description of your script's purpose in a comment directly above the # '# Written by ' line, like the one at the top of this file. # # The default options also support '--debug', which will turn on shell # execution tracing (see the comment above debug_cmd below for another # use), and '--verbose' and the func_verbose function to allow your script # to display verbose messages only when your user has specified # '--verbose'. # # After sourcing this file, you can plug processing for additional # options by amending the variables from the 'Configuration' section # below, and following the instructions in the 'Option parsing' # section further down. ## -------------- ## ## Configuration. ## ## -------------- ## # You should override these variables in your script after sourcing this # file so that they reflect the customisations you have added to the # option parser. # The usage line for option parsing errors and the start of '-h' and # '--help' output messages. You can embed shell variables for delayed # expansion at the time the message is displayed, but you will need to # quote other shell meta-characters carefully to prevent them being # expanded when the contents are evaled. usage='$progpath [OPTION]...' # Short help message in response to '-h' and '--help'. Add to this or # override it after sourcing this library to reflect the full set of # options your script accepts. usage_message="\ --debug enable verbose shell tracing -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -v, --verbose verbosely report processing --version print version information and exit -h, --help print short or long help message and exit " # Additional text appended to 'usage_message' in response to '--help'. long_help_message=" Warning categories include: 'all' show all warnings 'none' turn off all the warnings 'error' warnings are treated as fatal errors" # Help message printed before fatal option parsing errors. fatal_help="Try '\$progname --help' for more information." ## ------------------------- ## ## Hook function management. ## ## ------------------------- ## # This section contains functions for adding, removing, and running hooks # to the main code. A hook is just a named list of of function, that can # be run in order later on. # func_hookable FUNC_NAME # ----------------------- # Declare that FUNC_NAME will run hooks added with # 'func_add_hook FUNC_NAME ...'. func_hookable () { $debug_cmd func_append hookable_fns " $1" } # func_add_hook FUNC_NAME HOOK_FUNC # --------------------------------- # Request that FUNC_NAME call HOOK_FUNC before it returns. FUNC_NAME must # first have been declared "hookable" by a call to 'func_hookable'. func_add_hook () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not accept hook functions." ;; esac eval func_append ${1}_hooks '" $2"' } # func_remove_hook FUNC_NAME HOOK_FUNC # ------------------------------------ # Remove HOOK_FUNC from the list of functions called by FUNC_NAME. func_remove_hook () { $debug_cmd eval ${1}_hooks='`$ECHO "\$'$1'_hooks" |$SED "s| '$2'||"`' } # func_run_hooks FUNC_NAME [ARG]... # --------------------------------- # Run all hook functions registered to FUNC_NAME. # It is assumed that the list of hook functions contains nothing more # than a whitespace-delimited list of legal shell function names, and # no effort is wasted trying to catch shell meta-characters or preserve # whitespace. func_run_hooks () { $debug_cmd case " $hookable_fns " in *" $1 "*) ;; *) func_fatal_error "'$1' does not support hook funcions.n" ;; esac eval _G_hook_fns=\$$1_hooks; shift for _G_hook in $_G_hook_fns; do eval $_G_hook '"$@"' # store returned options list back into positional # parameters for next 'cmd' execution. eval _G_hook_result=\$${_G_hook}_result eval set dummy "$_G_hook_result"; shift done func_quote_for_eval ${1+"$@"} func_run_hooks_result=$func_quote_for_eval_result } ## --------------- ## ## Option parsing. ## ## --------------- ## # In order to add your own option parsing hooks, you must accept the # full positional parameter list in your hook function, remove any # options that you action, and then pass back the remaining unprocessed # options in '_result', escaped suitably for # 'eval'. Like this: # # my_options_prep () # { # $debug_cmd # # # Extend the existing usage message. # usage_message=$usage_message' # -s, --silent don'\''t print informational messages # ' # # func_quote_for_eval ${1+"$@"} # my_options_prep_result=$func_quote_for_eval_result # } # func_add_hook func_options_prep my_options_prep # # # my_silent_option () # { # $debug_cmd # # # Note that for efficiency, we parse as many options as we can # # recognise in a loop before passing the remainder back to the # # caller on the first unrecognised argument we encounter. # while test $# -gt 0; do # opt=$1; shift # case $opt in # --silent|-s) opt_silent=: ;; # # Separate non-argument short options: # -s*) func_split_short_opt "$_G_opt" # set dummy "$func_split_short_opt_name" \ # "-$func_split_short_opt_arg" ${1+"$@"} # shift # ;; # *) set dummy "$_G_opt" "$*"; shift; break ;; # esac # done # # func_quote_for_eval ${1+"$@"} # my_silent_option_result=$func_quote_for_eval_result # } # func_add_hook func_parse_options my_silent_option # # # my_option_validation () # { # $debug_cmd # # $opt_silent && $opt_verbose && func_fatal_help "\ # '--silent' and '--verbose' options are mutually exclusive." # # func_quote_for_eval ${1+"$@"} # my_option_validation_result=$func_quote_for_eval_result # } # func_add_hook func_validate_options my_option_validation # # You'll alse need to manually amend $usage_message to reflect the extra # options you parse. It's preferable to append if you can, so that # multiple option parsing hooks can be added safely. # func_options [ARG]... # --------------------- # All the functions called inside func_options are hookable. See the # individual implementations for details. func_hookable func_options func_options () { $debug_cmd func_options_prep ${1+"$@"} eval func_parse_options \ ${func_options_prep_result+"$func_options_prep_result"} eval func_validate_options \ ${func_parse_options_result+"$func_parse_options_result"} eval func_run_hooks func_options \ ${func_validate_options_result+"$func_validate_options_result"} # save modified positional parameters for caller func_options_result=$func_run_hooks_result } # func_options_prep [ARG]... # -------------------------- # All initialisations required before starting the option parse loop. # Note that when calling hook functions, we pass through the list of # positional parameters. If a hook function modifies that list, and # needs to propogate that back to rest of this script, then the complete # modified list must be put in 'func_run_hooks_result' before # returning. func_hookable func_options_prep func_options_prep () { $debug_cmd # Option defaults: opt_verbose=false opt_warning_types= func_run_hooks func_options_prep ${1+"$@"} # save modified positional parameters for caller func_options_prep_result=$func_run_hooks_result } # func_parse_options [ARG]... # --------------------------- # The main option parsing loop. func_hookable func_parse_options func_parse_options () { $debug_cmd func_parse_options_result= # this just eases exit handling while test $# -gt 0; do # Defer to hook functions for initial option parsing, so they # get priority in the event of reusing an option name. func_run_hooks func_parse_options ${1+"$@"} # Adjust func_parse_options positional parameters to match eval set dummy "$func_run_hooks_result"; shift # Break out of the loop if we already parsed every option. test $# -gt 0 || break _G_opt=$1 shift case $_G_opt in --debug|-x) debug_cmd='set -x' func_echo "enabling shell trace mode" $debug_cmd ;; --no-warnings|--no-warning|--no-warn) set dummy --warnings none ${1+"$@"} shift ;; --warnings|--warning|-W) test $# = 0 && func_missing_arg $_G_opt && break case " $warning_categories $1" in *" $1 "*) # trailing space prevents matching last $1 above func_append_uniq opt_warning_types " $1" ;; *all) opt_warning_types=$warning_categories ;; *none) opt_warning_types=none warning_func=: ;; *error) opt_warning_types=$warning_categories warning_func=func_fatal_error ;; *) func_fatal_error \ "unsupported warning category: '$1'" ;; esac shift ;; --verbose|-v) opt_verbose=: ;; --version) func_version ;; -\?|-h) func_usage ;; --help) func_help ;; # Separate optargs to long options (plugins may need this): --*=*) func_split_equals "$_G_opt" set dummy "$func_split_equals_lhs" \ "$func_split_equals_rhs" ${1+"$@"} shift ;; # Separate optargs to short options: -W*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "$func_split_short_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-v*|-x*) func_split_short_opt "$_G_opt" set dummy "$func_split_short_opt_name" \ "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognised option: '$_G_opt'" ;; *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} func_parse_options_result=$func_quote_for_eval_result } # func_validate_options [ARG]... # ------------------------------ # Perform any sanity checks on option settings and/or unconsumed # arguments. func_hookable func_validate_options func_validate_options () { $debug_cmd # Display all warnings if -W was not given. test -n "$opt_warning_types" || opt_warning_types=" $warning_categories" func_run_hooks func_validate_options ${1+"$@"} # Bail if the options were screwed! $exit_cmd $EXIT_FAILURE # save modified positional parameters for caller func_validate_options_result=$func_run_hooks_result } ## ----------------- ## ## Helper functions. ## ## ----------------- ## # This section contains the helper functions used by the rest of the # hookable option parser framework in ascii-betical order. # func_fatal_help ARG... # ---------------------- # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { $debug_cmd eval \$ECHO \""Usage: $usage"\" eval \$ECHO \""$fatal_help"\" func_error ${1+"$@"} exit $EXIT_FAILURE } # func_help # --------- # Echo long help message to standard output and exit. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message" exit 0 } # func_missing_arg ARGNAME # ------------------------ # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $debug_cmd func_error "Missing argument for '$1'." exit_cmd=exit } # func_split_equals STRING # ------------------------ # Set func_split_equals_lhs and func_split_equals_rhs shell variables after # splitting STRING at the '=' sign. test -z "$_G_HAVE_XSI_OPS" \ && (eval 'x=a/b/c; test 5aa/bb/cc = "${#x}${x%%/*}${x%/*}${x#*/}${x##*/}"') 2>/dev/null \ && _G_HAVE_XSI_OPS=yes if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_equals () { $debug_cmd func_split_equals_lhs=${1%%=*} func_split_equals_rhs=${1#*=} test "x$func_split_equals_lhs" = "x$1" \ && func_split_equals_rhs= }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_equals () { $debug_cmd func_split_equals_lhs=`expr "x$1" : 'x\([^=]*\)'` func_split_equals_rhs= test "x$func_split_equals_lhs" = "x$1" \ || func_split_equals_rhs=`expr "x$1" : 'x[^=]*=\(.*\)$'` } fi #func_split_equals # func_split_short_opt SHORTOPT # ----------------------------- # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. if test yes = "$_G_HAVE_XSI_OPS" then # This is an XSI compatible shell, allowing a faster implementation... eval 'func_split_short_opt () { $debug_cmd func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"} }' else # ...otherwise fall back to using expr, which is often a shell builtin. func_split_short_opt () { $debug_cmd func_split_short_opt_name=`expr "x$1" : 'x-\(.\)'` func_split_short_opt_arg=`expr "x$1" : 'x-.\(.*\)$'` } fi #func_split_short_opt # func_usage # ---------- # Echo short help message to standard output and exit. func_usage () { $debug_cmd func_usage_message $ECHO "Run '$progname --help |${PAGER-more}' for full usage" exit 0 } # func_usage_message # ------------------ # Echo short help message to standard output. func_usage_message () { $debug_cmd eval \$ECHO \""Usage: $usage"\" echo $SED -n 's|^# || /^Written by/{ x;p;x } h /^Written by/q' < "$progpath" echo eval \$ECHO \""$usage_message"\" } # func_version # ------------ # Echo version message to standard output and exit. func_version () { $debug_cmd printf '%s\n' "$progname $scriptversion" $SED -n ' /(C)/!b go :more /\./!{ N s|\n# | | b more } :go /^# Written by /,/# warranty; / { s|^# || s|^# *$|| s|\((C)\)[ 0-9,-]*[ ,-]\([1-9][0-9]* \)|\1 \2| p } /^# Written by / { s|^# || p } /^warranty; /q' < "$progpath" exit $? } # Local variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'before-save-hook 'time-stamp) # time-stamp-pattern: "10/scriptversion=%:y-%02m-%02d.%02H; # UTC" # time-stamp-time-zone: "UTC" # End: # Set a version string. scriptversion='(GNU libtool) 2.4.6' # func_echo ARG... # ---------------- # Libtool also displays the current mode in messages, so override # funclib.sh func_echo with this custom definition. func_echo () { $debug_cmd _G_message=$* func_echo_IFS=$IFS IFS=$nl for _G_line in $_G_message; do IFS=$func_echo_IFS $ECHO "$progname${opt_mode+: $opt_mode}: $_G_line" done IFS=$func_echo_IFS } # func_warning ARG... # ------------------- # Libtool warnings are not categorized, so override funclib.sh # func_warning with this simpler definition. func_warning () { $debug_cmd $warning_func ${1+"$@"} } ## ---------------- ## ## Options parsing. ## ## ---------------- ## # Hook in the functions to make sure our own options are parsed during # the option parsing loop. usage='$progpath [OPTION]... [MODE-ARG]...' # Short help message in response to '-h'. usage_message="Options: --config show all configuration variables --debug enable verbose shell tracing -n, --dry-run display commands without modifying any files --features display basic configuration information and exit --mode=MODE use operation mode MODE --no-warnings equivalent to '-Wnone' --preserve-dup-deps don't remove duplicate dependency libraries --quiet, --silent don't print informational messages --tag=TAG use configuration variables from tag TAG -v, --verbose print more informational messages than default --version print version information -W, --warnings=CATEGORY report the warnings falling in CATEGORY [all] -h, --help, --help-all print short, long, or detailed help message " # Additional text appended to 'usage_message' in response to '--help'. func_help () { $debug_cmd func_usage_message $ECHO "$long_help_message MODE must be one of the following: clean remove files from the build directory compile compile a source file into a libtool object execute automatically set library path, then run a program finish complete the installation of libtool libraries install install libraries or executables link create a library or an executable uninstall remove libraries from an installed directory MODE-ARGS vary depending on the MODE. When passed as first option, '--mode=MODE' may be abbreviated as 'MODE' or a unique abbreviation of that. Try '$progname --help --mode=MODE' for a more detailed description of MODE. When reporting a bug, please describe a test case to reproduce it and include the following information: host-triplet: $host shell: $SHELL compiler: $LTCC compiler flags: $LTCFLAGS linker: $LD (gnu? $with_gnu_ld) version: $progname (GNU libtool) 2.4.6 automake: `($AUTOMAKE --version) 2>/dev/null |$SED 1q` autoconf: `($AUTOCONF --version) 2>/dev/null |$SED 1q` Report bugs to . GNU libtool home page: . General help using GNU software: ." exit 0 } # func_lo2o OBJECT-NAME # --------------------- # Transform OBJECT-NAME from a '.lo' suffix to the platform specific # object suffix. lo2o=s/\\.lo\$/.$objext/ o2lo=s/\\.$objext\$/.lo/ if test yes = "$_G_HAVE_XSI_OPS"; then eval 'func_lo2o () { case $1 in *.lo) func_lo2o_result=${1%.lo}.$objext ;; * ) func_lo2o_result=$1 ;; esac }' # func_xform LIBOBJ-OR-SOURCE # --------------------------- # Transform LIBOBJ-OR-SOURCE from a '.o' or '.c' (or otherwise) # suffix to a '.lo' libtool-object suffix. eval 'func_xform () { func_xform_result=${1%.*}.lo }' else # ...otherwise fall back to using sed. func_lo2o () { func_lo2o_result=`$ECHO "$1" | $SED "$lo2o"` } func_xform () { func_xform_result=`$ECHO "$1" | $SED 's|\.[^.]*$|.lo|'` } fi # func_fatal_configuration ARG... # ------------------------------- # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func__fatal_error ${1+"$@"} \ "See the $PACKAGE documentation for more information." \ "Fatal configuration error." } # func_config # ----------- # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # ------------- # Display the features supported by this script. func_features () { echo "host: $host" if test yes = "$build_libtool_libs"; then echo "enable shared libraries" else echo "disable shared libraries" fi if test yes = "$build_old_libs"; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag TAGNAME # ----------------------- # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname=$1 re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf=/$re_begincf/,/$re_endcf/p # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # ------------------------ # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # libtool_options_prep [ARG]... # ----------------------------- # Preparation for options parsed by libtool. libtool_options_prep () { $debug_mode # Option defaults: opt_config=false opt_dlopen= opt_dry_run=false opt_help=false opt_mode= opt_preserve_dup_deps=false opt_quiet=false nonopt= preserve_args= # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Pass back the list of options. func_quote_for_eval ${1+"$@"} libtool_options_prep_result=$func_quote_for_eval_result } func_add_hook func_options_prep libtool_options_prep # libtool_parse_options [ARG]... # --------------------------------- # Provide handling for libtool specific options. libtool_parse_options () { $debug_cmd # Perform our own loop to consume as many options as possible in # each iteration. while test $# -gt 0; do _G_opt=$1 shift case $_G_opt in --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) func_config ;; --dlopen|-dlopen) opt_dlopen="${opt_dlopen+$opt_dlopen }$1" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) func_features ;; --finish) set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $_G_opt && break opt_mode=$1 case $1 in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $_G_opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_quiet=false func_append preserve_args " $_G_opt" ;; --no-warnings|--no-warning|--no-warn) opt_warning=false func_append preserve_args " $_G_opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $_G_opt" ;; --silent|--quiet) opt_quiet=: opt_verbose=false func_append preserve_args " $_G_opt" ;; --tag) test $# = 0 && func_missing_arg $_G_opt && break opt_tag=$1 func_append preserve_args " $_G_opt $1" func_enable_tag "$1" shift ;; --verbose|-v) opt_quiet=false opt_verbose=: func_append preserve_args " $_G_opt" ;; # An option not handled by this hook function: *) set dummy "$_G_opt" ${1+"$@"}; shift; break ;; esac done # save modified positional parameters for caller func_quote_for_eval ${1+"$@"} libtool_parse_options_result=$func_quote_for_eval_result } func_add_hook func_parse_options libtool_parse_options # libtool_validate_options [ARG]... # --------------------------------- # Perform any sanity checks on option settings and/or unconsumed # arguments. libtool_validate_options () { # save first non-option argument if test 0 -lt $#; then nonopt=$1 shift fi # preserve --debug test : = "$debug_cmd" || func_append preserve_args " --debug" case $host in # Solaris2 added to fix http://debbugs.gnu.org/cgi/bugreport.cgi?bug=16452 # see also: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=59788 *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* | *os2*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match test yes != "$build_libtool_libs" \ && test yes != "$build_old_libs" \ && func_fatal_configuration "not configured to build any kind of library" # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test execute != "$opt_mode"; then func_error "unrecognized option '-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help=$help help="Try '$progname --help --mode=$opt_mode' for more information." } # Pass back the unparsed argument list func_quote_for_eval ${1+"$@"} libtool_validate_options_result=$func_quote_for_eval_result } func_add_hook func_validate_options libtool_validate_options # Process options as early as possible so that --help and --version # can return quickly. func_options ${1+"$@"} eval set dummy "$func_options_result"; shift ## ----------- ## ## Main. ## ## ----------- ## magic='%%%MAGIC variable%%%' magic_exe='%%%MAGIC EXE variable%%%' # Global variables. extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # func_generated_by_libtool # True iff stdin has been generated by Libtool. This function is only # a basic sanity check; it will hardly flush out determined imposters. func_generated_by_libtool_p () { $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null | func_generated_by_libtool_p } # func_lalib_unsafe_p file # True iff FILE is a libtool '.la' library or '.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if 'file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case $lalib_p_line in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test yes = "$lalib_p" } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { test -f "$1" && $lt_truncate_bin < "$1" 2>/dev/null | func_generated_by_libtool_p } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result=$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $debug_cmd save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # 'FILE.' does not work on cygwin managed mounts. func_source () { $debug_cmd case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case $lt_sysroot:$1 in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result='='$func_stripname_result ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $debug_cmd if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`$SED -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with '--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=$1 if test yes = "$build_libtool_libs"; then write_lobj=\'$2\' else write_lobj=none fi if test yes = "$build_old_libs"; then write_oldobj=\'$3\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "$func_convert_core_file_wine_to_w32_tmp"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $debug_cmd # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result= if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result"; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result=$func_convert_core_file_wine_to_w32_result else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $debug_cmd if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: '$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $debug_cmd # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $debug_cmd if test -z "$2" && test -n "$1"; then func_error "Could not determine host file name corresponding to" func_error " '$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result=$1 fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $debug_cmd if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " '$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result=$3 fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $debug_cmd case $4 in $1 ) func_to_host_path_result=$3$func_to_host_path_result ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via '$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $debug_cmd $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $debug_cmd case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result=$1 } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result=$func_convert_core_msys_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result=$func_convert_core_file_wine_to_w32_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $debug_cmd func_to_host_file_result=$1 if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result=$func_cygpath_result fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via '$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $debug_cmd if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd=func_convert_path_$func_stripname_result fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $debug_cmd func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result=$1 } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_msys_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result=$func_convert_core_path_wine_to_w32_result func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $debug_cmd func_to_host_path_result=$1 if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result=$func_cygpath_result func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_dll_def_p FILE # True iff FILE is a Windows DLL '.def' file. # Keep in sync with _LT_DLL_DEF_P in libtool.m4 func_dll_def_p () { $debug_cmd func_dll_def_p_tmp=`$SED -n \ -e 's/^[ ]*//' \ -e '/^\(;.*\)*$/d' \ -e 's/^\(EXPORTS\|LIBRARY\)\([ ].*\)*$/DEF/p' \ -e q \ "$1"` test DEF = "$func_dll_def_p_tmp" } # func_mode_compile arg... func_mode_compile () { $debug_cmd # Get the compilation command and the source file. base_compile= srcfile=$nonopt # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg=$arg arg_mode=normal ;; target ) libobj=$arg arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify '-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs=$IFS; IFS=, for arg in $args; do IFS=$save_ifs func_append_quoted lastarg "$arg" done IFS=$save_ifs func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg=$srcfile srcfile=$arg ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with '-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj=$func_basename_result } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from '$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test yes = "$build_libtool_libs" \ || func_fatal_configuration "cannot build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name '$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname=$func_basename_result xdir=$func_dirname_result lobj=$xdir$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test yes = "$build_old_libs"; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test no = "$pic_mode" && test pass_all != "$deplibs_check_method"; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test no = "$compiler_c_o"; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.$objext lockfile=$output_obj.lock else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test yes = "$need_locks"; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test warn = "$need_locks"; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test yes = "$build_libtool_libs"; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test no != "$pic_mode"; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test yes = "$suppress_opt"; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test yes = "$build_old_libs"; then if test yes != "$pic_mode"; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test yes = "$compiler_c_o"; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test warn = "$need_locks" && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support '-c' and '-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test no != "$need_locks"; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test compile = "$opt_mode" && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a '.o' file suitable for static linking -static only build a '.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a 'standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix '.c' with the library object suffix, '.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to '-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the '--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the 'install' or 'cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE '-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE use a list of object files found in FILE to specify objects -os2dllname NAME force a short DLL name on OS/2 (no effect on other OSes) -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with '-') are ignored. Every other argument is treated as a filename. Files ending in '.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in '.la', then a libtool library is created, only library objects ('.lo' files) may be specified, and '-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in '.a' or '.lib', then a standard library is created using 'ar' and 'ranlib', or on Windows using 'lib'. If OUTPUT-FILE ends in '.lo' or '.$objext', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically '/bin/rm'). RM-OPTIONS are options (such as '-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode '$opt_mode'" ;; esac echo $ECHO "Try '$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test : = "$opt_help"; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | $SED -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | $SED '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $debug_cmd # The first argument is the command name. cmd=$nonopt test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "'$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "'$file' was not linked with '-export-dynamic'" continue fi func_dirname "$file" "" "." dir=$func_dirname_result if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find '$dlname' in '$dir' or '$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir=$func_dirname_result ;; *) func_warning "'-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir=$absdir # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic=$magic # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file=$progdir/$program elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file=$progdir/$program fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if $opt_dry_run; then # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS else if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd=\$cmd$args fi } test execute = "$opt_mode" && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $debug_cmd libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "'$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument '$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and '=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do $SED -e "$sysroot_cmd s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_quiet && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the '-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the '$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the '$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the '$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to '/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test finish = "$opt_mode" && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $debug_cmd # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$SHELL" = "$nonopt" || test /bin/sh = "$nonopt" || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=false stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=: ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test X-m = "X$prev" && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the '$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=: if $isdir; then destdir=$dest destname= else func_dirname_and_basename "$dest" "" "." destdir=$func_dirname_result destname=$func_basename_result # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "'$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "'$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "'$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir=$func_dirname_result func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install '$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking '$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink '\''$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname=$1 shift srcname=$realname test -n "$relink_command" && srcname=${realname}T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme=$stripme case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme= ;; esac ;; os2*) case $realname in *_dll.a) tstripme= ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try 'ln -sf' first, because the 'ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib=$destdir/$realname func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name=$func_basename_result instname=$dir/${name}i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest=$destfile destfile= ;; *) func_fatal_help "cannot copy a libtool object to '$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test yes = "$build_old_libs"; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile=$destdir/$destname else func_basename "$file" destfile=$func_basename_result destfile=$destdir/$destfile fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext= case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=.exe fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script '$wrapper'" finalize=: for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile=$libdir/`$ECHO "$lib" | $SED 's%^.*/%%g'` if test -n "$libdir" && test ! -f "$libfile"; then func_warning "'$lib' has not been installed in '$libdir'" finalize=false fi done relink_command= func_source "$wrapper" outputname= if test no = "$fast_install" && test -n "$relink_command"; then $opt_dry_run || { if $finalize; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file=$func_basename_result outputname=$tmpdir/$file # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_quiet || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink '$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file=$outputname else func_warning "cannot relink '$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name=$func_basename_result # Set up the ranlib parameters. oldlib=$destdir/$name func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run '$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL "$progpath" $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test install = "$opt_mode" && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $debug_cmd my_outputname=$1 my_originator=$2 my_pic_p=${3-false} my_prefix=`$ECHO "$my_originator" | $SED 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms=${my_outputname}S.c else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist=$output_objdir/$my_outputname.nm func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for '$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined __GNUC__ && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* External symbol declarations for the compiler. */\ " if test yes = "$dlself"; then func_verbose "generating symbol list for '$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from '$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols=$output_objdir/$outputname.exp $opt_dry_run || { $RM $export_symbols eval "$SED -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "$SED -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from '$dlprefile'" func_basename "$dlprefile" name=$func_basename_result case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename= if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname"; then func_basename "$dlprefile_dlname" dlprefile_dlbasename=$func_basename_result else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename"; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi func_show_eval '$RM "${nlist}I"' if test -n "$global_symbol_to_import"; then eval "$global_symbol_to_import"' < "$nlist"S > "$nlist"I' fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[];\ " if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ static void lt_syminit(void) { LT_DLSYM_CONST lt_dlsymlist *symbol = lt_${my_prefix}_LTX_preloaded_symbols; for (; symbol->name; ++symbol) {" $SED 's/.*/ if (STREQ (symbol->name, \"&\")) symbol->address = (void *) \&&;/' < "$nlist"I >> "$output_objdir/$my_dlsyms" echo >> "$output_objdir/$my_dlsyms" "\ } }" fi echo >> "$output_objdir/$my_dlsyms" "\ LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = { {\"$my_originator\", (void *) 0}," if test -s "$nlist"I; then echo >> "$output_objdir/$my_dlsyms" "\ {\"@INIT@\", (void *) <_syminit}," fi case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) $my_pic_p && pic_flag_for_symtable=" $pic_flag" ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T" "${nlist}I"' # Transform the symbol file into the correct name. symfileobj=$output_objdir/${my_outputname}S.$objext case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for '$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $debug_cmd func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $debug_cmd win32_libid_type=unknown win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then case $nm_interface in "MS dumpbin") if func_cygming_ms_implib_p "$1" || func_cygming_gnu_implib_p "$1" then win32_nmres=import else win32_nmres= fi ;; *) func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s|.*|import| p q } }'` ;; esac case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $debug_cmd sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $debug_cmd match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive that possess that section. Heuristic: eliminate # all those that have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $debug_cmd if func_cygming_gnu_implib_p "$1"; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1"; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result= fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $debug_cmd f_ex_an_ar_dir=$1; shift f_ex_an_ar_oldlib=$1 if test yes = "$lock_old_archive_extraction"; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test yes = "$lock_old_archive_extraction"; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $debug_cmd my_gentop=$1; shift my_oldlibs=${1+"$@"} my_oldobjs= my_xlib= my_xabs= my_xdir= for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs=$my_xlib ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib=$func_basename_result my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir=$my_gentop/$my_xlib_u func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` func_basename "$darwin_archive" darwin_base_archive=$func_basename_result darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches; do func_mkdir_p "unfat-$$/$darwin_base_archive-$darwin_arch" $LIPO -thin $darwin_arch -output "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" "$darwin_archive" cd "unfat-$$/$darwin_base_archive-$darwin_arch" func_extract_an_archive "`pwd`" "$darwin_base_archive" cd "$darwin_curdir" $RM "unfat-$$/$darwin_base_archive-$darwin_arch/$darwin_base_archive" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$sed_basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result=$my_oldobjs } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory where it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ that is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options that match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"$outputname:$output:\$LINENO: libtool wrapper (GNU $PACKAGE) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"$outputname:$output:\$LINENO: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"$outputname:$output:\$LINENO: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test yes = "$fast_install"; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | $SED 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else \$ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test yes = "$shlibpath_overrides_runpath" && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: '\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include #define STREQ(s1, s2) (strcmp ((s1), (s2)) == 0) /* declarations of non-ANSI functions */ #if defined __MINGW32__ # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined __CYGWIN__ # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined other_platform || defined ... */ #endif /* portability defines, excluding path handling macros */ #if defined _MSC_VER # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC #elif defined __MINGW32__ # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined __CYGWIN__ # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined other platforms ... */ #endif #if defined PATH_MAX # define LT_PATHMAX PATH_MAX #elif defined MAXPATHLEN # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined _WIN32 || defined __MSDOS__ || defined __DJGPP__ || \ defined __OS2__ # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free (stale); stale = 0; } \ } while (0) #if defined LT_DEBUGWRAPPER static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; size_t tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined HAVE_DOS_BASED_FILE_SYSTEM if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined HAVE_DOS_BASED_FILE_SYSTEM } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = (size_t) (q - p); p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (STREQ (str, pat)) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else size_t len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { size_t orig_value_len = strlen (orig_value); size_t add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ size_t len = strlen (new_value); while ((len > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[--len] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $debug_cmd case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_suncc_cstd_abi # !!ONLY CALL THIS FOR SUN CC AFTER $compile_command IS FULLY EXPANDED!! # Several compiler flags select an ABI that is incompatible with the # Cstd library. Avoid specifying it if any are in CXXFLAGS. func_suncc_cstd_abi () { $debug_cmd case " $compile_command " in *" -compat=g "*|*\ -std=c++[0-9][0-9]\ *|*" -library=stdcxx4 "*|*" -library=stlport4 "*) suncc_use_cstd_abi=no ;; *) suncc_use_cstd_abi=yes ;; esac } # func_mode_link arg... func_mode_link () { $debug_cmd case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # what system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll that has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= os2dllname= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=false prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module=$wl-single_module func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test yes != "$build_libtool_libs" \ && func_fatal_configuration "cannot build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test yes = "$build_libtool_libs" && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg=$1 shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir=$arg prev= continue ;; dlfiles|dlprefiles) $preload || { # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=: } case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test no = "$dlself"; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test dlprefiles = "$prev"; then dlself=yes elif test dlfiles = "$prev" && test yes != "$dlopen_self"; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test dlfiles = "$prev"; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols=$arg test -f "$arg" \ || func_fatal_error "symbol file '$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex=$arg prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir=$arg prev= continue ;; mllvm) # Clang does not use LLVM to link, so we can simply discard any # '-mllvm $arg' options when doing the link step. prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result if test none != "$pic_object"; then # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object fi # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file '$arg' does not exist" fi arg=$save_arg prev= continue ;; os2dllname) os2dllname=$arg prev= continue ;; precious_regex) precious_files_regex=$arg prev= continue ;; release) release=-$arg prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test rpath = "$prev"; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds=$arg prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg=$arg case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "'-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test X-export-symbols = "X$arg"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between '-L' and '$1'" else func_fatal_error "need path for '-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of '$dir'" dir=$absdir ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test X-lc = "X$arg" || test X-lm = "X$arg"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test X-lc = "X$arg" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc due to us having libc/libc_r. test X-lc = "X$arg" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test X-lc = "X$arg" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test X-lc = "X$arg" && continue ;; esac elif test X-lc_r = "X$arg"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly* | *-*-bitrig*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -mllvm) prev=mllvm continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module=$wl-multi_module continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "'-no-install' is ignored for $host" func_warning "assuming '-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -os2dllname) prev=os2dllname continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs=$IFS; IFS=, for flag in $args; do IFS=$save_ifs func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS=$save_ifs func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # -fstack-protector* stack protector flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -g*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization # -specs=* GCC specs files # -stdlib=* select c++ std lib with clang # -fsanitize=* Clang/GCC memory and address sanitizer -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-g*|-flto*|-fwhopr*|-fuse-linker-plugin|-fstack-protector*|-stdlib=*| \ -specs=*|-fsanitize=*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; -Z*) if test os2 = "`expr $host : '.*\(os2\)'`"; then # OS/2 uses -Zxxx to specify OS/2-specific options compiler_flags="$compiler_flags $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case $arg in -Zlinker | -Zstack) prev=xcompiler ;; esac continue else # Otherwise treat like 'Some other compiler flag' below func_quote_for_eval "$arg" arg=$func_quote_for_eval_result fi ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test none = "$pic_object" && test none = "$non_pic_object"; then func_fatal_error "cannot find name of object for '$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result test none = "$pic_object" || { # Prepend the subdirectory the object is found in. pic_object=$xdir$pic_object if test dlfiles = "$prev"; then if test yes = "$build_libtool_libs" && test yes = "$dlopen_support"; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test dlprefiles = "$prev"; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg=$pic_object } # Non-PIC object. if test none != "$non_pic_object"; then # Prepend the subdirectory the object is found in. non_pic_object=$xdir$non_pic_object # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test none = "$pic_object"; then arg=$non_pic_object fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object=$pic_object func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir=$func_dirname_result func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "'$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test dlfiles = "$prev"; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test dlprefiles = "$prev"; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg=$func_quote_for_eval_result ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the '$prevarg' option requires an argument" if test yes = "$export_dynamic" && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname=$func_basename_result libobjs_save=$libobjs if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\$$shlibpath_var\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" # Definition is injected by LT_CONFIG during libtool generation. func_munge_path_list sys_lib_dlsearch_path "$LT_SYS_LIBRARY_PATH" func_dirname "$output" "/" "" output_objdir=$func_dirname_result$objdir func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test lib = "$linkmode"; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can '-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=false newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test lib,link = "$linkmode,$pass"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs=$tmp_deplibs fi if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass"; then libs=$deplibs deplibs= fi if test prog = "$linkmode"; then case $pass in dlopen) libs=$dlfiles ;; dlpreopen) libs=$dlprefiles ;; link) libs="$deplibs %DEPLIBS%" test "X$link_all_deplibs" != Xno && libs="$libs $dependency_libs" ;; esac fi if test lib,dlpreopen = "$linkmode,$pass"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs=$dlprefiles fi if test dlopen = "$pass"; then # Collect dlpreopened libraries save_deplibs=$deplibs deplibs= fi for deplib in $libs; do lib= found=false case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test lib != "$linkmode" && test prog != "$linkmode"; then func_warning "'-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test lib = "$linkmode"; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib=$searchdir/lib$name$search_ext if test -f "$lib"; then if test .la = "$search_ext"; then found=: else found=false fi break 2 fi done done if $found; then # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll=$l done if test "X$ll" = "X$old_library"; then # only static version available found=false func_dirname "$lib" "" "." ladir=$func_dirname_result lib=$ladir/$old_library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi else # deplib doesn't seem to be a libtool library if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test lib = "$linkmode" && newdependency_libs="$deplib $newdependency_libs" fi continue fi ;; # -l *.ltframework) if test prog,link = "$linkmode,$pass"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test lib = "$linkmode"; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test conv = "$pass" && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi if test scan = "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "'-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test link = "$pass"; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test conv = "$pass"; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=false case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=: fi ;; pass_all) valid_a_lib=: ;; esac if $valid_a_lib; then echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" else echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." fi ;; esac continue ;; prog) if test link != "$pass"; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test conv = "$pass"; then deplibs="$deplib $deplibs" elif test prog = "$linkmode"; then if test dlpreopen = "$pass" || test yes != "$dlopen_support" || test no = "$build_libtool_libs"; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=: continue ;; esac # case $deplib $found || test -f "$lib" \ || func_fatal_error "cannot find the library '$lib' or unhandled argument '$deplib'" # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "'$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir=$func_dirname_result dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test lib,link = "$linkmode,$pass" || test prog,scan = "$linkmode,$pass" || { test prog != "$linkmode" && test lib != "$linkmode"; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test conv = "$pass"; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for '$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done elif test prog != "$linkmode" && test lib != "$linkmode"; then func_fatal_error "'$lib' is not a convenience library" fi continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test yes = "$prefer_static_libs" || test built,no = "$prefer_static_libs,$installed"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib=$l done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for '$lib'" fi # This library was specified with -dlopen. if test dlopen = "$pass"; then test -z "$libdir" \ && func_fatal_error "cannot -dlopen a convenience library: '$lib'" if test -z "$dlname" || test yes != "$dlopen_support" || test no = "$build_libtool_libs" then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir=$ladir ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of '$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir=$ladir fi ;; esac func_basename "$lib" laname=$func_basename_result # Find the relevant object directory and library name. if test yes = "$installed"; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library '$lib' was moved." dir=$ladir absdir=$abs_ladir libdir=$abs_ladir else dir=$lt_sysroot$libdir absdir=$lt_sysroot$libdir fi test yes = "$hardcode_automatic" && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir=$ladir absdir=$abs_ladir # Remove this search path later func_append notinst_path " $abs_ladir" else dir=$ladir/$objdir absdir=$abs_ladir/$objdir # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test dlpreopen = "$pass"; then if test -z "$libdir" && test prog = "$linkmode"; then func_fatal_error "only libraries may -dlpreopen a convenience library: '$lib'" fi case $host in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test lib = "$linkmode"; then deplibs="$dir/$old_library $deplibs" elif test prog,link = "$linkmode,$pass"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test prog = "$linkmode" && test link != "$pass"; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=false if test no != "$link_all_deplibs" || test -z "$library_names" || test no = "$build_libtool_libs"; then linkalldeplibs=: fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if $linkalldeplibs; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test prog,link = "$linkmode,$pass"; then if test -n "$library_names" && { { test no = "$prefer_static_libs" || test built,yes = "$prefer_static_libs,$installed"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath"; then # Make sure the rpath contains only unique directories. case $temp_rpath: in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if $alldeplibs && { test pass_all = "$deplibs_check_method" || { test yes = "$build_libtool_libs" && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test built = "$use_static_libs" && test yes = "$installed"; then use_static_libs=no fi if test -n "$library_names" && { test no = "$use_static_libs" || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc* | *os2*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test no = "$installed"; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule= for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule=$dlpremoduletest break fi done if test -z "$dlopenmodule" && test yes = "$shouldnotlink" && test link = "$pass"; then echo if test prog = "$linkmode"; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test lib = "$linkmode" && test yes = "$hardcode_into_libs"; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname=$1 shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname=$dlname elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc* | *os2*) func_arith $current - $age major=$func_arith_result versuffix=-$major ;; esac eval soname=\"$soname_spec\" else soname=$realname fi # Make a new name for the extract_expsyms_cmds to use soroot=$soname func_basename "$soroot" soname=$func_basename_result func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from '$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for '$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test prog = "$linkmode" || test relink != "$opt_mode"; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test no = "$hardcode_direct"; then add=$dir/$linklib case $host in *-*-sco3.2v5.0.[024]*) add_dir=-L$dir ;; *-*-sysv4*uw2*) add_dir=-L$dir ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir=-L$dir ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we cannot # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library"; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add=$dir/$old_library fi elif test -n "$old_library"; then add=$dir/$old_library fi fi esac elif test no = "$hardcode_minus_L"; then case $host in *-*-sunos*) add_shlibpath=$dir ;; esac add_dir=-L$dir add=-l$name elif test no = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; relink) if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$dir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$absdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name elif test yes = "$hardcode_shlibpath_var"; then add_shlibpath=$dir add=-l$name else lib_linked=no fi ;; *) lib_linked=no ;; esac if test yes != "$lib_linked"; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test prog = "$linkmode"; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test yes != "$hardcode_direct" && test yes != "$hardcode_minus_L" && test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test prog = "$linkmode" || test relink = "$opt_mode"; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test yes = "$hardcode_direct" && test no = "$hardcode_direct_absolute"; then add=$libdir/$linklib elif test yes = "$hardcode_minus_L"; then add_dir=-L$libdir add=-l$name elif test yes = "$hardcode_shlibpath_var"; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add=-l$name elif test yes = "$hardcode_automatic"; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib"; then add=$inst_prefix_dir$libdir/$linklib else add=$libdir/$linklib fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir=-L$libdir # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add=-l$name fi if test prog = "$linkmode"; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test prog = "$linkmode"; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test unsupported != "$hardcode_direct"; then test -n "$old_library" && linklib=$old_library compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test yes = "$build_libtool_libs"; then # Not a shared library if test pass_all != "$deplibs_check_method"; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system cannot link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test yes = "$module"; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test lib = "$linkmode"; then if test -n "$dependency_libs" && { test yes != "$hardcode_into_libs" || test yes = "$build_old_libs" || test yes = "$link_static"; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs=$temp_deplibs fi func_append newlib_search_path " $absdir" # Link against this library test no = "$link_static" && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test no != "$link_all_deplibs"; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path=$deplib ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir=$dir ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of '$dir'" absdir=$dir fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`$SED -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names"; then for tmp in $deplibrary_names; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl"; then depdepl=$absdir/$objdir/$depdepl darwin_install_name=`$OTOOL -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`$OTOOL64 -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " $wl-dylib_file $wl$darwin_install_name:$depdepl" func_append linker_flags " -dylib_file $darwin_install_name:$depdepl" path= fi fi ;; *) path=-L$absdir/$objdir ;; esac else eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "'$deplib' seems to be moved" path=-L$absdir fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test link = "$pass"; then if test prog = "$linkmode"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs=$newdependency_libs if test dlpreopen = "$pass"; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test dlopen != "$pass"; then test conv = "$pass" || { # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= } if test prog,link = "$linkmode,$pass"; then vars="compile_deplibs finalize_deplibs" else vars=deplibs fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Add Sun CC postdeps if required: test CXX = "$tagname" && { case $host_os in linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; solaris*) func_cc_basename "$CC" case $func_cc_basename_result in CC* | sunCC*) func_suncc_cstd_abi if test no != "$suncc_use_cstd_abi"; then func_append postdeps ' -library=Cstd -library=Crun' fi ;; esac ;; esac } # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i= ;; esac if test -n "$i"; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test prog = "$linkmode"; then dlfiles=$newdlfiles fi if test prog = "$linkmode" || test lib = "$linkmode"; then dlprefiles=$newdlprefiles fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "'-R' is ignored for archives" test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "'-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "'-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs=$output func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form 'libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test no = "$module" \ && func_fatal_help "libtool library '$output' must begin with 'lib'" if test no != "$need_lib_prefix"; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test pass_all != "$deplibs_check_method"; then func_fatal_error "cannot build libtool library '$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test no = "$dlself" \ || func_warning "'-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test 1 -lt "$#" \ && func_warning "ignoring multiple '-rpath's for a libtool library" install_libdir=$1 oldlibs= if test -z "$rpath"; then if test yes = "$build_libtool_libs"; then # Building a libtool convenience library. # Some compilers have problems with a '.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "'-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "'-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs=$IFS; IFS=: set dummy $vinfo 0 0 0 shift IFS=$save_ifs test -n "$7" && \ func_fatal_help "too many parameters to '-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major=$1 number_minor=$2 number_revision=$3 # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # that has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|freebsd-elf|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_revision ;; freebsd-aout|qnx|sunos) current=$number_major revision=$number_minor age=0 ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age=$number_minor revision=$number_minor lt_irix_increment=no ;; *) func_fatal_configuration "$modename: unknown library version type '$version_type'" ;; esac ;; no) current=$1 revision=$2 age=$3 ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT '$current' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION '$revision' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE '$age' must be a nonnegative integer" func_fatal_error "'$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE '$age' is greater than the current interface number '$current'" func_fatal_error "'$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" # On Darwin other compilers case $CC in nagfor*) verstring="$wl-compatibility_version $wl$minor_current $wl-current_version $wl$minor_current.$revision" ;; *) verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; esac ;; freebsd-aout) major=.$current versuffix=.$current.$revision ;; freebsd-elf) func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; irix | nonstopux) if test no = "$lt_irix_increment"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring=$verstring_prefix$major.$revision # Add in all the interfaces that we are compatible with. loop=$revision while test 0 -ne "$loop"; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring_prefix$major.$iface:$verstring done # Before this point, $major must not contain '.'. major=.$major versuffix=$major.$revision ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix=$major.$age.$revision ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=.$current.$age.$revision verstring=$current.$age.$revision # Add in all the interfaces that we are compatible with. loop=$age while test 0 -ne "$loop"; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring=$verstring:$iface.0 done # Make executables depend on our current version. func_append verstring ":$current.0" ;; qnx) major=.$current versuffix=.$current ;; sco) major=.$current versuffix=.$current ;; sunos) major=.$current versuffix=.$current.$revision ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 file systems. func_arith $current - $age major=$func_arith_result versuffix=-$major ;; *) func_fatal_configuration "unknown library version type '$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring=0.0 ;; esac if test no = "$need_version"; then versuffix= else versuffix=.0.0 fi fi # Remove version info from name if versioning should be avoided if test yes,no = "$avoid_version,$need_version"; then major= versuffix= verstring= fi # Check to see if the archive will have undefined symbols. if test yes = "$allow_undefined"; then if test unsupported = "$allow_undefined_flag"; then if test yes = "$build_old_libs"; then func_warning "undefined symbols not allowed in $host shared libraries; building static only" build_libtool_libs=no else func_fatal_error "can't build $host shared library unless -no-undefined is specified" fi fi else # Don't allow undefined symbols. allow_undefined_flag=$no_undefined_flag fi fi func_generate_dlsyms "$libname" "$libname" : func_append libobjs " $symfileobj" test " " = "$libobjs" && libobjs= if test relink != "$opt_mode"; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/$libname$release.*) if test -n "$precious_files_regex"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test yes = "$build_old_libs" && test convenience != "$build_libtool_libs"; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test yes != "$hardcode_into_libs" || test yes = "$build_old_libs"; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles=$dlfiles dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles=$dlprefiles dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test yes = "$build_libtool_libs"; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test yes = "$build_libtool_need_lc"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release= versuffix= major= newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib=$potent_lib while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | $SED 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib=$potliblink;; *) potlib=`$ECHO "$potlib" | $SED 's|[^/]*$||'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test yes = "$allow_libtool_libs_with_static_runtimes"; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib= ;; esac fi if test -n "$a_deplib"; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib=$potent_lib # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib= break 2 fi done done fi if test -n "$a_deplib"; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib"; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs= tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test yes = "$allow_libtool_libs_with_static_runtimes"; then for i in $predeps $postdeps; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s|$i||"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test none = "$deplibs_check_method"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test yes = "$droppeddeps"; then if test yes = "$module"; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using 'nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** 'nm' from GNU binutils and a full rebuild may help." fi if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test no = "$allow_undefined"; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test no = "$build_old_libs"; then oldlibs=$output_objdir/$libname.$libext build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs=$new_libs # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test yes = "$build_libtool_libs"; then # Remove $wl instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test yes = "$hardcode_into_libs"; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath=$finalize_rpath test relink = "$opt_mode" || rpath=$compile_rpath$rpath for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath=$finalize_shlibpath test relink = "$opt_mode" || shlibpath=$compile_shlibpath$shlibpath if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname=$1 shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname=$realname fi if test -z "$dlname"; then dlname=$soname fi lib=$output_objdir/$realname linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols=$output_objdir/$libname.uexp func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile func_dll_def_p "$export_symbols" || { # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols=$export_symbols export_symbols= always_export_symbols=yes } fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test yes = "$always_export_symbols" || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs=$IFS; IFS='~' for cmd1 in $cmds; do IFS=$save_ifs # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test yes = "$try_normal_branch" \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=$output_objdir/$output_la.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS=$save_ifs if test -n "$export_symbols_regex" && test : != "$skipped_export"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test : != "$skipped_export" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs=$tmp_deplibs if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test yes = "$compiler_needs_object" && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test yes = "$thread_safe" && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test : != "$skipped_export" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test : != "$skipped_export" && test yes = "$with_gnu_ld"; then output=$output_objdir/$output_la.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test : != "$skipped_export" && test -n "$file_list_spec"; then output=$output_objdir/$output_la.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test yes = "$compiler_needs_object"; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-$k.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test -z "$objlist" || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test 1 -eq "$k"; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-$k.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-$k.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi ${skipped_export-false} && { func_verbose "generating symbol list for '$libname.la'" export_symbols=$output_objdir/$libname.exp $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi } test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs=$IFS; IFS='~' for cmd in $concat_cmds; do IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi ${skipped_export-false} && { if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols=$export_symbols test -n "$orig_export_symbols" && tmp_export_symbols=$orig_export_symbols $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for '$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands, which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi } libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test yes = "$module" && test -n "$module_cmds"; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs=$IFS; IFS='~' for cmd in $cmds; do IFS=$sp$nl eval cmd=\"$cmd\" IFS=$save_ifs $opt_quiet || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test relink = "$opt_mode"; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS=$save_ifs # Restore the uninstalled library and exit if test relink = "$opt_mode"; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test yes = "$module" || test yes = "$export_dynamic"; then # On all known operating systems, these are identical. dlname=$soname fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test no != "$dlself"; then func_warning "'-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "'-l' and '-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "'-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "'-R' is ignored for objects" test -n "$vinfo" && \ func_warning "'-version-info' is ignored for objects" test -n "$release" && \ func_warning "'-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object '$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj=$output ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # if reload_cmds runs $LD directly, get rid of -Wl from # whole_archive_flag_spec and hope we can get by with turning comma # into space. case $reload_cmds in *\$LD[\ \$]*) wl= ;; esac if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" test -n "$wl" || tmp_whole_archive_flags=`$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` reload_conv_objs=$reload_objs\ $tmp_whole_archive_flags else gentop=$output_objdir/${obj}x func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test yes = "$build_libtool_libs" || libobjs=$non_pic_objects # Create the old-style object. reload_objs=$objs$old_deplibs' '`$ECHO "$libobjs" | $SP2NL | $SED "/\.$libext$/d; /\.lib$/d; $lo2o" | $NL2SP`' '$reload_conv_objs output=$obj func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi test yes = "$build_libtool_libs" || { if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS } if test -n "$pic_flag" || test default != "$pic_mode"; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output=$libobj func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "'-version-info' is ignored for programs" test -n "$release" && \ func_warning "'-release' is ignored for programs" $preload \ && test unknown,unknown,unknown = "$dlopen_support,$dlopen_self,$dlopen_self_static" \ && func_warning "'LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test CXX = "$tagname"; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " $wl-bind_at_load" func_append finalize_command " $wl-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs=$new_libs func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$libdir" | $SED -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath=$rpath rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs=$libdir else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir=$hardcode_libdirs eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath=$rpath if test -n "$libobjs" && test yes = "$build_old_libs"; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" false # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=: case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=false ;; *cygwin* | *mingw* ) test yes = "$build_libtool_libs" || wrappers_required=false ;; *) if test no = "$need_relink" || test yes != "$build_libtool_libs"; then wrappers_required=false fi ;; esac $wrappers_required || { # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command=$compile_command$compile_rpath # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.$objext"; then func_show_eval '$RM "$output_objdir/${outputname}S.$objext"' fi exit $exit_status } if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test yes = "$no_install"; then # We don't need to create a wrapper script. link_command=$compile_var$compile_command$compile_rpath # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi case $hardcode_action,$fast_install in relink,*) # Fast installation is not supported link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath func_warning "this platform does not like uninstalled shared libraries" func_warning "'$output' will be relinked during installation" ;; *,yes) link_command=$finalize_var$compile_command$finalize_rpath relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` ;; *,no) link_command=$compile_var$compile_command$compile_rpath relink_command=$finalize_var$finalize_command$finalize_rpath ;; *,needless) link_command=$finalize_var$compile_command$finalize_rpath relink_command= ;; esac # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource=$output_path/$objdir/lt-$output_name.c cwrapper=$output_path/$output_name.exe $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host"; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do case $build_libtool_libs in convenience) oldobjs="$libobjs_save $symfileobj" addlibs=$convenience build_libtool_libs=no ;; module) oldobjs=$libobjs_save addlibs=$old_convenience build_libtool_libs=no ;; *) oldobjs="$old_deplibs $non_pic_objects" $preload && test -f "$symfileobj" \ && func_append oldobjs " $symfileobj" addlibs=$old_convenience ;; esac if test -n "$addlibs"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test yes = "$build_libtool_libs"; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop=$output_objdir/${outputname}x func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase=$func_basename_result case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj"; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test -z "$oldobjs"; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test yes = "$build_old_libs" && old_library=$libname.$libext func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL \"$progpath\" $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test yes = "$hardcode_automatic"; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test yes = "$installed"; then if test -z "$install_libdir"; then break fi output=$output_objdir/${outputname}i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name=$func_basename_result func_resolve_sysroot "$deplib" eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "'$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs=$newdependency_libs newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name=$func_basename_result eval libdir=`$SED -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "'$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles=$newdlprefiles else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles=$newdlfiles newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs=$lib ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles=$newdlprefiles fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test -n "$bindir"; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result/$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that cannot go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test no,yes = "$installed,$need_relink"; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } if test link = "$opt_mode" || test relink = "$opt_mode"; then func_mode_link ${1+"$@"} fi # func_mode_uninstall arg... func_mode_uninstall () { $debug_cmd RM=$nonopt files= rmforce=false exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic=$magic for arg do case $arg in -f) func_append RM " $arg"; rmforce=: ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir=$func_dirname_result if test . = "$dir"; then odir=$objdir else odir=$dir/$objdir fi func_basename "$file" name=$func_basename_result test uninstall = "$opt_mode" && odir=$dir # Remember odir for removal later, being careful to avoid duplicates if test clean = "$opt_mode"; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif $rmforce; then continue fi rmfiles=$file case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case $opt_mode in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" '$rmforce || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" '$rmforce || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test none != "$pic_object"; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test none != "$non_pic_object"; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test clean = "$opt_mode"; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.$objext" if test yes = "$fast_install" && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name"; then func_append rmfiles " $odir/lt-$noexename.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the $objdir's in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } if test uninstall = "$opt_mode" || test clean = "$opt_mode"; then func_mode_uninstall ${1+"$@"} fi test -z "$opt_mode" && { help=$generic_help func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode '$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # where we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: ola-0.10.9/config/ltsugar.m40000644000175000017500000001044014376533141012473 00000000000000# ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004-2005, 2007-2008, 2011-2015 Free Software # Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59, which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus 'SEPARATOR''STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) ola-0.10.9/config/py-compile0000755000175000017500000001107614376533151012563 00000000000000#!/bin/sh # py-compile - Compile a Python program scriptversion=2011-06-08.12; # UTC # Copyright (C) 2000-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . if [ -z "$PYTHON" ]; then PYTHON=python fi me=py-compile usage_error () { echo "$me: $*" >&2 echo "Try '$me --help' for more information." >&2 exit 1 } basedir= destdir= while test $# -ne 0; do case "$1" in --basedir) if test $# -lt 2; then usage_error "option '--basedir' requires an argument" else basedir=$2 fi shift ;; --destdir) if test $# -lt 2; then usage_error "option '--destdir' requires an argument" else destdir=$2 fi shift ;; -h|--help) cat <<\EOF Usage: py-compile [--help] [--version] [--basedir DIR] [--destdir DIR] FILES..." Byte compile some python scripts FILES. Use --destdir to specify any leading directory path to the FILES that you don't want to include in the byte compiled file. Specify --basedir for any additional path information you do want to be shown in the byte compiled file. Example: py-compile --destdir /tmp/pkg-root --basedir /usr/share/test test.py test2.py Report bugs to . EOF exit $? ;; -v|--version) echo "$me $scriptversion" exit $? ;; --) shift break ;; -*) usage_error "unrecognized option '$1'" ;; *) break ;; esac shift done files=$* if test -z "$files"; then usage_error "no files given" fi # if basedir was given, then it should be prepended to filenames before # byte compilation. if [ -z "$basedir" ]; then pathtrans="path = file" else pathtrans="path = os.path.join('$basedir', file)" fi # if destdir was given, then it needs to be prepended to the filename to # byte compile but not go into the compiled file. if [ -z "$destdir" ]; then filetrans="filepath = path" else filetrans="filepath = os.path.normpath('$destdir' + os.sep + path)" fi $PYTHON -c " import sys, os, py_compile, imp files = '''$files''' sys.stdout.write('Byte-compiling python modules...\n') for file in files.split(): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue sys.stdout.write(file) sys.stdout.flush() if hasattr(imp, 'get_tag'): py_compile.compile(filepath, imp.cache_from_source(filepath), path) else: py_compile.compile(filepath, filepath + 'c', path) sys.stdout.write('\n')" || exit $? # this will fail for python < 1.5, but that doesn't matter ... $PYTHON -O -c " import sys, os, py_compile, imp # pypy does not use .pyo optimization if hasattr(sys, 'pypy_translation_info'): sys.exit(0) files = '''$files''' sys.stdout.write('Byte-compiling python modules (optimized versions) ...\n') for file in files.split(): $pathtrans $filetrans if not os.path.exists(filepath) or not (len(filepath) >= 3 and filepath[-3:] == '.py'): continue sys.stdout.write(file) sys.stdout.flush() if hasattr(imp, 'get_tag'): py_compile.compile(filepath, imp.cache_from_source(filepath, False), path) else: py_compile.compile(filepath, filepath + 'o', path) sys.stdout.write('\n')" 2>/dev/null || : # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ola-0.10.9/config/ac_pthread_set_name.m40000664000175000017500000000450414376533110014761 00000000000000# PTHREAD_SET_NAME(); # Check which variant (if any) of pthread_set_name_np we have. # ----------------------------------------------------------------------------- AC_DEFUN([PTHREAD_SET_NAME], [ # pthread setname (4 non-portable variants...) AC_CHECK_HEADERS([pthread_np.h], [], [], [#include ]) define(pthread_np_preamble,[ #include #if HAVE_PTHREAD_NP_H # include #endif ]) # 2-arg setname (e.g. Linux/glibc, QNX, IBM) AC_MSG_CHECKING([for 2-arg pthread_setname_np]) AC_LINK_IFELSE([AC_LANG_PROGRAM(pthread_np_preamble, [ pthread_setname_np(pthread_self(), "foo") ])], [ AC_DEFINE(HAVE_PTHREAD_SETNAME_NP_2, 1, [2-arg pthread_setname_np]) AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) # 2-arg set_name (e.g. FreeBSD, OpenBSD) AC_MSG_CHECKING([for 2-arg pthread_set_name_np]) AC_LINK_IFELSE([AC_LANG_PROGRAM(pthread_np_preamble, [ return pthread_set_name_np(pthread_self(), "foo"); ])], [ AC_DEFINE(HAVE_PTHREAD_SET_NAME_NP_2, 1, [2-arg pthread_set_name_np]) AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) # 2-arg void set_name (e.g. FreeBSD, OpenBSD) AC_MSG_CHECKING([for 2-arg void pthread_set_name_np]) AC_LINK_IFELSE([AC_LANG_PROGRAM(pthread_np_preamble, [ pthread_set_name_np(pthread_self(), "foo"); ])], [ AC_DEFINE(HAVE_PTHREAD_SET_NAME_NP_2_VOID, 1, [2-arg void pthread_set_name_np]) AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) # 1-arg setname (e.g. Darwin) AC_MSG_CHECKING([for 1-arg pthread_setname_np]) AC_LINK_IFELSE([AC_LANG_PROGRAM(pthread_np_preamble, [ return pthread_setname_np("foo"); ])], [ AC_DEFINE(HAVE_PTHREAD_SETNAME_NP_1, 1, [1-arg pthread_setname_np]) AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) # 3-arg setname (e.g. NetBSD) AC_MSG_CHECKING([for 3-arg pthread_setname_np]) AC_LINK_IFELSE([AC_LANG_PROGRAM(pthread_np_preamble, [ return pthread_setname_np(pthread_self(), "foo", NULL); ])], [ AC_DEFINE(HAVE_PTHREAD_SETNAME_NP_3, 1, [3-arg pthread_setname_np]) AC_MSG_RESULT([yes]) ], [ AC_MSG_RESULT([no]) ]) ]) ]) ]) ]) ]) ola-0.10.9/config/ltversion.m40000644000175000017500000000127314376533141013043 00000000000000# ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004, 2011-2015 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 4179 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.6]) m4_define([LT_PACKAGE_REVISION], [2.4.6]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.6' macro_revision='2.4.6' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) ola-0.10.9/config/stl_hash.m40000664000175000017500000000745214376533110012626 00000000000000# Copied from the protobuf package, https://github.com/google/protobuf # HAVE_UNORDERED_MAP added to match docs, and updated macros to avoid errors # # We check two things: where the include file is for # unordered_map/hash_map (we prefer the first form), and what # namespace unordered/hash_map lives in within that include file. We # include AC_TRY_COMPILE for all the combinations we've seen in the # wild. We define HASH_MAP_H to the location of the header file, and # HASH_NAMESPACE to the namespace the class (unordered_map or # hash_map) is in. We define HAVE_UNORDERED_MAP if the class we found # is named unordered_map, or leave it undefined if not. # This also checks if unordered map exists. AC_DEFUN([AC_CXX_STL_HASH], [ AC_MSG_CHECKING(the location of hash_map) AC_LANG_PUSH(C++) ac_cv_cxx_hash_map="" # First try unordered_map, but not on gcc's before 4.2 -- I've # seen unexplainable unordered_map bugs with -O2 on older gcc's. AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#if defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 2)) # error GCC too old for unordered_map #endif]], [[/* no program body necessary */]])], [stl_hash_old_gcc=no], [stl_hash_old_gcc=yes]) for location in unordered_map tr1/unordered_map; do for namespace in std std::tr1; do if test -z "$ac_cv_cxx_hash_map" -a "$stl_hash_old_gcc" != yes; then # Some older gcc's have a buggy tr1, so test a bit of code. AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#include <$location>]], [[const ${namespace}::unordered_map t; return t.find(5) == t.end();]])], [ac_cv_cxx_hash_map="<$location>"; ac_cv_cxx_hash_namespace="$namespace"; ac_cv_cxx_hash_map_class="unordered_map";]) fi done done # Now try hash_map for location in ext/hash_map hash_map; do for namespace in __gnu_cxx "" std stdext; do if test -z "$ac_cv_cxx_hash_map"; then AC_COMPILE_IFELSE([AC_LANG_PROGRAM( [[#include <$location>]], [[${namespace}::hash_map t]])], [ac_cv_cxx_hash_map="<$location>"; ac_cv_cxx_hash_namespace="$namespace"; ac_cv_cxx_hash_map_class="hash_map";]) fi done done ac_cv_cxx_hash_set=`echo "$ac_cv_cxx_hash_map" | sed s/map/set/`; ac_cv_cxx_hash_set_class=`echo "$ac_cv_cxx_hash_map_class" | sed s/map/set/`; if test -n "$ac_cv_cxx_hash_map"; then AC_DEFINE(HAVE_HASH_MAP, 1, [define if the compiler has hash_map]) AC_DEFINE(HAVE_HASH_SET, 1, [define if the compiler has hash_set]) if test "$ac_cv_cxx_hash_map_class" = "unordered_map"; then AC_DEFINE(HAVE_UNORDERED_MAP, 1, [define if the hash_map class is unordered_map]) fi AC_DEFINE_UNQUOTED(HASH_MAP_H,$ac_cv_cxx_hash_map, [the location of or ]) AC_DEFINE_UNQUOTED(HASH_SET_H,$ac_cv_cxx_hash_set, [the location of or ]) AC_DEFINE_UNQUOTED(HASH_NAMESPACE,$ac_cv_cxx_hash_namespace, [the namespace of hash_map/hash_set]) AC_DEFINE_UNQUOTED(HASH_MAP_CLASS,$ac_cv_cxx_hash_map_class, [the name of ]) AC_DEFINE_UNQUOTED(HASH_SET_CLASS,$ac_cv_cxx_hash_set_class, [the name of ]) AC_MSG_RESULT([$ac_cv_cxx_hash_map]) else AC_MSG_RESULT() AC_MSG_WARN([could not find an STL hash_map]) fi ]) ola-0.10.9/config/ac_saleae.m40000664000175000017500000000323514376533110012711 00000000000000## ac_saleae.m4 -- macros for detecting the SaleaeDevice library. ## Copyright (C) 2013 Simon Newton ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # SALEAE_DEVICE() # Check that the SaleaeDevice library is installed and usable. This will # define the following: # # In config.h: # HAVE_SALEAEDEVICEAPI_H # In Makefile.am # libSaleaeDevice_LIBS # HAVE_SALEAE_LOGIC # # ----------------------------------------------------------------------------- AC_DEFUN([SALEAE_DEVICE], [ AC_REQUIRE_CPP() AC_CHECK_HEADERS([SaleaeDeviceApi.h]) libSaleaeDevice_LIBS="-lSaleaeDevice" AC_SUBST(libSaleaeDevice_LIBS) old_libs=$LIBS LIBS="${LIBS} ${libSaleaeDevice_LIBS}" AC_LINK_IFELSE( [AC_LANG_PROGRAM([#include ], [DevicesManagerInterface::RegisterOnConnect(NULL)])], [have_saleae=yes], [have_saleae=no]) LIBS=$old_libs AS_IF([test "x$have_saleae" = xno], [AC_MSG_WARN([SaleaeDevice library is not usable.])]) AM_CONDITIONAL(HAVE_SALEAE_LOGIC, test "${have_saleae}" = "yes") ]) ola-0.10.9/config/depcomp0000755000175000017500000005601614376533147012144 00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2014 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ola-0.10.9/config/config.guess0000755000175000017500000012475314376533146013112 00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2015 Free Software Foundation, Inc. timestamp='2015-08-20' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner; maintained since 2000 by Ben Elliston. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches to . me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2015 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC' | sed 's, ,,g'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(uname -p 2>/dev/null || \ /sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || \ echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; earmv*) arch=`echo ${UNAME_MACHINE_ARCH} | sed -e 's,^e\(armv[0-9]\).*$,\1,'` endian=`echo ${UNAME_MACHINE_ARCH} | sed -ne 's,^.*\(eb\)$,\1,p'` machine=${arch}${endian}-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|earm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # Determine ABI tags. case "${UNAME_MACHINE_ARCH}" in earm*) expr='s/^earmv[0-9]/-eabi/;s/eb$//' abi=`echo ${UNAME_MACHINE_ARCH} | sed -e "$expr"` ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE} | sed -e 's/[-_].*//' | cut -d. -f1,2` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}${abi}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; *:Sortix:*:*) echo ${UNAME_MACHINE}-unknown-sortix exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/lslpp ] ; then IBM_REV=`/usr/bin/lslpp -Lqc bos.rte.libc | awk -F: '{ print $3 }' | sed s/[0-9]*$/0/` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; *:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; e2k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; openrisc*:Linux:*:*) echo or1k-unknown-linux-${LIBC} exit ;; or32:Linux:*:* | or1k*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if test `echo "$UNAME_RELEASE" | sed -e 's/\..*//'` -le 10 ; then if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi elif test "$UNAME_PROCESSOR" = i386 ; then # Avoid executing cc on OS X 10.9, as it ships with a stub # that puts up a graphical alert prompting to install # developer tools. Any system running Mac OS X 10.7 or # later (Darwin 11 and later) is required to have a 64-bit # processor. This is not true of the ARM version of Darwin # that Apple uses in portable devices. UNAME_PROCESSOR=x86_64 fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: ola-0.10.9/config/pkg.m40000664000175000017500000001206614376533110011577 00000000000000# pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_PATH)?$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility])dnl if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # # Similar to PKG_CHECK_MODULES, make sure that the first instance of # this or PKG_CHECK_MODULES is called, or make sure to call # PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_ifval([$2], [$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null`], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD ifelse([$4], , [AC_MSG_ERROR(dnl [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT ])], [AC_MSG_RESULT([no]) $4]) elif test $pkg_failed = untried; then ifelse([$4], , [AC_MSG_FAILURE(dnl [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])], [$4]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) ifelse([$3], , :, [$3]) fi[]dnl ])# PKG_CHECK_MODULES ola-0.10.9/config/ac_prog_java_cc.m40000664000175000017500000000370614376533110014077 00000000000000dnl @synopsis AC_PROG_JAVA_CC dnl dnl Finds the appropriate java compiler on your path. By preference the dnl java compiler is gcj, then jikes then javac. dnl dnl The macro can take one argument specifying a space separated list dnl of java compiler names. dnl dnl For example: dnl dnl AC_PROG_JAVA_CC(javac, gcj) dnl dnl The macro also sets the compiler options variable: JAVA_CC_OPTS to dnl something sensible: dnl dnl - for GCJ it sets it to: @GCJ_OPTS@ dnl (if GCJ_OPTS is not yet defined then it is set to "-C") dnl dnl - no other compiler has applicable options yet dnl dnl Here's an example configure.in: dnl dnl AC_INIT(Makefile.in) dnl AC_PROG_JAVA_CC() dnl AC_OUTPUT(Makefile) dnl dnl End. dnl dnl And here's the start of the Makefile.in: dnl dnl PROJECT_ROOT := @srcdir@ dnl # Tool definitions. dnl JAVAC := @JAVA_CC@ dnl JAVAC_OPTS := @JAVA_CC_OPTS@ dnl JAR_TOOL := @jar_tool@ dnl dnl @category Java dnl @author Nic Ferrier dnl @version 2002-03-04 dnl @license GPLWithACException # AC_PROG_JAVA_CC([COMPILER ...]) # -------------------------- # COMPILER ... is a space separated list of java compilers to search for. # This just gives the user an opportunity to specify an alternative # search list for the java compiler. AC_DEFUN([AC_PROG_JAVA_CC], [AC_ARG_VAR([JAVA_CC], [java compiler command])dnl AC_ARG_VAR([JAVA_CC_FLAGS], [java compiler flags])dnl m4_ifval([$1], [AC_CHECK_TOOLS(JAVA_CC, [$1])], [AC_CHECK_TOOL(JAVA_CC, gcj) if test -z "$JAVA_CC"; then AC_CHECK_TOOL(JAVA_CC, javac) fi if test -z "$JAVA_CC"; then AC_CHECK_TOOL(JAVA_CC, jikes) fi ]) if test "$JAVA_CC" = "gcj"; then if test "$GCJ_OPTS" = ""; then AC_SUBST(GCJ_OPTS,-C) fi AC_SUBST(JAVA_CC_OPTS, @GCJ_OPTS@, [Define the compilation options for GCJ]) fi test -z "$JAVA_CC" && AC_MSG_ERROR([no acceptable java compiler found in \$PATH]) ])# AC_PROG_JAVA_CC ola-0.10.9/config/libtool.m40000644000175000017500000112631114376533141012464 00000000000000# libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996-2001, 2003-2015 Free Software Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 2014 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program or library that is built # using GNU Libtool, you may include this file under the same # distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ]) # serial 58 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.62])dnl We use AC_PATH_PROGS_FEATURE_CHECK AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS=$ltmain # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_PREPARE_CC_BASENAME # ----------------------- m4_defun([_LT_PREPARE_CC_BASENAME], [ # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. func_cc_basename () { for cc_temp in @S|@*""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done func_cc_basename_result=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` } ])# _LT_PREPARE_CC_BASENAME # _LT_CC_BASENAME(CC) # ------------------- # It would be clearer to call AC_REQUIREs from _LT_PREPARE_CC_BASENAME, # but that macro is also expanded into generated libtool script, which # arranges for $SED and $ECHO to be set by different means. m4_defun([_LT_CC_BASENAME], [m4_require([_LT_PREPARE_CC_BASENAME])dnl AC_REQUIRE([_LT_DECL_SED])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl func_cc_basename $1 cc_basename=$func_cc_basename_result ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after 'm4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl m4_require([_LT_CMD_TRUNCATE])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a '.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld=$lt_cv_prog_gnu_ld old_CC=$CC old_CFLAGS=$CFLAGS # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from 'configure', and 'config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # 'config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain=$ac_aux_dir/ltmain.sh ])# _LT_PROG_LTMAIN ## ------------------------------------- ## ## Accumulate code for creating libtool. ## ## ------------------------------------- ## # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the 'libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) ## ------------------------ ## ## FIXME: Eliminate VARNAME ## ## ------------------------ ## # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to 'config.status' so that its # declaration there will have the same value as in 'configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags='_LT_TAGS'dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the 'libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into 'config.status', and then the shell code to quote escape them in # for loops in 'config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ## exclude from sc_prohibit_nested_quotes ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # '#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test 0 = "$lt_write_fail" && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ '$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test 0 != $[#] do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try '$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try '$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test yes = "$silent" && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options that allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}"; then setopt NO_GLOB_SUBST fi cfgfile=${ofile}T trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # Generated automatically by $as_me ($PACKAGE) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # Provide generalized library-building support services. # Written by Gordon Matzigkeit, 1996 _LT_COPYING _LT_LIBTOOL_TAGS # Configured defaults for sys_lib_dlsearch_path munging. : \${LT_SYS_LIBRARY_PATH="$configure_time_lt_sys_library_path"} # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF cat <<'_LT_EOF' >> "$cfgfile" # ### BEGIN FUNCTIONS SHARED WITH CONFIGURE _LT_PREPARE_MUNGE_PATH_LIST _LT_PREPARE_CC_BASENAME # ### END FUNCTIONS SHARED WITH CONFIGURE _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test set != "${COLLECT_NAMES+set}"; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "$LT_MULTI_MODULE"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test 0 = "$_lt_result"; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS=$save_LDFLAGS ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test 0 = "$_lt_result" && $GREP forced_load conftest >/dev/null 2>&1; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='$wl-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; 10.[[012]][[,.]]*) _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test yes = "$lt_cv_apple_cc_single_mod"; then _lt_dar_single_mod='$single_module' fi if test yes = "$lt_cv_ld_exported_symbols_list"; then _lt_dar_export_syms=' $wl-exported_symbols_list,$output_objdir/$libname-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/$libname-symbols.expsym $lib' fi if test : != "$DSYMUTIL" && test no = "$lt_cv_ld_force_load"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test yes = "$lt_cv_ld_force_load"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience $wl-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=$_lt_dar_allow_undefined case $cc_basename in ifort*|nagfor*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test yes = "$_lt_dar_can_shared"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dsymutil" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod$_lt_dar_export_syms$_lt_dsymutil" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags$_lt_dar_export_syms$_lt_dsymutil" m4_if([$1], [CXX], [ if test yes != "$lt_cv_apple_cc_single_mod"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dsymutil" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's|^|_|' < \$export_symbols > \$output_objdir/\$libname-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \$lib-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$lib-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring$_lt_dar_export_syms$_lt_dsymutil" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test set = "${lt_cv_aix_libpath+set}"; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=/usr/lib:/lib fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script that will find a shell with a builtin # printf (that we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case $ECHO in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [AS_HELP_STRING([--with-sysroot@<:@=DIR@:>@], [Search for dependent libraries within DIR (or the compiler's sysroot if not specified).])], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case $with_sysroot in #( yes) if test yes = "$GCC"; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([$with_sysroot]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and where our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test no = "$enable_libtool_lock" || enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out what ABI is being produced by ac_compile, and set mode # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE=32 ;; *ELF-64*) HPUX_IA64_MODE=64 ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test yes = "$lt_cv_prog_gnu_ld"; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; mips64*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then emul=elf case `/usr/bin/file conftest.$ac_objext` in *32-bit*) emul="${emul}32" ;; *64-bit*) emul="${emul}64" ;; esac case `/usr/bin/file conftest.$ac_objext` in *MSB*) emul="${emul}btsmip" ;; *LSB*) emul="${emul}ltsmip" ;; esac case `/usr/bin/file conftest.$ac_objext` in *N32*) emul="${emul}n32" ;; esac LD="${LD-ld} -m $emul" fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. Note that the listed cases only cover the # situations where additional linker options are needed (such as when # doing 32-bit compilation for a host where ld defaults to 64-bit, or # vice versa); the common cases where no linker options are needed do # not appear in the list. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) case `/usr/bin/file conftest.o` in *x86-64*) LD="${LD-ld} -m elf32_x86_64" ;; *) LD="${LD-ld} -m elf_i386" ;; esac ;; powerpc64le-*linux*) LD="${LD-ld} -m elf32lppclinux" ;; powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; powerpcle-*linux*) LD="${LD-ld} -m elf64lppc" ;; powerpc-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS=$CFLAGS CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test yes != "$lt_cv_cc_needs_belf"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS=$SAVE_CFLAGS fi ;; *-*solaris*) # Find out what ABI is being produced by ac_compile, and set linker # options accordingly. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*|x86_64-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD=${LD-ld}_sol2 fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks=$enable_libtool_lock ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test 0 -eq "$ac_status"; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test 0 -ne "$ac_status"; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test no = "$lt_cv_ar_at_file"; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in bitrig* | openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" ## exclude from sc_useless_quotes_in_assignment # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test yes = "[$]$2"; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS=$save_LDFLAGS ]) if test yes = "[$]$2"; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring=ABCD case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; bitrig* | darwin* | dragonfly* | freebsd* | netbsd* | openbsd*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len" && \ test undefined != "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test X`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test 17 != "$i" # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n "$lt_cv_sys_max_cmd_len"; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes = "$cross_compiling"; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisibility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined __GNUC__ && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s "conftest$ac_exeext" 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test yes != "$enable_dlopen"; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen=load_add_on lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen=LoadLibrary lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen=dlopen lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl],[ lt_cv_dlopen=dyld lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; tpf*) # Don't try to run any link tests for TPF. We know it's impossible # because TPF is a cross-compiler, and we know how we open DSOs. lt_cv_dlopen=dlopen lt_cv_dlopen_libs= lt_cv_dlopen_self=no ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen=shl_load], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen=shl_load lt_cv_dlopen_libs=-ldld], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen=dlopen], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-ldl], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen=dlopen lt_cv_dlopen_libs=-lsvld], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen=dld_link lt_cv_dlopen_libs=-ldld]) ]) ]) ]) ]) ]) ;; esac if test no = "$lt_cv_dlopen"; then enable_dlopen=no else enable_dlopen=yes fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS=$CPPFLAGS test yes = "$ac_cv_header_dlfcn_h" && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS=$LDFLAGS wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS=$LIBS LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test yes = "$lt_cv_dlopen_self"; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS=$save_CPPFLAGS LDFLAGS=$save_LDFLAGS LIBS=$save_LIBS ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links=nottested if test no = "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" && test no != "$need_locks"; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test no = "$hard_links"; then AC_MSG_WARN(['$CC' does not support '-c -o', so 'make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED([LT_OBJDIR], "$lt_cv_objdir/", [Define to the sub-directory where libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test yes = "$_LT_TAGVAR(hardcode_automatic, $1)"; then # We can hardcode non-existent directories. if test no != "$_LT_TAGVAR(hardcode_direct, $1)" && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test no != "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" && test no != "$_LT_TAGVAR(hardcode_minus_L, $1)"; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test relink = "$_LT_TAGVAR(hardcode_action, $1)" || test yes = "$_LT_TAGVAR(inherit_rpath, $1)"; then # Fast installation is not supported enable_fast_install=no elif test yes = "$shlibpath_overrides_runpath" || test no = "$enable_shared"; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP"; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_PREPARE_MUNGE_PATH_LIST # --------------------------- # Make sure func_munge_path_list() is defined correctly. m4_defun([_LT_PREPARE_MUNGE_PATH_LIST], [[# func_munge_path_list VARIABLE PATH # ----------------------------------- # VARIABLE is name of variable containing _space_ separated list of # directories to be munged by the contents of PATH, which is string # having a format: # "DIR[:DIR]:" # string "DIR[ DIR]" will be prepended to VARIABLE # ":DIR[:DIR]" # string "DIR[ DIR]" will be appended to VARIABLE # "DIRP[:DIRP]::[DIRA:]DIRA" # string "DIRP[ DIRP]" will be prepended to VARIABLE and string # "DIRA[ DIRA]" will be appended to VARIABLE # "DIR[:DIR]" # VARIABLE will be replaced by "DIR[ DIR]" func_munge_path_list () { case x@S|@2 in x) ;; *:) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'` \@S|@@S|@1\" ;; x:*) eval @S|@1=\"\@S|@@S|@1 `$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; *::*) eval @S|@1=\"\@S|@@S|@1\ `$ECHO @S|@2 | $SED -e 's/.*:://' -e 's/:/ /g'`\" eval @S|@1=\"`$ECHO @S|@2 | $SED -e 's/::.*//' -e 's/:/ /g'`\ \@S|@@S|@1\" ;; *) eval @S|@1=\"`$ECHO @S|@2 | $SED 's/:/ /g'`\" ;; esac } ]])# _LT_PREPARE_PATH_LIST # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PREPARE_MUNGE_PATH_LIST])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test yes = "$GCC"; then case $host_os in darwin*) lt_awk_arg='/^libraries:/,/LR/' ;; *) lt_awk_arg='/^libraries:/' ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq='s|=\([[A-Za-z]]:\)|\1|g' ;; *) lt_sed_strip_eq='s|=/|/|g' ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary... lt_tmp_lt_search_path_spec= lt_multi_os_dir=/`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` # ...but if some path component already ends with the multilib dir we assume # that all is fine and trust -print-search-dirs as is (GCC 4.2? or newer). case "$lt_multi_os_dir; $lt_search_path_spec " in "/; "* | "/.; "* | "/./; "* | *"$lt_multi_os_dir "* | *"$lt_multi_os_dir/ "*) lt_multi_os_dir= ;; esac for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path$lt_multi_os_dir" elif test -n "$lt_multi_os_dir"; then test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS = " "; FS = "/|\n";} { lt_foo = ""; lt_count = 0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo = "/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's|/\([[A-Za-z]]:\)|\1|g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=.so postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown AC_ARG_VAR([LT_SYS_LIBRARY_PATH], [User-defined run-time library search path.]) case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='$libname$release$shared_ext$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test ia64 = "$host_cpu"; then # AIX 5 supports IA64 library_names_spec='$libname$release$shared_ext$major $libname$release$shared_ext$versuffix $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line '#! .'. This would cause the generated library to # depend on '.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | $CC -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # Using Import Files as archive members, it is possible to support # filename-based versioning of shared library archives on AIX. While # this would work for both with and without runtime linking, it will # prevent static linking of such archives. So we do filename-based # shared library versioning with .so extension only, which is used # when both runtime linking and shared linking is enabled. # Unfortunately, runtime linking may impact performance, so we do # not want this to be the default eventually. Also, we use the # versioned .so libs for executables only if there is the -brtl # linker flag in LDFLAGS as well, or --with-aix-soname=svr4 only. # To allow for filename-based versioning support, we need to create # libNAME.so.V as an archive file, containing: # *) an Import File, referring to the versioned filename of the # archive as well as the shared archive member, telling the # bitwidth (32 or 64) of that shared object, and providing the # list of exported symbols of that shared object, eventually # decorated with the 'weak' keyword # *) the shared object with the F_LOADONLY flag set, to really avoid # it being seen by the linker. # At run time we better use the real file rather than another symlink, # but for link time we create the symlink libNAME.so -> libNAME.so.V case $with_aix_soname,$aix_use_runtimelinking in # AIX (on Power*) has no versioning support, so currently we cannot hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. aix,yes) # traditional libtool dynamic_linker='AIX unversionable lib.so' # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; aix,no) # traditional AIX only dynamic_linker='AIX lib.a[(]lib.so.V[)]' # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' ;; svr4,*) # full svr4 only dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,yes) # both, prefer svr4 dynamic_linker="AIX lib.so.V[(]$shared_archive_member_spec.o[)], lib.a[(]lib.so.V[)]" library_names_spec='$libname$release$shared_ext$major $libname$shared_ext' # unpreferred sharedlib libNAME.a needs extra handling postinstall_cmds='test -n "$linkname" || linkname="$realname"~func_stripname "" ".so" "$linkname"~$install_shared_prog "$dir/$func_stripname_result.$libext" "$destdir/$func_stripname_result.$libext"~test -z "$tstripme" || test -z "$striplib" || $striplib "$destdir/$func_stripname_result.$libext"' postuninstall_cmds='for n in $library_names $old_library; do :; done~func_stripname "" ".so" "$n"~test "$func_stripname_result" = "$n" || func_append rmfiles " $odir/$func_stripname_result.$libext"' # We do not specify a path in Import Files, so LIBPATH fires. shlibpath_overrides_runpath=yes ;; *,no) # both, prefer aix dynamic_linker="AIX lib.a[(]lib.so.V[)], lib.so.V[(]$shared_archive_member_spec.o[)]" library_names_spec='$libname$release.a $libname.a' soname_spec='$libname$release$shared_ext$major' # unpreferred sharedlib libNAME.so.V and symlink libNAME.so need extra handling postinstall_cmds='test -z "$dlname" || $install_shared_prog $dir/$dlname $destdir/$dlname~test -z "$tstripme" || test -z "$striplib" || $striplib $destdir/$dlname~test -n "$linkname" || linkname=$realname~func_stripname "" ".a" "$linkname"~(cd "$destdir" && $LN_S -f $dlname $func_stripname_result.so)' postuninstall_cmds='test -z "$dlname" || func_append rmfiles " $odir/$dlname"~for n in $old_library $library_names; do :; done~func_stripname "" ".a" "$n"~func_append rmfiles " $odir/$func_stripname_result.so"' ;; esac shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='$libname$shared_ext' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo $libname | sed -e 's/^lib/cyg/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo $libname | sed -e 's/^lib/pw/'``echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext' library_names_spec='$libname.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec=$LIB if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='$libname`echo $release | $SED -e 's/[[.]]/-/g'`$versuffix$shared_ext $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='$libname$release$major$shared_ext $libname$shared_ext' soname_spec='$libname$release$major$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=no sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' if test 32 = "$HPUX_IA64_MODE"; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" sys_lib_dlsearch_path_spec=/usr/lib/hpux32 else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" sys_lib_dlsearch_path_spec=/usr/lib/hpux64 fi ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test yes = "$lt_cv_prog_gnu_ld"; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$release$shared_ext $libname$shared_ext' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib$libsuff /lib$libsuff /usr/local/lib$libsuff" sys_lib_dlsearch_path_spec="/usr/lib$libsuff /lib$libsuff" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; linux*android*) version_type=none # Android doesn't support versioned libraries. need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext' soname_spec='$libname$release$shared_ext' finish_cmds= shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes dynamic_linker='Android linker' # Don't embed -rpath directories since the linker doesn't support them. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Ideally, we could use ldconfig to report *all* directores which are # searched for libraries, however this is still not possible. Aside from not # being certain /sbin/ldconfig is available, command # 'ldconfig -N -X -v | grep ^/' on 64bit Fedora does not report /usr/lib64, # even though it is searched at run-time. Try to do the best guess by # appending ld.so.conf contents (and includes) to the search path. if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="/lib /usr/lib $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsdelf*-gnu) version_type=linux need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='NetBSD ld.elf_so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd* | bitrig*) version_type=sunos sys_lib_dlsearch_path_spec=/usr/lib need_lib_prefix=no if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then need_version=no else need_version=yes fi library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; os2*) libname_spec='$name' version_type=windows shrext_cmds=.dll need_version=no need_lib_prefix=no # OS/2 can only load a DLL with a base name of 8 characters or less. soname_spec='`test -n "$os2dllname" && libname="$os2dllname"; v=$($ECHO $release$versuffix | tr -d .-); n=$($ECHO $libname | cut -b -$((8 - ${#v})) | tr . _); $ECHO $n$v`$shared_ext' library_names_spec='${libname}_dll.$libext' dynamic_linker='OS/2 ld.exe' shlibpath_var=BEGINLIBPATH sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec postinstall_cmds='base_file=`basename \$file`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\$base_file'\''i; $ECHO \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; $ECHO \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='$libname$release$shared_ext$major' library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='$libname$release$shared_ext$versuffix $libname$shared_ext$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test yes = "$with_gnu_ld"; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec; then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$shared_ext.$versuffix $libname$shared_ext.$major $libname$shared_ext' soname_spec='$libname$shared_ext.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=sco need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test yes = "$with_gnu_ld"; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname$release$shared_ext$versuffix $libname$release$shared_ext$major $libname$shared_ext' soname_spec='$libname$release$shared_ext$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test no = "$dynamic_linker" && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test yes = "$GCC"; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test set = "${lt_cv_sys_lib_search_path_spec+set}"; then sys_lib_search_path_spec=$lt_cv_sys_lib_search_path_spec fi if test set = "${lt_cv_sys_lib_dlsearch_path_spec+set}"; then sys_lib_dlsearch_path_spec=$lt_cv_sys_lib_dlsearch_path_spec fi # remember unaugmented sys_lib_dlsearch_path content for libtool script decls... configure_time_dlsearch_path=$sys_lib_dlsearch_path_spec # ... but it needs LT_SYS_LIBRARY_PATH munging for other configure-time code func_munge_path_list sys_lib_dlsearch_path_spec "$LT_SYS_LIBRARY_PATH" # to be used as default LT_SYS_LIBRARY_PATH value in generated libtool configure_time_lt_sys_library_path=$LT_SYS_LIBRARY_PATH _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([sys_lib_dlsearch_path_spec], [configure_time_dlsearch_path], [2], [Detected run-time system search path for libraries]) _LT_DECL([], [configure_time_lt_sys_library_path], [2], [Explicit LT_SYS_LIBRARY_PATH set during ./configure time]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program that can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD=$MAGIC_CMD # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD=$MAGIC_CMD lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$1"; then lt_cv_path_MAGIC_CMD=$ac_dir/"$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD=$lt_cv_path_MAGIC_CMD if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS=$lt_save_ifs MAGIC_CMD=$lt_save_MAGIC_CMD ;; esac]) MAGIC_CMD=$lt_cv_path_MAGIC_CMD if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program that can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test no = "$withval" || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test yes = "$GCC"; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return, which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD=$ac_prog ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test yes = "$with_gnu_ld"; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD=$ac_dir/$ac_prog # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 conftest.i cat conftest.i conftest.i >conftest2.i : ${lt_DD:=$DD} AC_PATH_PROGS_FEATURE_CHECK([lt_DD], [dd], [if "$ac_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && ac_cv_path_lt_DD="$ac_path_lt_DD" ac_path_lt_DD_found=: fi]) rm -f conftest.i conftest2.i conftest.out]) ])# _LT_PATH_DD # _LT_CMD_TRUNCATE # ---------------- # find command to truncate a binary pipe m4_defun([_LT_CMD_TRUNCATE], [m4_require([_LT_PATH_DD]) AC_CACHE_CHECK([how to truncate binary pipes], [lt_cv_truncate_bin], [printf 0123456789abcdef0123456789abcdef >conftest.i cat conftest.i conftest.i >conftest2.i lt_cv_truncate_bin= if "$ac_cv_path_lt_DD" bs=32 count=1 conftest.out 2>/dev/null; then cmp -s conftest.i conftest.out \ && lt_cv_truncate_bin="$ac_cv_path_lt_DD bs=4096 count=1" fi rm -f conftest.i conftest2.i conftest.out test -z "$lt_cv_truncate_bin" && lt_cv_truncate_bin="$SED -e 4q"]) _LT_DECL([lt_truncate_bin], [lt_cv_truncate_bin], [1], [Command to truncate a binary pipe]) ])# _LT_CMD_TRUNCATE # _LT_CHECK_MAGIC_METHOD # ---------------------- # how to check for library dependencies # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_MAGIC_METHOD], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) AC_CACHE_CHECK([how to recognize dependent libraries], lt_cv_deplibs_check_method, [lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # 'unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # that responds to the $file_magic_cmd with a given extended regex. # If you have 'file' or equivalent on your system and you're not sure # whether 'pass_all' will *always* work, you probably want this one. case $host_os in aix[[4-9]]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[[45]]*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. if ( file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) lt_cv_deplibs_check_method=pass_all ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd* | bitrig*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; os2*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM=$NM else lt_nm_to_check=${ac_tool_prefix}nm if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs=$IFS; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS=$lt_save_ifs test -z "$ac_dir" && ac_dir=. tmp_nm=$ac_dir/$lt_tmp_nm if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext"; then # Check to see if the nm accepts a BSD-compat flag. # Adding the 'sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file # MSYS converts /dev/null to NUL, MinGW nm treats NUL as empty case $build_os in mingw*) lt_bad_file=conftest.nm/nofile ;; *) lt_bad_file=/dev/null ;; esac case `"$tmp_nm" -B $lt_bad_file 2>&1 | sed '1q'` in *$lt_bad_file* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break 2 ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break 2 ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS=$lt_save_ifs done : ${lt_cv_path_NM=no} fi]) if test no != "$lt_cv_path_NM"; then NM=$lt_cv_path_NM else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols -headers /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols -headers" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test : != "$DUMPBIN"; then NM=$DUMPBIN fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh; # decide which one to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd=$ECHO ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test yes != "$lt_cv_path_mainfest_tool"; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # _LT_DLL_DEF_P([FILE]) # --------------------- # True iff FILE is a Windows DLL '.def' file. # Keep in sync with func_dll_def_p in the libtool script AC_DEFUN([_LT_DLL_DEF_P], [dnl test DEF = "`$SED -n dnl -e '\''s/^[[ ]]*//'\'' dnl Strip leading whitespace -e '\''/^\(;.*\)*$/d'\'' dnl Delete empty lines and comments -e '\''s/^\(EXPORTS\|LIBRARY\)\([[ ]].*\)*$/DEF/p'\'' dnl -e q dnl Only consider the first "real" line $1`" dnl ])# _LT_DLL_DEF_P # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM=-lmw) AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM=-lm) ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test yes = "$GCC"; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test ia64 = "$host_cpu"; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Gets list of data symbols to import. lt_cv_sys_global_symbol_to_import="sed -n -e 's/^I .* \(.*\)$/\1/p'" # Adjust the below global symbol transforms to fixup imported variables. lt_cdecl_hook=" -e 's/^I .* \(.*\)$/extern __declspec(dllimport) char \1;/p'" lt_c_name_hook=" -e 's/^I .* \(.*\)$/ {\"\1\", (void *) 0},/p'" lt_c_name_lib_hook="\ -e 's/^I .* \(lib.*\)$/ {\"\1\", (void *) 0},/p'\ -e 's/^I .* \(.*\)$/ {\"lib\1\", (void *) 0},/p'" else # Disable hooks by default. lt_cv_sys_global_symbol_to_import= lt_cdecl_hook= lt_c_name_hook= lt_c_name_lib_hook= fi # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n"\ $lt_cdecl_hook\ " -e 's/^T .* \(.*\)$/extern int \1();/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n"\ $lt_c_name_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/p'" # Transform an extracted symbol line into symbol name with lib prefix and # symbol address. lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n"\ $lt_c_name_lib_hook\ " -e 's/^: \(.*\) .*$/ {\"\1\", (void *) 0},/p'"\ " -e 's/^$symcode$symcode* .* \(lib.*\)$/ {\"\1\", (void *) \&\1},/p'"\ " -e 's/^$symcode$symcode* .* \(.*\)$/ {\"lib\1\", (void *) \&\1},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function, # D for any global variable and I for any imported variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " /^ *Symbol name *: /{split(\$ 0,sn,\":\"); si=substr(sn[2],2)};"\ " /^ *Type *: code/{print \"T\",si,substr(si,length(prfx))};"\ " /^ *Type *: data/{print \"I\",si,substr(si,length(prfx))};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=\"D\"}; \$ 0~/\(\).*\|/{f=\"T\"};"\ " {split(\$ 0,a,/\||\r/); split(a[2],s)};"\ " s[1]~/^[@?]/{print f,s[1],s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print f,t[1],substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined _WIN32 || defined __CYGWIN__ || defined _WIN32_WCE /* DATA imports from DLLs on WIN32 can't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined __osf__ /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* .* \(.*\)$/ {\"\1\", (void *) \&\1},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS=conftstm.$ac_objext CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest$ac_exeext; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test yes = "$pipe_works"; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_import], [lt_cv_sys_global_symbol_to_import], [1], [Transform the output of nm into a list of symbols to manually relocate]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([nm_interface], [lt_cv_nm_interface], [1], [The name lister interface]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' if test ia64 != "$host_cpu"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64, which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd* | netbsdelf*-gnu) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test yes = "$GCC"; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the '-m68020' flag to GCC prevents building anything better, # like '-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test ia64 = "$host_cpu"; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' case $cc_basename in nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) case $host_os in os2*) _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-static' ;; esac ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='$wl-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in # old Intel for x86_64, which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms that do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)=$ltdll_cmds ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ' (' and ')$', so one must not match beginning or # end of line. Example: 'a|bc|.*d.*' will exclude the symbols 'a' and 'bc', # as well as any symbol that contains 'd'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test yes != "$GCC"; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd* | bitrig*) with_gnu_ld=no ;; linux* | k*bsd*-gnu | gnu*) _LT_TAGVAR(link_all_deplibs, $1)=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test yes = "$with_gnu_ld"; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test yes = "$lt_use_gnu_ld_interface"; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='$wl' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v | $SED -e 's/([^)]\+)\s\+//' 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test ia64 != "$host_cpu"; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test linux-dietlibc = "$host_os"; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test no = "$tmp_diet" then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; nagfor*) # NAGFOR 5.3 tmp_sharedflag='-Wl,-shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi case $cc_basename in tcc*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='-rdynamic' ;; xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 cannot *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test no = "$_LT_TAGVAR(ld_shlibs, $1)"; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test yes = "$GCC" && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to GNU nm, but means don't demangle to AIX nm. # Without the "-l" option, or with the "-B" option, AIX nm treats # weak defined symbols like other global defined symbols, whereas # GNU nm marks them as "W". # While the 'weak' keyword is ignored in the Export File, we need # it in the Import File for the 'aix-soname' feature, so we have # to replace the "-B" option with "-P" for AIX nm. if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { if (\$ 2 == "W") { print \$ 3 " weak" } else { print \$ 3 } } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='`func_echo_all $NM | $SED -e '\''s/B\([[^B]]*\)$/P\1/'\''` -PCpgl $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) && ([substr](\$ 1,1,1) != ".")) { if ((\$ 2 == "W") || (\$ 2 == "V") || (\$ 2 == "Z")) { print \$ 1 " weak" } else { print \$ 1 } } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test x-brtl = "x$ld_flag" || test x-Wl,-brtl = "x$ld_flag"); then aix_use_runtimelinking=yes break fi done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # traditional, no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GCC"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag="$shared_flag "'$wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; hpux10*) if test yes,no = "$GCC,$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test yes,no = "$GCC,$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS=$LDFLAGS LDFLAGS="$LDFLAGS -shared $wl-exported_symbol ${wl}foo $wl-update_registry $wl/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS=$save_LDFLAGS]) if test yes = "$lt_cv_irix_exported_symbol"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations $wl-exports_file $wl$export_symbols -o $lib' fi _LT_TAGVAR(link_all_deplibs, $1)=no else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; linux*) case $cc_basename in tcc*) # Fabrice Bellard et al's Tiny C Compiler _LT_TAGVAR(ld_shlibs, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; netbsd* | netbsdelf*-gnu) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags $wl-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; osf3*) if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test yes = "$GCC"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $pic_flag $libobjs $deplibs $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $wl-input $wl$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test yes = "$GCC"; then wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $wl-z ${wl}text $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag $wl-z ${wl}text $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='$wl' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. GCC discards it without '$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test yes = "$GCC"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test sequent = "$host_vendor"; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' if test yes = "$GCC"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test sni = "$host_vendor"; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test yes,yes = "$GCC,$enable_shared"; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME$shared_ext during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting $shlibpath_var if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC=$CC AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report what library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC=$lt_save_CC ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to 'libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test no != "$CXX" && ( (test g++ = "$CXX" && `g++ -v >/dev/null 2>&1` ) || (test g++ != "$CXX"))); then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_caught_CXX_error"; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test yes = "$GXX"; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test yes = "$GXX"; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test yes = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='$wl' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test ia64 = "$host_cpu"; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag= else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # have runtime linking enabled, and use it for executables. # For shared libraries, we enable/disable runtime linking # depending on the kind of the shared library created - # when "with_aix_soname,aix_use_runtimelinking" is: # "aix,no" lib.a(lib.so.V) shared, rtl:no, for executables # "aix,yes" lib.so shared, rtl:yes, for executables # lib.a static archive # "both,no" lib.so.V(shr.o) shared, rtl:yes # lib.a(lib.so.V) shared, rtl:no, for executables # "both,yes" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a(lib.so.V) shared, rtl:no # "svr4,*" lib.so.V(shr.o) shared, rtl:yes, for executables # lib.a static archive case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done if test svr4,no = "$with_aix_soname,$aix_use_runtimelinking"; then # With aix-soname=svr4, we create the lib.so.V shared archives only, # so we don't have lib.a shared libs to link our executables. # We have to force runtime linking in this case. aix_use_runtimelinking=yes LDFLAGS="$LDFLAGS -Wl,-brtl" fi ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='$wl-f,' case $with_aix_soname,$aix_use_runtimelinking in aix,*) ;; # no import file svr4,* | *,yes) # use import file # The Import File defines what to hardcode. _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no ;; esac if test yes = "$GXX"; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`$CC -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test yes = "$aix_use_runtimelinking"; then shared_flag=$shared_flag' $wl-G' fi # Need to ensure runtime linking is disabled for the traditional # shared library, or the linker may eventually find shared libraries # /with/ Import File - we do not want to mix them. shared_flag_aix='-shared' shared_flag_svr4='-shared $wl-G' else # not using gcc if test ia64 = "$host_cpu"; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test yes = "$aix_use_runtimelinking"; then shared_flag='$wl-G' else shared_flag='$wl-bM:SRE' fi shared_flag_aix='$wl-bM:SRE' shared_flag_svr4='$wl-G' fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test aix,yes = "$with_aix_soname,$aix_use_runtimelinking"; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. # The "-G" linker flag allows undefined symbols. _LT_TAGVAR(no_undefined_flag, $1)='-bernotok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs $wl'$no_entry_flag' $compiler_flags `if test -n "$allow_undefined_flag"; then func_echo_all "$wl$allow_undefined_flag"; else :; fi` $wl'$exp_sym_flag:\$export_symbols' '$shared_flag else if test ia64 = "$host_cpu"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\$wl$no_entry_flag"' $compiler_flags $wl$allow_undefined_flag '"\$wl$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' $wl-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-berok' if test yes = "$with_gnu_ld"; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$RM -r $output_objdir/$realname.d~$MKDIR $output_objdir/$realname.d' # -brtl affects multiple linker settings, -berok does not and is overridden later compiler_flags_filtered='`func_echo_all "$compiler_flags " | $SED -e "s%-brtl\\([[, ]]\\)%-berok\\1%g"`' if test svr4 != "$with_aix_soname"; then # This is similar to how AIX traditionally builds its shared # libraries. Need -bnortl late, we may have -brtl in LDFLAGS. _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_aix' -o $output_objdir/$realname.d/$soname $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$realname.d/$soname' fi if test aix != "$with_aix_soname"; then _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$CC '$shared_flag_svr4' -o $output_objdir/$realname.d/$shared_archive_member_spec.o $libobjs $deplibs $wl-bnoentry '$compiler_flags_filtered'$wl-bE:$export_symbols$allow_undefined_flag~$STRIP -e $output_objdir/$realname.d/$shared_archive_member_spec.o~( func_echo_all "#! $soname($shared_archive_member_spec.o)"; if test shr_64 = "$shared_archive_member_spec"; then func_echo_all "# 64"; else func_echo_all "# 32"; fi; cat $export_symbols ) > $output_objdir/$realname.d/$shared_archive_member_spec.imp~$AR $AR_FLAGS $output_objdir/$soname $output_objdir/$realname.d/$shared_archive_member_spec.o $output_objdir/$realname.d/$shared_archive_member_spec.imp' else # used by -dlpreopen to get the symbols _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$MV $output_objdir/$realname.d/$soname $output_objdir' fi _LT_TAGVAR(archive_expsym_cmds, $1)="$_LT_TAGVAR(archive_expsym_cmds, $1)"'~$RM -r $output_objdir/$realname.d' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=.dll # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp "$export_symbols" "$output_objdir/$soname.def"; echo "$tool_output_objdir$soname.def" > "$output_objdir/$soname.exp"; else $SED -e '\''s/^/-link -EXPORT:/'\'' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile=$lt_outputfile.exe lt_tool_outputfile=$lt_tool_outputfile.exe ;; esac~ func_to_tool_file "$lt_outputfile"~ if test : != "$MANIFEST_TOOL" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file, use it as # is; otherwise, prepend EXPORTS... _LT_TAGVAR(archive_expsym_cmds, $1)='if _LT_DLL_DEF_P([$export_symbols]); then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname $wl--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported shrext_cmds=.dll _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ emxexp $libobjs | $SED /"_DLL_InitTerm"/d >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(archive_expsym_cmds, $1)='$ECHO "LIBRARY ${soname%$shared_ext} INITINSTANCE TERMINSTANCE" > $output_objdir/$libname.def~ $ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~ $ECHO "DATA MULTIPLE NONSHARED" >> $output_objdir/$libname.def~ $ECHO EXPORTS >> $output_objdir/$libname.def~ prefix_cmds="$SED"~ if test EXPORTS = "`$SED 1q $export_symbols`"; then prefix_cmds="$prefix_cmds -e 1d"; fi~ prefix_cmds="$prefix_cmds -e \"s/^\(.*\)$/_\1/g\""~ cat $export_symbols | $prefix_cmds >> $output_objdir/$libname.def~ $CC -Zdll -Zcrtdll -o $output_objdir/$soname $libobjs $deplibs $compiler_flags $output_objdir/$libname.def~ emximp -o $lib $output_objdir/$libname.def' _LT_TAGVAR(old_archive_From_new_cmds, $1)='emximp -o $output_objdir/${libname}_dll.a $output_objdir/$libname.def' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag $wl+b $wl$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test "x$output_objdir/$soname" = "x$lib" || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test no = "$with_gnu_ld"; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl+b $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC $wl+h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag $wl+h $wl$soname $wl+b $wl$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s|^|_|" $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags $wl-h,$soname $wl--retain-symbols-file,$output_objdir/$soname.expsym $wl--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test yes = "$GXX"; then if test no = "$with_gnu_ld"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu | gnu*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib $wl-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive$convenience $wl--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname $wl-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl--rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname -o $lib $wl-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname -o $lib' if test yes = "$supports_anon_versioning"; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags $wl-soname $wl$soname $wl-version-script $wl$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file $wl$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` $wl--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd* | bitrig*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-E' _LT_TAGVAR(whole_archive_flag_spec, $1)=$wlarc'--whole-archive$convenience '$wlarc'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\$tempext\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $soname `test -n "$verstring" && func_echo_all "$wl-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname $wl-input $wl$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry $output_objdir/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list= ; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(allow_undefined_flag, $1)=' $wl-expect_unresolved $wl\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-msym $wl-soname $wl$soname `test -n "$verstring" && func_echo_all "$wl-set_version $wl$verstring"` $wl-update_registry $wl$output_objdir/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-rpath $wl$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G$allow_undefined_flag -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G$allow_undefined_flag $wl-M $wl$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands '-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test yes,no = "$GXX,$with_gnu_ld"; then _LT_TAGVAR(no_undefined_flag, $1)=' $wl-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require '-G' NOT '-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags $wl-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib $wl-M $wl$lib.exp $wl-h $wl$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='$wl-z ${wl}allextract$convenience $wl-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We CANNOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='$wl-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='$wl-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='$wl-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='$wl-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $wl-Bexport:$export_symbols $wl-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test no = "$_LT_TAGVAR(ld_shlibs, $1)" && can_build_shared=no _LT_TAGVAR(GCC, $1)=$GXX _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test yes != "$_lt_caught_CXX_error" AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case @S|@2 in .*) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%\\\\@S|@2\$%%"`;; *) func_stripname_result=`$ECHO "@S|@3" | $SED "s%^@S|@1%%; s%@S|@2\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case $prev$p in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test x-L = "$p" || test x-R = "$p"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test no = "$pre_test_object_deps_done"; then case $prev in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)=$prev$p else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} $prev$p" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)=$prev$p else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} $prev$p" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test no = "$pre_test_object_deps_done"; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)=$p else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)=$p else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | $SED -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test no = "$F77"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_F77"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$G77 _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_F77" AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test no = "$FC"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test yes != "$_lt_disable_FC"; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test no = "$can_build_shared" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test yes = "$enable_shared" && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test ia64 != "$host_cpu"; then case $enable_shared,$with_aix_soname,$aix_use_runtimelinking in yes,aix,yes) ;; # shared object as lib.so file only yes,svr4,*) ;; # shared object as lib.so archive member only yes,*) enable_static=no ;; # shared object in lib.a archive as well esac fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test yes = "$enable_shared" || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)=$ac_cv_fc_compiler_gnu _LT_TAGVAR(LD, $1)=$LD ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test yes != "$_lt_disable_FC" AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)=$LD _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to 'libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code=$lt_simple_compile_test_code # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test set = "${GCJFLAGS+set}" || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ ############################################################ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # ############################################################ m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f "$lt_ac_sed" && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test 10 -lt "$lt_ac_count" && break lt_ac_count=`expr $lt_ac_count + 1` if test "$lt_ac_count" -gt "$lt_ac_max"; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine what file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS ola-0.10.9/config/resolv.m40000664000175000017500000000416414376533110012330 00000000000000## resolv.m4 -- Check for resolv.h ## Copyright (C) 2014 Simon Newton ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # ACX_RESOLV() # Check that resolv.h exists and is usable. # Sets RESOLV_LIBS # We include netinet/in.h below to avoid # http://lists.freebsd.org/pipermail/freebsd-bugs/2013-September/053972.html # ----------------------------------------------------------------------------- AC_DEFUN([ACX_RESOLV], [ AC_CHECK_HEADERS([resolv.h]) am_save_LDFLAGS="$LDFLAGS" RESOLV_LIBS="" acx_resolv_libs="-lresolv -resolv -lc" for lib in $acx_resolv_libs; do acx_resolv_ok=no LDFLAGS="$am_save_LDFLAGS $lib" AC_MSG_CHECKING([for res_init() in $lib]) AC_LINK_IFELSE( [AC_LANG_PROGRAM([dnl #include #include ], [res_init()])], [acx_resolv_ok=yes], []) AC_MSG_RESULT($acx_resolv_ok) if test x"$acx_resolv_ok" = xyes; then RESOLV_LIBS="$lib" break; fi done if test -z "$RESOLV_LIBS"; then AC_MSG_ERROR([Missing resolv, please install it]) fi AC_SUBST(RESOLV_LIBS) # Check for res_ninit AC_CHECK_DECLS([res_ninit], [], [], [[ #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_SOCKET_H # include /* inet_ functions / structs */ #endif #ifdef HAVE_NETINET_IN_H # include /* inet_ functions / structs */ #endif #ifdef HAVE_ARPA_NAMESER_H # include /* DNS HEADER struct */ #endif #ifdef HAVE_RESOLV_H # include #endif ]]) LDFLAGS="$am_save_LDFLAGS" ]) ola-0.10.9/config/test-driver0000755000175000017500000001104014376533151012744 00000000000000#! /bin/sh # test-driver - basic testsuite driver script. scriptversion=2013-07-13.22; # UTC # Copyright (C) 2011-2014 Free Software Foundation, Inc. # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . # Make unconditional expansion of undefined variables an error. This # helps a lot in preventing typo-related bugs. set -u usage_error () { echo "$0: $*" >&2 print_usage >&2 exit 2 } print_usage () { cat <$log_file 2>&1 estatus=$? if test $enable_hard_errors = no && test $estatus -eq 99; then tweaked_estatus=1 else tweaked_estatus=$estatus fi case $tweaked_estatus:$expect_failure in 0:yes) col=$red res=XPASS recheck=yes gcopy=yes;; 0:*) col=$grn res=PASS recheck=no gcopy=no;; 77:*) col=$blu res=SKIP recheck=no gcopy=yes;; 99:*) col=$mgn res=ERROR recheck=yes gcopy=yes;; *:yes) col=$lgn res=XFAIL recheck=no gcopy=yes;; *:*) col=$red res=FAIL recheck=yes gcopy=yes;; esac # Report the test outcome and exit status in the logs, so that one can # know whether the test passed or failed simply by looking at the '.log' # file, without the need of also peaking into the corresponding '.trs' # file (automake bug#11814). echo "$res $test_name (exit status: $estatus)" >>$log_file # Report outcome to console. echo "${col}${res}${std}: $test_name" # Register the test result, and other relevant metadata. echo ":test-result: $res" > $trs_file echo ":global-test-result: $res" >> $trs_file echo ":recheck: $recheck" >> $trs_file echo ":copy-in-global-log: $gcopy" >> $trs_file # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ola-0.10.9/config/maven.m40000664000175000017500000000415014376533110012117 00000000000000## maven.m4 -- macro to check for maven ## Copyright (C) 2012 Simon Newton ## ## This program is free software; you can redistribute it and/or modify ## it under the terms of the GNU General Public License as published by ## the Free Software Foundation; either version 2, or (at your option) ## any later version. ## ## This program is distributed in the hope that it will be useful, ## but WITHOUT ANY WARRANTY; without even the implied warranty of ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ## GNU General Public License for more details. ## ## You should have received a copy of the GNU General Public License ## along with this program; if not, write to the Free Software ## Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. # MAVEN_SUPPORT(version) # Check that maven is installed and is the right version # ----------------------------------------------------------------------------- AC_DEFUN([MAVEN_SUPPORT], [ AC_PATH_PROG([MAVEN],[mvn]) if test -z "$MAVEN" ; then AC_MSG_ERROR([cannot find 'mvn' program, you need to install Maven]); elif test -n "$1" ; then AC_MSG_CHECKING([mvn version]) [maven_version=`$MAVEN --version 2> /dev/null | head -n 1 | sed 's/.*\([0-9][0-9]*\.[0-9][0-9]*\.[0-9][0-9]*\).*/\1/g'`] [required=$1] [required_major=`echo $required | sed 's/[^0-9].*//'`] [required_minor=`echo $required | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`] [required_patch=`echo $required | sed 's/^.*[^0-9]//'`] [actual_major=`echo $maven_version | sed 's/[^0-9].*//'`] [actual_minor=`echo $maven_version | sed 's/[0-9][0-9]*\.\([0-9][0-9]*\)\.[0-9][0-9]*/\1/'`] [actual_patch=`echo $maven_version | sed 's/^.*[^0-9]//'`] maven_version_proper=`expr \ $actual_major \> $required_major \| \ $actual_major \= $required_major \& \ $actual_minor \> $required_minor \| \ $actual_major \= $required_major \& \ $actual_minor \= $required_minor \& \ $actual_patch \>= $required_patch ` if test "$maven_version_proper" = "1" ; then AC_MSG_RESULT([$maven_version]) else AC_MSG_ERROR([mvn version too old $mavaen_version < $required]); fi fi ]) ola-0.10.9/config/acx_pthread.m40000664000175000017500000003032114376533110013272 00000000000000# =========================================================================== # http://autoconf-archive.cryp.to/acx_pthread.html # =========================================================================== # # SYNOPSIS # # ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) # # DESCRIPTION # # This macro figures out how to build C/C++ programs using POSIX threads. # It sets the PTHREAD_LIBS output variable to the threads library and # linker flags, and the PTHREAD_CFLAGS and PTHREAD_CXXFLAGS output # variables to any special C/C++ compiler flags that are needed. (The user # can also force certain compiler flags/libs to be tested by setting these # environment variables.) # # Also sets PTHREAD_CC to any special C compiler that is needed for # multi-threaded programs (defaults to the value of CC otherwise). (This # is necessary on AIX to use the special cc_r compiler alias.) # # Also sets PTHREAD_CXX to any special C++ compiler that is needed for # multi-threaded programs (defaults to the value of CXX otherwise). # # NOTE: You are assumed to not only compile your program with these flags, # but also link it with them as well. e.g. you should link with # $PTHREAD_CC $CFLAGS $PTHREAD_CFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # $PTHREAD_CXX $CXXFLAGS $PTHREAD_CXXFLAGS $LDFLAGS ... $PTHREAD_LIBS $LIBS # # If you are only building threads programs, you may wish to use these # variables in your default LIBS, CFLAGS, and CC: # # LIBS="$PTHREAD_LIBS $LIBS" # CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS" # CC="$PTHREAD_CC" # CXX="$PTHREAD_CXX" # # In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute constant # has a nonstandard name, defines PTHREAD_CREATE_JOINABLE to that name # (e.g. PTHREAD_CREATE_UNDETACHED on AIX). # # ACTION-IF-FOUND is a list of shell commands to run if a threads library # is found, and ACTION-IF-NOT-FOUND is a list of commands to run it if it # is not found. If ACTION-IF-FOUND is not specified, the default action # will define HAVE_PTHREAD. # # Please let the authors know if this macro fails on any platform, or if # you have any other suggestions or comments. This macro was based on work # by SGJ on autoconf scripts for FFTW (http://www.fftw.org/) (with help # from M. Frigo), as well as ac_pthread and hb_pthread macros posted by # Alejandro Forero Cuervo to the autoconf macro repository. We are also # grateful for the helpful feedback of numerous users. # # Updates added for C++ by John Calcote # # LAST MODIFICATION # # 2009-04-14 - jcalcote # # COPYLEFT # # Copyright (c) 2008 Steven G. Johnson # # This program is free software: you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by the # Free Software Foundation, either version 3 of the License, or (at your # option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General # Public License for more details. # # You should have received a copy of the GNU General Public License along # with this program. If not, see . # # As a special exception, the respective Autoconf Macro's copyright owner # gives unlimited permission to copy, distribute and modify the configure # scripts that are the output of Autoconf when processing the Macro. You # need not follow the terms of the GNU General Public License when using # or distributing such scripts, even though portions of the text of the # Macro appear in them. The GNU General Public License (GPL) does govern # all other use of the material that constitutes the Autoconf Macro. # # This special exception to the GPL applies to versions of the Autoconf # Macro released by the Autoconf Macro Archive. When you make and # distribute a modified version of the Autoconf Macro, you may extend this # special exception to the GPL to apply to your modified version as well. AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_PUSH([C]) acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS$PTHREAD_CXXFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CXXFLAGS and CXXFLAGS=$PTHREAD_CXXFLAGS]) AC_LINK_IFELSE([AC_LANG_CALL([], [pthread_join])], acx_pthread_ok=yes) AC_MSG_RESULT($acx_pthread_ok) if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" PTHREAD_CXXFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all, and "pthread-config" # which is a program returning the flags for the Pth emulation library. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt pthread-config" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # ... -mt is also the pthreads flag for HP/aCC # pthread: Linux, etcetera # --thread-safe: KAI C++ # pthread-config: use pthread-config program (for GNU Pth library) case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthreads/-mt/ # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthreads pthread -mt -pthread $acx_pthread_flags" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" PTHREAD_CXXFLAGS="$flag" ;; pthread-config) AC_CHECK_PROG(acx_pthread_config, pthread-config, yes, no) if test x"$acx_pthread_config" = xno; then continue; fi PTHREAD_CFLAGS="`pthread-config --cflags`" PTHREAD_CXXFLAGS="`pthread-config --cxxflags`" PTHREAD_LIBS="`pthread-config --ldflags` `pthread-config --libs`" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" save_CXXFLAGS="$CXXFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_LINK_IFELSE( [AC_LANG_PROGRAM([[#include ]], [[pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0);]] )], [acx_pthread_ok=yes]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" AC_MSG_RESULT($acx_pthread_ok) if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" PTHREAD_CXXFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_CXXFLAGS="$CXXFLAGS" CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS" # Detect AIX lossage: JOINABLE attribute is called UNDETACHED. AC_MSG_CHECKING([for joinable pthread attribute]) attr_name=unknown for attr in PTHREAD_CREATE_JOINABLE PTHREAD_CREATE_UNDETACHED; do AC_LINK_IFELSE([AC_LANG_PROGRAM([[#include ]], [[int attr=$attr; return attr;]] )], [attr_name=$attr; break]) done AC_MSG_RESULT($attr_name) if test "$attr_name" != PTHREAD_CREATE_JOINABLE; then AC_DEFINE_UNQUOTED(PTHREAD_CREATE_JOINABLE, $attr_name, [Define to necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd* | *-darwin*) flag="-D_THREAD_SAFE";; *solaris* | *-osf* | *-hpux*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" PTHREAD_CXXFLAGS="$flag $PTHREAD_CXXFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" CXXFLAGS="$save_CXXFLAGS" # More AIX lossage: must compile with xlc_r, xlC_r, or cc_r if test x"$GCC" != xyes; then AC_CHECK_PROGS(PTHREAD_CC, xlc_r cc_r, ${CC}) AC_CHECK_PROGS(PTHREAD_CXX, xlC_r, ${CXX}) else PTHREAD_CC=$CC PTHREAD_CXX=$CXX fi else PTHREAD_CC="$CC" PTHREAD_CXX="$CXX" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CXXFLAGS) AC_SUBST(PTHREAD_CC) AC_SUBST(PTHREAD_CXX) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no $2 fi AC_LANG_POP([C]) ])dnl ACX_PTHREAD ola-0.10.9/config/missing0000755000175000017500000001533014376533146012157 00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2013-10-28.13; # UTC # Copyright (C) 1996-2014 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'autom4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: ola-0.10.9/config/ax_python_module.m40000664000175000017500000000206014376533110014365 00000000000000# =========================================================================== # http://www.gnu.org/software/autoconf-archive/ax_python_module.html # =========================================================================== # # SYNOPSIS # # AX_PYTHON_MODULE(modname[, fatal]) # # DESCRIPTION # # Checks for Python module. # # If fatal is non-empty then absence of a module will trigger an error. # # LICENSE # # Copyright (c) 2008 Andrew Collier # # Copying and distribution of this file, with or without modification, are # permitted in any medium without royalty provided the copyright notice # and this notice are preserved. This file is offered as-is, without any # warranty. #serial 5 AU_ALIAS([AC_PYTHON_MODULE], [AX_PYTHON_MODULE]) AC_DEFUN([AX_PYTHON_MODULE],[ $PYTHON -c "import $1" 2>/dev/null if test $? -eq 0; then eval AS_TR_CPP([HAVE_PYMOD_$1])=yes else AC_MSG_RESULT([no]) eval AS_TR_CPP([HAVE_PYMOD_$1])=no # if test -n "$2" then AC_MSG_ERROR([failed to find required module $1]) fi fi ]) ola-0.10.9/GPL0000664000175000017500000004313714376533110007657 00000000000000 GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) year name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. ola-0.10.9/debian/0000775000175000017500000000000014376533271010614 500000000000000ola-0.10.9/debian/ola-rdm-tests.install0000664000175000017500000000030514376533110014605 00000000000000usr/bin/*.py usr/lib/python*/dist-packages/ola/testing/*.py usr/lib/python*/dist-packages/ola/testing/rdm/*.py usr/share/man/man1/rdm_* usr/share/ola/rdm-server/* usr/share/ola/rdm-server/images/* ola-0.10.9/debian/ola-python.install0000664000175000017500000000012214376533110014201 00000000000000usr/lib/python*/dist-packages/ola/*.py usr/lib/python*/dist-packages/ola/rpc/*.py ola-0.10.9/debian/watch0000664000175000017500000000025414376533110011556 00000000000000version=4 opts=filenamemangle=s/.+\/v?(\d\S+)\.tar\.gz/ola-$1\.tar\.gz/ \ https://github.com/openlightingproject/ola/releases .*/?ola-(\d{1,2}\.\d{1,2}.\d{1,2})\.tar\.gz ola-0.10.9/debian/libola-dev.install0000664000175000017500000000016614376533110014135 00000000000000usr/include/* usr/lib/*/pkgconfig/* usr/lib/*/libola*.so usr/lib/*/libola*.a usr/lib/*/libola*.so usr/lib/*/libola*.a ola-0.10.9/debian/libola1.install0000664000175000017500000000014514376533110013437 00000000000000usr/lib/*/libola*.so.? usr/lib/*/libola*.so.?.?.* usr/lib/*/libola*.so.? usr/lib/*/libola*.so.?.?.* ola-0.10.9/debian/control0000664000175000017500000000724114376533110012133 00000000000000Source: ola Priority: optional Maintainer: Wouter Verhelst Uploaders: RenZO Build-Depends: debhelper (>= 9), autotools-dev, dh-autoreconf, bash-completion, libcppunit-dev, bison, flex, pkg-config, uuid-dev, python, python-protobuf, libprotobuf-dev, protobuf-compiler, libprotoc-dev, libusb-1.0-0-dev, libftdi1-dev, liblo-dev, libmicrohttpd-dev, libncurses5-dev, libavahi-client-dev, python-numpy Standards-Version: 3.9.8 Section: libs Vcs-Git: https://github.com/OpenLightingProject/ola.git Vcs-browser: https://github.com/OpenLightingProject/ola Homepage: https://www.openlighting.org/ Package: libola-dev Section: libdevel Architecture: any Multi-Arch: same Depends: ola (= ${binary:Version}), ${misc:Depends}, libprotobuf-dev Description: Open Lighting Architecture - development libraries The DMX512 standard for Digital MultipleX is used for digital communication networks commonly used to control stage lighting and effects. . The Open Lighting Architecture (OLA) provides a plugin framework for distributing DMX512 control signals. . This package contains the development files for libola and various related libraries, used to write plugins or control the OLA daemon. Package: ola-python Section: libs Architecture: all Depends: ola (>= ${source:Version}), ola (<< ${source:Version}.~), ${python:Depends}, ${misc:Depends}, python-protobuf Description: Open Lighting Architecture - Python Classes The DMX512 standard for Digital MultipleX is used for digital communication networks commonly used to control stage lighting and effects. . The Open Lighting Architecture (OLA) provides a plugin framework for distributing DMX512 control signals. . This package contains the Python client module. Package: ola-rdm-tests Section: libs Architecture: all Depends: ola (>= ${source:Version}), ola (<< ${source:Version}.~), ola-python (= ${binary:Version}), ${python:Depends}, ${misc:Depends}, python-numpy, libjs-jquery, libjs-jquery-ui, lsb-base Suggests: bash-completion Description: Open Lighting Architecture - RDM Responder Tests The DMX512 standard for Digital MultipleX is used for digital communication networks commonly used to control stage lighting and effects. . The Remote Device Management protocol is an extension to DMX512, allowing bi-directional communication between RDM-compliant devices without disturbing other devices on the same connection. . The Open Lighting Architecture (OLA) provides a plugin framework for distributing DMX512 control signals. . This package provides an automated way to check protocol compliance in RDM devices. Package: ola Section: electronics Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends}, adduser, lsb-base Suggests: bash-completion Description: Open Lighting Architecture The DMX512 standard for Digital MultipleX is used for digital communication networks commonly used to control stage lighting and effects. . The Open Lighting Architecture (OLA) provides a plugin framework for distributing DMX512 control signals. . This package contains olad, the OLA daemon used to control lighting, and a number of command-line tools to control and manipulate olad. Package: libola1 Section: libs Architecture: any Multi-Arch: same Depends: ${shlibs:Depends}, ${misc:Depends} Pre-Depends: ${misc:Pre-Depends} Description: Open Lighting Architecture - shared libraries The DMX512 standard for Digital MultipleX is used for digital communication networks commonly used to control stage lighting and effects. . The Open Lighting Architecture (OLA) provides a plugin framework for distributing DMX512 control signals. . This package contains the shared libraries required to communicate with olad. ola-0.10.9/debian/ola.postinst0000664000175000017500000000337214376533110013111 00000000000000#!/bin/sh -e # postinst script for ola conffile="/etc/default/ola" update_config_file() { db_field=$1 config_field=$2 RET=false db_get $db_field if [ -n "$RET" ] ; then if grep -q "^$config_field" $conffile ; then # keep any admin changes, while replacing the variable content sed "s/^[ ]*$config_field=\".*\"/$config_field=\"$RET\"/" < $conffile > $conffile.new && mv $conffile.new $conffile else echo "$config_field=\"$RET\"" >> $conffile fi fi } # Source debconf library -- we have a Depends line # to make sure it is there... . /usr/share/debconf/confmodule db_version 2.0 case "$1" in configure) if [ -f $conffile ] ; then sed -i -e 's/^[ ]*DAEMON/RUN_DAEMON/g' $conffile else cat << EOF > $conffile # Defaults for ola initscript (/etc/init.d/ola) # This is a POSIX shell fragment # [automatically edited by postinst, do not change line format ] # ola daemon switch. If set to true, olad will run. RUN_DAEMON="true" EOF fi update_config_file ola/daemon RUN_DAEMON db_stop ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac #create the olad user, add it to groups getent passwd olad > /dev/null || adduser --system --no-create-home olad getent group olad > /dev/null || addgroup --system olad groups olad | grep dialout > /dev/null || adduser olad dialout groups olad | grep plugdev > /dev/null || adduser olad plugdev # setup the config dir CONF_DIR=/var/lib/ola if [ ! -d ${CONF_DIR} ]; then mkdir -p ${CONF_DIR}; chown -R olad:olad ${CONF_DIR}; chmod g+s ${CONF_DIR}; fi; # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 ola-0.10.9/debian/ola.install0000664000175000017500000000040114376533110012662 00000000000000debian/org.openlighting.ola.ola.metainfo.xml usr/share/metainfo usr/bin/ola* usr/bin/rdmpro_sniffer usr/bin/usbpro_firmware usr/share/man/man1/ola* usr/share/man/man1/rdmpro_sniffer* usr/share/man/man1/usbpro_firmware* usr/share/olad/* usr/share/ola/pids/* ola-0.10.9/debian/ola.config0000664000175000017500000000117314376533110012470 00000000000000#!/bin/sh -e # ola package configuration script conffile="/etc/default/ola" get_config_file() { config_field=$1 db_field=$2 if [ -f "$conffile" ] ; then VALUE="$(grep "^[ ]*$config_field" $conffile | sed -e "s/^$config_field *= *\"\(.*\)\"/\1/g")" if [ -n "$VALUE" ] ; then db_set $db_field "$VALUE" fi fi } # Source debconf library -- we have a Depends line # to make sure it is there... . /usr/share/debconf/confmodule db_version 2.0 if [ "$1" = configure -o "$1" = reconfigure ] ; then get_config_file RUN_DAEMON ola/daemon db_input high ola/daemon || true db_go db_get ola/daemon fi exit 0 ola-0.10.9/debian/ola-rdm-tests.rdm_test_server.init0000664000175000017500000000340614376533110017315 00000000000000#!/bin/sh ### BEGIN INIT INFO # Provides: rdm_test_server # Required-Start: $remote_fs $syslog $network olad # Required-Stop: $remote_fs $syslog $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: OLA RDM Test Server # Description: Open Lighting Architecture RDM Test Server ### END INIT INFO PATH=/usr/local/bin:/bin:/usr/bin NAME=rdm_test_server.py CMD=rdm_test_server DAEMON=/usr/bin/$NAME PIDFILE=/var/run/$CMD.pid DESC="OLA RDM Test Server" USER=olad # Reads config file (will override defaults above) [ -r /etc/default/ola-rdm-tests ] && . /etc/default/ola-rdm-tests if [ "$RUN_DAEMON" = "true" ] || [ "$RUN_DAEMON" = "yes" ] ; then DAEMON_ARGS="--world-writeable" elif [ "$1" = "start" ] || [ "$1" = "stop" ] ; then echo "The init script is currently inactive;\nuse \"dpkg-reconfigure ola-rdm-tests\" to change this." >&2 fi [ -x "$DAEMON" ] || exit 0 . /lib/lsb/init-functions case "$1" in start) # master switch if [ -n "$DAEMON_ARGS" ] ; then log_daemon_msg "Starting $DESC" "$NAME" /sbin/start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE --chuid $USER --startas $DAEMON -- $DAEMON_ARGS log_end_msg $? fi ;; stop) # master switch if [ "$RUN_DAEMON" = "true" ] || [ "$RUN_DAEMON" = "yes" ] ; then log_daemon_msg "Stopping $DESC" "$NAME" /sbin/start-stop-daemon --stop --pidfile $PIDFILE --chuid $USER --retry 10 /bin/rm -f $PIDFILE log_end_msg $? fi ;; reload|force-reload|restart) $0 stop && $0 start ;; status) status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? ;; *) echo "Usage: /etc/init.d/$CMD {start|stop|reload|restart|force-reload|status}" >&2 exit 1 ;; esac exit 0 ola-0.10.9/debian/ola-rdm-tests.config0000664000175000017500000000125514376533110014411 00000000000000#!/bin/sh -e # ola-rdm-tests package configuration script conffile="/etc/default/ola-rdm-tests" get_config_file() { config_field=$1 db_field=$2 if [ -f "$conffile" ] ; then VALUE="$(grep "^[ ]*$config_field" $conffile | sed -e "s/^$config_field *= *\"\(.*\)\"/\1/g")" if [ -n "$VALUE" ] ; then db_set $db_field "$VALUE" fi fi } # Source debconf library -- we have a Depends line # to make sure it is there... . /usr/share/debconf/confmodule db_version 2.0 if [ "$1" = configure -o "$1" = reconfigure ] ; then get_config_file RUN_DAEMON ola-rdm-tests/daemon db_input high ola-rdm-tests/daemon || true db_go db_get ola-rdm-tests/daemon fi exit 0 ola-0.10.9/debian/ola-rdm-tests.postinst0000664000175000017500000000257114376533110015031 00000000000000#!/bin/sh -e # postinst script for ola-rdm-tests conffile="/etc/default/ola-rdm-tests" update_config_file() { db_field=$1 config_field=$2 RET=false db_get $db_field if [ -n "$RET" ] ; then if grep -q "^$config_field" $conffile ; then # keep any admin changes, while replacing the variable content sed "s/^[ ]*$config_field=\".*\"/$config_field=\"$RET\"/" < $conffile > $conffile.new && mv $conffile.new $conffile else echo "$config_field=\"$RET\"" >> $conffile fi fi } # Source debconf library -- we have a Depends line # to make sure it is there... . /usr/share/debconf/confmodule db_version 2.0 case "$1" in configure) if [ -f $conffile ] ; then sed -i -e 's/^[ ]*DAEMON/RUN_DAEMON/g' $conffile else cat << EOF > $conffile # Defaults for ola-rdm-tests initscript (/etc/init.d/ola-rdm-tests) # This is a POSIX shell fragment # [automatically edited by postinst, do not change line format ] # ola-rdm-tests daemon switch. If set to true, rdm_test_server.py will run. RUN_DAEMON="true" EOF fi update_config_file ola-rdm-tests/daemon RUN_DAEMON db_stop ;; abort-upgrade|abort-remove|abort-deconfigure) ;; *) echo "postinst called with unknown argument \`$1'" >&2 exit 1 ;; esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts. #DEBHELPER# exit 0 ola-0.10.9/debian/ola.docs0000664000175000017500000000001414376533110012144 00000000000000NEWS README ola-0.10.9/debian/ola-rdm-tests.bash-completion0000664000175000017500000000525614376533110016235 00000000000000# bash completion for Debian ola-rdm-tests tools # Copyright Peter Newman 2013, based on apache2 and apt-file completion #Commands #rdm_responder_test.py have rdm_responder_test.py && _rdm_responder_test.py() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--slot-count --debug --dmx-frame-rate --log --list-tests --pid-location --skip-check --tests --timestamp --no-factory-defaults --broadcast-write-delay --universe --inter-test-delay' case "$prev" in -l | --log) #Log wants a file #We're not interested in supplying opts, so set compreply and break out with a return _filedir return 0 ;; -p | --pid-location) #pid-location wants a directory #We're not interested in supplying opts, so set compreply and break out with a return _filedir -d return 0 ;; -t | --tests) #TODO: Get this working with the comma separated list of tests #We're not interested in supplying opts, so set compreply and break out with a return COMPREPLY=( $( compgen -W '$( command ${COMP_WORDS[0]} --list-tests 2>/dev/null )' -- $cur ) ) return 0; ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _rdm_responder_test.py rdm_responder_test.py #rdm_model_collector.py have rdm_model_collector.py && _rdm_model_collector.py() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--debug --pid-location --skip-queued-messages --universe' case "$prev" in -p | --pid-location) #Pid location wants a directory #We're not interested in supplying opts, so set compreply and break out with a return _filedir -d return 0 ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _rdm_model_collector.py rdm_model_collector.py #rdm_test_server.py have rdm_test_server.py && _rdm_test_server.py() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--pid-location --www-dir --log-directory --world-writeable' case "$prev" in -p | --pid-location) #pid-location wants a directory #We're not interested in supplying opts, so set compreply and break out with a return _filedir -d return 0 ;; -d | --www-dir | -l | --log-directory) #WWW dir and log dir want directories #We're not interested in supplying opts, so set compreply and break out with a return _filedir -d return 0 ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _rdm_test_server.py rdm_test_server.py ola-0.10.9/debian/ola-python.dirs0000664000175000017500000000001014376533110013470 00000000000000usr/lib ola-0.10.9/debian/ola.udev0000664000175000017500000000330114376533110012161 00000000000000# Remember to update debian/org.openlighting.ola.ola.metainfo.xml when adding new devices # udev rules for ftdi devices SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="plugdev", TAG+="uaccess" # udev rules for the anyma dmx device SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="16c0", ATTRS{idProduct}=="05dc", GROUP="plugdev", TAG+="uaccess" # udev rules for the usbdmx2 dmx device SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="0962", GROUP="plugdev", TAG+="uaccess" # udev rules for the velleman dmx device SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="10cf", ATTRS{idProduct}=="8062", GROUP="plugdev", TAG+="uaccess" # udev rules for the DMXControl Projects e.V. Nodle U1 SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="16d0", ATTRS{idProduct}=="0830", GROUP="plugdev", TAG+="uaccess" # udev rules for the Eurolite SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="04d8", ATTRS{idProduct}=="fa63", GROUP="plugdev", MODE="660", TAG+="uaccess" # udev rules file for the karate-device KERNEL=="ttyACM?", ATTRS{product}=="DMX2USB simple", SYMLINK+="kldmx0" # udev rules file for the Scanlime Fadecandy device SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="1d50", ATTRS{idProduct}=="607a", GROUP="plugdev", TAG+="uaccess" # udev rules for Ja Rule SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="aced", GROUP="plugdev", MODE="660", TAG+="uaccess" SUBSYSTEM=="usb|usb_device", ACTION=="add", ATTRS{idVendor}=="1209", ATTRS{idProduct}=="acee", GROUP="plugdev", MODE="660", TAG+="uaccess" # udev rules for SPI SUBSYSTEM=="spidev", MODE="0666" ola-0.10.9/debian/tests/0000775000175000017500000000000014376533271011756 500000000000000ola-0.10.9/debian/tests/control0000664000175000017500000000120014376533110013262 00000000000000Test-Command: olad --help Depends: ola Test-Command: ola_rdm_get --list-pids Depends: ola Test-Command: rdm_responder_test.py --help Depends: ola-rdm-tests Test-Command: set -e ; for py in $(pyversions -s 2>/dev/null) ; do cd "$ADTTMP" ; echo "Testing with $py:" ; $py -c "from ola.ClientWrapper import ClientWrapper; print(ClientWrapper)" ; done Depends: python-all, ola, ola-python Test-Command: pkg-config --cflags --libs libola Depends: libola-dev, pkg-config Test-Command: set -e; g++ -o linktest $(pkg-config --cflags --libs libola) debian/tests/hw.cc; ./linktest Depends: libola-dev, g++, pkg-config Restrictions: rw-build-tree ola-0.10.9/debian/tests/hw.cc0000664000175000017500000000044014376533110012611 00000000000000#include #include int main(void) { ola::io::LoopbackDescriptor d; ola::client::OlaClient c(&d); bool success = c.Setup(); std::cout << "Hello World!" << std::endl << "success: " << (success ? "t" : "f") << std::endl; return success ? 0 : 1; } ola-0.10.9/debian/ola.templates0000664000175000017500000000046314376533110013222 00000000000000Template: ola/daemon Type: boolean Default: false Description: Do you want to start the OLA daemon at boot time? The OLA daemon is needed to use OLA. . You have the option of starting the OLA daemon automatically on system boot. . This setting can be modified later by running 'dpkg-reconfigure ola'. ola-0.10.9/debian/source/0000775000175000017500000000000014376533271012114 500000000000000ola-0.10.9/debian/source/lintian-overrides0000664000175000017500000000065314376533110015411 00000000000000# Source for these files is all under /javascript ola source: source-is-missing olad/www/mobile.js ola source: source-is-missing olad/www/ola.js # Source for these files is all under /javascript/new-src ola source: source-is-missing olad/www/new/js/app.min.js # We don't use these ola source: source-is-missing tools/rdm/static/jquery-1.7.2.min.js ola source: source-is-missing tools/rdm/static/jquery-ui-1.8.21.custom.min.js ola-0.10.9/debian/source/format0000664000175000017500000000001414376533110013232 000000000000003.0 (quilt) ola-0.10.9/debian/source/local-options0000664000175000017500000000002414376533110014526 00000000000000single-debian-patch ola-0.10.9/debian/ola.bash-completion0000664000175000017500000005255614376533110014322 00000000000000# bash completion for Debian ola tools # Copyright Peter Newman 2013, based on apache2 and apt-file completion #General todo: change over to use _get_comp_words_by_ref instead of ${COMP_WORDS[COMP_CWORD]} #General todo: tidy up and use logic to not call _ola_list_pids or offer unnecessary options when possible #General todo: add completion for all the python examples in python/examples/ #Todo: ola_dev_info feeds into ola_usbpro, ola_e131 and ola_artnet -d , ideally filtering based on type #General functions #Martin (lots of extra pids) 4d50:ffffffff #Open Lighting (only up to two extra pids) 0081:ffffffff _ola_list_pids() { local pidstore uid if [ -n "$2" ] then pidstore="-p $2" fi if [ -n "$3" ] then uid="--uid $3" fi COMPREPLY=( $( compgen -W '$( command ${COMP_WORDS[0]} $pidstore $uid --list-pids 2>/dev/null ) $1' -- $cur ) ) } _ola_get_options_for_list_pids() { local i cword words #Fetch complete words, without splitting on :, so we get the UID as one item __reassemble_comp_words_by_ref ":" words cword #Check from 1 to count-1, ignoring first word, the command #and last, count-1, as we're looking for the option, we then check it's value for (( i=1; i<=(cword-1); i++ )) do case "${words[$i]}" in -p | --pid-location) if [ -d "${words[$i+1]}" ] then #Found an alternative pidstore, capture to pass into _ola_list_pids pidstore=${words[$i+1]} fi ;; --uid) #Found a possible UID, capture to pass into _ola_list_pids #For manufacturer specific ones uid=${words[$i+1]} ;; esac; done } _ola_list_uids() { local universe if [ -n "$1" ] then COMPREPLY=( $( compgen -W '$( command ola_rdm_discover -u $1 2>/dev/null )' -- $cur ) ) #Strip colons to fix completion with colons in __ltrim_colon_completions "$cur" fi } _ola_get_options_for_list_uids() { local i cword words #Fetch complete words, without splitting on :, so we get the UID as one item __reassemble_comp_words_by_ref ":" words cword #Check from 1 to count-1, ignoring first word, the command #and last, count-1, as we're looking for the option, we then check it's value for (( i=1; i<=(cword-1); i++ )) do case "${words[$i]}" in -u | --universe) if [ -n "${words[$i+1]}" ] then #Found a universe, capture to pass into _ola_list_pids universe=${words[$i+1]} fi ;; esac; done } _ola_list_universes() { _have ola_uni_info && COMPREPLY=( $( compgen -W '$( command ola_uni_info --list-universe-ids 2>/dev/null )' -- $cur ) ) } _ola_list_plugins() { _have ola_plugin_info && COMPREPLY=( $( compgen -W '$( command ola_plugin_info --list-plugin-ids 2>/dev/null )' -- $cur ) ) } #Commands #ola_artnet have ola_artnet && _ola_artnet() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=($( compgen -W '--device --net --long-name --name --subnet --universe' -- $cur ) ) } complete -F _ola_artnet ola_artnet #olad have olad && _olad() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--config-dir --http-data-dir --daemon --interface --log-level --http-port --rpc-port --syslog --version --no-http --no-http-quit' case "$prev" in -l | --log-level) opts='0 1 2 3 4' ;; -c | --config-dir | -d | --http-data-dir) #Both config and data dir want directories #We're not interested in supplying opts, so set compreply and break out with a return _filedir -d return 0 ;; -i | --interface) #We're not interested in supplying opts, so set compreply and break out with a return _configured_interfaces _ip_addresses return 0 ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _olad olad #ola_dev_info have ola_dev_info && _ola_dev_info() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -p | --plugin-id) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_plugins return 0 ;; esac; COMPREPLY=($( compgen -W '--plugin-id' -- $cur ) ) } complete -F _ola_dev_info ola_dev_info #ola_dmxconsole have ola_dmxconsole && _ola_dmxconsole() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; esac; COMPREPLY=($( compgen -W '--universe' -- $cur ) ) } complete -F _ola_dmxconsole ola_dmxconsole #ola_dmxmonitor have ola_dmxmonitor && _ola_dmxmonitor() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; esac; COMPREPLY=($( compgen -W '--universe' -- $cur ) ) } complete -F _ola_dmxmonitor ola_dmxmonitor #ola_e131 have ola_e131 && _ola_e131() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--device --input --port-id --preview-mode' case "$prev" in --preview-mode) opts='on off' ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _ola_e131 ola_e131 #ola_patch have ola_patch && _ola_patch() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; esac; COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=($( compgen -W '--patch --device --port --unpatch --input --universe' -- $cur ) ) } complete -F _ola_patch ola_patch #ola_plugin_info have ola_plugin_info && _ola_plugin_info() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -p | --plugin-id) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_plugins return 0 ;; esac; COMPREPLY=($( compgen -W '--list-plugin-ids --plugin-id' -- $cur ) ) } complete -F _ola_plugin_info ola_plugin_info #ola_plugin_state have ola_plugin_state && _ola_plugin_state() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -p | --plugin-id) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_plugins return 0 ;; esac; COMPREPLY=($( compgen -W '--plugin-id' -- $cur ) ) } complete -F _ola_plugin_state ola_plugin_state #ola_rdm_discover have ola_rdm_discover && _ola_rdm_discover() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; esac; COMPREPLY=($( compgen -W '--full --incremental --universe' -- $cur ) ) } complete -F _ola_rdm_discover ola_rdm_discover #ola_rdm_get #ola_rdm_set #Same command and same set of options, so use same completion _ola_rdm_getset() { local cur prev pidstore universe uid COMPREPLY=() #Fetch complete words, without splitting on :, so we get the UID as one item _get_comp_words_by_ref -n : cur prev case "$prev" in -p | --pid-location) #We're not interested in supplying opts, so set compreply and break out with a return _filedir -d return 0 ;; -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; --uid) #We're not interested in supplying opts, so set compreply and break out with a return _ola_get_options_for_list_uids _ola_list_uids "$universe" return 0 ;; esac; #Fetch and pass in the UID and alternative pidstore if set to widen the #list of PIDs offered _ola_get_options_for_list_pids #TODO: Don't bother generating list of pids if we're completing an option or it's value #Possible todo: populate UID list from ola_rdm_discover (without force options) _ola_list_pids '--sub-device --list-pids --pid-location --universe --uid' "$pidstore" "$uid" } have ola_rdm_get && complete -F _ola_rdm_getset ola_rdm_get have ola_rdm_set && complete -F _ola_rdm_getset ola_rdm_set #ola_recorder #Todo: only show additional playback options --delay --iterations when in playback have ola_recorder && _ola_recorder() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--log-level --record --playback --universes --verify --version --delay --iterations' case "$prev" in -l | --log-level) opts='0 1 2 3 4' ;; -r | --record | -p | --playback | --verify) #Record, playback and verify all want files #We're not interested in supplying opts, so set compreply and break out with a return _filedir return 0 ;; -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _ola_recorder ola_recorder #ola_set_dmx have ola_set_dmx && _ola_set_dmx() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; esac; COMPREPLY=($( compgen -W '--universe --dmx' -- $cur ) ) } complete -F _ola_set_dmx ola_set_dmx #ola_set_priority have ola_set_priority && _ola_set_priority() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=($( compgen -W '--device --input --override --port' -- $cur ) ) } complete -F _ola_set_priority ola_set_priority #ola_streaming_client have ola_streaming_client && _ola_streaming_client() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; esac; COMPREPLY=($( compgen -W '--universe --dmx --version' -- $cur ) ) } complete -F _ola_streaming_client ola_streaming_client #ola_timecode have ola_timecode && _ola_timecode() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--format' case "$prev" in -f | --format) opts='FILM EBU DF SMPTE' ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _ola_timecode ola_timecode #ola_trigger have ola_trigger && _ola_trigger() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--log-level --offset --universe' if [[ "$prev" == -* ]]; then #An option, check if it's a special one case "$prev" in -l | --log-level) #We're not interested in supplying further opts, so set compreply and break out with a return COMPREPLY=($( compgen -W '0 1 2 3 4' -- $cur ) ) return 0 opts='0 1 2 3 4' ;; esac; else #Could be a conf file or an option, so add conf files _filedir conf fi #Append to possible existing list of options COMPREPLY+=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _ola_trigger ola_trigger #ola_uni_info #No options apart from help have ola_uni_info && _ola_uni_info() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=($( compgen -W '--list-universe-ids' -- $cur ) ) } complete -F _ola_uni_info ola_uni_info #ola_uni_merge have ola_uni_merge && _ola_uni_merge() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; esac; COMPREPLY=($( compgen -W '--ltp --universe' -- $cur ) ) } complete -F _ola_uni_merge ola_uni_merge #ola_uni_name have ola_uni_name && _ola_uni_name() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; esac; COMPREPLY=($( compgen -W '--name --universe' -- $cur ) ) } complete -F _ola_uni_name ola_uni_name #ola_uni_stats have ola_uni_stats && _ola_uni_stats() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--log-level' case "$prev" in -l | --log-level) opts='0 1 2 3 4' ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _ola_uni_stats ola_uni_stats #ola_usbpro have ola_usbpro && _ola_usbpro() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=($( compgen -W '--assignments --brk --device --get-params --mab --port --rate --serial' -- $cur ) ) } complete -F _ola_usbpro ola_usbpro #rdmpro_sniffer have rdmpro_sniffer && _rdmpro_sniffer() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--display-asc --display-dmx --dmx-slot-limit --log-level --parse-raw-dump --full-rdm --timestamp --version --write-raw-dump' case "$prev" in -l | --log-level) opts='0 1 2 3 4' ;; -w | --write-raw-dump | -p | --parse-raw-dump) #Both write and parse want files #We're not interested in supplying opts, so set compreply and break out with a return _filedir return 0 ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _rdmpro_sniffer rdmpro_sniffer ############################################################################### # The below completions are all for commands that are still in development # # So we don't check if the command exists/is installed, we just offer options # ############################################################################### #e131_transmit_test #have e131_transmit_test && _e131_transmit_test() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=($( compgen -W '--interactive' -- $cur ) ) } complete -F _e131_transmit_test e131_transmit_test #e131_loadtest #have e131_loadtest && _e131_loadtest() { local cur COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} COMPREPLY=($( compgen -W '--fps --universes' -- $cur ) ) } complete -F _e131_loadtest e131_loadtest #slp_client #have slp_client && _slp_client() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--log-level --scopes --lifetime' #TODO: Check if scopes are listed anywhere #TODO: Get/output a list of command-and-arguments and complete them case "$prev" in -l | --log-level) opts='0 1 2 3 4' ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _slp_client slp_client #slp_server #have slp_server && _slp_server() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--ip --log-level --slp-port --no-http --no-da --setuid --setgid --scopes --services' #TODO: Check if scopes are listed anywhere case "$prev" in -l | --log-level) opts='0 1 2 3 4' ;; --setuid) #We're not interested in supplying opts, so set compreply and break out with a return _uids COMPREPLY+=( $( compgen -u -- "$cur" ) ) return 0 ;; --setgid) #We're not interested in supplying opts, so set compreply and break out with a return _gids COMPREPLY+=( $( compgen -g -- "$cur" ) ) return 0 ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _slp_server slp_server #e133_controller #have e133_controller && _e133_controller() { local cur prev opts pidstore uid COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--endpoint --target --ip --log-level --pid-location --list-pids --set --uid' #Because of the way this completion is working out, set COMPREPLY in each case and don't do anything centrally case "$prev" in -l | --log-level) COMPREPLY=($( compgen -W "0 1 2 3 4" -- $cur ) ) ;; -p | --pid-location) _filedir -d ;; -i | --ip) _ip_addresses ;; *) #TODO: This should probably be an if statement, as we don't really care about prev #TODO: Don't bother generating list of pids if we're completing an option or it's value #Fetch and pass in the UID and alternative pidstore if set to widen the #list of PIDs offered _ola_get_options_for_list_pids _ola_list_pids "$opts" "$pidstore" "$uid" esac; return 0 } complete -F _e133_controller e133_controller #e133_monitor #have e133_monitor && _e133_monitor() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--targets --log-level --pid-location' #TODO: Auto complete PIDs, probably add an option to list them too #TODO: Could autocomplete targets if it could map hosts to IPs or handle hostnames case "$prev" in -l | --log-level) opts='0 1 2 3 4' ;; -p | --pid-location) #We're not interested in supplying opts, so set compreply and break out with a return _filedir -d return 0 ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _e133_monitor e133_monitor #e133_receiver #have e133_receiver && _e133_receiver() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--ip --log-level --timeout --universe --uid' case "$prev" in -l | --log-level) opts='0 1 2 3 4' ;; -i | --ip) #We're not interested in supplying opts, so set compreply and break out with a return _ip_addresses return 0 ;; -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _e133_receiver e133_receiver #slp_locate #have slp_locate && _slp_locate() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--log-level --refresh' case "$prev" in -l | --log-level) opts='0 1 2 3 4' ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _slp_locate slp_locate #slp_register #have slp_register && _slp_register() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--log-level --timeout --openslp' #TODO: Ensure binary reports if --openslp option is used without it being installed case "$prev" in -l | --log-level) opts='0 1 2 3 4' ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _slp_register slp_register #slp_sa_test #have slp_sa_test && _slp_sa_test() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--log-level --timeout --list-tests --tests' case "$prev" in -l | --log-level) opts='0 1 2 3 4' ;; -t | --tests) #TODO: Check if this needs to work with a comma separated list of tests opts="$( command ${COMP_WORDS[0]} --list-tests 2>/dev/null )" ;; esac; COMPREPLY=($( compgen -W "$opts" -- $cur ) ) return 0 } complete -F _slp_sa_test slp_sa_test #usbpro_firmware #have usbpro_firmware && _usbpro_firmware() { local cur prev opts COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} opts='--device --firmware --log-level' #Because of the way this completion is working out, set COMPREPLY in each case and don't do anything centrally case "$prev" in -l | --log-level) COMPREPLY=($( compgen -W "0 1 2 3 4" -- $cur ) ) ;; -d | --device) COMPREPLY=($( compgen -G "/dev/ttyUSB*" -- $cur ) ) ;; -f | --firmware) _filedir bin ;; *) #TODO: This should probably be an if statement, as we don't really care about prev COMPREPLY=($( compgen -W "$opts" -- $cur ) ) ;; esac; return 0 } complete -F _usbpro_firmware usbpro_firmware #ola_throughput #have ola_throughput && _ola_throughput() { local cur prev COMPREPLY=() cur=${COMP_WORDS[COMP_CWORD]} prev=${COMP_WORDS[COMP_CWORD-1]} case "$prev" in -u | --universe) #We're not interested in supplying opts, so set compreply and break out with a return _ola_list_universes return 0 ;; esac; COMPREPLY=($( compgen -W '--dmx --sleep --universe' -- $cur ) ) } complete -F _ola_throughput ola_throughput ola-0.10.9/debian/changelog0000664000175000017500000001342114376533110012377 00000000000000ola (0.10.9-1) unstable; urgency=low * New upstream release -- Peter Newman Sun, 26 Feb 2023 01:15:00 +0000 ola (0.10.8-1) unstable; urgency=low * New upstream release -- Peter Newman Fri, 22 Nov 2020 10:54:00 +0100 ola (0.10.7-1) unstable; urgency=low * New upstream release -- Peter Newman Fri, 13 Jul 2018 10:56:00 +0100 ola (0.10.6-1) unstable; urgency=low * New upstream release -- Simon Newton Sat, 07 Jan 2018 06:27:00 +0000 ola (0.10.5-1) unstable; urgency=low * New upstream release -- Simon Newton Mon, 17 Jul 2017 23:58:00 +0100 ola (0.10.4-1) unstable; urgency=low * New upstream release -- Simon Newton Sat, 21 May 2017 01:03:00 +0100 ola (0.10.3-1) unstable; urgency=low * New upstream release -- Simon Newton Tue, 06 Dec 2016 00:46:00 +0000 ola (0.10.2-1) unstable; urgency=low * New upstream release -- Simon Newton Sat, 21 May 2016 22:27:00 +0100 ola (0.10.1-1) unstable; urgency=low * New upstream release -- Simon Newton Sun, 29 Feb 2016 07:51:00 -0700 ola (0.10.0-1) unstable; urgency=low * New upstream release -- Simon Newton Sun, 03 Jan 2016 15:34:49 -0700 ola (0.9.8-1) unstable; urgency=low * New upstream release -- Simon Newton Wed, 30 Sep 2015 19:28:21 -0700 ola (0.9.7-1) unstable; urgency=low * New upstream release -- Simon Newton Mon, 13 Jul 2015 09:29:32 -0700 ola (0.9.6-1) unstable; urgency=low * New upstream release -- Simon Newton Tue, 30 Jun 2015 15:08:57 -0700 ola (0.9.5-1) unstable; urgency=low * New upstream release * Update udev rules -- RenZO Sat, 28 Feb 2015 19:22:09 +0100 ola (0.9.4-1) unstable; urgency=low * New upstream release -- RenZO Sat, 24 Jan 2015 18:24:52 +0100 ola (0.9.3-1) unstable; urgency=low * New upstream release -- RenZO Sun, 16 Nov 2014 00:16:27 +0100 ola (0.9.2-1) unstable; urgency=low * New upstream release * Add ola_usbpro program * Add usbpro_firmware program -- RenZO Wed, 20 Aug 2014 14:56:45 +0200 ola (0.9.1-1) unstable; urgency=low * New upstream release -- RenZO Sat, 21 Jun 2014 21:35:40 +0200 ola (0.9.0-1) unstable; urgency=low * New upstream release -- RenZO Sat, 01 Mar 2014 23:46:42 +0100 ola (0.8.33-2) unstable; urgency=low * Remove logic_rdm_sniffer since it causes debuild failures. -- Simon Newton Tue, 17 Dec 2013 18:25:55 -0800 ola (0.8.33-1) unstable; urgency=low * New upstream release -- RenZO Sat, 19 Oct 2013 22:48:32 +0200 ola (0.8.32-1) unstable; urgency=low * New upstream release -- RenZO Sun, 29 Sep 2013 17:15:41 +0200 ola (0.8.31-3) unstable; urgency=low * New ola-logic-sniffer package -- RenZO Mon, 19 Aug 2013 00:16:57 +0200 ola (0.8.31-2) unstable; urgency=low * Add logic_rdm_sniffer (requires libSaleaeDevice.so from Saleae Device SDK) -- RenZO Sat, 17 Aug 2013 15:33:24 +0200 ola (0.8.31-1) unstable; urgency=low * New upstream release -- RenZO Mon, 12 Aug 2013 15:13:53 +0200 ola (0.8.30-1) unstable; urgency=low * New upstream release -- RenZO Sun, 16 Jun 2013 17:31:13 +0200 ola (0.8.29-1) unstable; urgency=low * New upstream release -- RenZO Wed, 29 May 2013 00:05:25 +0200 ola (0.8.28-1) unstable; urgency=low * New upstream release -- RenZO Sat, 20 Apr 2013 23:59:52 +0200 ola (0.8.27-1) unstable; urgency=low * New upstream release * Display a message if init scripts are disabled -- RenZO Sat, 02 Mar 2013 02:12:02 +0100 ola (0.8.26-1) unstable; urgency=low * New upstream release -- RenZO Sun, 11 Nov 2012 03:58:40 +0100 ola (0.8.25-1) unstable; urgency=low * New upstream release * Update the init script names -- RenZO Mon, 08 Oct 2012 01:34:31 +0200 ola (0.8.24-1) unstable; urgency=low * New upstream release * Use a pidfile in the init script * Add a init script for the RDM Test Server -- RenZO Tue, 02 Oct 2012 16:04:18 +0200 ola (0.8.23-1) unstable; urgency=low * New upstream release * New rdm-tests package * Add the init script * Add udev rules * Add docs -- RenZO Sun, 09 Sep 2012 04:03:59 +0200 ola (0.8.22-1) unstable; urgency=low * New upstream release -- RenZO Thu, 09 Aug 2012 16:09:30 +0200 ola (0.8.21-2) unstable; urgency=low * Move RDM Tests in python package * Support both python 2.6 and 2.7 -- RenZO Sat, 28 Jul 2012 00:26:44 +0200 ola (0.8.21-1) unstable; urgency=low * New upstream release -- RenZO Wed, 18 Jul 2012 16:14:55 +0200 ola (0.8.18-1) unstable; urgency=low * New upstream release * Add missing /usr/share/ola/pids/pids.proto -- RenZO Fri, 02 Mar 2012 00:27:44 +0100 ola (0.8.17-1) unstable; urgency=low * New upstream release -- RenZO Sat, 04 Feb 2012 11:11:22 +0100 ola (0.8.15-1) unstable; urgency=low * New upstream release -- RenZO Sun, 18 Dec 2011 16:05:33 +0100 ola (0.8.14-1) unstable; urgency=low * Initial release from RenZO -- RenZO Sat, 05 Nov 2011 13:01:33 +0100 ola (0.7.3-1) unstable; urgency=low * Initial release -- Simon Newton Sun, 16 May 2010 04:03:33 +0000 ola-0.10.9/debian/compat0000664000175000017500000000000214376533110011722 000000000000009 ola-0.10.9/debian/ola.olad.init0000664000175000017500000000341014376533110013100 00000000000000#!/bin/sh ### BEGIN INIT INFO # Provides: olad # Required-Start: $remote_fs $syslog $network # Required-Stop: $remote_fs $syslog $network # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 # Short-Description: OLA daemon # Description: Open Lighting Architecture daemon ### END INIT INFO PATH=/usr/local/bin:/bin:/usr/bin NAME=olad DAEMON=/usr/bin/$NAME PIDFILE=/var/run/$NAME.pid DESC="OLA daemon" USER=olad LOG_LEVEL=3 CONFIG_DIR="/var/lib/ola/conf" # Reads config file (will override defaults above) [ -r /etc/default/ola ] && . /etc/default/ola if [ "$RUN_DAEMON" = "true" ] || [ "$RUN_DAEMON" = "yes" ] ; then DAEMON_ARGS="--syslog --log-level $LOG_LEVEL --config-dir $CONFIG_DIR" elif [ "$1" = "start" ] || [ "$1" = "stop" ] ; then echo "The init script is currently inactive;\nuse \"dpkg-reconfigure ola\" to change this." >&2 fi [ -x "$DAEMON" ] || exit 0 . /lib/lsb/init-functions case "$1" in start) # master switch if [ -n "$DAEMON_ARGS" ] ; then log_daemon_msg "Starting $DESC" "$NAME" /sbin/start-stop-daemon --start --background --make-pidfile --pidfile $PIDFILE --umask 0002 --chuid $USER --exec $DAEMON -- $DAEMON_ARGS log_end_msg $? fi ;; stop) # master switch if [ "$RUN_DAEMON" = "true" ] || [ "$RUN_DAEMON" = "yes" ] ; then log_daemon_msg "Stopping $DESC" "$NAME" /sbin/start-stop-daemon --stop --pidfile $PIDFILE --chuid $USER --exec $DAEMON --retry 10 /bin/rm -f $PIDFILE log_end_msg $? fi ;; reload|force-reload|restart) $0 stop && $0 start ;; status) status_of_proc -p $PIDFILE $DAEMON $NAME && exit 0 || exit $? ;; *) echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart|force-reload|status}" >&2 exit 1 ;; esac exit 0 ola-0.10.9/debian/copyright0000664000175000017500000000571314376533110012465 00000000000000This package was debianized by Simon Newton on Sun, 16 May 2010 04:03:33 +0000. It was downloaded from https://github.com/OpenLightingProject/ola Upstream Author: Simon Newton Copyright: Copyright (C) 2005 Simon Newton License: The files required for libola and libolacommon are available under the following license: /* * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public * License as published by the Free Software Foundation; either * version 2.1 of the License, or (at your option) any later version. * * This library is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU * Lesser General Public License for more details. * * You should have received a copy of the GNU Lesser General Public * License along with this library; if not, write to the Free Software * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA - USA */ On Debian GNU/Linux systems, the text of the LGPL can be found under '/usr/share/common-licenses/LGPL-2.1' The files under the java directory are licensed under the following license: /*********************************************************************** * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with * the License. You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on * an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either * express or implied. See the License for the specific language governing * permissions and limitations under the License. * *************************************************************************/ On Debian GNU/Linux, the text of the Apache 2 license can be found in '/usr/share/common-licenses/Apache-2.0' Everything else is licensed under the following license: You are free to distribute this software under the terms of the GNU General Public License, either version 2 of the License, or (at your option) any later version. This package is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 - USA The Debian packaging is (C) 2010, Simon Newton and is also licensed under the GPL. On Debian GNU/Linux, the full text of the GPL can be found in '/usr/share/common-licenses/GPL-2'. ola-0.10.9/debian/rules0000775000175000017500000000141014376533110011600 00000000000000#!/usr/bin/make -f # -*- makefile -*- # Sample debian/rules that uses debhelper. # This file was originally written by Joey Hess and Craig Small. # As a special exception, when this file is copied by dh-make into a # dh-make output file, you may use that output file without restriction. # This special exception was added by Craig Small in version 0.37 of dh-make. # Uncomment this to turn on verbose mode. #export DH_VERBOSE=1 export VERBOSE=1 %: dh $@ --parallel --with autotools_dev,autoreconf,bash_completion,python2 override_dh_auto_configure: dh_auto_configure -- --enable-python-libs --enable-rdm-tests override_dh_installinit: dh_installinit -p ola --name=olad dh_installinit -p ola-rdm-tests --name=rdm_test_server override_dh_makeshlibs: dh_makeshlibs -V ola-0.10.9/debian/Makefile.mk0000664000175000017500000000175614376533110012603 00000000000000# Debian build files EXTRA_DIST += \ debian/changelog \ debian/compat \ debian/control \ debian/copyright \ debian/libola-dev.dirs \ debian/libola-dev.install \ debian/libola1.install \ debian/ola-python.dirs \ debian/ola-python.install \ debian/ola-rdm-tests.bash-completion \ debian/ola-rdm-tests.config \ debian/ola-rdm-tests.dirs \ debian/ola-rdm-tests.install \ debian/ola-rdm-tests.postinst \ debian/ola-rdm-tests.rdm_test_server.init \ debian/ola-rdm-tests.templates \ debian/ola.bash-completion \ debian/ola.config \ debian/ola.dirs \ debian/ola.docs \ debian/ola.install \ debian/ola.olad.init \ debian/ola.postinst \ debian/ola.templates \ debian/ola.udev \ debian/org.openlighting.ola.ola.metainfo.xml \ debian/rules \ debian/source/format \ debian/source/lintian-overrides \ debian/source/local-options \ debian/tests/control \ debian/tests/hw.cc \ debian/watch ola-0.10.9/debian/ola-rdm-tests.templates0000664000175000017500000000056214376533110015142 00000000000000Template: ola-rdm-tests/daemon Type: boolean Default: false Description: Do you want to start the OLA RDM Test Server at boot time? The OLA RDM Test Server is needed to run RDM Responder Tests. . You have the option of starting the OLA RDM Test Server automatically on system boot. . This setting can be modified later by running 'dpkg-reconfigure ola-rdm-tests'. ola-0.10.9/debian/ola.dirs0000664000175000017500000000006614376533110012164 00000000000000usr/bin usr/lib usr/share/olad/www usr/share/ola/pids ola-0.10.9/debian/org.openlighting.ola.ola.metainfo.xml0000664000175000017500000000360414376533110017653 00000000000000 org.openlighting.ola.ola MIT ola Open Lighting Project Interface between DMX protocols via USB, network and more

The DMX512 standard for Digital MultipleX is used for digital communication networks commonly used to control stage lighting and effects.

The Open Lighting Architecture (OLA) provides a plugin framework for distributing DMX512 control signals.

https://www.openlighting.org/ola/ https://github.com/openlightingproject/ola/issues olad http://localhost:9090/ lkmodule:dmx_usb usb:v0403p6001d* usb:v16C0p05DCd* usb:v0962p* usb:v10CFp8062d* usb:v16D0p0830d* usb:v04D8pFA63d* usb:v1D50p607Ad* usb:v109pACEDd* usb:v109pACEEd* lkmodule:spidev lkmodule:dmxi2c lkmodule:okdmx lkmodule:dmxsoundlight
ola-0.10.9/debian/ola-rdm-tests.dirs0000664000175000017500000000003214376533110014075 00000000000000usr/bin usr/lib usr/share ola-0.10.9/debian/libola-dev.dirs0000664000175000017500000000002414376533110013421 00000000000000usr/lib usr/include ola-0.10.9/configure.ac0000664000175000017500000011005014376533110011565 00000000000000# -*- Autoconf -*- # Process this file with autoconf to produce a configure script. AC_PREREQ(2.57) m4_include([config/ola_version.m4]) AC_INIT([OLA], [ola_version], [open-lighting@googlegroups.com]) AC_CONFIG_SRCDIR([libola.pc.in]) AC_CONFIG_AUX_DIR([config]) AC_SUBST([ac_aux_dir]) AC_CONFIG_HEADERS([config.h]) AC_CONFIG_MACRO_DIR([config]) # Make us require Automake 1.11.1 AM_INIT_AUTOMAKE([1.11.1 subdir-objects]) # OLA version variables AC_SUBST([ola_major_version]) OLA_MAJOR_VERSION=ola_major_version AC_SUBST(OLA_MAJOR_VERSION) AC_SUBST([ola_minor_version]) OLA_MINOR_VERSION=ola_minor_version AC_SUBST(OLA_MINOR_VERSION) AC_SUBST([ola_revision_version]) OLA_REVISION_VERSION=ola_revision_version AC_SUBST(OLA_REVISION_VERSION) # Checks for programs. AC_LANG([C++]) AC_PROG_CXX AC_PROG_AWK AC_PROG_CC AC_PROG_CPP AC_PROG_INSTALL AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_MKDIR_P # check if the compiler supports -std=gnu++98 AC_MSG_CHECKING(for -std=gnu++98 support) old_cxxflags=$CXXFLAGS CXXFLAGS="${CXXFLAGS} -std=gnu++98 -Wall -Werror" AC_CACHE_VAL(ac_cv_gnu_plus_plus_98, AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([], [])], [ac_cv_gnu_plus_plus_98=yes], [ac_cv_gnu_plus_plus_98=no]) ) CXXFLAGS=$old_cxxflags AC_MSG_RESULT($ac_cv_gnu_plus_plus_98) AM_CONDITIONAL([SUPPORTS_GNU_PLUS_PLUS_98], [test "x$ac_cv_gnu_plus_plus_98" = xyes]) # check if the compiler supports -std=gnu++11 AC_MSG_CHECKING(for -std=gnu++11 support) old_cxxflags=$CXXFLAGS CXXFLAGS="${CXXFLAGS} -std=gnu++11 -Wall -Werror" AC_CACHE_VAL(ac_cv_gnu_plus_plus_11, AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([], [])], [ac_cv_gnu_plus_plus_11=yes], [ac_cv_gnu_plus_plus_11=no]) ) CXXFLAGS=$old_cxxflags AC_MSG_RESULT($ac_cv_gnu_plus_plus_11) AM_CONDITIONAL([SUPPORTS_GNU_PLUS_PLUS_11], [test "x$ac_cv_gnu_plus_plus_11" = xyes]) # This checks whether random needs gnu++11 or not, it doesn't set HAVE_RANDOM # (as it's using AC_CHECK_HEADER not HEADERS), we do that later as normal # We don't pass the compiler flag to the preprocessor (CPPFLAGS) because that # variable is used by the C preprocessor too, and some of the pthread checks # test for C code, which complains it doesn't understand gnu++. We may # therefore generate some warnings in configure, but it should all work! ac_cv_header_random_98="no" ac_cv_header_random_11="no" AC_MSG_NOTICE([checking for random gnu++98 compatibility]) old_cxxflags=$CXXFLAGS CXXFLAGS="${CXXFLAGS} -std=gnu++98 -Wall -Werror" # Manually purge the cache AS_UNSET([ac_cv_header_random]) AC_CHECK_HEADER( [random], [ac_cv_header_random_98="yes"], [ac_cv_header_random_98="no"]) # Manually purge the cache AS_UNSET([ac_cv_header_random]) CXXFLAGS=$old_cxxflags AS_IF([test "x$ac_cv_gnu_plus_plus_11" = xyes], [AC_MSG_NOTICE([checking for random gnu++11 compatibility]) old_cxxflags=$CXXFLAGS CXXFLAGS="${CXXFLAGS} -std=gnu++11 -Wall -Werror" # Manually purge the cache AS_UNSET([ac_cv_header_random]) AC_CHECK_HEADER( [random], [ac_cv_header_random_11=yes], [ac_cv_header_random_11=no]) # Manually purge the cache AS_UNSET([ac_cv_header_random]) CXXFLAGS=$old_cxxflags]) # force us into gnu++98 mode if necessary # If gnu++11 and gnu++98 then # If random works with gnu++98 # If protobuf < 3.6 # If no unit tests, force to gnu++98 # Else we have unit tests # If cppunit < 1.14.0, force to gnu++98 # Else turn off deprecation messages for std::auto_ptr and run gnu++11 # Else assume we have protobuf >= 3.6 (later checks will confirm that for certain), turn off deprecation messages for std::auto_ptr and run gnu++11 # Else turn off deprecation messages for std::auto_ptr and run gnu++11 require_gnu_plus_plus_11="no" AS_IF([test "x$ac_cv_gnu_plus_plus_11" = xyes], [AS_IF([test "x$ac_cv_gnu_plus_plus_98" = xyes], [AS_IF([test "x$ac_cv_header_random_98" = xyes], [PKG_CHECK_MODULES([PROTOBUF1], [protobuf < 3.6], [AS_IF([test "x$enable_unittests" = xno], [CXXFLAGS="$CXXFLAGS -std=gnu++98"], [PKG_CHECK_MODULES([CPPUNIT1], [cppunit < 1.14.0], [CXXFLAGS="$CXXFLAGS -std=gnu++98"], [PKG_CHECK_MODULES([CPPUNIT2], [cppunit >= 1.14.0], [require_gnu_plus_plus_11="yes"], [AC_MSG_WARN([OLA requires std::auto_ptr support.])]) ]) ]) ], [require_gnu_plus_plus_11="yes"]) ], [require_gnu_plus_plus_11="yes"]) ]) ]) AS_IF([test "x$require_gnu_plus_plus_11" = xyes], [CXXFLAGS="$CXXFLAGS -std=gnu++11"]) AM_CONDITIONAL([GNU_PLUS_PLUS_11_DEPRECATIONS], [test "x$require_gnu_plus_plus_11" = xyes]) # Checks for header files. AC_HEADER_DIRENT AC_HEADER_RESOLV AC_HEADER_STDC # Required headers (we cannot work without these) AC_CHECK_HEADERS([errno.h],[],[AC_MSG_ERROR([Missing a required header])]) # Other headers (we can work without these, but may need to modify things slightly) AC_CHECK_HEADERS([arpa/inet.h bits/sockaddr.h fcntl.h float.h limits.h \ malloc.h netinet/in.h stdint.h stdlib.h string.h strings.h \ sys/file.h sys/ioctl.h sys/socket.h sys/time.h sys/timeb.h \ syslog.h termios.h unistd.h]) AC_CHECK_HEADERS([asm/termbits.h asm/termios.h assert.h dlfcn.h endian.h \ execinfo.h linux/if_packet.h math.h net/ethernet.h \ stropts.h sys/ioctl.h sys/param.h sys/types.h sys/uio.h \ sysexits.h]) AC_CHECK_HEADERS([winsock2.h winerror.h]) AC_CHECK_HEADERS([random]) # This needs stuff in sys/param.h on OpenBSD AC_CHECK_HEADERS([sys/sysctl.h], [], [], [[#ifdef HAVE_SYS_PARAM_H #include #endif ]]) # These all need stuff in sys/types.h and sys/socket.h on FreeBSD/OpenBSD # OpenBSD is fussy about the ordering AC_CHECK_HEADERS([net/if.h net/if_arp.h net/route.h], [], [], [[#ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif ]]) # This needs stuff in net/if.h on NetBSD AC_CHECK_HEADERS([net/if_ether.h], [], [], [[#ifdef HAVE_NET_IF_H #include #endif ]]) # This needs stuff in lots of headers on OpenBSD AC_CHECK_HEADERS([netinet/if_ether.h], [], [], [[#ifdef HAVE_SYS_TYPES_H #include #endif #ifdef HAVE_SYS_SOCKET_H #include #endif #ifdef HAVE_NET_IF_H #include #endif #ifdef HAVE_NET_IF_ARP_H #include #endif #ifdef HAVE_ARPA_INET_H #include #endif ]]) # These both need sa_family_t from bits/sockaddr.h AC_CHECK_HEADERS([linux/netlink.h linux/rtnetlink.h], [], [], [[#ifdef HAVE_BITS_SOCKADDR_H #include #endif ]]) # Checks for typedefs, structures, and compiler characteristics. AC_HEADER_STDBOOL AC_TYPE_UID_T AC_C_INLINE AC_TYPE_INT16_T AC_TYPE_INT32_T AC_TYPE_INT64_T AC_TYPE_INT8_T AC_TYPE_PID_T AC_C_RESTRICT AC_TYPE_SIZE_T AC_TYPE_SSIZE_T AC_TYPE_UINT16_T AC_TYPE_UINT32_T AC_TYPE_UINT64_T AC_TYPE_UINT8_T AC_CXX_STL_HASH # hash_map # Checks for library functions. AC_FUNC_FORK AC_FUNC_MALLOC AC_FUNC_REALLOC AC_FUNC_MEMCMP AC_FUNC_SELECT_ARGTYPES AC_FUNC_STAT AC_FUNC_CLOSEDIR_VOID AC_FUNC_VPRINTF AC_CHECK_FUNCS([bzero gettimeofday memmove memset mkdir strdup strrchr \ if_nametoindex inet_ntoa inet_ntop inet_aton inet_pton select \ socket strerror getifaddrs getloadavg getpwnam_r getpwuid_r \ getgrnam_r getgrgid_r secure_getenv clock_gettime]) LT_INIT([win32-dll]) # Decide if we're building on Windows early on. AM_CONDITIONAL([USING_WIN32], [test "x$host_os" = xmingw32]) have_not_win32="yes" if test "x$host_os" = xmingw32; then have_not_win32="no" fi # Epoll AX_HAVE_EPOLL( [AC_DEFINE(HAVE_EPOLL, 1, [Defined if epoll exists])], []) AM_CONDITIONAL(HAVE_EPOLL, test "${ax_cv_have_epoll}" = "yes") # kqueue AC_CHECK_FUNCS([kqueue]) AM_CONDITIONAL(HAVE_KQUEUE, test "${ac_cv_func_kqueue}" = "yes") # check if the compiler supports -rdynamic AC_MSG_CHECKING(for -rdynamic support) old_cppflags=$CPPFLAGS CPPFLAGS="${CPPFLAGS} -rdynamic -Wall -Werror" AC_CACHE_VAL(ac_cv_rdynamic, AC_COMPILE_IFELSE( [AC_LANG_PROGRAM([], [])], [ac_cv_rdynamic=yes], [ac_cv_rdynamic=no]) ) CPPFLAGS=$old_cppflags AC_MSG_RESULT($ac_cv_rdynamic) AM_CONDITIONAL([SUPPORTS_RDYNAMIC], [test "x$ac_cv_rdynamic" = xyes]) # check for ipv6 support - taken from unp AC_MSG_CHECKING(for IPv6 support) AC_CACHE_VAL(ac_cv_ipv6, AC_RUN_IFELSE( [AC_LANG_PROGRAM([[#include #include #include #include ]],[[ /* Make sure the definitions for AF_INET6 and struct sockaddr_in6 * are defined, and that we can actually create an IPv6 TCP socket. */ main() { int fd; struct sockaddr_in6 foo; fd = socket(AF_INET6, SOCK_STREAM, 0); exit(fd >= 0 ? 0 : 1); } ]])], [ac_cv_ipv6=yes], [ac_cv_ipv6=no], [ac_cv_ipv6=no]) ) AC_MSG_RESULT($ac_cv_ipv6) AS_IF([test "x$ac_cv_ipv6" = xyes], [AC_DEFINE([IPV6], [1], [Define to 1 if the system supports IPv6])]) # Check if sockaddr{} has sa_len member. AC_CHECK_MEMBER( [struct sockaddr.sa_len], AC_DEFINE([HAVE_SOCKADDR_SA_LEN], [1], [Define if socket address structures have length fields]), , [#include #include ]) AC_CHECK_MEMBER( struct sockaddr_dl.sdl_family, AC_DEFINE([HAVE_SOCKADDR_DL_STRUCT], [1], [define if we have sockaddr_dl]), , [#include #include ]) # check for time_t and suseconds_t AC_CHECK_TYPE(time_t, AC_DEFINE([HAVE_TIME_T], [1], [define if we have time_t]), , [#include ]) AC_CHECK_TYPE(suseconds_t, AC_DEFINE([HAVE_SUSECONDS_T], [1], [define if we have suseconds_t]), , [#include ]) # check for SO_NOSIGPIPE or MSG_NOSIGNAL AC_CHECK_DECLS(MSG_NOSIGNAL, , have_msg_no_signal=no, [#include #include ]) AC_CHECK_DECLS(SO_NOSIGPIPE, , have_so_no_pipe=no, [#include #include ]) AC_CHECK_DECLS(PF_ROUTE, , , [#include #include ]) AC_CHECK_DECLS(NET_RT_DUMP, , , [#include #include ]) AC_CHECK_DECLS(RLIMIT_RTPRIO, , , [#include ]) AC_CHECK_DECLS(RLIMIT_RTTIME, , , [#include ]) AC_CHECK_DECLS(SO_REUSEADDR, , , [#include #include ]) AC_CHECK_DECLS(SO_REUSEPORT, , , [#include #include ]) if test -z "${USING_WIN32_FALSE}" && test "${have_msg_no_signal}" = "no" && \ test "${have_so_no_pipe}" = "no"; then AC_MSG_ERROR([Your system needs either MSG_NOSIGNAL or SO_NOSIGPIPE]) fi AC_CHECK_TYPE(termios2, AC_DEFINE([HAVE_TERMIOS2], [1], [define if we have termios2]), , [#include ]) # Headers. ##################################################### AC_CHECK_HEADER([linux/spi/spidev.h], [have_spi="yes"], [have_spi="no"]) # Programs. ##################################################### # bison BISON="" AC_CHECK_PROG(BISON, [bison -V], bison) AS_IF([test "x$BISON" != xbison], [AC_MSG_ERROR([bison not found, please install it])]) AC_SUBST(BISON) # lex AC_PROG_LEX AS_IF([test "x$LEX" = "x:"], [AC_MSG_ERROR([lex not found, please install flex or lex])]) # pkg-config PKG_PROG_PKG_CONFIG AS_IF([test -z "$PKG_CONFIG"], [AC_MSG_ERROR([Missing pkg-config, please install it])]) # Libraries. ##################################################### # dlopen AC_SEARCH_LIBS([dlopen], [dl], [have_dlopen="yes"]) AM_CONDITIONAL([HAVE_DLOPEN], [test "x$have_dlopen" = xyes]) # dmx4linux have_dmx4linux="no" AC_CHECK_LIB(dmx4linux, DMXdev, [have_dmx4linux="yes"]) AC_CHECK_HEADER([dmx/dmxioctl.h], [], [have_dmx4linux="no"]) AS_IF([test "x$have_dmx4linux" = xyes], [AC_DEFINE([HAVE_DMX4LINUX], [1], [define if dmx4linux is installed])]) # librt - may be separate or part of libc AC_SEARCH_LIBS([clock_gettime], [rt]) # libexecinfo # FreeBSD required -lexecinfo to call backtrace - checking for presence of # header execinfo.h isn't enough AC_CHECK_LIB([execinfo], [backtrace], [use_lexecinfo="yes"]) # TODO(Peter): This should really be AC_COMPILE_IFELSE and AC_LANG_PROGRAM case "${host_os}" in *freebsd* | *netbsd* | *dragonfly*) LIBS="$LIBS -lexecinfo" ;; esac # libftd2xx (for now this is intentionally disabled, TODO) have_libftd2xx="no" AM_CONDITIONAL([HAVE_LIBFTD2XX], [test "x$have_libftd2xx" = xyes]) # ncurses # Location is ncurses/curses.h on DragonFly AC_CHECK_HEADERS([curses.h ncurses/curses.h]) AC_CHECK_LIB([ncurses], [initscr], [have_ncurses="yes"]) AM_CONDITIONAL([HAVE_NCURSES], [test "x$have_ncurses" = xyes]) # Defines libncurses_LIBS that we can use to link against ncurses # Needed since >=ncurses-6 where -ltinfo is needed in addition to -lncurses PKG_CHECK_MODULES(libncurses, [ncurses >= 5], [have_ncurses_pkgconfig="yes"], [have_ncurses_pkgconfig="no"]) AM_CONDITIONAL([HAVE_NCURSES_PKGCONFIG], [test "x$have_ncurses_pkgconfig" = xyes]) # pthread ACX_PTHREAD([ LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" CXXFLAGS="$CXXFLAGS $PTHREAD_CXXFLAGS" CC="$PTHREAD_CC" CXX="$PTHREAD_CXX"], [AC_MSG_ERROR([Missing pthread, please install it])]) # pthread_setname_np can take either 1 or 2 arguments. PTHREAD_SET_NAME() # resolv AS_IF([test -z "${USING_WIN32_FALSE}"], [ACX_RESOLV()], [AC_CHECK_LIB([Iphlpapi], [main], [have_iphlpapi="yes"])]) # Use equivalent library on windows # uuid # We've had to revert to os matching here because ossp uuid conflicts with the # built in uuid on OS X. # On other platforms, we can use either the OSSP uuid or the one # with e2fsprogs. On top of that the header file is different on different # platforms :(. # default values for everything uuid_CFLAGS= uuid_LIBS= use_ossp_uuid="no" case "${host_os}" in *darwin*) # Running on mac, just use the built in UUID # If we try to use ossp/uuid then we can get conflicts with , if # is #include'd before ossp/uuid.h. The errors take the form: # /opt/local/include/ossp/uuid.h:94: error: conflicting declaration # 'typedef struct uuid_st uuid_t' # /usr/include/unistd.h:133: error: 'uuid_t' has a previous declaration as # 'typedef unsigned char uuid_t [16]' AC_CHECK_HEADERS( [uuid/uuid.h], [], [AC_MSG_ERROR([Missing the uuid library])]) ;; *) # non-mac, first look for uuid using pkg-config pkg_config_found_uuid="no" PKG_CHECK_MODULES( base_uuid, [uuid], [pkg_config_found_uuid="yes"], [true]) if test ${pkg_config_found_uuid} = "yes"; then # uuid was found, now we need to determine which uuid library it is. # First modify the CPPFLAGS to use the correct include location. old_cppflags=$CPPFLAGS old_libs=$LIBS CPPFLAGS="${CPPFLAGS} ${base_uuid_CFLAGS}" LIBS="${LIBS} ${base_uuid_LIBS}" # see if we need to include uuid/uuid.h or just uuid.h AC_CHECK_HEADERS( [uuid/uuid.h], [], [true]) # check if this is actually ossp uuid (this is true in win32) AC_CHECK_LIB([uuid], [uuid_generate], [], [use_ossp_uuid="yes"]) # restore CPPFLAGS CPPFLAGS=$old_cppflags LIBS=$old_libs uuid_CFLAGS="${base_uuid_CFLAGS}" uuid_LIBS="${base_uuid_LIBS}" else # the uuid pkg wasn't found, let's try ossp-uuid instead PKG_CHECK_MODULES( ossp_uuid, [ossp-uuid], [use_ossp_uuid="yes"], [AC_MSG_ERROR([Missing the uuid library])]) # see if we need to include ossp/uuid.h, otherwise fall back to uuid.h AC_CHECK_HEADERS( [ossp/uuid.h], [], [true]) uuid_CFLAGS="${ossp_uuid_CFLAGS}" uuid_LIBS="${ossp_uuid_LIBS}" fi ;; esac # now create the variables we actually use. AC_SUBST(uuid_CFLAGS) AC_SUBST(uuid_LIBS) AS_IF([test "x$use_ossp_uuid" = xyes], [AC_DEFINE([USE_OSSP_UUID], [1], [Defined if we should use the ossp uuid lib])]) # DNS-SD support # We use either avahi or the Apple DNS-SD library. AC_ARG_WITH(dns-sd, [AS_HELP_STRING([--without-dns-sd], [disable DNS-SD support])],,) if test "x$with_dns_sd" != "xno"; then # dns_sd AC_CHECK_HEADER( [dns_sd.h], [AC_SEARCH_LIBS(DNSServiceRegister, [dns_sd], [have_dnssd="yes"])]) # avahi PKG_CHECK_MODULES( avahi, [avahi-client], [have_avahi="yes"], [true]) fi AS_IF([test "x$have_dnssd" = xyes], [AC_DEFINE([HAVE_DNSSD], [1], [Defined to use Bonjour DNS_SD])]) AM_CONDITIONAL([HAVE_DNSSD], [test "x$have_dnssd" = xyes]) AS_IF([test "x$have_avahi" = xyes], [AC_DEFINE([HAVE_AVAHI], [1], [Defined to use Avahi])]) AM_CONDITIONAL([HAVE_AVAHI], [test "x$have_avahi" = xyes]) # Look for -lSaleaeDevice, if we have it we build the logic sniffer. SALEAE_DEVICE # Features ##################################################### # Cppunit, which is used by the tests. AC_ARG_ENABLE( [unittests], [AS_HELP_STRING([--disable-unittests], [Disable all unittests])]) AS_IF([test "x$enable_unittests" != xno], [PKG_CHECK_MODULES([CPPUNIT], [cppunit >= 1.9.6], [], [AC_MSG_ERROR([Missing cppunit, please install >= 1.9.6])]) ]) AM_CONDITIONAL([BUILD_TESTS], [test "x$enable_unittests" != xno]) # Optionally install the E1.33 library. AC_ARG_ENABLE( [e133], [AS_HELP_STRING([--enable-e133], [Install the E1.33 library])]) # For now we install the ACN lib if the E1.33 lib is requested AM_CONDITIONAL([INSTALL_ACN], [test "x$enable_e133" = xyes]) AM_CONDITIONAL([INSTALL_E133], [test "x$enable_e133" = xyes]) # Decide if we should build the example programs. AC_ARG_ENABLE( [examples], [AS_HELP_STRING([--disable-examples], [Disable the OLA example client programs])]) AM_CONDITIONAL([BUILD_EXAMPLES], [test "x$enable_examples" != xno]) # Make -Werror non-fatal. By default errors cause the build to abort. We do # this to catch problems early so lets be nice and give the user a work around. AC_ARG_ENABLE( [fatal-warnings], [AS_HELP_STRING([--disable-fatal-warnings], [Make compiler warnings non-fatal])]) AM_CONDITIONAL([FATAL_WARNINGS], [test "x$enable_fatal_warnings" != xno]) # Enable gcov to produce coverage data. AC_ARG_ENABLE( [gcov], [AS_HELP_STRING([--enable-gcov], [Turn on code coverage analysis tools])]) AS_IF([test "x$enable_gcov" = xyes], [CFLAGS="$CFLAGS -fprofile-arcs -ftest-coverage" CXXFLAGS="$CXXFLAGS -fprofile-arcs -ftest-coverage" LIBS="$LIBS -lgcov"]) # Enable HTTP support. This requires libmicrohttpd. AC_ARG_ENABLE( [http], [AS_HELP_STRING([--disable-http], [Disable the built in HTTP server])]) have_microhttpd="no" AS_IF([test "x$enable_http" != xno], [PKG_CHECK_MODULES([libmicrohttpd], [libmicrohttpd], [have_microhttpd="yes"], [true])]) AS_IF([test "x$enable_http" = xyes && test "x$have_microhttpd" != xyes], AC_MSG_ERROR([--enable-http was given but libmicrohttpd was not found.])) AM_CONDITIONAL([HAVE_LIBMICROHTTPD], [test "x$have_microhttpd" = xyes]) AS_IF([test "x$have_microhttpd" = xyes], [AC_DEFINE([HAVE_LIBMICROHTTPD], [1], [define if libmicrohttpd is installed])]) if test "x$have_microhttpd" = xyes; then # Check if we have MHD_create_response_from_buffer old_cflags=$CFLAGS old_libs=$LIBS CFLAGS="${CPPFLAGS} ${libmicrohttpd_CFLAGS}" LIBS="${LIBS} ${libmicrohttpd_LIBS}" AC_CHECK_FUNCS([MHD_create_response_from_buffer]) # restore CFLAGS CFLAGS=$old_cflags LIBS=$old_libs fi # Java API, this requires Maven AC_ARG_ENABLE( [java-libs], [AS_HELP_STRING([--enable-java-libs], [Build the Java interface])], , enable_java_libs="no") AS_IF([test "x$enable_java_libs" = xyes], [AC_PROG_JAVA_CC() MAVEN_SUPPORT([2.2.1])]) AM_CONDITIONAL([BUILD_JAVA_LIBS], [test "x$enable_java_libs" = xyes]) # Optionally build the Ja Rule tool AC_ARG_ENABLE( [ja-rule], [AS_HELP_STRING([--enable-ja-rule], [Build the Ja Rule test tool])]) # libftdi0: this requires libusb-0.1.4+ don't know if I should also # check for it, since the libusb check above is not for 0.1.4 but for libusb-1 AC_ARG_ENABLE( [libftdi], [AS_HELP_STRING([--disable-libftdi], [Avoid using libftdi0 or libftdi1 even if either exists])]) have_libftdi0="no" AS_IF([test "x$enable_libftdi" != xno], [PKG_CHECK_MODULES([libftdi0], [libftdi >= 0.18], [have_libftdi0="yes"], [true])]) AM_CONDITIONAL([HAVE_LIBFTDI0], [test "x$have_libftdi0" = xyes]) AS_IF([test "x$have_libftdi0" = xyes], [AC_DEFINE([HAVE_LIBFTDI0], [1], [define if libftdi0 is installed])]) have_libftdi1="no" AS_IF([test "x$enable_libftdi" != xno], [PKG_CHECK_MODULES([libftdi1], [libftdi1 >= 1.0], [have_libftdi1="yes"], [true])]) AM_CONDITIONAL([HAVE_LIBFTDI1], [test "x$have_libftdi1" = xyes]) AS_IF([test "x$have_libftdi1" = xyes], [AC_DEFINE([HAVE_LIBFTDI1], [1], [define if libftdi1 is installed])]) have_libftdi="no" if test "x$have_libftdi0" = xyes || test "x$have_libftdi1" = xyes; then have_libftdi="yes" fi AS_IF([test "x$have_libftdi" = xyes], [AC_DEFINE([HAVE_LIBFTDI], [1], [define if libftdi0 or libftdi1 is installed])]) # libusb AC_ARG_ENABLE( [libusb], [AS_HELP_STRING([--disable-libusb], [Avoid using libusb even if it exists])]) have_libusb="no" AS_IF([test "x$enable_libusb" != xno], [PKG_CHECK_MODULES([libusb], [libusb-1.0 >= 1.0.2], [have_libusb="yes"], [true])]) AS_IF([test "x$have_libusb" = xyes], [AC_DEFINE([HAVE_LIBUSB], [1], [define if libusb is installed])]) have_libusb_error_name="no" AS_IF([test "x$enable_libusb" != xno], [PKG_CHECK_MODULES([libusb_error_name], [libusb-1.0 >= 1.0.9], [have_libusb_error_name="yes"], [true])]) AS_IF([test "x$have_libusb_error_name" = xyes], [AC_DEFINE([HAVE_LIBUSB_ERROR_NAME], [1], [define if libusb is installed and has libusb_error_name])]) have_libusb_hotplug_api="no" AS_IF([test "x$enable_libusb" != xno], [PKG_CHECK_MODULES([libusb_hotplug_api], [libusb-1.0 >= 1.0.16], [have_libusb_hotplug_api="yes"], [true])]) AS_IF([test "x$have_libusb_hotplug_api" = xyes], [AC_DEFINE([HAVE_LIBUSB_HOTPLUG_API], [1], [define if libusb is installed and the libusb hotplug API is available])]) AM_CONDITIONAL([HAVE_LIBUSB_HOTPLUG_API], [test "x$have_libusb_hotplug_api" = xyes]) have_libusb_set_option="no" AS_IF([test "x$enable_libusb" != xno], [PKG_CHECK_MODULES([libusb_set_option], [libusb-1.0 >= 1.0.22], [have_libusb_set_option="yes"], [true])]) AS_IF([test "x$have_libusb_set_option" = xyes], [AC_DEFINE([HAVE_LIBUSB_SET_OPTION], [1], [define if libusb is installed and libusb_set_option is available])]) AM_CONDITIONAL([HAVE_LIBUSB_SET_OPTION], [test "x$have_libusb_set_option" = xyes]) # UART direct plugin AC_ARG_ENABLE( [uart], [AS_HELP_STRING([--disable-uart], [Avoid using native uart support even if it exists])]) have_uart="no" AS_IF([test "x$enable_uart" != xno], [AC_CHECK_HEADERS([asm/termios.h], [have_uart="yes"], [true])]) AS_IF([test "x$have_uart" = xyes], [AC_DEFINE([HAVE_UART], [1], [define if native UART support exists])]) # OSC Support. # look for liblo if the user asked us to AC_ARG_ENABLE( [osc], [AS_HELP_STRING([--disable-osc], [Disable the OSC plugin even if liblo exists])]) have_liblo="no" AS_IF([test "x$enable_osc" != xno], [PKG_CHECK_MODULES(liblo, [liblo >= 0.26], [have_liblo="yes"], [true])]) AS_IF([test "x$have_liblo" = xyes], [AC_DEFINE([HAVE_LIBLO], [1], [define if liblo is installed])]) # Python API AC_ARG_ENABLE( [python-libs], [AS_HELP_STRING([--enable-python-libs], [Build the Python API Module])], , enable_python_libs="no") # RDM tests, if requested this enables the Python API as well. AC_ARG_ENABLE( [rdm-tests], [AS_HELP_STRING( [--enable-rdm-tests], [Install the RDM responder tests, adds --enable-python-libs])], , enable_rdm_tests="no") AS_IF([test "x$enable_rdm_tests" = xyes], [enable_python_libs="yes"]) AM_CONDITIONAL([INSTALL_RDM_TESTS], [test "x$enable_rdm_tests" = xyes]) # By default olad refuses to run as root. However some people want to use root # for embedded platforms so we give them an option. AC_ARG_ENABLE( [root-check], [AS_HELP_STRING([--disable-root-check], [Disable the check that prevents olad from running as root])]) AS_IF([test "x$enable_root_check" = xno], [AC_DEFINE([OLAD_SKIP_ROOT_CHECK], [1], [Defined if olad is allowed to run as root])]) # Use tcmalloc. This is used by the buildbot leak checks. AC_ARG_ENABLE([tcmalloc], AS_HELP_STRING([--enable-tcmalloc], [Use tcmalloc])) AS_IF([test "x$enable_tcmalloc" = xyes], [AC_CHECK_LIB([tcmalloc], [malloc], [LDFLAGS="$LDFLAGS -ltcmalloc"], [AS_ERROR([tcmalloc not found, but enabled on command line])])]) # Optionally set the Doxygen version to "Latest Git" for website latest # version. AC_ARG_ENABLE( [doxygen-version], [AS_HELP_STRING([--disable-doxygen-version], [Substitute the Doxygen version with latest, for the website])]) # UUCP Lock directory AC_ARG_WITH([uucp-lock], [AS_HELP_STRING([--with-uucp-lock], [The directory to use for UUCP lock files])], [], []) # Try to locate the UUCP lock path. UUCPLOCK="" AH_TEMPLATE([UUCP_LOCK_DIR], [Define to the path of the UUCP lock directory]) AC_MSG_CHECKING(for serial port lock directory) # This list is from the minicom configs, The Filesystem Hierarchy Standard says # /var/lock is the one true source. for ac_uucplock in /var/lock /etc/locks /usr/spool/locks /var/spool/locks /var/spool/lock /usr/spool/uucp /var/spool/uucp /var/run; do AS_IF([test -d $ac_uucplock], [UUCPLOCK=$ac_uucplock; break]) done # Mac stores the lock files in /tmp case "${host_os}" in *darwin*) UUCPLOCK=/tmp ;; esac AS_IF([test "x$with_uucp_lock" != x], [UUCPLOCK=$with_uucp_lock]) AS_IF([test -d $UUCPLOCK], [AC_DEFINE_UNQUOTED(UUCP_LOCK_DIR, "$UUCPLOCK") AC_MSG_RESULT($UUCPLOCK)], AC_MSG_ERROR(no suitable lock directory)) # Python wrappers & RDM Responder tests. ##################################################### AM_CONDITIONAL([BUILD_PYTHON_LIBS], [test "x$enable_python_libs" = xyes]) AS_IF([test "${enable_python_libs}" = "yes"], [AM_PATH_PYTHON(2.6) AS_IF([test -z $PYTHON], [PYTHON="python"]) PYTHON_NAME=`basename $PYTHON` AC_CACHE_CHECK([for $PYTHON_NAME module: google.protobuf], [ac_cv_have_pymod_google_protobuf], [AX_PYTHON_MODULE([google.protobuf], [fatal]) eval ac_cv_have_pymod_google_protobuf=\$AS_TR_CPP([HAVE_PYMOD_google.protobuf])]) ]) AS_IF([test "${enable_rdm_tests}" = "yes"], [AC_CACHE_CHECK([for $PYTHON_NAME module: numpy], [ac_cv_have_pymod_numpy], [AX_PYTHON_MODULE([numpy], [fatal]) eval ac_cv_have_pymod_numpy=\$AS_TR_CPP([HAVE_PYMOD_numpy])]) ]) # Check if the flake8 python linter is available AC_CHECK_PROG([flake8],[flake8],[yes],[no]) AM_CONDITIONAL([FOUND_FLAKE8], [test "x$flake8" = xyes]) # Libraries, that depend on the feature args above. ##################################################### # LIBRARY: protobuf # We require 2.4.0 for the java libs AS_IF([test "x$build_java_libs" = xyes], [PROTOBUF_SUPPORT([2.4.0])], [PROTOBUF_SUPPORT([2.3.0])]) # Version 3.7 and above of protoc require some additional includes AC_CHECK_HEADERS([google/protobuf/io/strtod.h google/protobuf/stubs/logging.h \ google/protobuf/stubs/stl_util.h]) # Doxygen ##################################################### DX_PDF_FEATURE(OFF) DX_PS_FEATURE(OFF) DX_ARG_ABLE(verbose, [Verbose doxygen output], [], [], [], [DX_ENV_APPEND(QUIET, NO)], [DX_ENV_APPEND(QUIET, YES)]) doxygen_project_number=$PACKAGE_VERSION AS_IF([test "x$enable_doxygen_version" = xno], [doxygen_project_number="Latest Git"]) DX_ENV_APPEND(PROJECT_NUMBER, $doxygen_project_number) DX_INIT_DOXYGEN($PACKAGE_NAME, Doxyfile) # Plugins ##################################################### AC_ARG_ENABLE( [all-plugins], AS_HELP_STRING( [--disable-all-plugins], [Disable all plugins, then enable the specific ones you want])) # We build a list of plugins that we're going to compile here so the olad # knows what to link against. PLUGINS="" # Force enable_usbdmx to yes when Ja Rule is explicitly requested. AS_IF([test "x$enable_ja_rule" = xyes], [AS_ECHO(["Ja Rule is enabled, enabling the usbdmx plugin."])] [enable_usbdmx="yes"]) PLUGIN_SUPPORT(artnet, USE_ARTNET) PLUGIN_SUPPORT(dmx4linux, USE_DMX4LINUX, [$have_dmx4linux]) PLUGIN_SUPPORT(dummy, USE_DUMMY) PLUGIN_SUPPORT(e131, USE_E131) PLUGIN_SUPPORT(espnet, USE_ESPNET) PLUGIN_SUPPORT(ftdidmx, USE_FTDI, [$have_libftdi]) PLUGIN_SUPPORT(gpio, USE_GPIO) PLUGIN_SUPPORT(karate, USE_KARATE) PLUGIN_SUPPORT(kinet, USE_KINET) PLUGIN_SUPPORT(milinst, USE_MILINST) PLUGIN_SUPPORT(opendmx, USE_OPENDMX, [$have_not_win32]) PLUGIN_SUPPORT(openpixelcontrol, USE_OPENPIXELCONTROL) PLUGIN_SUPPORT(osc, USE_OSC, [$have_liblo]) PLUGIN_SUPPORT(pathport, USE_PATHPORT) PLUGIN_SUPPORT(renard, USE_RENARD) PLUGIN_SUPPORT(sandnet, USE_SANDNET) PLUGIN_SUPPORT(shownet, USE_SHOWNET) PLUGIN_SUPPORT(spi, USE_SPI, [$have_spi]) PLUGIN_SUPPORT(stageprofi, USE_STAGEPROFI) PLUGIN_SUPPORT(uartdmx, USE_UART, [$have_uart]) PLUGIN_SUPPORT(usbdmx, USE_LIBUSB, [$have_libusb]) PLUGIN_SUPPORT(usbpro, USE_USBPRO) # Finally build a list of the required plugin libs. PLUGIN_LIBS='' OLA_SERVER_LIBS='' for p in $PLUGINS; do PLUGIN_LIBS="$PLUGIN_LIBS plugins/${p}/libola${p}.la" OLA_SERVER_LIBS="$OLA_SERVER_LIBS -lola${p}" done if test -z "${USING_WIN32_TRUE}"; then OLA_SERVER_LIBS="$OLA_SERVER_LIBS -lWs2_32 -lIphlpapi -lpthread" fi AC_SUBST(PLUGIN_LIBS) AC_SUBST(OLA_SERVER_LIBS) # HTML & data directories ola_datadir=$datadir/olad www_datadir=$ola_datadir/www piddatadir=$datadir/ola/pids AC_SUBST(www_datadir) AC_SUBST(piddatadir) # Additional libraries needed by Windows clients OLA_CLIENT_LIBS='' if test -z "${USING_WIN32_TRUE}"; then OLA_CLIENT_LIBS="-lWs2_32 -lIphlpapi -lpthread" fi AC_SUBST(OLA_CLIENT_LIBS) # Extra tools ##################################################### AS_IF([test "x$enable_ja_rule" = xyes && test "x$enable_usbdmx" = xno], [AC_MSG_ERROR([Ja Rule requires the usbdmx plugin, but it could not be enabled.])]) AS_IF([test "x$enable_ja_rule" = xyes && test "x$have_libusb" = xno], [AC_MSG_ERROR([Ja Rule requires libusb, but it was not found on your system.])]) AM_CONDITIONAL([BUILD_JA_RULE], [test "x$enable_ja_rule" = xyes]) # Status just for configure BUILDING_JA_RULE='no' if test "x$enable_ja_rule" = xyes; then BUILDING_JA_RULE='yes' fi # Linters AC_CHECK_PROG([flake8],[flake8],[yes],[no]) AM_CONDITIONAL([FOUND_FLAKE8], [test "x$flake8" = xyes]) AC_CHECK_PROG([cpplint],[cpplint],[yes],[no]) AM_CONDITIONAL([FOUND_CPPLINT], [test "x$cpplint" = xyes]) # Output ##################################################### # Hack alert! # Python modules can't be split over two directories. This is a problem when # doing VPATH builds since the generated files like # ${builddir}/python/ola/Ola_pb.py will be in a separate path ( $builddir ) from # the non-generated files $srcdir/python/ols/PidStore.py). To get the tests # to pass we symlink the files we need for the tests from the builddir to the # srcdir and set PYTHONPATH=${top_builddir}/python in data/rdm/Makefile.am AC_CONFIG_LINKS([python/ola/__init__.py:python/ola/__init__.py python/ola/ClientWrapper.py:python/ola/ClientWrapper.py python/ola/DMXConstants.py:python/ola/DMXConstants.py python/ola/DUBDecoder.py:python/ola/DUBDecoder.py python/ola/MACAddress.py:python/ola/MACAddress.py python/ola/OlaClient.py:python/ola/OlaClient.py python/ola/PidStore.py:python/ola/PidStore.py python/ola/RDMAPI.py:python/ola/RDMAPI.py python/ola/RDMConstants.py:python/ola/RDMConstants.py python/ola/StringUtils.py:python/ola/StringUtils.py python/ola/TestUtils.py:python/ola/TestUtils.py python/ola/UID.py:python/ola/UID.py python/ola/rpc/__init__.py:python/ola/rpc/__init__.py python/ola/rpc/SimpleRpcController.py:python/ola/rpc/SimpleRpcController.py python/ola/rpc/StreamRpcChannel.py:python/ola/rpc/StreamRpcChannel.py tools/rdm/__init__.py:tools/rdm/__init__.py tools/rdm/ExpectedResults.py:tools/rdm/ExpectedResults.py tools/rdm/ResponderTest.py:tools/rdm/ResponderTest.py tools/rdm/TestCategory.py:tools/rdm/TestCategory.py tools/rdm/TestDefinitions.py:tools/rdm/TestDefinitions.py tools/rdm/TestHelpers.py:tools/rdm/TestHelpers.py tools/rdm/TestMixins.py:tools/rdm/TestMixins.py tools/rdm/TestRunner.py:tools/rdm/TestRunner.py tools/rdm/TestState.py:tools/rdm/TestState.py tools/rdm/TimingStats.py:tools/rdm/TimingStats.py]) # Non-makefile generated files. AC_CONFIG_FILES([include/ola/base/Version.h libola.pc libolaserver.pc libs/acn/libolaacn.pc ola.spec plugins/artnet/messages/libolaartnetconf.pc plugins/e131/messages/libolae131conf.pc plugins/usbpro/messages/libolausbproconf.pc tools/e133/libolae133common.pc tools/e133/libolae133controller.pc ]) # Makefiles AC_CONFIG_FILES([Makefile java/Makefile]) AC_OUTPUT echo \ "------------------------------------------------------- ${PACKAGE_NAME} Version ${PACKAGE_VERSION} Prefix: '${prefix}' Compiler: '${CXX} ${CXXFLAGS} ${CPPFLAGS}' Linker: '${LD} ${LDFLAGS} ${LIBS}' Python: ${PYTHON} Python API: ${enable_python_libs} Java API: ${enable_java_libs} Enable HTTP Server: ${have_microhttpd} RDM Responder Tests: ${enable_rdm_tests} Ja Rule: ${BUILDING_JA_RULE} Enabled Plugins:${PLUGINS} UUCP Lock Directory: $UUCPLOCK Now type 'make @<:@@:>@' where the optional is: all - build everything check - run the tests doxygen-doc - generate the HTML documentation lint - run the linters -------------------------------------------------------" ola-0.10.9/README.mingw320000664000175000017500000000726414376533110011460 00000000000000!!! The Windows port of OLA is work-in-progress !!! ================== Basic Requirements ================== To build OLA on Windows with MinGW, you need an up-to-date MinGW installation. The MinGW project provides a package manager (MinGW Installation Manager, available at http://sourceforge.net/projects/mingw/files/Installer/). You need to select: - mingw-developer-toolkit - mingw32-base - mingw32-gcc-g++ - mingw32-pthreads-w32 - msys-base - msys-coreutils - msys-wget !!! TODO: Check and update the list above !!! Open a MSYS shell an edit ~/.bashrc. Add the following lines: export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig export CPPFLAGS="-I/usr/local/include" export LDFLAGS="-L/usr/local/lib" In addition, edit ~/.profile and add [ -f ~/.bashrc ] && . ~/.bashrc If you haven't configured your MSYS fstab yet, do that as well. See http://www.mingw.org/wiki/Getting_Started for instructions. ============================== Additional tools and libraries ============================== pkg-config ---------- - Download pkg-config-lite from http://sourceforge.net/projects/pkgconfiglite/files/ - Extract to MinGW directory (bin-win32 package) or build it from the tarball Python (optional) ----------------- - Tested version: 2.7 series - Download and install Python for Windows from https://www.python.org/downloads/ msys-git -------- - Download msysgit from https://msysgit.github.com/ - Install and make sure to select "Check-out as is, commit UNIX-style" libuuid ------- - Download and extract the latest libuuid tarball from https://code.google.com/p/gnome-build-stage-1/downloads/list - Configure, compile and install it using the MinGW MSYS shell with option --prefix=/c/MinGW protobuf -------- - Download and extract the latest protobuf tarball from https://github.com/google/protobuf - Configure, compile and install it using the MinGW MSYS shell with option --prefix=/c/MinGW - if you want to use the OLA Python api, install the protobuf Python bindings from the 'python' subdirectory cppunit ------- - Download and extract the latest cppunit tarball from http://sourceforge.net/projects/cppunit/files/cppunit/ - Configure, compile and install it using the MinGW MSYS shell with option --prefix=/c/MinGW libmicrohttpd ------------- - Download and extract the latest libmicrohttpd tarball from http://ftp.gnu.org/gnu/libmicrohttpd/ - Configure, compile and install it using the MinGW MSYS shell with option --prefix=/c/MinGW (and --disable-https if you don't want all the crypto stuff) liblo (optional) ---------------- - Download and extract the latest version of liblo from http://liblo.sourceforge.net/ - Configure, compile and install it using the MinGW MSYS shell with option --prefix=/c/MinGW libusb (optional) ---------------- - Download and extract the latest version of libusb from http://libusb.info/ - Configure, compile and install it using the MinGW MSYS shell with option --prefix=/c/MinGW libftdi1 (optional) ---------------- - Download and install libftdi1 from https://www.intra2net.com/en/developer/libftdi/ - Alternatively download a pre-compiled version and install from https://code.google.com/archive/p/picusb/downloads - Use the Zadig tool from https://sourceforge.net/projects/libwdi/files/zadig/ to install the libusbK for each FTDI device ============ Building OLA ============ * cd ~/your/development/directory * git clone https://github.com/OpenLightingProject/ola.git ola * cd ola * autoreconf -i -f * ./configure --enable-python-libs --disable-all-plugins --enable-artnet --enable-dummy --enable-espnet --enable-ftdidmx --enable-kinet --enable-osc --enable-pathport --enable-sandnet --enable-shownet --enable-usbdmx * make * make install !!! TODO: Reduce the number of disabled features !!! ola-0.10.9/tools/0000775000175000017500000000000014376533270010531 500000000000000ola-0.10.9/tools/ja-rule/0000775000175000017500000000000014376533271012071 500000000000000ola-0.10.9/tools/ja-rule/ja-rule.cpp0000664000175000017500000006354014376533110014054 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ja-rule.cpp * Host side code for ja-rule * Copyright (C) 2015 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "libs/usb/JaRuleWidget.h" #include "tools/ja-rule/USBDeviceManager.h" using ola::NewCallback; using ola::NewSingleCallback; using ola::STLFind; using ola::STLReplace; using ola::io::ByteString; using ola::io::SelectServer; using ola::io::StdinHandler; using ola::rdm::RDMCommand; using ola::rdm::RDMCommandSerializer; using ola::rdm::RDMDiscoveryResponse; using ola::rdm::RDMRequest; using ola::rdm::RDMResponse; using ola::rdm::RDMSetRequest; using ola::rdm::RDMStatusCode; using ola::rdm::UID; using ola::strings::ToHex; using ola::usb::CommandClass; using ola::usb::JaRuleReturnCode; using ola::usb::JaRuleWidget; using ola::utils::JoinUInt8; using ola::utils::SplitUInt16; using std::auto_ptr; using std::cout; using std::endl; using std::string; using std::vector; DEFINE_string(target_uid, "7a70:00000001", "The UID of the responder to control."); DEFINE_string(lower_uid, "0000:00000000", "The lower UID for the DUB."); DEFINE_string(upper_uid, "ffff:ffffffff", "The upper UID for the DUB."); DEFINE_uint8(port, 0, "The port to control"); /** * @brief Wait on input from the keyboard, and based on the input, send * messages to the device. */ class Controller { public: enum TimingOption { TIMING_BREAK, TIMING_MARK, TIMING_RDM_RESPONSE_TIMEOUT, TIMING_RDM_BROADCAST_TIMEOUT, TIMING_DUB_RESPONSE_LIMIT, TIMING_RESPONDER_DELAY, TIMING_RESPONDER_JITTER, }; Controller(SelectServer* ss, const UID &target_uid, const UID &lower_uid, const UID &upper_uid) : m_ss(ss), m_our_uid(0, 0), m_target_uid(target_uid), m_lower_uid(lower_uid), m_upper_uid(upper_uid), m_stdin_handler( new StdinHandler(ss, ola::NewCallback(this, &Controller::Input))), m_widget(NULL), m_log_count(0), m_dmx_slot_data(0), m_mode(MODE_DEFAULT), m_current_timing_option(TIMING_BREAK) { m_actions['\n'] = Action(NewCallback(this, &Controller::Commit)); m_actions[27] = Action(NewCallback(this, &Controller::ExitEditMode)); m_actions['+'] = Action(NewCallback(this, &Controller::Adjust, true)); m_actions['-'] = Action(NewCallback(this, &Controller::Adjust, false)); m_actions['0'] = Action("Send a 0 length DMX frame", NewCallback(this, &Controller::SendZeroDMX)); m_actions['2'] = Action("Send 2 DMX frames back to back", NewCallback(this, &Controller::SendDoubleDMX)); m_actions['d'] = Action( "Send a DUB frame from 0000:00000000 to ffff:ffffffff", NewCallback(this, &Controller::SendDUB, UID(0, 0), UID::AllDevices())); m_actions['D'] = Action( "Send a DUB frame from --lower-uid to --upper-uid", NewCallback(this, &Controller::SendDUB, m_lower_uid, m_upper_uid)); m_actions['e'] = Action("Send an echo command", NewCallback(this, &Controller::SendEcho)); m_actions['f'] = Action("Fetch the flags state", NewCallback(this, &Controller::GetFlags)); m_actions['h'] = Action("Display help", NewCallback(this, &Controller::PrintCommands)); m_actions['i'] = Action( "Identify on", NewCallback(this, &Controller::SendIdentify, true)); m_actions['I'] = Action( "Identify off", NewCallback(this, &Controller::SendIdentify, false)); m_actions['m'] = Action( "Send a broadcast mute", NewCallback(this, &Controller::SendMute, UID::AllDevices())); m_actions['M'] = Action( "Send a mute to the target UID", NewCallback(this, &Controller::SendMute, m_target_uid)); m_actions['q'] = Action( "Quit", NewCallback(m_ss, &SelectServer::Terminate)); m_actions['r'] = Action( "Reset the device", NewCallback(this, &Controller::ResetDevice)); m_actions['t'] = Action( "Send a DMX frame", NewCallback(this, &Controller::SendDMX)); m_actions['u'] = Action( "Send a broadcast unmute", NewCallback(this, &Controller::SendUnMute, UID::AllDevices())); m_actions['U'] = Action( "Send an unmute to the target UID", NewCallback(this, &Controller::SendUnMute, m_target_uid)); m_actions['.'] = Action( "Get the hardware info", NewCallback(this, &Controller::GetHardwareInfo)); m_actions[','] = Action( "Run the self test", NewCallback(this, &Controller::RunSelfTest)); // Timing Options // For each of the options below, we allow a bigger range than the device // itself so we can test out-of-range errors. STLReplace(&m_timing_settings, TIMING_BREAK, TimingSetting('b', "break time", 176, 40, // actual min is 44 1000, // actual max is 800 TIMING_UNITS_MICROSECONDS, ola::usb::JARULE_CMD_GET_BREAK_TIME, ola::usb::JARULE_CMD_SET_BREAK_TIME)); STLReplace(&m_timing_settings, TIMING_MARK, TimingSetting('x', "mark time", 12, 2, // actual min is 4 850, // actual max is 800 TIMING_UNITS_MICROSECONDS, ola::usb::JARULE_CMD_GET_MARK_TIME, ola::usb::JARULE_CMD_SET_MARK_TIME)); STLReplace(&m_timing_settings, TIMING_RDM_RESPONSE_TIMEOUT, TimingSetting('y', "RDM response timeout", 28, 5, // actual min 10 55, // action max is 50 TIMING_UNITS_TENTHS_OF_MILLI_SECONDS, ola::usb::JARULE_CMD_GET_RDM_RESPONSE_TIMEOUT, ola::usb::JARULE_CMD_GET_RDM_RESPONSE_TIMEOUT)); STLReplace(&m_timing_settings, TIMING_RDM_BROADCAST_TIMEOUT, TimingSetting('z', "RDM broadcast response timeout", 28, 5, // actual min 10 55, // action max is 50 TIMING_UNITS_TENTHS_OF_MILLI_SECONDS, ola::usb::JARULE_CMD_GET_RDM_BROADCAST_TIMEOUT, ola::usb::JARULE_CMD_SET_RDM_BROADCAST_TIMEOUT)); TimingSettingMap::const_iterator iter = m_timing_settings.begin(); for (; iter != m_timing_settings.end(); ++iter) { const TimingSetting &setting = iter->second; m_actions[setting.character_code] = Action( "Get " + setting.description, NewCallback(this, &Controller::GetTime, iter->first)); m_actions[toupper(setting.character_code)] = Action( "Set " + setting.description, NewCallback(this, &Controller::EditTiming, iter->first)); } } ~Controller() { m_stdin_handler.reset(); ActionMap::iterator iter = m_actions.begin(); for (; iter != m_actions.end(); ++iter) { delete iter->second.action; } } void WidgetEvent(USBDeviceManager::EventType event, JaRuleWidget* widget) { if (event == USBDeviceManager::WIDGET_ADDED) { OLA_INFO << "Open Lighting Device added"; if (!m_widget) { m_widget = widget; m_our_uid = widget->GetUID(); // Switch to controller mode. uint8_t mode = ola::usb::CONTROLLER_MODE; m_widget->SendCommand( FLAGS_port, ola::usb::JARULE_CMD_SET_MODE, &mode, sizeof(mode), NULL); } else { OLA_WARN << "Only a single device is supported"; } } else { OLA_INFO << "Open Lighting Device removed"; if (widget == m_widget) { m_widget = NULL; } } } void Input(int c) { Action *action = STLFind(&m_actions, c); if (action) { action->action->Run(); } else { switch (c) { case 27: // Escape if (m_mode != MODE_DEFAULT) { cout << "Edit Aborted" << endl; m_mode = MODE_DEFAULT; } break; default: {} } } } void PrintCommands() { vector lines; for (ActionMap::iterator iter = m_actions.begin(); iter != m_actions.end(); ++iter) { if (!iter->second.description.empty() && std::isprint(iter->first)) { std::ostringstream str; str << " " << iter->first << " - " << iter->second.description << endl; lines.push_back(str.str()); } } std::sort(lines.begin(), lines.end()); cout << "Commands:" << endl; for (vector::iterator iter = lines.begin(); iter != lines.end(); ++iter) { cout << *iter; } } void EditTiming(TimingOption option) { m_mode = MODE_EDIT_TIMING; m_current_timing_option = option; const TimingSetting* setting = STLFind(&m_timing_settings, option); if (!setting) { OLA_WARN << "Missing timing setting " << option; return; } cout << "Editing " << setting->description << ", currently " << FormatTime(setting->units, setting->current_value) << "." << endl << "Use +/- to adjust, Enter commits, Esc to abort" << endl; } void EchoCommandComplete(ola::usb::USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ByteString &payload) { if (!CheckResult(result, status_flags)) { return; } string response; if (!payload.empty()) { response.append(reinterpret_cast(payload.data()), payload.size()); } cout << "Echo Reply: RC " << return_code << ": " << response << endl; } void AckCommandComplete( ola::usb::USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ByteString &payload) { if (!CheckResult(result, status_flags)) { return; } OLA_INFO << "RC: " << return_code << ", payload_size: " << payload.size(); } void GetFlagsCommandComplete( ola::usb::USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ByteString &payload) { if (!CheckResult(result, status_flags)) { return; } OLA_INFO << "RC: " << return_code << ", payload_size: " << payload.size(); if (!payload.empty()) { ola::strings::FormatData(&std::cout, payload.data(), payload.size()); } } void DUBCommandComplete(ola::usb::USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ByteString &payload) { if (!CheckResult(result, status_flags)) { return; } cout << "DUB Response: RC: " << return_code << ", size: " << payload.size() << endl; } void DisplayTime(TimingOption option, ola::usb::USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ByteString &payload) { if (!CheckResult(result, status_flags)) { return; } if (return_code != ola::usb::RC_OK) { OLA_INFO << "RC: " << return_code << ", payload_size: " << payload.size(); return; } const TimingSetting* setting = STLFind(&m_timing_settings, option); if (!setting) { OLA_WARN << "Missing timing setting " << option; return; } uint16_t value = 0; if (payload.size() != sizeof(value)) { OLA_WARN << "Payload size mismatch"; return; } value = JoinUInt8(payload[1], payload[0]); string description = setting->description; ola::CapitalizeFirst(&description); cout << description << ": " << FormatTime(setting->units, value) << endl; } void CommandComplete(ola::usb::USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ByteString &payload) { if (!CheckResult(result, status_flags)) { return; } OLA_INFO << "RC: " << return_code << ", payload_size: " << payload.size(); if (!payload.empty()) { return; } if (payload[0] == RDMCommand::START_CODE) { RDMStatusCode status_code; // Skip over the start code. auto_ptr response(RDMResponse::InflateFromData( payload.data() + 1, payload.size() - 1, &status_code)); if (!response.get()) { OLA_WARN << "Failed to inflate RDM response"; if (!payload.empty()) { ola::strings::FormatData(&std::cout, payload.data(), payload.size()); } } OLA_INFO << *response; } } void HardwareInfoComplete( ola::usb::USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, const ByteString &payload) { if (!CheckResult(result, status_flags)) { return; } OLA_INFO << "RC: " << return_code << ", payload_size: " << payload.size(); if (payload.size() >= 14) { uint16_t model_id = JoinUInt8(payload[1], payload[0]); UID uid(payload.data() + sizeof(uint16_t)); ola::network::MACAddress mac_address( payload.data() + sizeof(uint16_t) + UID::LENGTH); cout << "Model: " << model_id << ", UID: " << uid << ", MAC: " << mac_address << endl; } else { OLA_WARN << "Received " << payload.size() << " bytes, expecting 14"; } } void SelfTestPart2Complete(ola::usb::USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, OLA_UNUSED const ByteString &payload) { if (!CheckResult(result, status_flags)) { return; } cout << "Test result: " << return_code << endl; } void SelfTestPart1Complete(ola::usb::USBCommandResult result, JaRuleReturnCode return_code, uint8_t status_flags, OLA_UNUSED const ByteString &payload) { if (!CheckResult(result, status_flags)) { return; } if (return_code == ola::usb::RC_OK) { m_widget->SendCommand( FLAGS_port, ola::usb::JARULE_CMD_RUN_SELF_TEST, NULL, 0, NewSingleCallback(this, &Controller::SelfTestPart2Complete)); } else { OLA_WARN << "Unable to change to self test mode"; } } private: enum Mode { MODE_DEFAULT, MODE_EDIT_TIMING, }; typedef enum { TIMING_UNITS_MICROSECONDS, TIMING_UNITS_TENTHS_OF_MILLI_SECONDS, } TimingUnit; struct Action { public: typedef ola::Callback0 ActionCallback; Action() : action(NULL) {} explicit Action(ActionCallback *cb) : action(cb) {} Action(const string &description, ActionCallback *cb) : description(description), action(cb) {} string description; ActionCallback *action; }; typedef std::map ActionMap; struct TimingSetting { public: TimingSetting(char character_code, string description, uint16_t initial_value, uint16_t min_value, uint16_t max_value, TimingUnit units, CommandClass get_command, CommandClass set_command) : character_code(character_code), description(description), current_value(initial_value), min_value(min_value), max_value(max_value), units(units), get_command(get_command), set_command(set_command) { } char character_code; string description; uint16_t current_value; uint16_t min_value; uint16_t max_value; TimingUnit units; CommandClass get_command; CommandClass set_command; }; typedef std::map TimingSettingMap; ActionMap m_actions; TimingSettingMap m_timing_settings; SelectServer* m_ss; UID m_our_uid, m_target_uid, m_lower_uid, m_upper_uid; auto_ptr m_stdin_handler; JaRuleWidget* m_widget; unsigned int m_log_count; uint8_t m_dmx_slot_data; Mode m_mode; TimingOption m_current_timing_option; bool CheckForWidget() const { if (!m_widget) { cout << "Device not present or device unavailable" << endl; return false; } return true; } void ResetDevice() { if (!CheckForWidget()) { return; } m_widget->SendCommand( FLAGS_port, ola::usb::JARULE_CMD_RESET_DEVICE, NULL, 0, NewSingleCallback(this, &Controller::AckCommandComplete)); } void GetFlags() { if (!CheckForWidget()) { return; } m_widget->SendCommand( FLAGS_port, ola::usb::JARULE_CMD_GET_FLAGS, NULL, 0, NewSingleCallback(this, &Controller::GetFlagsCommandComplete)); } void _SendDMX(const uint8_t *data, unsigned int size) { if (!CheckForWidget()) { return; } m_widget->SendCommand( FLAGS_port, ola::usb::JARULE_CMD_TX_DMX, data, size, NewSingleCallback(this, &Controller::CommandComplete)); } void Adjust(bool increase) { TimingSetting* setting = STLFind(&m_timing_settings, m_current_timing_option); if (!setting) { OLA_WARN << "Missing timing setting " << m_current_timing_option; return; } if (increase) { setting->current_value++; if (setting->current_value > setting->max_value) { setting->current_value = setting->max_value; } } else { setting->current_value--; if (setting->current_value < setting->min_value) { setting->current_value = setting->min_value; } } string description = setting->description; ola::CapitalizeFirst(&description); cout << description << " is now " << FormatTime(setting->units, setting->current_value) << endl; } void Commit() { if (!CheckForWidget()) { return; } if (m_mode == MODE_DEFAULT) { return; } uint8_t payload[2]; const TimingSetting* setting = STLFind( &m_timing_settings, m_current_timing_option); if (!setting) { OLA_WARN << "Missing timing setting " << m_current_timing_option; return; } SplitUInt16(setting->current_value, &payload[1], &payload[0]); m_widget->SendCommand( FLAGS_port, setting->set_command, payload, arraysize(payload), NewSingleCallback(this, &Controller::AckCommandComplete)); m_mode = MODE_DEFAULT; } void ExitEditMode() { if (m_mode != MODE_DEFAULT) { cout << "Edit aborted" << endl; m_mode = MODE_DEFAULT; } } void SendZeroDMX() { _SendDMX(NULL, 0); } void SendDoubleDMX() { uint8_t payload[512]; memset(payload, 0, 512); payload[0] = m_dmx_slot_data; _SendDMX(payload, arraysize(payload)); m_dmx_slot_data += 16; payload[0] = m_dmx_slot_data; _SendDMX(payload, arraysize(payload)); m_dmx_slot_data += 16; } void SendDMX() { if (!CheckForWidget()) { return; } uint8_t payload[512]; memset(payload, 0, 512); payload[0] = m_dmx_slot_data; _SendDMX(payload, arraysize(payload)); m_dmx_slot_data += 16; } void SendEcho() { if (!CheckForWidget()) { return; } const char payload[] = "echo test"; m_widget->SendCommand( FLAGS_port, ola::usb::JARULE_CMD_ECHO, reinterpret_cast(payload), arraysize(payload), NewSingleCallback(this, &Controller::EchoCommandComplete)); } void GetTime(TimingOption option) { if (!CheckForWidget()) { return; } const TimingSetting* setting = STLFind(&m_timing_settings, option); if (!setting) { OLA_WARN << "Missing timing setting " << option; return; } m_widget->SendCommand( FLAGS_port, setting->get_command, NULL, 0, NewSingleCallback(this, &Controller::DisplayTime, option)); } void SendDUB(UID lower, UID upper) { if (!CheckForWidget()) { return; } auto_ptr request( ola::rdm::NewDiscoveryUniqueBranchRequest(m_our_uid, lower, upper, 0)); unsigned int rdm_length = RDMCommandSerializer::RequiredSize(*request); uint8_t data[rdm_length]; RDMCommandSerializer::Pack(*request, data, &rdm_length); OLA_INFO << "Sending " << rdm_length << " byte RDM command."; m_widget->SendCommand( FLAGS_port, ola::usb::JARULE_CMD_RDM_DUB_REQUEST, data, rdm_length, NewSingleCallback(this, &Controller::DUBCommandComplete)); } void SendIdentify(bool identify_on) { if (!CheckForWidget()) { return; } uint8_t param_data = identify_on; RDMSetRequest request(m_our_uid, m_target_uid, 0, 0, 0, ola::rdm::PID_IDENTIFY_DEVICE, ¶m_data, sizeof(param_data)); unsigned int rdm_length = RDMCommandSerializer::RequiredSize(request); uint8_t data[rdm_length]; RDMCommandSerializer::Pack(request, data, &rdm_length); m_widget->SendCommand( FLAGS_port, ola::usb::JARULE_CMD_RDM_REQUEST, data, rdm_length, NewSingleCallback(this, &Controller::CommandComplete)); } void SendMute(UID target) { if (!CheckForWidget()) { return; } auto_ptr request( ola::rdm::NewMuteRequest(m_our_uid, target, 0)); CommandClass command_class = target.IsBroadcast() ? ola::usb::JARULE_CMD_RDM_BROADCAST_REQUEST : ola::usb::JARULE_CMD_RDM_REQUEST; unsigned int rdm_length = RDMCommandSerializer::RequiredSize(*request); uint8_t data[rdm_length]; RDMCommandSerializer::Pack(*request, data, &rdm_length); m_widget->SendCommand( FLAGS_port, command_class, data, rdm_length, NewSingleCallback(this, &Controller::CommandComplete)); } void SendUnMute(UID target) { if (!CheckForWidget()) { return; } auto_ptr request( ola::rdm::NewUnMuteRequest(m_our_uid, target, 0)); CommandClass command_class = target.IsBroadcast() ? ola::usb::JARULE_CMD_RDM_BROADCAST_REQUEST : ola::usb::JARULE_CMD_RDM_REQUEST; unsigned int rdm_length = RDMCommandSerializer::RequiredSize(*request); uint8_t data[rdm_length]; RDMCommandSerializer::Pack(*request, data, &rdm_length); m_widget->SendCommand( FLAGS_port, command_class, data, rdm_length, NewSingleCallback(this, &Controller::CommandComplete)); } void GetHardwareInfo() { if (!CheckForWidget()) { return; } m_widget->SendCommand( FLAGS_port, ola::usb::JARULE_CMD_GET_HARDWARE_INFO, NULL, 0, NewSingleCallback(this, &Controller::HardwareInfoComplete)); } void RunSelfTest() { if (!CheckForWidget()) { return; } uint8_t mode = ola::usb::SELF_TEST_MODE; m_widget->SendCommand( FLAGS_port, ola::usb::JARULE_CMD_SET_MODE, &mode, sizeof(mode), NewSingleCallback(this, &Controller::SelfTestPart1Complete)); } bool CheckResult(ola::usb::USBCommandResult result, uint8_t status_flags) { if (result != ola::usb::COMMAND_RESULT_OK) { OLA_WARN << "Error: " << result; return false; } if (status_flags & ola::usb::FLAGS_CHANGED_FLAG) { OLA_INFO << "Flags changed!"; } if (status_flags & ola::usb::MSG_TRUNCATED_FLAG) { OLA_INFO << "Message truncated"; } return true; } string FormatTime(TimingUnit units, uint16_t value) { std::stringstream str; if (units == TIMING_UNITS_MICROSECONDS) { str << value << " us"; } else if (units == TIMING_UNITS_TENTHS_OF_MILLI_SECONDS) { float adjusted_time = value / 10.0; str << adjusted_time << " ms"; } return str.str(); } DISALLOW_COPY_AND_ASSIGN(Controller); }; void ParseUID(const string &uid_str, UID *uid) { auto_ptr target_uid(UID::FromString(uid_str)); if (!target_uid.get()) { OLA_WARN << "Invalid UID: '" << uid_str << "'"; exit(ola::EXIT_USAGE); } *uid = *target_uid; } /* * Main. */ int main(int argc, char **argv) { ola::AppInit(&argc, argv, "[ options ]", "Ja Rule Admin Tool"); UID target_uid(0, 0), lower_uid(0, 0), upper_uid(0, 0); ParseUID(FLAGS_target_uid.str(), &target_uid); ParseUID(FLAGS_lower_uid.str(), &lower_uid); ParseUID(FLAGS_upper_uid.str(), &upper_uid); SelectServer ss; Controller controller(&ss, target_uid, lower_uid, upper_uid); USBDeviceManager manager( &ss, NewCallback(&controller, &Controller::WidgetEvent)); if (!manager.Start()) { exit(ola::EXIT_UNAVAILABLE); } // Print this via cout to ensure we actually get some output by default cout << "Press h to print a help message" << endl; ss.Run(); return ola::EXIT_OK; } ola-0.10.9/tools/ja-rule/USBDeviceManager.cpp0000664000175000017500000001443214376533110015555 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * USBDeviceManager.cpp * Handles auto-detection of Ja Rule widgets. * Copyright (C) 2015 Simon Newton */ #include "tools/ja-rule/USBDeviceManager.h" #include #include #include #include #include #include #include #include #include #include "libs/usb/LibUsbAdaptor.h" #include "libs/usb/LibUsbThread.h" using ola::NewCallback; using ola::NewSingleCallback; using ola::io::SelectServer; using ola::thread::Future; using ola::thread::Thread; using ola::usb::AsyncronousLibUsbAdaptor; using ola::usb::JaRuleWidget; using ola::usb::LibUsbAdaptor; using ola::usb::USBDeviceID; using ola::usb::HotplugAgent; using std::auto_ptr; static const uint16_t kProductId = 0xaced; static const uint16_t kVendorId = 0x1209; USBDeviceManager::USBDeviceManager(SelectServer* ss, NotificationCallback* notification_cb) : m_ss(ss), m_notification_cb(notification_cb), m_cleanup_thread(Thread::Options("cleanup-thread")), m_start_thread_id(), m_in_start(false) { } USBDeviceManager::~USBDeviceManager() { Stop(); } bool USBDeviceManager::Start() { m_start_thread_id = Thread::Self(); m_in_start = true; m_hotplug_agent.reset(new HotplugAgent( NewCallback(this, &USBDeviceManager::HotPlugEvent), 3)); if (!m_hotplug_agent->Init()) { return false; } if (!m_hotplug_agent->Start()) { return false; } m_cleanup_thread.Start(); m_in_start = false; return true; } bool USBDeviceManager::Stop() { if (!m_hotplug_agent.get()) { return true; } // At this point there may be: // - notifications queued on the ss. // - A new event about to arrive from the HotplugAgent // Stop receiving notifications, this prevents any further calls to // HotPlugEvent. m_hotplug_agent->HaltNotifications(); // Now process any callbacks on the SS so all notifications complete. m_ss->DrainCallbacks(); // Clean up any remaining widgets. WidgetMap::iterator iter = m_widgets.begin(); for (; iter != m_widgets.end(); ++iter) { if (iter->second) { m_notification_cb->Run(WIDGET_REMOVED, iter->second); m_cleanup_thread.Execute(ola::DeletePointerCallback(iter->second)); } } m_widgets.clear(); // Blocks until all widgets have been deleted. m_cleanup_thread.Stop(); // Now we can finally stop the libusb thread. m_hotplug_agent->Stop(); m_hotplug_agent.reset(); return true; } void USBDeviceManager::HotPlugEvent(HotplugAgent::EventType event, struct libusb_device *usb_device) { // See the comments under libusb_hotplug_register_callback in the libusb // documentation. There are a number of caveats. struct libusb_device_descriptor descriptor; libusb_get_device_descriptor(usb_device, &descriptor); OLA_DEBUG << "idProduct: " << descriptor.idProduct << ", idVendor: " << descriptor.idVendor; if (descriptor.idVendor != kVendorId || descriptor.idProduct != kProductId) { return; } USBDeviceID device_id = m_hotplug_agent->GetUSBAdaptor()->GetDeviceId(usb_device); if (event == HotplugAgent::DEVICE_ADDED) { WidgetMap::iterator iter = ola::STLLookupOrInsertNull(&m_widgets, device_id); if (iter->second) { // Dup event return; } auto_ptr widget( new JaRuleWidget(m_ss, m_hotplug_agent->GetUSBAdaptor(), usb_device)); if (!widget->Init()) { m_widgets.erase(iter); return; } iter->second = widget.release(); SignalEvent(WIDGET_ADDED, iter->second); } else if (event == HotplugAgent::DEVICE_REMOVED) { JaRuleWidget *widget = NULL; if (!ola::STLLookupAndRemove(&m_widgets, device_id, &widget) || widget == NULL) { return; } SignalEvent(WIDGET_REMOVED, widget); /* * The deletion process goes something like: * - cancel any pending transfers * - wait for the transfer callbacks to complete (executed in the libusb * thread) * - close the libusb device * * These all take place in the destructor of the JaRuleWidget. * * To avoid deadlocks, we perform the deletion in a separate thread. That * way ~JaRuleWidget() can block waiting for the transfer callbacks to * run, without having to worry about blocking the hotplug thread. */ m_cleanup_thread.Execute(ola::DeletePointerCallback(widget)); } } void USBDeviceManager::SignalEvent(EventType event, JaRuleWidget* widget) { if (!m_notification_cb.get()) { return; } // Because pthread_t is a struct on Windows and there's no invalid process // value, we separately track if we're in start or not too if (m_in_start && pthread_equal(m_start_thread_id, Thread::Self())) { // We're within Start(), so we can execute the callbacks directly. m_notification_cb->Run(event, widget); } else { // We're not within Start(), which means we're running on the hotplug agent // thread. Schedule the callback to run and wait for it to complete. // By waiting we ensure the callback has completed before we go ahead and // delete the widget. Future f; m_ss->Execute(NewSingleCallback(this, &USBDeviceManager::WidgetEvent, event, widget, &f)); f.Get(); } } void USBDeviceManager::WidgetEvent(EventType event, JaRuleWidget* widget, Future* f) { m_notification_cb->Run(event, widget); f->Set(); } ola-0.10.9/tools/ja-rule/Makefile.mk0000664000175000017500000000204714376533110014052 00000000000000if BUILD_JA_RULE bin_PROGRAMS += tools/ja-rule/ja-rule \ tools/ja-rule/ja-rule-controller endif tools_ja_rule_ja_rule_SOURCES = \ tools/ja-rule/USBDeviceManager.cpp \ tools/ja-rule/USBDeviceManager.h \ tools/ja-rule/ja-rule.cpp tools_ja_rule_ja_rule_CXXFLAGS = $(COMMON_CXXFLAGS) $(libusb_CFLAGS) tools_ja_rule_ja_rule_LDADD = $(libusb_LIBS) \ common/libolacommon.la \ plugins/usbdmx/libolausbdmxwidget.la \ libs/usb/libolausb.la tools_ja_rule_ja_rule_controller_SOURCES = \ tools/ja-rule/USBDeviceManager.cpp \ tools/ja-rule/USBDeviceManager.h \ tools/ja-rule/ja-rule-controller.cpp tools_ja_rule_ja_rule_controller_CXXFLAGS = $(COMMON_CXXFLAGS) $(libusb_CFLAGS) tools_ja_rule_ja_rule_controller_LDADD = $(libusb_LIBS) \ common/libolacommon.la \ plugins/usbdmx/libolausbdmxwidget.la \ libs/usb/libolausb.la ola-0.10.9/tools/ja-rule/ja-rule-controller.cpp0000664000175000017500000001430614376533110016231 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ja-rule-controller.cpp * A basic RDM controller that uses the Ja Rule interface. * Copyright (C) 2015 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "libs/usb/JaRuleWidget.h" #include "libs/usb/JaRulePortHandle.h" #include "tools/ja-rule/USBDeviceManager.h" using ola::NewCallback; using ola::NewSingleCallback; using ola::io::SelectServer; using ola::io::StdinHandler; using ola::rdm::RDMSetRequest; using ola::rdm::UID; using ola::rdm::UIDSet; using ola::usb::JaRuleWidget; using ola::usb::JaRulePortHandle; using std::auto_ptr; using std::cerr; using std::cout; using std::endl; using std::string; /** * @brief Wait on input from the keyboard, and based on the input, send * messages to the device. */ class Controller { public: explicit Controller(SelectServer* ss) : m_ss(ss), m_widget(NULL), m_port(NULL), m_stdin_handler( new StdinHandler(ss, ola::NewCallback(this, &Controller::Input))), m_mode(NORMAL), m_selected_uid(0, 0) { } ~Controller() { m_stdin_handler.reset(); } void WidgetEvent(USBDeviceManager::EventType event, JaRuleWidget *widget) { if (event == USBDeviceManager::WIDGET_ADDED) { OLA_INFO << "Open Lighting Device added"; if (m_widget) { // We only support a single device for now OLA_WARN << "More than one device present"; return; } m_widget = widget; m_port = widget->ClaimPort(0); } else { OLA_INFO << "Open Lighting Device removed"; if (widget == m_widget) { m_widget->ReleasePort(0); m_port = NULL; m_widget = NULL; } } } void Input(int c) { if (m_mode == SELECT_UID) { UIDSet::Iterator iter = m_uids.Begin(); char index = 'A'; for (; iter != m_uids.End() && index <= 'Z'; ++iter, index++) { if (c == index) { m_selected_uid = *iter; cout << "Selected " << *iter << endl; m_mode = NORMAL; return; } } cerr << "Unknown selection, try again" << endl; return; } switch (c) { case 'i': SetIdentify(true); break; case 'I': SetIdentify(false); break; case 'd': RunDiscovery(false); break; case 'h': PrintCommands(); break; case 'p': RunDiscovery(true); break; case 'q': m_ss->Terminate(); break; case 's': if (m_uids.Empty()) { cout << "No UIDs found to select from" << endl; } else { cout << "Enter a letter for the UID" << endl; m_mode = SELECT_UID; } break; case 'u': ShowUIDs(); break; default: {} } } void PrintCommands() { cout << "Commands:" << endl; cout << " i - Identify On" << endl; cout << " I - Identify Off" << endl; cout << " d - Run Full Discovery" << endl; cout << " h - Print this help message" << endl; cout << " p - Run Incremental Discovery" << endl; cout << " q - Quit" << endl; cout << " s - Select UID" << endl; cout << " u - Show UIDs" << endl; } private: typedef enum { NORMAL, SELECT_UID, } Mode; SelectServer* m_ss; JaRuleWidget *m_widget; JaRulePortHandle *m_port; auto_ptr m_stdin_handler; UIDSet m_uids; Mode m_mode; UID m_selected_uid; void SetIdentify(bool identify_on) { if (!m_widget) { return; } if (m_uids.Empty()) { OLA_WARN << "No UIDs"; return; } uint8_t param_data = identify_on; RDMSetRequest *request = new RDMSetRequest( m_widget->GetUID(), m_selected_uid, 0, 0, 0, ola::rdm::PID_IDENTIFY_DEVICE, ¶m_data, sizeof(param_data)); m_port->SendRDMRequest(request, NULL); } void RunDiscovery(bool incremental) { if (!m_widget) { return; } if (incremental) { m_port->RunIncrementalDiscovery( NewSingleCallback(this, &Controller::DiscoveryComplete)); } else { m_port->RunFullDiscovery( NewSingleCallback(this, &Controller::DiscoveryComplete)); } } void DiscoveryComplete(const UIDSet& uids) { m_uids = uids; ShowUIDs(); } void ShowUIDs() { UIDSet::Iterator iter = m_uids.Begin(); cout << "---------- " << m_uids.Size() << " UIDs -------" << endl; char c = 'A'; for (; iter != m_uids.End(); ++iter) { if (c <= 'Z') { cout << *iter << " (" << c++ << ")" << endl; } else { cout << *iter << endl; } } cout << "-------------------------" << endl; } DISALLOW_COPY_AND_ASSIGN(Controller); }; /* * Main. */ int main(int argc, char **argv) { ola::AppInit(&argc, argv, "[ options ]", "Ja Rule Admin Tool"); SelectServer ss; Controller controller(&ss); USBDeviceManager manager( &ss, NewCallback(&controller, &Controller::WidgetEvent)); if (!manager.Start()) { exit(ola::EXIT_UNAVAILABLE); } // Print this via cout to ensure we actually get some output by default cout << "Press h to print a help message" << endl; ss.Run(); return ola::EXIT_OK; } ola-0.10.9/tools/ja-rule/USBDeviceManager.h0000664000175000017500000000747514376533110015233 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * USBDeviceManager.h * Handles auto-detection of Ja Rule widgets. * Copyright (C) 2015 Simon Newton */ #ifndef TOOLS_JA_RULE_USBDEVICEMANAGER_H_ #define TOOLS_JA_RULE_USBDEVICEMANAGER_H_ #include #include #include #include #include #include #include #include #include #include "libs/usb/HotplugAgent.h" #include "libs/usb/JaRuleWidget.h" #include "libs/usb/Types.h" /** * @brief Manages adding / removing Open Lighting Devices. * * As Open Lighting Widgets are added or removed, this executes the * callback to notify the recipient. */ class USBDeviceManager { public: enum EventType { WIDGET_ADDED, //!< The widget was added. WIDGET_REMOVED, //!< The widget ws removed. }; /** * @brief Indicates a device has been added or removed */ typedef ola::Callback2 NotificationCallback; /** * @brief Create a new USBDeviceManager. * @param ss The executor to run the notification_cb on. * @param notification_cb The callback to run when the widget is added or * removed. Ownership is transferred. */ USBDeviceManager(ola::io::SelectServer* ss, NotificationCallback* notification_cb); /** * @brief Destructor. * * This will stop the USBDeviceManager if it's still running. */ ~USBDeviceManager(); /** * @brief Get the AsyncronousLibUsbAdaptor to use. * @returns An AsyncronousLibUsbAdaptor, ownership is not transferred. * @pre Must be called after Start() * * The adaptor is valid until the call to Stop(). */ ola::usb::AsyncronousLibUsbAdaptor *GetUSBAdaptor() const; /** * @brief Start the device manager. * @returns true if the manager started correctly, false otherwise. */ bool Start(); /** * @brief Stop the device manager. * @returns true if stopped correctly, false otherwise. * * Stop() may result in notifications being run, however once Stop() returns, * no further calls to the notification callback will be made. */ bool Stop(); /** * @brief Called by the HotplugAgent when a USB device is added or * removed. * * This can be called from either the thread that called Start() or from the * hotplug thread. */ void HotPlugEvent(ola::usb::HotplugAgent::EventType event, struct libusb_device *usb_device); private: typedef std::map WidgetMap; ola::io::SelectServer* m_ss; std::auto_ptr const m_notification_cb; std::auto_ptr m_hotplug_agent; ola::thread::ExecutorThread m_cleanup_thread; ola::thread::ThreadId m_start_thread_id; bool m_in_start; WidgetMap m_widgets; void SignalEvent(EventType event, ola::usb::JaRuleWidget* widget); void WidgetEvent(EventType event, ola::usb::JaRuleWidget* widget, ola::thread::Future* f); DISALLOW_COPY_AND_ASSIGN(USBDeviceManager); }; #endif // TOOLS_JA_RULE_USBDEVICEMANAGER_H_ ola-0.10.9/tools/usbpro/0000775000175000017500000000000014376533271012044 500000000000000ola-0.10.9/tools/usbpro/download_firmware.sh0000775000175000017500000000010514376533110016012 00000000000000#!/bin/bash wget http://www.enttec.com/firmware/usb_pro/dmx_144.bin ola-0.10.9/tools/usbpro/usbpro-firmware.cpp0000664000175000017500000001632514376533110015613 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * usbpro-firmware.cpp * Copyright (C) 2005 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include "plugins/usbpro/BaseUsbProWidget.h" using std::cout; using std::endl; using std::ifstream; using std::string; using ola::plugin::usbpro::DispatchingUsbProWidget; using ola::io::SelectServer; static const char DEFAULT_DEVICE[] = "/dev/ttyUSB0"; static const char DEFAULT_FIRMWARE[] = "main.bin"; static const int PAUSE_DELAY = 1000; // ms before starting upload static const int ABORT_TIMEOUT = 10 * 1000; // ms seconds before aborting typedef struct { bool help; ola::log_level log_level; string firmware; string device; } options; class FirmwareTransferer { public: FirmwareTransferer(ifstream *file, DispatchingUsbProWidget *widget, SelectServer *ss): m_successful(false), m_firmware(file), m_widget(widget), m_ss(ss) { } bool SendReprogram(); void HandleMessage(uint8_t label, const uint8_t *data, unsigned int length); bool SendNextChunk(); void AbortTransfer() { m_ss->Terminate(); } void StartTransfer() { SendNextChunk(); } bool WasSucessfull() const { return m_successful; } private: enum { FLASH_STATUS_LENGTH = 4 }; enum { FLASH_PAGE_LENGTH = 64 }; bool m_successful; ifstream *m_firmware; DispatchingUsbProWidget *m_widget; SelectServer *m_ss; static const uint8_t REPROGRAM_LABEL = 1; static const uint8_t FLASH_PAGE_LABEL = 2; static const char REPLY_SUCCESS[]; }; const char FirmwareTransferer::REPLY_SUCCESS[] = "TRUE"; /* * Send the re-program request */ bool FirmwareTransferer::SendReprogram() { return m_widget->SendMessage(REPROGRAM_LABEL, NULL, 0); } /* * Handle the flash page replies */ void FirmwareTransferer::HandleMessage(uint8_t label, const uint8_t *data, unsigned int length) { if (label != FLASH_PAGE_LABEL || length != FLASH_STATUS_LENGTH) return; if (0 == memcmp(data, REPLY_SUCCESS, sizeof(FLASH_STATUS_LENGTH))) { if (!SendNextChunk() || m_successful) m_ss->Terminate(); } else { OLA_FATAL << "Bad response from widget: " << string((const char*) data, 4); m_ss->Terminate(); } } /* * Send the next chunk of the firmware file */ bool FirmwareTransferer::SendNextChunk() { uint8_t page[FLASH_PAGE_LENGTH]; m_firmware->read(reinterpret_cast(page), FLASH_PAGE_LENGTH); std::streamsize size = m_firmware->gcount(); if (!size) { m_successful = true; cout << endl; return true; } cout << "."; fflush(stdout); return m_widget->SendMessage(FLASH_PAGE_LABEL, page, size); } /* * Parse our command line options */ void ParseOptions(int argc, char *argv[], options *opts) { static struct option long_options[] = { {"device", required_argument, 0, 'd'}, {"firmware", required_argument, 0, 'f'}, {"help", no_argument, 0, 'h'}, {"log-level", required_argument, 0, 'l'}, {0, 0, 0, 0} }; int option_index = 0; while (1) { int c = getopt_long(argc, argv, "d:f:hl:", long_options, &option_index); if (c == -1) break; switch (c) { case 0: break; case 'd': opts->device = optarg; break; case 'f': opts->firmware = optarg; break; case 'h': opts->help = true; break; case 'l': switch (atoi(optarg)) { case 0: // nothing is written at this level // so this turns logging off opts->log_level = ola::OLA_LOG_NONE; break; case 1: opts->log_level = ola::OLA_LOG_FATAL; break; case 2: opts->log_level = ola::OLA_LOG_WARN; break; case 3: opts->log_level = ola::OLA_LOG_INFO; break; case 4: opts->log_level = ola::OLA_LOG_DEBUG; break; default : break; } break; case '?': break; default: break; } } return; } /* * Display the help message */ void DisplayHelpAndExit(char *argv[]) { cout << "Usage: " << argv[0] << " -d -f \n" "\n" "Flash the firmware on an Enttec USB Pro device.\n" "\n" " -d, --device The path to the device.\n" " -f, --firmware The path to the firmware to use.\n" " -h, --help Display this help message and exit.\n" " -l, --log-level Set the logging level 0 .. 4.\n" << endl; exit(0); } void Stop(SelectServer *ss) { ss->Terminate(); } /* * Flashes the device */ int main(int argc, char *argv[]) { options opts; opts.log_level = ola::OLA_LOG_WARN; opts.help = false; opts.firmware = DEFAULT_FIRMWARE; opts.device = DEFAULT_DEVICE; ParseOptions(argc, argv, &opts); if (opts.help) DisplayHelpAndExit(argv); ola::InitLogging(opts.log_level, ola::OLA_LOG_STDERR); ifstream firmware_file(opts.firmware.data()); if (!firmware_file.is_open()) { OLA_FATAL << "Can't open the firmware file " << opts.firmware << ": " << strerror(errno); exit(1); } SelectServer ss; ola::io::ConnectedDescriptor *descriptor = ola::plugin::usbpro::BaseUsbProWidget::OpenDevice(opts.device); if (!descriptor) exit(ola::EXIT_UNAVAILABLE); descriptor->SetOnClose(ola::NewSingleCallback(&Stop, &ss)); ss.AddReadDescriptor(descriptor); DispatchingUsbProWidget widget(descriptor, NULL); FirmwareTransferer transferer(&firmware_file, &widget, &ss); widget.SetHandler( ola::NewCallback(&transferer, &FirmwareTransferer::HandleMessage)); if (!transferer.SendReprogram()) { OLA_FATAL << "Send message failed"; exit(1); } ss.RegisterSingleTimeout( PAUSE_DELAY, ola::NewSingleCallback(&transferer, &FirmwareTransferer::StartTransfer)); widget.GetDescriptor()->SetOnClose( ola::NewSingleCallback(&transferer, &FirmwareTransferer::AbortTransfer)); ss.RegisterSingleTimeout( ABORT_TIMEOUT, ola::NewSingleCallback(&transferer, &FirmwareTransferer::AbortTransfer)); ss.Run(); firmware_file.close(); return !transferer.WasSucessfull(); } ola-0.10.9/tools/usbpro/Makefile.mk0000664000175000017500000000046714376533110014031 00000000000000dist_noinst_SCRIPTS += tools/usbpro/download_firmware.sh bin_PROGRAMS += tools/usbpro/usbpro_firmware tools_usbpro_usbpro_firmware_SOURCES = tools/usbpro/usbpro-firmware.cpp tools_usbpro_usbpro_firmware_LDADD = common/libolacommon.la \ plugins/usbpro/libolausbprowidget.la ola-0.10.9/tools/ola_trigger/0000775000175000017500000000000014376533272013031 500000000000000ola-0.10.9/tools/ola_trigger/ParserActions.cpp0000664000175000017500000001301014376533110016214 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ParserActions.cpp * Copyright (C) 2011 Simon Newton * * These functions all called by the parser. They modify the globals defined in * ParserGlobals.h */ #define __STDC_LIMIT_MACROS // for UINT8_MAX & friends #include #include #include #include #include #include #include #include "tools/ola_trigger/Action.h" #include "tools/ola_trigger/ConfigCommon.h" #include "tools/ola_trigger/Context.h" #include "tools/ola_trigger/ParserActions.h" #include "tools/ola_trigger/ParserGlobals.h" using std::string; using std::vector; extern int yylineno; // defined and maintained in lex.yy.cpp /** * Lookup the Slot objects associated with a slot offset. This creates * one if it doesn't already exist. * @param slot the slot offset to lookup * @return A Slot object */ Slot *LookupSlot(uint16_t slot) { SlotActionMap::iterator iter = global_slots.find(slot); if (iter != global_slots.end()) return iter->second; Slot *actions = new Slot(slot); global_slots[slot] = actions; return actions; } /** * Check a slot offset is valid */ void CheckSlotOffset(unsigned int slot) { if (slot == 0 || slot > ola::DMX_UNIVERSE_SIZE) { OLA_FATAL << "Line " << yylineno << ": slot offset " << slot << " invalid"; exit(ola::EXIT_DATAERR); } } /** * Set the default value of a variable * @param input a two element vector in the form [variable_name, value] */ void SetDefaultValue(vector *input) { if (input->size() != 2) { OLA_FATAL << "Line " << yylineno << ": assignment size != 2. Size is " << input->size(); exit(ola::EXIT_DATAERR); } global_context->Update((*input)[0], (*input)[1]); // delete the pointer since we're done delete input; } /** * Create a new VariableAssignmentAction. * @param input a two element vector in the form [variable_name, value] * @returns a VariableAssignmentAction object */ Action *CreateAssignmentAction(vector *input) { if (input->size() != 2) { OLA_FATAL << "Line " << yylineno << ": assignment action size != 2. Size is " << input->size(); exit(ola::EXIT_DATAERR); } Action *action = new VariableAssignmentAction((*input)[0], (*input)[1]); delete input; return action; } /** * Create a new CommandAction. * @param command the command to run * @param args a list of arguments for the command * @returns a CommandAction object */ Action *CreateCommandAction(const string &command, vector *args) { Action *action = new CommandAction(command, *args); delete args; return action; } /** * Create a new ValueInterval object * @param lower the lower bound * @param upper the upper bound * @returns a new ValueInterval object */ ValueInterval *CreateInterval(unsigned int lower, unsigned int upper) { if (lower > upper) { OLA_FATAL << "Line " << yylineno << ": invalid interval " << lower << "-" << upper; exit(ola::EXIT_DATAERR); } if (upper > UINT8_MAX) { OLA_FATAL << "Line " << yylineno << ": invalid DMX value " << upper; exit(ola::EXIT_DATAERR); } return new ValueInterval(lower, upper); } /** * Associate an action with a set of values on a particular slot. * @param slot the slot offset * @param slot_values a vector of ValueIntervals to trigger this action * @param action the Action object to use */ void SetSlotAction(unsigned int slot, IntervalList *slot_intervals, Action *rising_action, Action *falling_action) { CheckSlotOffset(slot); slot--; // convert from 1 to 0 indexed slots Slot *slots = LookupSlot(slot); IntervalList::iterator iter = slot_intervals->begin(); for (; iter != slot_intervals->end(); iter++) { if (!slots->AddAction(**iter, rising_action, falling_action)) { OLA_FATAL << "Line " << yylineno << ": value " << **iter << " collides with existing values."; exit(ola::EXIT_DATAERR); } delete *iter; } delete slot_intervals; } /** * Set the default action for a slot * @param slot the slot offset * @param action the action to use as the default */ void SetDefaultAction(unsigned int slot, Action *rising_action, Action *falling_action) { CheckSlotOffset(slot); slot--; // convert from 1 to 0 indexed slots Slot *slots = LookupSlot(slot); if (rising_action) { if (slots->SetDefaultRisingAction(rising_action)) { OLA_FATAL << "Multiple default rising actions defined for slot " << slot + 1 << ", line " << yylineno; exit(ola::EXIT_DATAERR); } } if (falling_action) { if (slots->SetDefaultFallingAction(falling_action)) { OLA_FATAL << "Multiple default falling actions defined for slot " << slot + 1 << ", line " << yylineno; exit(ola::EXIT_DATAERR); } } } ola-0.10.9/tools/ola_trigger/DMXTrigger.h0000664000175000017500000000245514376533110015073 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMXTrigger.h * Copyright (C) 2011 Simon Newton */ #ifndef TOOLS_OLA_TRIGGER_DMXTRIGGER_H_ #define TOOLS_OLA_TRIGGER_DMXTRIGGER_H_ #include #include #include "tools/ola_trigger/Action.h" /* * The class which manages the triggering. */ class DMXTrigger { public: typedef std::vector SlotVector; DMXTrigger(Context *context, const SlotVector &actions); ~DMXTrigger() {} void NewDMX(const ola::DmxBuffer &data); private: Context *m_context; SlotVector m_slots; // kept sorted }; #endif // TOOLS_OLA_TRIGGER_DMXTRIGGER_H_ ola-0.10.9/tools/ola_trigger/config.ypp0000664000175000017500000000721214376533110014741 00000000000000%{ #include #include #include #include #include "tools/ola_trigger/ConfigCommon.h" #include "tools/ola_trigger/ParserActions.h" int yyerror(const char *s); int yylex(void); %} %union{ unsigned int int_val; std::string *str_val; std::vector *str_list; class Action *action; IntervalList *interval_list; ValueInterval *interval; std::pair *action_pair; } %start config %token NEW_LINE %token WHITESPACE %token INTEGER_LITERAL %token QUOTED_VALUE %token WORD_LITERAL %type value %type program %type full_path %type arguments %type argument %type assignment %type action %type actions %type falling_action %type optional_falling_action %type slot_values_match %type slot_values %type slot_value_range %% config : /* empty */ | config line ; line : optional_whitespace NEW_LINE | expression optional_whitespace NEW_LINE ; expression : assignment { SetDefaultValue($1); } | action_directive ; assignment : WORD_LITERAL optional_whitespace '=' optional_whitespace value { $$ = new std::vector; $$->push_back(*$1); $$->push_back(*$5); delete $1; delete $5; } ; value : WORD_LITERAL | QUOTED_VALUE ; optional_whitespace: /* empty */ | WHITESPACE ; action_directive: INTEGER_LITERAL WHITESPACE slot_values_match WHITESPACE actions { if ($3 == NULL) { SetDefaultAction($1, $5->first, $5->second); } else { SetSlotAction($1, $3, $5->first, $5->second); } delete $5; } ; slot_values_match: '%' { $$ = NULL; } | slot_values { $$ = $1; } ; slot_values: slot_value_range { $$ = new IntervalList(); $$->push_back($1); } | slot_values ',' slot_value_range { $$ = $1; $$->push_back($3); } ; slot_value_range: INTEGER_LITERAL { $$ = CreateInterval($1, $1); } | INTEGER_LITERAL '-' INTEGER_LITERAL { $$ = CreateInterval($1, $3); } ; actions: action { $$ = new ActionPair($1, $1); } | falling_action { $$ = new ActionPair(NULL, $1); } | '+' action optional_falling_action { $$ = new std::pair($2, $3); } ; falling_action: '-' action { $$ = $2; } ; optional_falling_action: /* empty */ { $$ = NULL; } | WHITESPACE falling_action { $$ = $2; } ; action: assignment { $$ = CreateAssignmentAction($1); } | '`' program arguments '`' optional_whitespace { $$ = CreateCommandAction(*$2, $3); delete $2; } ; arguments: /* empty */ { $$ = new std::vector(); } | arguments WHITESPACE argument { $$ = $1; $$->push_back(std::string(*$3)); delete $3; } ; argument: WORD_LITERAL | QUOTED_VALUE ; program: WORD_LITERAL | QUOTED_VALUE | full_path ; full_path: '/' WORD_LITERAL { $$ = new std::string("/"); $$->append(*$2); delete $2; } | full_path '/' WORD_LITERAL { $$ = new std::string(*$1); $$->append("/"); $$->append(*$3); delete $1; delete $3; } ; %% extern int column; int yyerror(std::string s) { extern int yylineno; // defined and maintained in lex.yy.cpp extern char *yytext; // defined and maintained in lex.yy.cpp OLA_FATAL << "ERROR: " << s << " at symbol \"" << yytext << "\" on line " << yylineno << " column " << column; exit(1); } int yyerror(const char *s) { return yyerror(std::string(s)); } ola-0.10.9/tools/ola_trigger/ola-trigger.cpp0000664000175000017500000001373714376533110015673 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ola-trigger.cpp * Copyright (C) 2011 Simon Newton */ #include #include #include #ifndef _WIN32 #include #endif // _WIN32 #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "tools/ola_trigger/Action.h" #include "tools/ola_trigger/Context.h" #include "tools/ola_trigger/DMXTrigger.h" #include "tools/ola_trigger/ParserGlobals.h" using ola::DmxBuffer; using ola::STLDeleteElements; using ola::STLDeleteValues; using std::map; using std::string; using std::vector; DEFINE_s_uint16(offset, o, 0, "Apply an offset to the slot numbers. Valid offsets are 0 to " "512, default is 0."); DEFINE_s_uint32(universe, u, 0, "The universe to use, defaults to 0."); DEFINE_default_bool(validate, false, "Validate the config file, rather than running it."); // prototype of bison-generated parser function int yyparse(); // globals modified by the config parser Context *global_context; SlotActionMap global_slots; // The SelectServer to kill when we catch SIGINT ola::io::SelectServer *ss = NULL; typedef vector SlotList; /* * Catch SIGCHLD. */ #ifndef _WIN32 static void CatchSIGCHLD(OLA_UNUSED int signo) { pid_t pid; int old_errno = errno; do { pid = waitpid(-1, NULL, WNOHANG); } while (pid > 0); errno = old_errno; } #endif // _WIN32 /* * Terminate cleanly on interrupt */ static void CatchSIGINT(OLA_UNUSED int signo) { // there is a race condition here if you send the signal before we call Run() // it's not a huge deal though. int old_errno = errno; if (ss) { ss->Terminate(); } errno = old_errno; } /* * Install the SIGCHLD handler. */ bool InstallSignals() { #ifndef _WIN32 // There's no SIGCHILD on Windows if (!ola::InstallSignal(SIGCHLD, CatchSIGCHLD)) { return false; } #endif // _WIN32 return ola::InstallSignal(SIGINT, CatchSIGINT) && ola::InstallSignal(SIGTERM, CatchSIGINT); } /** * The DMX Handler, this calls the trigger if the universes match. */ void NewDmx(unsigned int our_universe, DMXTrigger *trigger, unsigned int universe, const DmxBuffer &data, OLA_UNUSED const string &error) { if (universe == our_universe && error.empty()) { trigger->NewDMX(data); } } /** * Build a vector of Slot from the global_slots map with the * offset applied. * * The clears the global_slots map. * @returns true if the offset was applied correctly, false otherwise. */ bool ApplyOffset(uint16_t offset, SlotList *all_slots) { bool ok = true; all_slots->reserve(global_slots.size()); SlotActionMap::const_iterator iter = global_slots.begin(); for (; iter != global_slots.end(); ++iter) { Slot *slots = iter->second; if (slots->SlotOffset() + offset >= ola::DMX_UNIVERSE_SIZE) { OLA_FATAL << "Slot " << slots->SlotOffset() << " + offset " << offset << " is greater than " << ola::DMX_UNIVERSE_SIZE - 1; ok = false; break; } slots->SetSlotOffset(slots->SlotOffset() + offset); all_slots->push_back(slots); } if (!ok) { all_slots->clear(); STLDeleteValues(&global_slots); } global_slots.clear(); return ok; } /* * Main */ int main(int argc, char *argv[]) { ola::AppInit(&argc, argv, "[options] ", "Run programs based on the values in a DMX stream."); if (FLAGS_offset >= ola::DMX_UNIVERSE_SIZE) { std::cerr << "Invalid slot offset: " << FLAGS_offset << std::endl; exit(ola::EXIT_USAGE); } if (argc != 2) ola::DisplayUsageAndExit(); // setup the default context global_context = new Context(); OLA_INFO << "Loading config from " << argv[1]; // open the config file if (freopen(argv[1], "r", stdin) == NULL) { OLA_FATAL << "File " << argv[1] << " cannot be opened.\n"; exit(ola::EXIT_DATAERR); } yyparse(); if (FLAGS_validate) { std::cout << "File " << argv[1] << " is valid." << std::endl; // TODO(Peter): Print some stats here, validate the offset if supplied STLDeleteValues(&global_slots); exit(ola::EXIT_OK); } // if we got to this stage the config is ok and we want to run it, setup the // client ola::OlaCallbackClientWrapper wrapper; if (!wrapper.Setup()) exit(ola::EXIT_UNAVAILABLE); ss = wrapper.GetSelectServer(); if (!InstallSignals()) exit(ola::EXIT_OSERR); // create the vector of Slot SlotList slots; if (ApplyOffset(FLAGS_offset, &slots)) { // setup the trigger DMXTrigger trigger(global_context, slots); // register for DMX ola::OlaCallbackClient *client = wrapper.GetClient(); client->SetDmxCallback( ola::NewCallback(&NewDmx, static_cast(FLAGS_universe), &trigger)); client->RegisterUniverse(FLAGS_universe, ola::REGISTER, NULL); // start the client wrapper.GetSelectServer()->Run(); } // cleanup STLDeleteElements(&slots); } ola-0.10.9/tools/ola_trigger/VariableInterpolator.cpp0000664000175000017500000000511314376533110017574 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * VariableInterpolator.cpp * Copyright (C) 2011 Simon Newton */ #include #include #include "tools/ola_trigger/VariableInterpolator.h" using std::string; /** * Interpolate variables within the Context input the input string. */ bool InterpolateVariables(const string &input, string *output, const Context &context) { static const char START_VARIABLE_STRING[] = "${"; static const char END_VARIABLE_STRING[] = "}"; static const char ESCAPE_CHARACTER = '\\'; *output = input; size_t pos = output->size(); while (true) { pos = output->rfind(START_VARIABLE_STRING, pos); if (pos == string::npos) break; // found a ${ if (pos != 0 && (*output)[pos - 1] == ESCAPE_CHARACTER) { // not a real ${ pos = pos - 1; continue; } // search forward for the closing brace size_t closing = output->find(END_VARIABLE_STRING, pos); if (closing == string::npos) { // not found OLA_WARN << "Variable expansion failed for " << *output << ", missing " << END_VARIABLE_STRING << " after character " << pos; return false; } // lookup size_t variable_name_pos = pos + sizeof(START_VARIABLE_STRING) - 1; const string variable = output->substr(variable_name_pos, closing - variable_name_pos); string value; if (!context.Lookup(variable, &value)) { OLA_WARN << "Unknown variable " << variable; return false; } output->replace(pos, closing - pos + 1, value); } // finally unescape any braces for (unsigned i = 0; i < output->size(); i++) { char c = (*output)[i]; if (c == START_VARIABLE_STRING[0] || c == END_VARIABLE_STRING[0]) { if (i != 0 && (*output)[i - 1] == ESCAPE_CHARACTER) output->erase(i - 1, 1); } } return true; } ola-0.10.9/tools/ola_trigger/VariableInterpolator.h0000664000175000017500000000221114376533110017235 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * VariableInterpolator.h * Copyright (C) 2011 Simon Newton */ #ifndef TOOLS_OLA_TRIGGER_VARIABLEINTERPOLATOR_H_ #define TOOLS_OLA_TRIGGER_VARIABLEINTERPOLATOR_H_ #include #include "tools/ola_trigger/Context.h" bool InterpolateVariables(const std::string &input, std::string *output, const Context &context); #endif // TOOLS_OLA_TRIGGER_VARIABLEINTERPOLATOR_H_ ola-0.10.9/tools/ola_trigger/example.conf0000664000175000017500000000166114376533110015246 00000000000000# Example DMX Trigger Config File # Variable definitions ############################################################################### # The default value of slot 3, this won't ever be used, since the variable is # only used with slot 4, which implies we already got data for slot 3. slot_3_value = "nan" # nan isn't special in any way # Triggers ############################################################################### # Slot Trigger Values Action # Slot 1 prints the current value of slot 1 1 % `echo "Slot ${slot_offset} is at ${slot_value}"` # Slot 2 runs a different command line tools 2 1 `ls` 2 2 `ps aux` 2 3 `who` # Slot 3 sets a variable 3 % slot_3_value="${slot_value}" # Slot 4 prints the value of slot3 if slot 4 is greater than 50% 4 128-255 `echo "Slot 3 is ${slot_3_value}"` ola-0.10.9/tools/ola_trigger/MockAction.h0000664000175000017500000000446614376533110015152 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * MockAction.h * A mock action uses for testing. * Copyright (C) 2011 Simon Newton */ #ifndef TOOLS_OLA_TRIGGER_MOCKACTION_H_ #define TOOLS_OLA_TRIGGER_MOCKACTION_H_ #include #include #include #include #include "tools/ola_trigger/Action.h" /** * The MockAction we use for testing. */ class MockAction: public Action { public: MockAction() : Action() {} void Execute(Context*, uint8_t slot_value) { m_values.push(slot_value); } void CheckForValue(const ola::testing::SourceLine &source_line, uint8_t expected_value) { ola::testing::_AssertEquals(source_line, static_cast(1), m_values.size(), "Queue sizes differ"); uint8_t value = m_values.front(); ola::testing::_AssertEquals(source_line, static_cast(expected_value), static_cast(value), "Values differ"); m_values.pop(); } bool NoCalls() const { return m_values.empty(); } private: std::queue m_values; }; /** * An action that should never be run. */ class BadAction: public Action { public: BadAction() : Action() {} void Execute(Context*, uint8_t slot_value) { std::ostringstream str; str << "Incorrect action called for " << static_cast(slot_value); CPPUNIT_FAIL(str.str()); } }; #endif // TOOLS_OLA_TRIGGER_MOCKACTION_H_ ola-0.10.9/tools/ola_trigger/ParserGlobals.h0000664000175000017500000000235314376533110015654 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ParserGlobals.h * Copyright (C) 2011 Simon Newton * * Unfortunately we have to use global variables because there isn't a way * to pass in data during the parse stage. */ #ifndef TOOLS_OLA_TRIGGER_PARSERGLOBALS_H_ #define TOOLS_OLA_TRIGGER_PARSERGLOBALS_H_ #include // The context object extern class Context *global_context; // A map of slot offsets to SlotAction objects typedef std::map SlotActionMap; extern SlotActionMap global_slots; #endif // TOOLS_OLA_TRIGGER_PARSERGLOBALS_H_ ola-0.10.9/tools/ola_trigger/ContextTest.cpp0000664000175000017500000000600514376533110015731 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ContextTest.cpp * Test fixture for the ActionContext class. * Copyright (C) 2011 Simon Newton */ #include #include #include "tools/ola_trigger/Context.h" #include "ola/testing/TestUtils.h" using std::string; class ContextTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ContextTest); CPPUNIT_TEST(testContext); CPPUNIT_TEST(testSlotOffsetAndValue); CPPUNIT_TEST(testAsString); CPPUNIT_TEST_SUITE_END(); public: void testContext(); void testSlotOffsetAndValue(); void testAsString(); }; CPPUNIT_TEST_SUITE_REGISTRATION(ContextTest); /** * Check that contexts work */ void ContextTest::testContext() { Context context; const string VARIABLE_ONE = "one"; const string VARIABLE_TWO = "two"; const string FOO_VALUE = "foo"; const string BAR_VALUE = "bar"; string value; OLA_ASSERT_FALSE(context.Lookup(VARIABLE_ONE, &value)); OLA_ASSERT_FALSE(context.Lookup(VARIABLE_TWO, &value)); // insert context.Update(VARIABLE_ONE, FOO_VALUE); OLA_ASSERT(context.Lookup(VARIABLE_ONE, &value)); OLA_ASSERT_EQ(FOO_VALUE, value); OLA_ASSERT_FALSE(context.Lookup(VARIABLE_TWO, &value)); // update context.Update(VARIABLE_ONE, BAR_VALUE); OLA_ASSERT(context.Lookup(VARIABLE_ONE, &value)); OLA_ASSERT_EQ(BAR_VALUE, value); OLA_ASSERT_FALSE(context.Lookup(VARIABLE_TWO, &value)); } /** * Check that the magic slot variables work. */ void ContextTest::testSlotOffsetAndValue() { Context context; string value; OLA_ASSERT_FALSE(context.Lookup(Context::SLOT_VALUE_VARIABLE, &value)); OLA_ASSERT_FALSE(context.Lookup(Context::SLOT_OFFSET_VARIABLE, &value)); context.SetSlotOffset(1); context.SetSlotValue(100); OLA_ASSERT(context.Lookup(Context::SLOT_OFFSET_VARIABLE, &value)); OLA_ASSERT_EQ(string("1"), value); OLA_ASSERT(context.Lookup(Context::SLOT_VALUE_VARIABLE, &value)); OLA_ASSERT_EQ(string("100"), value); } /** * Check we can convert to a string */ void ContextTest::testAsString() { Context context; const string VARIABLE_ONE = "one"; const string VARIABLE_TWO = "two"; const string FOO_VALUE = "foo"; const string BAR_VALUE = "bar"; context.Update(VARIABLE_ONE, FOO_VALUE); context.Update(VARIABLE_TWO, BAR_VALUE); OLA_ASSERT_EQ(string("one=foo, two=bar"), context.AsString()); } ola-0.10.9/tools/ola_trigger/Action.cpp0000664000175000017500000003250714376533110014670 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Action.cpp * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include #ifdef _WIN32 #define VC_EXTRALEAN #define WIN32_LEAN_AND_MEAN #include #include #endif // _WIN32 #include #include "tools/ola_trigger/Action.h" #include "tools/ola_trigger/VariableInterpolator.h" using std::string; using std::vector; /** * Assign the value to the variable. */ void VariableAssignmentAction::Execute(Context *context, uint8_t) { string interpolated_value; bool ok = InterpolateVariables(m_value, &interpolated_value, *context); if (ok) { if (context) { OLA_INFO << "Setting " << m_variable << " to \"" << interpolated_value << "\""; context->Update(m_variable, interpolated_value); } } else { OLA_WARN << "Failed to expand variables in " << m_value; } } /** * Execute the command */ void CommandAction::Execute(Context *context, uint8_t) { char **args = BuildArgList(context); if (ola::LogLevel() >= ola::OLA_LOG_INFO) { std::ostringstream str; char **ptr = args; str << "Executing: " << m_command << " : ["; ptr++; // skip over argv[0] while (*ptr) { str << "\"" << *ptr++ << "\""; if (*ptr) str << ", "; } str << "]"; OLA_INFO << str.str(); } #ifdef _WIN32 std::ostringstream command_line_builder; char** arg = args; // Escape argv[0] if needed if ((m_command.find(" ") != string::npos) && (m_command.find("\"") != 0)) { command_line_builder << "\"" << m_command << "\" "; } else { command_line_builder << m_command << " "; } ++arg; while (*arg) { command_line_builder << " " << *arg++; } STARTUPINFO startup_info; PROCESS_INFORMATION process_information; memset(&startup_info, 0, sizeof(startup_info)); startup_info.cb = sizeof(startup_info); memset(&process_information, 0, sizeof(process_information)); LPTSTR cmd_line = _strdup(command_line_builder.str().c_str()); if (!CreateProcessA(NULL, cmd_line, NULL, NULL, FALSE, CREATE_NEW_CONSOLE, NULL, NULL, &startup_info, &process_information)) { OLA_WARN << "Could not launch " << args[0] << ": " << GetLastError(); FreeArgList(args); } else { // Don't leak the handles CloseHandle(process_information.hProcess); CloseHandle(process_information.hThread); } free(cmd_line); #else pid_t pid; if ((pid = fork()) < 0) { OLA_FATAL << "Could not fork to exec " << m_command; FreeArgList(args); return; } else if (pid) { // parent OLA_DEBUG << "child for " << m_command << " is " << pid; FreeArgList(args); return; } execvp(m_command.c_str(), args); #endif // _WIN32 } /** * Interpolate all the arguments, and return a pointer to an array of char* * pointers which can be passed to exec() */ char **CommandAction::BuildArgList(const Context *context) { // we need to add the command here as the first arg, also +1 for the NULL unsigned int array_size = m_arguments.size() + 2; char **args = new char*[array_size]; memset(args, 0, sizeof(args[0]) * array_size); args[0] = StringToDynamicChar(m_command); vector::const_iterator iter = m_arguments.begin(); unsigned int i = 1; for (; iter != m_arguments.end(); i++, iter++) { string result; if (!InterpolateVariables(*iter, &result, *context)) { FreeArgList(args); return NULL; } args[i] = StringToDynamicChar(result); } return args; } /** * Free the arg array. */ void CommandAction::FreeArgList(char **args) { char **ptr = args; while (*ptr) delete[] *ptr++; delete[] args; } /** * Build a null terminated char* on the heap from a string. * @param str the string object to convert * @returns a new[] char with the contents of the string. */ char *CommandAction::StringToDynamicChar(const string &str) { unsigned int str_size = str.size() + 1; char *s = new char[str_size]; strncpy(s, str.c_str(), str_size); return s; } /** * Return the interval as a string. */ string ValueInterval::AsString() const { std::ostringstream str; if (m_lower == m_upper) { str << static_cast(m_lower); } else { str << "[" << static_cast(m_lower) << ", " << static_cast(m_upper) << "]"; } return str.str(); } /** * Stream operator */ std::ostream& operator<<(std::ostream &out, const ValueInterval &i) { return out << i.AsString(); } /** * Cleanup */ Slot::~Slot() { ActionVector::iterator iter = m_actions.begin(); for (; iter != m_actions.end(); iter++) delete iter->interval; m_actions.clear(); if (m_default_rising_action) m_default_rising_action->DeRef(); if (m_default_falling_action) m_default_falling_action->DeRef(); } /** * Attempt to associated an Action with a interval * @param lower_value the lower bound of the interval * @param upper_value the upper bound of the interval * @param action the Action to take if the value is contained within this * interval. * @returns true if the interval was added, false otherwise. */ bool Slot::AddAction(const ValueInterval &interval_arg, Action *rising_action, Action *falling_action) { ActionInterval action_interval( new ValueInterval(interval_arg), rising_action, falling_action); if (m_actions.empty()) { m_actions.push_back(action_interval); return true; } ActionVector::iterator lower = m_actions.begin(); if (IntervalsIntersect(action_interval.interval, lower->interval)) { delete action_interval.interval; return false; } if (*(action_interval.interval) < *(lower->interval)) { m_actions.insert(lower, action_interval); return true; } ActionVector::iterator upper = m_actions.end(); upper--; if (IntervalsIntersect(action_interval.interval, upper->interval)) { delete action_interval.interval; return false; } if (*(upper->interval) < *(action_interval.interval)) { // action_interval goes at the end m_actions.insert(m_actions.end(), action_interval); return true; } if (lower == upper) { OLA_WARN << "Inconsistent interval state, adding " << *(action_interval.interval) << ", to " << IntervalsAsString(m_actions.begin(), m_actions.end()); delete action_interval.interval; return false; } /** * We need to insert the interval between the lower and upper * @pre lower != upper * @pre the new interval falls between lower and upper * @pre lower and upper don't intersect with the new interval */ while (true) { if (lower + 1 == upper) { // the new interval goes between the two m_actions.insert(upper, action_interval); return true; } unsigned int difference = upper - lower; ActionVector::iterator mid = lower + difference / 2; if (IntervalsIntersect(action_interval.interval, mid->interval)) { delete action_interval.interval; return false; } if (*(action_interval.interval) < *(mid->interval)) { upper = mid; } else if (*(mid->interval) < *(action_interval.interval)) { lower = mid; } else { OLA_WARN << "Inconsistent intervals detected when inserting: " << *(action_interval.interval) << ", intervals: " << IntervalsAsString(lower, upper); delete action_interval.interval; return false; } } return true; } /** * Set the default rising action. If a default already exists this replaces it. * @param action the action to install as the default * @returns true if there was already a default action. */ bool Slot::SetDefaultRisingAction(Action *action) { return SetDefaultAction(&m_default_rising_action, action); } /** * Set the default falling action. If a default already exists this replaces * it. * @param action the action to install as the default * @returns true if there was already a default action. */ bool Slot::SetDefaultFallingAction(Action *action) { return SetDefaultAction(&m_default_falling_action, action); } /** * Lookup the action for a value, and if we find one, execute it. Otherwise * execute the default action if there is one. * @param context the Context to use * @param value the value to look up. */ void Slot::TakeAction(Context *context, uint8_t value) { if (m_old_value_defined && value == m_old_value) // nothing to do return; // set the context correctly if (context) { context->SetSlotOffset(m_slot_offset + 1); context->SetSlotValue(value); } bool rising = true; if (m_old_value_defined) rising = value > m_old_value; Action *action = LocateMatchingAction(value, rising); if (action) { action->Execute(context, value); } else { if (rising && m_default_rising_action) m_default_rising_action->Execute(context, value); else if (!rising && m_default_falling_action) m_default_falling_action->Execute(context, value); } m_old_value_defined = true; m_old_value = value; } /** * Return the intervals as a string, useful for debugging * @returns the intervals as a string. */ string Slot::IntervalsAsString() const { return IntervalsAsString(m_actions.begin(), m_actions.end()); } /** * Given two interval iterators, first and last, return true if the value is * contained within the lower and upper bounds of the intervals. */ bool Slot::ValueWithinIntervals(uint8_t value, const ValueInterval &lower_interval, const ValueInterval &upper_interval) { return lower_interval.Lower() <= value && value <= upper_interval.Upper(); } /** * Check if two ValueIntervals intersect. */ bool Slot::IntervalsIntersect(const ValueInterval *a1, const ValueInterval *a2) { if (a1->Intersects(*a2)) { OLA_WARN << "Interval " << *a1 << " overlaps " << *a2; return true; } return false; } /** * Given a value, find the matching ValueInterval. * @param value the value to search for * @param rising, true if the new value is rising, false otherwise. * @returns the Action matching the value, or NULL if there isn't one. */ Action *Slot::LocateMatchingAction(uint8_t value, bool rising) { if (m_actions.empty()) return NULL; ActionVector::iterator lower = m_actions.begin(); ActionVector::iterator upper = m_actions.end(); upper--; if (!ValueWithinIntervals(value, *(lower->interval), *(upper->interval))) return NULL; // ok, we know the value lies between the intervals we have, first exclude // the endpoints if (lower->interval->Contains(value)) return rising ? lower->rising_action : lower->falling_action; if (upper->interval->Contains(value)) return rising ? upper->rising_action : upper->falling_action; // value isn't at the lower or upper interval, but lies somewhere between // the two. // @pre lower != upper // @pre !lower.Contains(value) && !upper.Contains(value) while (true) { unsigned int difference = upper - lower; ActionVector::iterator mid = lower + difference / 2; if (mid == lower) // lower doesn't contain the value, so we don't have it return NULL; if (mid->interval->Contains(value)) { return rising ? mid->rising_action : mid->falling_action; } else if (value <= mid->interval->Lower()) { upper = mid; } else if (value >= mid->interval->Upper()) { lower = mid; } else { OLA_WARN << "Inconsistent intervals detected when looking for: " << static_cast(value) << ", intervals: " << IntervalsAsString(lower, upper); return NULL; } } } /** * Format the intervals between the two iterators as a string * @param start an iterator pointing to the first interval * @param end an iterator pointing to the last interval * @return a string version of the intervals. */ string Slot::IntervalsAsString( const ActionVector::const_iterator &start, const ActionVector::const_iterator &end) const { ActionVector::const_iterator iter = start; std::ostringstream str; for (; iter != end; ++iter) { if (iter != start) str << ", "; str << *(iter->interval); } return str.str(); } /** * Set one of the default actions. */ bool Slot::SetDefaultAction(Action **action_to_set, Action *new_action) { bool previous_default_set = false; new_action->Ref(); if (*action_to_set) { previous_default_set = true; (*action_to_set)->DeRef(); } *action_to_set = new_action; return previous_default_set; } ola-0.10.9/tools/ola_trigger/test_file.conf0000664000175000017500000000224114376533110015564 00000000000000# Test DMX Trigger Config File # Variable definitions slot_1_value = "a" slot_2_value = "1" slot_3_value = "nan" # nan isn't special in any way #Floating comment without space #Comment without space #Comment with leading space #Comment with leading tab # Floating comment with space # Comment with space # Comment with leading space # Comment with leading tab # The following line has a deliberate double space in it # The following line has a deliberate double tab in it # Triggers ############################################################################### # Slot Trigger Values Action # Slot 1 prints the current value of slot 1 1 % `echo "This is slot ${slot_offset}. The slot is at ${slot_value}."` # Slot 2 runs command line tools 2 1 `"/foo/bar baz" "a b c" "1" "2" "3"` 2 2 `/foo/bar/baz.sh "1" "2" "3" "d e f"` # Slot 3 sets a variable 3 % slot_3_value="${slot_value}" # Slot 4 prints the value of slot3 if slot 4 is greater than 50% # The following line deliberately ends with whitespace 4 128-255 `echo "Slot 3 is ${slot_3_value}"` ola-0.10.9/tools/ola_trigger/DMXTrigger.cpp0000664000175000017500000000302114376533110015414 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMXTrigger.cpp * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include "tools/ola_trigger/DMXTrigger.h" using ola::DmxBuffer; /** * Create a new trigger */ DMXTrigger::DMXTrigger(Context *context, const SlotVector &actions) : m_context(context), m_slots(actions) { sort(m_slots.begin(), m_slots.end()); } /** * Called when new DMX arrives. */ void DMXTrigger::NewDMX(const DmxBuffer &data) { SlotVector::iterator iter = m_slots.begin(); for (; iter != m_slots.end(); iter++) { uint16_t slot_number = (*iter)->SlotOffset(); if (slot_number >= data.Size()) { // the DMX frame was too small break; } (*iter)->TakeAction(m_context, data.Get(slot_number)); } } ola-0.10.9/tools/ola_trigger/SlotTest.cpp0000664000175000017500000002653114376533110015234 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * SlotTest.cpp * Test fixture for the Slot class. * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include "tools/ola_trigger/Action.h" #include "tools/ola_trigger/MockAction.h" using std::string; class SlotTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(SlotTest); CPPUNIT_TEST(testIntersectingIntervalAddition); CPPUNIT_TEST(testIntervalAddition); CPPUNIT_TEST(testActionMatching); CPPUNIT_TEST(testDefaultAction); CPPUNIT_TEST_SUITE_END(); public: void testIntersectingIntervalAddition(); void testIntervalAddition(); void testActionMatching(); void testDefaultAction(); void setUp() { ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); } }; CPPUNIT_TEST_SUITE_REGISTRATION(SlotTest); /** * Check that we don't add Intervals which intersect */ void SlotTest::testIntersectingIntervalAddition() { Slot slot(0); OLA_ASSERT(slot.AddAction(ValueInterval(10, 20), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(10, 20), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(8, 10), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(10, 10), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(10, 11), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(10, 25), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(15, 25), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(19, 20), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(20, 20), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(20, 25), NULL, NULL)); // now add another interval OLA_ASSERT(slot.AddAction(ValueInterval(30, 35), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(29, 30), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(30, 30), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(30, 35), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(34, 35), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(34, 36), NULL, NULL)); // and another one OLA_ASSERT(slot.AddAction(ValueInterval(40, 45), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(29, 30), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(30, 30), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(30, 35), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(34, 35), NULL, NULL)); OLA_ASSERT_FALSE(slot.AddAction(ValueInterval(34, 36), NULL, NULL)); } /** * Check that adding intervals works */ void SlotTest::testIntervalAddition() { Slot slot(0); OLA_ASSERT(slot.AddAction(ValueInterval(10, 20), NULL, NULL)); OLA_ASSERT_EQ(string("[10, 20]"), slot.IntervalsAsString()); // add before the beginning OLA_ASSERT(slot.AddAction(ValueInterval(5, 6), NULL, NULL)); OLA_ASSERT_EQ(string("[5, 6], [10, 20]"), slot.IntervalsAsString()); // add at the end OLA_ASSERT(slot.AddAction(ValueInterval(100, 104), NULL, NULL)); OLA_ASSERT_EQ(string("[5, 6], [10, 20], [100, 104]"), slot.IntervalsAsString()); // now try adding some in the middle OLA_ASSERT(slot.AddAction(ValueInterval(80, 82), NULL, NULL)); OLA_ASSERT_EQ(string("[5, 6], [10, 20], [80, 82], [100, 104]"), slot.IntervalsAsString()); OLA_ASSERT(slot.AddAction(ValueInterval(76, 76), NULL, NULL)); OLA_ASSERT_EQ(string("[5, 6], [10, 20], 76, [80, 82], [100, 104]"), slot.IntervalsAsString()); OLA_ASSERT(slot.AddAction(ValueInterval(70, 72), NULL, NULL)); OLA_ASSERT_EQ( string("[5, 6], [10, 20], [70, 72], 76, [80, 82], [100, 104]"), slot.IntervalsAsString()); OLA_ASSERT(slot.AddAction(ValueInterval(65, 69), NULL, NULL)); OLA_ASSERT_EQ( string("[5, 6], [10, 20], [65, 69], [70, 72], 76, [80, 82], [100, 104]"), slot.IntervalsAsString()); } /** * Check actions are matched correctly. */ void SlotTest::testActionMatching() { Slot slot(0); MockAction *rising_action1 = new MockAction(); MockAction *falling_action1 = new MockAction(); slot.AddAction( ValueInterval(10, 20), rising_action1, falling_action1); MockAction *default_rising_action = new MockAction(); OLA_ASSERT_FALSE(slot.SetDefaultRisingAction(default_rising_action)); MockAction *default_falling_action = new MockAction(); OLA_ASSERT( !slot.SetDefaultFallingAction(default_falling_action)); slot.TakeAction(NULL, 10); rising_action1->CheckForValue(OLA_SOURCELINE(), 10); OLA_ASSERT(falling_action1->NoCalls()); OLA_ASSERT(default_rising_action->NoCalls()); OLA_ASSERT(default_falling_action->NoCalls()); slot.TakeAction(NULL, 20); rising_action1->CheckForValue(OLA_SOURCELINE(), 20); OLA_ASSERT(falling_action1->NoCalls()); OLA_ASSERT(default_rising_action->NoCalls()); OLA_ASSERT(default_falling_action->NoCalls()); slot.TakeAction(NULL, 2); OLA_ASSERT(rising_action1->NoCalls()); OLA_ASSERT(falling_action1->NoCalls()); OLA_ASSERT(default_rising_action->NoCalls()); default_falling_action->CheckForValue(OLA_SOURCELINE(), 2); slot.TakeAction(NULL, 9); OLA_ASSERT(rising_action1->NoCalls()); OLA_ASSERT(falling_action1->NoCalls()); default_rising_action->CheckForValue(OLA_SOURCELINE(), 9); OLA_ASSERT(default_falling_action->NoCalls()); slot.TakeAction(NULL, 21); OLA_ASSERT(rising_action1->NoCalls()); OLA_ASSERT(falling_action1->NoCalls()); default_rising_action->CheckForValue(OLA_SOURCELINE(), 21); OLA_ASSERT(default_falling_action->NoCalls()); // add another action MockAction *rising_action2 = new MockAction(); MockAction *falling_action2 = new MockAction(); OLA_ASSERT(slot.AddAction( ValueInterval(30, 40), rising_action2, falling_action2)); slot.TakeAction(NULL, 30); OLA_ASSERT(rising_action1->NoCalls()); OLA_ASSERT(falling_action1->NoCalls()); rising_action2->CheckForValue(OLA_SOURCELINE(), 30); OLA_ASSERT(falling_action2->NoCalls()); OLA_ASSERT(default_rising_action->NoCalls()); OLA_ASSERT(default_falling_action->NoCalls()); slot.TakeAction(NULL, 35); OLA_ASSERT(rising_action1->NoCalls()); OLA_ASSERT(falling_action1->NoCalls()); rising_action2->CheckForValue(OLA_SOURCELINE(), 35); OLA_ASSERT(falling_action2->NoCalls()); OLA_ASSERT(default_rising_action->NoCalls()); OLA_ASSERT(default_falling_action->NoCalls()); slot.TakeAction(NULL, 40); OLA_ASSERT(rising_action1->NoCalls()); OLA_ASSERT(falling_action1->NoCalls()); rising_action2->CheckForValue(OLA_SOURCELINE(), 40); OLA_ASSERT(falling_action2->NoCalls()); OLA_ASSERT(default_rising_action->NoCalls()); OLA_ASSERT(default_falling_action->NoCalls()); // and another two actions MockAction *rising_action3 = new MockAction(); OLA_ASSERT( slot.AddAction(ValueInterval(23, 27), rising_action3, NULL)); MockAction *falling_action3 = new MockAction(); OLA_ASSERT( slot.AddAction(ValueInterval(28, 29), NULL, falling_action3)); slot.TakeAction(NULL, 28); OLA_ASSERT(rising_action1->NoCalls()); OLA_ASSERT(falling_action1->NoCalls()); OLA_ASSERT(rising_action2->NoCalls()); OLA_ASSERT(falling_action2->NoCalls()); OLA_ASSERT(rising_action3->NoCalls()); falling_action3->CheckForValue(OLA_SOURCELINE(), 28); OLA_ASSERT(default_rising_action->NoCalls()); OLA_ASSERT(default_falling_action->NoCalls()); slot.TakeAction(NULL, 25); OLA_ASSERT(rising_action1->NoCalls()); OLA_ASSERT(falling_action1->NoCalls()); OLA_ASSERT(rising_action2->NoCalls()); OLA_ASSERT(falling_action2->NoCalls()); OLA_ASSERT(rising_action3->NoCalls()); OLA_ASSERT(falling_action3->NoCalls()); OLA_ASSERT(default_rising_action->NoCalls()); default_falling_action->CheckForValue(OLA_SOURCELINE(), 25); slot.TakeAction(NULL, 27); OLA_ASSERT(rising_action1->NoCalls()); OLA_ASSERT(falling_action1->NoCalls()); OLA_ASSERT(rising_action2->NoCalls()); OLA_ASSERT(falling_action2->NoCalls()); rising_action3->CheckForValue(OLA_SOURCELINE(), 27); OLA_ASSERT(falling_action3->NoCalls()); OLA_ASSERT(default_rising_action->NoCalls()); OLA_ASSERT(default_falling_action->NoCalls()); // check the default case slot.TakeAction(NULL, 22); OLA_ASSERT(rising_action1->NoCalls()); OLA_ASSERT(falling_action1->NoCalls()); OLA_ASSERT(rising_action2->NoCalls()); OLA_ASSERT(falling_action2->NoCalls()); OLA_ASSERT(rising_action3->NoCalls()); OLA_ASSERT(falling_action3->NoCalls()); OLA_ASSERT(default_rising_action->NoCalls()); default_falling_action->CheckForValue(OLA_SOURCELINE(), 22); slot.TakeAction(NULL, 28); OLA_ASSERT(rising_action1->NoCalls()); OLA_ASSERT(falling_action1->NoCalls()); OLA_ASSERT(rising_action2->NoCalls()); OLA_ASSERT(falling_action2->NoCalls()); OLA_ASSERT(rising_action3->NoCalls()); OLA_ASSERT(falling_action3->NoCalls()); default_rising_action->CheckForValue(OLA_SOURCELINE(), 28); OLA_ASSERT(default_falling_action->NoCalls()); } /** * Check the default actions are called if no matches are found. */ void SlotTest::testDefaultAction() { Slot slot(1); MockAction *default_rising_action = new MockAction(); MockAction *default_falling_action = new MockAction(); OLA_ASSERT_FALSE(slot.SetDefaultRisingAction(default_rising_action)); OLA_ASSERT( !slot.SetDefaultFallingAction(default_falling_action)); // signal a rising edge slot.TakeAction(NULL, 100); default_rising_action->CheckForValue(OLA_SOURCELINE(), 100); OLA_ASSERT(default_falling_action->NoCalls()); // signal a falling edge slot.TakeAction(NULL, 99); OLA_ASSERT(default_rising_action->NoCalls()); default_falling_action->CheckForValue(OLA_SOURCELINE(), 99); // now try to add another default one, ref the existing actions otherwise // we'll delete them default_rising_action->Ref(); default_falling_action->Ref(); MockAction *default_rising_action2 = new MockAction(); MockAction *default_falling_action2 = new MockAction(); OLA_ASSERT( slot.SetDefaultRisingAction(default_rising_action2)); OLA_ASSERT( slot.SetDefaultFallingAction(default_falling_action2)); // make sure the new actions are used slot.TakeAction(NULL, 100); OLA_ASSERT(default_rising_action->NoCalls()); OLA_ASSERT(default_falling_action->NoCalls()); default_rising_action2->CheckForValue(OLA_SOURCELINE(), 100); OLA_ASSERT(default_falling_action2->NoCalls()); // signal a falling edge slot.TakeAction(NULL, 99); OLA_ASSERT(default_rising_action->NoCalls()); OLA_ASSERT(default_falling_action->NoCalls()); OLA_ASSERT(default_rising_action2->NoCalls()); default_falling_action2->CheckForValue(OLA_SOURCELINE(), 99); default_rising_action->DeRef(); default_falling_action->DeRef(); } ola-0.10.9/tools/ola_trigger/ActionTest.cpp0000664000175000017500000001237614376533110015532 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ActionTest.cpp * Test fixture for the Action classes * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include "tools/ola_trigger/Action.h" #include "ola/testing/TestUtils.h" using std::vector; using std::string; class ActionTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(ActionTest); CPPUNIT_TEST(testVariableAssignment); CPPUNIT_TEST(testVariableAssignmentInterpolation); CPPUNIT_TEST(testCommandAction); CPPUNIT_TEST_SUITE_END(); public: void testVariableAssignment(); void testVariableAssignmentInterpolation(); void testCommandAction(); void setUp() { ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); } }; CPPUNIT_TEST_SUITE_REGISTRATION(ActionTest); /** * A Mock CommandAction which doesn't fork and exec */ class MockCommandAction: CommandAction { public: MockCommandAction(const string &command, const vector &args) : CommandAction(command, args) { } void Execute(Context *context, uint8_t slot_value); void CheckArgs(const ola::testing::SourceLine &source_line, const char* args[]); private: vector m_interpolated_args; }; /** * Build the list of args and save it. */ void MockCommandAction::Execute(Context *context, uint8_t) { m_interpolated_args.clear(); char **args = BuildArgList(context); char **ptr = args; while (*ptr) m_interpolated_args.push_back(string(*ptr++)); FreeArgList(args); } /** * Check what we got matches what we expected */ void MockCommandAction::CheckArgs(const ola::testing::SourceLine &source_line, const char* args[]) { const char **ptr = args; vector::const_iterator iter = m_interpolated_args.begin(); while (*ptr && iter != m_interpolated_args.end()) { ola::testing::_AssertEquals(source_line, string(*ptr++), *iter++); } std::ostringstream str; if (iter != m_interpolated_args.end()) { str << ", got extra args: "; while (iter != m_interpolated_args.end()) { str << *iter; iter++; if (iter != m_interpolated_args.end()) { str << ", "; } } ola::testing::_Fail(source_line, str.str()); } else if (*ptr) { str << ", missing args: "; while (*ptr) { str << *ptr++; if (*ptr) { str << ", "; } } ola::testing::_Fail(source_line, str.str()); } m_interpolated_args.clear(); } /* * Check that the VariableAssignmentActions work. */ void ActionTest::testVariableAssignment() { const string VARIABLE_ONE = "one"; const string FOO_VALUE = "foo"; const string BAR_VALUE = "bar"; Context context; string value; OLA_ASSERT_FALSE(context.Lookup(VARIABLE_ONE, &value)); // trigger the action VariableAssignmentAction action(VARIABLE_ONE, FOO_VALUE); action.Execute(&context, 0); // check the context has updated OLA_ASSERT(context.Lookup(VARIABLE_ONE, &value)); OLA_ASSERT_EQ(FOO_VALUE, value); // another action VariableAssignmentAction action2(VARIABLE_ONE, BAR_VALUE); action2.Execute(&context, 0); OLA_ASSERT(context.Lookup(VARIABLE_ONE, &value)); OLA_ASSERT_EQ(BAR_VALUE, value); } /** * Check that variable interpolation works with the VariableAssignmentAction */ void ActionTest::testVariableAssignmentInterpolation() { const string VARIABLE_NAME = "var1"; const string ASSIGNMENT_STRING = "${slot_offset} = ${slot_value}"; Context context; context.Update(Context::SLOT_OFFSET_VARIABLE, "1"); context.Update(Context::SLOT_VALUE_VARIABLE, "100"); string value; VariableAssignmentAction action(VARIABLE_NAME, ASSIGNMENT_STRING); action.Execute(&context, 1); OLA_ASSERT(context.Lookup(VARIABLE_NAME, &value)); OLA_ASSERT_EQ(string("1 = 100"), value); } /** * Test the command action */ void ActionTest::testCommandAction() { Context context; vector args; args.push_back("one"); args.push_back("two"); MockCommandAction action("echo", args); action.Execute(&context, 0); const char *expected_args[] = {"echo", "one", "two", NULL}; action.CheckArgs(OLA_SOURCELINE(), expected_args); // now check interpolated variables args.push_back("_${slot_offset}_"); args.push_back("_${slot_value}_"); MockCommandAction action2("echo", args); context.SetSlotOffset(1); context.SetSlotValue(100); action2.Execute(&context, 0); const char *expected_args2[] = {"echo", "one", "two", "_1_", "_100_", NULL}; action2.CheckArgs(OLA_SOURCELINE(), expected_args2); } ola-0.10.9/tools/ola_trigger/test_file_rising.conf0000664000175000017500000000012414376533110017135 00000000000000# This has a rising trigger ending with whitespace 511 140-255 +`echo World` ola-0.10.9/tools/ola_trigger/Context.h0000664000175000017500000000402414376533110014535 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Context.h * Copyright (C) 2011 Simon Newton */ #ifndef TOOLS_OLA_TRIGGER_CONTEXT_H_ #define TOOLS_OLA_TRIGGER_CONTEXT_H_ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include HASH_MAP_H #ifndef HAVE_UNORDERED_MAP // This adds support for hashing strings if it's not present namespace HASH_NAMESPACE { template<> struct hash { size_t operator()(const std::string& x) const { return hash()(x.c_str()); } }; } // namespace HASH_NAMESPACE #endif // HAVE_UNORDERED_MAP /** * A context is a collection of variables and their values. */ class Context { public: Context() {} ~Context(); bool Lookup(const std::string &name, std::string *value) const; void Update(const std::string &name, const std::string &value); void SetSlotValue(uint8_t value); void SetSlotOffset(uint16_t offset); std::string AsString() const; friend std::ostream& operator<<(std::ostream &out, const Context&); static const char SLOT_VALUE_VARIABLE[]; static const char SLOT_OFFSET_VARIABLE[]; private: typedef HASH_NAMESPACE::HASH_MAP_CLASS VariableMap; VariableMap m_variables; }; #endif // TOOLS_OLA_TRIGGER_CONTEXT_H_ ola-0.10.9/tools/ola_trigger/Context.cpp0000664000175000017500000000555014376533110015075 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Context.cpp * Copyright (C) 2011 Simon Newton */ #include #include #include #include "tools/ola_trigger/Context.h" using std::ostringstream; using std::string; using std::vector; const char Context::SLOT_VALUE_VARIABLE[] = "slot_value"; const char Context::SLOT_OFFSET_VARIABLE[] = "slot_offset"; /** * Delete the context and all associated variables */ Context::~Context() { m_variables.clear(); } /** * Lookup the value of a variable. * @param name the variable name. * @param value a pointer to a string to be updated with the value. * @returns true if the variable was found, false if it wasn't. */ bool Context::Lookup(const string &name, string *value) const { VariableMap::const_iterator iter = m_variables.find(name); if (iter == m_variables.end()) return false; *value = iter->second; return true; } /** * Update the value of a variable. * @param name the variable name * @param value the new value */ void Context::Update(const string &name, const string &value) { m_variables[name] = value; } /** * Set the slot value variable */ void Context::SetSlotValue(uint8_t value) { ostringstream str; str << static_cast(value); m_variables[SLOT_VALUE_VARIABLE] = str.str(); } /** * Set the slot offset variable */ void Context::SetSlotOffset(uint16_t offset) { ostringstream str; str << static_cast(offset); m_variables[SLOT_OFFSET_VARIABLE] = str.str(); } /** * Convert this context to a string */ string Context::AsString() const { vector keys; keys.reserve(m_variables.size()); VariableMap::const_iterator map_iter = m_variables.begin(); for (; map_iter != m_variables.end(); ++map_iter) keys.push_back(map_iter->first); sort(keys.begin(), keys.end()); ostringstream str; vector::const_iterator iter = keys.begin(); for (; iter != keys.end(); ++iter) { if (iter != keys.begin()) str << ", "; map_iter = m_variables.find(*iter); str << *iter << "=" << map_iter->second; } return str.str(); } /** * Stream operator */ std::ostream& operator<<(std::ostream &out, const Context &c) { return out << c.AsString(); } ola-0.10.9/tools/ola_trigger/VariableInterpolatorTest.cpp0000664000175000017500000000746414376533110020447 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * VariableInterpolatorTest.cpp * Test fixture for the ActionInterval class. * Copyright (C) 2011 Simon Newton */ #include #include #include #include "tools/ola_trigger/Context.h" #include "tools/ola_trigger/VariableInterpolator.h" #include "ola/testing/TestUtils.h" using std::string; class VariableInterpolatorTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(VariableInterpolatorTest); CPPUNIT_TEST(testNoInterpolation); CPPUNIT_TEST(testSimpleInterpolation); CPPUNIT_TEST(testNestedInterpolation); CPPUNIT_TEST(testEscaping); CPPUNIT_TEST(testMissingVariables); CPPUNIT_TEST_SUITE_END(); public: void testNoInterpolation(); void testSimpleInterpolation(); void testNestedInterpolation(); void testEscaping(); void testMissingVariables(); void setUp() { ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); } }; CPPUNIT_TEST_SUITE_REGISTRATION(VariableInterpolatorTest); /** * These strings don't require interpolation. */ void VariableInterpolatorTest::testNoInterpolation() { Context context; string result; OLA_ASSERT(InterpolateVariables("", &result, context)); OLA_ASSERT_EQ(string(""), result); OLA_ASSERT(InterpolateVariables("foo bar baz", &result, context)); OLA_ASSERT_EQ(string("foo bar baz"), result); OLA_ASSERT(InterpolateVariables("{foo}", &result, context)); OLA_ASSERT_EQ(string("{foo}"), result); } /** * Test the simple case. */ void VariableInterpolatorTest::testSimpleInterpolation() { Context context; context.Update("one", "foo"); context.Update("two", "bar"); string result; OLA_ASSERT(InterpolateVariables("${one}", &result, context)); OLA_ASSERT_EQ(string("foo"), result); OLA_ASSERT(InterpolateVariables("foo ${two} baz", &result, context)); OLA_ASSERT_EQ(string("foo bar baz"), result); OLA_ASSERT(InterpolateVariables("${one} ${two}", &result, context)); OLA_ASSERT_EQ(string("foo bar"), result); OLA_ASSERT(InterpolateVariables("a${one}b${two}c", &result, context)); OLA_ASSERT_EQ(string("afoobbarc"), result); } /** * Test nested interpolation works. As we go right-to-left, we can nest * variables. */ void VariableInterpolatorTest::testNestedInterpolation() { Context context; context.Update("one", "1"); context.Update("slot_1", "bar"); string result; OLA_ASSERT(InterpolateVariables("${slot_${one}}", &result, context)); OLA_ASSERT_EQ(string("bar"), result); } /** * Test escaping works */ void VariableInterpolatorTest::testEscaping() { Context context; context.Update("one", "foo"); string result; OLA_ASSERT(InterpolateVariables("\\${one\\}", &result, context)); OLA_ASSERT_EQ(string("${one}"), result); OLA_ASSERT(InterpolateVariables("${one} \\${one\\}", &result, context)); OLA_ASSERT_EQ(string("foo ${one}"), result); } /** * Test for missing variables. */ void VariableInterpolatorTest::testMissingVariables() { Context context; string result; OLA_ASSERT_FALSE(InterpolateVariables("${one}", &result, context)); OLA_ASSERT_FALSE(InterpolateVariables("${}", &result, context)); } ola-0.10.9/tools/ola_trigger/test_file_falling.conf0000664000175000017500000000012714376533110017261 00000000000000# This has a rising trigger ending with tab whitespace 511 140-255 -`echo World` ola-0.10.9/tools/ola_trigger/ConfigCommon.h0000664000175000017500000000322314376533110015467 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ConfigCommon.h * Copyright (C) 2011 Simon Newton * * Common includes for both the lexer and parser. * * The contents of %union are copied to config.tab.h and included in lex.yy.c * and config.tab.cpp. Since our %union uses strings, vectors and classes like * ValueInterval, we need to include these headers in config.tab.h * * Unfortunately, bison 2.3 (which is what's installed on OS X) pre-dates %code * directives so I can't find a way to insert includes into config.tab.h. The * alternative is to put everything we need here, and include ConfigCommon.h in * both lex.yy.c and config.tab.cpp. It's a bit messy but it works. */ #ifndef TOOLS_OLA_TRIGGER_CONFIGCOMMON_H_ #define TOOLS_OLA_TRIGGER_CONFIGCOMMON_H_ #include #include #include "tools/ola_trigger/Action.h" typedef std::vector IntervalList; typedef std::pair ActionPair; #endif // TOOLS_OLA_TRIGGER_CONFIGCOMMON_H_ ola-0.10.9/tools/ola_trigger/Action.h0000664000175000017500000001455014376533110014333 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Action.h * Copyright (C) 2011 Simon Newton */ #ifndef TOOLS_OLA_TRIGGER_ACTION_H_ #define TOOLS_OLA_TRIGGER_ACTION_H_ #include #include #include #include #include #include "tools/ola_trigger/Context.h" /* * An Action is a behavior that is run when a particular DMX value is received * on a particular slot. * * This is the base class that all others inherit from. */ class Action { public: Action() : m_ref_count(0) { } virtual ~Action() {} void Ref() { m_ref_count++; } void DeRef() { m_ref_count--; if (m_ref_count == 0) delete this; } virtual void Execute(Context *context, uint8_t slot_value) = 0; private: unsigned int m_ref_count; }; /** * An Action that assigned a value to a variable */ class VariableAssignmentAction: public Action { public: VariableAssignmentAction(const std::string &variable, const std::string &value) : Action(), m_variable(variable), m_value(value) { } void Execute(Context *context, uint8_t slot_value); private: const std::string m_variable; const std::string m_value; }; /** * Command Action. This action executes a command. */ class CommandAction: public Action { public: CommandAction(const std::string &command, const std::vector &arguments) : m_command(command), m_arguments(arguments) { } virtual ~CommandAction() {} virtual void Execute(Context *context, uint8_t slot_value); protected: const std::string m_command; std::vector m_arguments; char **BuildArgList(const Context *context); void FreeArgList(char **args); char *StringToDynamicChar(const std::string &str); }; /** * An interval of DMX values and then action to be taken for matching values. */ class ValueInterval { public: ValueInterval(uint8_t lower, uint8_t upper) : m_lower(lower), m_upper(upper) { } ~ValueInterval() {} uint8_t Lower() const { return m_lower; } uint8_t Upper() const { return m_upper; } bool Contains(uint8_t value) const { return value >= m_lower && value <= m_upper; } bool Intersects(const ValueInterval &other) const { return (other.Contains(m_lower) || other.Contains(m_upper) || Contains(other.m_lower) || Contains(other.m_upper)); } bool operator<(const ValueInterval &other) const { return m_lower < other.m_lower; } std::string AsString() const; friend std::ostream& operator<<(std::ostream &out, const ValueInterval&); private: uint8_t m_lower, m_upper; }; /** * The set of intervals and their actions. */ class Slot { public: explicit Slot(uint16_t slot_offset) : m_default_rising_action(NULL), m_default_falling_action(NULL), m_slot_offset(slot_offset), m_old_value(0), m_old_value_defined(false) { } ~Slot(); void SetSlotOffset(uint16_t offset) { m_slot_offset = offset; } uint16_t SlotOffset() const { return m_slot_offset; } bool AddAction(const ValueInterval &interval, Action *rising_action, Action *falling_action); bool SetDefaultRisingAction(Action *action); bool SetDefaultFallingAction(Action *action); void TakeAction(Context *context, uint8_t value); std::string IntervalsAsString() const; bool operator<(const Slot &other) const { return m_slot_offset < other.m_slot_offset; } private: Action *m_default_rising_action; Action *m_default_falling_action; uint16_t m_slot_offset; uint8_t m_old_value; bool m_old_value_defined; class ActionInterval { public: ActionInterval(const ValueInterval *interval, Action *rising_action, Action *falling_action) : interval(interval), rising_action(rising_action), falling_action(falling_action) { if (rising_action) rising_action->Ref(); if (falling_action) falling_action->Ref(); } ActionInterval(const ActionInterval &other) : interval(other.interval), rising_action(other.rising_action), falling_action(other.falling_action) { if (rising_action) rising_action->Ref(); if (falling_action) falling_action->Ref(); } ~ActionInterval() { if (rising_action) rising_action->DeRef(); if (falling_action) falling_action->DeRef(); } ActionInterval &operator=(const ActionInterval &other) { if (this != &other) { interval = other.interval; if (rising_action) rising_action->DeRef(); rising_action = other.rising_action; if (rising_action) rising_action->Ref(); if (falling_action) falling_action->DeRef(); falling_action = other.falling_action; if (falling_action) falling_action->Ref(); } return *this; } const ValueInterval *interval; Action *rising_action; Action *falling_action; }; typedef std::vector ActionVector; ActionVector m_actions; bool ValueWithinIntervals(uint8_t value, const ValueInterval &lower_interval, const ValueInterval &upper_interval); bool IntervalsIntersect(const ValueInterval *a1, const ValueInterval *a2); Action *LocateMatchingAction(uint8_t value, bool rising); std::string IntervalsAsString(const ActionVector::const_iterator &start, const ActionVector::const_iterator &end) const; bool SetDefaultAction(Action **action_to_set, Action *new_action); }; #endif // TOOLS_OLA_TRIGGER_ACTION_H_ ola-0.10.9/tools/ola_trigger/config.lex0000664000175000017500000000310714376533110014720 00000000000000%{ #include "tools/ola_trigger/ConfigCommon.h" #include "tools/ola_trigger/config.tab.h" #define YY_NO_INPUT void count(); %} %option nounput %option yylineno alpha [a-zA-Z_] alphanumeric [a-zA-Z0-9_\-\.] digit [0-9] word {alpha}{alphanumeric}* int {digit}+ whitespace [ \t] %% {int} { count(); yylval.int_val = atoi(yytext); return INTEGER_LITERAL; } {word} { count(); yylval.str_val = new std::string(yytext); return WORD_LITERAL; } \"(\\.|[^\\"])*\" { count(); std::string *s = new std::string(++yytext); s->erase(s->size() - 1, 1); yylval.str_val = s; return QUOTED_VALUE; } \'(\\.|[^\\'])*\' { count(); std::string *s = new std::string(++yytext); s->erase(s->size() - 1, 1); yylval.str_val = s; return QUOTED_VALUE; } ^#[^\n]* {} {whitespace}+#[^\n]* {} {whitespace}+ { count(); return WHITESPACE; } \n { count(); yylineno++; return NEW_LINE; } [%=,`\-/+] { count(); return (int) yytext[0]; } %% int column = 0; void count() { for (int i = 0; yytext[i] != '\0'; i++) if (yytext[i] == '\n') column = 0; else if (yytext[i] == '\t') // tabs are evil, we should make it a syntax error column += 8 - (column % 8); else column++; } // only ever parse one file int yywrap() { return 1; } ola-0.10.9/tools/ola_trigger/IntervalTest.cpp0000664000175000017500000000653414376533110016100 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * IntervalTest.cpp * Test fixture for the ValueInterval class. * Copyright (C) 2011 Simon Newton */ #include #include "tools/ola_trigger/Action.h" #include "ola/testing/TestUtils.h" class IntervalTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(IntervalTest); CPPUNIT_TEST(testLowerUpper); CPPUNIT_TEST(testContains); CPPUNIT_TEST(testIntersects); CPPUNIT_TEST(testLessThan); CPPUNIT_TEST_SUITE_END(); public: void testLowerUpper(); void testContains(); void testIntersects(); void testLessThan(); }; CPPUNIT_TEST_SUITE_REGISTRATION(IntervalTest); /** * Check that lower and upper work. */ void IntervalTest::testLowerUpper() { ValueInterval interval(0, 10); OLA_ASSERT_EQ(static_cast(0), interval.Lower()); OLA_ASSERT_EQ(static_cast(10), interval.Upper()); } /** * Check that contains works */ void IntervalTest::testContains() { ValueInterval interval(0, 10); for (uint8_t i = 0; i <= 10; i++) OLA_ASSERT(interval.Contains(i)); OLA_ASSERT_FALSE(interval.Contains(11)); ValueInterval interval2(10, 10); OLA_ASSERT_FALSE(interval2.Contains(0)); OLA_ASSERT_FALSE(interval2.Contains(9)); OLA_ASSERT(interval2.Contains(10)); OLA_ASSERT_FALSE(interval2.Contains(11)); ValueInterval interval3(234, 255); OLA_ASSERT_FALSE(interval3.Contains(0)); OLA_ASSERT_FALSE(interval3.Contains(233)); for (uint8_t i = 234; i != 0; i++) OLA_ASSERT(interval3.Contains(i)); } /** * Check that Intersects works */ void IntervalTest::testIntersects() { ValueInterval interval(0, 10); ValueInterval interval2(10, 10); ValueInterval interval3(5, 6); ValueInterval interval4(11, 20); OLA_ASSERT(interval.Intersects(interval2)); OLA_ASSERT(interval2.Intersects(interval)); OLA_ASSERT(interval.Intersects(interval3)); OLA_ASSERT(interval3.Intersects(interval)); OLA_ASSERT_FALSE(interval2.Intersects(interval3)); OLA_ASSERT_FALSE(interval2.Intersects(interval4)); OLA_ASSERT_FALSE(interval.Intersects(interval4)); OLA_ASSERT(interval.Intersects(interval)); OLA_ASSERT(interval2.Intersects(interval2)); OLA_ASSERT(interval3.Intersects(interval3)); OLA_ASSERT(interval4.Intersects(interval4)); } /** * Check the less than operator works. */ void IntervalTest::testLessThan() { ValueInterval interval1(0, 10); ValueInterval interval2(11, 12); ValueInterval interval3(14, 15); OLA_ASSERT(interval1 < interval2); OLA_ASSERT(interval1 < interval3); OLA_ASSERT(interval2 < interval3); OLA_ASSERT_FALSE((interval2 < interval1)); OLA_ASSERT_FALSE((interval3 < interval2)); OLA_ASSERT_FALSE((interval3 < interval1)); } ola-0.10.9/tools/ola_trigger/Makefile.mk0000664000175000017500000000764314376533110015020 00000000000000EXTRA_DIST += \ tools/ola_trigger/config.lex \ tools/ola_trigger/config.ypp dist_noinst_DATA += \ tools/ola_trigger/contrib/mac_itunes.conf \ tools/ola_trigger/contrib/mac_volume.conf \ tools/ola_trigger/contrib/philips_hue_osram_lightify.conf \ tools/ola_trigger/example.conf \ tools/ola_trigger/test_file.conf \ tools/ola_trigger/test_file_falling.conf \ tools/ola_trigger/test_file_rising.conf # LIBRARIES ################################################## lib_LTLIBRARIES += tools/ola_trigger/libolatrigger.la tools_ola_trigger_libolatrigger_la_SOURCES = \ tools/ola_trigger/Action.cpp \ tools/ola_trigger/Action.h \ tools/ola_trigger/Context.cpp \ tools/ola_trigger/Context.h \ tools/ola_trigger/DMXTrigger.cpp \ tools/ola_trigger/DMXTrigger.h \ tools/ola_trigger/VariableInterpolator.h \ tools/ola_trigger/VariableInterpolator.cpp tools_ola_trigger_libolatrigger_la_LIBADD = common/libolacommon.la # PROGRAMS ################################################## bin_PROGRAMS += tools/ola_trigger/ola_trigger tools_ola_trigger_ola_trigger_SOURCES = \ tools/ola_trigger/ConfigCommon.h \ tools/ola_trigger/ParserActions.cpp \ tools/ola_trigger/ParserActions.h \ tools/ola_trigger/ParserGlobals.h \ tools/ola_trigger/ola-trigger.cpp nodist_tools_ola_trigger_ola_trigger_SOURCES = \ tools/ola_trigger/config.tab.cpp \ tools/ola_trigger/lex.yy.cpp # required, otherwise we get build errors from the flex output tools_ola_trigger_ola_trigger_CXXFLAGS = $(COMMON_CXXFLAGS_ONLY_WARNINGS) tools_ola_trigger_ola_trigger_LDADD = common/libolacommon.la \ ola/libola.la \ tools/ola_trigger/libolatrigger.la \ $(LEXLIB) built_sources += \ tools/ola_trigger/lex.yy.cpp \ tools/ola_trigger/config.tab.cpp \ tools/ola_trigger/config.tab.h tools/ola_trigger/lex.yy.cpp: tools/ola_trigger/Makefile.mk tools/ola_trigger/config.lex $(LEX) -o$(top_builddir)/tools/ola_trigger/lex.yy.cpp $(srcdir)/tools/ola_trigger/config.lex tools/ola_trigger/config.tab.cpp tools/ola_trigger/config.tab.h: tools/ola_trigger/Makefile.mk tools/ola_trigger/config.ypp $(BISON) --defines=$(top_builddir)/tools/ola_trigger/config.tab.h --output-file=$(top_builddir)/tools/ola_trigger/config.tab.cpp $(srcdir)/tools/ola_trigger/config.ypp # TESTS ################################################## test_programs += tools/ola_trigger/ActionTester tools_ola_trigger_ActionTester_SOURCES = \ tools/ola_trigger/ActionTest.cpp \ tools/ola_trigger/ContextTest.cpp \ tools/ola_trigger/DMXTriggerTest.cpp \ tools/ola_trigger/IntervalTest.cpp \ tools/ola_trigger/MockAction.h \ tools/ola_trigger/SlotTest.cpp \ tools/ola_trigger/VariableInterpolatorTest.cpp tools_ola_trigger_ActionTester_CXXFLAGS = $(COMMON_TESTING_FLAGS) tools_ola_trigger_ActionTester_LDADD = $(COMMON_TESTING_LIBS) \ tools/ola_trigger/libolatrigger.la test_scripts += tools/ola_trigger/FileValidateTest.sh tools/ola_trigger/FileValidateTest.sh: tools/ola_trigger/Makefile.mk echo "for FILE in ${srcdir}/tools/ola_trigger/example.conf ${srcdir}/tools/ola_trigger/test_file.conf ${srcdir}/tools/ola_trigger/test_file_falling.conf ${srcdir}/tools/ola_trigger/test_file_rising.conf ${srcdir}/tools/ola_trigger/contrib/mac_volume.conf ${srcdir}/tools/ola_trigger/contrib/mac_itunes.conf ${srcdir}/tools/ola_trigger/contrib/philips_hue_osram_lightify.conf; do echo \"Checking \$$FILE\"; ${top_builddir}/tools/ola_trigger/ola_trigger${EXEEXT} --validate \$$FILE; STATUS=\$$?; if [ \$$STATUS -ne 0 ]; then echo \"FAIL: \$$FILE caused ola_trigger to exit with status \$$STATUS\"; exit \$$STATUS; fi; done; exit 0" > $(top_builddir)/tools/ola_trigger/FileValidateTest.sh chmod +x $(top_builddir)/tools/ola_trigger/FileValidateTest.sh CLEANFILES += tools/ola_trigger/FileValidateTest.sh ola-0.10.9/tools/ola_trigger/ParserActions.h0000664000175000017500000000317114376533110015670 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ParserActions.h * Copyright (C) 2011 Simon Newton * * These functions all called by the parser. */ #ifndef TOOLS_OLA_TRIGGER_PARSERACTIONS_H_ #define TOOLS_OLA_TRIGGER_PARSERACTIONS_H_ #include #include class Action; void SetDefaultValue(std::vector *input); Action *CreateAssignmentAction(std::vector *input); Action *CreateCommandAction(const std::string &command, std::vector *input); ValueInterval *CreateInterval(unsigned int lower, unsigned int upper); void SetSlotAction(unsigned int slot, std::vector *slot_values, Action *rising_action, Action *falling_action); void SetDefaultAction(unsigned int slot, Action *rising_action, Action *falling_action); #endif // TOOLS_OLA_TRIGGER_PARSERACTIONS_H_ ola-0.10.9/tools/ola_trigger/DMXTriggerTest.cpp0000664000175000017500000001044214376533110016261 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMXTriggerTest.cpp * Test fixture for the DMXTrigger class. * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include "tools/ola_trigger/Action.h" #include "tools/ola_trigger/DMXTrigger.h" #include "tools/ola_trigger/MockAction.h" #include "ola/testing/TestUtils.h" using std::vector; using ola::DmxBuffer; class DMXTriggerTest: public CppUnit::TestFixture { CPPUNIT_TEST_SUITE(DMXTriggerTest); CPPUNIT_TEST(testRisingEdgeTrigger); CPPUNIT_TEST(testFallingEdgeTrigger); CPPUNIT_TEST_SUITE_END(); public: void testRisingEdgeTrigger(); void testFallingEdgeTrigger(); void setUp() { ola::InitLogging(ola::OLA_LOG_INFO, ola::OLA_LOG_STDERR); } }; CPPUNIT_TEST_SUITE_REGISTRATION(DMXTriggerTest); /** * Check that triggering on a rising edge works correctly. */ void DMXTriggerTest::testRisingEdgeTrigger() { // setup the actions vector slots; Slot slot(2); MockAction *action = new MockAction(); BadAction *bad_action = new BadAction(); ValueInterval interval(10, 20); slot.AddAction(interval, action, bad_action); slots.push_back(&slot); Context context; DMXTrigger trigger(&context, slots); DmxBuffer buffer; // this shouldn't trigger buffer.SetFromString("0,0,0"); trigger.NewDMX(buffer); OLA_ASSERT(action->NoCalls()); // trigger rising edge buffer.SetFromString("0,0,10"); trigger.NewDMX(buffer); action->CheckForValue(OLA_SOURCELINE(), 10); // now send the same again OLA_ASSERT(action->NoCalls()); trigger.NewDMX(buffer); OLA_ASSERT(action->NoCalls()); // shorten the frame buffer.SetFromString("0,0"); trigger.NewDMX(buffer); OLA_ASSERT(action->NoCalls()); // lengthen again buffer.SetFromString("0,0,10,0"); trigger.NewDMX(buffer); OLA_ASSERT(action->NoCalls()); // change everything else buffer.SetFromString("10,100,10,20"); trigger.NewDMX(buffer); OLA_ASSERT(action->NoCalls()); } /** * Test that falling edges trigger */ void DMXTriggerTest::testFallingEdgeTrigger() { // setup the actions vector slots; Slot slot(2); MockAction *rising_action = new MockAction(); MockAction *falling_action = new MockAction(); ValueInterval interval(10, 20); slot.AddAction(interval, rising_action, falling_action); slots.push_back(&slot); Context context; DMXTrigger trigger(&context, slots); DmxBuffer buffer; // trigger buffer.SetFromString("0,0,20"); trigger.NewDMX(buffer); rising_action->CheckForValue(OLA_SOURCELINE(), 20); OLA_ASSERT(falling_action->NoCalls()); // trigger a falling edge buffer.SetFromString("0,0,19"); trigger.NewDMX(buffer); OLA_ASSERT(rising_action->NoCalls()); falling_action->CheckForValue(OLA_SOURCELINE(), 19); // now send the same again trigger.NewDMX(buffer); OLA_ASSERT(rising_action->NoCalls()); OLA_ASSERT(falling_action->NoCalls()); // shorten the frame buffer.SetFromString("0,0"); trigger.NewDMX(buffer); OLA_ASSERT(rising_action->NoCalls()); OLA_ASSERT(falling_action->NoCalls()); // lengthen again buffer.SetFromString("0,0,19,0"); trigger.NewDMX(buffer); OLA_ASSERT(rising_action->NoCalls()); OLA_ASSERT(falling_action->NoCalls()); // change everything else buffer.SetFromString("10,100,19,20"); trigger.NewDMX(buffer); OLA_ASSERT(rising_action->NoCalls()); OLA_ASSERT(falling_action->NoCalls()); // change once more buffer.SetFromString("10,100,20,20"); trigger.NewDMX(buffer); rising_action->CheckForValue(OLA_SOURCELINE(), 20); OLA_ASSERT(falling_action->NoCalls()); } ola-0.10.9/tools/ola_trigger/contrib/0000775000175000017500000000000014376533267014475 500000000000000ola-0.10.9/tools/ola_trigger/contrib/mac_volume.conf0000664000175000017500000000060414376533110017376 00000000000000# OLA Trigger Config to adjust the volume on Mac OS X # See https://wiki.openlighting.org/index.php/OLA_DMX_Trigger # Copyright (C) 2011 Simon Newton # Triggers ############################################################################### # Slot Trigger Values Action # Sets the output volume. 1 0-100 `osascript '-e' 'set volume output volume ${slot_value}'` ola-0.10.9/tools/ola_trigger/contrib/mac_itunes.conf0000664000175000017500000000131214376533110017373 00000000000000# OLA Trigger Config to control itunes # See https://wiki.openlighting.org/index.php/OLA_DMX_Trigger # Copyright (C) 2011 Simon Newton # Variable definitions ############################################################################### itunes_action='' # Triggers ############################################################################### # Slot Values Action # The first slot selects the action 1 1 itunes_action='play' 1 2 itunes_action='pause' 1 3 itunes_action='previous track' 1 4 itunes_action='next track' # Sending non-0 on the second slot will run the action 2 1-255 `osascript '-e' 'tell application "iTunes"' '-e' '${itunes_action}' '-e' 'end tell'` ola-0.10.9/tools/ola_trigger/contrib/philips_hue_osram_lightify.conf0000664000175000017500000000533314376533110022664 00000000000000# OLA Trigger config to control Philips Hue lights or Osram Lightify products (using a Philips Hue bridge) # Copyright (C) 2016 Johan Nilsson. www.gobo.ws # Thanks to Simon Newton and Sean Sill # Resources used from developers.meethue.com # DMX protocol ############################################################################### # Channel 1 lamp on/off. Value 0-114 lamp off. 140-255 lamp on # Channel 2 lamp intensity. Value 0-255 low -> high # Channel 3 Lightify plug on/off. Value 0-114 plug off. 140-255 plug on # Comments ############################################################################### # Responsiveness of the Hue bridge will slow down if you repeatedly send the on command, that's why we use 2 channels for the lamp # Please notice that the Hue bridge has some frame rate limits # Hue uses the range 1-254 to control the intensity, that's why the DMX value 0 is the same as 1 and the DMX value 255 is the same as 254 # Configuration ############################################################################### hostname='192.168.0.1' # Hue bridge hostname or IP address username='testuser' # Hue bridge username or MD5 hash light_id='1' # Light ID number plug_id='2' # Lightify plug ID number ttime='4' # Set the soft fade time from the light's current state to the new state. Default value is 4 (400 ms) Set 0 to disable # Triggers ############################################################################### # Slot Values Action 1 0-114 -`curl '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"on":false,"transitiontime":${ttime}}' 'http://${hostname}/api/${username}/lights/${light_id}/state'` 1 140-255 +`curl '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"on":true,"transitiontime":${ttime}}' 'http://${hostname}/api/${username}/lights/${light_id}/state'` 2 0 `curl '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"bri":1,"transitiontime":${ttime}}' 'http://${hostname}/api/${username}/lights/${light_id}/state'` 2 1-254 `curl '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"bri":${slot_value},"transitiontime":${ttime}}' 'http://${hostname}/api/${username}/lights/${light_id}/state'` 2 255 `curl '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"bri":254,"transitiontime":${ttime}}' 'http://${hostname}/api/${username}/lights/${light_id}/state'` 3 0-114 -`curl '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"on":false}' 'http://${hostname}/api/${username}/lights/${plug_id}/state'` 3 140-255 +`curl '-H' '"Accept: application/json"' '-X' 'PUT' '--data' '{"on":true}' 'http://${hostname}/api/${username}/lights/${plug_id}/state'` ola-0.10.9/tools/e133/0000775000175000017500000000000014376533271011205 500000000000000ola-0.10.9/tools/e133/EndpointManager.cpp0000664000175000017500000000765414376533110014710 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * EndpointManager.cpp * Copyright (C) 2012 Simon Newton */ #include #include #include "ola/stl/STLUtils.h" #include "tools/e133/EndpointManager.h" using std::vector; /** * Register a E133Endpoint * @param endpoint_id the endpoint index * @param endpoint E133Endpoint to register * @return true if the registration succeeded, false otherwise. */ bool EndpointManager::RegisterEndpoint(uint16_t endpoint_id, E133Endpoint *endpoint) { if (!endpoint_id) { OLA_WARN << "Can't register the root endpoint"; } if (ola::STLInsertIfNotPresent(&m_endpoint_map, endpoint_id, endpoint)) { RunNotifications(endpoint_id, ADD); m_list_change_number++; return true; } return false; } /** * Unregister a E133Endpoint * @param endpoint_id the index of the endpoint to un-register */ void EndpointManager::UnRegisterEndpoint(uint16_t endpoint_id) { if (ola::STLRemove(&m_endpoint_map, endpoint_id)) { RunNotifications(endpoint_id, REMOVE); m_list_change_number++; } } /** * Lookup an endpoint by number. */ E133Endpoint* EndpointManager::GetEndpoint(uint16_t endpoint_id) const { return ola::STLFindOrNull(m_endpoint_map, endpoint_id); } /** * Fetch a list of all registered endpoints ids. * @param id_list pointer to a vector to be filled in with the endpoint ids. */ void EndpointManager::EndpointIDs(vector *id_list) const { id_list->clear(); ola::STLKeys(m_endpoint_map, id_list); } /** * Register a callback to run when endpoint are added or removed. * @param event_type the events to trigger this notification, ADD, REMOVE or * BOTH. * @param callback the Callback to run. Ownership is not transferred. */ void EndpointManager::RegisterNotification( EndpointNotificationEvent event_type, EndpointNotificationCallback *callback) { // if this callback already exists update it vector::iterator iter = m_callbacks.begin(); for (; iter != m_callbacks.end(); ++iter) { if (iter->callback == callback) { iter->event_type = event_type; return; } } EndpointNotification notification = {event_type, callback}; m_callbacks.push_back(notification); } /* * Unregister a callback for notifications * @param callback the Callback to remove. * @return true if the notification was removed, false if it wasn't found. */ bool EndpointManager::UnRegisterNotification( EndpointNotificationCallback *callback) { vector::iterator iter = m_callbacks.begin(); for (; iter != m_callbacks.end(); ++iter) { if (iter->callback == callback) { m_callbacks.erase(iter); return true; } } return false; } /** * Run all notifications of a particular type * @param endpoint_id the id of the endpoint to pass to the callbacks. * @param event_type the type of notifications to trigger. */ void EndpointManager::RunNotifications(uint16_t endpoint_id, EndpointNotificationEvent event_type) { vector::iterator iter = m_callbacks.begin(); for (; iter != m_callbacks.end(); ++iter) { if (iter->event_type == event_type || event_type == BOTH) iter->callback->Run(endpoint_id); } } ola-0.10.9/tools/e133/e133-receiver.cpp0000664000175000017500000002004414376533110014076 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * e133-receiver.cpp * Copyright (C) 2011 Simon Newton * * This creates a E1.33 receiver with one (emulated) RDM responder. The node's * RDM responder responds to E1.33 commands. */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #ifdef USE_SPI #include "plugins/spi/SPIBackend.h" #include "plugins/spi/SPIOutput.h" #include "plugins/spi/SPIWriter.h" using ola::plugin::spi::SoftwareBackend; using ola::plugin::spi::SPIOutput; using ola::plugin::spi::SPIWriter; DEFINE_string(spi_device, "", "Path to the SPI device to use."); #endif // USE_SPI #include "libs/acn/E131Node.h" #include "plugins/usbpro/BaseUsbProWidget.h" #include "plugins/usbpro/DmxTriWidget.h" #include "tools/e133/SimpleE133Node.h" using ola::DmxBuffer; using ola::acn::CID; using ola::network::IPV4Address; using ola::rdm::UID; using std::auto_ptr; using std::string; using std::vector; using ola::plugin::usbpro::DmxTriWidget; DEFINE_default_bool(dummy, true, "Include a dummy responder endpoint"); DEFINE_default_bool(e131, true, "Include E1.31 support"); DEFINE_string(listen_ip, "", "The IP address to listen on."); DEFINE_string(uid, "7a70:00000001", "The UID of the responder."); DEFINE_s_uint16(lifetime, t, 300, "The value to use for the service lifetime"); DEFINE_s_uint32(universe, u, 1, "The E1.31 universe to listen on."); DEFINE_string(tri_device, "", "Path to the RDM-TRI device to use."); SimpleE133Node *simple_node; /* * Terminate cleanly on interrupt. */ static void InteruptSignal(OLA_UNUSED int signo) { int old_errno = errno; if (simple_node) { simple_node->Stop(); } errno = old_errno; } void HandleTriDMX(DmxBuffer *buffer, DmxTriWidget *widget) { widget->SendDMX(*buffer); } #ifdef USE_SPI void HandleSpiDMX(DmxBuffer *buffer, SPIOutput *output) { output->WriteDMX(*buffer); } #endif // USE_SPI /* * Startup a node */ int main(int argc, char *argv[]) { ola::AppInit(&argc, argv, "[options]", "Run a very simple E1.33 Responder."); auto_ptr uid(UID::FromString(FLAGS_uid)); if (!uid.get()) { OLA_WARN << "Invalid UID: " << FLAGS_uid; ola::DisplayUsage(); exit(ola::EXIT_USAGE); } CID cid = CID::Generate(); // Find a network interface to use ola::network::Interface interface; { auto_ptr picker( ola::network::InterfacePicker::NewPicker()); if (!picker->ChooseInterface(&interface, FLAGS_listen_ip)) { OLA_INFO << "Failed to find an interface"; exit(ola::EXIT_UNAVAILABLE); } } // Setup the Node. SimpleE133Node::Options opts(cid, interface.ip_address, *uid, FLAGS_lifetime); SimpleE133Node node(opts); // Optionally attach some other endpoints. vector endpoints; auto_ptr dummy_responder; auto_ptr discoverable_dummy_responder; auto_ptr tri_widget; ola::rdm::UIDAllocator uid_allocator(*uid); // The first uid is used for the management endpoint so we burn a UID here. { auto_ptr dummy_uid(uid_allocator.AllocateNext()); } // Setup E1.31 if required. auto_ptr e131_node; if (FLAGS_e131) { e131_node.reset(new ola::acn::E131Node( node.SelectServer(), FLAGS_listen_ip, ola::acn::E131Node::Options(), cid)); if (!e131_node->Start()) { OLA_WARN << "Failed to start E1.31 node"; exit(ola::EXIT_UNAVAILABLE); } OLA_INFO << "Started E1.31 node!"; node.SelectServer()->AddReadDescriptor(e131_node->GetSocket()); } if (FLAGS_dummy) { auto_ptr dummy_uid(uid_allocator.AllocateNext()); OLA_INFO << "Dummy UID is " << *dummy_uid; if (!dummy_uid.get()) { OLA_WARN << "Failed to allocate a UID for the DummyResponder."; exit(ola::EXIT_USAGE); } dummy_responder.reset(new ola::rdm::DummyResponder(*dummy_uid)); discoverable_dummy_responder.reset( new ola::rdm::DiscoverableRDMControllerAdaptor( *dummy_uid, dummy_responder.get())); endpoints.push_back(new E133Endpoint(discoverable_dummy_responder.get(), E133Endpoint::EndpointProperties())); } // uber hack for now. // TODO(simon): fix this DmxBuffer tri_buffer; uint8_t unused_priority; if (!FLAGS_tri_device.str().empty()) { ola::io::ConnectedDescriptor *descriptor = ola::plugin::usbpro::BaseUsbProWidget::OpenDevice(FLAGS_tri_device); if (!descriptor) { OLA_WARN << "Failed to open " << FLAGS_tri_device; exit(ola::EXIT_USAGE); } tri_widget.reset(new DmxTriWidget(node.SelectServer(), descriptor)); node.SelectServer()->AddReadDescriptor(descriptor); E133Endpoint::EndpointProperties properties; properties.is_physical = true; endpoints.push_back( new E133Endpoint(tri_widget.get(), properties)); if (e131_node.get()) { // Danger! e131_node->SetHandler( 1, &tri_buffer, &unused_priority, NewCallback(&HandleTriDMX, &tri_buffer, tri_widget.get())); } } // uber hack for now. // TODO(simon): fix this #ifdef USE_SPI auto_ptr spi_writer; auto_ptr spi_backend; auto_ptr spi_output; DmxBuffer spi_buffer; if (FLAGS_spi_device.present() && !FLAGS_spi_device.str().empty()) { auto_ptr spi_uid(uid_allocator.AllocateNext()); if (!spi_uid.get()) { OLA_WARN << "Failed to allocate a UID for the SPI device."; exit(ola::EXIT_USAGE); } spi_writer.reset( new SPIWriter(FLAGS_spi_device, SPIWriter::Options(), NULL)); SoftwareBackend::Options options; spi_backend.reset(new SoftwareBackend(options, spi_writer.get(), NULL)); if (!spi_backend->Init()) { OLA_WARN << "Failed to init SPI backend"; exit(ola::EXIT_USAGE); } spi_output.reset(new SPIOutput( *spi_uid, spi_backend.get(), SPIOutput::Options(0, FLAGS_spi_device.str()))); E133Endpoint::EndpointProperties properties; properties.is_physical = true; endpoints.push_back(new E133Endpoint(spi_output.get(), properties)); if (e131_node.get()) { // Danger! e131_node->SetHandler( 1, &spi_buffer, &unused_priority, NewCallback(&HandleSpiDMX, &spi_buffer, spi_output.get())); } } #endif // USE_SPI for (unsigned int i = 0; i < endpoints.size(); i++) { node.AddEndpoint(i + 1, endpoints[i]); } simple_node = &node; if (!node.Init()) { exit(ola::EXIT_UNAVAILABLE); } // signal handler if (!ola::InstallSignal(SIGINT, &InteruptSignal)) { exit(ola::EXIT_OSERR); } node.Run(); if (e131_node.get()) { node.SelectServer()->RemoveReadDescriptor(e131_node->GetSocket()); } for (unsigned int i = 0; i < endpoints.size(); i++) { node.RemoveEndpoint(i + 1); } ola::STLDeleteElements(&endpoints); } ola-0.10.9/tools/e133/DesignatedControllerConnection.cpp0000664000175000017500000002742214376533110017763 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DesignatedControllerConnection.cpp * Copyright (C) 2013 Simon Newton */ #include #include #include #include "ola/Callback.h" #include "ola/Logging.h" #include "ola/acn/ACNVectors.h" #include "ola/io/SelectServerInterface.h" #include "ola/network/HealthCheckedConnection.h" #include "ola/stl/STLUtils.h" #include "ola/network/IPV4Address.h" #include "ola/network/SocketAddress.h" #include "ola/rdm/RDMCommand.h" #include "ola/rdm/RDMCommandSerializer.h" #include "libs/acn/E133Header.h" #include "libs/acn/E133StatusInflator.h" #include "libs/acn/RDMPDU.h" #include "tools/e133/DesignatedControllerConnection.h" #include "tools/e133/E133HealthCheckedConnection.h" #include "tools/e133/TCPConnectionStats.h" using ola::NewCallback; using ola::io::IOStack; using ola::network::HealthCheckedConnection; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::acn::TransportHeader; using ola::rdm::RDMResponse; using std::auto_ptr; using std::string; // The max number of un-ack'ed messages we'll allow. const unsigned int DesignatedControllerConnection::MAX_QUEUE_SIZE = 10; // Track the un-ack'ed messages. class OutstandingMessage { public: OutstandingMessage(uint16_t endpoint, const RDMResponse *rdm_response) : m_endpoint(endpoint), m_message_sent(false), m_rdm_response(rdm_response) { } bool was_sent() const { return m_message_sent; } void set_was_sent(bool was_sent) { m_message_sent = was_sent; } const RDMResponse* rdm_response() const { return m_rdm_response.get(); } uint16_t endpoint() const { return m_endpoint; } private: uint16_t m_endpoint; bool m_message_sent; auto_ptr m_rdm_response; OutstandingMessage(const OutstandingMessage&); OutstandingMessage& operator=(const OutstandingMessage&); }; /** * Create a new DesignatedControllerConnection. * This listens for connections from the controllers, and will ensure that if * any controllers try to connect, at least one will be picked as the * designated controller. */ DesignatedControllerConnection::DesignatedControllerConnection( ola::io::SelectServerInterface *ss, const IPV4Address &ip_address, ola::e133::MessageBuilder *message_builder, TCPConnectionStats *tcp_stats, unsigned int max_queue_size) : m_ip_address(ip_address), m_max_queue_size(max_queue_size), m_ss(ss), m_message_builder(message_builder), m_tcp_stats(tcp_stats), m_tcp_socket(NULL), m_health_checked_connection(NULL), m_message_queue(NULL), m_incoming_tcp_transport(NULL), m_tcp_socket_factory( NewCallback(this, &DesignatedControllerConnection::NewTCPConnection)), m_listening_tcp_socket(&m_tcp_socket_factory), m_root_inflator( NewCallback(this, &DesignatedControllerConnection::RLPDataReceived)), m_unsent_messages(false) { m_root_inflator.AddInflator(&m_e133_inflator); m_e133_inflator.AddInflator(&m_e133_status_inflator); m_e133_status_inflator.SetStatusHandler( NewCallback(this, &DesignatedControllerConnection::HandleStatusMessage)); } DesignatedControllerConnection::~DesignatedControllerConnection() { if (!m_unacked_messages.empty()) OLA_WARN << m_unacked_messages.size() << " RDM commands remain un-ack'ed and will not be delivered"; ola::STLDeleteValues(&m_unacked_messages); m_ss->RemoveReadDescriptor(&m_listening_tcp_socket); m_listening_tcp_socket.Close(); TCPConnectionClosed(); } /** * Init. */ bool DesignatedControllerConnection::Init() { // setup the TCP socket bool listen_ok = m_listening_tcp_socket.Listen( IPV4SocketAddress(m_ip_address, ola::acn::E133_PORT)); if (!listen_ok) { m_listening_tcp_socket.Close(); return false; } // And add to the Select Server m_ss->AddReadDescriptor(&m_listening_tcp_socket); return true; } /** * Send an unsolicated RDM message on the TCP channel. * @param command the RDMResponse to send, ownership is transferred. */ bool DesignatedControllerConnection::SendStatusMessage( uint16_t endpoint, const RDMResponse *raw_response) { auto_ptr response(raw_response); if (m_unacked_messages.size() == m_max_queue_size) { OLA_WARN << "NonBlockingSender limit reached, no further messages will " << "be held"; return false; } unsigned int our_sequence_number = m_sequence_number.Next(); if (ola::STLContains(m_unacked_messages, our_sequence_number)) { // TODO(simon): think about what we want to do here OLA_WARN << "Sequence number collision!"; return false; } OutstandingMessage *message = new OutstandingMessage( endpoint, response.release()); ola::STLInsertIfNotPresent(&m_unacked_messages, our_sequence_number, message); if (m_message_queue) { message->set_was_sent( SendRDMCommand(our_sequence_number, endpoint, message->rdm_response())); } return true; } /** * Force close the master's TCP connection. * @return, true if there was a connection to close, false otherwise. */ bool DesignatedControllerConnection::CloseTCPConnection() { if (!m_tcp_socket) return false; ola::io::ConnectedDescriptor::OnCloseCallback *callback = m_tcp_socket->TransferOnClose(); callback->Run(); return true; } /** * Called when we get a new TCP connection. */ void DesignatedControllerConnection::NewTCPConnection( ola::network::TCPSocket *socket_ptr) { auto_ptr socket(socket_ptr); ola::network::GenericSocketAddress addr = socket->GetPeerAddress(); if (addr.Family() != AF_INET) { OLA_WARN << "New TCP connection but failed to determine peer address"; return; } IPV4SocketAddress v4_address = addr.V4Addr(); OLA_INFO << "New TCP connection from " << v4_address; if (m_tcp_socket) { OLA_WARN << "Already got a TCP connection open, closing this one"; socket->Close(); return; } m_tcp_socket = socket.release(); if (m_message_queue) { OLA_WARN << "Already have a NonBlockingSender"; } m_message_queue = new ola::io::NonBlockingSender(m_tcp_socket, m_ss, m_message_builder->pool()); if (m_health_checked_connection) { OLA_WARN << "Already have a E133HealthCheckedConnection"; } m_health_checked_connection = new E133HealthCheckedConnection( m_message_builder, m_message_queue, ola::NewSingleCallback( this, &DesignatedControllerConnection::TCPConnectionUnhealthy), m_ss); // this sends a heartbeat message to indicate this is the live connection if (!m_health_checked_connection->Setup()) { OLA_WARN << "Failed to setup HealthCheckedConnection, closing TCP socket"; delete m_health_checked_connection; m_health_checked_connection = NULL; delete m_message_queue; m_message_queue = NULL; m_tcp_socket->Close(); delete m_tcp_socket; m_tcp_socket = NULL; return; } OLA_INFO << "New connection, sending any un-acked messages"; bool sent_all = true; PendingMessageMap::iterator iter = m_unacked_messages.begin(); for (; iter != m_unacked_messages.end(); iter++) { OutstandingMessage *message = iter->second; bool was_sent = SendRDMCommand(iter->first, message->endpoint(), message->rdm_response()); sent_all &= was_sent; message->set_was_sent(was_sent); } m_unsent_messages = !sent_all; if (m_incoming_tcp_transport) { OLA_WARN << "Already have an IncomingTCPTransport"; } m_incoming_tcp_transport = new ola::acn::IncomingTCPTransport( &m_root_inflator, m_tcp_socket); m_tcp_stats->connection_events++; m_tcp_stats->ip_address = v4_address.Host(); m_tcp_socket->SetOnData( NewCallback(this, &DesignatedControllerConnection::ReceiveTCPData)); m_tcp_socket->SetOnClose(ola::NewSingleCallback( this, &DesignatedControllerConnection::TCPConnectionClosed)); m_ss->AddReadDescriptor(m_tcp_socket); } /** * Called when there is new TCP data available */ void DesignatedControllerConnection::ReceiveTCPData() { if (m_incoming_tcp_transport) { if (!m_incoming_tcp_transport->Receive()) { OLA_WARN << "TCP STREAM IS BAD!!!"; CloseTCPConnection(); } } } /** * Called when the TCP connection goes unhealthy. */ void DesignatedControllerConnection::TCPConnectionUnhealthy() { OLA_INFO << "TCP connection went unhealthy, closing"; m_tcp_stats->unhealthy_events++; CloseTCPConnection(); } /** * Close and cleanup the TCP connection. This can be triggered one of three * ways: * - remote end closes the connection * - the local end decides to close the connection * - the heartbeats time out */ void DesignatedControllerConnection::TCPConnectionClosed() { OLA_INFO << "TCP connection closed"; // zero out the master's IP m_tcp_stats->ip_address = IPV4Address(); m_ss->RemoveReadDescriptor(m_tcp_socket); // shutdown the tx side delete m_health_checked_connection; m_health_checked_connection = NULL; delete m_message_queue; m_message_queue = NULL; // shutdown the rx side delete m_incoming_tcp_transport; m_incoming_tcp_transport = NULL; // finally delete the socket m_tcp_socket->Close(); delete m_tcp_socket; m_tcp_socket = NULL; } /** * Called when we receive a valid Root Layer PDU. */ void DesignatedControllerConnection::RLPDataReceived(const TransportHeader&) { if (m_health_checked_connection) { m_health_checked_connection->HeartbeatReceived(); } } bool DesignatedControllerConnection::SendRDMCommand( unsigned int sequence_number, uint16_t endpoint, const RDMResponse *rdm_response) { if (m_message_queue->LimitReached()) return false; IOStack packet(m_message_builder->pool()); ola::rdm::RDMCommandSerializer::Write(*rdm_response, &packet); ola::acn::RDMPDU::PrependPDU(&packet); m_message_builder->BuildTCPRootE133( &packet, ola::acn::VECTOR_FRAMING_RDMNET, sequence_number, endpoint); return m_message_queue->SendMessage(&packet); } /** * Handle a E1.33 Status PDU on the TCP connection. */ void DesignatedControllerConnection::HandleStatusMessage( const TransportHeader *transport_header, const ola::acn::E133Header *e133_header, uint16_t status_code, const string &description) { if (status_code != ola::e133::SC_E133_ACK) { OLA_INFO << "Received a non-ack status code from " << transport_header->Source() << ": " << status_code << " : " << description; } OLA_INFO << "Controller has ack'ed " << e133_header->Sequence(); ola::STLRemoveAndDelete(&m_unacked_messages, e133_header->Sequence()); if (m_unsent_messages && !m_message_queue->LimitReached()) { bool sent_all = true; PendingMessageMap::iterator iter = m_unacked_messages.begin(); for (; iter != m_unacked_messages.end(); iter++) { OutstandingMessage *message = iter->second; if (message->was_sent()) continue; bool was_sent = SendRDMCommand(iter->first, message->endpoint(), message->rdm_response()); sent_all &= was_sent; message->set_was_sent(was_sent); } m_unsent_messages = !sent_all; } } ola-0.10.9/tools/e133/basic-device.cpp0000664000175000017500000001466114376533110014147 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * basic-device.cpp * Copyright (C) 2014 Simon Newton * * A device which just opens a TCP connection to a controller. * I'm using this for scale testing. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "libs/acn/RootInflator.h" #include "libs/acn/TCPTransport.h" #include "tools/e133/E133HealthCheckedConnection.h" DEFINE_string(controller_ip, "", "The IP Address of the Controller"); DEFINE_uint16(controller_port, 5569, "The port on the controller"); DEFINE_uint16(tcp_connect_timeout_ms, 5000, "The time in ms for the TCP connect"); DEFINE_uint16(tcp_retry_interval_ms, 5000, "The time in ms before retring the TCP connection"); using ola::NewCallback; using ola::NewSingleCallback; using ola::TimeInterval; using ola::io::NonBlockingSender; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::network::TCPSocket; using ola::acn::IncomingTCPTransport; using std::auto_ptr; using std::string; /** * A very simple E1.33 Device that uses the reverse-connection model. */ class SimpleE133Device { public: struct Options { // The controller to connect to. IPV4SocketAddress controller; explicit Options(const IPV4SocketAddress &controller) : controller(controller) { } }; explicit SimpleE133Device(const Options &options); ~SimpleE133Device(); void Run(); void Stop() { m_ss.Terminate(); } private: const IPV4SocketAddress m_controller; ola::io::SelectServer m_ss; ola::e133::MessageBuilder m_message_builder; ola::network::TCPSocketFactory m_tcp_socket_factory; ola::network::AdvancedTCPConnector m_connector; ola::ConstantBackoffPolicy m_backoff_policy; ola::acn::RootInflator m_root_inflator; // Once we have a connection these are filled in. auto_ptr m_socket; auto_ptr m_message_queue; // The Health Checked connection auto_ptr m_health_checked_connection; auto_ptr m_in_transport; void OnTCPConnect(TCPSocket *socket); void ReceiveTCPData(); void RLPDataReceived(const ola::acn::TransportHeader &header); void SocketUnhealthy(IPV4Address ip_address); void SocketClosed(); DISALLOW_COPY_AND_ASSIGN(SimpleE133Device); }; SimpleE133Device::SimpleE133Device(const Options &options) : m_controller(options.controller), m_message_builder(ola::acn::CID::Generate(), "E1.33 Device"), m_tcp_socket_factory(NewCallback(this, &SimpleE133Device::OnTCPConnect)), m_connector(&m_ss, &m_tcp_socket_factory, TimeInterval(FLAGS_tcp_connect_timeout_ms / 1000, (FLAGS_tcp_connect_timeout_ms % 1000) * 1000)), m_backoff_policy(TimeInterval( FLAGS_tcp_retry_interval_ms / 1000, (FLAGS_tcp_retry_interval_ms % 1000) * 1000)), m_root_inflator(NewCallback(this, &SimpleE133Device::RLPDataReceived)) { m_connector.AddEndpoint(options.controller, &m_backoff_policy); } SimpleE133Device::~SimpleE133Device() {} void SimpleE133Device::Run() { m_ss.Run(); } void SimpleE133Device::OnTCPConnect(TCPSocket *socket) { OLA_INFO << "Opened new TCP connection: " << socket; m_socket.reset(socket); m_in_transport.reset(new IncomingTCPTransport(&m_root_inflator, socket)); m_message_queue.reset( new NonBlockingSender(m_socket.get(), &m_ss, m_message_builder.pool())); m_health_checked_connection.reset(new E133HealthCheckedConnection( &m_message_builder, m_message_queue.get(), NewSingleCallback(this, &SimpleE133Device::SocketClosed), &m_ss)); socket->SetOnData(NewCallback(this, &SimpleE133Device::ReceiveTCPData)); socket->SetOnClose(NewSingleCallback(this, &SimpleE133Device::SocketClosed)); m_ss.AddReadDescriptor(socket); if (!m_health_checked_connection->Setup()) { OLA_WARN << "Failed to setup heartbeat controller for " << m_controller; SocketClosed(); return; } } void SimpleE133Device::ReceiveTCPData() { if (!m_in_transport->Receive()) { OLA_WARN << "TCP STREAM IS BAD!!!"; SocketClosed(); } } void SimpleE133Device::RLPDataReceived( const ola::acn::TransportHeader &header) { m_health_checked_connection->HeartbeatReceived(); (void) header; } void SimpleE133Device::SocketClosed() { OLA_INFO << "controller connection was closed"; m_health_checked_connection.reset(); m_message_queue.reset(); m_in_transport.reset(); m_ss.RemoveReadDescriptor(m_socket.get()); m_socket.reset(); m_connector.Disconnect(m_controller); } SimpleE133Device *device = NULL; /** * Interrupt handler */ static void InteruptSignal(OLA_UNUSED int signo) { int old_errno = errno; if (device) { device->Stop(); } errno = old_errno; } int main(int argc, char *argv[]) { ola::SetHelpString("[options]", "Simple E1.33 Device."); ola::ParseFlags(&argc, argv); ola::InitLoggingFromFlags(); // Convert the controller's IP address IPV4Address controller_ip; if (FLAGS_controller_ip.str().empty() || !IPV4Address::FromString(FLAGS_controller_ip, &controller_ip)) { ola::DisplayUsage(); exit(ola::EXIT_USAGE); } device = new SimpleE133Device( SimpleE133Device::Options( IPV4SocketAddress(controller_ip, FLAGS_controller_port))); ola::InstallSignal(SIGINT, InteruptSignal); device->Run(); delete device; device = NULL; } ola-0.10.9/tools/e133/E133StatusHelper.cpp0000664000175000017500000000652714376533110014612 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133StatusHelper.cpp * Functions for dealing with E1.33 Status Codes. * Copyright (C) 2013 Simon Newton */ #include #include #include "ola/e133/E133StatusHelper.h" namespace ola { namespace e133 { using std::string; /** * Verify that the int is a valid E1.33 Status Code. */ bool IntToStatusCode(uint16_t input, E133StatusCode *status_code) { switch (input) { case ola::e133::SC_E133_ACK: *status_code = ola::e133::SC_E133_ACK; return true; case ola::e133::SC_E133_RDM_TIMEOUT: *status_code = ola::e133::SC_E133_RDM_TIMEOUT; return true; case ola::e133::SC_E133_RDM_INVALID_RESPONSE: *status_code = ola::e133::SC_E133_RDM_INVALID_RESPONSE; return true; case ola::e133::SC_E133_BUFFER_FULL: *status_code = ola::e133::SC_E133_BUFFER_FULL; return true; case ola::e133::SC_E133_UNKNOWN_UID: *status_code = ola::e133::SC_E133_UNKNOWN_UID; return true; case ola::e133::SC_E133_NONEXISTANT_ENDPOINT: *status_code = ola::e133::SC_E133_NONEXISTANT_ENDPOINT; return true; case ola::e133::SC_E133_WRONG_ENDPOINT: *status_code = ola::e133::SC_E133_WRONG_ENDPOINT; return true; case ola::e133::SC_E133_ACK_OVERFLOW_CACHE_EXPIRED: *status_code = ola::e133::SC_E133_ACK_OVERFLOW_CACHE_EXPIRED; return true; case ola::e133::SC_E133_ACK_OVERFLOW_IN_PROGRESS: *status_code = ola::e133::SC_E133_ACK_OVERFLOW_IN_PROGRESS; return true; case ola::e133::SC_E133_BROADCAST_COMPLETE: *status_code = ola::e133::SC_E133_BROADCAST_COMPLETE; return true; default: return false; } } /** * Return a text string describing this status code. */ string StatusMessageIdToString(E133StatusCode status_code) { switch (status_code) { case ola::e133::SC_E133_ACK: return "Acknowledged"; case ola::e133::SC_E133_RDM_TIMEOUT: return "Response Timeout"; case ola::e133::SC_E133_RDM_INVALID_RESPONSE: return "Invalid Response"; case ola::e133::SC_E133_BUFFER_FULL: return "Buffer Full"; case ola::e133::SC_E133_UNKNOWN_UID: return "Unknown UID"; case ola::e133::SC_E133_NONEXISTANT_ENDPOINT: return "Endpoint doesn't exist"; case ola::e133::SC_E133_WRONG_ENDPOINT: return "Wrong endpoint"; case ola::e133::SC_E133_ACK_OVERFLOW_CACHE_EXPIRED: return "Ack overflow cache expired"; case ola::e133::SC_E133_ACK_OVERFLOW_IN_PROGRESS: return "Ack overflow in progress"; case ola::e133::SC_E133_BROADCAST_COMPLETE: return "Request was broadcast"; } return "Unknown E1.33 Status Code"; } } // namespace e133 } // namespace ola ola-0.10.9/tools/e133/E133HealthCheckedConnection.h0000664000175000017500000000514614376533110016324 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133HealthCheckedConnection.h * Copyright (C) 2012 Simon Newton * * This class detects unhealthy TCP connections. A TCP connection is defined as * healthy if it can pass data in both directions. Both ends must implement the * same health checking logic (and agree on heartbeat intervals) for this to * work correctly. * * Even though this is called a E1.33 Health Checked Connection, it doesn't * actually rely on E1.33 at all. You can use it with any ACN based protocol * since it just sends PDUs with a ROOT_VECTOR_NULL as heartbeat messages. */ #ifndef TOOLS_E133_E133HEALTHCHECKEDCONNECTION_H_ #define TOOLS_E133_E133HEALTHCHECKEDCONNECTION_H_ #include #include #include #include #include #include #include #include /** * An E1.33 health checked connection. */ class E133HealthCheckedConnection : public ola::network::HealthCheckedConnection { public: E133HealthCheckedConnection( ola::e133::MessageBuilder *message_builder, ola::io::NonBlockingSender *message_queue, ola::SingleUseCallback0 *on_timeout, ola::thread::SchedulingExecutorInterface *scheduler, const ola::TimeInterval heartbeat_interval = ola::TimeInterval(E133_TCP_HEARTBEAT_INTERVAL, 0)); void SendHeartbeat(); void HeartbeatTimeout(); private: ola::e133::MessageBuilder *m_message_builder; ola::io::NonBlockingSender *m_message_queue; std::auto_ptr > m_on_timeout; ola::thread::SchedulingExecutorInterface *m_executor; // The default interval in seconds for sending heartbeat messages. static const unsigned int E133_TCP_HEARTBEAT_INTERVAL = 5; }; #endif // TOOLS_E133_E133HEALTHCHECKEDCONNECTION_H_ ola-0.10.9/tools/e133/libolae133controller.pc.in0000664000175000017500000000040214376533110016004 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libolae133controller Version: @VERSION@ Description: Open Lighting Architecture E1.33 Controller Requires: Libs: -L${libdir} -lolae133controller Cflags: -I${includedir} ola-0.10.9/tools/e133/DeviceManagerImpl.h0000664000175000017500000001154514376533110014610 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DeviceManagerImpl.h * Copyright (C) 2013 Simon Newton * The DeviceManagerImpl maintains a TCP connection to each E1.33 device. */ #ifndef TOOLS_E133_DEVICEMANAGERIMPL_H_ #define TOOLS_E133_DEVICEMANAGERIMPL_H_ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #include #include #include #include #include #include #include #include #include #include #include #include #include HASH_MAP_H #include "libs/acn/RDMInflator.h" #include "libs/acn/E133Inflator.h" #include "libs/acn/RootInflator.h" #include "libs/acn/TCPTransport.h" namespace ola { namespace e133 { using ola::TimeInterval; using ola::network::TCPSocket; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using std::auto_ptr; using std::string; using std::vector; /** * This class is responsible for maintaining connections to E1.33 devices. * TODO(simon): Some of this code can be re-used for the controller side. See * if we can factor it out. */ class DeviceManagerImpl { public: /* * The callback used to receive RDMNet layer messages from the devices. * @returns true if the data should be acknowledged, false otherwise. */ typedef ola::Callback3 RDMMesssageCallback; // Run when we acquire designated controller status for a device. typedef ola::Callback1 AcquireDeviceCallback; // Run when we give up (or lose) designated controller status. typedef ola::Callback1 ReleaseDeviceCallback; DeviceManagerImpl(ola::io::SelectServerInterface *ss, ola::e133::MessageBuilder *message_builder); ~DeviceManagerImpl(); // Ownership of the callbacks is transferred. void SetRDMMessageCallback(RDMMesssageCallback *callback); void SetAcquireDeviceCallback(AcquireDeviceCallback *callback); void SetReleaseDeviceCallback(ReleaseDeviceCallback *callback); void AddDevice(const IPV4Address &ip_address); void RemoveDevice(const IPV4Address &ip_address); void RemoveDeviceIfNotConnected(const IPV4Address &ip_address); void ListManagedDevices(vector *devices) const; private: // hash_map of IPs to DeviceState typedef HASH_NAMESPACE::HASH_MAP_CLASS DeviceMap; DeviceMap m_device_map; auto_ptr m_rdm_callback; auto_ptr m_acquire_device_cb_; auto_ptr m_release_device_cb_; ola::io::SelectServerInterface *m_ss; ola::network::TCPSocketFactory m_tcp_socket_factory; ola::network::AdvancedTCPConnector m_connector; ola::LinearBackoffPolicy m_backoff_policy; ola::e133::MessageBuilder *m_message_builder; // inflators ola::acn::RootInflator m_root_inflator; ola::acn::E133Inflator m_e133_inflator; ola::acn::RDMInflator m_rdm_inflator; /* * Avoid passing pointers to the DeviceState objects in callbacks. * When we start removing stale entries this is going to break! * Maybe this won't be a problem since we'll never delete the entry for a * a device we have a connection to. Think about this. */ void OnTCPConnect(TCPSocket *socket); void ReceiveTCPData(IPV4Address ip_address, ola::acn::IncomingTCPTransport *transport); void SocketUnhealthy(IPV4Address address); void SocketClosed(IPV4Address address); void RLPDataReceived(const ola::acn::TransportHeader &header); void EndpointRequest( const ola::acn::TransportHeader *transport_header, const ola::acn::E133Header *e133_header, const string &raw_request); static const TimeInterval TCP_CONNECT_TIMEOUT; static const TimeInterval INITIAL_TCP_RETRY_DELAY; static const TimeInterval MAX_TCP_RETRY_DELAY; }; } // namespace e133 } // namespace ola #endif // TOOLS_E133_DEVICEMANAGERIMPL_H_ ola-0.10.9/tools/e133/e133-monitor.cpp0000664000175000017500000001237014376533110013764 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * e133-monitor.cpp * Copyright (C) 2011 Simon Newton * * This opens a TCP connection to each device in \--targets. * * It then waits to receive E1.33 messages on the TCP connections. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include using ola::NewCallback; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::rdm::PidStoreHelper; using ola::rdm::RDMCommand; using ola::rdm::UID; using std::auto_ptr; using std::cout; using std::endl; using std::string; using std::vector; DEFINE_s_string(pid_location, p, "", "The directory to read PID definitions from"); DEFINE_s_string(target_addresses, t, "", "List of IPs to connect to"); /** * A very simple E1.33 Controller that acts as a passive monitor. */ class SimpleE133Monitor { public: explicit SimpleE133Monitor(PidStoreHelper *pid_helper); ~SimpleE133Monitor(); bool Init(); void AddIP(const IPV4Address &ip_address); void Run() { m_ss.Run(); } private: ola::rdm::CommandPrinter m_command_printer; ola::io::SelectServer m_ss; ola::io::StdinHandler m_stdin_handler; ola::e133::MessageBuilder m_message_builder; ola::e133::DeviceManager m_device_manager; void Input(int c); bool EndpointRequest( const IPV4Address &source, uint16_t endpoint, const string &raw_request); }; /** * Setup a new Monitor */ SimpleE133Monitor::SimpleE133Monitor(PidStoreHelper *pid_helper) : m_command_printer(&cout, pid_helper), m_stdin_handler(&m_ss, ola::NewCallback(this, &SimpleE133Monitor::Input)), m_message_builder(ola::acn::CID::Generate(), "OLA Monitor"), m_device_manager(&m_ss, &m_message_builder) { m_device_manager.SetRDMMessageCallback( NewCallback(this, &SimpleE133Monitor::EndpointRequest)); } SimpleE133Monitor::~SimpleE133Monitor() { // This used to stop the SLP thread. } bool SimpleE133Monitor::Init() { // Previously this started the SLP thread. return true; } void SimpleE133Monitor::AddIP(const IPV4Address &ip_address) { m_device_manager.AddDevice(ip_address); } void SimpleE133Monitor::Input(int c) { switch (c) { case 'q': m_ss.Terminate(); break; default: break; } } /** * We received data to endpoint 0 */ bool SimpleE133Monitor::EndpointRequest( const IPV4Address &source, uint16_t endpoint, const string &raw_request) { unsigned int slot_count = raw_request.size(); const uint8_t *rdm_data = reinterpret_cast( raw_request.data()); cout << "From " << source << ":" << endpoint << endl; auto_ptr command( RDMCommand::Inflate(reinterpret_cast(raw_request.data()), raw_request.size())); if (command.get()) { command->Print(&m_command_printer, false, true); } else { ola::FormatData(&cout, rdm_data, slot_count, 2); } return true; } /* * Startup a node */ int main(int argc, char *argv[]) { ola::AppInit(&argc, argv, "[options]", "Open a TCP connection to E1.33 Devices and wait for E1.33 " "messages."); PidStoreHelper pid_helper(FLAGS_pid_location, 4); vector targets; if (!FLAGS_target_addresses.str().empty()) { vector tokens; ola::StringSplit(FLAGS_target_addresses, &tokens, ","); vector::const_iterator iter = tokens.begin(); for (; iter != tokens.end(); ++iter) { IPV4Address ip_address; if (!IPV4Address::FromString(*iter, &ip_address)) { OLA_WARN << "Invalid address " << *iter; ola::DisplayUsage(); } targets.push_back(ip_address); } } if (!pid_helper.Init()) exit(ola::EXIT_OSFILE); SimpleE133Monitor monitor(&pid_helper); if (!monitor.Init()) exit(ola::EXIT_UNAVAILABLE); // manually add the responder IPs vector::const_iterator iter = targets.begin(); for (; iter != targets.end(); ++iter) { monitor.AddIP(*iter); } monitor.Run(); } ola-0.10.9/tools/e133/E133Device.cpp0000664000175000017500000002203714376533110013360 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133Device.cpp * Copyright (C) 2011 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "libs/acn/E133Header.h" #include "libs/acn/E133PDU.h" #include "libs/acn/RDMPDU.h" #include "libs/acn/RDMInflator.h" #include "libs/acn/E133StatusInflator.h" #include "libs/acn/UDPTransport.h" #include "tools/e133/E133Device.h" #include "tools/e133/E133Endpoint.h" #include "tools/e133/E133HealthCheckedConnection.h" #include "tools/e133/EndpointManager.h" #include "tools/e133/TCPConnectionStats.h" using ola::NewCallback; using ola::io::IOStack; using ola::network::HealthCheckedConnection; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::acn::RDMPDU; using std::auto_ptr; using std::string; using std::vector; // TODO(simon): At some point move this to a common E1.33 library. ola::e133::E133StatusCode RDMStatusCodeToE133Status( ola::rdm::RDMStatusCode status_code) { switch (status_code) { case ola::rdm::RDM_COMPLETED_OK: return ola::e133::SC_E133_ACK; case ola::rdm::RDM_WAS_BROADCAST: return ola::e133::SC_E133_BROADCAST_COMPLETE; case ola::rdm::RDM_FAILED_TO_SEND: case ola::rdm::RDM_TIMEOUT: return ola::e133::SC_E133_RDM_TIMEOUT; case ola::rdm::RDM_UNKNOWN_UID: return ola::e133::SC_E133_UNKNOWN_UID; case ola::rdm::RDM_INVALID_RESPONSE: case ola::rdm::RDM_CHECKSUM_INCORRECT: case ola::rdm::RDM_TRANSACTION_MISMATCH: case ola::rdm::RDM_SUB_DEVICE_MISMATCH: case ola::rdm::RDM_SRC_UID_MISMATCH: case ola::rdm::RDM_DEST_UID_MISMATCH: case ola::rdm::RDM_WRONG_SUB_START_CODE: case ola::rdm::RDM_PACKET_TOO_SHORT: case ola::rdm::RDM_PACKET_LENGTH_MISMATCH: case ola::rdm::RDM_PARAM_LENGTH_MISMATCH: case ola::rdm::RDM_INVALID_COMMAND_CLASS: case ola::rdm::RDM_COMMAND_CLASS_MISMATCH: case ola::rdm::RDM_INVALID_RESPONSE_TYPE: case ola::rdm::RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED: case ola::rdm::RDM_DUB_RESPONSE: return ola::e133::SC_E133_RDM_INVALID_RESPONSE; } return ola::e133::SC_E133_RDM_INVALID_RESPONSE; } E133Device::E133Device(ola::io::SelectServerInterface *ss, const ola::acn::CID &cid, const ola::network::IPV4Address &ip_address, EndpointManager *endpoint_manager) : m_ss(ss), m_ip_address(ip_address), m_message_builder(cid, "OLA Device"), m_endpoint_manager(endpoint_manager), m_root_endpoint(NULL), m_root_rdm_device(NULL), m_incoming_udp_transport(&m_udp_socket, &m_root_inflator) { m_root_inflator.AddInflator(&m_e133_inflator); m_e133_inflator.AddInflator(&m_rdm_inflator); m_e133_inflator.AddInflator(&m_rdm_inflator); m_rdm_inflator.SetRDMHandler( NewCallback(this, &E133Device::EndpointRequest)); } E133Device::~E133Device() { vector endpoints; m_endpoint_manager->EndpointIDs(&endpoints); m_rdm_inflator.SetRDMHandler(NULL); } /** * Set the Root Endpoint, ownership is not transferred */ void E133Device::SetRootEndpoint(E133EndpointInterface *endpoint) { m_root_endpoint = endpoint; } /** * Init the device. */ bool E133Device::Init() { if (m_controller_connection.get()) { OLA_WARN << "Init already performed"; return false; } OLA_INFO << "Attempting to start E1.33 device at " << m_ip_address; m_controller_connection.reset(new DesignatedControllerConnection( m_ss, m_ip_address, &m_message_builder, &m_tcp_stats)); if (!m_controller_connection->Init()) { m_controller_connection.reset(); return false; } // setup the UDP socket if (!m_udp_socket.Init()) { m_controller_connection.reset(); return false; } if (!m_udp_socket.Bind(IPV4SocketAddress(IPV4Address::WildCard(), ola::acn::E133_PORT))) { m_controller_connection.reset(); return false; } m_udp_socket.SetOnData( NewCallback(&m_incoming_udp_transport, &ola::acn::IncomingUDPTransport::Receive)); m_ss->AddReadDescriptor(&m_udp_socket); return true; } /** * Return the TCPConnectionStats. */ TCPConnectionStats* E133Device::GetTCPStats() { return &m_tcp_stats; } /** * Send an unsolicated RDM message on the TCP channel. * @param command the RDM command to send, ownership is transferred. */ void E133Device::SendStatusMessage(const ola::rdm::RDMResponse *response) { if (m_controller_connection.get()) { m_controller_connection->SendStatusMessage(ROOT_E133_ENDPOINT, response); } else { OLA_WARN << "Init has not been called"; } } /** * Force close the designated controller's TCP connection. * @return, true if there was a connection to close, false otherwise. */ bool E133Device::CloseTCPConnection() { if (m_controller_connection.get()) { return m_controller_connection->CloseTCPConnection(); } else { return false; } } /** * Handle requests to an endpoint. */ void E133Device::EndpointRequest( const ola::acn::TransportHeader *transport_header, const ola::acn::E133Header *e133_header, const string &raw_request) { IPV4SocketAddress target = transport_header->Source(); uint16_t endpoint_id = e133_header->Endpoint(); OLA_INFO << "Got request for endpoint " << endpoint_id << " from " << target; E133EndpointInterface *endpoint = NULL; if (endpoint_id) endpoint = m_endpoint_manager->GetEndpoint(endpoint_id); else endpoint = m_root_endpoint; if (!endpoint) { OLA_INFO << "Request to non-existent endpoint " << endpoint_id; SendStatusMessage(target, e133_header->Sequence(), endpoint_id, ola::e133::SC_E133_NONEXISTANT_ENDPOINT, "No such endpoint"); return; } // attempt to unpack as a request ola::rdm::RDMRequest *request = ola::rdm::RDMRequest::InflateFromData( reinterpret_cast(raw_request.data()), raw_request.size()); if (!request) { OLA_WARN << "Failed to unpack E1.33 RDM message, ignoring request."; // There is no way to return 'invalid request' so pretend this is a timeout // but give a descriptive error msg. SendStatusMessage(target, e133_header->Sequence(), endpoint_id, ola::e133::SC_E133_RDM_TIMEOUT, "Invalid RDM request"); return; } endpoint->SendRDMRequest( request, ola::NewSingleCallback(this, &E133Device::EndpointRequestComplete, target, e133_header->Sequence(), endpoint_id)); } /** * Handle a completed RDM request. */ void E133Device::EndpointRequestComplete( ola::network::IPV4SocketAddress target, uint32_t sequence_number, uint16_t endpoint_id, ola::rdm::RDMReply *reply) { if (reply->StatusCode() != ola::rdm::RDM_COMPLETED_OK) { string description = ola::rdm::ResponseCodeToString(reply->StatusCode()); ola::e133::E133StatusCode e133_status_code = RDMStatusCodeToE133Status( reply->StatusCode()); SendStatusMessage(target, sequence_number, endpoint_id, e133_status_code, description); return; } IOStack packet(m_message_builder.pool()); ola::rdm::RDMCommandSerializer::Write(*reply->Response(), &packet); RDMPDU::PrependPDU(&packet); m_message_builder.BuildUDPRootE133( &packet, ola::acn::VECTOR_FRAMING_RDMNET, sequence_number, endpoint_id); if (!m_udp_socket.SendTo(&packet, target)) { OLA_WARN << "Failed to send E1.33 response to " << target; } } void E133Device::SendStatusMessage( const ola::network::IPV4SocketAddress target, uint32_t sequence_number, uint16_t endpoint_id, ola::e133::E133StatusCode status_code, const string &description) { IOStack packet(m_message_builder.pool()); m_message_builder.BuildUDPE133StatusPDU( &packet, sequence_number, endpoint_id, status_code, description); if (!m_udp_socket.SendTo(&packet, target)) { OLA_WARN << "Failed to send E1.33 response to " << target; } } ola-0.10.9/tools/e133/EndpointManager.h0000664000175000017500000000524014376533110014342 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * EndpointManager.h * Copyright (C) 2012 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifndef TOOLS_E133_ENDPOINTMANAGER_H_ #define TOOLS_E133_ENDPOINTMANAGER_H_ #include #include #include #include HASH_MAP_H #include "tools/e133/E133Endpoint.h" /** * The EndpointManager holds all endpoints. * The manager provides a mechanism to send notifications when endpoints are * added & removed. This is done through callbacks. */ class EndpointManager { public: typedef ola::Callback1 EndpointNotificationCallback; typedef enum { ADD, REMOVE, BOTH } EndpointNotificationEvent; EndpointManager() : m_list_change_number(0) { } ~EndpointManager() {} uint32_t list_change_number() const { return m_list_change_number; } // register and unregister endpoints bool RegisterEndpoint(uint16_t endpoint_id, class E133Endpoint *endpoint); void UnRegisterEndpoint(uint16_t endpoint); // lookup methods E133Endpoint* GetEndpoint(uint16_t endpoint_id) const; void EndpointIDs(std::vector *id_list) const; // control notifications void RegisterNotification(EndpointNotificationEvent event_type, EndpointNotificationCallback *callback); bool UnRegisterNotification(EndpointNotificationCallback *callback); private: // hash_map of non-root endpoints typedef HASH_NAMESPACE::HASH_MAP_CLASS EndpointMap; EndpointMap m_endpoint_map; uint32_t m_list_change_number; // list of callbacks to run typedef struct { EndpointNotificationEvent event_type; EndpointNotificationCallback *callback; } EndpointNotification; std::vector m_callbacks; void RunNotifications(uint16_t endpoint_id, EndpointNotificationEvent event_type); }; #endif // TOOLS_E133_ENDPOINTMANAGER_H_ ola-0.10.9/tools/e133/TCPConnectionStats.h0000664000175000017500000000255314376533110014760 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * TCPConnectionStats.h * Copyright (C) 2012 Simon Newton */ #include #include #ifndef TOOLS_E133_TCPCONNECTIONSTATS_H_ #define TOOLS_E133_TCPCONNECTIONSTATS_H_ /** * Container for stats about the TCP connection. */ class TCPConnectionStats { public: TCPConnectionStats() : ip_address(), connection_events(0), unhealthy_events(0) { } void ResetCounters() { connection_events = 0; unhealthy_events = 0; } ola::network::IPV4Address ip_address; uint16_t connection_events; uint16_t unhealthy_events; }; #endif // TOOLS_E133_TCPCONNECTIONSTATS_H_ ola-0.10.9/tools/e133/SimpleE133Node.cpp0000664000175000017500000001141714376533110014220 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * SimpleE133Node.cpp * Copyright (C) 2011 Simon Newton * * This creates a E1.33 receiver with one (emulated) RDM responder. The node's * RDM responder responds to E1.33 commands. */ #include #include #include #include #include #include #include #include #include #include #include #include #include "tools/e133/E133Device.h" #include "tools/e133/EndpointManager.h" #include "tools/e133/ManagementEndpoint.h" #include "tools/e133/SimpleE133Node.h" #include "tools/e133/TCPConnectionStats.h" using ola::network::HostToNetwork; using ola::network::IPV4Address; using ola::rdm::RDMResponse; using ola::rdm::UID; using std::cout; using std::endl; using std::string; /** * Constructor */ SimpleE133Node::SimpleE133Node(const Options &options) : m_stdin_handler(&m_ss, ola::NewCallback(this, &SimpleE133Node::Input)), m_e133_device(&m_ss, options.cid, options.ip_address, &m_endpoint_manager), m_management_endpoint(NULL, E133Endpoint::EndpointProperties(), options.uid, &m_endpoint_manager, m_e133_device.GetTCPStats()), m_lifetime(options.lifetime), m_uid(options.uid), m_ip_address(options.ip_address) { } SimpleE133Node::~SimpleE133Node() { m_endpoint_manager.UnRegisterEndpoint(1); } /** * Init this node */ bool SimpleE133Node::Init() { if (!m_e133_device.Init()) return false; // register the root endpoint m_e133_device.SetRootEndpoint(&m_management_endpoint); cout << "--------------- Controls ----------------\n"; cout << " c - Close the TCP connection\n"; cout << " q - Quit\n"; cout << " s - Send Status Message\n"; cout << " t - Dump TCP stats\n"; cout << "-------------------------------------------\n"; return true; } void SimpleE133Node::Run() { m_ss.Run(); OLA_INFO << "Starting shutdown process"; } void SimpleE133Node::AddEndpoint(uint16_t endpoint_id, E133Endpoint *endpoint) { m_endpoint_manager.RegisterEndpoint(endpoint_id, endpoint); } void SimpleE133Node::RemoveEndpoint(uint16_t endpoint_id) { m_endpoint_manager.UnRegisterEndpoint(endpoint_id); } /** * Called when there is data on stdin. */ void SimpleE133Node::Input(int c) { switch (c) { case 'c': m_e133_device.CloseTCPConnection(); break; case 'q': m_ss.Terminate(); break; case 's': SendUnsolicited(); break; case 't': DumpTCPStats(); break; default: break; } } /** * Dump the TCP stats */ void SimpleE133Node::DumpTCPStats() { const TCPConnectionStats* stats = m_e133_device.GetTCPStats(); cout << "IP: " << stats->ip_address << endl; cout << "Connection Unhealthy Events: " << stats->unhealthy_events << endl; cout << "Connection Events: " << stats->connection_events << endl; } /** * Send an unsolicited message on the TCP connection */ void SimpleE133Node::SendUnsolicited() { OLA_INFO << "Sending unsolicited TCP stats message"; PACK( struct tcp_stats_message_s { uint32_t ip_address; uint16_t unhealthy_events; uint16_t connection_events; }); struct tcp_stats_message_s tcp_stats_message; const TCPConnectionStats* stats = m_e133_device.GetTCPStats(); tcp_stats_message.ip_address = stats->ip_address.AsInt(); tcp_stats_message.unhealthy_events = HostToNetwork(stats->unhealthy_events); tcp_stats_message.connection_events = HostToNetwork(stats->connection_events); UID bcast_uid = UID::AllDevices(); const RDMResponse *response = new ola::rdm::RDMGetResponse( m_uid, bcast_uid, 0, // transaction number ola::rdm::RDM_ACK, 0, // message count ola::rdm::ROOT_RDM_DEVICE, ola::rdm::PID_TCP_COMMS_STATUS, reinterpret_cast(&tcp_stats_message), sizeof(tcp_stats_message)); m_e133_device.SendStatusMessage(response); } ola-0.10.9/tools/e133/E133HealthCheckedConnection.cpp0000664000175000017500000000452014376533110016652 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133HealthCheckedConnection.cpp * Copyright (C) 2012 Simon Newton */ #include #include #include #include "libs/acn/RootSender.h" #include "tools/e133/E133HealthCheckedConnection.h" using ola::io::IOStack; /** * Create a new E1.33 Health Checked Connection. * @param message_builder the MessageBuilder to use to create packets. * @param message_queue the NonBlockingSender to use to send packets. * @param on_timeout the callback to run when the heartbeats don't arrive * @param scheduler A SchedulerInterface used to control the timers * @param heartbeat_interval the TimeInterval between heartbeats */ E133HealthCheckedConnection::E133HealthCheckedConnection( ola::e133::MessageBuilder *message_builder, ola::io::NonBlockingSender *message_queue, ola::SingleUseCallback0 *on_timeout, ola::thread::SchedulingExecutorInterface *scheduler, const ola::TimeInterval heartbeat_interval) : HealthCheckedConnection(scheduler, heartbeat_interval), m_message_builder(message_builder), m_message_queue(message_queue), m_on_timeout(on_timeout), m_executor(scheduler) { } /** * Send a E1.33 heartbeat */ void E133HealthCheckedConnection::SendHeartbeat() { IOStack packet(m_message_builder->pool()); m_message_builder->BuildNullTCPPacket(&packet); m_message_queue->SendMessage(&packet); } /** * Called if the connection is declared dead */ void E133HealthCheckedConnection::HeartbeatTimeout() { OLA_INFO << "TCP connection heartbeat timeout"; if (m_on_timeout.get()) { m_executor->Execute(m_on_timeout.release()); } } ola-0.10.9/tools/e133/E133Endpoint.cpp0000664000175000017500000000547314376533110013746 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133Endpoint.cpp * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include #include #include #include "tools/e133/E133Endpoint.h" using ola::rdm::RDMCallback; using ola::rdm::RDMDiscoveryCallback; using ola::rdm::RDMRequest; using std::auto_ptr; using std::string; using std::vector; const uint16_t E133EndpointInterface::UNPATCHED_UNIVERSE = 0; const uint16_t E133EndpointInterface::COMPOSITE_UNIVERSE = 0xffff; typedef vector RDMPackets; E133Endpoint::E133Endpoint(DiscoverableRDMControllerInterface *controller, const EndpointProperties &properties) : m_identify_mode(false), m_is_physical(properties.is_physical), m_universe(UNPATCHED_UNIVERSE), m_endpoint_label(""), m_device_list_change(0), m_controller(controller) { } void E133Endpoint::set_identify_mode(bool identify_on) { m_identify_mode = identify_on; OLA_INFO << "IDENTIFY MODE " << (identify_on ? "ON" : "OFF"); } /** * Run full discovery for this endpoint. */ void E133Endpoint::RunFullDiscovery(RDMDiscoveryCallback *callback) { if (m_controller) { m_controller->RunFullDiscovery(callback); return; } ola::rdm::UIDSet uid_set; callback->Run(uid_set); } /** * Run incremental discovery for this endpoint. */ void E133Endpoint::RunIncrementalDiscovery(RDMDiscoveryCallback *callback) { if (m_controller) { m_controller->RunIncrementalDiscovery(callback); return; } ola::rdm::UIDSet uid_set; callback->Run(uid_set); } /** * Handle RDM requests to this endpoint */ void E133Endpoint::SendRDMRequest(RDMRequest *request_ptr, RDMCallback *on_complete) { if (m_controller) { m_controller->SendRDMRequest(request_ptr, on_complete); return; } else { auto_ptr request(request_ptr); OLA_WARN << "Endpoint " << m_endpoint_label << " has no controller attached"; ola::rdm::RunRDMCallback(on_complete, ola::rdm::RDM_UNKNOWN_UID); } } ola-0.10.9/tools/e133/MessageBuilder.cpp0000664000175000017500000001030514376533110014513 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * MessageBuilder.cpp * Copyright (C) 2013 Simon Newton * * A class to simplify some of the E1.33 packet building operations. */ #include #include "ola/acn/ACNVectors.h" #include "ola/acn/CID.h" #include "ola/e133/MessageBuilder.h" #include "ola/io/IOStack.h" #include "libs/acn/E133PDU.h" #include "libs/acn/RDMPDU.h" #include "libs/acn/RootPDU.h" #include "libs/acn/E133StatusPDU.h" #include "libs/acn/PreamblePacker.h" namespace ola { namespace e133 { using ola::acn::CID; using ola::io::IOStack; using ola::acn::E133PDU; using ola::acn::PreamblePacker; using ola::acn::RootPDU; MessageBuilder::MessageBuilder(const CID &cid, const string &source_name) : m_cid(cid), m_source_name(source_name), // The Max sized RDM packet is 256 bytes, E1.33 adds 118 bytes of // headers. m_memory_pool(400) { } /** * Append a RDM PDU Header onto this packet */ void MessageBuilder::PrependRDMHeader(IOStack *packet) { ola::acn::RDMPDU::PrependPDU(packet); } /** * Build a NULL TCP packet. These packets can be used for heartbeats. */ void MessageBuilder::BuildNullTCPPacket(IOStack *packet) { RootPDU::PrependPDU(packet, ola::acn::VECTOR_ROOT_NULL, m_cid); PreamblePacker::AddTCPPreamble(packet); } /** * Build a TCP E1.33 Status PDU response. This should really only be used with * SC_E133_ACK. */ void MessageBuilder::BuildTCPE133StatusPDU(ola::io::IOStack *packet, uint32_t sequence_number, uint16_t endpoint_id, E133StatusCode status_code, const string &description) { ola::acn::E133StatusPDU::PrependPDU( packet, status_code, description); BuildTCPRootE133( packet, ola::acn::VECTOR_FRAMING_STATUS, sequence_number, endpoint_id); } /** * Build an E1.33 Status PDU response */ void MessageBuilder::BuildUDPE133StatusPDU(ola::io::IOStack *packet, uint32_t sequence_number, uint16_t endpoint_id, E133StatusCode status_code, const string &description) { ola::acn::E133StatusPDU::PrependPDU( packet, status_code, description); BuildUDPRootE133( packet, ola::acn::VECTOR_FRAMING_STATUS, sequence_number, endpoint_id); } /** * Append an E133PDU, a RootPDU and the TCP preamble to a packet. */ void MessageBuilder::BuildTCPRootE133(IOStack *packet, uint32_t vector, uint32_t sequence_number, uint16_t endpoint_id) { E133PDU::PrependPDU(packet, vector, m_source_name, sequence_number, endpoint_id); RootPDU::PrependPDU(packet, ola::acn::VECTOR_ROOT_E133, m_cid); PreamblePacker::AddTCPPreamble(packet); } /** * Append an E133PDU, a RootPDU and the UDP preamble to a packet. */ void MessageBuilder::BuildUDPRootE133(IOStack *packet, uint32_t vector, uint32_t sequence_number, uint16_t endpoint_id) { E133PDU::PrependPDU(packet, vector, m_source_name, sequence_number, endpoint_id); RootPDU::PrependPDU(packet, ola::acn::VECTOR_ROOT_E133, m_cid); PreamblePacker::AddUDPPreamble(packet); } } // namespace e133 } // namespace ola ola-0.10.9/tools/e133/DeviceManager.cpp0000664000175000017500000000575714376533110014331 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DeviceManager.cpp * Copyright (C) 2013 Simon Newton */ #include #include #include #include "ola/e133/DeviceManager.h" #include "ola/io/SelectServer.h" #include "ola/network/IPV4Address.h" #include "tools/e133/DeviceManagerImpl.h" namespace ola { namespace e133 { using ola::NewCallback; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using std::string; /** * Construct a new DeviceManager * @param ss a pointer to a SelectServerInterface to use * @param cid the CID of this controller. */ DeviceManager::DeviceManager(ola::io::SelectServerInterface *ss, ola::e133::MessageBuilder *message_builder) : m_impl(new DeviceManagerImpl(ss, message_builder)) { } /** * Clean up */ DeviceManager::~DeviceManager() {} /** * Set the callback to be run when RDMNet data is received from a device. * @param callback the RDMMesssageCallback to run when data is received. */ void DeviceManager::SetRDMMessageCallback(RDMMesssageCallback *callback) { m_impl->SetRDMMessageCallback(callback); } /** * Set the callback to be run when we become the designated controller for a * device. */ void DeviceManager::SetAcquireDeviceCallback(AcquireDeviceCallback *callback) { m_impl->SetAcquireDeviceCallback(callback); } /* * Set the callback to be run when we lose the designated controller status for * a device. */ void DeviceManager::SetReleaseDeviceCallback(ReleaseDeviceCallback *callback) { m_impl->SetReleaseDeviceCallback(callback); } /** * Start maintaining a connection to this device. */ void DeviceManager::AddDevice(const IPV4Address &ip_address) { m_impl->AddDevice(ip_address); } /** * Remove a device, closing the connection if we have one. */ void DeviceManager::RemoveDevice(const IPV4Address &ip_address) { m_impl->RemoveDevice(ip_address); } /** * Remove a device if there is no open connection. */ void DeviceManager::RemoveDeviceIfNotConnected(const IPV4Address &ip_address) { m_impl->RemoveDeviceIfNotConnected(ip_address); } /** * Populate the vector with the devices that we are the designated controller * for. */ void DeviceManager::ListManagedDevices(vector *devices) const { m_impl->ListManagedDevices(devices); } } // namespace e133 } // namespace ola ola-0.10.9/tools/e133/E133Endpoint.h0000664000175000017500000001122014376533110013376 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133Endpoint.h * Copyright (C) 2012 Simon Newton */ #include #include #include "ola/e133/E133Enums.h" #include "ola/rdm/RDMControllerInterface.h" #include "ola/rdm/UIDSet.h" #ifndef TOOLS_E133_E133ENDPOINT_H_ #define TOOLS_E133_E133ENDPOINT_H_ using ola::rdm::UIDSet; using std::string; static const uint16_t ROOT_E133_ENDPOINT = 0; /** * The base class for E1.33 Endpoints. * Endpoints are tasked with handling RDM requests. */ class E133EndpointInterface : public ola::rdm::DiscoverableRDMControllerInterface { public: E133EndpointInterface() {} virtual ~E133EndpointInterface() {} // virtual bool supports_pid(ola::rdm::rdm_pid pid) const = 0; // IDENTIFY_ENDPOINT virtual bool identify_mode() const = 0; virtual void set_identify_mode(bool identify_on) = 0; // ENDPOINT_TO_UNIVERSE virtual uint16_t universe() const = 0; virtual void set_universe(uint16_t universe) = 0; virtual bool is_physical() const = 0; // RDM_TRAFFIC_ENABLE // virtual bool rdm_enabled() const = 0; // ENDPOINT_MODE // virtual ola::acn::EndpointMode endpoint_mode() const = 0; // ENDPOINT_LABEL virtual string label() const = 0; virtual void set_label(const string &endpoint_label) = 0; // DISCOVERY_STATE // BACKGROUND_DISCOVERY // BACKGROUND_QUEUED_STATUS_POLICY // BACKGROUND_QUEUED_STATUS_POLICY_DESCRIPTION // BACKGROUND_STATUS_TYPE // QUEUED_STATUS_ENDPOINT_COLLECTION // QUEUED_STATUS_UID_COLLECTION // ENDPOINT_TIMING // ENDPOINT_TIMING_DESCRIPTION // ENDPOINT_DEVICE_LIST_CHANGE virtual uint32_t device_list_change() const = 0; // ENDPOINT_DEVICES virtual void EndpointDevices(UIDSet *uids) const = 0; // BINDING_AND_CONTROL_FIELDS static const uint16_t UNPATCHED_UNIVERSE; static const uint16_t COMPOSITE_UNIVERSE; }; /** * An E133Endpoint which wraps another RDM controller. This just passes * everything through the to controller. */ class E133Endpoint: public E133EndpointInterface { public: // Callbacks which run various actions take place. // TODO(simon): if we expect the callee to read the state, perhaps there // should just be one callback with an enum indicating what changed? /* struct EventHandlers { public: ola::Callback0 *identify_changed; ola::Callback0 *universe_changed; EventHandlers() : identify_changed(NULL), universe_changed(NULL) { } }; */ /* * The constant properties of an endpoint */ struct EndpointProperties { bool is_physical; EndpointProperties() : is_physical(false) {} }; E133Endpoint(DiscoverableRDMControllerInterface *controller, const EndpointProperties &properties); ~E133Endpoint() {} bool identify_mode() const { return m_identify_mode; } void set_identify_mode(bool identify_on); uint16_t universe() const { return m_universe; } void set_universe(uint16_t universe) { m_universe = universe; } bool is_physical() const { return m_is_physical; } string label() const { return m_endpoint_label; } void set_label(const string &endpoint_label) { m_endpoint_label = endpoint_label; } uint32_t device_list_change() const { return m_device_list_change; } void EndpointDevices(UIDSet *uids) const { *uids = m_uids; } virtual void RunFullDiscovery(ola::rdm::RDMDiscoveryCallback *callback); virtual void RunIncrementalDiscovery( ola::rdm::RDMDiscoveryCallback *callback); virtual void SendRDMRequest(ola::rdm::RDMRequest *request, ola::rdm::RDMCallback *on_complete); private: bool m_identify_mode; const bool m_is_physical; uint16_t m_universe; string m_endpoint_label; uint32_t m_device_list_change; UIDSet m_uids; DiscoverableRDMControllerInterface *m_controller; }; #endif // TOOLS_E133_E133ENDPOINT_H_ ola-0.10.9/tools/e133/e133-controller.cpp0000664000175000017500000003541314376533110014463 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * e133-controller.cpp * Copyright (C) 2011 Simon Newton * * This connects to the device specified in \--target. * * It then sends some RDM commands to the E1.33 node and waits for the * response. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "libs/acn/RDMPDU.h" DEFINE_s_uint16(endpoint, e, 0, "The endpoint to use"); DEFINE_s_string(target, t, "", "List of IPs to connect to"); DEFINE_string(listen_ip, "", "The IP address to listen on"); DEFINE_s_string(pid_location, p, "", "The directory to read PID definitions from"); DEFINE_s_default_bool(set, s, false, "Perform a SET (default is GET)"); DEFINE_default_bool(list_pids, false, "Display a list of pids"); DEFINE_s_string(uid, u, "", "The UID of the device to control."); using ola::NewCallback; using ola::io::IOStack; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::network::UDPSocket; using ola::acn::E133_PORT; using ola::acn::RDMPDU; using ola::rdm::PidStoreHelper; using ola::rdm::RDMCommandSerializer; using ola::rdm::RDMRequest; using ola::rdm::RDMResponse; using ola::rdm::UID; using std::auto_ptr; using std::cout; using std::endl; using std::string; using std::vector; /* * Dump the list of known pids */ void DisplayPIDsAndExit(uint16_t manufacturer_id, const PidStoreHelper &pid_helper) { vector pid_names; pid_helper.SupportedPids(manufacturer_id, &pid_names); sort(pid_names.begin(), pid_names.end()); vector::const_iterator iter = pid_names.begin(); for (; iter != pid_names.end(); ++iter) { cout << *iter << endl; } exit(ola::EXIT_OK); } /** * A very simple E1.33 Controller */ class SimpleE133Controller { public: struct Options { IPV4Address controller_ip; explicit Options(const IPV4Address &ip) : controller_ip(ip) { } }; SimpleE133Controller(const Options &options, PidStoreHelper *pid_helper); ~SimpleE133Controller(); bool Init(); void AddUID(const UID &uid, const IPV4Address &ip); void Run(); void Stop() { m_ss.Terminate(); } // very basic methods for sending RDM requests void SendGetRequest(const UID &dst_uid, uint16_t endpoint, uint16_t pid, const uint8_t *data, unsigned int data_length); void SendSetRequest(const UID &dst_uid, uint16_t endpoint, uint16_t pid, const uint8_t *data, unsigned int data_length); private: const IPV4Address m_controller_ip; ola::io::SelectServer m_ss; ola::e133::MessageBuilder m_message_builder; // sockets & transports UDPSocket m_udp_socket; ola::e133::E133Receiver m_e133_receiver; // hash_map of UIDs to IPs typedef std::map uid_to_ip_map; uid_to_ip_map m_uid_to_ip; UID m_src_uid; PidStoreHelper *m_pid_helper; ola::rdm::CommandPrinter m_command_printer; bool SendRequest(const UID &uid, uint16_t endpoint, RDMRequest *request); void HandlePacket(const ola::e133::E133RDMMessage &rdm_message); void HandleNack(const RDMResponse *response); void HandleStatusMessage( const ola::e133::E133StatusMessage &status_message); }; /** * Setup our simple controller */ SimpleE133Controller::SimpleE133Controller( const Options &options, PidStoreHelper *pid_helper) : m_controller_ip(options.controller_ip), m_message_builder(ola::acn::CID::Generate(), "E1.33 Controller"), m_e133_receiver( &m_udp_socket, NewCallback(this, &SimpleE133Controller::HandleStatusMessage), NewCallback(this, &SimpleE133Controller::HandlePacket)), m_src_uid(ola::OPEN_LIGHTING_ESTA_CODE, 0xabcdabcd), m_pid_helper(pid_helper), m_command_printer(&cout, m_pid_helper) { } /** * Tear down */ SimpleE133Controller::~SimpleE133Controller() { // This used to stop the SLP thread. } /** * Start up the controller */ bool SimpleE133Controller::Init() { if (!m_udp_socket.Init()) return false; if (!m_udp_socket.Bind(IPV4SocketAddress(m_controller_ip, 0))) { OLA_INFO << "Failed to bind to UDP port"; return false; } m_ss.AddReadDescriptor(&m_udp_socket); // Previously this started the SLP thread. return true; } void SimpleE133Controller::AddUID(const UID &uid, const IPV4Address &ip) { OLA_INFO << "Adding UID " << uid << " @ " << ip; ola::STLReplace(&m_uid_to_ip, uid, ip); } /** * Run the controller and wait for the responses (or timeouts) */ void SimpleE133Controller::Run() { m_ss.Run(); } /** * Send a GET request */ void SimpleE133Controller::SendGetRequest(const UID &dst_uid, uint16_t endpoint, uint16_t pid, const uint8_t *data, unsigned int length) { // send a second one ola::rdm::RDMGetRequest *command = new ola::rdm::RDMGetRequest( m_src_uid, dst_uid, 0, // transaction # 1, // port id ola::rdm::ROOT_RDM_DEVICE, // sub device pid, // param id data, // data length); // data length if (!SendRequest(dst_uid, endpoint, command)) { OLA_FATAL << "Failed to send request"; m_ss.Terminate(); } else if (dst_uid.IsBroadcast()) { OLA_INFO << "Request broadcast"; m_ss.Terminate(); } else { OLA_INFO << "Request sent, waiting for response"; } } /** * Send a SET request */ void SimpleE133Controller::SendSetRequest(const UID &dst_uid, uint16_t endpoint, uint16_t pid, const uint8_t *data, unsigned int data_length) { ola::rdm::RDMSetRequest *command = new ola::rdm::RDMSetRequest( m_src_uid, dst_uid, 0, // transaction # 1, // port id ola::rdm::ROOT_RDM_DEVICE, // sub device pid, // param id data, // data data_length); // data length if (!SendRequest(dst_uid, endpoint, command)) { OLA_FATAL << "Failed to send request"; m_ss.Terminate(); } else { OLA_INFO << "Request sent"; } } /** * Send an RDM Request. * This packs the data into a ACN structure and sends it. */ bool SimpleE133Controller::SendRequest(const UID &uid, uint16_t endpoint, RDMRequest *raw_request) { auto_ptr request(raw_request); IPV4Address *target_address = ola::STLFind(&m_uid_to_ip, uid); if (!target_address) { OLA_WARN << "UID " << uid << " not found"; return false; } IPV4SocketAddress target(*target_address, E133_PORT); OLA_INFO << "Sending to " << target << "/" << uid << "/" << endpoint; // Build the E1.33 packet. IOStack packet(m_message_builder.pool()); RDMCommandSerializer::Write(*request, &packet); RDMPDU::PrependPDU(&packet); m_message_builder.BuildUDPRootE133( &packet, ola::acn::VECTOR_FRAMING_RDMNET, 0, endpoint); // Send the packet m_udp_socket.SendTo(&packet, target); if (!packet.Empty()) { return false; } return true; } /** * Handle a RDM message. */ void SimpleE133Controller::HandlePacket( const ola::e133::E133RDMMessage &rdm_message) { OLA_INFO << "RDM callback executed with code: " << ola::rdm::StatusCodeToString(rdm_message.status_code); m_ss.Terminate(); if (rdm_message.status_code != ola::rdm::RDM_COMPLETED_OK) return; switch (rdm_message.response->ResponseType()) { case ola::rdm::RDM_NACK_REASON: HandleNack(rdm_message.response); return; default: break; } const RDMResponse *response = rdm_message.response; const ola::rdm::PidDescriptor *pid_descriptor = m_pid_helper->GetDescriptor( response->ParamId(), response->SourceUID().ManufacturerId()); const ola::messaging::Descriptor *descriptor = NULL; if (pid_descriptor) { switch (response->CommandClass()) { case ola::rdm::RDMCommand::GET_COMMAND_RESPONSE: descriptor = pid_descriptor->GetResponse(); break; case ola::rdm::RDMCommand::SET_COMMAND_RESPONSE: descriptor = pid_descriptor->SetResponse(); break; default: OLA_WARN << "Unknown command class " << response->CommandClass(); } } auto_ptr message; if (descriptor) message.reset(m_pid_helper->DeserializeMessage(descriptor, response->ParamData(), response->ParamDataSize())); if (message.get()) cout << m_pid_helper->PrettyPrintMessage( response->SourceUID().ManufacturerId(), response->CommandClass() == ola::rdm::RDMCommand::SET_COMMAND_RESPONSE, response->ParamId(), message.get()); else m_command_printer.DisplayResponse(response, true); } /** * Handle a NACK response */ void SimpleE133Controller::HandleNack(const RDMResponse *response) { uint16_t param; if (response->ParamDataSize() != sizeof(param)) { OLA_WARN << "Request NACKed but has invalid PDL size of " << response->ParamDataSize(); } else { memcpy(¶m, response->ParamData(), sizeof(param)); param = ola::network::NetworkToHost(param); OLA_INFO << "Request NACKed: " << ola::rdm::NackReasonToString(param); } } void SimpleE133Controller::HandleStatusMessage( const ola::e133::E133StatusMessage &status_message) { // TODO(simon): match src IP, sequence # etc. here. OLA_INFO << "Got status code from " << status_message.ip; ola::e133::E133StatusCode e133_status_code; if (!ola::e133::IntToStatusCode(status_message.status_code, &e133_status_code)) { OLA_INFO << "Unknown E1.33 Status code " << status_message.status_code << " : " << status_message.status_message; } else { OLA_INFO << "Device returned code " << status_message.status_code << " : " << ola::e133::StatusMessageIdToString(e133_status_code) << " : " << status_message.status_message; } Stop(); } /* * Startup a node */ int main(int argc, char *argv[]) { ola::AppInit(&argc, argv, "[options]", "E1.33 Controller."); PidStoreHelper pid_helper(FLAGS_pid_location.str()); // convert the controller's IP address, or use the wildcard if not specified IPV4Address controller_ip = IPV4Address::WildCard(); if (!FLAGS_listen_ip.str().empty() && !IPV4Address::FromString(FLAGS_listen_ip, &controller_ip)) { ola::DisplayUsage(); exit(ola::EXIT_USAGE); } // convert the node's IP address if specified IPV4Address target_ip; if (!IPV4Address::FromString(FLAGS_target, &target_ip)) { ola::DisplayUsage(); exit(ola::EXIT_USAGE); } auto_ptr uid(UID::FromString(FLAGS_uid)); // Make sure we can load our PIDs if (!pid_helper.Init()) exit(ola::EXIT_OSFILE); if (FLAGS_list_pids) DisplayPIDsAndExit(uid.get() ? uid->ManufacturerId() : 0, pid_helper); // check the UID if (!uid.get()) { OLA_FATAL << "Invalid or missing UID, try xxxx:yyyyyyyy"; ola::DisplayUsage(); exit(ola::EXIT_USAGE); } if (argc < 2) { ola::DisplayUsage(); exit(ola::EXIT_USAGE); } // get the pid descriptor const ola::rdm::PidDescriptor *pid_descriptor = pid_helper.GetDescriptor( argv[1], uid->ManufacturerId()); if (!pid_descriptor) { OLA_WARN << "Unknown PID: " << argv[1] << "."; OLA_WARN << "Use --list-pids to list the available PIDs."; exit(ola::EXIT_USAGE); } const ola::messaging::Descriptor *descriptor = NULL; if (FLAGS_set) descriptor = pid_descriptor->SetRequest(); else descriptor = pid_descriptor->GetRequest(); if (!descriptor) { OLA_WARN << (FLAGS_set ? "SET" : "GET") << " command not supported for " << argv[1]; exit(ola::EXIT_USAGE); } // attempt to build the message vector inputs; for (int i = 2; i < argc; i++) inputs.push_back(argv[i]); auto_ptr message( pid_helper.BuildMessage(descriptor, inputs)); if (!message.get()) { cout << pid_helper.SchemaAsString(descriptor); exit(ola::EXIT_USAGE); } SimpleE133Controller controller( SimpleE133Controller::Options(controller_ip), &pid_helper); if (!controller.Init()) { OLA_FATAL << "Failed to init controller"; exit(ola::EXIT_UNAVAILABLE); } // manually add the responder address controller.AddUID(*uid, target_ip); // convert the message to binary form unsigned int param_data_length; const uint8_t *param_data = pid_helper.SerializeMessage( message.get(), ¶m_data_length); // send the message if (FLAGS_set) { controller.SendSetRequest(*uid, FLAGS_endpoint, pid_descriptor->Value(), param_data, param_data_length); } else { controller.SendGetRequest(*uid, FLAGS_endpoint, pid_descriptor->Value(), param_data, param_data_length); } controller.Run(); } ola-0.10.9/tools/e133/E133Device.h0000664000175000017500000000705514376533110013030 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133Device.h * Encapsulates the functionality of an E1.33 device. * Copyright (C) 2011 Simon Newton */ #ifndef TOOLS_E133_E133DEVICE_H_ #define TOOLS_E133_E133DEVICE_H_ #include #include #include "ola/Clock.h" #include "ola/acn/CID.h" #include "ola/e133/MessageBuilder.h" #include "ola/io/SelectServerInterface.h" #include "ola/network/IPV4Address.h" #include "ola/network/Socket.h" #include "ola/rdm/RDMControllerInterface.h" #include "libs/acn/E133Inflator.h" #include "libs/acn/RDMInflator.h" #include "libs/acn/RootInflator.h" #include "libs/acn/UDPTransport.h" #include "tools/e133/DesignatedControllerConnection.h" #include "tools/e133/E133Endpoint.h" #include "tools/e133/TCPConnectionStats.h" using std::string; using std::auto_ptr; /** * This encapulates the functionality of an E1.33 Device. * E1.33 Devices can either be native, or gateways to E1.20 devices. */ class E133Device { public: E133Device(ola::io::SelectServerInterface *ss, const ola::acn::CID &cid, const ola::network::IPV4Address &ip_address, class EndpointManager *endpoint_manager); ~E133Device(); void SetRootEndpoint(E133EndpointInterface *endpoint); bool Init(); TCPConnectionStats* GetTCPStats(); void SendStatusMessage(const ola::rdm::RDMResponse *response); bool CloseTCPConnection(); private: ola::io::SelectServerInterface *m_ss; const ola::network::IPV4Address m_ip_address; ola::e133::MessageBuilder m_message_builder; TCPConnectionStats m_tcp_stats; auto_ptr m_controller_connection; class EndpointManager *m_endpoint_manager; E133EndpointInterface *m_root_endpoint; // The RDM device to handle requests to the Root Endpoint ola::rdm::RDMControllerInterface *m_root_rdm_device; // Network members ola::network::UDPSocket m_udp_socket; // inflators ola::acn::RootInflator m_root_inflator; ola::acn::E133Inflator m_e133_inflator; ola::acn::RDMInflator m_rdm_inflator; // transports ola::acn::IncomingUDPTransport m_incoming_udp_transport; void EndpointRequest( const ola::acn::TransportHeader *transport_header, const ola::acn::E133Header *e133_header, const string &raw_request); void EndpointRequestComplete(ola::network::IPV4SocketAddress target, uint32_t sequence_number, uint16_t endpoint_id, ola::rdm::RDMReply *reply); void SendStatusMessage(const ola::network::IPV4SocketAddress target, uint32_t sequence_number, uint16_t endpoint_id, ola::e133::E133StatusCode status_code, const string &description); }; #endif // TOOLS_E133_E133DEVICE_H_ ola-0.10.9/tools/e133/ManagementEndpoint.h0000664000175000017500000000711514376533110015047 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ManagementEndpoint.h * Copyright (C) 2012 Simon Newton */ #include #include "tools/e133/E133Endpoint.h" #include "ola/rdm/ResponderOps.h" #ifndef TOOLS_E133_MANAGEMENTENDPOINT_H_ #define TOOLS_E133_MANAGEMENTENDPOINT_H_ using ola::rdm::RDMRequest; using ola::rdm::RDMResponse; using ola::rdm::RDMCallback; /** * The ManagementEndpoint handles RDMCommands directed at this E1.33 device. It * can also pass through commands to another controller if there is one * supplied. */ class ManagementEndpoint: public E133Endpoint { public: ManagementEndpoint(DiscoverableRDMControllerInterface *controller, const EndpointProperties &properties, const ola::rdm::UID &uid, const class EndpointManager *endpoint_manager, class TCPConnectionStats *tcp_stats); ~ManagementEndpoint() {} void SendRDMRequest(RDMRequest *request, RDMCallback *on_complete); void RunFullDiscovery(ola::rdm::RDMDiscoveryCallback *callback); void RunIncrementalDiscovery(ola::rdm::RDMDiscoveryCallback *callback); private: /** * The RDM Operations for the MovingLightResponder. */ class RDMOps : public ola::rdm::ResponderOps { public: static RDMOps *Instance() { if (!instance) instance = new RDMOps(); return instance; } private: RDMOps() : ola::rdm::ResponderOps(PARAM_HANDLERS) {} static RDMOps *instance; }; const ola::rdm::UID m_uid; const class EndpointManager *m_endpoint_manager; class TCPConnectionStats *m_tcp_stats; DiscoverableRDMControllerInterface *m_controller; // RDM PID handlers. RDMResponse *GetEndpointList(const RDMRequest *request); RDMResponse *GetEndpointListChange(const RDMRequest *request); RDMResponse *GetEndpointIdentify(const RDMRequest *request); RDMResponse *SetEndpointIdentify(const RDMRequest *request); RDMResponse *GetEndpointToUniverse(const RDMRequest *request); RDMResponse *SetEndpointToUniverse(const RDMRequest *request); RDMResponse *GetEndpointMode(const RDMRequest *request); RDMResponse *SetEndpointMode(const RDMRequest *request); RDMResponse *GetEndpointLabel(const RDMRequest *request); RDMResponse *SetEndpointLabel(const RDMRequest *request); RDMResponse *GetEndpointDeviceListChange(const RDMRequest *request); RDMResponse *GetEndpointDevices(const RDMRequest *request); RDMResponse *GetTCPCommsStatus(const RDMRequest *request); RDMResponse *SetTCPCommsStatus(const RDMRequest *request); void DiscoveryComplete(ola::rdm::RDMDiscoveryCallback *callback, const ola::rdm::UIDSet &uids); static const ola::rdm::ResponderOps::ParamHandler PARAM_HANDLERS[]; }; #endif // TOOLS_E133_MANAGEMENTENDPOINT_H_ ola-0.10.9/tools/e133/SimpleE133Node.h0000664000175000017500000000540214376533110013662 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * SimpleE133Node.h * Copyright (C) 2011 Simon Newton * * This creates a E1.33 receiver with one (emulated) RDM responder. The node's * RDM responder responds to E1.33 commands. */ #ifndef TOOLS_E133_SIMPLEE133NODE_H_ #define TOOLS_E133_SIMPLEE133NODE_H_ #include #include #include #include #include #include #include #include #include #include "tools/e133/E133Device.h" #include "tools/e133/EndpointManager.h" #include "tools/e133/ManagementEndpoint.h" #include "tools/e133/TCPConnectionStats.h" using ola::acn::CID; using ola::network::IPV4Address; using ola::rdm::UID; using std::auto_ptr; /** * A very simple E1.33 node that responds to messages. */ class SimpleE133Node { public: struct Options { CID cid; IPV4Address ip_address; UID uid; uint16_t lifetime; Options(const CID &cid, const IPV4Address &ip, const UID &uid, uint16_t lifetime) : cid(cid), ip_address(ip), uid(uid), lifetime(lifetime) { } }; explicit SimpleE133Node(const Options &options); ~SimpleE133Node(); ola::io::SelectServer *SelectServer() { return &m_ss; } bool Init(); void Run(); void Stop() { m_ss.Terminate(); } // Ownership not passed. void AddEndpoint(uint16_t endpoint_id, E133Endpoint *endpoint); void RemoveEndpoint(uint16_t endpoint_id); private: ola::io::SelectServer m_ss; ola::io::StdinHandler m_stdin_handler; EndpointManager m_endpoint_manager; E133Device m_e133_device; ManagementEndpoint m_management_endpoint; const uint16_t m_lifetime; const UID m_uid; const IPV4Address m_ip_address; void Input(int c); void DumpTCPStats(); void SendUnsolicited(); SimpleE133Node(const SimpleE133Node&); SimpleE133Node operator=(const SimpleE133Node&); }; #endif // TOOLS_E133_SIMPLEE133NODE_H_ ola-0.10.9/tools/e133/basic-controller.cpp0000664000175000017500000002277314376533110015076 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * basic-controller.cpp * Copyright (C) 2014 Simon Newton * * A controller which just listens for new TCP connections from devices. * I'm using this for scale testing. */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "libs/acn/RootInflator.h" #include "libs/acn/TCPTransport.h" #include "tools/e133/E133HealthCheckedConnection.h" DEFINE_string(listen_ip, "", "The IP Address to listen on"); DEFINE_uint16(listen_port, 5569, "The port to listen on"); DEFINE_uint16(listen_backlog, 100, "The backlog for the listen() call. Often limited to 128"); DEFINE_uint32(expected_devices, 1, "Time how long it takes until this many devices connect."); DEFINE_default_bool(stop_after_all_devices, false, "Exit once all devices connect"); using ola::NewCallback; using ola::NewSingleCallback; using ola::STLFindOrNull; using ola::TimeInterval; using ola::TimeStamp; using ola::io::NonBlockingSender; using ola::network::GenericSocketAddress; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::network::TCPSocket; using ola::acn::IncomingTCPTransport; using std::auto_ptr; using std::string; class SimpleE133Controller *controller = NULL; /** * Holds the state for each device */ class DeviceState { public: DeviceState() : socket(NULL), message_queue(NULL), health_checked_connection(NULL), in_transport(NULL) { } // The following may be NULL. // The socket connected to the E1.33 device auto_ptr socket; auto_ptr message_queue; // The Health Checked connection auto_ptr health_checked_connection; auto_ptr in_transport; private: DISALLOW_COPY_AND_ASSIGN(DeviceState); }; /** * A very simple E1.33 Controller that uses the reverse-connection model. */ class SimpleE133Controller { public: struct Options { // The controller to connect to. IPV4SocketAddress controller; explicit Options(const IPV4SocketAddress &controller) : controller(controller) { } }; explicit SimpleE133Controller(const Options &options); ~SimpleE133Controller(); bool Start(); void Stop() { m_ss.Terminate(); } private: typedef std::map DeviceMap; TimeStamp m_start_time; DeviceMap m_device_map; const IPV4SocketAddress m_listen_address; ola::ExportMap m_export_map; ola::io::SelectServer m_ss; ola::network::TCPSocketFactory m_tcp_socket_factory; ola::network::TCPAcceptingSocket m_listen_socket; ola::e133::MessageBuilder m_message_builder; ola::acn::RootInflator m_root_inflator; bool PrintStats(); void OnTCPConnect(TCPSocket *socket); void ReceiveTCPData(IPV4SocketAddress peer, IncomingTCPTransport *transport); void RLPDataReceived(const ola::acn::TransportHeader &header); void SocketUnhealthy(IPV4SocketAddress peer); void SocketClosed(IPV4SocketAddress peer); DISALLOW_COPY_AND_ASSIGN(SimpleE133Controller); }; SimpleE133Controller::SimpleE133Controller(const Options &options) : m_listen_address(options.controller), m_ss(&m_export_map), m_tcp_socket_factory( NewCallback(this, &SimpleE133Controller::OnTCPConnect)), m_listen_socket(&m_tcp_socket_factory), m_message_builder(ola::acn::CID::Generate(), "E1.33 Controller"), m_root_inflator( NewCallback(this, &SimpleE133Controller::RLPDataReceived)) { } SimpleE133Controller::~SimpleE133Controller() {} bool SimpleE133Controller::Start() { ola::Clock clock; clock.CurrentMonotonicTime(&m_start_time); if (!m_listen_socket.Listen(m_listen_address, FLAGS_listen_backlog)) { return false; } OLA_INFO << "Listening on " << m_listen_address; m_ss.AddReadDescriptor(&m_listen_socket); m_ss.RegisterRepeatingTimeout( TimeInterval(0, 500000), NewCallback(this, &SimpleE133Controller::PrintStats)); m_ss.Run(); m_ss.RemoveReadDescriptor(&m_listen_socket); return true; } bool SimpleE133Controller::PrintStats() { const TimeStamp *now = m_ss.WakeUpTime(); const TimeInterval delay = *now - m_start_time; ola::CounterVariable *ss_iterations = m_export_map.GetCounterVar( "ss-loop-count"); OLA_INFO << delay << "," << m_device_map.size() << "," << ss_iterations->Value(); return true; } void SimpleE133Controller::OnTCPConnect(TCPSocket *socket_ptr) { auto_ptr socket(socket_ptr); GenericSocketAddress generic_peer = socket->GetPeerAddress(); if (generic_peer.Family() != AF_INET) { OLA_WARN << "Unknown family " << generic_peer.Family(); return; } IPV4SocketAddress peer = generic_peer.V4Addr(); // OLA_INFO << "Received new TCP connection from: " << peer; auto_ptr device_state(new DeviceState()); device_state->in_transport.reset( new IncomingTCPTransport(&m_root_inflator, socket.get())); socket->SetOnData( NewCallback(this, &SimpleE133Controller::ReceiveTCPData, peer, device_state->in_transport.get())); socket->SetOnClose( NewSingleCallback(this, &SimpleE133Controller::SocketClosed, peer)); device_state->message_queue.reset( new NonBlockingSender(socket.get(), &m_ss, m_message_builder.pool())); auto_ptr health_checked_connection( new E133HealthCheckedConnection( &m_message_builder, device_state->message_queue.get(), NewSingleCallback(this, &SimpleE133Controller::SocketUnhealthy, peer), &m_ss)); if (!health_checked_connection->Setup()) { OLA_WARN << "Failed to setup heartbeat controller for " << peer; return; } device_state->health_checked_connection.reset( health_checked_connection.release()); device_state->socket.reset(socket.release()); m_ss.AddReadDescriptor(socket_ptr); std::pair p = m_device_map.insert( std::pair(peer, NULL)); if (!p.second) { OLA_WARN << "Peer " << peer << " is already connected! This is a bug"; delete p.first->second; } p.first->second = device_state.release(); if (m_device_map.size() == FLAGS_expected_devices) { ola::Clock clock; TimeStamp now; clock.CurrentMonotonicTime(&now); OLA_INFO << FLAGS_expected_devices << " connected in " << (now - m_start_time); if (FLAGS_stop_after_all_devices) { m_ss.Terminate(); } } } void SimpleE133Controller::ReceiveTCPData(IPV4SocketAddress peer, IncomingTCPTransport *transport) { if (!transport->Receive()) { OLA_WARN << "TCP STREAM IS BAD!!!"; SocketClosed(peer); } } void SimpleE133Controller::RLPDataReceived( const ola::acn::TransportHeader &header) { if (header.Transport() != ola::acn::TransportHeader::TCP) return; DeviceState *device_state = STLFindOrNull(m_device_map, header.Source()); if (!device_state) { OLA_FATAL << "Received data but unable to lookup socket for " << header.Source(); return; } device_state->health_checked_connection->HeartbeatReceived(); } void SimpleE133Controller::SocketUnhealthy(IPV4SocketAddress peer) { OLA_INFO << "connection to " << peer << " went unhealthy"; SocketClosed(peer); } void SimpleE133Controller::SocketClosed(IPV4SocketAddress peer) { OLA_INFO << "Connection to " << peer << " was closed"; auto_ptr device(ola::STLLookupAndRemovePtr(&m_device_map, peer)); if (!device.get()) { OLA_WARN << "Can't find device entry"; return; } m_ss.RemoveReadDescriptor(device->socket.get()); } /** * Interrupt handler */ static void InteruptSignal(OLA_UNUSED int signo) { int old_errno = errno; if (controller) { controller->Stop(); } errno = old_errno; } int main(int argc, char *argv[]) { ola::SetHelpString("[options]", "Simple E1.33 Controller."); ola::ParseFlags(&argc, argv); ola::InitLoggingFromFlags(); // Convert the controller's IP address IPV4Address controller_ip; if (!FLAGS_listen_ip.str().empty() && !IPV4Address::FromString(FLAGS_listen_ip, &controller_ip)) { ola::DisplayUsage(); exit(ola::EXIT_USAGE); } ola::InstallSignal(SIGINT, InteruptSignal); controller = new SimpleE133Controller( SimpleE133Controller::Options( IPV4SocketAddress(controller_ip, FLAGS_listen_port))); controller->Start(); delete controller; controller = NULL; } ola-0.10.9/tools/e133/DeviceManagerImpl.cpp0000664000175000017500000003050014376533110015133 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DeviceManagerImpl.cpp * Copyright (C) 2013 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "libs/acn/E133Inflator.h" #include "libs/acn/E133StatusPDU.h" #include "libs/acn/TCPTransport.h" #include "tools/e133/DeviceManagerImpl.h" #include "tools/e133/E133Endpoint.h" #include "tools/e133/E133HealthCheckedConnection.h" namespace ola { namespace e133 { using ola::NewCallback; using ola::NewSingleCallback; using ola::STLContains; using ola::STLFindOrNull; using ola::TimeInterval; using ola::acn::CID; using ola::io::NonBlockingSender; using ola::network::GenericSocketAddress; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::network::TCPSocket; using ola::acn::IncomingTCPTransport; using std::auto_ptr; using std::string; /** * Holds everything we need to manage a TCP connection to a E1.33 device. */ class DeviceState { public: DeviceState() : socket(NULL), message_queue(NULL), health_checked_connection(NULL), in_transport(NULL), am_designated_controller(false) { } // The following may be NULL. // The socket connected to the E1.33 device auto_ptr socket; auto_ptr message_queue; // The Health Checked connection auto_ptr health_checked_connection; auto_ptr in_transport; // True if we're the designated controller. bool am_designated_controller; private: DeviceState(const DeviceState&); DeviceState& operator=(const DeviceState&); }; // 5 second connect() timeout const TimeInterval DeviceManagerImpl::TCP_CONNECT_TIMEOUT(5, 0); // retry TCP connects after 5 seconds const TimeInterval DeviceManagerImpl::INITIAL_TCP_RETRY_DELAY(5, 0); // we grow the retry interval to a max of 30 seconds const TimeInterval DeviceManagerImpl::MAX_TCP_RETRY_DELAY(30, 0); /** * Construct a new DeviceManagerImpl * @param ss a pointer to a SelectServerInterface to use * @param cid the CID of this controller. */ DeviceManagerImpl::DeviceManagerImpl(ola::io::SelectServerInterface *ss, ola::e133::MessageBuilder *message_builder) : m_ss(ss), m_tcp_socket_factory(NewCallback(this, &DeviceManagerImpl::OnTCPConnect)), m_connector(m_ss, &m_tcp_socket_factory, TCP_CONNECT_TIMEOUT), m_backoff_policy(INITIAL_TCP_RETRY_DELAY, MAX_TCP_RETRY_DELAY), m_message_builder(message_builder), m_root_inflator(NewCallback(this, &DeviceManagerImpl::RLPDataReceived)) { m_root_inflator.AddInflator(&m_e133_inflator); m_e133_inflator.AddInflator(&m_rdm_inflator); m_rdm_inflator.SetRDMHandler( NewCallback(this, &DeviceManagerImpl::EndpointRequest)); } /** * Clean up */ DeviceManagerImpl::~DeviceManagerImpl() { // close out all tcp sockets and free state ola::STLDeleteValues(&m_device_map); } /** * Set the callback to be run when RDMNet data is received from a device. * @param callback the RDMMesssageCallback to run when data is received. */ void DeviceManagerImpl::SetRDMMessageCallback(RDMMesssageCallback *callback) { m_rdm_callback.reset(callback); } /** * Set the callback to be run when we become the designated controller for a * device. */ void DeviceManagerImpl::SetAcquireDeviceCallback( AcquireDeviceCallback *callback) { m_acquire_device_cb_.reset(callback); } /* * Set the callback to be run when we lose the designated controller status for * a device. */ void DeviceManagerImpl::SetReleaseDeviceCallback( ReleaseDeviceCallback *callback) { m_release_device_cb_.reset(callback); } /** * Start maintaining a connection to this device. */ void DeviceManagerImpl::AddDevice(const IPV4Address &ip_address) { if (STLContains(m_device_map, ip_address.AsInt())) { return; } DeviceState *device_state = new DeviceState(); m_device_map[ip_address.AsInt()] = device_state; OLA_INFO << "Adding " << ip_address << ":" << ola::acn::E133_PORT; // start the non-blocking connect m_connector.AddEndpoint( IPV4SocketAddress(ip_address, ola::acn::E133_PORT), &m_backoff_policy); } /** * Remove a device, closing the connection if we have one. */ void DeviceManagerImpl::RemoveDevice(const IPV4Address &ip_address) { DeviceMap::iterator iter = m_device_map.find(ip_address.AsInt()); if (iter == m_device_map.end()) return; // TODO(simon): implement this OLA_WARN << "RemoveDevice not implemented"; } /** * Remove a device if there is no open connection. */ void DeviceManagerImpl::RemoveDeviceIfNotConnected( const IPV4Address &ip_address) { DeviceMap::iterator iter = m_device_map.find(ip_address.AsInt()); if (iter == m_device_map.end()) return; // TODO(simon): implement this OLA_WARN << "RemoveDevice not implemented"; } /** * Populate the vector with the devices that we are the designated controller * for. */ void DeviceManagerImpl::ListManagedDevices(vector *devices) const { DeviceMap::const_iterator iter = m_device_map.begin(); for (; iter != m_device_map.end(); ++iter) { if (iter->second->am_designated_controller) devices->push_back(IPV4Address(iter->first)); } } /** * Called when a TCP socket is connected. Note that we're not the designated * controller at this point. That only happens if we receive data on the * connection. */ void DeviceManagerImpl::OnTCPConnect(TCPSocket *socket_ptr) { auto_ptr socket(socket_ptr); GenericSocketAddress address = socket->GetPeerAddress(); if (address.Family() != AF_INET) { OLA_WARN << "Non IPv4 socket " << address; return; } IPV4SocketAddress v4_address = address.V4Addr(); DeviceState *device_state = STLFindOrNull( m_device_map, v4_address.Host().AsInt()); if (!device_state) { OLA_FATAL << "Unable to locate socket for " << v4_address; return; } // setup the incoming transport, we don't need to setup the outgoing one // until we've got confirmation that we're the designated controller. device_state->socket.reset(socket.release()); device_state->in_transport.reset(new IncomingTCPTransport(&m_root_inflator, socket_ptr)); device_state->socket->SetOnData( NewCallback(this, &DeviceManagerImpl::ReceiveTCPData, v4_address.Host(), device_state->in_transport.get())); device_state->socket->SetOnClose( NewSingleCallback(this, &DeviceManagerImpl::SocketClosed, v4_address.Host())); m_ss->AddReadDescriptor(socket_ptr); // TODO(simon): Setup a timeout that closes this connect if we don't receive // anything. } /** * Receive data on a TCP connection */ void DeviceManagerImpl::ReceiveTCPData(IPV4Address ip_address, IncomingTCPTransport *transport) { if (!transport->Receive()) { OLA_WARN << "TCP STREAM IS BAD!!!"; SocketClosed(ip_address); } } /** * Called when a connection is deemed unhealthy. */ void DeviceManagerImpl::SocketUnhealthy(IPV4Address ip_address) { OLA_INFO << "connection to " << ip_address << " went unhealthy"; SocketClosed(ip_address); } /** * Called when a socket is closed. * This can mean one of two things: * if we weren't the designated controller, then we lost the race. * if we were the designated controller, the TCP connection was closed, or * went unhealthy. */ void DeviceManagerImpl::SocketClosed(IPV4Address ip_address) { OLA_INFO << "connection to " << ip_address << " was closed"; DeviceState *device_state = STLFindOrNull(m_device_map, ip_address.AsInt()); if (!device_state) { OLA_FATAL << "Unable to locate socket for " << ip_address; return; } if (device_state->am_designated_controller) { device_state->am_designated_controller = false; if (m_release_device_cb_.get()) m_release_device_cb_->Run(ip_address); m_connector.Disconnect( IPV4SocketAddress(ip_address, ola::acn::E133_PORT)); } else { // we lost the race, so don't try to reconnect m_connector.Disconnect( IPV4SocketAddress(ip_address, ola::acn::E133_PORT), true); } device_state->health_checked_connection.reset(); device_state->message_queue.reset(); device_state->in_transport.reset(); m_ss->RemoveReadDescriptor(device_state->socket.get()); device_state->socket.reset(); } /** * Called when we receive E1.33 data. If this arrived over TCP we notify the * health checked connection. */ void DeviceManagerImpl::RLPDataReceived( const ola::acn::TransportHeader &header) { if (header.Transport() != ola::acn::TransportHeader::TCP) return; IPV4Address src_ip = header.Source().Host(); DeviceState *device_state = STLFindOrNull(m_device_map, src_ip.AsInt()); if (!device_state) { OLA_FATAL << "Received data but unable to lookup socket for " << src_ip; return; } // If we're already the designated controller, we just need to notify the // HealthChecker. if (device_state->am_designated_controller) { device_state->health_checked_connection->HeartbeatReceived(); return; } // This is the first packet received on this connection, which is a sign // we're now the designated controller. Setup the HealthChecker & outgoing // transports. device_state->am_designated_controller = true; OLA_INFO << "Now the designated controller for " << header.Source(); if (m_acquire_device_cb_.get()) m_acquire_device_cb_->Run(src_ip); device_state->message_queue.reset( new NonBlockingSender(device_state->socket.get(), m_ss, m_message_builder->pool())); E133HealthCheckedConnection *health_checked_connection = new E133HealthCheckedConnection( m_message_builder, device_state->message_queue.get(), NewSingleCallback(this, &DeviceManagerImpl::SocketUnhealthy, src_ip), m_ss); if (!health_checked_connection->Setup()) { OLA_WARN << "Failed to setup heartbeat controller for " << src_ip; SocketClosed(src_ip); return; } if (device_state->health_checked_connection.get()) OLA_WARN << "pre-existing health_checked_connection for " << src_ip; device_state->health_checked_connection.reset(health_checked_connection); } /** * Handle a message on the TCP connection. */ void DeviceManagerImpl::EndpointRequest( const ola::acn::TransportHeader *transport_header, const ola::acn::E133Header *e133_header, const string &raw_request) { if (!m_rdm_callback.get()) return; if (e133_header->Endpoint()) { OLA_WARN << "TCP message for non-0 endpoint. Endpoint = " << e133_header->Endpoint(); return; } if (!m_rdm_callback->Run(transport_header->Source().Host(), e133_header->Endpoint(), raw_request)) { // Don't send an ack return; } DeviceState *device_state = STLFindOrNull( m_device_map, transport_header->Source().Host().AsInt()); if (!device_state) { OLA_WARN << "Unable to find DeviceState for " << transport_header->Source(); return; } ola::io::IOStack packet(m_message_builder->pool()); m_message_builder->BuildTCPE133StatusPDU( &packet, e133_header->Sequence(), e133_header->Endpoint(), ola::e133::SC_E133_ACK, "OK"); device_state->message_queue->SendMessage(&packet); } } // namespace e133 } // namespace ola ola-0.10.9/tools/e133/Makefile.mk0000664000175000017500000000716514376533110013174 00000000000000# pkg-config ################################################## if INSTALL_E133 pkgconfig_DATA += \ tools/e133/libolae133common.pc \ tools/e133/libolae133controller.pc endif # LIBRARIES ################################################## E133_LIBS = \ tools/e133/libolae133common.la \ tools/e133/libolae133controller.la \ tools/e133/libolae133device.la if INSTALL_E133 lib_LTLIBRARIES += $(E133_LIBS) else noinst_LTLIBRARIES += $(E133_LIBS) endif # libolae133common # Code required by both the controller and device. tools_e133_libolae133common_la_SOURCES = \ tools/e133/E133HealthCheckedConnection.cpp \ tools/e133/E133HealthCheckedConnection.h \ tools/e133/E133Receiver.cpp \ tools/e133/E133StatusHelper.cpp \ tools/e133/MessageBuilder.cpp tools_e133_libolae133common_la_LIBADD = libs/acn/libolae131core.la # libolae133controller # Controller side. tools_e133_libolae133controller_la_SOURCES = \ tools/e133/DeviceManager.cpp \ tools/e133/DeviceManagerImpl.cpp \ tools/e133/DeviceManagerImpl.h tools_e133_libolae133controller_la_LIBADD = \ common/libolacommon.la \ libs/acn/libolae131core.la \ tools/e133/libolae133common.la # libolae133device # Device side. tools_e133_libolae133device_la_SOURCES = \ tools/e133/DesignatedControllerConnection.cpp \ tools/e133/DesignatedControllerConnection.h \ tools/e133/E133Device.cpp \ tools/e133/E133Device.h \ tools/e133/E133Endpoint.cpp \ tools/e133/E133Endpoint.h \ tools/e133/EndpointManager.cpp \ tools/e133/EndpointManager.h \ tools/e133/ManagementEndpoint.cpp \ tools/e133/ManagementEndpoint.h \ tools/e133/SimpleE133Node.cpp \ tools/e133/SimpleE133Node.h \ tools/e133/TCPConnectionStats.h tools_e133_libolae133device_la_LIBADD = \ common/libolacommon.la \ libs/acn/libolae131core.la \ tools/e133/libolae133common.la # PROGRAMS ################################################## noinst_PROGRAMS += \ tools/e133/basic_controller \ tools/e133/basic_device \ tools/e133/e133_controller \ tools/e133/e133_monitor \ tools/e133/e133_receiver tools_e133_e133_receiver_SOURCES = tools/e133/e133-receiver.cpp tools_e133_e133_receiver_LDADD = common/libolacommon.la \ libs/acn/libolaacn.la \ plugins/usbpro/libolausbprowidget.la \ tools/e133/libolae133device.la if USE_SPI tools_e133_e133_receiver_LDADD += plugins/spi/libolaspicore.la endif tools_e133_e133_monitor_SOURCES = tools/e133/e133-monitor.cpp tools_e133_e133_monitor_LDADD = common/libolacommon.la \ libs/acn/libolaacn.la \ tools/e133/libolae133common.la \ tools/e133/libolae133controller.la tools_e133_e133_controller_SOURCES = tools/e133/e133-controller.cpp # required for PID_DATA_FILE tools_e133_e133_controller_LDADD = common/libolacommon.la \ libs/acn/libolae131core.la \ tools/e133/libolae133common.la \ tools/e133/libolae133controller.la tools_e133_basic_controller_SOURCES = tools/e133/basic-controller.cpp tools_e133_basic_controller_LDADD = common/libolacommon.la \ libs/acn/libolaacn.la \ tools/e133/libolae133common.la tools_e133_basic_device_SOURCES = tools/e133/basic-device.cpp tools_e133_basic_device_LDADD = common/libolacommon.la \ libs/acn/libolaacn.la \ tools/e133/libolae133common.la ola-0.10.9/tools/e133/E133Receiver.cpp0000664000175000017500000001014214376533110013717 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * E133Receiver.cpp * Copyright (C) 2013 Simon Newton */ #include #include #include #include #include #include #include #include #include "libs/acn/E133Inflator.h" #include "libs/acn/E133StatusInflator.h" #include "libs/acn/RDMInflator.h" #include "libs/acn/RootInflator.h" #include "libs/acn/UDPTransport.h" namespace ola { namespace e133 { using ola::NewCallback; using ola::network::IPV4Address; using ola::network::IPV4SocketAddress; using ola::rdm::RDMResponse; using std::auto_ptr; using std::string; /** * Create a new E133Receiver. * @param socket the UDP socket to read from * @param status_callback the callback to run when status messages are * received. * @param rdm_callback the callback to run when RDM messages are received. */ E133Receiver::E133Receiver(ola::network::UDPSocket *socket, StatusCallback *status_callback, RDMCallback *rdm_callback) : m_udp_socket(socket), m_status_callback(status_callback), m_rdm_callback(rdm_callback), m_root_inflator(new ola::acn::RootInflator()), m_e133_inflator(new ola::acn::E133Inflator()), m_rdm_inflator(new ola::acn::RDMInflator()), m_e133_status_inflator(new ola::acn::E133StatusInflator()), m_incoming_udp_transport( new ola::acn::IncomingUDPTransport( m_udp_socket, m_root_inflator.get())) { m_root_inflator->AddInflator(m_e133_inflator.get()); m_e133_inflator->AddInflator(m_rdm_inflator.get()); m_e133_inflator->AddInflator(m_e133_status_inflator.get()); m_rdm_inflator->SetRDMHandler( NewCallback(this, &E133Receiver::HandlePacket)); m_e133_status_inflator->SetStatusHandler( NewCallback(this, &E133Receiver::HandleStatusMessage)); m_udp_socket->SetOnData( NewCallback(m_incoming_udp_transport.get(), &ola::acn::IncomingUDPTransport::Receive)); } /** * Clean up. */ E133Receiver::~E133Receiver() { } /** * Handle a E1.33 Status Message. */ void E133Receiver::HandleStatusMessage( const ola::acn::TransportHeader *transport_header, const ola::acn::E133Header *e133_header, uint16_t status_code, const string &description) { if (m_status_callback) { m_status_callback->Run( E133StatusMessage( transport_header->Source().Host(), e133_header->Endpoint(), e133_header->Sequence(), status_code, description)); } } /** * Handle an RDM packet */ void E133Receiver::HandlePacket( const ola::acn::TransportHeader *transport_header, const ola::acn::E133Header *e133_header, const string &raw_response) { if (!m_rdm_callback) return; OLA_INFO << "Got E1.33 data from " << transport_header->Source(); // Attempt to unpack as a response for now. ola::rdm::RDMStatusCode status_code; const RDMResponse *response = RDMResponse::InflateFromData( reinterpret_cast(raw_response.data()), raw_response.size(), &status_code); if (!response) { OLA_WARN << "Failed to unpack E1.33 RDM message, ignoring request."; return; } m_rdm_callback->Run(E133RDMMessage( transport_header->Source().Host(), e133_header->Endpoint(), e133_header->Sequence(), status_code, response)); } } // namespace e133 } // namespace ola ola-0.10.9/tools/e133/ManagementEndpoint.cpp0000664000175000017500000003232714376533110015405 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * ManagementEndpoint.cpp * Copyright (C) 2012 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include "tools/e133/E133Endpoint.h" #include "tools/e133/EndpointManager.h" #include "tools/e133/ManagementEndpoint.h" #include "tools/e133/TCPConnectionStats.h" using ola::network::HostToNetwork; using ola::rdm::NR_ENDPOINT_NUMBER_INVALID; using ola::rdm::NR_FORMAT_ERROR; using ola::rdm::NR_UNKNOWN_PID; using ola::rdm::RDMCallback; using ola::rdm::RDMDiscoveryCallback; using ola::rdm::RDMRequest; using ola::rdm::RDMResponse; using ola::rdm::ResponderHelper; using ola::rdm::UID; using ola::rdm::UIDSet; using std::auto_ptr; using std::vector; ManagementEndpoint::RDMOps *ManagementEndpoint::RDMOps::instance = NULL; const ola::rdm::ResponderOps::ParamHandler ManagementEndpoint::PARAM_HANDLERS[] = { { ola::rdm::PID_ENDPOINT_LIST, &ManagementEndpoint::GetEndpointList, NULL}, { ola::rdm::PID_ENDPOINT_LIST_CHANGE, &ManagementEndpoint::GetEndpointListChange, NULL}, { ola::rdm::PID_ENDPOINT_IDENTIFY, &ManagementEndpoint::GetEndpointIdentify, &ManagementEndpoint::SetEndpointIdentify}, { ola::rdm::PID_ENDPOINT_TO_UNIVERSE, &ManagementEndpoint::GetEndpointToUniverse, &ManagementEndpoint::SetEndpointToUniverse}, // PID_RDM_TRAFFIC_ENABLE { ola::rdm::PID_ENDPOINT_MODE, &ManagementEndpoint::GetEndpointMode, &ManagementEndpoint::SetEndpointMode}, { ola::rdm::PID_ENDPOINT_LABEL, &ManagementEndpoint::GetEndpointLabel, &ManagementEndpoint::SetEndpointLabel}, // PID_DISCOVERY_STATE // PID_BACKGROUND_DISCOVERY // PID_ENDPOINT_TIMING // PID_ENDPOINT_TIMING_DESCRIPTION { ola::rdm::PID_ENDPOINT_LIST_CHANGE, &ManagementEndpoint::GetEndpointDeviceListChange, NULL}, { ola::rdm::PID_ENDPOINT_DEVICES, &ManagementEndpoint::GetEndpointDevices, NULL}, // PID_BINDING_AND_CONTROL_FIELDS { ola::rdm::PID_TCP_COMMS_STATUS, &ManagementEndpoint::GetTCPCommsStatus, &ManagementEndpoint::SetTCPCommsStatus}, // PID_BACKGROUND_QUEUED_STATUS_POLICY // PID_BACKGROUND_QUEUED_STATUS_POLICY_DESCRIPTION // PID_BACKGROUND_STATUS_TYPE // PID_QUEUED_STATUS_ENDPOINT_COLLECTION // PID_QUEUED_STATUS_UID_COLLECTION }; /** * Create a new ManagementEndpoint. Ownership of the arguments is not taken. * The endpoint needs to out-live the controller since the controller may be * passed callbacks that reference this endpoint. */ ManagementEndpoint::ManagementEndpoint( DiscoverableRDMControllerInterface *controller, const EndpointProperties &properties, const ola::rdm::UID &uid, const class EndpointManager *endpoint_manager, class TCPConnectionStats *tcp_stats) : E133Endpoint(controller, properties), m_uid(uid), m_endpoint_manager(endpoint_manager), m_tcp_stats(tcp_stats), m_controller(controller) { } /** * Handle a RDM request by either passing it through or handling it internally. * @param request the RDMRequest object * @param on_complete the callback to run when we've handled this request. */ void ManagementEndpoint::SendRDMRequest(RDMRequest *request, RDMCallback *on_complete) { const UID dst_uid = request->DestinationUID(); if (dst_uid.IsBroadcast() && m_controller) { // This request needs to go to both the E1.33 responder and the other // responders. // TODO(simon): We need to use a broadcast tracker here like in // Universe.cpp /* */ } else if (request->DestinationUID().DirectedToUID(m_uid)) { RDMOps::Instance()->HandleRDMRequest( this, m_uid, ola::rdm::ROOT_RDM_DEVICE, request, on_complete); } else if (m_controller) { // This request just goes to the other responders. m_controller->SendRDMRequest(request, on_complete); } else { ola::rdm::RunRDMCallback(on_complete, ola::rdm::RDM_UNKNOWN_UID); delete request; } } /** * Run full discovery. */ void ManagementEndpoint::RunFullDiscovery(RDMDiscoveryCallback *callback) { if (m_controller) { m_controller->RunFullDiscovery( NewSingleCallback(this, &ManagementEndpoint::DiscoveryComplete, callback)); } else { UIDSet uids; uids.AddUID(m_uid); callback->Run(uids); } } /** * Run incremental discovery. */ void ManagementEndpoint::RunIncrementalDiscovery( RDMDiscoveryCallback *callback) { if (m_controller) { m_controller->RunIncrementalDiscovery( NewSingleCallback(this, &ManagementEndpoint::DiscoveryComplete, callback)); } else { UIDSet uids; uids.AddUID(m_uid); callback->Run(uids); } } /** * Handle PID_ENDPOINT_LIST. */ RDMResponse *ManagementEndpoint::GetEndpointList(const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } struct EndpointListParamData { uint32_t list_change; uint16_t endpoint_id[0]; }; vector endpoints; m_endpoint_manager->EndpointIDs(&endpoints); unsigned int param_data_size = 4 + 2 * endpoints.size(); uint8_t *raw_data = new uint8_t[param_data_size]; EndpointListParamData *param_data = reinterpret_cast( raw_data); param_data->list_change = HostToNetwork( m_endpoint_manager->list_change_number()); for (unsigned int i = 0; i < endpoints.size(); i++) { param_data->endpoint_id[i] = HostToNetwork(endpoints[i]); } RDMResponse *response = GetResponseFromData(request, raw_data, param_data_size); delete[] raw_data; return response; } /** * Handle PID_ENDPOINT_LIST_CHANGE. */ RDMResponse *ManagementEndpoint::GetEndpointListChange( const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } uint32_t change = HostToNetwork(m_endpoint_manager->list_change_number()); return GetResponseFromData( request, reinterpret_cast(&change), sizeof(change)); } /** * Handle PID_ENDPOINT_IDENTIFY */ RDMResponse *ManagementEndpoint::GetEndpointIdentify( const RDMRequest *request) { uint16_t endpoint_id; if (!ResponderHelper::ExtractUInt16(request, &endpoint_id)) { return NackWithReason(request, NR_FORMAT_ERROR); } E133Endpoint *endpoint = m_endpoint_manager->GetEndpoint(endpoint_id); // endpoint not found if (!endpoint) { return NackWithReason(request, ola::rdm::NR_ENDPOINT_NUMBER_INVALID); } PACK( struct IdentifyEndpointParamData { uint16_t endpoint_number; uint8_t identify_mode; }); IdentifyEndpointParamData endpoint_identify_message = { HostToNetwork(endpoint_id), endpoint->identify_mode() }; return GetResponseFromData( request, reinterpret_cast(&endpoint_identify_message), sizeof(endpoint_identify_message)); } RDMResponse *ManagementEndpoint::SetEndpointIdentify( const RDMRequest *request) { PACK( struct IdentifyEndpointParamData { uint16_t endpoint_number; uint8_t identify_mode; }); IdentifyEndpointParamData endpoint_identify_message; if (request->ParamDataSize() != sizeof(endpoint_identify_message)) { return NackWithReason(request, NR_FORMAT_ERROR); } memcpy(reinterpret_cast(&endpoint_identify_message), request->ParamData(), sizeof(endpoint_identify_message)); E133Endpoint *endpoint = m_endpoint_manager->GetEndpoint( ola::network::NetworkToHost(endpoint_identify_message.endpoint_number)); // endpoint not found if (!endpoint) { return NackWithReason(request, ola::rdm::NR_ENDPOINT_NUMBER_INVALID); } endpoint->set_identify_mode(endpoint_identify_message.identify_mode); return GetResponseFromData(request, NULL, 0); } /** * Handle PID_ENDPOINT_TO_UNIVERSE */ RDMResponse *ManagementEndpoint::GetEndpointToUniverse( const RDMRequest *request) { // TODO(simon): add me return NackWithReason(request, NR_UNKNOWN_PID); } RDMResponse *ManagementEndpoint::SetEndpointToUniverse( const RDMRequest *request) { // TODO(simon): add me return NackWithReason(request, NR_UNKNOWN_PID); } /** * Handle PID_ENDPOINT_MODE */ RDMResponse *ManagementEndpoint::GetEndpointMode(const RDMRequest *request) { // TODO(simon): add me return NackWithReason(request, NR_UNKNOWN_PID); } RDMResponse *ManagementEndpoint::SetEndpointMode(const RDMRequest *request) { // TODO(simon): add me return NackWithReason(request, NR_UNKNOWN_PID); } /** * Handle PID_ENDPOINT_LABEL */ RDMResponse *ManagementEndpoint::GetEndpointLabel(const RDMRequest *request) { // TODO(simon): add me return NackWithReason(request, NR_UNKNOWN_PID); } RDMResponse *ManagementEndpoint::SetEndpointLabel(const RDMRequest *request) { // TODO(simon): add me return NackWithReason(request, NR_UNKNOWN_PID); } /** * Handle PID_ENDPOINT_DEVICE_LIST_CHANGE */ RDMResponse *ManagementEndpoint::GetEndpointDeviceListChange( const RDMRequest *request) { uint16_t endpoint_id; if (!ResponderHelper::ExtractUInt16(request, &endpoint_id)) { return NackWithReason(request, NR_FORMAT_ERROR); } E133Endpoint *endpoint = m_endpoint_manager->GetEndpoint(endpoint_id); // endpoint not found if (!endpoint) { return NackWithReason(request, ola::rdm::NR_ENDPOINT_NUMBER_INVALID); } uint32_t list_change_id = HostToNetwork(endpoint->device_list_change()); return GetResponseFromData( request, reinterpret_cast(&list_change_id), sizeof(list_change_id)); } /** * Handle PID_ENDPOINT_DEVICES */ RDMResponse *ManagementEndpoint::GetEndpointDevices(const RDMRequest *request) { uint16_t endpoint_id; if (!ResponderHelper::ExtractUInt16(request, &endpoint_id)) { return NackWithReason(request, NR_FORMAT_ERROR); } E133Endpoint *endpoint = NULL; if (endpoint_id) endpoint = m_endpoint_manager->GetEndpoint(endpoint_id); else endpoint = this; OLA_INFO << "Endpoint ID: " << endpoint_id << ", endpoint " << endpoint; // endpoint not found if (!endpoint) { return NackWithReason(request, ola::rdm::NR_ENDPOINT_NUMBER_INVALID); } UIDSet uids; uint32_t list_change_id = HostToNetwork(endpoint->device_list_change()); endpoint->EndpointDevices(&uids); struct DeviceListParamData { uint16_t endpoint; uint32_t list_change; uint8_t data[0]; }; // TODO(simon): fix this - we can overflow an RDM packet if there are too // many devices! unsigned int param_data_size = 2 + 4 + uids.Size() * UID::UID_SIZE; uint8_t *raw_data = new uint8_t[param_data_size]; DeviceListParamData *param_data = reinterpret_cast( raw_data); // TODO(simon): fix this to track changes. param_data->endpoint = HostToNetwork(endpoint_id); param_data->list_change = list_change_id; uint8_t *ptr = raw_data + 6; unsigned int offset = 0; UIDSet::Iterator iter = uids.Begin(); for (; iter != uids.End(); ++iter) { OLA_INFO << " " << *iter; iter->Pack(ptr + offset, param_data_size - offset - 4); offset += UID::UID_SIZE; } RDMResponse *response = GetResponseFromData(request, raw_data, param_data_size); delete[] raw_data; return response; } /** * Handle PID_TCP_COMMS_STATUS */ RDMResponse *ManagementEndpoint::GetTCPCommsStatus(const RDMRequest *request) { if (request->ParamDataSize()) { return NackWithReason(request, NR_FORMAT_ERROR); } PACK( struct tcp_stats_message_s { uint32_t ip_address; uint16_t unhealthy_events; uint16_t connection_events; }); struct tcp_stats_message_s tcp_stats_message; tcp_stats_message.ip_address = m_tcp_stats->ip_address.AsInt(); tcp_stats_message.unhealthy_events = HostToNetwork(m_tcp_stats->unhealthy_events); tcp_stats_message.connection_events = HostToNetwork(m_tcp_stats->connection_events); return GetResponseFromData( request, reinterpret_cast(&tcp_stats_message), sizeof(tcp_stats_message)); } RDMResponse *ManagementEndpoint::SetTCPCommsStatus(const RDMRequest *request) { m_tcp_stats->ResetCounters(); return GetResponseFromData(request, NULL, 0); } /** * Add our UID to the set and run the Discovery Callback. */ void ManagementEndpoint::DiscoveryComplete(RDMDiscoveryCallback *callback, const UIDSet &uids) { UIDSet all_uids(uids); all_uids.AddUID(m_uid); callback->Run(all_uids); } ola-0.10.9/tools/e133/DesignatedControllerConnection.h0000664000175000017500000001005414376533110017421 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DesignatedControllerConnection.h * Handles the connection to a designated controller. * Copyright (C) 2013 Simon Newton */ #ifndef TOOLS_E133_DESIGNATEDCONTROLLERCONNECTION_H_ #define TOOLS_E133_DESIGNATEDCONTROLLERCONNECTION_H_ #include #include #include "ola/e133/MessageBuilder.h" #include "ola/io/NonBlockingSender.h" #include "ola/io/SelectServerInterface.h" #include "ola/network/IPV4Address.h" #include "ola/network/Socket.h" #include "ola/network/TCPSocket.h" #include "ola/network/TCPSocketFactory.h" #include "ola/util/SequenceNumber.h" #include "libs/acn/E133Inflator.h" #include "libs/acn/E133StatusInflator.h" #include "libs/acn/RootInflator.h" #include "libs/acn/TCPTransport.h" #include "tools/e133/E133HealthCheckedConnection.h" #include "tools/e133/TCPConnectionStats.h" using std::string; class DesignatedControllerConnection { public: DesignatedControllerConnection( ola::io::SelectServerInterface *ss, const ola::network::IPV4Address &ip_address, ola::e133::MessageBuilder *message_builder, TCPConnectionStats *tcp_stats, unsigned int max_queue_size = MAX_QUEUE_SIZE); ~DesignatedControllerConnection(); bool Init(); // Call this to send RDMResponses (i.e. Queued Messages) to the designated // controller. bool SendStatusMessage( uint16_t endpoint, const ola::rdm::RDMResponse *response); bool CloseTCPConnection(); private: const ola::network::IPV4Address m_ip_address; const unsigned int m_max_queue_size; ola::io::SelectServerInterface *m_ss; ola::e133::MessageBuilder *m_message_builder; TCPConnectionStats *m_tcp_stats; // TCP connection classes ola::network::TCPSocket *m_tcp_socket; E133HealthCheckedConnection *m_health_checked_connection; ola::io::NonBlockingSender *m_message_queue; ola::acn::IncomingTCPTransport *m_incoming_tcp_transport; // Listening Socket ola::network::TCPSocketFactory m_tcp_socket_factory; ola::network::TCPAcceptingSocket m_listening_tcp_socket; // Inflators ola::acn::RootInflator m_root_inflator; ola::acn::E133Inflator m_e133_inflator; ola::acn::E133StatusInflator m_e133_status_inflator; // The message state. // Indicates if we have messages that haven't been sent on the // NonBlockingSender yet. typedef std::map PendingMessageMap; bool m_unsent_messages; PendingMessageMap m_unacked_messages; ola::SequenceNumber m_sequence_number; void NewTCPConnection(ola::network::TCPSocket *socket); void ReceiveTCPData(); void TCPConnectionUnhealthy(); void TCPConnectionClosed(); void RLPDataReceived(const ola::acn::TransportHeader &header); bool SendRDMCommand(unsigned int sequence_number, uint16_t endpoint, const ola::rdm::RDMResponse *rdm_response); void HandleStatusMessage( const ola::acn::TransportHeader *transport_header, const ola::acn::E133Header *e133_header, uint16_t status_code, const string &description); static const unsigned int MAX_QUEUE_SIZE; DesignatedControllerConnection(const DesignatedControllerConnection&); DesignatedControllerConnection& operator=( const DesignatedControllerConnection&); }; #endif // TOOLS_E133_DESIGNATEDCONTROLLERCONNECTION_H_ ola-0.10.9/tools/e133/libolae133common.pc.in0000664000175000017500000000035714376533110015122 00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ libdir=@libdir@ includedir=@includedir@ Name: libolae133common Version: @VERSION@ Description: Open Lighting Architecture E1.33 Requires: Libs: -L${libdir} -lolae133common Cflags: -I${includedir} ola-0.10.9/tools/ola_mon/0000775000175000017500000000000014376533270012155 500000000000000ola-0.10.9/tools/ola_mon/index.html0000664000175000017500000000123614376533110014065 00000000000000 OLA Monitoring Console

OLA Monitoring

RPCs

Performance

Connections & Timers

ola-0.10.9/tools/ola_mon/ola_mon.conf0000664000175000017500000000243714376533110014367 00000000000000#!/usr/bin/python # # Config file for the OLAD monitor # # DATA_DIRECTORY: the path to the directory to store the RRD files. DATA_DIRECTORY = '~/lighting/rrd' WWW_DIRECTORY = '~/lighting/rrd-www' # OLAD_SERVERS: A list of hostnames to monitor # OLAD_SERVERS = [ 'localhost', ] # VARIABLES: The list of variables to monitor & plot # 3-tuple in the form (variable type, variable name, graph title) VARIABLES = [ ('DERIVE', 'rpc-received', 'Received RPCs per second'), ('DERIVE', 'rpc-send-errors', 'RPC Send Errors per second'), ('DERIVE', 'rpc-sent', 'Sent RPCs per second'), ('DERIVE', 'ss-loop-count', 'Loop iterations per second'), ('DERIVE', 'ss-loop-time', 'Loop time per second in uS'), ('GAUGE', 'ss-connections', '# of connections'), ('GAUGE', 'ss-sockets', '# of sockets registered'), ('GAUGE', 'ss-timers', '# of timers registered'), ('GAUGE', 'clients-connected', '# of clients'), ] # CDEFS: Create expressions to graph # See http://oss.oetiker.ch/rrdtool/tut/cdeftutorial.en.html # RRDs only allow a-zA-Z0-9_ in names, so any other characters in a variable # name will be automatically converted to _ for the RRD, it's this converted # name which needs to be used in the CDEF calculation CDEFS = [ ('loop-time', 'ss_loop_time,ss_loop_count,/', 'Average loop time in uS'), ] ola-0.10.9/tools/ola_mon/ola_mon.py0000775000175000017500000001751314376533110014076 00000000000000#!/usr/bin/python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ola_mon.py # Copyright (C) 2010 Simon Newton # TODO(Peter): On Python 2 at least, when you try and exit this with Ctrl+C it # doesn't stop from __future__ import print_function import getopt import os.path import re import socket import sys import textwrap import threading import time import rrdtool if sys.version_info >= (3, 0): try: import http.client as httplib except ImportError: import httplib DEFAULT_CONFIG = 'ola_mon.conf' DEFAULT_PORT = 9090 class OlaFetcher(object): def __init__(self, host, port): self._host = host self._port = port def FetchVariables(self): """Fetch the variables from an OLAD instance. Returns: A dict of variable_name: value mappings """ body = self._FetchDebug() if body: return self._ProcessDebug(body) return {} def _FetchDebug(self): """Fetch the contents of the debug page.""" connection = httplib.HTTPConnection('%s:%d' % (self._host, self._port)) try: connection.request('GET', '/debug') except socket.error: return None try: response = connection.getresponse() if response.status == 200: if sys.version_info >= (3, 2): return response.read().decode('utf-8') else: return response.read() except httplib.BadStatusLine: return None return None def _ProcessDebug(self, contents): """Process the contents of a debug page.""" variables = {} for line in contents.split('\n'): if ':' not in line: continue var, data = line.split(':', 1) var = var.strip() data = data.strip() if data.startswith('map:'): # label, key_values = data.split(' ', 1) # _, label_name = label.split(':', 1) pass else: variables[var] = data return variables class RRDStore(object): def __init__(self, variables, filename): self._filename = filename self._variables = variables data_sources = [] for type, variable, _ in variables: data_sources.append('DS:%s:%s:30:0:U' % (SanitizeName(variable), type)) if not os.path.exists(filename): rrdtool.create(filename, '--step=1', data_sources, 'RRA:AVERAGE:0.5:1:300') def Update(self, timestamp, data): args = ['%d' % timestamp] for _, variable, _ in self._variables: value = data.get(variable, 'U') args.append(value) rrdtool.update(self._filename, ':'.join(args)) class Monitor(threading.Thread): def __init__(self, rrd_directory, output_directory, host, port, variables): threading.Thread.__init__(self) self._fetcher = OlaFetcher(host, port) rrd_file = os.path.join(rrd_directory, '%s.rrd' % host) self._store = RRDStore(variables, rrd_file) self._terminate = False def Terminate(self): self._terminate = True def run(self): while not self._terminate: variables = self._fetcher.FetchVariables() now = time.time() self._store.Update(now, variables) time.sleep(1) class Grapher(threading.Thread): def __init__(self, rrd_directory, output_directory, host, variables, cdefs): threading.Thread.__init__(self) self._directory = os.path.join(output_directory, host) if not os.path.exists(self._directory): os.makedirs(self._directory) self._rrd_file = os.path.join(rrd_directory, '%s.rrd' % host) self._variables = variables self._cdefs = cdefs self._terminate = False def Terminate(self): self._terminate = True def run(self): while not self._terminate: if os.path.exists(self._rrd_file): self._MakeGraphs() time.sleep(5) def _MakeGraphs(self): for type, variable, title in self._variables: output_file = os.path.join(self._directory, '%s.png' % variable) rrdtool.graph(output_file, '--imgformat', 'PNG', '--title', title, '--start', 'end-30s', 'DEF:%s=%s:%s:AVERAGE' % (SanitizeName(variable), self._rrd_file, SanitizeName(variable)), 'LINE1:%s#FF0000' % SanitizeName(variable)) variables = set([SanitizeName(x) for _, x, _ in self._variables]) for cdef_name, function, title in self._cdefs: output_file = os.path.join(self._directory, '%s.png' % cdef_name) values = function.split(',') used_variables = set(values).intersection(variables) defs = [] for variable in used_variables: defs.append('DEF:%s=%s:%s:AVERAGE' % (SanitizeName(variable), self._rrd_file, SanitizeName(variable))) rrdtool.graph(output_file, '--imgformat', 'PNG', '--title', title, '--start', 'end-30s', defs, 'CDEF:%s=%s' % (SanitizeName(cdef_name), function), 'LINE1:%s#FF0000' % SanitizeName(cdef_name)) def SanitizeName(variable): return re.sub("[^a-zA-Z0-9_]", "_", variable) def LoadConfig(config_file): """Load the config file. Args: config_file: path to the config Returns: A dict with the config parameters. """ locals = {} # Python 2 and 3 compatible version of execfile exec(open(config_file).read(), {}, locals) keys = set(['OLAD_SERVERS', 'DATA_DIRECTORY', 'VARIABLES', 'WWW_DIRECTORY', 'CDEFS']) if not keys.issubset(locals.keys()): print('Invalid config file') sys.exit(2) if not len(locals['OLAD_SERVERS']): print('No hosts defined') sys.exit(2) if not len(locals['VARIABLES']): print('No variables defined') sys.exit(2) return locals def Usage(binary): """Display the usage information.""" print(textwrap.dedent("""\ Usage: %s [options] Start the OLAD monitoring system -h, --help Display this help message -c, --config The config file to use """ % binary)) def main(): try: opts, args = getopt.getopt(sys.argv[1:], "hc:v", ["help", "config="]) except getopt.GetoptError as e: print(str(e)) Usage(sys.argv[0]) sys.exit(2) config_file = DEFAULT_CONFIG for o, a in opts: if o in ("-h", "--help"): Usage(sys.argv[0]) sys.exit() elif o in ("-c", "--config"): config_file = os.path.expanduser(a) else: assert False, "unhandled option" config = LoadConfig(config_file) rrd_directory = os.path.expanduser(config['DATA_DIRECTORY']) www_directory = os.path.expanduser(config['WWW_DIRECTORY']) variables = config['VARIABLES'] cdefs = config['CDEFS'] if not os.path.exists(rrd_directory): os.makedirs(rrd_directory) threads = [] for host in config['OLAD_SERVERS']: port = DEFAULT_PORT if ':' in host: host, port = host.split(':') monitor = Monitor(rrd_directory, www_directory, host, port, variables) monitor.start() threads.append(monitor) grapher = Grapher(rrd_directory, www_directory, host, variables, cdefs) grapher.start() threads.append(grapher) for thread in threads: thread.join() if __name__ == '__main__': main() ola-0.10.9/tools/ola_mon/Makefile.mk0000664000175000017500000000011214376533110014126 00000000000000CLEANFILES += \ tools/ola_mon/*.pyc \ tools/ola_mon/__pycache__/* ola-0.10.9/tools/logic/0000775000175000017500000000000014376533272011630 500000000000000ola-0.10.9/tools/logic/logic-rdm-sniffer.cpp0000664000175000017500000002425014376533110015555 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * logic-rdm-sniffer.cpp * RDM Sniffer software for the Saleae Logic Device. * Copyright (C) 2013 Simon Newton */ #if HAVE_CONFIG_H #include #endif // HAVE_CONFIG_H #ifdef HAVE_SALEAEDEVICEAPI_H #include #endif // HAVE_SALEAEDEVICEAPI_H #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "tools/logic/DMXSignalProcessor.h" using std::auto_ptr; using std::cerr; using std::cout; using std::endl; using std::string; using std::vector; using ola::io::SelectServer; using ola::messaging::Descriptor; using ola::messaging::Message; using ola::rdm::CommandPrinter; using ola::rdm::PidStoreHelper; using ola::rdm::RDMCommand; using ola::rdm::UID; using ola::thread::Mutex; using ola::thread::MutexLocker; using ola::NewSingleCallback; DEFINE_default_bool(display_asc, false, "Display non-RDM alternate start code frames."); DEFINE_s_default_bool(full_rdm, r, false, "Unpack RDM parameter data."); DEFINE_s_default_bool(timestamp, t, false, "Include timestamps."); DEFINE_s_default_bool(display_dmx, d, false, "Display DMX Frames. Defaults to false."); DEFINE_uint16(dmx_slot_limit, ola::DMX_UNIVERSE_SIZE, "Only display the first N slots of DMX data."); DEFINE_uint32(sample_rate, 4000000, "Sample rate in HZ."); DEFINE_string(pid_location, "", "The directory containing the PID definitions."); void OnReadData(U64 device_id, U8 *data, uint32_t data_length, void *user_data); void OnError(U64 device_id, void *user_data); void ProcessData(U8 *data, uint32_t data_length); class LogicReader { public: explicit LogicReader(SelectServer *ss, unsigned int sample_rate) : m_sample_rate(sample_rate), m_device_id(0), m_logic(NULL), m_ss(ss), m_signal_processor(ola::NewCallback(this, &LogicReader::FrameReceived), sample_rate), m_pid_helper(FLAGS_pid_location.str(), 4), m_command_printer(&cout, &m_pid_helper) { if (!m_pid_helper.Init()) { OLA_WARN << "Failed to init PidStore"; } } ~LogicReader(); void DeviceConnected(U64 device, GenericInterface *interface); void DeviceDisconnected(U64 device); void DataReceived(U64 device, U8 *data, uint32_t data_length); void FrameReceived(const uint8_t *data, unsigned int length); void Stop(); bool IsConnected() const { MutexLocker lock(&m_mu); return m_logic != NULL; } private: const unsigned int m_sample_rate; U64 m_device_id; // GUARDED_BY(mu_); LogicInterface *m_logic; // GUARDED_BY(mu_); mutable Mutex m_mu; SelectServer *m_ss; DMXSignalProcessor m_signal_processor; PidStoreHelper m_pid_helper; CommandPrinter m_command_printer; Mutex m_data_mu; std::queue m_free_data; void ProcessData(U8 *data, uint32_t data_length); void DisplayDMXFrame(const uint8_t *data, unsigned int length); void DisplayRDMFrame(const uint8_t *data, unsigned int length); void DisplayAlternateFrame(const uint8_t *data, unsigned int length); void DisplayRawData(const uint8_t *data, unsigned int length); }; LogicReader::~LogicReader() { m_ss->DrainCallbacks(); } void LogicReader::DeviceConnected(U64 device, GenericInterface *interface) { OLA_INFO << "Device " << device << " connected, setting sample rate to " << m_sample_rate << "Hz"; MutexLocker lock(&m_mu); if (m_logic != NULL) { OLA_WARN << "More than one device is connected"; return; } LogicInterface *logic = dynamic_cast(interface); if (logic == NULL) { OLA_WARN << "Only the Logic is supported for now"; return; } m_device_id = device; m_logic = logic; // do stuff here m_logic->RegisterOnReadData(&OnReadData, this); m_logic->RegisterOnError(&OnError); m_logic->SetSampleRateHz(m_sample_rate); m_logic->ReadStart(); } void LogicReader::DeviceDisconnected(U64 device) { OLA_INFO << "Device " << device << " disconnected"; MutexLocker lock(&m_mu); if (device != m_device_id) { return; } m_device_id = 0; m_logic = NULL; m_ss->Terminate(); // } /** * Called by the receive thread when new data arrives * @param device the device id which produced the data * @param data pointer to the data, ownership is transferred, use * DeleteU8ArrayPtr to free. * @param data_length the size of the data */ void LogicReader::DataReceived(U64 device, U8 *data, uint32_t data_length) { { MutexLocker lock(&m_mu); if (device != m_device_id) { DevicesManagerInterface::DeleteU8ArrayPtr(data); return; } } m_ss->Execute( NewSingleCallback(this, &LogicReader::ProcessData, data, data_length)); { MutexLocker lock(&m_data_mu); while (!m_free_data.empty()) { U8 *data = m_free_data.front(); DevicesManagerInterface::DeleteU8ArrayPtr(data); m_free_data.pop(); } } } void LogicReader::FrameReceived(const uint8_t *data, unsigned int length) { if (!length) { return; } switch (data[0]) { case 0: DisplayDMXFrame(data + 1, length - 1); break; case RDMCommand::START_CODE: DisplayRDMFrame(data + 1, length - 1); break; default: DisplayAlternateFrame(data, length); } } /** * */ void LogicReader::Stop() { MutexLocker lock(&m_mu); if (m_logic) { m_logic->Stop(); } } /** * Called in the main thread. * @param data pointer to the data, ownership is transferred, use * DeleteU8ArrayPtr to free. * @param data_length the size of the data */ void LogicReader::ProcessData(U8 *data, uint32_t data_length) { m_signal_processor.Process(data, data_length, 0x01); DevicesManagerInterface::DeleteU8ArrayPtr(data); /* * This is commented out until we get clarification on if DeleteU8ArrayPtr is * thread safe. http://community.saleae.com/node/403 */ /* { MutexLocker lock(&m_data_mu); m_free_data.push(data); } */ } void LogicReader::DisplayDMXFrame(const uint8_t *data, unsigned int length) { if (!FLAGS_display_dmx) return; cout << "DMX " << std::dec; cout << length << ":" << std::hex; DisplayRawData(data, length); } void LogicReader::DisplayRDMFrame(const uint8_t *data, unsigned int length) { auto_ptr command(RDMCommand::Inflate(data, length)); if (command.get()) { if (FLAGS_full_rdm) { cout << "---------------------------------------" << endl; } command->Print(&m_command_printer, !FLAGS_full_rdm, true); } else { DisplayRawData(data, length); } } void LogicReader::DisplayAlternateFrame(const uint8_t *data, unsigned int length) { if (!FLAGS_display_asc || length == 0) return; unsigned int slot_count = length - 1; cout << "SC 0x" << std::hex << std::setw(2) << static_cast(data[0]) << " " << std::dec << slot_count << ":" << std::hex; DisplayRawData(data + 1, slot_count); } /** * Dump out the raw data if we couldn't parse it correctly. */ void LogicReader::DisplayRawData(const uint8_t *data, unsigned int length) { for (unsigned int i = 0; i < length; i++) { cout << std::hex << std::setw(2) << static_cast(data[i]) << " "; } cout << endl; } // SaleaeDeviceApi callbacks void OnConnect(U64 device_id, GenericInterface* device_interface, void* user_data) { if (!user_data) return; LogicReader *reader = (LogicReader*) user_data; // NOLINT(readability/casting) reader->DeviceConnected(device_id, device_interface); } void OnDisconnect(U64 device_id, void *user_data) { if (!user_data) return; LogicReader *reader = (LogicReader*) user_data; // NOLINT(readability/casting) reader->DeviceDisconnected(device_id); } void OnReadData(U64 device_id, U8 *data, uint32_t data_length, void *user_data) { if (!user_data) { DevicesManagerInterface::DeleteU8ArrayPtr(data); return; } LogicReader *reader = (LogicReader*) user_data; // NOLINT(readability/casting) reader->DataReceived(device_id, data, data_length); } void OnError(U64 device_id, void *user_data) { OLA_INFO << "A device reported an Error."; (void) device_id; (void) user_data; } void DisplayReminder(LogicReader *reader) { if (!reader->IsConnected()) { cout << "No devices found, maybe you should check the permissions " << "and/or the cable?" << endl; } } /* * Main. */ int main(int argc, char *argv[]) { ola::AppInit(&argc, argv, "[ options ]", "Decode DMX/RDM data from a Saleae Logic device"); SelectServer ss; LogicReader reader(&ss, FLAGS_sample_rate); DevicesManagerInterface::RegisterOnConnect(&OnConnect, &reader); DevicesManagerInterface::RegisterOnDisconnect(&OnDisconnect, &reader); DevicesManagerInterface::BeginConnect(); OLA_INFO << "Running..."; ss.RegisterSingleTimeout(3000, NewSingleCallback(DisplayReminder, &reader)); ss.Run(); reader.Stop(); return ola::EXIT_OK; } ola-0.10.9/tools/logic/DMXSignalProcessor.h0000664000175000017500000000637614376533110015412 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMXSignalProcessor.h * Process a stream of bits and decode into DMX frames. * Copyright (C) 2013 Simon Newton */ #ifndef TOOLS_LOGIC_DMXSIGNALPROCESSOR_H_ #define TOOLS_LOGIC_DMXSIGNALPROCESSOR_H_ #include #include #include #include /** * Process a DMX signal. */ class DMXSignalProcessor { public: typedef ola::Callback2 DataCallback; DMXSignalProcessor(DataCallback *callback, unsigned int sample_rate); // Reset the processor. Used if there is a gap in the stream. void Reset() { SetState(IDLE); } // Process more data. void Process(uint8_t *ptr, unsigned int size, uint8_t mask = 0xff); private: enum State { UNDEFINED, // when the signal is low and we have no idea where we are. IDLE, BREAK, MAB, START_BIT, BIT_1, BIT_2, BIT_3, BIT_4, BIT_5, BIT_6, BIT_7, BIT_8, STOP_BITS, MARK_BETWEEN_SLOTS, }; // Set once in the constructor DataCallback* const m_callback; const unsigned int m_sample_rate; const double m_microseconds_per_tick; // our current state. State m_state; // the number of ticks (samples) we've been in this state. unsigned int m_ticks; // sometimes we may not know if we're in a break or not, see the comments // in DMXSignalProcessor.cpp bool m_may_be_in_break; unsigned int m_ticks_in_break; // Used to accumulate the bits in the current byte. std::vector m_bits_defined; std::vector m_current_byte; // The bytes are stored here. std::vector m_dmx_data; void ProcessSample(bool bit); void ProcessBit(bool bit); bool SetBitIfNotDefined(bool bit); void AppendDataByte(); void HandleFrame(); void SetState(State state, unsigned int ticks = 1); bool DurationExceeds(double micro_seconds); double TicksAsMicroSeconds(); static const unsigned int DMX_BITRATE = 250000; // These are all in microseconds and are the receiver side limits. static const double MIN_BREAK_TIME; static const double MIN_MAB_TIME; static const double MAX_MAB_TIME; // The minimum bit time, based on a 4MHz sample rate. // TODO(simon): adjust this based on the sample rate. static const double MIN_BIT_TIME; static const double MAX_BIT_TIME; static const double MIN_LAST_BIT_TIME; static const double MAX_MARK_BETWEEN_SLOTS; }; #endif // TOOLS_LOGIC_DMXSIGNALPROCESSOR_H_ ola-0.10.9/tools/logic/README.md0000664000175000017500000000141314376533110013015 00000000000000This currently only works with the original Saleae Logic and Logic 16. The more recent Logic 4, Logic 8, Logic Pro 8 and Logic Pro 16 are not supported by the SDK. https://support.saleae.com/saleae-api-and-sdk/other-information/device-sdk-status-for-new-products In order to compile the logic rdm sniffer, you need the SaleaeDeviceSDK, there is a version available from: http://downloads.saleae.com/SDK/SaleaeDeviceSdk-1.1.14.zip You will also need to set the include path to your SaleaeDeviceSDK. Example: ``` ./configure CPPFLAGS="-I/path/to/your/SaleaeDeviceSdk-1.1.14/include" ``` The configure script should output something like this: ``` checking SaleaeDeviceApi.h usability... yes checking SaleaeDeviceApi.h presence... yes checking for SaleaeDeviceApi.h... yes ``` ola-0.10.9/tools/logic/Makefile.mk0000664000175000017500000000061414376533110013606 00000000000000if HAVE_SALEAE_LOGIC bin_PROGRAMS += tools/logic/logic_rdm_sniffer endif tools_logic_logic_rdm_sniffer_SOURCES = \ tools/logic/DMXSignalProcessor.cpp \ tools/logic/DMXSignalProcessor.h \ tools/logic/logic-rdm-sniffer.cpp tools_logic_logic_rdm_sniffer_LDADD = common/libolacommon.la \ $(libSaleaeDevice_LIBS) EXTRA_DIST += tools/logic/README.md ola-0.10.9/tools/logic/DMXSignalProcessor.cpp0000664000175000017500000002224314376533110015734 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * DMXSignalProcessor.cpp * Process a stream of bits and decode into DMX frames. * Copyright (C) 2013 Simon Newton * * See E1.11 for the details including timing. It generally goes something * like: * Mark (Idle) - High * Break - Low * Mark After Break - High * Start bit (low) * LSB to MSB (8) * 2 stop bits (high) * Mark between slots (high) * * There are a number of interesting cases which we need to handle: * * Variable bit length * * Start bit vs Break. * After the stop bits comes an optional mark time between slots, that can * range up to 1s. When the next falling edge occurs, it could either be a * break (indicating the previous frame is now complete) or a start bit. If a * rising edge occurs before 35.28 (9 * 3.92) us then it was a start-bit. If * 36.72 (9 * 4.08) useconds passes and there was no rising edge it's a break. * * The implementation is based on a state machine, with a couple of tweaks. */ #include #include #include "tools/logic/DMXSignalProcessor.h" using std::vector; const double DMXSignalProcessor::MIN_BREAK_TIME = 88.0; const double DMXSignalProcessor::MIN_MAB_TIME = 8.0; const double DMXSignalProcessor::MAX_MAB_TIME = 1000000.0; const double DMXSignalProcessor::MIN_BIT_TIME = 3.75; const double DMXSignalProcessor::MAX_BIT_TIME = 4.08; const double DMXSignalProcessor::MIN_LAST_BIT_TIME = 2.64; const double DMXSignalProcessor::MAX_MARK_BETWEEN_SLOTS = 1000000.0; /** * Create a new DMXSignalProcessor which runs the specified callback when a new * frame is received. */ DMXSignalProcessor::DMXSignalProcessor(DataCallback *callback, unsigned int sample_rate) : m_callback(callback), m_sample_rate(sample_rate), m_microseconds_per_tick(1000000.0 / sample_rate), m_state(IDLE), m_ticks(0), m_may_be_in_break(false), m_ticks_in_break(0) { if (m_sample_rate % DMX_BITRATE) { OLA_WARN << "Sample rate is not a multiple of " << DMX_BITRATE; } } /* * Process the data stream. We pass in a uint8_t array rather than a bool * array, since it's the same size anyway. The mask is used to indicate how to * interpret the data. * @param ptr the data stream to process * @param size the number of samples in the stream * @param mask the value to be AND'ed with each sample to determine if the * signal is high or low. */ void DMXSignalProcessor::Process(uint8_t *ptr, unsigned int size, uint8_t mask) { for (unsigned int i = 0 ; i < size; i++) { ProcessSample(ptr[i] & mask); } } /** * Process one bit of data through the state machine. */ void DMXSignalProcessor::ProcessSample(bool bit) { if (m_may_be_in_break && !bit) { // if we may be in a break, keep track of the time since the falling edge. m_ticks_in_break++; } switch (m_state) { case UNDEFINED: if (bit) { SetState(IDLE); } break; case IDLE: if (bit) { m_ticks++; } else { SetState(BREAK); } break; case BREAK: if (bit) { if (DurationExceeds(MIN_BREAK_TIME)) { SetState(MAB); } else { OLA_WARN << "Break too short, was " << TicksAsMicroSeconds() << " us"; SetState(IDLE); } } else { m_ticks++; } break; case MAB: if (bit) { m_ticks++; if (DurationExceeds(MAX_MAB_TIME)) { SetState(IDLE, m_ticks); } } else { if (DurationExceeds(MIN_MAB_TIME)) { // OLA_INFO << "In start bit!"; SetState(START_BIT); } else { OLA_WARN << "Mark too short, was " << TicksAsMicroSeconds() << "us"; SetState(UNDEFINED); } } break; case START_BIT: case BIT_1: case BIT_2: case BIT_3: case BIT_4: case BIT_5: case BIT_6: case BIT_7: case BIT_8: ProcessBit(bit); break; case STOP_BITS: m_ticks++; if (bit) { if (DurationExceeds(2 * MIN_BIT_TIME)) { AppendDataByte(); SetState(MARK_BETWEEN_SLOTS); } } else { if (m_may_be_in_break) { HandleFrame(); SetState(BREAK, m_ticks_in_break); } else { OLA_WARN << "Saw a low during a stop bit"; SetState(UNDEFINED); } } break; case MARK_BETWEEN_SLOTS: // Wait for the falling edge, this could signal the next start bit, or a // new break. m_ticks++; if (bit) { if (DurationExceeds(MAX_MARK_BETWEEN_SLOTS)) { // ok, that was the end of the frame. HandleFrame(); SetState(IDLE); } } else { m_may_be_in_break = true; // Assume it's a start bit for now, but flag that we may be in a break. SetState(START_BIT); } break; default: break; } } /** * Process a sample that makes up a bit of data. */ void DMXSignalProcessor::ProcessBit(bool bit) { if (bit) { // a high at this stage means this definitely isn't a break. m_may_be_in_break = false; } bool current_bit = SetBitIfNotDefined(bit); /* OLA_INFO << "ticks: " << m_ticks << ", current bit " << current_bit << ", our bit " << bit; */ m_ticks++; if (bit == current_bit) { if (DurationExceeds(MAX_BIT_TIME)) { SetState(static_cast(m_state + 1)); } } else { // Because we force a transition into the next state (bit) after // MAX_BIT_TIME. The last bit may appear to be too short. This math is as // follows: // min time for 9 bits = 9 * 3.92 = 35.28 // max time for 8 bits = 8 * 4.08 = 32.64 // difference = 2.64 if ((m_state == BIT_8 && DurationExceeds(MIN_LAST_BIT_TIME)) || DurationExceeds(MIN_BIT_TIME)) { SetState(static_cast(m_state + 1)); } else { OLA_WARN << "Bit " << m_state << " was too short, was " << TicksAsMicroSeconds() << "us"; SetState(UNDEFINED); } } } /** * This is where we accumulate the bit values, before packing them into a byte. * This method does a couple of things: * If there is no known value for the bit, it sets one. * Return the value of the bit. */ bool DMXSignalProcessor::SetBitIfNotDefined(bool bit) { if (m_state == START_BIT) { return false; } int offset = m_state - BIT_1; if (!m_bits_defined[offset]) { // OLA_INFO << "Set bit " << offset << " to " << bit; m_current_byte.push_back(bit); m_bits_defined[offset] = true; } return m_current_byte[offset]; } /** * Pack the 8 bit values into a byte, and append it to the vector of bytes. */ void DMXSignalProcessor::AppendDataByte() { uint8_t byte = 0; for (unsigned int i = 0; i < 8; i++) { // LSB first byte |= (m_current_byte[i] << i); } OLA_INFO << "Byte " << m_dmx_data.size() << " is " << static_cast(byte) << " ( 0x" << std::hex << static_cast(byte) << " )"; m_dmx_data.push_back(byte); m_bits_defined.assign(8, false); m_current_byte.clear(); } /** * Called when we know the previous frame is complete. This invokes the * callback if there is one, and resets the vector. */ void DMXSignalProcessor::HandleFrame() { // OLA_INFO << "--------------- END OF FRAME ------------------"; OLA_INFO << "Got frame of size " << m_dmx_data.size(); if (m_callback && !m_dmx_data.empty()) { m_callback->Run(&m_dmx_data[0], m_dmx_data.size()); } m_dmx_data.clear(); } /** * Used to transition between states */ void DMXSignalProcessor::SetState(State state, unsigned int ticks) { OLA_INFO << "Transition to " << state << ", prev duration was " << TicksAsMicroSeconds(); m_state = state; m_ticks = ticks; if (state == UNDEFINED) { // if we have a partial frame, we should send that up the stack HandleFrame(); } else if (state == MAB) { m_dmx_data.clear(); } else if (state == START_BIT) { // The reset should be done in AppendDataByte but do it again to be safe. m_bits_defined.assign(8, false); m_current_byte.clear(); } } /* * Return true if the current number of ticks exceeds micro_seconds. * Due to sampling this can be wrong by +- m_microseconds_per_tick. */ bool DMXSignalProcessor::DurationExceeds(double micro_seconds) { return m_ticks * m_microseconds_per_tick >= micro_seconds; } /* * Return the current number of ticks in microseconds. */ double DMXSignalProcessor::TicksAsMicroSeconds() { return m_ticks * m_microseconds_per_tick; } ola-0.10.9/tools/rdmpro/0000775000175000017500000000000014376533272012036 500000000000000ola-0.10.9/tools/rdmpro/rdm-sniffer.cpp0000664000175000017500000003435614376533110014700 00000000000000/* * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * rdm-sniffer.cpp * RDM Sniffer software for the ENTTEC RDM Pro. * Copyright (C) 2010 Simon Newton */ #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include "plugins/usbpro/BaseUsbProWidget.h" using std::auto_ptr; using std::cerr; using std::cout; using std::endl; using std::string; using std::vector; using ola::strings::ToHex; using ola::io::SelectServerInterface; using ola::plugin::usbpro::DispatchingUsbProWidget; using ola::messaging::Descriptor; using ola::messaging::Message; using ola::rdm::CommandPrinter; using ola::rdm::PidStoreHelper; using ola::rdm::RDMCommand; using ola::rdm::UID; DEFINE_s_default_bool(display_dmx, d, false, "Display DMX frames. Defaults to false."); DEFINE_s_default_bool(timestamp, t, false, "Include timestamps."); DEFINE_s_default_bool(full_rdm, r, false, "Unpack RDM parameter data."); DEFINE_s_string(readfile, p, "", "Display data from a previously captured file."); DEFINE_s_string(savefile, w, "", "Also write the captured data to a file."); DEFINE_default_bool(display_asc, false, "Display non-RDM alternate start code frames."); DEFINE_int16(dmx_slot_limit, ola::DMX_UNIVERSE_SIZE, "Only display the first N slots of DMX data."); DEFINE_string(pid_location, "", "The directory containing the PID definitions."); /** * A list of bytes */ class ByteStream { public: ByteStream() {} virtual ~ByteStream() {} void AddByte(uint8_t byte) { m_bytes.push_back(byte); } uint8_t& operator[](unsigned int offset) { return m_bytes[offset]; } void Reset() { m_bytes.clear(); } unsigned int Size() { return m_bytes.size(); } private: vector m_bytes; }; class RDMSniffer { public: struct RDMSnifferOptions { // DMX Options bool display_dmx_frames; // display DMX frames // limit the number of dmx slots displayed uint16_t dmx_slot_limit; // RDM Options bool display_rdm_frames; // display RDM frames bool summarize_rdm_frames; // only display a one line summary bool unpack_param_data; // display the unpacked RDM param data // Non DMX / RDM Frames // display non-RDM alternate start code frames bool display_non_rdm_asc_frames; // the location with the pid data string pid_location; string write_file; // write to this file if set // print timestamps as well, these aren't saved bool timestamp; }; static void InitOptions(RDMSnifferOptions *options) { options->display_dmx_frames = false; options->dmx_slot_limit = ola::DMX_UNIVERSE_SIZE; options->display_rdm_frames = true; options->summarize_rdm_frames = true; options->unpack_param_data = true; options->display_non_rdm_asc_frames = true; options->pid_location = ""; options->write_file = ""; options->timestamp = false; } explicit RDMSniffer(const RDMSnifferOptions &options); void HandleMessage(uint8_t label, const uint8_t *data, unsigned int length); private: typedef enum { IDLE, BREAK, MAB, DATA, } SnifferState; SnifferState m_state; ByteStream m_frame; RDMSnifferOptions m_options; PidStoreHelper m_pid_helper; CommandPrinter m_command_printer; void ProcessTuple(uint8_t control_byte, uint8_t data_byte); void ProcessFrame(); void DisplayDmxFrame(); void DisplayAlternateFrame(); void DisplayRDMFrame(); void DisplayRawData(unsigned int start, unsigned int end); void MaybePrintTimestamp(); static const uint8_t SNIFFER_PACKET = 0x81; static const uint8_t SNIFFER_PACKET_SIZE = 200; // if the high bit is set, this is a data byte, otherwise it's a control // byte static const uint8_t DATA_MASK = 0x80; static const uint8_t BYTES_PER_LINE = 8; }; RDMSniffer::RDMSniffer(const RDMSnifferOptions &options) : m_state(IDLE), m_options(options), m_pid_helper(options.pid_location, 4), m_command_printer(&cout, &m_pid_helper) { if (!m_pid_helper.Init()) { OLA_WARN << "Failed to init PidStore"; } } /* * Handle the widget replies */ void RDMSniffer::HandleMessage(uint8_t label, const uint8_t *data, unsigned int length) { if (!m_options.write_file.empty()) { uint16_t write_length = ola::network::HostToNetwork( static_cast(length)); std::ofstream write_file; write_file.open(m_options.write_file.c_str(), std::ios::out | std::ios::binary | std::ios::app); write_file.write(reinterpret_cast(&label), sizeof(label)); write_file.write(reinterpret_cast(&write_length), sizeof(write_length)); write_file.write(reinterpret_cast(data), length); write_file.close(); } if (label != SNIFFER_PACKET) { OLA_WARN << "Not a SNIFFER_PACKET, was " << static_cast(label); return; } if (length != SNIFFER_PACKET_SIZE) { OLA_WARN << "Strange packet size. Was " << static_cast(length) << ", expected " << static_cast(SNIFFER_PACKET_SIZE); return; } for (unsigned int i = 0; i < length; i+= 2) { /* OLA_INFO << m_state << " " << std::hex << (data[i] & DATA_MASK ? "data " : "control") << " " << (int) (data[i]) << " " << (int) data[i+1]; */ ProcessTuple(data[i], data[i + 1]); } } /** * This processes each (control, data) tuple according to the state machine */ void RDMSniffer::ProcessTuple(uint8_t control_byte, uint8_t data_byte) { if (control_byte & DATA_MASK) { // this is an actual byte of data switch (m_state) { case IDLE: // fall through OLA_FALLTHROUGH case MAB: m_state = DATA; m_frame.Reset(); // fall through OLA_FALLTHROUGH case DATA: m_frame.AddByte(data_byte); break; default: OLA_WARN << "Unknown transition from state " << m_state << ", with data " << ToHex(control_byte) << " " << ToHex(data_byte); } } else { // control byte if (data_byte == 0) { switch (m_state) { case BREAK: m_state = MAB; break; default: OLA_WARN << "Unknown transition from state " << m_state << ", with data " << ToHex(control_byte) << " " << ToHex(data_byte); } } else if (data_byte == 1) { switch (m_state) { case IDLE: m_state = BREAK; break; case DATA: ProcessFrame(); m_state = BREAK; break; default: OLA_WARN << "Unknown transition from state " << m_state << ", with data " << ToHex(control_byte) << " " << ToHex(data_byte); } } else if (data_byte == 2) { switch (m_state) { case IDLE: case BREAK: case MAB: break; case DATA: m_state = IDLE; ProcessFrame(); } } else { OLA_WARN << "Unknown transition from state " << m_state << ", with data " << ToHex(control_byte) << " " << ToHex(data_byte); } } } /** * Process a frame based on what start code it has. */ void RDMSniffer::ProcessFrame() { switch (m_frame[0]) { case ola::DMX512_START_CODE: if (m_options.display_dmx_frames) { DisplayDmxFrame(); } break; case RDMCommand::START_CODE: DisplayRDMFrame(); break; default: if (m_options.display_non_rdm_asc_frames) { DisplayAlternateFrame(); } } } /** * Display a DMX Frame */ void RDMSniffer::DisplayDmxFrame() { unsigned int dmx_slot_count = m_frame.Size() - 1; MaybePrintTimestamp(); cout << "DMX " << std::dec; if (m_options.dmx_slot_limit < dmx_slot_count) { cout << m_options.dmx_slot_limit << "/"; } cout << dmx_slot_count << ":"; unsigned int slots_to_display = std::min( dmx_slot_count, static_cast(m_options.dmx_slot_limit)); DisplayRawData(1, slots_to_display); } /** * Display a non (DMX/RDM) frame */ void RDMSniffer::DisplayAlternateFrame() { unsigned int slot_count = m_frame.Size() - 1; MaybePrintTimestamp(); cout << "SC " << ToHex(m_frame[0]) << " " << slot_count << ":"; unsigned int slots_to_display = std::min( slot_count, static_cast(m_options.dmx_slot_limit)); DisplayRawData(1, slots_to_display); } /** * Display an RDM Frame. */ void RDMSniffer::DisplayRDMFrame() { unsigned int slot_count = m_frame.Size() - 1; auto_ptr command( RDMCommand::Inflate(reinterpret_cast(&m_frame[1]), slot_count)); if (command.get()) { if (!m_options.summarize_rdm_frames) { cout << "---------------------------------------" << endl; } if (!m_options.summarize_rdm_frames && m_options.timestamp) { cout << endl; } MaybePrintTimestamp(); command->Print(&m_command_printer, m_options.summarize_rdm_frames, m_options.unpack_param_data); } else { MaybePrintTimestamp(); DisplayRawData(1, slot_count); } } /** * Dump out the raw data if we couldn't parse it correctly. */ void RDMSniffer::DisplayRawData(unsigned int start, unsigned int end) { for (unsigned int i = start; i <= end; i++) { cout << ToHex(m_frame[i], false) << " "; } cout << endl; } /** * Print the timestamp if timestamps are enabled */ void RDMSniffer::MaybePrintTimestamp() { if (!m_options.timestamp) { return; } ola::TimeStamp now; ola::Clock clock; clock.CurrentRealTime(&now); time_t seconds_since_epoch = now.Seconds(); struct tm local_time; localtime_r(&seconds_since_epoch, &local_time); char output[24]; strftime(output, sizeof(output), "%d-%m-%Y %H:%M:%S", &local_time); cout << output << "." << std::dec << static_cast(now.MicroSeconds()) << " "; } void Stop(ola::io::SelectServer *ss) { ss->Terminate(); } /** * Interpret data from a save file */ void ParseFile(RDMSniffer::RDMSnifferOptions *sniffer_options, const string &filename) { uint16_t length; uint32_t size; uint8_t label; std::ifstream read_file; // turn off timestamps sniffer_options->timestamp = false; RDMSniffer sniffer(*sniffer_options); read_file.open(filename.c_str(), std::ios::in | std::ios::binary); if (!read_file.is_open()) { OLA_WARN << "Could not open file: " << filename; return; } read_file.seekg(0, std::ios::end); size = read_file.tellg(); read_file.seekg(0, std::ios::beg); while (read_file.tellg() < size) { read_file.read(reinterpret_cast(&label), sizeof(label)); read_file.read(reinterpret_cast(&length), sizeof(length)); length = ola::network::NetworkToHost(length); uint8_t *buffer = new uint8_t[length]; read_file.read(reinterpret_cast(buffer), length); sniffer.HandleMessage(label, buffer, length); delete[] buffer; } read_file.close(); } /* * Dump RDM data */ int main(int argc, char *argv[]) { ola::AppInit(&argc, argv, "[ options ] ", "Sniff traffic from a ENTTEC RDM Pro device."); if (!FLAGS_savefile.str().empty() && !FLAGS_readfile.str().empty()) { ola::DisplayUsageAndExit(); } RDMSniffer::RDMSnifferOptions sniffer_options; RDMSniffer::InitOptions(&sniffer_options); sniffer_options.display_non_rdm_asc_frames = FLAGS_display_asc; sniffer_options.display_dmx_frames = FLAGS_display_dmx; sniffer_options.dmx_slot_limit = FLAGS_dmx_slot_limit; sniffer_options.timestamp = FLAGS_timestamp; sniffer_options.summarize_rdm_frames = !FLAGS_full_rdm; sniffer_options.pid_location = FLAGS_pid_location.str(); sniffer_options.write_file = FLAGS_savefile.str(); // if we're writing to a file if (!sniffer_options.write_file.empty()) { std::ofstream file; file.open(sniffer_options.write_file.c_str(), std::ios::out | std::ios::binary); if (!file.is_open()) { cerr << "Could not open file for writing: " << sniffer_options.write_file << endl; exit(ola::EXIT_UNAVAILABLE); } } if (!FLAGS_readfile.str().empty()) { // we're reading from a file ParseFile(&sniffer_options, FLAGS_readfile.str()); return ola::EXIT_OK; } if (argc != 2) { ola::DisplayUsageAndExit(); } const string device = argv[1]; ola::io::ConnectedDescriptor *descriptor = ola::plugin::usbpro::BaseUsbProWidget::OpenDevice(device); if (!descriptor) { exit(ola::EXIT_UNAVAILABLE); } ola::io::SelectServer ss; descriptor->SetOnClose(ola::NewSingleCallback(&Stop, &ss)); ss.AddReadDescriptor(descriptor); RDMSniffer sniffer(sniffer_options); DispatchingUsbProWidget widget( descriptor, ola::NewCallback(&sniffer, &RDMSniffer::HandleMessage)); ss.Run(); return ola::EXIT_OK; } ola-0.10.9/tools/rdmpro/README.md0000664000175000017500000000012314376533110013220 00000000000000This currently only works with the Enttec RDM USB Pro and not the DMX USB Pro Mk2. ola-0.10.9/tools/rdmpro/Makefile.mk0000664000175000017500000000043414376533110014014 00000000000000bin_PROGRAMS += tools/rdmpro/rdmpro_sniffer tools_rdmpro_rdmpro_sniffer_SOURCES = tools/rdmpro/rdm-sniffer.cpp tools_rdmpro_rdmpro_sniffer_LDADD = common/libolacommon.la \ plugins/usbpro/libolausbprowidget.la EXTRA_DIST += tools/rdmpro/README.md ola-0.10.9/tools/Makefile.mk0000664000175000017500000000066014376533110012512 00000000000000include tools/ja-rule/Makefile.mk include tools/logic/Makefile.mk include tools/ola_mon/Makefile.mk include tools/ola_trigger/Makefile.mk include tools/rdm/Makefile.mk if !USING_WIN32 include tools/e133/Makefile.mk include tools/usbpro/Makefile.mk include tools/rdmpro/Makefile.mk endif dist_noinst_DATA += \ tools/ola_mon/index.html \ tools/ola_mon/ola_mon.conf \ tools/ola_mon/ola_mon.py PYTHON_BUILD_DIRS += tools ola-0.10.9/tools/rdm/0000775000175000017500000000000014376533272011315 500000000000000ola-0.10.9/tools/rdm/rdm_responder_test.py0000775000175000017500000002615014376533110015507 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # rdm_responder_test.py # Copyright (C) 2010 Simon Newton from __future__ import print_function import datetime import logging import re import sys import textwrap import time from optparse import OptionParser from ola.ClientWrapper import ClientWrapper from ola.StringUtils import StringEscape from ola.testing.rdm import TestDefinitions, TestRunner from ola.testing.rdm.DMXSender import DMXSender from ola.testing.rdm.TestState import TestState from ola.testing.rdm.TimingStats import TimingStats from ola.UID import UID from ola import PidStore, Version if sys.version_info >= (3, 0): try: raw_input except NameError: raw_input = input '''Automated testing for RDM responders.''' __author__ = 'nomis52@gmail.com (Simon Newton)' def ParseOptions(): usage = 'Usage: %prog [options] ' description = textwrap.dedent("""\ Run a series of tests on a RDM responder to check the behaviour. This requires the OLA server to be running, and the RDM device to have been detected. You can confirm this by running ola_rdm_discover -u UNIVERSE. This will send SET commands to the broadcast UIDs which means the start address, device label etc. will be changed for all devices connected to the responder. Think twice about running this on your production lighting rig. """) parser = OptionParser(usage, description=description) parser.add_option('-c', '--slot-count', default=10, help='Number of slots to send when sending DMX.') parser.add_option('-d', '--debug', action='store_true', help='Print debug information to assist in diagnosing ' 'failures.') parser.add_option('-f', '--dmx-frame-rate', default=0, type='int', help='Send DMX frames at this rate in the background.') parser.add_option('-l', '--log', metavar='FILE', help='Also log to the file named FILE.uid.timestamp.') parser.add_option('--list-tests', action='store_true', help='Display a list of all tests') parser.add_option('-p', '--pid-location', metavar='DIR', help='The location of the PID definitions.') parser.add_option('-s', '--skip-check', action='store_true', help='Skip the check for multiple devices.') parser.add_option('-t', '--tests', metavar='TEST1,TEST2', help='A comma separated list of tests to run.') parser.add_option('--timestamp', action='store_true', help='Add timestamps to each test.') parser.add_option('--timing', action='store_true', help='Display summary timing information') parser.add_option('--no-factory-defaults', action='store_true', help="Don't run the SET factory defaults tests") parser.add_option('-w', '--broadcast-write-delay', default=0, type='int', help='The time in ms to wait after sending broadcast set ' 'commands.') parser.add_option('-u', '--universe', default=0, type='int', help='The universe number to use, default is universe 0.') parser.add_option('--inter-test-delay', default=0, type='int', help='The delay in ms to wait between tests, defaults to ' '0.') options, args = parser.parse_args() if options.list_tests: return options if not args: parser.print_help() sys.exit(2) uid = UID.FromString(args[0]) if uid is None: parser.print_usage() print('Invalid UID: %s' % args[0]) sys.exit(2) options.uid = uid return options class MyFilter(object): """Filter out the ascii coloring.""" def filter(self, record): msg = record.msg # Use a raw string for the regex record.msg = re.sub(r'\x1b\[\d*m', '', str(msg)) return True def SetupLogging(options): """Setup the logging for test results.""" level = logging.INFO if options.debug: level = logging.DEBUG logging.basicConfig( level=level, format='%(message)s') if options.log: file_name = '%s.%s.%d' % (options.log, options.uid, time.time()) file_handler = logging.FileHandler(file_name, 'w') file_handler.addFilter(MyFilter()) if options.debug: file_handler.setLevel(logging.DEBUG) logging.getLogger('').addHandler(file_handler) def LogTimingParam(parameter, data): # if non-0 print the stats if data['max']: data['param'] = parameter logging.info(' %s:' % parameter) logging.info(' Mean: %(mean).1f, StdDev %(std).1f, Median %(median).1f' % data) logging.info(' Min: %(min).1f, Max %(max).1f, 99%%: %(99).1f' % data) def LogAllTimingParams(response_type, stats): if not stats.Count(): return logging.info('%s [%d frames]' % (response_type, stats.Count())) LogTimingParam('Response Time', stats.ResponseTime()) LogTimingParam('Break', stats.Break()) LogTimingParam('Mark', stats.Mark()) LogTimingParam('Data', stats.Data()) def DisplayTiming(timing_stats): """Print timing information.""" logging.info('--------------- Response Timing ----------------') stats = timing_stats.GetStatsForType(TimingStats.GET) LogAllTimingParams('GET_RESPONSE', stats) stats = timing_stats.GetStatsForType(TimingStats.SET) LogAllTimingParams('SET_RESPONSE', stats) stats = timing_stats.GetStatsForType(TimingStats.DISCOVERY) LogAllTimingParams('DISCOVERY_RESPONSE', stats) stats = timing_stats.GetStatsForType(TimingStats.DUB) LogAllTimingParams('DISCOVERY_UNIQUE_BRANCH', stats) def DisplaySummary(options, runner, tests, device): """Log a summary of the tests.""" by_category = {} warnings = [] advisories = [] count_by_state = {} for test in tests: state = test.state count_by_state[state] = count_by_state.get(state, 0) + 1 warnings.extend(test.warnings) advisories.extend(test.advisories) by_category.setdefault(test.category, {}) by_category[test.category][state] = ( 1 + by_category[test.category].get(state, 0)) total = sum(count_by_state.values()) logging.info('------------------- Summary --------------------') now = datetime.datetime.now() logging.info('Test Run: %s' % now.strftime('%F %r %z')) logging.info('UID: %s' % options.uid) manufacturer_label = getattr(device, 'manufacturer_label', None) if manufacturer_label: logging.info('Manufacturer: %s' % StringEscape(manufacturer_label)) model_description = getattr(device, 'model_description', None) if model_description: logging.info('Model Description: %s' % StringEscape(model_description)) software_version = getattr(device, 'software_version', None) if software_version: logging.info('Software Version: %s' % software_version) if options.timing: timing_stats = runner.TimingStats() DisplayTiming(timing_stats) logging.info('------------------- Warnings --------------------') for warning in sorted(warnings): logging.info(warning) logging.info('------------------ Advisories -------------------') for advisory in sorted(advisories): logging.info(advisory) logging.info('------------------ By Category ------------------') for category, counts in by_category.items(): passed = counts.get(TestState.PASSED, 0) total_run = (passed + counts.get(TestState.FAILED, 0)) if total_run == 0: continue percent = 1.0 * passed / total_run logging.info(' %26s: %3d / %3d %.0f%%' % (category, passed, total_run, percent * 100)) logging.info('-------------------------------------------------') logging.info('%d / %d tests run, %d passed, %d failed, %d broken' % ( total - count_by_state.get(TestState.NOT_RUN, 0), total, count_by_state.get(TestState.PASSED, 0), count_by_state.get(TestState.FAILED, 0), count_by_state.get(TestState.BROKEN, 0))) def main(): options = ParseOptions() test_classes = TestRunner.GetTestClasses(TestDefinitions) if len(test_classes) <= 0: print('Failed to find any tests to run') sys.exit(2) if options.list_tests: for test_name in sorted(c.__name__ for c in test_classes): print(test_name) sys.exit(0) SetupLogging(options) logging.info('OLA Responder Tests Version %s' % Version.version) pid_store = PidStore.GetStore(options.pid_location, ('pids.proto', 'draft_pids.proto')) wrapper = ClientWrapper() global uid_ok uid_ok = False def UIDList(state, uids): wrapper.Stop() global uid_ok if not state.Succeeded(): logging.error('Fetch failed: %s' % state.message) return for uid in uids: if uid == options.uid: logging.debug('Found UID %s' % options.uid) uid_ok = True if not uid_ok: logging.error('UID %s not found in universe %d' % (options.uid, options.universe)) return if len(uids) > 1: logging.info( 'The following devices were detected and will be reconfigured') for uid in uids: logging.info(' %s' % uid) if not options.skip_check: logging.info('Continue ? [Y/n]') response = raw_input().strip().lower() uid_ok = response == 'y' or response == '' logging.debug('Fetching UID list from server') wrapper.Client().FetchUIDList(options.universe, UIDList) wrapper.Run() wrapper.Reset() if not uid_ok: sys.exit(1) test_filter = None if options.tests is not None: logging.info('Restricting tests to %s' % options.tests) test_filter = set(options.tests.split(',')) logging.info( 'Starting tests, universe %d, UID %s, broadcast write delay %dms, ' 'inter-test delay %dms' % (options.universe, options.uid, options.broadcast_write_delay, options.inter_test_delay)) runner = TestRunner.TestRunner(options.universe, options.uid, options.broadcast_write_delay, options.inter_test_delay, pid_store, wrapper, options.timestamp) for test_class in test_classes: runner.RegisterTest(test_class) DMXSender(wrapper, options.universe, options.dmx_frame_rate, options.slot_count) tests, device = runner.RunTests(test_filter, options.no_factory_defaults) DisplaySummary(options, runner, tests, device) if __name__ == '__main__': main() ola-0.10.9/tools/rdm/rdm_test_server.py0000775000175000017500000010225514376533110015015 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # rdm_test_server.py # Copyright (C) 2012 Ravindra Nath Kakarla & Simon Newton from __future__ import print_function import json import logging import mimetypes import os import pprint import re import stat import sys import textwrap import traceback from datetime import datetime from optparse import OptionParser from threading import Condition, Event, Lock, Thread from time import time from wsgiref.simple_server import make_server from ola.ClientWrapper import ClientWrapper, SelectServer from ola.OlaClient import OlaClient, OLADNotRunningException from ola.testing.rdm import (DataLocation, TestDefinitions, TestLogger, TestRunner) from ola.testing.rdm.DMXSender import DMXSender from ola.testing.rdm.ModelCollector import ModelCollector from ola.testing.rdm.TestState import TestState from ola.UID import UID from ola import PidStore try: import urllib.parse as urlparse except ImportError: import urlparse try: from html import escape except ImportError: from cgi import escape __author__ = 'ravindhranath@gmail.com (Ravindra Nath Kakarla)' settings = { 'PORT': 9099, } class Error(Exception): """Base exception class.""" class ServerException(Error): """Indicates a problem handling the request.""" class OLAFuture(object): def __init__(self): self._event = Event() self._data = None def set(self, data): self._data = data self._event.set() def wait(self): self._event.wait() def result(self): return self._data class OLAThread(Thread): """The thread which runs the OLA Client.""" def __init__(self, ola_client): super(OLAThread, self).__init__() self._client = ola_client self._ss = None # Created in run() def run(self): self._ss = SelectServer() self._ss.AddReadDescriptor(self._client.GetSocket(), self._client.SocketReady) self._ss.Run() logging.info('OLA thread finished') def Stop(self): if self._ss is None: logging.critical('OLAThread.Stop() called before thread was running') return logging.info('Stopping OLA thread') self._ss.Terminate() def Execute(self, cb): self._ss.Execute(cb) def FetchUniverses(self): return self.MakeSyncClientCall(self._client.FetchUniverses) def FetchUIDList(self, *args): return self.MakeSyncClientCall(self._client.FetchUIDList, *args) def RunRDMDiscovery(self, *args): return self.MakeSyncClientCall(self._client.RunRDMDiscovery, *args) def MakeSyncClientCall(self, method, *method_args): """Turns an async call into a sync (blocking one). Args: wrapper: the ClientWrapper object method: the method to call *method_args: Any arguments to pass to the method Returns: The arguments that would have been passed to the callback function. """ future = OLAFuture() def Callback(*args, **kwargs): future.set(args) def RunMethod(): method(*method_args, callback=Callback) self._ss.Execute(RunMethod) future.wait() return future.result() class RDMTestThread(Thread): """The RDMResponder tests are closely coupled to the Wrapper (yuck!). So we need to run this all in a separate thread. This is all a bit of a hack and you'll get into trouble if multiple things are running at once... """ RUNNING, COMPLETED, ERROR = range(3) TESTS, COLLECTOR = range(2) def __init__(self, pid_store, logs_directory): super(RDMTestThread, self).__init__() self._pid_store = pid_store self._logs_directory = logs_directory self._terminate = False self._request = None # Guards _terminate and _request self._cv = Condition() self._wrapper = None self._test_state_lock = Lock() # Guards _test_state self._test_state = {} def Stop(self): self._cv.acquire() self._terminate = True self._cv.notify() self._cv.release() def ScheduleTests(self, universe, uid, test_filter, broadcast_write_delay, inter_test_delay, dmx_frame_rate, slot_count): """Schedule the tests to be run. Callable from any thread. Callbable by any thread. Returns: An error message, or None if the tests were scheduled. """ if not self._CheckIfConnected(): return 'Lost connection to OLAD' self._cv.acquire() if self._request is not None: self._cv.release() return 'Existing request pending' self._request = lambda: self._RunTests(universe, uid, test_filter, broadcast_write_delay, inter_test_delay, dmx_frame_rate, slot_count) self._cv.notify() self._cv.release() return None def ScheduleCollector(self, universe, skip_queued_messages): """Schedule the collector to run on a universe. Callable by any thread. Returns: An error message, or None if the collection was scheduled. """ if not self._CheckIfConnected(): return 'Lost connection to OLAD' self._cv.acquire() if self._request is not None: self._cv.release() return 'Existing request pending' self._request = lambda: self._RunCollector(universe, skip_queued_messages) self._cv.notify() self._cv.release() return None def Stat(self): """Check the state of the tests. Callable by any thread. Returns: The status of the tests. """ self._test_state_lock.acquire() state = dict(self._test_state) self._test_state_lock.release() return state def run(self): self._wrapper = ClientWrapper() self._collector = ModelCollector(self._wrapper, self._pid_store) while True: self._cv.acquire() if self._terminate: logging.info('quitting test thread') self._cv.release() return if self._request is not None: request = self._request self._request = None self._cv.release() request() continue # Nothing to do, go into the wait self._cv.wait() self._cv.release() def _UpdateStats(self, tests_completed, total_tests): self._test_state_lock.acquire() self._test_state['tests_completed'] = tests_completed self._test_state['total_tests'] = total_tests self._test_state_lock.release() def _RunTests(self, universe, uid, test_filter, broadcast_write_delay, inter_test_delay, dmx_frame_rate, slot_count): self._test_state_lock.acquire() self._test_state = { 'action': self.TESTS, 'tests_completed': 0, 'total_tests': None, 'state': self.RUNNING, 'duration': 0, } start_time = datetime.now() self._test_state_lock.release() runner = TestRunner.TestRunner(universe, uid, broadcast_write_delay, inter_test_delay, self._pid_store, self._wrapper) for test in TestRunner.GetTestClasses(TestDefinitions): runner.RegisterTest(test) dmx_sender = None if dmx_frame_rate > 0 and slot_count > 0: logging.info('Starting DMXSender with slot count %d and FPS of %d' % (slot_count, dmx_frame_rate)) dmx_sender = DMXSender(self._wrapper, universe, dmx_frame_rate, slot_count) try: tests, device = runner.RunTests(test_filter, False, self._UpdateStats) except Exception as e: self._test_state_lock.acquire() self._test_state['state'] = self.ERROR self._test_state['exception'] = str(e) self._test_state['traceback'] = traceback.format_exc() self._test_state_lock.release() return finally: if dmx_sender is not None: dmx_sender.Stop() timestamp = int(time()) end_time = datetime.now() test_parameters = { 'broadcast_write_delay': broadcast_write_delay, 'inter_test_delay': inter_test_delay, 'dmx_frame_rate': dmx_frame_rate, 'dmx_slot_count': slot_count, } log_saver = TestLogger.TestLogger(self._logs_directory) logs_saved = True try: log_saver.SaveLog(uid, timestamp, end_time, tests, device, test_parameters) except TestLogger.TestLoggerException: logs_saved = False self._test_state_lock.acquire() # We can't use total_seconds() since it requires Python 2.7 time_delta = end_time - start_time self._test_state['duration'] = ( time_delta.seconds + time_delta.days * 24 * 3600) self._test_state['state'] = self.COMPLETED self._test_state['tests'] = tests self._test_state['logs_saved'] = logs_saved self._test_state['timestamp'] = timestamp self._test_state['uid'] = uid self._test_state_lock.release() def _RunCollector(self, universe, skip_queued_messages): """Run the device model collector for a universe.""" logging.info('Collecting for %d' % universe) self._test_state_lock.acquire() self._test_state = { 'action': self.COLLECTOR, 'state': self.RUNNING, } self._test_state_lock.release() try: output = self._collector.Run(universe, skip_queued_messages) except Exception as e: self._test_state_lock.acquire() self._test_state['state'] = self.ERROR self._test_state['exception'] = str(e) self._test_state['traceback'] = traceback.format_exc() self._test_state_lock.release() return self._test_state_lock.acquire() self._test_state['state'] = self.COMPLETED self._test_state['output'] = output self._test_state_lock.release() def _CheckIfConnected(self): """Check if the client is connected to olad. Returns: True if connected, False otherwise. """ # TODO(simon): add this check, remember it needs locking. return True class HTTPRequest(object): """Represents a HTTP Request.""" def __init__(self, environ): self._environ = environ self._params = None self._post_params = None def Path(self): """Return the path for the request.""" return self._environ['PATH_INFO'] def GetParam(self, param, default=None): """This only returns the first value for each param. Args: param: the name of the url parameter. default: the value to return if the parameter wasn't supplied. Returns: The value of the url param, or None if it wasn't present. """ if self._params is None: self._params = {} get_params = urlparse.parse_qs(self._environ['QUERY_STRING']) for p in get_params: self._params[p] = get_params[p][0] return self._params.get(param, default) def PostParam(self, param, default=None): """Lookup the value of a POST parameter. Args: param: the name of the post parameter. default: the value to return if the parameter wasn't supplied. Returns: The value of the post param, or None if it wasn't present. """ if self._post_params is None: self._post_params = {} try: request_body_size = int(self._environ.get('CONTENT_LENGTH', 0)) except (ValueError): request_body_size = 0 request_body = self._environ['wsgi.input'].read(request_body_size) post_params = urlparse.parse_qs(request_body) for p in post_params: # In Python 3, the param name and value is a bytestring not a string, # so convert it for backwards compatibility and sanity self._post_params[p.decode('utf-8')] = ( post_params[p][0].decode('utf-8')) return self._post_params.get(param, default) class HTTPResponse(object): """Represents a HTTP Response.""" OK = '200 OK' ERROR = '500 Error' DENIED = '403 Denied' NOT_FOUND = '404 Not Found' PERMANENT_REDIRECT = '301 Moved Permanently' def __init__(self): self._status = None self._headers = {} self._content_type = None self._data = [] def SetStatus(self, status): self._status = status def GetStatus(self): return self._status def SetHeader(self, header, value): self._headers[header] = value def GetHeaders(self): headers = [] for header, value in self._headers.items(): headers.append((header, value)) return headers def AppendData(self, data): self._data.append(data) def Data(self): return self._data class RequestHandler(object): """The base request handler class.""" def HandleRequest(self, request, response): pass class RedirectHandler(RequestHandler): """Serve a 301 redirect.""" def __init__(self, new_location): self._new_location = new_location def HandleRequest(self, request, response): response.SetStatus(HTTPResponse.PERMANENT_REDIRECT) response.SetHeader('Location', self._new_location) class StaticFileHandler(RequestHandler): """A class which handles requests for static files.""" PREFIX = '/static/' def __init__(self, static_dir): self._static_dir = static_dir def HandleRequest(self, request, response): path = request.Path() if not path.startswith(self.PREFIX): response.SetStatus(HTTPResponse.NOT_FOUND) return # Strip off /static path = path[len(self.PREFIX):] # This is important as it ensures we can't access arbitrary files filename = os.path.abspath(os.path.join(self._static_dir, path)) if (not filename.startswith(self._static_dir) or not os.path.exists(filename) or not os.path.isfile(filename)): response.SetStatus(HTTPResponse.NOT_FOUND) return elif not os.access(filename, os.R_OK): response.SetStatus(HTTPResponse.DENIED) return else: mimetype, encoding = mimetypes.guess_type(filename) if mimetype: response.SetHeader('Content-type', mimetype) if encoding: response.SetHeader('Content-encoding', encoding) stats = os.stat(filename) response.SetStatus(HTTPResponse.OK) response.SetHeader('Content-length', str(stats.st_size)) response.AppendData(open(filename, 'rb').read()) class JsonRequestHandler(RequestHandler): """A class which handles JSON requests.""" def HandleRequest(self, request, response): response.SetHeader('Cache-Control', 'no-cache') response.SetHeader('Content-type', 'application/json') try: json_data = self.GetJson(request, response) response.AppendData(json.dumps(json_data, sort_keys=True).encode()) except ServerException as e: # For JSON requests, rather than returning 500s we return the error as # JSON response.SetStatus(HTTPResponse.OK) json_data = { 'status': False, 'error': str(e), } response.AppendData(json.dumps(json_data, sort_keys=True).encode()) def RaiseExceptionIfMissing(self, request, param): """Helper method to raise an exception if the param is missing.""" value = request.GetParam(param) if value is None: raise ServerException('Missing parameter: %s' % param) return value def GetJson(self, request, response): """Subclasses implement this.""" pass class OLAServerRequestHandler(JsonRequestHandler): """Catches OLADNotRunningException and handles them gracefully.""" def __init__(self, ola_thread): self._thread = ola_thread def GetThread(self): return self._thread def HandleRequest(self, request, response): try: super(OLAServerRequestHandler, self).HandleRequest(request, response) except OLADNotRunningException: response.SetStatus(HTTPResponse.OK) json_data = { 'status': False, 'error': 'The OLA Server instance is no longer running', } response.AppendData(json.dumps(json_data, sort_keys=True).encode()) class TestDefinitionsHandler(JsonRequestHandler): """Return a JSON list of test definitions.""" def GetJson(self, request, response): response.SetStatus(HTTPResponse.OK) tests = [t.__name__ for t in TestRunner.GetTestClasses(TestDefinitions)] return { 'test_defs': tests, 'status': True, } class GetUniversesHandler(OLAServerRequestHandler): """Return a JSON list of universes.""" def GetJson(self, request, response): def UniverseToJson(u): return { '_id': u.id, '_name': u.name, '_merge_mode': u.merge_mode, } status, universes = self.GetThread().FetchUniverses() if not status.Succeeded(): raise ServerException('Failed to fetch universes from server') response.SetStatus(HTTPResponse.OK) return { 'universes': [UniverseToJson(u) for u in universes], 'status': True, } class GetDevicesHandler(OLAServerRequestHandler): """Return a JSON list of RDM devices.""" def GetJson(self, request, response): universe_param = request.GetParam('u') if universe_param is None: raise ServerException('Missing universe parameter: u') try: universe = int(universe_param) except ValueError: raise ServerException('Invalid universe parameter: u') status, uids = self.GetThread().FetchUIDList(universe) if not status.Succeeded(): raise ServerException('Invalid universe ID!') response.SetStatus(HTTPResponse.OK) return { 'uids': [str(u) for u in uids], 'status': True, } class RunDiscoveryHandler(OLAServerRequestHandler): """Runs the RDM Discovery process.""" def GetJson(self, request, response): universe_param = request.GetParam('u') if universe_param is None: raise ServerException('Missing universe parameter: u') try: universe = int(universe_param) except ValueError: raise ServerException('Invalid universe parameter: u') status, uids = self.GetThread().RunRDMDiscovery(universe, True) if not status.Succeeded(): raise ServerException('Invalid universe ID!') response.SetStatus(HTTPResponse.OK) return { 'uids': [str(u) for u in uids], 'status': True, } class DownloadModelDataHandler(RequestHandler): """Take the data in the form and return it as a downloadable file.""" def HandleRequest(self, request, response): model_data = request.PostParam('model_data') or '' logging.info(model_data) filename = 'model-data.%s.txt' % int(time()) response.SetStatus(HTTPResponse.OK) response.SetHeader('Content-disposition', 'attachment; filename="%s"' % filename) response.SetHeader('Content-type', 'text/plain') response.SetHeader('Content-length', '%d' % len(model_data)) response.AppendData(model_data.encode()) class DownloadResultsHandler(RequestHandler): """A class which handles requests to download test results.""" def HandleRequest(self, request, response): uid_param = request.GetParam('uid') or '' uid = UID.FromString(uid_param) if uid is None: raise ServerException('Missing uid parameter: uid') timestamp = request.GetParam('timestamp') if timestamp is None: raise ServerException('Missing timestamp parameter: timestamp') include_debug = request.GetParam('debug') include_description = request.GetParam('description') category = request.GetParam('category') test_state = request.GetParam('state') reader = TestLogger.TestLogger(settings['log_directory']) try: output = reader.ReadAndFormat(uid, timestamp, category, test_state, include_debug, include_description) except TestLogger.TestLoggerException as e: raise ServerException(e) filename = ('%04x-%08x.%s.txt' % (uid.manufacturer_id, uid.device_id, timestamp)) response.SetStatus(HTTPResponse.OK) response.SetHeader('Content-disposition', 'attachment; filename="%s"' % filename) response.SetHeader('Content-type', 'text/plain') response.SetHeader('Content-length', '%d' % len(output)) response.AppendData(output.encode()) class RunTestsHandler(OLAServerRequestHandler): """Run the RDM tests.""" def __init__(self, ola_thread, test_thread): super(RunTestsHandler, self).__init__(ola_thread) self._test_thread = test_thread def GetJson(self, request, response): """Check if this is a RunTests or StatTests request.""" path = request.Path() if path == '/RunTests': return self.RunTests(request, response) if path == '/RunCollector': return self.RunCollector(request, response) elif path == '/StatTests': return self.StatTests(request, response) elif path == '/StatCollector': return self.StatCollector(request, response) else: logging.error('Got invalid request for %s' % path) raise ServerException('Invalid request') def StatTests(self, request, response): """Return the status of the running tests.""" response.SetStatus(HTTPResponse.OK) status = self._test_thread.Stat() if status is None: return {} json_data = {'status': True} if status['state'] == RDMTestThread.COMPLETED: json_data['UID'] = str(status['uid']) json_data['duration'] = status['duration'] json_data['completed'] = True json_data['logs_disabled'] = not status['logs_saved'] json_data['timestamp'] = status['timestamp'], self._FormatTestResults(status['tests'], json_data) elif status['state'] == RDMTestThread.ERROR: json_data['completed'] = True json_data['exception'] = status['exception'] json_data['traceback'] = status.get('traceback', '') else: json_data['completed'] = False json_data['tests_completed'] = status['tests_completed'] json_data['total_tests'] = status['total_tests'] return json_data def StatCollector(self, request, response): """Return the status of the running collector process.""" response.SetStatus(HTTPResponse.OK) status = self._test_thread.Stat() if status is None: return {} json_data = {'status': True} if status['state'] == RDMTestThread.COMPLETED: json_data['completed'] = True json_data['output'] = pprint.pformat(status['output']) elif status['state'] == RDMTestThread.ERROR: json_data['completed'] = True json_data['exception'] = status['exception'] json_data['traceback'] = status.get('traceback', '') else: json_data['completed'] = False return json_data def RunCollector(self, request, response): """Handle a /RunCollector request.""" universe = self._CheckValidUniverse(request) skip_queued = request.GetParam('skip_queued') if skip_queued is None or skip_queued.lower() == 'false': skip_queued = False else: skip_queued = True ret = self._test_thread.ScheduleCollector(universe, skip_queued) if ret is not None: raise ServerException(ret) response.SetStatus(HTTPResponse.OK) return {'status': True} def RunTests(self, request, response): """Handle a /RunTests request.""" universe = self._CheckValidUniverse(request) uid_param = self.RaiseExceptionIfMissing(request, 'uid') uid = UID.FromString(uid_param) if uid is None: raise ServerException('Invalid uid: %s' % uid_param) # The tests to run, None means all test_filter = request.GetParam('t') if test_filter is not None: if test_filter == 'all': test_filter = None else: test_filter = set(test_filter.split(',')) broadcast_write_delay = request.GetParam('broadcast_write_delay') if broadcast_write_delay is None: broadcast_write_delay = 0 try: broadcast_write_delay = int(broadcast_write_delay) except ValueError: raise ServerException('Invalid broadcast write delay') inter_test_delay = request.GetParam('inter_test_delay') if inter_test_delay is None: inter_test_delay = 0 try: inter_test_delay = int(inter_test_delay) except ValueError: raise ServerException('Invalid inter-test delay') slot_count = request.GetParam('slot_count') if slot_count is None: slot_count = 0 try: slot_count = int(slot_count) except ValueError: raise ServerException('Invalid slot count') if slot_count not in range(0, 513): raise ServerException('Slot count not in range 0..512') dmx_frame_rate = request.GetParam('dmx_frame_rate') if dmx_frame_rate is None: dmx_frame_rate = 0 try: dmx_frame_rate = int(dmx_frame_rate) except ValueError: raise ServerException('Invalid DMX frame rate') ret = self._test_thread.ScheduleTests(universe, uid, test_filter, broadcast_write_delay, inter_test_delay, dmx_frame_rate, slot_count) if ret is not None: raise ServerException(ret) response.SetStatus(HTTPResponse.OK) return {'status': True} def _CheckValidUniverse(self, request): """Check that the universe parameter is present and refers to a valid universe. Args: request: the HTTPRequest object. Returns: The santitized universe id. Raises: ServerException if the universe isn't valid or doesn't exist. """ universe_param = self.RaiseExceptionIfMissing(request, 'u') try: universe = int(universe_param) except ValueError: raise ServerException('Invalid universe parameter: u') status, universes = self.GetThread().FetchUniverses() if not status.Succeeded(): raise ServerException('Failed to fetch universes from server') if universe not in [u.id for u in universes]: raise ServerException("Universe %d doesn't exist" % universe) return universe def _FormatTestResults(self, tests, json_data): results = [] stats_by_catg = {} passed = 0 failed = 0 broken = 0 not_run = 0 for test in tests: state = test.state.__str__() category = test.category.__str__() stats_by_catg.setdefault(category, {'passed': 0, 'total': 0}) if test.state == TestState.PASSED: passed += 1 stats_by_catg[category]['passed'] += 1 stats_by_catg[category]['total'] += 1 elif test.state == TestState.FAILED: failed += 1 stats_by_catg[category]['total'] += 1 elif test.state == TestState.BROKEN: broken += 1 stats_by_catg[category]['total'] += 1 elif test.state == TestState.NOT_RUN: not_run += 1 results.append({ 'definition': test.__str__(), 'state': state, 'category': category, # TODO(Peter): Check if we actually want this to be false or not! # I think the JSON dump stuff handles it so it doesn't matter either # way. 'warnings': [escape(w, False) for w in test.warnings], 'advisories': [escape(a, False) for a in test.advisories], 'debug': [escape(d, False) for d in test._debug], 'doc': escape(test.__doc__, False), } ) stats = { 'total': len(tests), 'passed': passed, 'failed': failed, 'broken': broken, 'not_run': not_run, } json_data.update({ 'test_results': results, 'stats': stats, 'stats_by_catg': stats_by_catg, }) class Application(object): """Creates a new Application.""" def __init__(self): # dict of path to handler self._handlers = {} self._regex_handlers = [] def RegisterHandler(self, path, handler): self._handlers[path] = handler def RegisterRegex(self, path_regex, handler): self._regex_handlers.append((path_regex, handler)) def HandleRequest(self, environ, start_response): """Create a new TestServerApplication, passing in the OLA Wrapper.""" request = HTTPRequest(environ) response = HTTPResponse() self.DispatchRequest(request, response) start_response(response.GetStatus(), response.GetHeaders()) return response.Data() def DispatchRequest(self, request, response): path = request.Path() if path in self._handlers: self._handlers[path](request, response) return else: for pattern, handler in self._regex_handlers: if re.match(pattern, path): handler(request, response) return response.SetStatus(HTTPResponse.NOT_FOUND) def BuildApplication(ola_thread, test_thread): """Construct the application and add the handlers.""" app = Application() app.RegisterHandler('/', RedirectHandler('/static/rdmtests.html').HandleRequest) app.RegisterHandler( '/favicon.ico', RedirectHandler('/static/images/favicon.ico').HandleRequest) app.RegisterHandler('/GetTestDefs', TestDefinitionsHandler().HandleRequest) app.RegisterHandler('/GetUnivInfo', GetUniversesHandler(ola_thread).HandleRequest) app.RegisterHandler('/GetDevices', GetDevicesHandler(ola_thread).HandleRequest) app.RegisterHandler('/RunDiscovery', RunDiscoveryHandler(ola_thread).HandleRequest) app.RegisterHandler('/DownloadResults', DownloadResultsHandler().HandleRequest) app.RegisterHandler('/DownloadModelData', DownloadModelDataHandler().HandleRequest) run_tests_handler = RunTestsHandler(ola_thread, test_thread) app.RegisterHandler('/RunCollector', run_tests_handler.HandleRequest) app.RegisterHandler('/RunTests', run_tests_handler.HandleRequest) app.RegisterHandler('/StatCollector', run_tests_handler.HandleRequest) app.RegisterHandler('/StatTests', run_tests_handler.HandleRequest) app.RegisterRegex(r'/static/.*', StaticFileHandler(settings['www_dir']).HandleRequest) return app def parse_options(): """Parse Command Line options""" usage = 'Usage: %prog [options]' description = textwrap.dedent("""\ Starts the TestServer (A simple Web Server) which run a series of tests on a RDM responder and displays the results in a Web UI. This requires the OLA server to be running, and the RDM device to have been detected. You can confirm this by running ola_rdm_discover -u UNIVERSE. This will send SET commands to the broadcast UIDs which means the start address, device label etc. will be changed for all devices connected to the responder. Think twice about running this on your production lighting rig. """) parser = OptionParser(usage, description=description) parser.add_option('-p', '--pid-location', metavar='DIR', help='The directory to load the PID definitions from.') parser.add_option('-d', '--www-dir', default=DataLocation.location, help='The root directory to serve static files, this must ' 'be absolute.') parser.add_option('-l', '--log-directory', default=os.path.abspath('/tmp/ola-rdm-logs'), help='The directory to store log files.') parser.add_option('--world-writeable', action="store_true", help='Make the log directory world writeable.') options, args = parser.parse_args() return options def SetupLogDirectory(options): """Setup the log dir.""" # Setup the log dir, or display an error log_directory = options.log_directory if not os.path.exists(log_directory): try: os.makedirs(log_directory) if options.world_writeable: stat_result = os.stat(log_directory) os.chmod(log_directory, stat_result.st_mode | stat.S_IWOTH) except OSError: logging.error( 'Failed to create %s for RDM logs. Logging will be disabled.' % options.log_directory) elif not os.path.isdir(options.log_directory): logging.error('Log directory invalid: %s. Logging will be disabled.' % options.log_directory) elif not os.access(options.log_directory, os.W_OK): logging.error( 'Unable to write to log directory: %s. Logging will be disabled.' % options.log_directory) def main(): options = parse_options() settings.update(options.__dict__) pid_store = PidStore.GetStore(options.pid_location, ('pids.proto', 'draft_pids.proto')) logging.basicConfig(level=logging.INFO, format='%(message)s') SetupLogDirectory(options) # Check olad status logging.info('Checking olad status') try: ola_client = OlaClient() except OLADNotRunningException: logging.error('Error creating connection with olad. Is it running?') sys.exit(127) ola_thread = OLAThread(ola_client) ola_thread.start() test_thread = RDMTestThread(pid_store, settings['log_directory']) test_thread.start() app = BuildApplication(ola_thread, test_thread) httpd = make_server('', settings['PORT'], app.HandleRequest) logging.info('Running RDM Tests Server on http://%s:%s' % ('127.0.0.1', httpd.server_port)) try: httpd.serve_forever() except KeyboardInterrupt: pass ola_thread.Stop() test_thread.Stop() ola_thread.join() test_thread.join() if __name__ == '__main__': main() ola-0.10.9/tools/rdm/setup_patch.py0000775000175000017500000001164614376533110014130 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # setup_patch.py # Copyright (C) 2012 Simon Newton from __future__ import print_function import logging from ola.ClientWrapper import ClientWrapper from ola.OlaClient import OlaClient, Plugin """A simple script to find all RDM enabled ports and auto-patch them to universes. """ __author__ = 'nomis52@gmail.com (Simon Newton)' class AutoPatcher(object): """A class that patches RDM enabled Output Ports to universes.""" def __init__(self, wrapper, callback, force=False): """Create a new AutoPatcher object. Args: wrapper: an ola.ClientWrapper object. callback: The function to be called when patching is complete (or an error occurs. The callback is passed three arguments: (status, ports_found, ports_patched) force: override the patching for ports which are already patched """ self._wrapper = wrapper # start from 1 to avoid confusion self._next_universe = 1 self._callback = callback self._ports_found = 0 self._ports_patched = 0 self._port_attempts = 0 self._force = force def Patch(self): client = self._wrapper.Client() client.FetchDevices(self._DeviceList) def _DeviceList(self, status, devices): if not status.Succeeded(): self._callback(False, self._ports_found, self._ports_patched) for device in sorted(devices): if device.plugin_id == Plugin.OLA_PLUGIN_ARTNET: # skip over artnet devices continue for port in device.output_ports: if port.active and not self._force: # don't mess with existing ports continue if port.supports_rdm: self.PatchPort(device, port, self._next_universe) self._next_universe += 1 self._ports_found += 1 if self._ports_found == 0: self._callback(True, self._ports_found, self._ports_patched) def PatchPort(self, device, port, universe): client = self._wrapper.Client() logging.info('Patching %d:%d:output to %d' % (device.alias, port.id, universe)) universe_name = [device.name] if port.description: universe_name.append(port.description) universe_name = ': '.join(universe_name) client.PatchPort(device.alias, port.id, True, OlaClient.PATCH, universe, lambda s: self._PatchComplete(universe, universe_name, s)) def _PatchComplete(self, universe, universe_name, status): """Called when the patch is complete.""" if status.Succeeded(): self._ports_patched += 1 self._wrapper.Client().SetUniverseName(universe, universe_name, self._UniverseNameComplete) else: self._IncrementPortAttempts() def _UniverseNameComplete(self, status): self._IncrementPortAttempts() def _IncrementPortAttempts(self): """This increments the port attempt counter, and exits if we have no ports left to patch. """ self._port_attempts += 1 if self._port_attempts == self._ports_found: self._callback(True, self._ports_found, self._ports_patched) class PatchResults(object): """This just stores the results of an auto-patch attempt.""" def __init__(self): self.status = False self.ports_found = 0 self.ports_patched = 0 def PatchPorts(wrapper=None): """Perform the patch and return the results when complete.""" patch_results = PatchResults() if not wrapper: wrapper = ClientWrapper() def PatchingComplete(ok, found, patched): # called when the patching is complete, this stops the wrapper and updates # the status code wrapper.Stop() patch_results.status = ok patch_results.ports_found = found patch_results.ports_patched = patched patcher = AutoPatcher(wrapper, PatchingComplete, True) patcher.Patch() wrapper.Run() return patch_results def main(): logging.basicConfig( level=logging.INFO, format='%(message)s') patch_results = PatchPorts() if patch_results.status: print('Patched %d of %d ports' % (patch_results.ports_patched, patch_results.ports_found)) else: print('Failed to patch') if __name__ == '__main__': main() ola-0.10.9/tools/rdm/ExpectedResults.py0000664000175000017500000003572714376533110014737 00000000000000# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # ExpectedResults.py # Copyright (C) 2011 Simon Newton # # Expected result classes are broken down as follows: # # BaseExpectedResult - the base class # BroadcastResult - expects the request to be broadcast, hence no response # TimeoutResult - expects the response to be a timeout # InvalidResult - expects the response to be invalid # UnsupportedResult - expects RDM Discovery to be unsupported # DUBResult - expects an RDM DUB response # SuccessfulResult - expects a well formed response from the device # NackResult - parent NACK class # NackDiscoveryResult - expects DISCOVERY_COMMAND_RESPONSE with a NACK # NackGetResult - expects GET_COMMAND_RESPONSE with a NACK # NackSetResult - expects SET_COMMAND_RESPONSE with a NACK # AckResult - parent ACK class # AckDiscoveryResult - expects DISCOVERY_COMMAND_RESPONSE with an ACK # AckGetResult - expects GET_COMMAND_RESPONSE with an ACK # AckSetResult - expects SET_COMMAND_RESPONSE with an ACK # QueuedMessageResult - expects an ACK or NACK for any PID other than # QUEUED_MESSAGE from ola.OlaClient import OlaClient from ola.PidStore import RDM_DISCOVERY, RDM_GET, RDM_SET, GetStore COMMAND_CLASS_DICT = { RDM_GET: 'Get', RDM_SET: 'Set', RDM_DISCOVERY: 'Discovery', } def _CommandClassToString(command_class): return COMMAND_CLASS_DICT[command_class] class BaseExpectedResult(object): """The base class for expected results.""" def __init__(self, action=None, warning=None, advisory=None): """Create the base expected result object. Args: action: The action to run if this result matches warning: A warning message to log if this result matches advisory: An advisory message to log if this result matches """ self._action = action self._warning_message = warning self._advisory_message = advisory @property def action(self): return self._action @property def warning(self): return self._warning_message @property def advisory(self): return self._advisory_message def Matches(self, response, unpacked_data): """Check if the response we received matches this object. Args: response: An RDMResponse object unpacked_data: A dict of field name : value mappings that were present in the response. """ raise TypeError('Base method called') class BroadcastResult(BaseExpectedResult): """This checks that the request was broadcast.""" def __str__(self): return 'RDM_WAS_BROADCAST' def Matches(self, response, unpacked_data): return OlaClient.RDM_WAS_BROADCAST == response.response_code class TimeoutResult(BaseExpectedResult): """This checks that the request timed out.""" def __str__(self): return 'RDM_TIMEOUT' def Matches(self, response, unpacked_data): return OlaClient.RDM_TIMEOUT == response.response_code class InvalidResponse(BaseExpectedResult): """This checks that we got an invalid response back.""" def __str__(self): return 'RDM_INVALID_RESPONSE' def Matches(self, response, unpacked_data): return OlaClient.RDM_INVALID_RESPONSE == response.response_code class UnsupportedResult(BaseExpectedResult): """This checks that the request was unsupported.""" def __str__(self): return 'RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED' def Matches(self, response, unpacked_data): return (OlaClient.RDM_PLUGIN_DISCOVERY_NOT_SUPPORTED == response.response_code) class DUBResult(BaseExpectedResult): """Checks that the result was a DUB response.""" def __str__(self): return 'RDM_DUB_RESPONSE' def Matches(self, response, unpacked_data): return OlaClient.RDM_DUB_RESPONSE == response.response_code class SuccessfulResult(BaseExpectedResult): """This checks that we received a valid response from the device. This doesn't check that the response was a certain type, but simply that the message was formed correctly. Other classes inherit from this and perform more specific checking. """ def __str__(self): return 'RDM_COMPLETED_OK' def Matches(self, response, unpacked_data): return response.response_code == OlaClient.RDM_COMPLETED_OK class QueuedMessageResult(SuccessfulResult): """This checks for a valid response to a QUEUED_MESSAGE request.""" def __str__(self): return 'It\'s complicated' def Matches(self, response, unpacked_data): ok = super(QueuedMessageResult, self).Matches(response, unpacked_data) if not ok: return False pid_store = GetStore() queued_message_pid = pid_store.GetName('QUEUED_MESSAGE') return ((response.response_type == OlaClient.RDM_NACK_REASON or response.response_type == OlaClient.RDM_ACK) and response.pid != queued_message_pid.value) class NackResult(SuccessfulResult): """This checks that the device nacked the request.""" def __init__(self, command_class, pid_id, nack_reason, action=None, warning=None, advisory=None): """Create an NackResult object. Args: command_class: RDM_GET or RDM_SET pid_id: The pid id we expect to have been nack'ed nack_reason: The RDMNack object we expect. action: The action to run if this result matches warning: A warning message to log is this result matches advisory: An advisory message to log is this result matches """ super(NackResult, self).__init__(action, warning, advisory) self._command_class = command_class self._pid_id = pid_id self._nack_reason = nack_reason def __str__(self): return ('CC: %s, PID 0x%04hx, NACK %s' % (_CommandClassToString(self._command_class), self._pid_id, self._nack_reason)) def Matches(self, response, unpacked_data): ok = super(NackResult, self).Matches(response, unpacked_data) return (ok and response.response_type == OlaClient.RDM_NACK_REASON and response.command_class == self._command_class and response.pid == self._pid_id and response.nack_reason == self._nack_reason) class NackDiscoveryResult(NackResult): """This checks that the device nacked a Discovery request.""" def __init__(self, pid_id, nack_reason, action=None, warning=None, advisory=None): """Create an expected result object which is a NACK for a Discovery request. Args: pid_id: The pid id we expect to have been nack'ed nack_reason: The RDMNack object we expect. action: The action to run if this result matches warning: A warning message to log is this result matches advisory: An advisory message to log is this result matches """ super(NackDiscoveryResult, self).__init__(RDM_DISCOVERY, pid_id, nack_reason, action, warning, advisory) class NackGetResult(NackResult): """This checks that the device nacked a GET request.""" def __init__(self, pid_id, nack_reason, action=None, warning=None, advisory=None): """Create an expected result object which is a NACK for a GET request. Args: pid_id: The pid id we expect to have been nack'ed nack_reason: The RDMNack object we expect. action: The action to run if this result matches warning: A warning message to log is this result matches advisory: An advisory message to log is this result matches """ super(NackGetResult, self).__init__(RDM_GET, pid_id, nack_reason, action, warning, advisory) class NackSetResult(NackResult): """This checks that the device nacked a SET request.""" def __init__(self, pid_id, nack_reason, action=None, warning=None, advisory=None): """Create an expected result object which is a NACK for a SET request. Args: pid_id: The pid id we expect to have been nack'ed nack_reason: The RDMNack object we expect. action: The action to run if this result matches warning: A warning message to log is this result matches advisory: An advisory message to log is this result matches """ super(NackSetResult, self).__init__(RDM_SET, pid_id, nack_reason, action, warning, advisory) class AckResult(SuccessfulResult): """This checks that the device ack'ed the request.""" def __init__(self, command_class, pid_id, field_names=[], field_values={}, action=None, warning=None, advisory=None): """Create an expected result object that matches an ACK. Args: command_class: RDM_GET or RDM_SET pid_id: The pid id we expect field_names: Check that these fields are present in the response field_values: Check that fields & values are present in the response action: The action to run if this result matches warning: A warning message to log is this result matches advisory: An advisory message to log is this result matches """ super(AckResult, self).__init__(action, warning, advisory) self._command_class = command_class self._pid_id = pid_id self._field_names = field_names self._field_values = field_values def __str__(self): return ('CC: %s, PID 0x%04hx, ACK, fields %s, values %s' % ( _CommandClassToString(self._command_class), self._pid_id, self._field_names, self._field_values)) def Matches(self, response, unpacked_data): ok = super(AckResult, self).Matches(response, unpacked_data) if (not ok or response.response_type != OlaClient.RDM_ACK or response.command_class != self._command_class or response.pid != self._pid_id): return False # unpacked_data may be either a list of dicts, or a dict if isinstance(unpacked_data, list): for item in unpacked_data: field_keys = set(item.keys()) for field in self._field_names: if field not in field_keys: return False else: field_keys = set(unpacked_data.keys()) for field in self._field_names: if field not in field_keys: return False for field, value in self._field_values.items(): if field not in unpacked_data: return False if value != unpacked_data[field]: return False return True class AckDiscoveryResult(AckResult): """This checks that the device ack'ed a DISCOVERY request.""" def __init__(self, pid_id, field_names=[], field_values={}, action=None, warning=None, advisory=None): """Create an expected result object which is an ACK for a DISCOVERY request. Args: pid_id: The pid id we expect field_names: Check that these fields are present in the response field_values: Check that fields & values are present in the response action: The action to run if this result matches warning: A warning message to log is this result matches advisory: An advisory message to log is this result matches """ super(AckDiscoveryResult, self).__init__(RDM_DISCOVERY, pid_id, field_names, field_values, action, warning, advisory) class AckGetResult(AckResult): """This checks that the device ack'ed a GET request.""" def __init__(self, pid_id, field_names=[], field_values={}, action=None, warning=None, advisory=None): """Create an expected result object which is an ACK for a GET request. Args: pid_id: The pid id we expect field_names: Check that these fields are present in the response field_values: Check that fields & values are present in the response action: The action to run if this result matches warning: A warning message to log is this result matches advisory: An advisory message to log is this result matches """ super(AckGetResult, self).__init__(RDM_GET, pid_id, field_names, field_values, action, warning, advisory) class AckSetResult(AckResult): """This checks that the device ack'ed a SET request.""" def __init__(self, pid_id, field_names=[], field_values={}, action=None, warning=None, advisory=None): """Create an expected result object which is an ACK for a SET request. Args: pid_id: The pid id we expect field_names: Check that these fields are present in the response field_values: Check that fields & values are present in the response action: The action to run if this result matches warning: A warning message to log is this result matches advisory: An advisory message to log is this result matches """ super(AckSetResult, self).__init__(RDM_SET, pid_id, field_names, field_values, action, warning, advisory) ola-0.10.9/tools/rdm/TestHelpers.py0000664000175000017500000000247014376533110014043 00000000000000# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # TestHelpers.py # Copyright (C) 2013 Peter Newman import sys from ola.StringUtils import StringEscape if sys.version_info >= (3, 0): try: unicode except NameError: unicode = str __author__ = 'nomis52@gmail.com (Simon Newton)' def ContainsUnprintable(s): """Check if a string s contain unprintable characters.""" # TODO(Peter): How does this interact with the E1.20 Unicode flag? if type(s) == str or type(s) == unicode: # All strings in Python 3 are unicode, Python 2 ones might not be return s != StringEscape(s) else: raise TypeError('Only strings are supported not %s' % type(s)) ola-0.10.9/tools/rdm/launch_tests.py0000775000175000017500000000677414376533110014313 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # launch_tests.py # Copyright (C) 2012 Simon Newton from __future__ import print_function import logging import os import shutil import signal import subprocess import sys import tempfile import textwrap import time from optparse import OptionParser import setup_patch # The Port Autopatcher """ Launch the OLA RDM test environment. Under the hood this does the following: - creates a new temp directory for the configs - copies in the skeleton configs files from the skel directory - starts olad pointing at the config directory - runs the auto-patching script to setup the port / universe patchings """ __author__ = 'nomis52@gmail.com (Simon Newton)' olad_process = None def ParseOptions(): usage = 'Usage: %prog [options] ' description = textwrap.dedent("""\ This starts the OLA RDM testing environment. """) parser = OptionParser(usage, description=description) parser.add_option('--skel', default='skel_config', type='string', help='The path to the skeleton config directory.') parser.add_option('--olad-log-level', default='2', type='int', help='The log level for olad.') options, args = parser.parse_args() return options def SigINTHandler(signal, frame): global olad_process if olad_process: olad_process.terminate() def main(): options = ParseOptions() logging.basicConfig( level=logging.INFO, format='%(message)s') # create temp dir config_dir = tempfile.mkdtemp() if not os.access(config_dir, os.W_OK): print('%s is not writable' % config_dir) sys.exit() # copy the skeleton configs files over, no symlinks since we don't want to # change the originals when olad writes settings. skel_config = options.skel if not os.path.isdir(skel_config): print('%s is not a directory' % skel_config) sys.exit() for file_name in os.listdir(skel_config): shutil.copy(os.path.join(skel_config, file_name), config_dir) # ok, time to start olad, first install the signal handler signal.signal(signal.SIGINT, SigINTHandler) args = ['olad', '--config-dir', config_dir, '--log-level', '%d' % options.olad_log_level] global olad_process olad_process = subprocess.Popen(args, stdin=subprocess.PIPE) # there isn't a decent wait to wait until olad is running, instead we sleep # for a bit and then call poll time.sleep(1) if olad_process.poll(): # ola exited logging.error('OLA exited with return code %d' % olad_process.returncode) sys.exit() # now patch the ports patch_results = setup_patch.PatchPorts() if not patch_results.status: logging.error('Failed to patch ports, check the olad logs') # wait for the signal, or olad to exit olad_process.wait() if __name__ == '__main__': main() ola-0.10.9/tools/rdm/skel_config/0000775000175000017500000000000014376533272013600 500000000000000ola-0.10.9/tools/rdm/skel_config/ola-usbserial.conf0000664000175000017500000000023614376533110017121 00000000000000device_dir = /dev device_prefix = ttyUSB device_prefix = cu.usbserial- dmx_tri_fps_limit = 40 pro_fps_limit = 190 tri_use_raw_rdm = true ultra_fps_limit = 40 ola-0.10.9/tools/rdm/TestStateTest.py0000664000175000017500000000300314376533110014352 00000000000000#!/usr/bin/env python # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # TestStateTest.py # Copyright (C) 2019 Bruce Lowekamp import unittest from ola.TestUtils import allHashNotEqual, allNotEqual # Keep this import relative to simplify the testing from TestState import TestState """Test cases for sorting TestState.""" __author__ = 'bruce@lowekamp.net (Bruce Lowekamp)' class TestStateCmpTest(unittest.TestCase): def testCmp(self): self.assertEqual(TestState.PASSED, TestState.PASSED) states = sorted([TestState.PASSED, TestState.FAILED, TestState.BROKEN, TestState.NOT_RUN]) self.assertEqual(states, [TestState.BROKEN, TestState.FAILED, TestState.NOT_RUN, TestState.PASSED]) allNotEqual(self, states) allHashNotEqual(self, states) if __name__ == '__main__': unittest.main() ola-0.10.9/tools/rdm/TestRunner.py0000664000175000017500000003546114376533110013720 00000000000000# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # TestRunner.py # Copyright (C) 2011 Simon Newton import datetime import inspect import logging import time from ola.OlaClient import OlaClient, RDMNack from ola.RDMAPI import RDMAPI from ola.testing.rdm.ResponderTest import (OptionalParameterTestFixture, ResponderTestFixture, TestFixture) from ola.testing.rdm.TimingStats import TimingStats from ola import PidStore __author__ = 'nomis52@gmail.com (Simon Newton)' class Error(Exception): """The base error class.""" class DuplicatePropertyException(Error): """Raised if a property is declared in more than one test.""" class MissingPropertyException(Error): """Raised if a property was listed in a REQUIRES list but it didn't appear in any PROVIDES list. """ class CircularDependencyException(Error): """Raised if there is a circular dependency created by PROVIDES & REQUIRES statements. """ class DeviceProperties(object): """Encapsulates the properties of a device.""" def __init__(self, property_names): object.__setattr__(self, '_property_names', property_names) object.__setattr__(self, '_properties', {}) def __str__(self): return str(self._properties) def __repr__(self): return self._properties def __getattr__(self, property): if property not in self._properties: raise AttributeError(property) return self._properties[property] def __setattr__(self, property, value): if property in self._properties: logging.warning('Multiple sets of property %s' % property) self._properties[property] = value def AsDict(self): return dict(self._properties) class QueuedMessageFetcher(object): """This class sends Get QUEUED_MESSAGE until all Ack Timers have expired and we get an empty status message or a NACK NR_UNKNOWN_PID. QUEUED_MESSAGEs can be triggered a number of ways: i) A inline proxy, which responds with ACK_TIMERs to satisfy timing requirements. ii) A change of state on the responder, i.e. changing the DMX address on the front panel. iii) A delayed response to a SET command. This can be triggered by delays writing to persistent storage. It's actually reasonably hard to tell these apart because you can't tell if ACK_TIMERS are generated by the responder or intermeditate proxies. In a perfect world, devices themselves wouldn't respond with ACK_TIMER to a Get QUEUED_MESSAGE and we could use that to 'discover' proxies. There is the Proxied Device Flag in the Control field of the discovery messages but many implementations don't expose these to the application. """ def __init__(self, universe, uid, rdm_api, wrapper, limit=25): self._universe = universe self._uid = uid self._api = rdm_api self._wrapper = wrapper # implement some basic endless loop checking self._limit = limit self._counter = 0 self._outstanding_ack_timers = 0 store = PidStore.GetStore() self._queued_message_pid = store.GetName('QUEUED_MESSAGE') self._status_messages_pid = store.GetName('STATUS_MESSAGES') def FetchAllMessages(self): self._counter = 0 if self._FetchQueuedMessage(): self._wrapper.Run() def _FetchQueuedMessage(self): if self._counter == self._limit: logging.error('Queued message hit loop limit of %d' % self._counter) self._wrapper.Stop() return self._counter += 1 return self._api.Get(self._universe, self._uid, PidStore.ROOT_DEVICE, # always sent to the ROOT_DEVICE self._queued_message_pid, self._HandleResponse, ['advisory']) def _AckTimerExpired(self): self._outstanding_ack_timers -= 1 self._FetchQueuedMessage() def _HandleResponse(self, response, unpacked_data, unpack_exception): if not response.status.Succeeded(): # this indicates a transport error logging.error('Error: %s' % response.status.message) if (self._outstanding_ack_timers == 0): self._wrapper.Stop() return if response.response_code != OlaClient.RDM_COMPLETED_OK: logging.error('Error: %s' % response.ResponseCodeAsString()) if (self._outstanding_ack_timers == 0): self._wrapper.Stop() return if response.response_type == OlaClient.RDM_ACK_TIMER: logging.debug('Got ACK TIMER set to %d ms' % response.ack_timer) self._wrapper.AddEvent(response.ack_timer, self._AckTimerExpired) self._outstanding_ack_timers += 1 self._wrapper.Reset() return # This is now either an ACK or NACK # Stop if we get a NR_UNKNOWN_PID to GET QUEUED_MESSAGE if (response.response_type == OlaClient.RDM_NACK_REASON and response.nack_reason == RDMNack.NR_UNKNOWN_PID and response.command_class == OlaClient.RDM_GET_RESPONSE and response.pid == self._queued_message_pid.value): if (self._outstanding_ack_timers == 0): self._wrapper.Stop() return # Stop if we get a message with no status messages in it. if (response.response_type == OlaClient.RDM_ACK and response.command_class == OlaClient.RDM_GET_RESPONSE and response.pid == self._status_messages_pid.value and unpacked_data is not None and unpacked_data.get('messages', []) == []): if (self._outstanding_ack_timers == 0): self._wrapper.Stop() if response.queued_messages: logging.error( 'Got a empty status message but the queued message count is %d' % response.queued_messages) return # more remain, keep fetching them self._FetchQueuedMessage() def GetTestClasses(module): """Return a list of test classes from a module. Args: module: The module to search for test classes. Returns: A list of test classes. """ classes = [] for symbol in dir(module): cls = getattr(module, symbol) if not inspect.isclass(cls): continue base_classes = [ OptionalParameterTestFixture, ResponderTestFixture, TestFixture ] if cls in base_classes: continue # This seems to confuse Python 3 if we compare it to # ResponderTest.TestFixture, some sort of diamond inheritance issue? # So test for the base version of it instead if issubclass(cls, TestFixture): classes.append(cls) return classes class TestRunner(object): """The Test Runner executes the tests.""" def __init__(self, universe, uid, broadcast_write_delay, inter_test_delay, pid_store, wrapper, timestamp=False): """Create a new TestRunner. Args: universe: The universe number to use uid: The UID object to test broadcast_write_delay: the delay to use after sending broadcast sets inter_test_delay: the delay to use between tests pid_store: A PidStore object wrapper: A ClientWrapper object timestamp: true to print timestamps with each test """ self._universe = universe self._uid = uid self._broadcast_write_delay = broadcast_write_delay self._inter_test_delay = inter_test_delay self._timestamp = timestamp self._pid_store = pid_store self._api = RDMAPI(wrapper.Client(), pid_store, strict_checks=False) self._wrapper = wrapper self._timing_stats = TimingStats() # maps device properties to the tests that provide them self._property_map = {} self._all_tests = set() # set of all test classes # Used to flush the queued message queue self._message_fetcher = QueuedMessageFetcher(universe, uid, self._api, wrapper) def TimingStats(self): return self._timing_stats def RegisterTest(self, test_class): """Register a test. This doesn't necessarily mean a test will be run as we may restrict which tests are executed. Args: test: A child class of ResponderTest. """ for property in test_class.PROVIDES: if property in self._property_map: raise DuplicatePropertyException( '%s is declared in more than one test' % property) self._property_map[property] = test_class self._all_tests.add(test_class) def RunTests(self, whitelist=None, no_factory_defaults=False, update_cb=None): """Run all the tests. Args: whitelist: If not None, limit the tests to those in the list and their dependencies. no_factory_defaults: Avoid running the SET factory defaults test. update_cb: This is called between each test to update the progress. It takes two args, one is the number of test complete, the other is the total number of tests. Returns: A tuple in the form (tests, device), where tests is a list of tests that executed, and device is an instance of DeviceProperties. """ device = DeviceProperties(self._property_map.keys()) if whitelist is None: tests_to_run = self._all_tests else: tests_to_run = [] matched_tests = [] for t in self._all_tests: if t.__name__ in whitelist: tests_to_run.append(t) matched_tests.append(t.__name__) invalid_tests = whitelist.difference(matched_tests) for t in invalid_tests: logging.error("Test %s doesn't exist, skipping" % t) if no_factory_defaults: factory_default_tests = set(['ResetFactoryDefaults', 'ResetFactoryDefaultsWithData']) tests_to_run = [test for test in tests_to_run if test.__name__ not in factory_default_tests] deps_map = self._InstantiateTests(device, tests_to_run) tests = self._TopologicalSort(deps_map) logging.debug('Test order is %s' % tests) is_debug = logging.getLogger('').isEnabledFor(logging.DEBUG) tests_completed = 0 for test in tests: # make sure the queue is flushed before starting any tests if update_cb is not None: update_cb(tests_completed, len(tests)) self._message_fetcher.FetchAllMessages() # capture the start time start = datetime.datetime.now() start_time_as_string = '%s ' % start.strftime('%d-%m-%Y %H:%M:%S.%f') start_header = '' end_header = '' if self._timestamp: if is_debug: start_header = start_time_as_string else: end_header = start_time_as_string logging.debug('%s%s: %s' % (start_header, test, test.__doc__)) try: for property in test.Requires(): getattr(device, property) except AttributeError: test.LogDebug('Property: %s not found, skipping test.' % property) tests_completed += 1 continue test.Run() # Use inter_test_delay on all but the last test if test != tests[-1]: time.sleep(self._inter_test_delay / 1000.0) logging.info('%s%s: %s' % (end_header, test, test.state.ColorString())) tests_completed += 1 return tests, device def _InstantiateTests(self, device, tests_to_run): """Instantiate the required tests and calculate the dependencies. Args: device: A DeviceProperties object tests_to_run: The list of test class names to run Returns: A dict mapping each test object to the set of test objects it depends on. """ class_name_to_object = {} deps_map = {} for test_class in tests_to_run: self._AddTest(device, class_name_to_object, deps_map, test_class) return deps_map def _AddTest(self, device, class_name_to_object, deps_map, test_class, parents=[]): """Add a test class, recursively adding all REQUIRES. This also checks for circular dependencies. Args: device: A DeviceProperties object which is passed to each test. class_name_to_object: A dict of class names to objects. deps_map: A dict mapping each test object to the set of test objects it depends on. test_class: A class which sub classes ResponderTest. parents: The parents for the current class. Returns: An instance of the test class. """ if test_class in class_name_to_object: return class_name_to_object[test_class] class_name_to_object[test_class] = None test_obj = test_class(device, self._universe, self._uid, self._pid_store, self._api, self._wrapper, self._broadcast_write_delay, self._timing_stats) new_parents = parents + [test_class] dep_classes = [] for property in test_obj.Requires(): if property not in self._property_map: raise MissingPropertyException( '%s not listed in any PROVIDES list.' % property) dep_classes.append(self._property_map[property]) dep_classes.extend(test_class.DEPS) dep_objects = [] for dep_class in dep_classes: if dep_class in new_parents: raise CircularDependencyException( 'Circular dependency found %s in %s' % (dep_class, new_parents)) obj = self._AddTest(device, class_name_to_object, deps_map, dep_class, new_parents) dep_objects.append(obj) class_name_to_object[test_class] = test_obj deps_map[test_obj] = set(dep_objects) return test_obj def _TopologicalSort(self, deps_dict): """Sort the tests according to the dep ordering. Args: A dict in the form test_name: [deps]. """ # The final order to run tests in tests = [] remaining_tests = [ test for test, deps in deps_dict.items() if len(deps)] no_deps = set( test for test, deps in deps_dict.items() if len(deps) == 0) while len(no_deps) > 0: current_test = no_deps.pop() tests.append(current_test) remove_list = [] for test in remaining_tests: deps_dict[test].discard(current_test) if len(deps_dict[test]) == 0: no_deps.add(test) remove_list.append(test) for test in remove_list: remaining_tests.remove(test) return tests ola-0.10.9/tools/rdm/DMXSender.py0000664000175000017500000000422514376533110013372 00000000000000# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # DMXSender.py # Copyright (C) 2011 Simon Newton import array import logging __author__ = 'nomis52@gmail.com (Simon Newton)' class DMXSender(object): def __init__(self, ola_wrapper, universe, frame_rate, slot_count): """Create a new DMXSender: Args: ola_wrapper: the ClientWrapper to use universe: universe number to send on frame_rate: frames per second slot_count: number of slots to send """ self._wrapper = ola_wrapper self._universe = universe self._data = array.array('B') self._frame_count = 0 self._slot_count = max(0, min(int(slot_count), 512)) self._send = True if (frame_rate > 0 and slot_count > 0): logging.info('Sending %d FPS of DMX data with %d slots' % (frame_rate, self._slot_count)) for i in range(0, self._slot_count): self._data.append(0) self._frame_interval = 1000 / frame_rate self.SendDMXFrame() def Stop(self): self._send = False def SendDMXFrame(self): """Send the next DMX Frame.""" for i in range(0, self._slot_count): self._data[i] = self._frame_count % 255 self._frame_count += 1 self._wrapper.Client().SendDmx(self._universe, self._data, self.SendComplete) if self._send: self._wrapper.AddEvent(self._frame_interval, self.SendDMXFrame) def SendComplete(self, state): """Called when the DMX send completes.""" ola-0.10.9/tools/rdm/TestLogger.py0000664000175000017500000002051614376533110013661 00000000000000# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # TestLogger.py # Copyright (C) 2012 Simon Newton import logging import os import pickle import re from ola.StringUtils import StringEscape from ola.testing.rdm.TestState import TestState from ola import Version __author__ = 'nomis52@gmail.com (Simon Newton)' class Error(Exception): """Base exception class.""" class TestLoggerException(Error): """Indicates a problem with the log reader.""" class TestLogger(object): """Reads/saves test results to/from files.""" FILE_NAME_RE = r'[0-9a-f]{4}-[0-9a-f]{8}\.[0-9]{10}\.log$' def __init__(self, log_dir): """ Args: log_dir: where to store the logs """ self._log_dir = log_dir def UIDToString(self, uid): """Converts a UID to a string in the form -. This is different from the __str__() method in UID since the : causes problems on some filesystems. """ return '%04x-%08x' % (uid.manufacturer_id, uid.device_id) def SaveLog(self, uid, timestamp, end_time, tests, device, test_parameters): """Log the results to a file. Args: uid: the UID timestamp: the timestamp for the logs as an int end_time: the datetime object when the tests completed. tests: The list of Test objects device: The device properties test_parameters: a dict of values representing the parameters for the test. Can contain things like the broadcast_write_delay, timing info etc. Raises: TestLoggerException if we failed to write the file. """ test_results = [] for test in tests: test_results.append({ 'advisories': test.advisories, 'category': test.category.__str__(), 'debug': test._debug, 'definition': test.__str__(), 'doc': test.__doc__, 'state': test.state.__str__(), 'warnings': test.warnings, }) output = dict(test_parameters) output['test_results'] = test_results output['timestamp'] = end_time.strftime('%F %r %z') output['uid'] = uid output['version'] = Version.version output['properties'] = device.AsDict() filename = '%s.%d.log' % (self.UIDToString(uid), timestamp) filename = os.path.join(self._log_dir, filename) try: # We need to write as binary because pickle on Python 3 generates binary # data log_file = open(filename, 'wb') except IOError as e: raise TestLoggerException( 'Failed to write to %s: %s' % (filename, e.message)) pickle.dump(output, log_file) logging.info('Wrote log file %s' % (log_file.name)) log_file.close() def ReadLog(self, uid, timestamp): """Load the test data for this particular responder & time. Args: uid: timestamp: Returns: The formatted data. Don't rely on the format of this data being the same. """ log_name = "%s.%s.log" % (self.UIDToString(uid), timestamp) if not self._CheckFilename(log_name): raise TestLoggerException('Invalid log file requested!') filename = os.path.abspath( os.path.join(self._log_dir, log_name)) if not os.path.isfile(filename): raise TestLoggerException('Missing log file! Please re-run tests') try: f = open(filename, 'rb') except IOError as e: raise TestLoggerException(e) return pickle.load(f) def ReadAndFormat(self, uid, timestamp, category, test_state, include_debug=True, include_description=True, include_summary=True): """Read the data from the log and produce a text report. Args: uid: timestamp: the timestamp for the logs Returns: The text version of the results. """ test_data = self.ReadLog(uid, timestamp) formatted_output = self._FormatData(test_data, category, test_state, include_debug, include_description, include_summary) return formatted_output def _CheckFilename(self, filename): """Check if a test log filename is valid.""" return re.match(self.FILE_NAME_RE, filename) is not None def _FormatData(self, test_data, requested_category, requested_test_state, include_debug, include_description, include_summary): """Format the data nicely.""" results_log = [] warnings = [] advisories = [] count_by_category = {} broken = 0 failed = 0 not_run = 0 passed = 0 results_log.append('OLA RDM Responder Tests\n') if requested_category is None or requested_category.lower() == 'all': requested_category = None if requested_test_state is None or requested_test_state.lower() == 'all': requested_test_state = None tests = test_data.get('test_results', []) total = len(tests) for test in tests: category = test['category'] state = test['state'] counts = count_by_category.setdefault(category, {'passed': 0, 'total': 0}) if state == str(TestState.PASSED): counts['passed'] += 1 counts['total'] += 1 passed += 1 elif state == str(TestState.NOT_RUN): not_run += 1 elif state == str(TestState.FAILED): counts['total'] += 1 failed += 1 elif state == str(TestState.BROKEN): counts['total'] += 1 broken += 1 if requested_category is not None and requested_category != category: continue if requested_test_state is not None and requested_test_state != state: continue results_log.append('%s: %s' % (test['definition'], test['state'].upper())) if include_description: results_log.append(str(test['doc'])) if include_debug: results_log.extend(str(s) for s in test.get('debug', [])) results_log.append('') warnings.extend(str(s) for s in test.get('warnings', [])) advisories.extend(str(s) for s in test.get('advisories', [])) results_log.append('------------------- Summary --------------------') results_log.append('OLA Version: %s' % test_data['version']) results_log.append('Test Run: %s' % test_data['timestamp']) results_log.append('UID: %s' % test_data['uid']) manufacturer_label = test_data['properties'].get('manufacturer_label', None) if manufacturer_label: results_log.append('Manufacturer: %s' % StringEscape(manufacturer_label)) model_description = test_data['properties'].get('model_description', None) if model_description: results_log.append('Model Description: %s' % StringEscape(model_description)) software_version = test_data['properties'].get('software_version', None) if software_version: results_log.append('Software Version: %s' % software_version) results_log.append("------------------- Warnings --------------------") results_log.extend(warnings) results_log.append("------------------ Advisories -------------------") results_log.extend(advisories) if include_summary: results_log.append("----------------- By Category -------------------") for category, counts in sorted(count_by_category.items()): cat_passed = counts['passed'] cat_total = counts['total'] if cat_total == 0: continue try: percent = int(round(100.0 * cat_passed / cat_total)) except ZeroDivisionError: percent = ' - ' results_log.append(' %26s: %3d / %3d %s%%' % (category, cat_passed, cat_total, percent)) results_log.append("-------------------------------------------------") results_log.append('%d / %d tests run, %d passed, %d failed, %d broken' % (total - not_run, total, passed, failed, broken)) return '\n'.join(results_log) ola-0.10.9/tools/rdm/TestCategory.py0000664000175000017500000000426014376533110014215 00000000000000# This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU Library General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. # # TestCategory.py # Copyright (C) 2011 Simon Newton __author__ = 'nomis52@gmail.com (Simon Newton)' class TestCategory(object): """The category a test is part of.""" SYMBOLS_TO_VALUES = { # These correspond to categories in the E1.20 document 'NETWORK_MANAGEMENT': 'Network Management', 'STATUS_COLLECTION': 'Status Collection', 'RDM_INFORMATION': 'RDM Information', 'PRODUCT_INFORMATION': 'Product Information', 'DMX_SETUP': 'DMX512 Setup', 'DIMMER_SETTINGS': 'Dimmer Settings', 'IP_DNS_CONFIGURATION': 'IP and DNS Configuration', 'SENSORS': 'Sensors', 'POWER_LAMP_SETTINGS': 'Power / Lamp Settings', 'DISPLAY_SETTINGS': 'Display Settings', 'CONFIGURATION': 'Configuration', 'CONTROL': 'Control', # And others for things that don't quite fit 'CORE': 'Core Functionality', 'ERROR_CONDITIONS': 'Error Conditions', 'SUB_DEVICES': 'Sub Devices', 'UNCLASSIFIED': 'Unclassified', } CATEGORIES_ = [] def __init__(self, category): self._category = category def __str__(self): return self._category def __hash__(self): return hash(self._category) @staticmethod def Categories(): """Return a list of all TestCategories.""" return TestCategory.CATEGORIES_ # Make the symbols accessible, i.e. TestCategory.STATUS_COLLECTION for symbol, description in TestCategory.SYMBOLS_TO_VALUES.items(): obj = TestCategory(description) setattr(TestCategory, symbol, obj) TestCategory.CATEGORIES_.append(obj) ola-0.10.9/tools/rdm/static/0000775000175000017500000000000014376533270012602 500000000000000ola-0.10.9/tools/rdm/static/rdmtests.html0000664000175000017500000003702414376533110015254 00000000000000 RDM Tests & Publisher
Select the RDM device to test Universe: , RDM Responder: Run Discovery
RDM Options
Delay after sending broadcast SETs milliseconds
Delay in-between tests milliseconds
DMX512 Options
DMX Frame rate (frames / second)
Number of Slots to Send
Select Tests to Perform
Running tests will modify the settings for responders connected to this universe. Think twice about doing this on a production system.
Test results for: , generated in .
Broken Failed Not Run Passed Total
Results By Category
    Warnings ()
      Advisories ()
        Test Category , Result:
        Category:
        Result:
        Debug Output:

        The RDM publisher can be used to publish a responder on the rdm.openlighting.org site. After collecting the responder information, you will have an opportunity to review the data before publishing.

        Collector Options Universe:

        Output
        
        
                

        Saved data can be published later by visiting http://rdm.openlighting.org/incoming/model_data

        An error has occurred: ''
        
              

        Please report this bug so it can be fixed. Clicking 'Report Bug' will open a new window. You'll need to be logged into GitHub. Only the information you see here will be sent. Alternatively, if you're unwilling to register for a GitHub account, you can also report it via our Google Group https://groups.google.com/forum/#!forum/open-lighting .

        Category:
        Result:
        Include Debug Output
        Include Test Descriptions
        ola-0.10.9/tools/rdm/static/rdm_tests.js0000664000175000017500000007215114376533110015063 00000000000000/** * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Library General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. * * Copyright (C) 2012 Ravindra Nath Kakarla & Simon Newton */ // Global variable that holds the RDMTests object rdmtests = undefined; /** * RDMTests class */ RDMTests = function() { // An array to hold the test results this.test_results = new Array(); this.tests_running = false; // init tabs $('#tabs').tabs({}); // setup dialog windows, one for general notifications and one for the // download options. this.notification = $('#rdm-tests-notification'); this.notification.dialog({ autoOpen: false, closeOnEscape: false, dialogClass: 'no-close', draggable: false, height: 160, modal: true, resizable: false, }); this.save_options = $('#rdm-tests-save-options'); var save_buttons = [ { text: 'Cancel', click: function() { $(this).dialog('close'); } }, { text: 'Download', click: function() { rdmtests.save_results() } }, ]; this.save_options.dialog({ autoOpen: false, draggable: false, height: 200, modal: true, resizable: false, title: 'Download Options', buttons: save_buttons, }); this.error_notification = $('#rdm-error-notification'); var error_buttons = [ { text: 'Dismiss', click: function() { $(this).dialog('close'); } }, { text: 'Report Bug', click: function() { rdmtests.report_bug() } }, ]; this.error_notification.dialog({ autoOpen: false, buttons: error_buttons, draggable: true, height: 300, modal: true, resizable: true, width: 550, }); //Populate the filter with test categories $('#rdm-tests-results-summary-filter-by_catg') .append($('