Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MINIFI-218: Support for GPSD integration #52

Closed
wants to merge 3 commits into from
Closed

MINIFI-218: Support for GPSD integration #52

wants to merge 3 commits into from

Conversation

jdye64
Copy link
Contributor

@jdye64 jdye64 commented Feb 21, 2017

No description provided.

Copy link
Contributor

@phrocker phrocker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nitpicks, I wouldn't necessarily decline because of them.


private:
//! Logger
Logger *_logger;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

logger_ is the google cpp style guide approach. Same with all of these.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, I agree with you about this. I'll change them to make them follow the google guidelines. Best to start those new habits now =)

return;
}

for (;;) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you wait on a condition in case this processor is forced shutdown.

#include "../FlowFileRecord.h"


TEST_CASE("Test GPSD Create", "[TestGPSEventRecord]"){
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would we be able to create some processor specific tests?

Copy link
Contributor Author

@jdye64 jdye64 Feb 23, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

certainly. I'm wondering the best way to do this at the moment. I want to use gpsfake for this but thinking through the best way to do so. Using gpsfake would require another system dependency since it is an extra GPSD service itself. That would be the most robust way for testing this however

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might make sense to roll in a mocking framework? https://github.com/eranpeer/FakeIt seems similarly lightweight to catch. @phrocker any recommendations or preferences?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@apiri and @phrocker I'm leaning on you guys for recommendations around the tests here. I was planning on using http://www.catb.org/gpsd/gpsfake.html

Copy link
Contributor

@phrocker phrocker Mar 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah I initially approved because I wasn't sure there was a good way to test this. I didn't know about gpsfake, and would love if there was a way to roll that in. Woe is me thinking there isn't a good way to test something.

@apiri
Copy link
Member

apiri commented Feb 23, 2017

Could we also get travis updated to include this in the build by default?

README.md Outdated
@@ -110,6 +118,9 @@ $ brew install cmake \
leveldb \
ossp-uuid \
boost \ openssl

# If building with GPS support
$ brew install gps
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Believe this should be gpsd

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Its actually is just gps for OS X. Its the gps.h headers and such that is needed. However it might make sense to also install gpsd so I'll add that

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm... gps doesn't show up as a package for me in brew.

brew search gps
bgpstream         gpsbabel          gpsd ✔            gpsim             osm-gps-map
Caskroom/cask/gpsdump

Am I overlooking something?

#include "ProcessContext.h"
#include "ProcessSession.h"

#include <libgpsmm.h>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Having issues on OS X 10.11 with the following:

In file included from /Users/apiri/Development/code/nifi-minifi-cpp/libminifi/src/gps/GetGPS.cpp:43:
In file included from /usr/local/include/libgpsmm.h:12:
/usr/local/include/gps.h:1887:8: error: definition of type 'policy_t' conflicts with
      typedef of the same name
struct policy_t {
       ^
/usr/include/mach/policy.h:79:17: note: 'policy_t' declared here
typedef int                             policy_t;
                                        ^
In file included from /Users/apiri/Development/code/nifi-minifi-cpp/libminifi/src/gps/GetGPS.cpp:43:
In file included from /usr/local/include/libgpsmm.h:12:
/usr/local/include/gps.h:2014:12: error: elaborated type refers to a typedef
    struct policy_t policy;     /* our listening policy */
           ^
/usr/include/mach/policy.h:79:17: note: declared here
typedef int                             policy_t;
                                        ^
2 errors generated.
make[2]: *** [libminifi/CMakeFiles/minifi_gps.dir/src/gps/GetGPS.cpp.o] Error 1

README.md Outdated
@@ -91,6 +93,9 @@ $ yum install cmake \
leveldb-devel leveldb \
libuuid libuuid-devel \
boost-devel \ libssl-dev

# If building with GPS support
$ yum install libgps-devel
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Believe this should gpsd-devel for yum based distros

@@ -289,6 +289,12 @@ Processor *FlowControllerImpl::createProcessor(std::string name, uuid_t uuid) {
return NULL;
}

#ifdef BUILD_GPS
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This was not very smart of me ... this will cause an error to be thrown that the processor of type GetGPS does not exist at runtime because the last else condition will be triggered before this. I need to move this higher up the condition before the last else.

@jdye64 jdye64 changed the title Support for GPSD integration MINIFI-218: Support for GPSD integration Mar 2, 2017
@jdye64
Copy link
Contributor Author

jdye64 commented Oct 9, 2017

This poor PR has been neglected. I think that now @phrocker PR for extensions has been committed its a good time to make another pass at this and place it in that extensions format

@phrocker
Copy link
Contributor

phrocker commented Nov 7, 2017

@jdye64 I think this PR has been superseded. I've taken your PR in #172 and updated it. This can be closed.

@achristianson
Copy link
Contributor

Should this PR be closed? I believe we got gpsd in with another recent commit.

@achristianson
Copy link
Contributor

f09ad61 is in master

@phrocker
Copy link
Contributor

phrocker commented Nov 17, 2017

@achristianson yes per the comment nine days ago. I've spoken to Jeremy offline.

@jdye64
Copy link
Contributor Author

jdye64 commented Dec 13, 2017

Sorry for the late response here folks. I'm going to close this issue because as stated it has already been taken care of elsewhere.

@jdye64 jdye64 closed this Dec 13, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants