[ell-i-developers] Re: Robot Framework Testing: Test Cases Design, Scripting and other Issues

  • From: Asif Sardar <engr.asif.sardar@xxxxxxxxxxxxxx>
  • To: ell-i-developers@xxxxxxxxxxxxx
  • Date: Thu, 24 Apr 2014 12:10:40 +0300

> Yes, you can call them directly.  If you link against the emulator, I
think you can simply call the APIs, without even considering
> the device initialisation, as the emulator does not currently implement
any kind of real peripheral state.

May I get some help regarding linking the c-python modules against the
emulator? I cannot call the Arduino functions directly from c-python code
files without linking against emulator and stm32 cores.

I have created a c-python module (e.g. c library *.so) for DigitalRead for
embedding c-type code in python and it works except for calling the real
arduino functions. For type conversion e.g. "int to string" or "string to
int", I am using C stdlib.




On Thu, Apr 24, 2014 at 10:41 AM, Pekka Nikander <pekka.nikander@xxxxxx>wrote:

> > I wanted to write C-python module for robot framework test case. I have
> some issues regarding it.
> >
> > - I wanted to encapsulate the arduino function calls (pin_mode(),
> digitalRead, digitalWrite etc) in the c-python module.
> > - Then I would use such module in actual test script to call appropriate
> function for C-emulator functionality e.g.
> >    -> Set Pin High would call module.pinHigh(...)
> >    -> Check Pin High would call module.checkPin(...)
> >    -> Set Pin Low would call module.pinLow(...)
> >    -> Check Pin Low would call module.checkPin(...)
> > - I am confused with the emulator functions such as setup(), loop() and
> main()
> >
> > In the test cases, every arduino API function is called from the
> setup(). If I want to call them sequentially according to robot framework
> test case, how would I do that? Any suggestions?
> >
> > May I call arduino API functions directly in c-python module, neglecting
> the setup(), loop() and main() ?
>
> Yes, you can call them directly.  If you link against the emulator, I
> think you can simply call the APIs, without even considering the device
> initialisation, as the emulator does not currently implement any kind of
> real peripheral state.  However, if the emulator is later enhanced with
> some peripheral state support, this may become an issue.
>
> However, if the same test cases are later run on the real hardware, then
> there will be the problem of how exactly to "call" the functions.  For that
> there will probably need to be some kind of an interpreter process on the
> device.  With 64k of flash we can probably include a small Lua interpreter
> or something.
>
> --Pekka
>
>
>
>


-- 



*With Best Regards,Asif Sardar.+358 43 8265795*

Other related posts: