الاثنين، 17 يونيو 2013

C++ for mechatronic innovation


C++ for mechatronic innovation


As applications are increasingly sophisticated, software has become the key to success of mechatronic products. Software offers the opportunity to make the difference on the highly competitive market by developing a product that presents better functionalities, performances and undisputed ease of use.
The growing requirements of mechatronic systems have so far been mostly addressed by hardware upgrades such as increasing the computation power and peripheral capabilities. The recent introduction of smarter software solutions has lead to a wider range of functionalities and a much higher level of sophistication of mechatronic systems.
An object-oriented approach is therefore the software engineer’s answer to combat the increasing complexity of mechatronic products. This approach broadens the horizons of automation and gives rise to a new paradigm. It combines the ability to manage the most sophisticated applications with the ability to guarantee their flexibility and scalability, in order to efficiently seize market opportunities.

C++ language capitalises on these new opportunities offered by the object oriented paradigm whilst guaranteeing a real-time runtime. This gives rise to huge leap forward in software conception methods by promoting a new way of thinking that will revolutionise future software development and create unlimited innovation potential.

Exploit the benefits of an object-oriented approach in automation

 
Object-oriented languages offer significant advantages over procedural languages. Their main advantage is that they support an implementation that can be based on a natural and a logical understanding of the world. Thus, the software evolves towards a structure with a greater clarity and readability, making the maintenance and the upgrading process easier.

Furthermore, the object-oriented approach transforms automation software by introducing the inheritance and polymorphism concepts, which drastically rationalise and simplify applications. Also it opens up new prospects of modularity and scalability.
With the ability of creating reusable code, an object-oriented approach encourages code factorisation, which as a result enhances the efficiency of software engineers.

Target audience

This course is dedicated to software engineers who develop applications in automation and embedded systems and want to learn how to profit from the usage of an object approach.
Today all machine manufactures have the opportunity to integrate C++ into their projects. This is becoming mainstream technology, as much for advanced embedded applications, as for PLC applications where Beckhoff and B&R are actively committed.
The course aims to provide attendees with good basics in C++ language and a good understanding of how to make efficient use of the object-oriented software development approach.
In particular, participants will be made aware of the issue of real-time execution of a process, implying the management of dynamic memory allocation.

Get to know C++

The first part of this course focuses on the basic concepts so as to attain a good understanding of C++ language, and features :

  • Structuring a project, namespace
  • C++ specific data types
  • Function «overloading»
  • Using C’s libraries in C++
  • Concept of using « references » instead of pointer
  • How to increase the robustness of your application
  • « Exception handling», for asmart handling of errors and a better readability of the code
  • Good understanding and handling of the dynamic memory allocation for agile applications with swift runtime performances, which would satisfy real-time constraints.

Strengths of object-oriented approach with C++

Discover the potential of C++ as an object-oriented language:
  • Create encapsulated functions and guarantee their independence with visibility operators
  • earn the fundamentals of object-oriented mechanisms: methods, classes, pointer « this », accessors
  • Neatly create and destruct an object by using constructors/destructors
  • Handle operators by «overloading »
  • Implement the general object oriented principles of C++ : inheritance, polymorphism, virtual methods
  • Master dynamic or static instantiation of objects

Advanced notions of C++ language

Exploration of the advanced characteristics of C++ language:
  • Generic programming: good understanding of principles and their application in order to generate a highly reusable code.
  • Overview of the Standard Template Library.
  • Limits of STL in the context of real-time application.
  • Other available libraries.

réseaux informatiques


 Le masque de sous-réseau:

Un sous-réseau est une subdivision logique d'un réseau de taille plus importante. Le masque de sous-réseau permet de distinguer la partie de l'adresse utilisée pour le routage et celle utilisable pour numéroter des interfaces. Un sous-réseau correspond typiquement à un réseau local sous-jacent.
Historiquement, on appelle également sous-réseau chacun des réseaux connecté à Internet.
La subdivision d'un réseau en sous-réseaux permet de limiter la propagation des broadcast, ceux-ci restant limités au réseau local et leur gestion étant coûteuse en bande passante et en ressource au niveau des commutateurs réseau. Les routeurs sont utilisés pour la communication entre les machines appartenant à des 
sous-réseaux différents.


Ping:

Ping est le nom d'un outil informatique permettant de tester l'accessibilité d'une autre machine à travers un réseau IP. La commande mesure également le temps mis pour recevoir une réponse, appelé round-trip time (temps aller-retour).
Ping utilise une requête ICMP Echo et attend une réponse Echo reply. L'envoi est répété pour des fins statistiques : déterminer le taux de paquet perdu et le délai moyen. Si d'autres messages ICMP sont reçus de la part de routeurs intermédiaires (comme TTL exceededFragmentation needed,administratively prohibited...), ils sont affichés à l'écran. Quand le paramètre TTL (Time to Live) est affiché, il permet d'estimer le nombre de routeurs intermédiaires.
Un délai élevé et variable ou un taux de paquet perdu non nul peut s'expliquer par un problème de congestion dans le réseau, un problème de qualité sur un lien ou un problème de performance affectant le système cible.
Des commandes avancées de ping permettent d'effectuer le test avec des tailles de paquets variables et de le répéter un certain nombre de fois. Il est parfois possible de lancer de nombreux paquets sans attendre de réponse (flood ping), ce qui peut constituer une attaque par déni de service si la machine de destination ou le réseau intermédiaire est submergé.
Certains pare-feux bloquent les paquets ICMP Echo, rendant la commande inopérante.

Localhost :

En informatique, on travaille souvent en mode client-serveur : une ou plusieurs machines envoient des requêtes à un serveur central1 qui envoie les réponses appropriées. C'est par exemple le cas pour un serveur web ou bien un serveur de bases de données.
Lors du développement, il n'est pas pour autant nécessaire de disposer de plusieurs machines physiques ni même virtuelles : la même machine physique peut parfaitement héberger le serveur et un ou plusieurs clients, exactement dans les mêmes conditions: en communiquant par des ports.
Dans les domaines des réseaux informatiques, localhost (l'hôte local en français) est un nom habituel pour se référer à une interface logique de l'ordinateur local.
Le ou les clients hébergés sur une machine utilisent le protocole IP pour communiquer. Il importe peu de savoir où se trouvent physiquement les programmes, les couches basses du protocole se chargeant justement d'en masquer les détails. Le nom localhost est associé à l'adresse IPv4127.0.0.1 et à l'adresse IPv6 ::1.
L'interface réseau virtuelle utilisée dans cette situation se nomme l'interface de loopback (abrégée parlo sous Unix).