Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoreutarass2008-02-25 23:27:10 +0000
committereutarass2008-02-25 23:27:10 +0000
commit94fbe6cda0f6ddb394b08594e49ffa6de7d87d33 (patch)
treea25f9d8b653234d12553a20bd01eec172a6d844f /examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h
parent521178c66ba2989ab837a9d7bb1c4a75216cfde2 (diff)
downloadorg.eclipse.tcf-94fbe6cda0f6ddb394b08594e49ffa6de7d87d33.tar.gz
org.eclipse.tcf-94fbe6cda0f6ddb394b08594e49ffa6de7d87d33.tar.xz
org.eclipse.tcf-94fbe6cda0f6ddb394b08594e49ffa6de7d87d33.zip
Added example agent project: examples/org.eclipse.tm.tcf.examples.daytime.agent.
Renamed agent/memory.[hc] to agent/memoryservice.[hc] to avoid conflict with standard header file.
Diffstat (limited to 'examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h')
-rw-r--r--examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h65
1 files changed, 65 insertions, 0 deletions
diff --git a/examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h b/examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h
new file mode 100644
index 000000000..eff8d739e
--- /dev/null
+++ b/examples/org.eclipse.tm.tcf.examples.daytime.agent/config.h
@@ -0,0 +1,65 @@
+/*******************************************************************************
+ * Copyright (c) 2007, 2008 Wind River Systems, Inc. and others.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Wind River Systems - initial API and implementation
+ *******************************************************************************/
+
+/*
+ * This file contains "define" statements that control agent configuration.
+ * SERVICE_* definitions control which service implementations are included into the agent.
+ *
+ * This is example agent configuration. It includes only few standard services,
+ * and one example service: Day Time.
+ */
+
+#ifndef D_config
+#define D_config
+
+#if defined(WIN32) || defined(__CYGWIN__)
+# define TARGET_WINDOWS 1
+# define TARGET_VXWORKS 0
+# define TARGET_UNIX 0
+#elif defined(_WRS_KERNEL)
+# define TARGET_WINDOWS 0
+# define TARGET_VXWORKS 1
+# define TARGET_UNIX 0
+#else
+# define TARGET_WINDOWS 0
+# define TARGET_VXWORKS 0
+# define TARGET_UNIX 1
+#endif
+
+#define SERVICE_FileSystem 1
+#define SERVICE_SysMonitor TARGET_UNIX
+
+#endif
+
+#ifdef CONFIG_MAIN
+/*
+ * This part of config.h contains services initialization code,
+ * which is executed during agent startup.
+ */
+
+#include "filesystem.h"
+#include "sysmon.h"
+#include "diagnostics.h"
+#include "daytime.h"
+
+static void ini_services(Protocol * proto, TCFBroadcastGroup * bcg, TCFSuspendGroup * spg) {
+#if SERVICE_FileSystem
+ ini_file_system_service(proto);
+#endif
+#if SERVICE_SysMonitor
+ ini_sys_mon_service(proto);
+#endif
+ ini_diagnostics_service(proto);
+ ini_daytime_service(proto);
+}
+
+#endif
+

Back to the top