simulavr-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Simulavr-devel] using spisink


From: Lars Immisch
Subject: Re: [Simulavr-devel] using spisink
Date: Tue, 24 Apr 2012 14:35:38 +0200

Hi,

> Could you point me what steps I should follow to add this feature to simulavr?

I just noticed that pysimulavr.i contains no director for spisink, i.e. there 
is no statement like %feature("director") SpiSink;

That means SpiSink cannot be subclassed in Python without changes to the SWIG 
interface.

But you might be able to implement an SpiSink in Python, a PySimulationMember 
class exists for that purpose.

So, I see two ways to make an SpiSink in Python:

a) reimplement the logic of spisink.cpp in Python

b) in SpiSink.cpp, split the logic from the notification (i.e. call virtual 
metods instead of printing to cout), add the director to pysimulavr.i and 
subclass the new SpiSink class from Python.
  
- Lars


reply via email to

[Prev in Thread] Current Thread [Next in Thread]