C++ program

Closed

Data Acquisition Simulator

The objective is to investigate how, in embedded software design, devices abstract (hide) device-specific implementation detail (driver) away from the objects (operating system application programmer’s interface (API) that utilise their services. This assignment also demonstrates one approach as to how inter-object communications may be implemented.

In this scenario, the objective is to design a program to simulate a data acquisition environment. The benefit of this approach is that, assuming an actual component device exposes the same class interface, the hardware may be substituted into the system without any re-writing of code required, other than substituting the class associated with the particular hardware device driver in question. The code may be stored in a separate module, such as a dynamic link library (DLL), for example.

The system consists of a clock source that drives a signal source (sine and random waveform), which supplies data to a channel of an analyser device. When requested by an input channel (e.g. mixed-signal oscilloscope, logic analyser, etc.). The Analyser captures processes (keeps track of a running average) and displays the current waveform value on a computer screen

The Signal Source supplies single-valued data, along with the current time, to the Analyser, when requested. The data characteristics may take the form of a triangle or sine wave.

Clock Class

The clock class supplies the current time to a Signal Source object, when requested. The Clock class should possess:

Interface:

 A parameterised constructor should allow (i) an initial starting time (in us ) to be specified, along with a (ii) custom time increment. If no parameters are supplied assume default values of 0 and 5us , respectively.

 An ‘AdvanceTime’ (by specified increment) should also be provided. If no explicit increment is provided, the increment supplied upon initialisation of the class should be assumed.

As we are not writing event-driven software, we cannot configure the clock to automatically update. So, when a request is received from a signal source to supply the current time, the Clock object should automatically increment the time (having initially supplied the current time to the signal source).

 A Time ‘Reset’ option should also exist.

 A ‘Current time’ - Return the current elapsed time.

Private Functions:

The data received from the interface functions should first be parsed to ensure that the values are valid. The following private functions should then be used to set the appropriate private member data required to support the clock functionality.

Private:

 ‘AdvanceClock’ – increment the current time stored in the Clock class.

 ‘SetClock’ – Set the current time stored in the clock class to the value specified.

Signal Source Class

The Signal Source should initially connect to a clock source. When requested, the signal source should calculate the value of the chosen waveform for the current time, supplied by the Clock class object.

Each Signal Source class possesses the following properties:

Signal Source Type: – Triangular, sine wave

Default type: Parameterised: type: parameters

 Triangular: period 50 , amplitude.

 Sine: frequency, amplitude, D.C. offset.

Interface:

 Constructor – Call (SetParams) function to assign signal source parameters. (Note, there should be a separate constructor for each signal type – see Signal Source Type above). [6 marks]

 GetValue – Returns the current value from the chosen, validated channel (DataFromSource).

 GetParams – Returns the waveform type and associated parameters. [4 marks]

Private Functions:

 DataFromSource – Accesses the channel source data.

 SetParams – Sets the values for the signal source.

Private Member Data:

Determined by the programmer.

Analyser Class:

The analyser initially connects its channels to any available (supplied) signal sources. When requested, the analyser may request a signal source value from a channel. The analyser may also request the channel waveform details from the associated signal source. A running average for each channel is automatically maintained. This is information may be displayed on the analyser (PC) screen, when requested.

Interface:

 Constructors – 2 signal sources.

A signal source and a channel number.

 ConnectChannel – If the channel has not been already attached, associate a signal source with a channel.  DisconnectChannel – Disconnect a signal source from a channel, if currently connected.

 RequestChannelInfo – Returns the info associated with the signal source connected to the channel, if any.

 GetValue – Verify that this is a valid channel and retrieve the sample value and elapsed time. The running average should be automatically updated (AverageValue).

 DisplayChannelValue – Displays the current value of the specified channel.

 DisplayChannelAverage - Displays the average value of the specified channel.

Private:

 AverageValue – Average of last 5 values.

 DetachChannel – Disconnect from specified channel.

 AttachChannel – Connect to specified channel.  DataFromChannel – Accesses the channel data.

Main Program:

 Write a program to demonstrate the operation of the Data acquisition system.

 Use appropriate variable name, indentation and commenting

Skills: C++ Programming

See more: assignment, writing supplies, writing computer code, writing assignment application, writing a computer program, wave by design, triangle design, stored program computer, starting objective c, software for dynamic programming, sample received form, programming question in c, programming program, programming logic and design, programming in objective c, oscilloscope dll, objective of c programming, objective-c programmer, module computer programming, logic supply, interface computer programming, inter design, how to write an objective, g.c. services, first computer programming

Project ID: #5048571

7 freelancers are bidding on average $287 for this job

samitXI

Hi Sir, I am ready to work for you.I have 8 years of experience in C/C++ , java andPHP, MySQL. please see some of my works also check my reviews you will get better idea about my skill.I deliver quality work within ti More

$206 USD in 3 days
(53 Reviews)
6.4
dobreiiita

Hi I am C++ expert and can surely help you with this project, Looking forward to hear from you. Thank You

$149 USD in 2 days
(106 Reviews)
5.9
szymszteinsl

Hi! I am professional C/C++/C#/Java programmer. I can do this project with highest quality. Best Regards, Szymszteinsl

$250 USD in 3 days
(9 Reviews)
5.7
Venky117

hi sir... i can help you on this project. Please let me know to start immediately. i can deliver you on time. thanks

$155 USD in 3 days
(4 Reviews)
2.9
vladmelendez

I'm a C/C++/Java Senior programmer and Electronic Engineer. I really know your need, Please, let me know your platform requirements: Linux, Windows (C++/C# .NET or Visual C++) for improve my bid. My plan is work d More

$230 USD in 4 days
(0 Reviews)
0.0
ranganathp

Can help... I am an Expert... Please start a Discussion with me and we can get started from there... Please check the past projects I have handled and check my reviews for what employers have to say about my work... More

$800 USD in 21 days
(0 Reviews)
0.0
kp21

Good Object Oriented Design Patterns knowledge for creational, behavioral patterns. Good experience in C++ Firmware application development close to HAL.

$222 USD in 3 days
(0 Reviews)
0.0