ProcessorList: add newline at EOF

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
ProcessorList: only define colorIds once.

These should only be defined once. Instead of making them private to
ProcessorList, define them at global scope in ProcessorList.cpp, so
ProcessorListItem can use them too.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
ProcessorGraph.cpp: delete trailing whitespace

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
ProcessorGraph: fix logic when creating a new SourceNode.

createProcessorFromDescription() purports to only want one Intan demo
board at a time, but in fact bars multiple "File Reader" or "Custom
FPGA" subProcessorType values. We're adding hooks for a socket reader
here, and the current code would limit us to just one, which isn't
what we want.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
SourceNode.cpp: delete trailing whitespace.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
SourceNode: move specific thread includes from .h to .cpp

Just include the superclass (DataThreads/DataThread.h) header in
SourceNode.h, and move the includes for the existing subclasses into
SourceNode.cpp. This will keep users of SourceNode from depending on
implementation details of the various subclasses.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
SourceNode: don't leak eventChannelState.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
SourceNode.cpp: fix and refactor timerCallBack().

- We'll need this functionality exposed to fix other bugs elsewhere,
  so add new SourceNode::tryEnablingEditor().

- Use isReady() instead of dereferencing dataThread directly, since it
  may be NULL.

- Tweak console output to more accurately describe what's happening.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
SourceNode.cpp: cosmetics.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
SourceNode.h: delete trailing whitespace.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
SourceNode.h: remove unused member.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
FileReaderThread.h: fix misleading comment.

There's no such thing (type, variable, or otherwise) as a FileReader.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
FileReaderThread.cpp: whitespace fixups.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
FileReaderThread.h: remove unused fields.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
FileReaderThread: fix up input handling.

We still hardcode paths, but this is better.

- Initialize lengthOfInputFile and bufferSize to 0 in case input isn't
  found.

- Pull call to fopen out of ifdefs, so a future patch can just rip out
  the hardcoded path parts.

- If input _is_ found, then don't leak the file descriptor when the
  FileReaderThread gets deleted.

- If input isn't found, emit a sensible error message and bail in the
  constructor when the file isn't found. Have subsequent calls that
  try to use the FileReaderThread fail instead of crash.

Signed-off-by: Marti Bolivar <mbolivar@leaflabs.com>
Merge pull request #23 from mbolivar/processors-fixups

Processors fixups