Is there anything like sending events

Hi folks,

I am new with this technology (2 weeks around) but already have a couple of ideas I want to realize and I already did.
Right now I finished my first library class and *.h file and see, it works.
But now questions come up.
About me, I am professional programmer for C#, still some skill in Delphi and VB only few in C or C++.

Right now, I am searching for something for my Arduino Uno to send something like an event.

Question 1:
Is it possible to create an Event inside a Class? And do you have a easy example for my understanding?

Thanks already here
Greetings to all

What sort of event?

Bar mitzvah?
Wedding?
Funeral?

To where?

As I wrote before, I have low knowledge of C or C++. In C# it is easy to create an Event, which you can fire if something happens.
Let's say there is a error within a class and you find.
You can do now ignore, which is bad, or you can fire an Event, which can be caught in your main routine, or wherever you want.
You even call this Event Wedding. If whatever happens in your Code, you can fire the Event Wedding and the Method, Class or Main routine in where you read that Event knows what is going on.

Thanks already here
Greetings to all

Are you talking about exception handling (try catch throw)?

Hi wildbill,

You can see it like this. It is not necessary to throw an Event within a try-catch-block, but yes, you can do so.

Thanks to you aarg,

this is so far what I was searching for. The only question and I quote myself here:

"Right now, I am searching for something for my Arduino Uno to send something like an event."

is this then working with that simple Language of an Arduino or less.
C++ is a powérful language, you even can develop visual Code with windows like Windows or Unix for example.
But sure you can not use a Dot.Net library, or code you would write for that.

So my question is still - Can I use Events within a class for the Arduino.

Many languages have this concept of communication, but I don't know yet about Arduino.

Arduino language is C++. Only a few very memory intensive features have been omitted from the implementations for smaller processors like on the UNO.

Of course, you will not see any libraries that produce bloated code, suitable only for PCs or servers.

I suggest that the code I linked to, will probably compile and run just fine on an Arduino, but I didn't look closely. It was really supposed to be just a starting point for investigation.

Thank you anyway, you are right, it is at least a point from where to start.

Be aware that there is a lot of power in the language that Arduino doesn't advertise. It's because it's supposed to be easy for beginners.

Oh that is a good point. Within that Reference, I thought this is a very poor system for programmers. Good to know that there is much more.

Ok thanks to all. I am finish.

Now how to close this Request?

Now how to close this Request?

Like this

wolfgangw:
Now how to close this Request?

Or you can edit your first post and add "ANSWERED" or "SOLVED" to the end of the thread title.