Our new official repo is on github
LCD Smartie version 5.6 is released!
Download it now: https://github.com/LCD-Smartie/LCDSmartie/releases

method descriptions?

Discuss anything to do with plugins

Moderators: _X7JAY7X_, caesar, IFR, mattcro, limbo

Post Reply
cloudykeith
Posts: 1
Joined: January 21st, 2008, 9:17 pm

method descriptions?

Post by cloudykeith »

Hi

I new here so here are my beginners questions.

I want to create my own plugin, probably using C#.

From what I read so far I think (please correct me if I'm wrong) that I create a dll that contains 1 to 20 functions, these functions can be added into the setup pages and called whenever required or called on a timer (default 300ms).

What are the method calls I can use to write stuff to the screen or cause bar graphs, images or whatever is available. I can't find any document on them.

Thanks for any help you can give me.

cheers

Keith
limbo
Plugin Author
Posts: 1604
Joined: February 13th, 2005, 7:38 pm
Location: Athens - Greece
Contact:

Post by limbo »

You have to use custom characters for output.
Search the forums about custom characters and learn how to define and call them. Then use your code to create inside your dll the custom character, and call them on the returned output.

Hope this is helpful. :)
mattcro
Forum Supporter
Posts: 590
Joined: March 8th, 2006, 1:58 pm
Location: Scotland

Post by mattcro »

You plugin cannot write directly to the screen (LCD/VFD). The plugin functions return strings that Smartie then uses in its output to the LCD. Smartie uses the plugin output string as if you had typed it into the screen config boxes, including custom characters and built-in functions (I think!!).

As Limbo says, for creating graphs or symbols, you must use custom characters (limited to a total of 8 on the screen at a time). There's info on using custom characters in the Smartie help pages. You should allow users to specify which custom character to allocate to your plugin, because there are only 8 custom character "slots" to share between nay plugins that need them.

The best way to learn about writing plugins is to download and examine the source code for any plugins that do someting similar to what you want to achieve. There are a few C# plugins on the forum that should provide a useful framework.

Happy coding!
Post Reply