Comments (9)
Hi Malte,
You can only get it from an AisPacket (Which encapsulates an AisMessage)
The whole source id thing is a non-standard but we use internally to distinguish between AIS data that comes in from different data sources.
from aislib.
You can see here, how we tag the AisPacket
Use AisPacket.getPacketTags().getSourceId() to get it
from aislib.
Exactly, I do the same... :)
I have hacked get/set SourceId into AisMessage and set them in AisReader - works...
So I can do aisMessage.getSourceId() in MessageHandler...
Any chance to get this merged in master?
Thanks for the quick reply! Greeting from Bremen 👍
mablae
from aislib.
AisPacket and AisMessage is layered much like, for example tcp/ip .
AisPacket contains all the metadata (tcp/ip header) + Ais Message (the payload).
AisMessage is strictly stuff that is in the AIS specification (payload).
Don't know if its clear?
Maybe you want to use AisPacket instead in those places?
from aislib.
The thing is that I need the Douplet Filter - That is only for AisMessages...
After that in my message handler I push the decoded message to a RabbitMq broker as a JSON Object. Then some other process fetches the messages from Rabbit and inserts them into Database.
I use RabbitMq as some Kind of "buffer"
from aislib.
Are you talking about dk.dma.ais.filter.DuplicateFilter?
Because it extends MessageFilterBase which both implements IPacketFilter and IMessageFilter
from aislib.
Oh, maybe I just need to dig deeper then. Thanks for your help!
from aislib.
No worries, let me know if you have any questions
from aislib.
Hey,
I refactored my code to do the casting to AisMessage after filtering in one AisPacket Consumer.
It works perfect! Thanks again. 👍
from aislib.
Related Issues (20)
- What is destination? HOT 1
- AisTcpReader has incomplete inheritance semantics
- Group tag block is only partially read since 0bba7e1 HOT 6
- AisLib is not building HOT 4
- Another error : AisLib building HOT 1
- About AisReaders.class
- Reading from AIS source: serial connection - missing
- Build Issues HOT 7
- How can I encode a NMEA data.
- VDM parser and decimal places HOT 1
- Decoder null pointer exception with AIS message type 5
- Decoder issue with user Id (MMSI) and MsgId HOT 1
- cannot complete build using manual build process HOT 1
- Message Type 25 Not Implemented HOT 5
- Out of sequence Error HOT 1
- AisLib v2.4 published with invalid dependencies to maven central repo HOT 3
- UDP Multicast Support HOT 1
- All is broken HOT 3
- removed
- Outdated README HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from aislib.