switched from fitpc/atom to prime/linux
Also removed a few old things that had nothing reasonable to be changed
to.
diff --git a/aos/README.txt b/aos/README.txt
index 44b36a2..da70440 100644
--- a/aos/README.txt
+++ b/aos/README.txt
@@ -9,10 +9,10 @@
restart it by running "invoke-rc.d starter restart" (doesn't always work very well...)
the .config files are for building linux kernels
-atom_code/ has code that only runs on the atom
+linux/ has code that only runs on linux systems
crio/ has code that only runs on the crio
-common/ is where stuff that runs on both the crio and the atom is
+common/ is where stuff that runs on both the crio and linux is
common/input/ is where the framework code for reading stuff into the queues system is
common/output/ is where the framework for writing things out of the queues system is
common/messages is where the c++ wrappers for "queues" are
@@ -27,8 +27,8 @@
semantics. Furthermore, at the time of each such function entry the values of the parameters of the called
function and of all objects accessible via pointers therein would agree with the abstract semantics. In this
type of implementation, objects referred to by interrupt service routines activated by the signal function
- would require explicit specification of volatile storage, as well as other implementation-defined
+ would require explicit specification of volatile storage, as well as other implementation-defined
restrictions.
-Everything that has to do different things when compiled for the crio or the atom uses #ifdef __VXWORKS__ etc.
+Everything that has to do different things when compiled for the crio or linux uses #ifdef __VXWORKS__ etc.
The crio "queue" implementation uses 1 global instance and no synchronization, so it should only be used in code that gets called by the crio-side control loop infrastructure.
-The C++ namespace aos is used for all of the aos code. The crio and atom namespaces are for APIs that only make sense on one platform or the other.
+The C++ namespace aos is used for all of the aos code. The crio and linux_code namespaces are for APIs that only make sense on one platform or the other.
diff --git a/aos/atom_code/README.txt b/aos/atom_code/README.txt
deleted file mode 100644
index 5cf8182..0000000
--- a/aos/atom_code/README.txt
+++ /dev/null
@@ -1,6 +0,0 @@
-see ../README.txt for stuff affecting crio and atom code
-
-[NOTES]
-Any code should call aos::Init() (or aos::InitNRT() for processes that don't need to be realtime) before making any calls to any of the aos functions.
-Making calls to any of the aos functions (including aos::Init()) from more than 1 thread per process is not supported, but using fork(2) after some aos functions have been called and then continuing to make aos function calls (without calling one of the exec(3) functions) in both processes is supported.
-
diff --git a/aos/atom_code/core/CRIOLogReader.cpp b/aos/atom_code/core/CRIOLogReader.cpp
deleted file mode 100644
index 9c4dbd4..0000000
--- a/aos/atom_code/core/CRIOLogReader.cpp
+++ /dev/null
@@ -1,154 +0,0 @@
-#include <sys/socket.h>
-#include <netinet/in.h>
-#include <netinet/tcp.h>
-#include <sys/select.h>
-#include <sys/types.h>
-#include <unistd.h>
-#include <sys/time.h>
-#include <fcntl.h>
-#include <arpa/inet.h>
-#include <errno.h>
-#include <string.h>
-
-#include <map>
-
-#include "aos/common/logging/logging_impl.h"
-#include "aos/atom_code/logging/atom_logging.h"
-#include "aos/common/byteorder.h"
-#include "aos/atom_code/init.h"
-#include "aos/common/network_port.h"
-
-namespace aos {
-namespace logging {
-namespace atom {
-namespace {
-
-struct log_buffer {
- LogMessage *msg;
- size_t used;
-
- log_buffer() : msg(NULL) {
- Clear();
- }
- void Clear() {
- logging::atom::Free(msg);
- msg = logging::atom::Get();
- used = 0;
- }
-
- // Returns whether msg is now complete.
- bool ReceiveFrom(int sock) {
- const ssize_t ret = recv(sock, reinterpret_cast<uint8_t *>(msg) + used,
- sizeof(*msg) - used, 0);
- if (ret == -1) {
- LOG(ERROR, "recv(%d, %p, %d) failed because of %d: %s\n",
- sock, reinterpret_cast<uint8_t *>(msg) + used, sizeof(*msg) - used,
- errno, strerror(errno));
- return false;
- } else {
- used += ret;
- if (used > sizeof(*msg)) {
- LOG(WARNING, "used(%zd) is > sizeof(*msg)(%zd)\n", used, sizeof(*msg));
- }
- return used >= sizeof(*msg);
- }
- }
-};
-
-int CRIOLogReaderMain() {
- InitNRT();
-
- const int sock = socket(AF_INET, SOCK_STREAM, 0);
- if (sock == -1) {
- LOG(ERROR, "creating TCP socket failed because of %d: %s\n",
- errno, strerror(errno));
- return EXIT_FAILURE;
- }
- union {
- sockaddr_in in;
- sockaddr addr;
- } bind_sockaddr;
- memset(&bind_sockaddr, 0, sizeof(bind_sockaddr));
- bind_sockaddr.in.sin_family = AF_INET;
- bind_sockaddr.in.sin_port = htons(static_cast<uint16_t>(NetworkPort::kLogs));
- bind_sockaddr.in.sin_addr.s_addr = htonl(INADDR_ANY);
- if (bind(sock, &bind_sockaddr.addr, sizeof(bind_sockaddr.addr)) == -1) {
- LOG(ERROR, "bind(%d, %p) failed because of %d: %s\n", sock,
- &bind_sockaddr.addr, errno, strerror(errno));
- return EXIT_FAILURE;
- }
- if (listen(sock, 10) == -1) {
- LOG(ERROR, "listen(%d) failed because of %d: %s\n", sock,
- errno, strerror(errno));
- return EXIT_FAILURE;
- }
- const int flags = fcntl(sock, F_GETFL, 0);
- if (flags == -1) {
- LOG(ERROR, "fcntl(%d, F_GETFL, 0) failed because of %d: %s\n", sock,
- errno, strerror(errno));
- return EXIT_FAILURE;
- }
- if (fcntl(sock, F_SETFL, flags | O_NONBLOCK) == -1) {
- LOG(ERROR, "fcntl(%d, F_SETFL, %x) failed because of %d: %s\n",
- sock, flags | O_NONBLOCK, errno, strerror(errno));
- return EXIT_FAILURE;
- }
-
- std::map<int, log_buffer> socks;
- fd_set read_fds;
- while (true) {
- FD_ZERO(&read_fds);
- FD_SET(sock, &read_fds);
- for (auto it = socks.begin(); it != socks.end(); ++it) {
- FD_SET(it->first, &read_fds);
- }
- switch (select(FD_SETSIZE, &read_fds, NULL /*write*/, NULL /*err*/,
- NULL /*timeout*/)) {
- case -1:
- LOG(ERROR, "select(FD_SETSIZE, %p, NULL, NULL, NULL) failed "
- "because of %d: %s\n", &read_fds, errno, strerror(errno));
- continue;
- case 0:
- LOG(ERROR, "select with NULL timeout timed out...\n");
- continue;
- }
-
- if (FD_ISSET(sock, &read_fds)) {
- const int new_sock = accept4(sock, NULL, NULL, SOCK_NONBLOCK);
- if (new_sock == -1) {
- LOG(ERROR, "accept4(%d, NULL, NULL, SOCK_NONBLOCK(=%d)) failed "
- "because of %d: %s\n",
- sock, SOCK_NONBLOCK, errno, strerror(errno));
- } else {
- socks[new_sock]; // creates using value's default constructor
- }
- }
-
- for (auto it = socks.begin(); it != socks.end(); ++it) {
- if (FD_ISSET(it->first, &read_fds)) {
- if (it->second.ReceiveFrom(it->first)) {
- it->second.msg->source = ntoh(it->second.msg->source);
- it->second.msg->sequence = ntoh(it->second.msg->sequence);
- it->second.msg->level = ntoh(it->second.msg->level);
- it->second.msg->seconds = ntoh(it->second.msg->seconds);
- it->second.msg->nseconds = ntoh(it->second.msg->nseconds);
-
- logging::atom::Write(it->second.msg);
- it->second.msg = NULL;
- it->second.Clear();
- }
- }
- }
- }
-
- Cleanup();
-}
-
-} // namespace
-} // namespace atom
-} // namespace logging
-} // namespace aos
-
-int main() {
- return ::aos::logging::atom::CRIOLogReaderMain();
-}
diff --git a/aos/atom_code/output/output.gyp b/aos/atom_code/output/output.gyp
deleted file mode 100644
index 8f0e47d..0000000
--- a/aos/atom_code/output/output.gyp
+++ /dev/null
@@ -1,52 +0,0 @@
-{
- 'targets': [
- {
- 'target_name': 'http_server',
- 'type': 'static_library',
- 'sources': [
- 'HTTPServer.cpp',
- 'evhttp_ctemplate_emitter.cc',
- 'ctemplate_cache.cc',
- ],
- 'dependencies': [
- '<(EXTERNALS):libevent',
- '<(EXTERNALS):ctemplate',
- '<(AOS)/common/common.gyp:once',
- '<(AOS)/common/common.gyp:scoped_fd',
- '<(AOS)/build/aos.gyp:logging',
- ],
- 'export_dependent_settings': [
- '<(EXTERNALS):libevent',
- '<(EXTERNALS):ctemplate',
- ],
- },
- {
- 'target_name': 'motor_output',
- 'type': 'static_library',
- 'sources': [
- 'motor_output.cc',
- ],
- 'dependencies': [
- '<(AOS)/common/network/network.gyp:socket',
- '<(AOS)/common/common.gyp:timing',
- '<(EXTERNALS):WPILib-NetworkRobotValues',
- '<(AOS)/build/aos.gyp:logging',
- ],
- 'export_dependent_settings': [
- '<(AOS)/common/network/network.gyp:socket',
- '<(EXTERNALS):WPILib-NetworkRobotValues',
- ],
- },
- {
- 'target_name': 'motor_output_test',
- 'type': 'executable',
- 'sources': [
- 'motor_output_test.cc',
- ],
- 'dependencies': [
- 'motor_output',
- '<(EXTERNALS):gtest',
- ],
- },
- ],
-}
diff --git a/aos/build/aos.gyp b/aos/build/aos.gyp
index c91ab43..d9a1bf6 100644
--- a/aos/build/aos.gyp
+++ b/aos/build/aos.gyp
@@ -12,15 +12,15 @@
'<(AOS)/common/logging/logging_impl.cc',
],
'conditions': [
- ['OS=="atom"', {
+ ['OS=="linux"', {
'sources': [
- '<(AOS)/atom_code/logging/atom_logging.cc',
+ '<(AOS)/linux_code/logging/linux_logging.cc',
],
'dependencies': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:queue',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
],
'export_dependent_settings': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:queue',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
]
}],
],
diff --git a/aos/build/aos.gypi b/aos/build/aos.gypi
index 0f7d4b6..f0ebb12 100644
--- a/aos/build/aos.gypi
+++ b/aos/build/aos.gypi
@@ -7,7 +7,7 @@
'aos_abs': '<!(readlink -f <(DEPTH)/aos)', # for use in non-path contexts
# the .gyp file that has targets for the various external libraries
'EXTERNALS': '<(AOS)/build/externals.gyp',
-# the directory that gets rsynced to the atom
+# the directory that gets rsynced to the target
'rsync_dir': '<(PRODUCT_DIR)/outputs',
# The directory that loadable_module and shared_library targets get put into
# There's a target_conditions that puts loadable_modules here and
@@ -15,7 +15,7 @@
'so_dir': '<(PRODUCT_DIR)/lib',
# the directory that executables that depend on <(EXTERNALS):gtest get put into
'test_dir': '<(PRODUCT_DIR)/tests',
-# 'executable' for the atom and 'static_library' for the cRIO
+# 'executable' for linux and 'static_library' for the cRIO
# Useful for targets that should either be an executable or get compiled into
# a .out file depending on the current platform.
# 'aos_target': platform-dependent,
diff --git a/aos/build/aos_all.gyp b/aos/build/aos_all.gyp
index 0629be5..426f84e 100644
--- a/aos/build/aos_all.gyp
+++ b/aos/build/aos_all.gyp
@@ -1,22 +1,22 @@
# This file has the executables etc that AOS builds.
-# User .gyp files for the atom should depend on :Atom.
+# User .gyp files for the prime should depend on :Prime.
# User .gyp files for the crio should depend on :Crio.
{
'targets': [
{
- 'target_name': 'Atom',
+ 'target_name': 'Prime',
'type': 'none',
'variables': {
'no_rsync': 1,
},
'dependencies': [
- '../atom_code/camera/camera.gyp:CameraHTTPStreamer',
- '../atom_code/camera/camera.gyp:CameraReader',
- '../atom_code/core/core.gyp:*',
- '../atom_code/ipc_lib/ipc_lib.gyp:raw_queue_test',
- '../atom_code/ipc_lib/ipc_lib.gyp:ipc_stress_test',
- '../atom_code/starter/starter.gyp:starter_exe',
- '../atom_code/starter/starter.gyp:netconsole',
+ #'../linux_code/camera/camera.gyp:CameraHTTPStreamer',
+ #'../linux_code/camera/camera.gyp:CameraReader',
+ '../linux_code/core/core.gyp:*',
+ '../linux_code/ipc_lib/ipc_lib.gyp:raw_queue_test',
+ '../linux_code/ipc_lib/ipc_lib.gyp:ipc_stress_test',
+ '../linux_code/starter/starter.gyp:starter_exe',
+ '../linux_code/starter/starter.gyp:netconsole',
'../common/common.gyp:queue_test',
'../common/common.gyp:die_test',
'../common/util/util.gyp:trapezoid_profile_test',
diff --git a/aos/build/build.sh b/aos/build/build.sh
index 656e72d..0fe13ab 100755
--- a/aos/build/build.sh
+++ b/aos/build/build.sh
@@ -17,7 +17,7 @@
export WIND_BASE=${WIND_BASE:-"/usr/local/powerpc-wrs-vxworks/wind_base"}
-[ "${PLATFORM}" == "crio" -o "${PLATFORM}" == "atom" ] || ( echo Platform "(${PLATFORM})" must be '"crio" or "atom"'. ; exit 1 )
+[ "${PLATFORM}" == "crio" -o "${PLATFORM}" == "linux" ] || ( echo Platform "(${PLATFORM})" must be '"crio" or "linux"'. ; exit 1 )
[ "${DEBUG}" == "yes" -o "${DEBUG}" == "no" ] || ( echo Debug "(${DEBUG})" must be '"yes" or "no"'. ; exit 1 )
AOS=`dirname $0`/..
@@ -65,32 +65,22 @@
if [ "${ACTION}" == "clean" ]; then
rm -r ${OUTDIR} || true
else
- if [ "${ACTION}" != "deploy" -a "${ACTION}" != "tests" -a "${ACTION}" != "redeploy" ]; then
+ if [ "${ACTION}" != "deploy" -a "${ACTION}" != "tests" ]; then
NINJA_ACTION=${ACTION}
else
NINJA_ACTION=
fi
${NINJA} -C ${OUTDIR} ${NINJA_ACTION} "$@"
- if [[ ${ACTION} == deploy || ${ACTION} == redeploy ]]; then
- [[ ${PLATFORM} =~ .*atom ]] && \
+ if [[ ${ACTION} == deploy ]]; then
+ [[ ${PLATFORM} == linux ]] && \
rsync --progress -c -r \
${OUTDIR}/outputs/* \
- driver@`${AOS}/build/get_ip fitpc`:/home/driver/robot_code/bin
- ssh driver@`${AOS}/build/get_ip fitpc` "sync; sync; sync"
+ driver@`${AOS}/build/get_ip prime`:/home/driver/robot_code/bin
+ ssh driver@`${AOS}/build/get_ip prime` "sync; sync; sync"
[ ${PLATFORM} == crio ] && \
ncftpput `${AOS}/build/get_ip robot` / \
${OUTDIR}/lib/FRC_UserProgram.out
fi
- if [[ ${ACTION} == redeploy ]]; then
- if [[ ${PLATFORM} != crio ]]; then
- echo "Platform ${PLATFORM} does not support redeploy." 1>&2
- exit 1
- fi
- ${OUTDIR}/../out_atom/outputs/netconsole <<"END"
-unld "FRC_UserProgram.out"
-ld < FRC_UserProgram.out
-END
- fi
if [[ ${ACTION} == tests ]]; then
find ${OUTDIR}/tests -executable -exec {} \;
fi
diff --git a/aos/build/get_ip b/aos/build/get_ip
index 3b3a569..d798884 100755
--- a/aos/build/get_ip
+++ b/aos/build/get_ip
@@ -2,7 +2,7 @@
# This script provides a central location for getting IP addresses. It uses
# output/ip_base.txt as the first 3 parts and then adds on whatever is
-# correct for its first argument (fitpc or robot).
+# correct for its first argument (prime or robot).
# It will create output/ip_base.txt with a default value if it does not already
# exist.
@@ -16,8 +16,8 @@
BASE=`cat ${FILE}`
case $1 in
- fitpc)
- # This is the IP address that we use for our fitpc.
+ prime)
+ # This is the IP address that we use for the prime.
echo ${BASE}.179 ;;
robot)
# This is the IP address that the cRIO has to be on.
diff --git a/aos/build/queues/compiler.rb b/aos/build/queues/compiler.rb
index aef5cbf..28e206b 100644
--- a/aos/build/queues/compiler.rb
+++ b/aos/build/queues/compiler.rb
@@ -103,7 +103,7 @@
cpp_tree.add_cc_using("::aos::to_network")
cpp_tree.add_cc_using("::aos::to_host")
cpp_tree.add_swig_header_include("aos/common/queue.h".inspect)
- cpp_tree.add_swig_body_include("aos/atom_code/queue-tmpl.h".inspect)
+ cpp_tree.add_swig_body_include("aos/linux_code/queue-tmpl.h".inspect)
cpp_tree.add_swig_header_include("aos/common/time.h".inspect)
cpp_tree.add_swig_include((rel_path + ".h").inspect)
diff --git a/aos/common/common.gyp b/aos/common/common.gyp
index d8c10e0..4c2b684 100644
--- a/aos/common/common.gyp
+++ b/aos/common/common.gyp
@@ -24,10 +24,10 @@
'<(AOS)/build/aos.gyp:logging',
'once',
'<(EXTERNALS):gtest',
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:shared_mem',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:shared_mem',
],
'export_dependent_settings': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:shared_mem',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:shared_mem',
],
},
{
@@ -57,10 +57,10 @@
},
{
'dependencies': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:queue',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
],
'export_dependent_settings': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:queue',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
],
}]
],
@@ -224,18 +224,18 @@
'target_name': 'condition',
'type': 'static_library',
'sources': [
- '<(AOS)/atom_code/ipc_lib/condition.cc',
+ '<(AOS)/linux_code/ipc_lib/condition.cc',
],
'dependencies': [
'mutex',
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:aos_sync',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
# TODO(aschuh): Fix this dependency loop by
# providing a logging interface.
# '<(AOS)/build/aos.gyp:logging',
],
'export_dependent_settings': [
'mutex',
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:aos_sync',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
],
},
{
@@ -248,13 +248,13 @@
],
}, {
'sources': [
- '<(AOS)/atom_code/ipc_lib/mutex.cpp',
+ '<(AOS)/linux_code/ipc_lib/mutex.cpp',
],
'dependencies': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:aos_sync',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
],
'export_dependent_settings': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:aos_sync',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:aos_sync',
],
}],
],
@@ -290,7 +290,7 @@
'mutex',
'<(AOS)/build/aos.gyp:logging',
'queue_testutils',
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:core_lib',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:core_lib',
],
},
{
diff --git a/aos/common/condition.h b/aos/common/condition.h
index c407070..c913b47 100644
--- a/aos/common/condition.h
+++ b/aos/common/condition.h
@@ -2,7 +2,7 @@
#define AOS_COMMON_CONDITION_H_
#include "aos/common/mutex.h"
-#include "aos/atom_code/ipc_lib/aos_sync.h"
+#include "aos/linux_code/ipc_lib/aos_sync.h"
namespace aos {
diff --git a/aos/common/condition_test.cc b/aos/common/condition_test.cc
index fca2820..a10275b 100644
--- a/aos/common/condition_test.cc
+++ b/aos/common/condition_test.cc
@@ -10,7 +10,7 @@
#include "aos/common/mutex.h"
#include "aos/common/queue_testutils.h"
#include "aos/common/type_traits.h"
-#include "aos/atom_code/ipc_lib/core_lib.h"
+#include "aos/linux_code/ipc_lib/core_lib.h"
#include "aos/common/logging/logging.h"
#include "aos/common/macros.h"
diff --git a/aos/common/debugging-tips.txt b/aos/common/debugging-tips.txt
index 5d52af2..af2d37c 100644
--- a/aos/common/debugging-tips.txt
+++ b/aos/common/debugging-tips.txt
@@ -6,8 +6,8 @@
just run `LogStreamer` if you want to do simple testing without writing logs
to a file. See `LogDisplayer --help` for options.
All of the binaries get put in the same place. That is
- src/out_atom/Default/outputs on the build machine and
- /home/driver/robot_code/bin on the fitpc.
+ src/outputs/prime/outputs on the build machine and
+ /home/driver/robot_code/bin on linux.
[Startup]
Low level startup errors often end up in /aos_fatal_error.* on the cRIO and
diff --git a/aos/common/messages/QueueHolder.h b/aos/common/messages/QueueHolder.h
index 8d8ba51..c40a630 100644
--- a/aos/common/messages/QueueHolder.h
+++ b/aos/common/messages/QueueHolder.h
@@ -12,7 +12,7 @@
#include "aos/common/type_traits.h"
#include "aos/common/logging/logging.h"
#ifndef __VXWORKS__
-#include "aos/atom_code/ipc_lib/queue.h"
+#include "aos/linux_code/ipc_lib/queue.h"
#endif
namespace aos {
diff --git a/aos/common/messages/messages.gyp b/aos/common/messages/messages.gyp
index b76dbba..e134a95 100644
--- a/aos/common/messages/messages.gyp
+++ b/aos/common/messages/messages.gyp
@@ -19,10 +19,10 @@
'conditions': [
['OS!="crio"', {
'dependencies': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:queue',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
],
'export_dependent_settings': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:queue',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
],
}],
],
diff --git a/aos/common/mutex.h b/aos/common/mutex.h
index b6b277c..a22df4e 100644
--- a/aos/common/mutex.h
+++ b/aos/common/mutex.h
@@ -7,14 +7,14 @@
#include "aos/common/macros.h"
#include "aos/common/type_traits.h"
-#include "aos/atom_code/ipc_lib/aos_sync.h"
+#include "aos/linux_code/ipc_lib/aos_sync.h"
namespace aos {
class Condition;
-// An abstraction of a mutex that has implementations both for the
-// atom and for the cRIO.
+// An abstraction of a mutex that has implementations both for
+// linux and for the cRIO.
// If there are multiple tasks or processes contending for the mutex,
// higher priority ones will succeed in locking first,
// and tasks of equal priorities have the same chance of getting the lock.
diff --git a/aos/common/mutex_test.cpp b/aos/common/mutex_test.cpp
index 652cd9e..29e1956 100644
--- a/aos/common/mutex_test.cpp
+++ b/aos/common/mutex_test.cpp
@@ -9,7 +9,7 @@
#include "gtest/gtest.h"
-#include "aos/atom_code/ipc_lib/aos_sync.h"
+#include "aos/linux_code/ipc_lib/aos_sync.h"
namespace aos {
namespace testing {
diff --git a/aos/common/network/SendSocket.h b/aos/common/network/SendSocket.h
index 9323da8..06529d0 100644
--- a/aos/common/network/SendSocket.h
+++ b/aos/common/network/SendSocket.h
@@ -3,7 +3,7 @@
#include "Socket.h"
-#include "aos/atom_code/configuration.h"
+#include "aos/linux_code/configuration.h"
#include "aos/common/network_port.h"
#include "aos/common/util.h"
diff --git a/aos/common/network/network.gyp b/aos/common/network/network.gyp
index 60b37aa..4d5aff3 100644
--- a/aos/common/network/network.gyp
+++ b/aos/common/network/network.gyp
@@ -7,7 +7,7 @@
'team_number.cc',
],
'dependencies': [
- '<(AOS)/atom_code/atom_code.gyp:configuration',
+ '<(AOS)/linux_code/linux_code.gyp:configuration',
'<(AOS)/common/common.gyp:once',
'<(AOS)/build/aos.gyp:logging',
],
@@ -53,7 +53,7 @@
'<(AOS)/build/aos.gyp:logging',
'<(AOS)/common/common.gyp:time',
'<(AOS)/common/common.gyp:util',
- '<(AOS)/atom_code/atom_code.gyp:configuration',
+ '<(AOS)/linux_code/linux_code.gyp:configuration',
],
'export_dependent_settings': [
'<(AOS)/build/aos.gyp:logging',
diff --git a/aos/common/network/team_number.cc b/aos/common/network/team_number.cc
index 367f991..3e9aeb6 100644
--- a/aos/common/network/team_number.cc
+++ b/aos/common/network/team_number.cc
@@ -4,7 +4,7 @@
#include <inttypes.h>
#include "aos/common/once.h"
-#include "aos/atom_code/configuration.h"
+#include "aos/linux_code/configuration.h"
#include "aos/common/logging/logging.h"
namespace aos {
diff --git a/aos/common/network_port.h b/aos/common/network_port.h
index a8f2d1d..c19c2ce 100644
--- a/aos/common/network_port.h
+++ b/aos/common/network_port.h
@@ -8,15 +8,12 @@
// Constants representing the various ports used for communications and some
// documentation about what each is used for.
enum class NetworkPort : uint16_t {
- // UDP socket sending motor values from the atom to the crio.
+ // UDP socket sending motor values from the prime to the crio.
kMotors = 9710,
- // UDP socket forwarding drivers station packets from the crio to the atom.
+ // UDP socket forwarding drivers station packets from the crio to the prime.
kDS = 9711,
- // UDP socket sending sensor values from the crio to the atom.
+ // UDP socket sending sensor values from the crio to the prime.
kSensors = 9712,
- // TCP socket(s) (automatically reconnects) sending logs from the crio to the
- // atom.
- kLogs = 9713,
// HTTP server that sends out camera feeds in mjpg format.
// Should not be changed because this number shows up elsewhere too.
kCameraStreamer = 9714,
@@ -26,7 +23,7 @@
// last segment of their IP addresses.
enum class NetworkAddress : uint8_t {
// The computer that the cRIO talks to.
- kAtom = 179,
+ kPrime = 179,
kCRIO = 2,
};
diff --git a/aos/common/once-tmpl.h b/aos/common/once-tmpl.h
index 9b9c8c5..9e3ebfe 100644
--- a/aos/common/once-tmpl.h
+++ b/aos/common/once-tmpl.h
@@ -9,7 +9,7 @@
// It doesn't use pthread_once, because Brian looked at the pthreads
// implementation for vxworks and noticed that it is completely and entirely
// broken for doing just about anything (including its pthread_once). It has the
-// same implementation on the atom for simplicity.
+// same implementation under linux for simplicity.
namespace aos {
diff --git a/aos/common/queue.h b/aos/common/queue.h
index 68cb338..d37fe59 100644
--- a/aos/common/queue.h
+++ b/aos/common/queue.h
@@ -12,7 +12,7 @@
#include "aos/common/time.h"
#include "aos/common/macros.h"
#ifndef USE_UNSAFE
-#include "aos/atom_code/ipc_lib/queue.h"
+#include "aos/linux_code/ipc_lib/queue.h"
#endif // USE_UNSAFE
#include "aos/common/time.h"
@@ -310,7 +310,7 @@
#ifdef USE_UNSAFE
#include "aos/crio/queue-tmpl.h"
#else
-#include "aos/atom_code/queue-tmpl.h"
+#include "aos/linux_code/queue-tmpl.h"
#endif
#undef USE_UNSAFE
diff --git a/aos/common/queue_testutils.h b/aos/common/queue_testutils.h
index 2d26262..3c7a0a4 100644
--- a/aos/common/queue_testutils.h
+++ b/aos/common/queue_testutils.h
@@ -1,7 +1,7 @@
#ifndef AOS_COMMON_QUEUE_TESTUTILS_H_
#define AOS_COMMON_QUEUE_TESTUTILS_H_
-#include "aos/atom_code/ipc_lib/shared_mem.h"
+#include "aos/linux_code/ipc_lib/shared_mem.h"
// This file has some general helper functions for dealing with testing things
// that use shared memory etc.
diff --git a/aos/common/time.h b/aos/common/time.h
index bc2dc3e..c646661 100644
--- a/aos/common/time.h
+++ b/aos/common/time.h
@@ -71,7 +71,7 @@
}
#endif // SWIG
- // CLOCK_MONOTONIC on the fitpc and CLOCK_REALTIME on the cRIO because the
+ // CLOCK_MONOTONIC on linux and CLOCK_REALTIME on the cRIO because the
// cRIO doesn't have any others.
// CLOCK_REALTIME is the default realtime clock and CLOCK_MONOTONIC doesn't
// change when somebody changes the wall clock (like the ntp deamon or
diff --git a/aos/config/10-net-eth0.rules b/aos/config/10-net-eth0.rules
index c4e17e0..0d8d807 100644
--- a/aos/config/10-net-eth0.rules
+++ b/aos/config/10-net-eth0.rules
@@ -1,6 +1,6 @@
# This is a file that will make any NIC eth0.
# It prevents the persistent net rules generator from running because that ends
-# up naming the 1 NIC eth1 instead of when you move a disk between fit-pcs.
+# up naming the 1 NIC eth1 instead of when you move a disk between boxes.
# Put it in /etc/udev/rules.d/ to use it.
SUBSYSTEM=="net", ACTION=="add", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"
diff --git a/aos/crio/README.txt b/aos/crio/README.txt
index 9a98575..8bdd209 100644
--- a/aos/crio/README.txt
+++ b/aos/crio/README.txt
@@ -1,4 +1,4 @@
-see ../README.txt for stuff affecting crio and atom code
+see ../README.txt for stuff affecting crio and linux code
There isn't much cRIO code left any more... The general policy is to not break
things in aos/common/ that are #ifdeffed etc to with on the cRIO for no reason,
but if there's a major rewrite on anything the vxworks-specific code should
diff --git a/aos/linux_code/README.txt b/aos/linux_code/README.txt
new file mode 100644
index 0000000..ebaf40e
--- /dev/null
+++ b/aos/linux_code/README.txt
@@ -0,0 +1,15 @@
+see ../README.txt for stuff affecting crio and linux code
+
+The folder is called linux_code because it mainly deals with code that uses the queue system, which only works under GNU/Linux for a variety of reasons, some fundamental (futexes) and some because nobody bothers to fix them.
+The layout is designed with multiple linux boxes in mind.
+
+The one that talks to the cRIO etc is called the prime. We have multiple explanations for that name:
+ It is the primary controller.
+ PRIME/Primary Robot Intelligent Management Entity
+ Represents Optimus Prime, one of the good transformers who battle the bad ones that 254 names robots after.
+ It is easy to type and doesn't conflict with anything else common for tab-completion.
+ It's not hardware-specific.
+
+[NOTES]
+Any code should call aos::Init() (or aos::InitNRT() for processes that don't need to be realtime) before making any calls to any of the aos functions.
+Making calls to any of the aos functions (including aos::Init()) from more than 1 thread per process is not supported, but using fork(2) after some aos functions have been called and then continuing to make aos function calls (without calling one of the exec(3) functions) in both processes is supported.
diff --git a/aos/atom_code/camera/Buffers.cpp b/aos/linux_code/camera/Buffers.cpp
similarity index 98%
rename from aos/atom_code/camera/Buffers.cpp
rename to aos/linux_code/camera/Buffers.cpp
index d0d20f5..e1d22b6 100644
--- a/aos/atom_code/camera/Buffers.cpp
+++ b/aos/linux_code/camera/Buffers.cpp
@@ -1,8 +1,8 @@
-#include "aos/atom_code/camera/Buffers.h"
+#include "aos/linux_code/camera/Buffers.h"
#include <sys/mman.h>
-#include "aos/atom_code/camera/V4L2.h"
+#include "aos/linux_code/camera/V4L2.h"
#include "aos/common/logging/logging.h"
namespace aos {
diff --git a/aos/atom_code/camera/Buffers.h b/aos/linux_code/camera/Buffers.h
similarity index 95%
rename from aos/atom_code/camera/Buffers.h
rename to aos/linux_code/camera/Buffers.h
index 080e9eb..b447468 100644
--- a/aos/atom_code/camera/Buffers.h
+++ b/aos/linux_code/camera/Buffers.h
@@ -1,12 +1,12 @@
-#ifndef AOS_ATOM_CODE_CAMERA_CAMERA_BUFFERS_H_
-#define AOS_ATOM_CODE_CAMERA_CAMERA_BUFFERS_H_
+#ifndef AOS_LINUX_CODE_CAMERA_CAMERA_BUFFERS_H_
+#define AOS_LINUX_CODE_CAMERA_CAMERA_BUFFERS_H_
#include <sys/socket.h>
#include <sys/un.h>
#include <string>
-#include "aos/atom_code/ipc_lib/queue.h"
+#include "aos/linux_code/ipc_lib/queue.h"
#include "aos/common/type_traits.h"
namespace aos {
diff --git a/aos/atom_code/camera/HTTPStreamer.cpp b/aos/linux_code/camera/HTTPStreamer.cpp
similarity index 99%
rename from aos/atom_code/camera/HTTPStreamer.cpp
rename to aos/linux_code/camera/HTTPStreamer.cpp
index 5a9a405..0b0c65f 100644
--- a/aos/atom_code/camera/HTTPStreamer.cpp
+++ b/aos/linux_code/camera/HTTPStreamer.cpp
@@ -16,8 +16,8 @@
#include <vector>
#include "aos/common/network_port.h"
-#include "aos/atom_code/init.h"
-#include "aos/atom_code/camera/Buffers.h"
+#include "aos/linux_code/init.h"
+#include "aos/linux_code/camera/Buffers.h"
#include "aos/common/logging/logging.h"
namespace aos {
diff --git a/aos/atom_code/camera/Reader.cpp b/aos/linux_code/camera/Reader.cpp
similarity index 98%
rename from aos/atom_code/camera/Reader.cpp
rename to aos/linux_code/camera/Reader.cpp
index 125fde1..cf77548 100644
--- a/aos/atom_code/camera/Reader.cpp
+++ b/aos/linux_code/camera/Reader.cpp
@@ -13,11 +13,11 @@
#include <string>
#include <inttypes.h>
-#include "aos/atom_code/init.h"
-#include "aos/atom_code/camera/V4L2.h"
-#include "aos/atom_code/camera/Buffers.h"
+#include "aos/linux_code/init.h"
+#include "aos/linux_code/camera/V4L2.h"
+#include "aos/linux_code/camera/Buffers.h"
#include "aos/common/logging/logging.h"
-#include "aos/atom_code/ipc_lib/queue.h"
+#include "aos/linux_code/ipc_lib/queue.h"
#define CLEAR(x) memset(&(x), 0, sizeof(x))
diff --git a/aos/atom_code/camera/V4L2.h b/aos/linux_code/camera/V4L2.h
similarity index 86%
rename from aos/atom_code/camera/V4L2.h
rename to aos/linux_code/camera/V4L2.h
index bbafe3e..e018bea 100644
--- a/aos/atom_code/camera/V4L2.h
+++ b/aos/linux_code/camera/V4L2.h
@@ -1,5 +1,5 @@
-#ifndef AOS_ATOM_CODE_CAMREA_V4L2_H_
-#define AOS_ATOM_CODE_CAMREA_V4L2_H_
+#ifndef AOS_LINUX_CODE_CAMREA_V4L2_H_
+#define AOS_LINUX_CODE_CAMREA_V4L2_H_
// This file handles including everything needed to use V4L2 and has some
// utility functions.
diff --git a/aos/atom_code/camera/aos.jar_manifest b/aos/linux_code/camera/aos.jar_manifest
similarity index 100%
rename from aos/atom_code/camera/aos.jar_manifest
rename to aos/linux_code/camera/aos.jar_manifest
diff --git a/aos/atom_code/camera/camera.gyp b/aos/linux_code/camera/camera.gyp
similarity index 86%
rename from aos/atom_code/camera/camera.gyp
rename to aos/linux_code/camera/camera.gyp
index f1743be..e4f1e04 100644
--- a/aos/atom_code/camera/camera.gyp
+++ b/aos/linux_code/camera/camera.gyp
@@ -45,11 +45,11 @@
'Buffers.cpp',
],
'dependencies': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:queue',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
'<(AOS)/build/aos.gyp:logging',
],
'export_dependent_settings': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:queue',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
],
},
{
@@ -60,7 +60,7 @@
],
'dependencies': [
'buffers',
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'<(AOS)/build/aos.gyp:logging',
],
},
@@ -72,9 +72,9 @@
],
'dependencies': [
'buffers',
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'<(AOS)/build/aos.gyp:logging',
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:queue',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
],
},
],
diff --git a/aos/atom_code/camera/java/aos/CameraProcessor.java b/aos/linux_code/camera/java/aos/CameraProcessor.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/CameraProcessor.java
rename to aos/linux_code/camera/java/aos/CameraProcessor.java
diff --git a/aos/atom_code/camera/java/aos/ChannelImageGetter.java b/aos/linux_code/camera/java/aos/ChannelImageGetter.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/ChannelImageGetter.java
rename to aos/linux_code/camera/java/aos/ChannelImageGetter.java
diff --git a/aos/atom_code/camera/java/aos/DebugServer.java b/aos/linux_code/camera/java/aos/DebugServer.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/DebugServer.java
rename to aos/linux_code/camera/java/aos/DebugServer.java
diff --git a/aos/atom_code/camera/java/aos/ImageGetter.java b/aos/linux_code/camera/java/aos/ImageGetter.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/ImageGetter.java
rename to aos/linux_code/camera/java/aos/ImageGetter.java
diff --git a/aos/atom_code/camera/java/aos/JPEGDecoder.java b/aos/linux_code/camera/java/aos/JPEGDecoder.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/JPEGDecoder.java
rename to aos/linux_code/camera/java/aos/JPEGDecoder.java
diff --git a/aos/atom_code/camera/java/aos/JPEGImageGetter.java b/aos/linux_code/camera/java/aos/JPEGImageGetter.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/JPEGImageGetter.java
rename to aos/linux_code/camera/java/aos/JPEGImageGetter.java
diff --git a/aos/atom_code/camera/java/aos/JavaCVImageGetter.java b/aos/linux_code/camera/java/aos/JavaCVImageGetter.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/JavaCVImageGetter.java
rename to aos/linux_code/camera/java/aos/JavaCVImageGetter.java
diff --git a/aos/atom_code/camera/java/aos/NativeBufferError.java b/aos/linux_code/camera/java/aos/NativeBufferError.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/NativeBufferError.java
rename to aos/linux_code/camera/java/aos/NativeBufferError.java
diff --git a/aos/atom_code/camera/java/aos/NativeError.java b/aos/linux_code/camera/java/aos/NativeError.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/NativeError.java
rename to aos/linux_code/camera/java/aos/NativeError.java
diff --git a/aos/atom_code/camera/java/aos/NativeLoader.java b/aos/linux_code/camera/java/aos/NativeLoader.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/NativeLoader.java
rename to aos/linux_code/camera/java/aos/NativeLoader.java
diff --git a/aos/atom_code/camera/java/aos/Natives.java b/aos/linux_code/camera/java/aos/Natives.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/Natives.java
rename to aos/linux_code/camera/java/aos/Natives.java
diff --git a/aos/atom_code/camera/java/aos/QueueImageGetter.java b/aos/linux_code/camera/java/aos/QueueImageGetter.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/QueueImageGetter.java
rename to aos/linux_code/camera/java/aos/QueueImageGetter.java
diff --git a/aos/atom_code/camera/java/aos/QueueLogHandler.java b/aos/linux_code/camera/java/aos/QueueLogHandler.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/QueueLogHandler.java
rename to aos/linux_code/camera/java/aos/QueueLogHandler.java
diff --git a/aos/atom_code/camera/java/aos/ServableImage.java b/aos/linux_code/camera/java/aos/ServableImage.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/ServableImage.java
rename to aos/linux_code/camera/java/aos/ServableImage.java
diff --git a/aos/atom_code/camera/java/aos/Thresholder.java b/aos/linux_code/camera/java/aos/Thresholder.java
similarity index 100%
rename from aos/atom_code/camera/java/aos/Thresholder.java
rename to aos/linux_code/camera/java/aos/Thresholder.java
diff --git a/aos/atom_code/camera/jni.cpp b/aos/linux_code/camera/jni.cpp
similarity index 98%
rename from aos/atom_code/camera/jni.cpp
rename to aos/linux_code/camera/jni.cpp
index ad5177a..c547a9c 100644
--- a/aos/atom_code/camera/jni.cpp
+++ b/aos/linux_code/camera/jni.cpp
@@ -1,10 +1,10 @@
#include <setjmp.h>
#include "jni/aos_Natives.h"
-#include "aos/atom_code/camera/Buffers.h"
+#include "aos/linux_code/camera/Buffers.h"
#include "aos/externals/libjpeg/include/jpeglib.h"
#include "aos/common/logging/logging_impl.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
using aos::camera::Buffers;
diff --git a/aos/atom_code/configuration.cc b/aos/linux_code/configuration.cc
similarity index 92%
rename from aos/atom_code/configuration.cc
rename to aos/linux_code/configuration.cc
index 2d6dab8..6c39a93 100644
--- a/aos/atom_code/configuration.cc
+++ b/aos/linux_code/configuration.cc
@@ -1,4 +1,4 @@
-#include "aos/atom_code/configuration.h"
+#include "aos/linux_code/configuration.h"
#include <string.h>
#include <errno.h>
@@ -20,7 +20,8 @@
// Including the terminating '\0'.
const size_t kMaxAddrLength = 18;
-const char *const kAtomNetInterface = "eth0";
+// TODO(brians): Don't hard-code this.
+const char *const kLinuxNetInterface = "eth0";
const in_addr *DoGetOwnIPAddress() {
ifaddrs *addrs;
if (getifaddrs(&addrs) != 0) {
@@ -33,7 +34,7 @@
for (; addrs != NULL; addrs = addrs->ifa_next) {
if (addrs->ifa_addr->sa_family == AF_INET) {
- if (strcmp(kAtomNetInterface, addrs->ifa_name) == 0) {
+ if (strcmp(kLinuxNetInterface, addrs->ifa_name) == 0) {
static const in_addr r =
reinterpret_cast<sockaddr_in *>(__builtin_assume_aligned(
addrs->ifa_addr, alignof(sockaddr_in)))->sin_addr;
@@ -42,7 +43,7 @@
}
}
LOG(FATAL, "couldn't find an AF_INET interface named \"%s\"\n",
- kAtomNetInterface);
+ kLinuxNetInterface);
}
const char *DoGetRootDirectory() {
diff --git a/aos/atom_code/configuration.h b/aos/linux_code/configuration.h
similarity index 86%
rename from aos/atom_code/configuration.h
rename to aos/linux_code/configuration.h
index a3917cc..3568f28 100644
--- a/aos/atom_code/configuration.h
+++ b/aos/linux_code/configuration.h
@@ -1,5 +1,5 @@
-#ifndef AOS_ATOM_CODE_CONFIGURATION_H_
-#define AOS_ATOM_CODE_CONFIGURATION_H_
+#ifndef AOS_LINUX_CODE_CONFIGURATION_H_
+#define AOS_LINUX_CODE_CONFIGURATION_H_
#include <stdint.h>
#include <sys/socket.h>
@@ -28,4 +28,4 @@
} // namespace configuration
} // namespace aos
-#endif // AOS_ATOM_CODE_CONFIGURATION_H_
+#endif // AOS_LINUX_CODE_CONFIGURATION_H_
diff --git a/aos/atom_code/core/BinaryLogReader.cpp b/aos/linux_code/core/BinaryLogReader.cpp
similarity index 90%
rename from aos/atom_code/core/BinaryLogReader.cpp
rename to aos/linux_code/core/BinaryLogReader.cpp
index 3e96cc5..74cc95c 100644
--- a/aos/atom_code/core/BinaryLogReader.cpp
+++ b/aos/linux_code/core/BinaryLogReader.cpp
@@ -11,14 +11,14 @@
#include <map>
-#include "aos/atom_code/logging/atom_logging.h"
-#include "aos/atom_code/core/LogFileCommon.h"
-#include "aos/atom_code/init.h"
-#include "aos/atom_code/configuration.h"
+#include "aos/linux_code/logging/linux_logging.h"
+#include "aos/linux_code/core/LogFileCommon.h"
+#include "aos/linux_code/init.h"
+#include "aos/linux_code/configuration.h"
namespace aos {
namespace logging {
-namespace atom {
+namespace linux_code {
namespace {
int BinaryLogReaderMain() {
@@ -99,7 +99,7 @@
memcpy(output_strings + name_size, msg->message, message_size);
futex_set(&output->marker);
- logging::atom::Free(msg);
+ logging::linux_code::Free(msg);
}
Cleanup();
@@ -107,10 +107,10 @@
}
} // namespace
-} // namespace atom
+} // namespace linux_code
} // namespace logging
} // namespace aos
int main() {
- return ::aos::logging::atom::BinaryLogReaderMain();
+ return ::aos::logging::linux_code::BinaryLogReaderMain();
}
diff --git a/aos/atom_code/core/LogDisplayer.cpp b/aos/linux_code/core/LogDisplayer.cpp
similarity index 98%
rename from aos/atom_code/core/LogDisplayer.cpp
rename to aos/linux_code/core/LogDisplayer.cpp
index cd664f9..3a98dd4 100644
--- a/aos/atom_code/core/LogDisplayer.cpp
+++ b/aos/linux_code/core/LogDisplayer.cpp
@@ -7,7 +7,7 @@
#include <inttypes.h>
#include <errno.h>
-#include "aos/atom_code/core/LogFileCommon.h"
+#include "aos/linux_code/core/LogFileCommon.h"
#include "aos/common/logging/logging_impl.h"
namespace {
diff --git a/aos/atom_code/core/LogFileCommon.h b/aos/linux_code/core/LogFileCommon.h
similarity index 98%
rename from aos/atom_code/core/LogFileCommon.h
rename to aos/linux_code/core/LogFileCommon.h
index 8c1bd7b..23ddc62 100644
--- a/aos/atom_code/core/LogFileCommon.h
+++ b/aos/linux_code/core/LogFileCommon.h
@@ -1,5 +1,5 @@
-#ifndef AOS_ATOM_CODE_CORE_LOG_FILE_COMMON_H_
-#define AOS_ATOM_CODE_CORE_LOG_FILE_COMMON_H_
+#ifndef AOS_LINUX_CODE_CORE_LOG_FILE_COMMON_H_
+#define AOS_LINUX_CODE_CORE_LOG_FILE_COMMON_H_
#include <stdio.h>
#include <errno.h>
diff --git a/aos/atom_code/core/LogStreamer.cpp b/aos/linux_code/core/LogStreamer.cpp
similarity index 72%
rename from aos/atom_code/core/LogStreamer.cpp
rename to aos/linux_code/core/LogStreamer.cpp
index 20c5987..d570489 100644
--- a/aos/atom_code/core/LogStreamer.cpp
+++ b/aos/linux_code/core/LogStreamer.cpp
@@ -10,16 +10,16 @@
#include <fcntl.h>
#include <inttypes.h>
-#include "aos/atom_code/logging/atom_logging.h"
-#include "aos/atom_code/core/LogFileCommon.h"
-#include "aos/atom_code/init.h"
-#include "aos/atom_code/ipc_lib/queue.h"
+#include "aos/linux_code/logging/linux_logging.h"
+#include "aos/linux_code/core/LogFileCommon.h"
+#include "aos/linux_code/init.h"
+#include "aos/linux_code/ipc_lib/queue.h"
#include "aos/common/logging/logging_impl.h"
#include "aos/common/time.h"
namespace aos {
namespace logging {
-namespace atom {
+namespace linux_code {
namespace {
int LogStreamerMain() {
@@ -36,7 +36,7 @@
internal::PrintMessage(stdout, *msg);
- logging::atom::Free(msg);
+ logging::linux_code::Free(msg);
}
Cleanup();
@@ -44,10 +44,10 @@
}
} // namespace
-} // namespace atom
+} // namespace linux_code
} // namespace logging
} // namespace aos
int main() {
- return ::aos::logging::atom::LogStreamerMain();
+ return ::aos::logging::linux_code::LogStreamerMain();
}
diff --git a/aos/atom_code/core/core.cc b/aos/linux_code/core/core.cc
similarity index 94%
rename from aos/atom_code/core/core.cc
rename to aos/linux_code/core/core.cc
index 2921e46..c8cec67 100644
--- a/aos/atom_code/core/core.cc
+++ b/aos/linux_code/core/core.cc
@@ -6,7 +6,7 @@
#include <string>
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
// Initializes shared memory. This is the only file that will create the shared
// memory file if it doesn't already exist (and set everything up).
diff --git a/aos/atom_code/core/core.gyp b/aos/linux_code/core/core.gyp
similarity index 60%
rename from aos/atom_code/core/core.gyp
rename to aos/linux_code/core/core.gyp
index 1aaebfb..d68168b 100644
--- a/aos/atom_code/core/core.gyp
+++ b/aos/linux_code/core/core.gyp
@@ -7,7 +7,7 @@
'core.cc',
],
'dependencies': [
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
],
},
{
@@ -18,8 +18,8 @@
],
'dependencies': [
'<(AOS)/build/aos.gyp:logging',
- '<(AOS)/atom_code/atom_code.gyp:init',
- '<(AOS)/atom_code/atom_code.gyp:configuration',
+ '<(AOS)/linux_code/linux_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:configuration',
],
},
{
@@ -30,9 +30,9 @@
],
'dependencies': [
'<(AOS)/build/aos.gyp:logging',
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'<(AOS)/common/common.gyp:time',
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:queue',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:queue',
],
},
{
@@ -43,18 +43,7 @@
],
'dependencies': [
'<(AOS)/build/aos.gyp:logging',
- '<(AOS)/atom_code/atom_code.gyp:init',
- ],
- },
- {
- 'target_name': 'CRIOLogReader',
- 'type': 'executable',
- 'sources': [
- 'CRIOLogReader.cpp',
- ],
- 'dependencies': [
- '<(AOS)/build/aos.gyp:logging',
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
],
},
],
diff --git a/aos/atom_code/init.cc b/aos/linux_code/init.cc
similarity index 95%
rename from aos/atom_code/init.cc
rename to aos/linux_code/init.cc
index 033a206..3c0704e 100644
--- a/aos/atom_code/init.cc
+++ b/aos/linux_code/init.cc
@@ -1,4 +1,4 @@
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
#include <stdio.h>
#include <string.h>
@@ -13,8 +13,8 @@
#include <stdint.h>
#include "aos/common/die.h"
-#include "aos/atom_code/logging/atom_logging.h"
-#include "aos/atom_code/ipc_lib/shared_mem.h"
+#include "aos/linux_code/logging/linux_logging.h"
+#include "aos/linux_code/ipc_lib/shared_mem.h"
namespace aos {
@@ -72,7 +72,7 @@
Die("%s-init: creating shared memory reference failed\n",
program_invocation_short_name);
}
- logging::atom::Register();
+ logging::linux_code::Register();
}
const char *const kNoRealtimeEnvironmentVariable = "AOS_NO_REALTIME";
diff --git a/aos/atom_code/init.h b/aos/linux_code/init.h
similarity index 85%
rename from aos/atom_code/init.h
rename to aos/linux_code/init.h
index b35a3b8..0042533 100644
--- a/aos/atom_code/init.h
+++ b/aos/linux_code/init.h
@@ -1,5 +1,5 @@
-#ifndef AOS_ATOM_CODE_INIT_H_
-#define AOS_ATOM_CODE_INIT_H_
+#ifndef AOS_LINUX_CODE_INIT_H_
+#define AOS_LINUX_CODE_INIT_H_
namespace aos {
@@ -18,4 +18,4 @@
} // namespace aos
-#endif // AOS_ATOM_CODE_INIT_H_
+#endif // AOS_LINUX_CODE_INIT_H_
diff --git a/aos/atom_code/ipc_lib/aos_sync.c b/aos/linux_code/ipc_lib/aos_sync.c
similarity index 98%
rename from aos/atom_code/ipc_lib/aos_sync.c
rename to aos/linux_code/ipc_lib/aos_sync.c
index 18e65a7..52ebed1 100644
--- a/aos/atom_code/ipc_lib/aos_sync.c
+++ b/aos/linux_code/ipc_lib/aos_sync.c
@@ -1,4 +1,4 @@
-#include "aos/atom_code/ipc_lib/aos_sync.h"
+#include "aos/linux_code/ipc_lib/aos_sync.h"
#include <stdio.h>
#include <linux/futex.h>
diff --git a/aos/atom_code/ipc_lib/aos_sync.h b/aos/linux_code/ipc_lib/aos_sync.h
similarity index 96%
rename from aos/atom_code/ipc_lib/aos_sync.h
rename to aos/linux_code/ipc_lib/aos_sync.h
index 6d4bf55..7a81ca3 100644
--- a/aos/atom_code/ipc_lib/aos_sync.h
+++ b/aos/linux_code/ipc_lib/aos_sync.h
@@ -1,5 +1,5 @@
-#ifndef AOS_ATOM_CODE_IPC_LIB_SYNC_H_
-#define AOS_ATOM_CODE_IPC_LIB_SYNC_H_
+#ifndef AOS_LINUX_CODE_IPC_LIB_SYNC_H_
+#define AOS_LINUX_CODE_IPC_LIB_SYNC_H_
#include <stdlib.h>
#include <signal.h>
@@ -93,4 +93,4 @@
}
#endif // __cplusplus
-#endif // AOS_ATOM_CODE_IPC_LIB_SYNC_H_
+#endif // AOS_LINUX_CODE_IPC_LIB_SYNC_H_
diff --git a/aos/atom_code/ipc_lib/condition.cc b/aos/linux_code/ipc_lib/condition.cc
similarity index 100%
rename from aos/atom_code/ipc_lib/condition.cc
rename to aos/linux_code/ipc_lib/condition.cc
diff --git a/aos/atom_code/ipc_lib/core_lib.c b/aos/linux_code/ipc_lib/core_lib.c
similarity index 93%
rename from aos/atom_code/ipc_lib/core_lib.c
rename to aos/linux_code/ipc_lib/core_lib.c
index c83dbe4..cc1ccbb 100644
--- a/aos/atom_code/ipc_lib/core_lib.c
+++ b/aos/linux_code/ipc_lib/core_lib.c
@@ -1,9 +1,9 @@
-#include "aos/atom_code/ipc_lib/core_lib.h"
+#include "aos/linux_code/ipc_lib/core_lib.h"
#include <stdio.h>
#include <stdlib.h>
-#include "aos/atom_code/ipc_lib/shared_mem.h"
+#include "aos/linux_code/ipc_lib/shared_mem.h"
static inline uint8_t aos_8max(uint8_t l, uint8_t r) {
return (l > r) ? l : r;
diff --git a/aos/atom_code/ipc_lib/core_lib.h b/aos/linux_code/ipc_lib/core_lib.h
similarity index 90%
rename from aos/atom_code/ipc_lib/core_lib.h
rename to aos/linux_code/ipc_lib/core_lib.h
index 5674220..1b0d754 100644
--- a/aos/atom_code/ipc_lib/core_lib.h
+++ b/aos/linux_code/ipc_lib/core_lib.h
@@ -3,7 +3,7 @@
#include <stdint.h>
-#include "aos/atom_code/ipc_lib/aos_sync.h"
+#include "aos/linux_code/ipc_lib/aos_sync.h"
#ifdef __cplusplus
extern "C" {
diff --git a/aos/atom_code/ipc_lib/ipc_lib.gyp b/aos/linux_code/ipc_lib/ipc_lib.gyp
similarity index 100%
rename from aos/atom_code/ipc_lib/ipc_lib.gyp
rename to aos/linux_code/ipc_lib/ipc_lib.gyp
diff --git a/aos/atom_code/ipc_lib/ipc_stress_test.cc b/aos/linux_code/ipc_lib/ipc_stress_test.cc
similarity index 99%
rename from aos/atom_code/ipc_lib/ipc_stress_test.cc
rename to aos/linux_code/ipc_lib/ipc_stress_test.cc
index 38c425f..1b55e82 100644
--- a/aos/atom_code/ipc_lib/ipc_stress_test.cc
+++ b/aos/linux_code/ipc_lib/ipc_stress_test.cc
@@ -14,7 +14,7 @@
#include "aos/common/queue_testutils.h"
#include "aos/common/type_traits.h"
#include "aos/common/mutex.h"
-#include "aos/atom_code/ipc_lib/core_lib.h"
+#include "aos/linux_code/ipc_lib/core_lib.h"
#include "aos/common/die.h"
// This runs all of the IPC-related tests in a bunch of parallel processes for a
diff --git a/aos/atom_code/ipc_lib/mutex.cpp b/aos/linux_code/ipc_lib/mutex.cpp
similarity index 100%
rename from aos/atom_code/ipc_lib/mutex.cpp
rename to aos/linux_code/ipc_lib/mutex.cpp
diff --git a/aos/atom_code/ipc_lib/queue.cc b/aos/linux_code/ipc_lib/queue.cc
similarity index 99%
rename from aos/atom_code/ipc_lib/queue.cc
rename to aos/linux_code/ipc_lib/queue.cc
index 018f03a..e67f22c 100644
--- a/aos/atom_code/ipc_lib/queue.cc
+++ b/aos/linux_code/ipc_lib/queue.cc
@@ -1,4 +1,4 @@
-#include "aos/atom_code/ipc_lib/queue.h"
+#include "aos/linux_code/ipc_lib/queue.h"
#include <stdio.h>
#include <string.h>
@@ -9,7 +9,7 @@
#include "aos/common/logging/logging.h"
#include "aos/common/type_traits.h"
-#include "aos/atom_code/ipc_lib/core_lib.h"
+#include "aos/linux_code/ipc_lib/core_lib.h"
namespace aos {
namespace {
diff --git a/aos/atom_code/ipc_lib/queue.h b/aos/linux_code/ipc_lib/queue.h
similarity index 97%
rename from aos/atom_code/ipc_lib/queue.h
rename to aos/linux_code/ipc_lib/queue.h
index 5158558..a58b65e 100644
--- a/aos/atom_code/ipc_lib/queue.h
+++ b/aos/linux_code/ipc_lib/queue.h
@@ -1,7 +1,7 @@
-#ifndef AOS_ATOM_CODE_IPC_LIB_QUEUE_H_
-#define AOS_ATOM_CODE_IPC_LIB_QUEUE_H_
+#ifndef AOS_LINUX_CODE_IPC_LIB_QUEUE_H_
+#define AOS_LINUX_CODE_IPC_LIB_QUEUE_H_
-#include "aos/atom_code/ipc_lib/shared_mem.h"
+#include "aos/linux_code/ipc_lib/shared_mem.h"
#include "aos/common/mutex.h"
#include "aos/common/condition.h"
@@ -168,4 +168,4 @@
} // namespace aos
-#endif // AOS_ATOM_CODE_IPC_LIB_QUEUE_H_
+#endif // AOS_LINUX_CODE_IPC_LIB_QUEUE_H_
diff --git a/aos/atom_code/ipc_lib/queue_test.cc b/aos/linux_code/ipc_lib/queue_test.cc
similarity index 99%
rename from aos/atom_code/ipc_lib/queue_test.cc
rename to aos/linux_code/ipc_lib/queue_test.cc
index 9e5f3ae..c87bd7b 100644
--- a/aos/atom_code/ipc_lib/queue_test.cc
+++ b/aos/linux_code/ipc_lib/queue_test.cc
@@ -10,7 +10,7 @@
#include "gtest/gtest.h"
-#include "aos/atom_code/ipc_lib/core_lib.h"
+#include "aos/linux_code/ipc_lib/core_lib.h"
#include "aos/common/type_traits.h"
#include "aos/common/queue_testutils.h"
#include "aos/common/time.h"
diff --git a/aos/atom_code/ipc_lib/shared_mem.c b/aos/linux_code/ipc_lib/shared_mem.c
similarity index 97%
rename from aos/atom_code/ipc_lib/shared_mem.c
rename to aos/linux_code/ipc_lib/shared_mem.c
index 5b1231c..4126d65 100644
--- a/aos/atom_code/ipc_lib/shared_mem.c
+++ b/aos/linux_code/ipc_lib/shared_mem.c
@@ -1,4 +1,4 @@
-#include "aos/atom_code/ipc_lib/shared_mem.h"
+#include "aos/linux_code/ipc_lib/shared_mem.h"
#include <stdio.h>
#include <string.h>
@@ -8,7 +8,7 @@
#include <sys/types.h>
#include <errno.h>
-#include "aos/atom_code/ipc_lib/core_lib.h"
+#include "aos/linux_code/ipc_lib/core_lib.h"
// the path for the shared memory segment. see shm_open(3) for restrictions
#define AOS_SHM_NAME "/aos_shared_mem"
diff --git a/aos/atom_code/ipc_lib/shared_mem.h b/aos/linux_code/ipc_lib/shared_mem.h
similarity index 97%
rename from aos/atom_code/ipc_lib/shared_mem.h
rename to aos/linux_code/ipc_lib/shared_mem.h
index c0d21ac..e5059c4 100644
--- a/aos/atom_code/ipc_lib/shared_mem.h
+++ b/aos/linux_code/ipc_lib/shared_mem.h
@@ -5,7 +5,7 @@
#include <unistd.h>
#include <time.h>
-#include "aos/atom_code/ipc_lib/aos_sync.h"
+#include "aos/linux_code/ipc_lib/aos_sync.h"
#ifdef __cplusplus
extern "C" {
diff --git a/aos/atom_code/atom_code.gyp b/aos/linux_code/linux_code.gyp
similarity index 83%
rename from aos/atom_code/atom_code.gyp
rename to aos/linux_code/linux_code.gyp
index 51dcaec..49be0ce 100644
--- a/aos/atom_code/atom_code.gyp
+++ b/aos/linux_code/linux_code.gyp
@@ -4,10 +4,10 @@
'target_name': 'init',
'type': 'static_library',
'sources': [
- '<(AOS)/atom_code/init.cc',
+ '<(AOS)/linux_code/init.cc',
],
'dependencies': [
- '<(AOS)/atom_code/ipc_lib/ipc_lib.gyp:shared_mem',
+ '<(AOS)/linux_code/ipc_lib/ipc_lib.gyp:shared_mem',
'<(AOS)/common/common.gyp:die',
'<(AOS)/build/aos.gyp:logging',
],
diff --git a/aos/atom_code/logging/atom_logging.cc b/aos/linux_code/logging/linux_logging.cc
similarity index 91%
rename from aos/atom_code/logging/atom_logging.cc
rename to aos/linux_code/logging/linux_logging.cc
index 854da17..faeb04a 100644
--- a/aos/atom_code/logging/atom_logging.cc
+++ b/aos/linux_code/logging/linux_logging.cc
@@ -1,4 +1,4 @@
-#include "aos/atom_code/logging/atom_logging.h"
+#include "aos/linux_code/logging/linux_logging.h"
#include <stdarg.h>
#include <stdio.h>
@@ -14,8 +14,8 @@
#include "aos/common/die.h"
#include "aos/common/logging/logging_impl.h"
-#include "aos/atom_code/thread_local.h"
-#include "aos/atom_code/ipc_lib/queue.h"
+#include "aos/linux_code/thread_local.h"
+#include "aos/linux_code/ipc_lib/queue.h"
namespace aos {
namespace logging {
@@ -77,10 +77,10 @@
}
} // namespace internal
-namespace atom {
+namespace linux_code {
namespace {
-class AtomQueueLogImplementation : public LogImplementation {
+class linuxQueueLogImplementation : public LogImplementation {
virtual void DoLog(log_level level, const char *format, va_list ap) {
LogMessage *message = static_cast<LogMessage *>(queue->GetMessage());
if (message == NULL) {
@@ -103,7 +103,7 @@
Die("logging: couldn't fetch queue\n");
}
- AddImplementation(new AtomQueueLogImplementation());
+ AddImplementation(new linuxQueueLogImplementation());
}
const LogMessage *ReadNext(int flags, int *index) {
@@ -137,6 +137,6 @@
}
}
-} // namespace atom
+} // namespace linux_code
} // namespace logging
} // namespace aos
diff --git a/aos/atom_code/logging/atom_logging.h b/aos/linux_code/logging/linux_logging.h
similarity index 75%
rename from aos/atom_code/logging/atom_logging.h
rename to aos/linux_code/logging/linux_logging.h
index 45f2a07..928a480 100644
--- a/aos/atom_code/logging/atom_logging.h
+++ b/aos/linux_code/logging/linux_logging.h
@@ -1,13 +1,13 @@
-#ifndef AOS_ATOM_CODE_LOGGING_LOGGING_H_
-#define AOS_ATOM_CODE_LOGGING_LOGGING_H_
+#ifndef AOS_LINUX_CODE_LOGGING_LOGGING_H_
+#define AOS_LINUX_CODE_LOGGING_LOGGING_H_
#include "aos/common/logging/logging_impl.h"
namespace aos {
namespace logging {
-namespace atom {
+namespace linux_code {
-// Calls AddImplementation to register the usual atom logging implementation
+// Calls AddImplementation to register the usual linux logging implementation
// which sends the messages through a queue. This implementation relies on
// another process(es) to read the log messages that it puts into the queue.
// It gets called by aos::Init*.
@@ -23,7 +23,7 @@
void Free(const LogMessage *msg);
void Write(LogMessage *msg);
-} // namespace atom
+} // namespace linux_code
} // namespace logging
} // namespace aos
diff --git a/aos/atom_code/logging/logging.gyp b/aos/linux_code/logging/logging.gyp
similarity index 100%
rename from aos/atom_code/logging/logging.gyp
rename to aos/linux_code/logging/logging.gyp
diff --git a/aos/atom_code/output/HTTPServer.cpp b/aos/linux_code/output/HTTPServer.cpp
similarity index 98%
rename from aos/atom_code/output/HTTPServer.cpp
rename to aos/linux_code/output/HTTPServer.cpp
index 9a3b359..1703d39 100644
--- a/aos/atom_code/output/HTTPServer.cpp
+++ b/aos/linux_code/output/HTTPServer.cpp
@@ -1,4 +1,4 @@
-#include "aos/atom_code/output/HTTPServer.h"
+#include "aos/linux_code/output/HTTPServer.h"
#include <inttypes.h>
#include <sys/types.h>
diff --git a/aos/atom_code/output/HTTPServer.h b/aos/linux_code/output/HTTPServer.h
similarity index 100%
rename from aos/atom_code/output/HTTPServer.h
rename to aos/linux_code/output/HTTPServer.h
diff --git a/aos/atom_code/output/ctemplate_cache.cc b/aos/linux_code/output/ctemplate_cache.cc
similarity index 83%
rename from aos/atom_code/output/ctemplate_cache.cc
rename to aos/linux_code/output/ctemplate_cache.cc
index 02c7b2f..cf961c6 100644
--- a/aos/atom_code/output/ctemplate_cache.cc
+++ b/aos/linux_code/output/ctemplate_cache.cc
@@ -1,6 +1,6 @@
-#include "aos/atom_code/output/ctemplate_cache.h"
+#include "aos/linux_code/output/ctemplate_cache.h"
-#include "aos/atom_code/configuration.h"
+#include "aos/linux_code/configuration.h"
#include "aos/common/once.h"
namespace aos {
diff --git a/aos/atom_code/output/ctemplate_cache.h b/aos/linux_code/output/ctemplate_cache.h
similarity index 100%
rename from aos/atom_code/output/ctemplate_cache.h
rename to aos/linux_code/output/ctemplate_cache.h
diff --git a/aos/atom_code/output/evhttp_ctemplate_emitter.cc b/aos/linux_code/output/evhttp_ctemplate_emitter.cc
similarity index 85%
rename from aos/atom_code/output/evhttp_ctemplate_emitter.cc
rename to aos/linux_code/output/evhttp_ctemplate_emitter.cc
index 9c3ac17..2301ffb 100644
--- a/aos/atom_code/output/evhttp_ctemplate_emitter.cc
+++ b/aos/linux_code/output/evhttp_ctemplate_emitter.cc
@@ -1,4 +1,4 @@
-#include "aos/atom_code/output/evhttp_ctemplate_emitter.h"
+#include "aos/linux_code/output/evhttp_ctemplate_emitter.h"
#include "aos/common/logging/logging.h"
diff --git a/aos/atom_code/output/evhttp_ctemplate_emitter.h b/aos/linux_code/output/evhttp_ctemplate_emitter.h
similarity index 83%
rename from aos/atom_code/output/evhttp_ctemplate_emitter.h
rename to aos/linux_code/output/evhttp_ctemplate_emitter.h
index d20d2cb..5b8e96a 100644
--- a/aos/atom_code/output/evhttp_ctemplate_emitter.h
+++ b/aos/linux_code/output/evhttp_ctemplate_emitter.h
@@ -1,5 +1,5 @@
-#ifndef AOS_ATOM_CODE_OUTPUT_EVHTTP_CTEMPLATE_EMITTER_H_
-#define AOS_ATOM_CODE_OUTPUT_EVHTTP_CTEMPLATE_EMITTER_H_
+#ifndef AOS_LINUX_CODE_OUTPUT_EVHTTP_CTEMPLATE_EMITTER_H_
+#define AOS_LINUX_CODE_OUTPUT_EVHTTP_CTEMPLATE_EMITTER_H_
#include <string.h>
@@ -31,4 +31,4 @@
} // namespace http
} // namespace aos
-#endif // AOS_ATOM_CODE_OUTPUT_EVHTTP_CTEMPLATE_EMITTER_H_
+#endif // AOS_LINUX_CODE_OUTPUT_EVHTTP_CTEMPLATE_EMITTER_H_
diff --git a/aos/linux_code/output/output.gyp b/aos/linux_code/output/output.gyp
new file mode 100644
index 0000000..f697630
--- /dev/null
+++ b/aos/linux_code/output/output.gyp
@@ -0,0 +1,24 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'http_server',
+ 'type': 'static_library',
+ 'sources': [
+ 'HTTPServer.cpp',
+ 'evhttp_ctemplate_emitter.cc',
+ 'ctemplate_cache.cc',
+ ],
+ 'dependencies': [
+ '<(EXTERNALS):libevent',
+ '<(EXTERNALS):ctemplate',
+ '<(AOS)/common/common.gyp:once',
+ '<(AOS)/common/common.gyp:scoped_fd',
+ '<(AOS)/build/aos.gyp:logging',
+ ],
+ 'export_dependent_settings': [
+ '<(EXTERNALS):libevent',
+ '<(EXTERNALS):ctemplate',
+ ],
+ },
+ ],
+}
diff --git a/aos/atom_code/queue-tmpl.h b/aos/linux_code/queue-tmpl.h
similarity index 100%
rename from aos/atom_code/queue-tmpl.h
rename to aos/linux_code/queue-tmpl.h
diff --git a/aos/atom_code/starter/netconsole.cc b/aos/linux_code/starter/netconsole.cc
similarity index 99%
rename from aos/atom_code/starter/netconsole.cc
rename to aos/linux_code/starter/netconsole.cc
index 258afd8..e8e76c7 100644
--- a/aos/atom_code/starter/netconsole.cc
+++ b/aos/linux_code/starter/netconsole.cc
@@ -11,7 +11,7 @@
#include "aos/common/logging/logging_impl.h"
#include "aos/common/util.h"
-#include "aos/atom_code/configuration.h"
+#include "aos/linux_code/configuration.h"
namespace aos {
namespace {
diff --git a/aos/atom_code/starter/starter.cc b/aos/linux_code/starter/starter.cc
similarity index 99%
rename from aos/atom_code/starter/starter.cc
rename to aos/linux_code/starter/starter.cc
index bef4e73..187acc3 100644
--- a/aos/atom_code/starter/starter.cc
+++ b/aos/linux_code/starter/starter.cc
@@ -27,7 +27,7 @@
#include "aos/common/logging/logging.h"
#include "aos/common/logging/logging_impl.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
#include "aos/common/unique_malloc_ptr.h"
#include "aos/common/time.h"
#include "aos/common/once.h"
diff --git a/aos/atom_code/starter/starter.gyp b/aos/linux_code/starter/starter.gyp
similarity index 87%
rename from aos/atom_code/starter/starter.gyp
rename to aos/linux_code/starter/starter.gyp
index f494993..2419b33 100644
--- a/aos/atom_code/starter/starter.gyp
+++ b/aos/linux_code/starter/starter.gyp
@@ -8,7 +8,7 @@
],
'dependencies': [
'<(AOS)/build/aos.gyp:logging',
- '<(AOS)/atom_code/atom_code.gyp:configuration',
+ '<(AOS)/linux_code/linux_code.gyp:configuration',
'<(AOS)/common/common.gyp:util',
],
},
@@ -19,7 +19,7 @@
'starter.cc',
],
'dependencies': [
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'<(EXTERNALS):libevent',
'<(AOS)/build/aos.gyp:logging',
'<(AOS)/common/common.gyp:once',
diff --git a/aos/atom_code/starter/starter.sh b/aos/linux_code/starter/starter.sh
similarity index 100%
rename from aos/atom_code/starter/starter.sh
rename to aos/linux_code/starter/starter.sh
diff --git a/aos/atom_code/starter/starter_loop.sh b/aos/linux_code/starter/starter_loop.sh
similarity index 100%
rename from aos/atom_code/starter/starter_loop.sh
rename to aos/linux_code/starter/starter_loop.sh
diff --git a/aos/atom_code/starter/testing_list.txt b/aos/linux_code/starter/testing_list.txt
similarity index 100%
rename from aos/atom_code/starter/testing_list.txt
rename to aos/linux_code/starter/testing_list.txt
diff --git a/aos/atom_code/thread_local.h b/aos/linux_code/thread_local.h
similarity index 75%
rename from aos/atom_code/thread_local.h
rename to aos/linux_code/thread_local.h
index 9563a87..503e18c 100644
--- a/aos/atom_code/thread_local.h
+++ b/aos/linux_code/thread_local.h
@@ -1,5 +1,5 @@
-#ifndef AOS_ATOM_CODE_THREAD_LOCAL_H_
-#define AOS_ATOM_CODE_THREAD_LOCAL_H_
+#ifndef AOS_LINUX_CODE_THREAD_LOCAL_H_
+#define AOS_LINUX_CODE_THREAD_LOCAL_H_
// The storage class to use when declaring thread-local variables. This provides
// a single place to change it if/when we want to switch to something standard.
@@ -10,4 +10,4 @@
// 12/18/12.
#define AOS_THREAD_LOCAL __thread
-#endif // AOS_ATOM_CODE_THREAD_LOCAL_H_
+#endif // AOS_LINUX_CODE_THREAD_LOCAL_H_
diff --git a/aos/atom_code/input/input.gyp b/aos/prime/input/input.gyp
similarity index 100%
rename from aos/atom_code/input/input.gyp
rename to aos/prime/input/input.gyp
diff --git a/aos/atom_code/input/joystick_input.cc b/aos/prime/input/joystick_input.cc
similarity index 97%
rename from aos/atom_code/input/joystick_input.cc
rename to aos/prime/input/joystick_input.cc
index 97b2c95..6439dbc 100644
--- a/aos/atom_code/input/joystick_input.cc
+++ b/aos/prime/input/joystick_input.cc
@@ -1,4 +1,4 @@
-#include "aos/atom_code/input/joystick_input.h"
+#include "aos/prime/input/joystick_input.h"
#include <string.h>
diff --git a/aos/atom_code/input/joystick_input.h b/aos/prime/input/joystick_input.h
similarity index 78%
rename from aos/atom_code/input/joystick_input.h
rename to aos/prime/input/joystick_input.h
index de0ed9e..17fdbbe 100644
--- a/aos/atom_code/input/joystick_input.h
+++ b/aos/prime/input/joystick_input.h
@@ -1,5 +1,5 @@
-#ifndef AOS_ATOM_CODE_INPUT_JOYSTICKS_INPUT_H_
-#define AOS_ATOM_CODE_INPUT_JOYSTICKS_INPUT_H_
+#ifndef AOS_LINUX_CODE_INPUT_JOYSTICKS_INPUT_H_
+#define AOS_LINUX_CODE_INPUT_JOYSTICKS_INPUT_H_
#include "aos/common/input/driver_station_data.h"
@@ -23,4 +23,4 @@
} // namespace input
} // namespace aos
-#endif // AOS_ATOM_CODE_INPUT_JOYSTICKS_INPUT_H_
+#endif // AOS_LINUX_CODE_INPUT_JOYSTICKS_INPUT_H_
diff --git a/aos/atom_code/output/motor_output.cc b/aos/prime/output/motor_output.cc
similarity index 98%
rename from aos/atom_code/output/motor_output.cc
rename to aos/prime/output/motor_output.cc
index e16bbb5..a532183 100644
--- a/aos/atom_code/output/motor_output.cc
+++ b/aos/prime/output/motor_output.cc
@@ -1,4 +1,4 @@
-#include "aos/atom_code/output/motor_output.h"
+#include "aos/prime/output/motor_output.h"
#include <math.h>
diff --git a/aos/atom_code/output/motor_output.h b/aos/prime/output/motor_output.h
similarity index 95%
rename from aos/atom_code/output/motor_output.h
rename to aos/prime/output/motor_output.h
index 116e791..53bdc83 100644
--- a/aos/atom_code/output/motor_output.h
+++ b/aos/prime/output/motor_output.h
@@ -1,5 +1,5 @@
-#ifndef AOS_ATOM_CODE_OUTPUT_MOTOR_OUTPUT_H_
-#define AOS_ATOM_CODE_OUTPUT_MOTOR_OUTPUT_H_
+#ifndef AOS_LINUX_CODE_OUTPUT_MOTOR_OUTPUT_H_
+#define AOS_LINUX_CODE_OUTPUT_MOTOR_OUTPUT_H_
#include <stdint.h>
#include <string.h>
diff --git a/aos/atom_code/output/motor_output_test.cc b/aos/prime/output/motor_output_test.cc
similarity index 91%
rename from aos/atom_code/output/motor_output_test.cc
rename to aos/prime/output/motor_output_test.cc
index 1e8d5fb..52a5091 100644
--- a/aos/atom_code/output/motor_output_test.cc
+++ b/aos/prime/output/motor_output_test.cc
@@ -1,6 +1,6 @@
-#include "gtest/gtest.h"
+#include "aos/prime/output/motor_output.h"
-#include "aos/atom_code/output/motor_output.h"
+#include "gtest/gtest.h"
namespace aos {
namespace testing {
diff --git a/aos/prime/output/output.gyp b/aos/prime/output/output.gyp
new file mode 100644
index 0000000..b1e4b79
--- /dev/null
+++ b/aos/prime/output/output.gyp
@@ -0,0 +1,32 @@
+{
+ 'targets': [
+ {
+ 'target_name': 'motor_output',
+ 'type': 'static_library',
+ 'sources': [
+ 'motor_output.cc',
+ ],
+ 'dependencies': [
+ '<(AOS)/common/network/network.gyp:socket',
+ '<(AOS)/common/common.gyp:timing',
+ '<(EXTERNALS):WPILib-NetworkRobotValues',
+ '<(AOS)/build/aos.gyp:logging',
+ ],
+ 'export_dependent_settings': [
+ '<(AOS)/common/network/network.gyp:socket',
+ '<(EXTERNALS):WPILib-NetworkRobotValues',
+ ],
+ },
+ {
+ 'target_name': 'motor_output_test',
+ 'type': 'executable',
+ 'sources': [
+ 'motor_output_test.cc',
+ ],
+ 'dependencies': [
+ 'motor_output',
+ '<(EXTERNALS):gtest',
+ ],
+ },
+ ],
+}
diff --git a/bbb_cape/src/bbb/bbb.gyp b/bbb_cape/src/bbb/bbb.gyp
index 1722bce..9e24f0c 100644
--- a/bbb_cape/src/bbb/bbb.gyp
+++ b/bbb_cape/src/bbb/bbb.gyp
@@ -126,7 +126,7 @@
'dependencies': [
'uart_reader',
'<(AOS)/build/aos.gyp:logging',
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'packet_finder',
'data_struct',
'<(AOS)/common/common.gyp:time',
diff --git a/bbb_cape/src/bbb/uart_reader_main.cc b/bbb_cape/src/bbb/uart_reader_main.cc
index 46c8a8e..9178209 100644
--- a/bbb_cape/src/bbb/uart_reader_main.cc
+++ b/bbb_cape/src/bbb/uart_reader_main.cc
@@ -1,7 +1,7 @@
#include <stdint.h>
#include <inttypes.h>
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
#include "aos/common/logging/logging_impl.h"
#include "aos/common/time.h"
diff --git a/frc971/atom_code/build.sh b/frc971/atom_code/build.sh
deleted file mode 100755
index 42229b2..0000000
--- a/frc971/atom_code/build.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/bash
-
-cd $(dirname $0)
-
-../../aos/build/build.sh atom atom_code.gyp no atom "$@"
diff --git a/frc971/autonomous/auto_main.cc b/frc971/autonomous/auto_main.cc
index 8ce82f8..e8914c6 100644
--- a/frc971/autonomous/auto_main.cc
+++ b/frc971/autonomous/auto_main.cc
@@ -2,7 +2,7 @@
#include "aos/common/control_loop/Timing.h"
#include "aos/common/time.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
#include "aos/common/logging/logging.h"
#include "frc971/autonomous/auto.q.h"
#include "frc971/autonomous/auto.h"
diff --git a/frc971/autonomous/autonomous.gyp b/frc971/autonomous/autonomous.gyp
index 526904c..c581198 100644
--- a/frc971/autonomous/autonomous.gyp
+++ b/frc971/autonomous/autonomous.gyp
@@ -46,7 +46,7 @@
'auto_main.cc',
],
'dependencies': [
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'auto_queue',
'auto_lib',
],
diff --git a/frc971/control_loops/angle_adjust/angle_adjust.gyp b/frc971/control_loops/angle_adjust/angle_adjust.gyp
index 323cb56..afdabb2 100644
--- a/frc971/control_loops/angle_adjust/angle_adjust.gyp
+++ b/frc971/control_loops/angle_adjust/angle_adjust.gyp
@@ -58,7 +58,7 @@
'<(AOS)/common/common.gyp:time',
'<(AOS)/common/common.gyp:timing',
'angle_adjust_loop',
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'<(AOS)/common/common.gyp:queues',
],
},
@@ -71,7 +71,7 @@
'dependencies': [
'angle_adjust_lib',
'angle_adjust_loop',
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
],
},
],
diff --git a/frc971/control_loops/angle_adjust/angle_adjust_csv.cc b/frc971/control_loops/angle_adjust/angle_adjust_csv.cc
index 109af56..5da6ca9 100644
--- a/frc971/control_loops/angle_adjust/angle_adjust_csv.cc
+++ b/frc971/control_loops/angle_adjust/angle_adjust_csv.cc
@@ -2,7 +2,7 @@
#include "aos/common/control_loop/Timing.h"
#include "aos/common/time.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
#include "frc971/control_loops/angle_adjust/angle_adjust_motor.q.h"
using ::frc971::control_loops::angle_adjust;
diff --git a/frc971/control_loops/angle_adjust/angle_adjust_main.cc b/frc971/control_loops/angle_adjust/angle_adjust_main.cc
index c7f725b..1a90749 100644
--- a/frc971/control_loops/angle_adjust/angle_adjust_main.cc
+++ b/frc971/control_loops/angle_adjust/angle_adjust_main.cc
@@ -1,6 +1,6 @@
#include "frc971/control_loops/angle_adjust/angle_adjust.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
int main() {
::aos::Init();
diff --git a/frc971/control_loops/drivetrain/drivetrain.gyp b/frc971/control_loops/drivetrain/drivetrain.gyp
index 53bb16c..7821c39 100644
--- a/frc971/control_loops/drivetrain/drivetrain.gyp
+++ b/frc971/control_loops/drivetrain/drivetrain.gyp
@@ -77,7 +77,7 @@
'drivetrain_main.cc',
],
'dependencies': [
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'drivetrain_lib',
'drivetrain_loop',
],
diff --git a/frc971/control_loops/drivetrain/drivetrain_main.cc b/frc971/control_loops/drivetrain/drivetrain_main.cc
index e3fc306..f3f0ddd 100644
--- a/frc971/control_loops/drivetrain/drivetrain_main.cc
+++ b/frc971/control_loops/drivetrain/drivetrain_main.cc
@@ -1,6 +1,6 @@
#include "frc971/control_loops/drivetrain/drivetrain.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
int main() {
::aos::Init();
diff --git a/frc971/control_loops/index/index.gyp b/frc971/control_loops/index/index.gyp
index 014f266..dc1c06d 100644
--- a/frc971/control_loops/index/index.gyp
+++ b/frc971/control_loops/index/index.gyp
@@ -60,7 +60,7 @@
'index_main.cc',
],
'dependencies': [
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'index_lib',
'index_loop',
],
diff --git a/frc971/control_loops/index/index_main.cc b/frc971/control_loops/index/index_main.cc
index c542268..321d74c 100644
--- a/frc971/control_loops/index/index_main.cc
+++ b/frc971/control_loops/index/index_main.cc
@@ -1,6 +1,6 @@
#include "frc971/control_loops/index/index.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
int main() {
::aos::Init();
diff --git a/frc971/control_loops/matlab/drivetrain_controller.m b/frc971/control_loops/matlab/drivetrain_controller.m
index b51af99..f9ee4be 100644
--- a/frc971/control_loops/matlab/drivetrain_controller.m
+++ b/frc971/control_loops/matlab/drivetrain_controller.m
@@ -46,7 +46,7 @@
% Plot what we computed
-fd = fopen('/home/aschuh/frc971/2012/trunk/src/atom_code/control_loops/Drivetrain.mat', 'w');
+fd = fopen('/home/aschuh/frc971/2012/trunk/src/prime/control_loops/Drivetrain.mat', 'w');
n = 1;
sm = [];
writeMatHeader(fd, size(dm.a, 1), size(dm.b, 2));
diff --git a/frc971/control_loops/shooter/shooter.gyp b/frc971/control_loops/shooter/shooter.gyp
index 64e3a20..70f635f 100644
--- a/frc971/control_loops/shooter/shooter.gyp
+++ b/frc971/control_loops/shooter/shooter.gyp
@@ -70,7 +70,7 @@
'shooter_main.cc',
],
'dependencies': [
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'shooter_lib',
'shooter_loop',
],
diff --git a/frc971/control_loops/shooter/shooter_main.cc b/frc971/control_loops/shooter/shooter_main.cc
index c52db73..e4e25ad 100644
--- a/frc971/control_loops/shooter/shooter_main.cc
+++ b/frc971/control_loops/shooter/shooter_main.cc
@@ -1,6 +1,6 @@
#include "frc971/control_loops/shooter/shooter.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
int main() {
::aos::Init();
diff --git a/frc971/control_loops/wrist/wrist.gyp b/frc971/control_loops/wrist/wrist.gyp
index d66bf6c..60895ca 100644
--- a/frc971/control_loops/wrist/wrist.gyp
+++ b/frc971/control_loops/wrist/wrist.gyp
@@ -58,7 +58,7 @@
'wrist_main.cc',
],
'dependencies': [
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'wrist_lib',
'wrist_loop',
],
diff --git a/frc971/control_loops/wrist/wrist_main.cc b/frc971/control_loops/wrist/wrist_main.cc
index 0aeec42..3da6d62 100644
--- a/frc971/control_loops/wrist/wrist_main.cc
+++ b/frc971/control_loops/wrist/wrist_main.cc
@@ -1,6 +1,6 @@
#include "frc971/control_loops/wrist/wrist.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
int main() {
::aos::Init();
diff --git a/frc971/crio/dumb_main.cc b/frc971/crio/dumb_main.cc
index 8cf0eb4..08c653e 100644
--- a/frc971/crio/dumb_main.cc
+++ b/frc971/crio/dumb_main.cc
@@ -14,10 +14,10 @@
public:
MyRobot() : NetworkRobot(static_cast<uint16_t>(::aos::NetworkPort::kMotors),
::MakeIPAddress(::GetOwnIPAddress(),
- ::aos::NetworkAddress::kAtom),
+ ::aos::NetworkAddress::kPrime),
static_cast<uint16_t>(::aos::NetworkPort::kDS),
::MakeIPAddress(::GetOwnIPAddress(),
- ::aos::NetworkAddress::kAtom)) {}
+ ::aos::NetworkAddress::kPrime)) {}
};
} // namespace frc971
diff --git a/frc971/input/JoystickReader.cc b/frc971/input/JoystickReader.cc
index b29e17d..8f65cdd 100644
--- a/frc971/input/JoystickReader.cc
+++ b/frc971/input/JoystickReader.cc
@@ -3,8 +3,8 @@
#include <unistd.h>
#include <math.h>
-#include "aos/atom_code/init.h"
-#include "aos/atom_code/input/joystick_input.h"
+#include "aos/linux_code/init.h"
+#include "aos/prime/input/joystick_input.h"
#include "aos/common/logging/logging.h"
#include "frc971/control_loops/drivetrain/drivetrain.q.h"
diff --git a/frc971/input/input.gyp b/frc971/input/input.gyp
index d26f851..33bf3c4 100644
--- a/frc971/input/input.gyp
+++ b/frc971/input/input.gyp
@@ -7,8 +7,8 @@
'JoystickReader.cc',
],
'dependencies': [
- '<(AOS)/atom_code/input/input.gyp:joystick_input',
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/prime/input/input.gyp:joystick_input',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'<(AOS)/build/aos.gyp:logging',
'<(DEPTH)/frc971/control_loops/drivetrain/drivetrain.gyp:drivetrain_loop',
@@ -34,7 +34,7 @@
'<(DEPTH)/frc971/control_loops/wrist/wrist.gyp:wrist_loop',
'<(DEPTH)/frc971/control_loops/index/index.gyp:index_loop',
'<(DEPTH)/frc971/control_loops/shooter/shooter.gyp:shooter_loop',
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'<(AOS)/build/aos.gyp:logging',
'<(AOS)/common/util/util.gyp:wrapping_counter',
'<(DEPTH)/frc971/frc971.gyp:constants',
diff --git a/frc971/input/sensor_receiver.cc b/frc971/input/sensor_receiver.cc
index 6fdd2e6..2f5c450 100644
--- a/frc971/input/sensor_receiver.cc
+++ b/frc971/input/sensor_receiver.cc
@@ -1,6 +1,6 @@
#include <inttypes.h>
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
#include "aos/common/logging/logging.h"
#include "aos/common/util/wrapping_counter.h"
#include "aos/common/time.h"
diff --git a/frc971/output/CameraServer.cc b/frc971/output/CameraServer.cc
index 93a83c7..35b16b4 100644
--- a/frc971/output/CameraServer.cc
+++ b/frc971/output/CameraServer.cc
@@ -1,12 +1,12 @@
#include <string.h>
-#include "aos/atom_code/output/HTTPServer.h"
-#include "aos/atom_code/output/evhttp_ctemplate_emitter.h"
-#include "aos/atom_code/output/ctemplate_cache.h"
+#include "aos/linux_code/output/HTTPServer.h"
+#include "aos/linux_code/output/evhttp_ctemplate_emitter.h"
+#include "aos/linux_code/output/ctemplate_cache.h"
#include "ctemplate/template.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
#include "aos/common/logging/logging.h"
-#include "aos/atom_code/configuration.h"
+#include "aos/linux_code/configuration.h"
#include "frc971/constants.h"
diff --git a/frc971/output/AtomMotorWriter.cc b/frc971/output/motor_writer.cc
similarity index 97%
rename from frc971/output/AtomMotorWriter.cc
rename to frc971/output/motor_writer.cc
index 3ba3593..b9f5e6f 100644
--- a/frc971/output/AtomMotorWriter.cc
+++ b/frc971/output/motor_writer.cc
@@ -2,9 +2,9 @@
#include <string.h>
#include <unistd.h>
-#include "aos/atom_code/output/motor_output.h"
+#include "aos/prime/output/motor_output.h"
#include "aos/common/logging/logging.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
#include "frc971/queues/Piston.q.h"
#include "frc971/control_loops/drivetrain/drivetrain.q.h"
diff --git a/frc971/output/output.gyp b/frc971/output/output.gyp
index 1a8b1c9..3474f33 100644
--- a/frc971/output/output.gyp
+++ b/frc971/output/output.gyp
@@ -7,11 +7,11 @@
'CameraServer.cc',
],
'dependencies': [
- '<(AOS)/atom_code/output/output.gyp:http_server',
+ '<(AOS)/linux_code/output/output.gyp:http_server',
'../frc971.gyp:constants',
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'<(AOS)/build/aos.gyp:logging',
- '<(AOS)/atom_code/atom_code.gyp:configuration',
+ '<(AOS)/linux_code/linux_code.gyp:configuration',
],
'copies': [
{
@@ -26,11 +26,11 @@
'target_name': 'MotorWriter',
'type': '<(aos_target)',
'sources': [
- 'AtomMotorWriter.cc'
+ 'motor_writer.cc'
],
'dependencies': [
- '<(AOS)/atom_code/output/output.gyp:motor_output',
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/prime/output/output.gyp:motor_output',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'<(AOS)/build/aos.gyp:logging',
'<(DEPTH)/frc971/control_loops/angle_adjust/angle_adjust.gyp:angle_adjust_loop',
'<(DEPTH)/frc971/control_loops/wrist/wrist.gyp:wrist_loop',
diff --git a/frc971/atom_code/.gitignore b/frc971/prime/.gitignore
similarity index 100%
rename from frc971/atom_code/.gitignore
rename to frc971/prime/.gitignore
diff --git a/frc971/prime/build.sh b/frc971/prime/build.sh
new file mode 100755
index 0000000..81ae16a
--- /dev/null
+++ b/frc971/prime/build.sh
@@ -0,0 +1,5 @@
+#!/bin/bash
+
+cd $(dirname $0)
+
+../../aos/build/build.sh linux prime.gyp no prime "$@"
diff --git a/frc971/atom_code/camera/camera.gyp b/frc971/prime/camera/camera.gyp
similarity index 84%
rename from frc971/atom_code/camera/camera.gyp
rename to frc971/prime/camera/camera.gyp
index 6dc9530..6a6b13c 100644
--- a/frc971/atom_code/camera/camera.gyp
+++ b/frc971/prime/camera/camera.gyp
@@ -7,11 +7,11 @@
'manifest': 'frc971_camera.mf',
},
'dependencies': [
- '<(AOS)/atom_code/camera/camera.gyp:aos_camera',
+ '<(AOS)/linux_code/camera/camera.gyp:aos_camera',
'<(DEPTH)/frc971/queues/queues.gyp:frc971_queues_so',
],
'export_dependent_settings': [
- '<(AOS)/atom_code/camera/camera.gyp:aos_camera',
+ '<(AOS)/linux_code/camera/camera.gyp:aos_camera',
'<(DEPTH)/frc971/queues/queues.gyp:frc971_queues_so',
],
'includes': ['../../../aos/build/java.gypi'],
diff --git a/frc971/atom_code/camera/frc971_camera.mf b/frc971/prime/camera/frc971_camera.mf
similarity index 100%
rename from frc971/atom_code/camera/frc971_camera.mf
rename to frc971/prime/camera/frc971_camera.mf
diff --git a/frc971/atom_code/camera/org/spartanrobotics/camera/QueueReader.java b/frc971/prime/camera/org/spartanrobotics/camera/QueueReader.java
similarity index 100%
rename from frc971/atom_code/camera/org/spartanrobotics/camera/QueueReader.java
rename to frc971/prime/camera/org/spartanrobotics/camera/QueueReader.java
diff --git a/frc971/atom_code/camera/org/spartanrobotics/camera/QueueTest.java b/frc971/prime/camera/org/spartanrobotics/camera/QueueTest.java
similarity index 100%
rename from frc971/atom_code/camera/org/spartanrobotics/camera/QueueTest.java
rename to frc971/prime/camera/org/spartanrobotics/camera/QueueTest.java
diff --git a/frc971/atom_code/camera/org/spartanrobotics/camera/Test.java b/frc971/prime/camera/org/spartanrobotics/camera/Test.java
similarity index 100%
rename from frc971/atom_code/camera/org/spartanrobotics/camera/Test.java
rename to frc971/prime/camera/org/spartanrobotics/camera/Test.java
diff --git a/frc971/atom_code/atom_code.gyp b/frc971/prime/prime.gyp
similarity index 96%
rename from frc971/atom_code/atom_code.gyp
rename to frc971/prime/prime.gyp
index d60b26b..b1af09e 100644
--- a/frc971/atom_code/atom_code.gyp
+++ b/frc971/prime/prime.gyp
@@ -4,7 +4,7 @@
'target_name': 'All',
'type': 'none',
'dependencies': [
- '<(AOS)/build/aos_all.gyp:Atom',
+ '<(AOS)/build/aos_all.gyp:Prime',
'../control_loops/drivetrain/drivetrain.gyp:drivetrain',
'../control_loops/drivetrain/drivetrain.gyp:drivetrain_lib_test',
'../control_loops/wrist/wrist.gyp:wrist',
diff --git a/frc971/atom_code/scripts/start_list.txt b/frc971/prime/scripts/start_list.txt
similarity index 100%
rename from frc971/atom_code/scripts/start_list.txt
rename to frc971/prime/scripts/start_list.txt
diff --git a/output/.gitignore b/output/.gitignore
index 30b6ce2..399a1c9 100644
--- a/output/.gitignore
+++ b/output/.gitignore
@@ -1,4 +1,4 @@
-/atom/
+/prime/
/crio/
/compiled-*/
/ip_base.txt
diff --git a/vision/BinaryServer.cpp b/vision/BinaryServer.cpp
index 18cf85b..c21a8b3 100644
--- a/vision/BinaryServer.cpp
+++ b/vision/BinaryServer.cpp
@@ -12,7 +12,7 @@
#include <arpa/inet.h>
#include "aos/externals/libjpeg/include/jpeglib.h"
-#include "aos/atom_code/camera/Buffers.h"
+#include "aos/linux_code/camera/Buffers.h"
#include "aos/common/time.h"
namespace frc971 {
diff --git a/vision/GoalMaster.cpp b/vision/GoalMaster.cpp
index 5c8fad8..8bf1aba 100644
--- a/vision/GoalMaster.cpp
+++ b/vision/GoalMaster.cpp
@@ -1,7 +1,7 @@
#include "math.h"
#include "aos/common/time.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/init.h"
#include "aos/common/logging/logging.h"
#include "frc971/queues/GyroAngle.q.h"
diff --git a/vision/OpenCVWorkTask.cpp b/vision/OpenCVWorkTask.cpp
index 8fc11eb..982d670 100644
--- a/vision/OpenCVWorkTask.cpp
+++ b/vision/OpenCVWorkTask.cpp
@@ -14,8 +14,8 @@
#include "libjpeg/include/jpeglib.h"
#include "aos/common/time.h"
-#include "aos/atom_code/camera/Buffers.h"
-#include "aos/atom_code/init.h"
+#include "aos/linux_code/camera/Buffers.h"
+#include "aos/linux_code/init.h"
#include "aos/common/logging/logging.h"
#include "vision/OpenCVWorkTask.h"
diff --git a/vision/vision.gyp b/vision/vision.gyp
index df27045..81e5562 100644
--- a/vision/vision.gyp
+++ b/vision/vision.gyp
@@ -11,12 +11,12 @@
'JPEGRoutines.cpp',
],
'dependencies': [
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'<(AOS)/common/common.gyp:time',
'<(EXTERNALS):libevent',
'<(EXTERNALS):libjpeg',
'<(EXTERNALS):opencv',
- '<(AOS)/atom_code/camera/camera.gyp:buffers',
+ '<(AOS)/linux_code/camera/camera.gyp:buffers',
'<(DEPTH)/frc971/queues/queues.gyp:queues',
],
},
@@ -28,7 +28,7 @@
'SensorProcessor.cpp',
],
'dependencies': [
- '<(AOS)/atom_code/atom_code.gyp:init',
+ '<(AOS)/linux_code/linux_code.gyp:init',
'<(AOS)/common/common.gyp:time',
'<(DEPTH)/frc971/queues/queues.gyp:queues',
'<(AOS)/build/aos.gyp:logging',