Questions tagged [interfacing]
69 questions
27
votes
6 answers
C: cross-platform RS-232 serial library?
I am looking for an open source cross-platform library for working with the serial port in C, something along the lines of the awesome PySerial library (unfortunately I have to use C for this application).
I have only found this one:…

Hamza
- 2,313
- 7
- 25
- 33
17
votes
2 answers
What are the different options for interfacing C (or C++) with Python?
I know there are many ways to interface C function into Python: the Python C API, scipy.weave, ctypes, pyrex/cython, SWIG, Boost.Python, Psyco... What are each of them best for? Why should I use a given method instead of others? What should be…

Charles Brunet
- 21,797
- 24
- 83
- 124
8
votes
4 answers
programmatically controlling power sockets in the UK
It's very simple.
I want to plug a lamp into the UK mains supply.
I want to be able to power it on and off from software - say from serial port commands, or by running a command-line or something I can get to from ruby or Java.
I see lots written…

Dafydd Rees
- 6,941
- 3
- 39
- 48
6
votes
1 answer
How to Interfacing SWI Prolog to the Visual Studio 2012
I have a program that interfacing SWI-Prolog in Visual Studio. Previously, I used VS2010 (XP) and everything works fine. Then I upgrade my VS to become VS2012 (Win7) and now I have a problem in my code.
When it comes to the following…

Budi Hartanto
- 337
- 3
- 14
5
votes
1 answer
Use antivirus in the application to scan files
I was trying to develop an application in android which should use some antivirus engine (preferably opensource) to scan the files on the device. Have searched a lot on internet but couldn't found any. Anybody please suggest me some antivirus…

Kishore
- 952
- 2
- 11
- 31
4
votes
3 answers
C++ Interfacing queue or priority_queue as template parameter of a class
The explanation
I have a class (named Banana in the example) that would receive as a template argument (named Q in the example) a std::queue or a std::priority_queue. The only methods that are required for this argument are push(), pop() and…

pintarj
- 75
- 10
4
votes
2 answers
How to write python code to access input and output from a program written in C?
There is a program written and compiled in C, with typical data input from a Unix shell; on the other hand, I'm using Windows.
I need to send input to this program from the output of my own code written in Python.
What is the best way to go about…

tsribioguy
- 73
- 1
- 6
3
votes
1 answer
Is the exact layout of D structs defined?
Is the exact layout of D structs defined? That is, the exact offset of every member defined and in a compiler-independent way? That would mean that the compiler would, fortunately or unfortunately, depending on your needs, be forbidden to reorder…

Cecil Ward
- 597
- 2
- 13
2
votes
0 answers
Interfacing R and C++. Using an unordered map in R
I have recently started experimenting with interfacing C++ with R and I am struggling with the following C++ function. Specifically I am trying to use sourceCpp with the following .cpp file
#include
#include
#include…

John Duncan
- 21
- 2
2
votes
1 answer
Interfacing a native DDS system with ROS2
To communicate to a ROS2 based publisher and a RTI Connext based subscriber, both of them need to have a compatible QoS settings.
I am using RTI Connector for python and using the XML Application Creation to run the subscriber.
I run a talker_py in…

Vishal Rawat
- 325
- 1
- 3
- 19
2
votes
1 answer
Current State of MS Surface
I saw this question and it got me interested as surface caused a big fuss when Microsoft first showcased it, I worked for Microsoft at the time and we had a few of them in the office but they were always surrounded by people. But snce then I have…

kyndigs
- 3,074
- 1
- 18
- 22
2
votes
0 answers
Interfacing R and Python
I want to do Optimization in R of a function writen in Python. I already know that scipy has optimization functions, but I want some functions that are in R but not in scipy. The problem is that I have my function in a Python script, this function…

Kilian A.G.
- 123
- 1
- 6
2
votes
1 answer
OCaml - Compile OCaml and C code that uses Ctypes
I'm trying to learn how to call routines in C directly from OCaml code, using the Ctypes library.
I have this basic example with two files: hello.ml and hello.c.
hello.ml looks like this:
open Ctypes
open Foreign
let hello =
foreign "hello"…

Thomas Vanhelden
- 879
- 8
- 20
2
votes
1 answer
Converting an arduino code to matlab code
I'm trying to convert an arduino code into matlab code. The code is for a solar tracker that uses four LDRs that are connected in such a way that the servo motor will move so the average readings on the LDR will be zero. I found it here:…

Pandafied
- 21
- 1
- 2
2
votes
1 answer
How to write Python middleware for Java/Scala backend? How to connect Java and Python?
Let's say I've got a Java/Scala backend and I want to develop middleware in Python for it. I have no experience with developing middleware, but I presume it means that from within Python I would need to issue commands to the running Java/Scala…

kramer65
- 50,427
- 120
- 308
- 488