?@Colin: I learned that Objective C objects are not complete copies of the class object. In other words, only the data and certain static structures are independent for each instance of a class. The methods are kept in a central location for all objects to use.
Is there any C+ implementation for embedded systems that use this feature?
Scope Example: The Cpp new operator is used to instantiate an object and it allocates resources. The pointer to this object can then be passed outside of the method and the method returns. The compiler does not automatically delete the object when the method returns because a reference to it exists outside of the method context.
? Colin In that example of page 15, if we want to call the fun1 function from some place in our code, do we call it using "astruct.fun1(arg)"? And must the fun1() functionbe declared public in order for it to be called from all other places in the code?
Using the constructor and destructor for allocation and deallocation respectively is still not a guarantee for avoiding memory leaks. The destructor is only called when the compiler can determine if the object has gone out of scope. There are numerous cases where the compiler cannot guarantee the object is out of scope and therefore does not call the destructor leaving it up to the coder's expertise to call the destructor using the delete operator.
C+ compiler usually emits code for parameterless constructor if no other constructors are present. Otherwise, the parameterless constructor needs to be explicitly defined. The C compiler also emits copy constructor and assignment operator?
? Colin What kind of code is contained in the constructor and destructor? Does the programmer write the bodies of the constructor and destructor functions? (Or are they somehow provided by the commpiler?)
@cpu: OK mystruct is the type of the class - struct mystruct. The 2 member functions have variations of that name to indicate that they are constructor and destructor. At the bottom I declare an instance of mystruct called astruct. Any clearer?
@cpu The mystruct() and ~mystruct() elements are the constructor and destructor functions for the struct. A struct is the same as a class in C+ except for the default member access control (public vs private).
? Colin: One observable obstacle to using OO tools such as C+ seems to be the structure of objects, i.e. defining correct parent objects that child objects can be derived from and inherit useful traits. Are you going to be discussion OO in this lecture series relative to object selection?
?Colin, on slide 15, please explain again your point of using mystruct as a struct declaration, and the same name mystruct as a function. What are you trying to show there? And what is the operation peformed by ~mystruct()?
@JimmyD Try one of the Atmel kits to get started. The ARM kits will use code from Atmel Studio. TI has Code Composer -- again the TI ARM TIVA Launch Pad is cheap and the compiler free -- in all cases the compilers run on the PC.
@JimmyD look to any chip manufacturer, ANY, they all sell compilers or have partners with compiler makers. These are called "cross compilers" because they run on a PC but make code for an embeded chip.
Hi all -Audio is live! If you don't see the audio bar at the top of the screen, please refresh your browser. It may take a couple tries. When you see the audio bar, if it doesn't start automatically, hit the play button. If you experience audio interruptions and are using IE, try using FF or Chrome as your browser. Many people experience issues with IE. Also, make sure your flash player is updated with the current version. Some companies block live audio streams, so if that is the case for your company, the class will be archived on this page immediately following the class and you can listen then. People don't experience any issues with the audio for the archived version.
You are eligible to earn IEEE Professional Development Hours by attending these courses and participating in the chat function. Additionally, we are no longer using the points system, offering "graduation", or giving grades. The IEEE hours are taking the place of that. There are some important things for you to know about earning the hours. The most important ones are that you need to attend these courses live, you need to attend a minimum of two of them per semester, you need to fill out a course evaluation form within 2 weeks of the end of the class, you need to attend 4 out of the 5 classes per course, and you need to participate in the chat function every day you attend. Please click on the link at the top of this page that says "How do I earn IEEE professional development hours" to read all of these important details and more.
Please join our Digi-Key Continuing Education Center LinkedIn Group at http://linkd.in/yoNGeY and be sure to follow @designnews and @DigiKeyCEC on Twitter for the latest class information. We encourage you to tweet about oday's class using #DigiKeyCEC.
The streaming audio player will appear at the top of this web page when the show starts at 2 PM Eastern time today. If the audio doesn't start automatically, click on the play button to start it. Note however, that some companies block live audio streams. If when the show starts, the audio bar doesn't appear or you don't hear any audio, try refreshing your browser. If that doesn't work, try using Firefox or Google Chrome as your browser. Some users experience audio interruptions with IE. Also, make sure your flash player is updated with the current version. If that doesn't work, your company is likely blocking the live stream. The class will be archived immediately following our live taping and you will be able to listen to it then. You shouldn't experience any problems with the audio when listening on-demand.
@LEE337 -- for TI I use their compiler Code Composer Studio. For ST I have used IAR and COOCOX (you can use CPP with COOCOX) For Atmel I use their latest Atmel Studio product. I have also used "raw" gcc under mingw and cygwin etc.
@bitbanger: I use C+ for all my projects where it is possible. You do not have to call in the unwieldy libraries unless necessary. However, those libraries used as needed can provide a lot of functionality that saves a lot of coding.
I use TI and Atmel mostly -- but am starting with ST as well.
With erupting concern over police brutality, law enforcement agencies are turning to body-worn cameras to collect evidence and protect police and suspects. But how do they work? And are they even really effective?
A half century ago, cars were still built by people, not robots. Even on some of the country’s longest assembly lines, human workers installed windows, doors, hoods, engines, windshields, and batteries, with no robotic aid.
DuPont's Hytrel elastomer long used in automotive applications has been used to improve the way marine mooring lines are connected to things like fish farms, oil & gas installations, buoys, and wave energy devices. The new bellow design of the Dynamic Tethers wave protection system acts like a shock absorber, reducing peak loads as much as 70%.
Focus on Fundamentals consists of 45-minute on-line classes that cover a host of technologies. You learn without leaving the comfort of your desk. All classes are taught by subject-matter experts and all are archived. So if you can't attend live, attend at your convenience.