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

Help #143

Open
aaroniza0 opened this issue Aug 30, 2023 · 2 comments
Open

Help #143

aaroniza0 opened this issue Aug 30, 2023 · 2 comments

Comments

@aaroniza0
Copy link

Hello,

I'm a senior computer engineering student working on my senior design project at the moment, my project requires reading some hardware through ethernet and the hardware lists xcp on udp/ip as the communication protocol.

My team has to use a raspberry pi, would this library achieve this and work on the pi? If so, how would I install it on my raspberry pi?

I'm new to reading github docs so I apologize if the answer is right in front of me.

Thanks,

aaroniza0

@aaroniza0
Copy link
Author

I'm looking at the xcp_skel.py script in the main branch but how and what would I send to pull data off of a daq?

@JavierCorado
Copy link

JavierCorado commented Sep 12, 2023

Considering that you have a Raspberry Pi enabled as an XCP slave device, you can use the Master interface. To my knowledge, pyXCP uses an abstract factory design pattern where you can do the following to use the ethernet transport layer via UDP:

from pyxcp.master import Master
xcp = Master("eth", {"HOST": "<slave_ip_address>", "PORT": <slave_port>, "PROTOCOL": "UDP"})

From there you can use the XCP commands as documented in: Vector's reference manual

The library already has support for: connect, disconnect short download and download (For writing values), and short upload and upload (For reading values).

Note: These commands are for polling data only (CTO messages), this will not retrieve anything from DAQ (DTO messages), perhaps @christoph2 has more input on this.

To further understand the library you can review Vector's documentation and take a look into the Master and Eth transport layers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants