Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
TIMIQLib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Software Control System
Libraries
TIMIQLib
Commits
39af8990
Commit
39af8990
authored
5 years ago
by
Sonia Minolli
Browse files
Options
Downloads
Patches
Plain Diff
Add doc directory
parent
e7c1c7be
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
doc/API_librairie.h
+214
-0
214 additions, 0 deletions
doc/API_librairie.h
pom.xml
+1
-1
1 addition, 1 deletion
pom.xml
with
215 additions
and
1 deletion
doc/API_librairie.h
0 → 100644
+
214
−
0
View file @
39af8990
//=============================================================================
// TIMIQLib.h
//=============================================================================
// abstraction.......Tim IQ Application Programming Interface
// class.............TIMIQLib
// original author...J. GOUNO - NEXEYA-FRANCE
//=============================================================================
#ifndef _TIMIQ_LIB_H_
#define _TIMIQ_LIB_H_
// ============================================================================
// DEPENDENCIES
// ============================================================================
#include
<TIMIQException.h>
#include
<TIMIQCurl.h>
#include
<yat/threading/Task.h>
// ==========================================================================
// DEFINITION OF API
//
// This API allows access to an electronic equipment "TimIQ".
// It allows a control software to send and receive data
// via a http web protocol.
// ===========================================================================
namespace
TIMIQLib_ns
{
//------------------------------------------------------------------------
// Class Description:
// Thread to write the values and commands on the TimIQ equipment
//------------------------------------------------------------------------
class
ThreadedAction
:
public
yat
::
Thread
{
friend
class
TIMIQLib
;
protected:
//- ctor ---------------------------------
ThreadedAction
(
yat
::
Thread
::
IOArg
ioa
,
timIQConfig
&
cfg
);
//- dtor ---------------------------------
virtual
~
ThreadedAction
();
//- thread's entry point
virtual
yat
::
Thread
::
IOArg
run_undetached
(
yat
::
Thread
::
IOArg
ioa
);
//- asks this ThreadedAction to quit
virtual
void
exit
();
//- Thread state
bool
isThreadAlive
()
{
return
m_goOn
;
}
bool
isWriteDone
()
{
return
m_isActionDone
;
}
private
:
//- thread's ctrl flag
bool
m_goOn
;
//- indicates if the threaded action is done
bool
m_isActionDone
;
//- indicates if the threaded action has generated an error
bool
m_isActionInError
;
//- Thread action configuration member
timIQConfig
m_ti_cfg
;
};
//- low layer TimIQ curl class
//-----------------------------
class
TIMIQCurl
;
//------------------------------------------------------------------------
//- TIMIQProxy Class
//- Ensures the interface of the timIQ equipment with
//- a tango software control system
//------------------------------------------------------------------------
class
TIMIQLib
{
friend
class
ThreadedAction
;
public:
// Contructor
TIMIQLib
();
// Destructor
~
TIMIQLib
();
//- Write functions
//---------------------------------------------------------------------------
// Sets data to TimIQ equipment
// @param data float value.
void
set_data
(
float
data
)
throw
(
Exception
);
// Regulates "I" tension to TimIQ equipment
// @param iValue float value.
void
set_iValue
(
float
iValue
)
throw
(
Exception
);
// Regulates "Q" tension to TimIQ equipment
// @param qValue float value.
void
set_qValue
(
float
qValue
)
throw
(
Exception
);
// Sets board temperature to TimIQ equipment
// @param boardTemperature float value.
void
set_boardTemperature
(
float
boardTemperature
)
throw
(
Exception
);
// Sets command to TimIQ equipment
// @param cmd TimIQCmd_t value.
void
set_command
(
E_timiq_cmd_t
&
cmd
)
throw
(
Exception
);
//- Read functions
//---------------------------------------------------------------------------
// Gets data from TimIQ equipment
// @param [out] data float pointer.
void
get_data
(
float
&
data
)
throw
(
Exception
);
// Gets "I" value from TimIQ equipment
// @param [out] iValue float pointer.
void
get_iValue
(
float
&
iValue
)
throw
(
Exception
);
// Gets "Q" value from TimIQ equipment
// @param [out] qValue float pointer.
void
get_qValue
(
float
&
qValue
)
throw
(
Exception
);
// Gets the mixer cosinus output from TimIQ equipment
// @param [out] mixerCosOutput float pointer.
void
get_mixerCosOutput
(
float
&
mixerCosOutput
)
throw
(
Exception
);
// Gets the mixer sinus output from TimIQ equipment
// @param [out] mixerSinOutput float pointer.
void
get_mixerSinOutput
(
float
&
mixerSinOutput
)
throw
(
Exception
);
// Gets the board temperature from TimIQ equipment
// @param [out] boardTemperature float pointer.
void
get_boardTemperature
(
float
&
boardTemperature
)
throw
(
Exception
);
// Gets the whole data from TimIQ equipment
// i.e. temperature, i & q values, mixer values
// @param [out] val Read values.
void
get_boardData
(
timIQval_t
&
val
)
throw
(
Exception
);
// Gets state of TimIQ equipment
// @param [out] status string
E_timiq_code_t
get_state
(
std
::
string
&
status
)
throw
(
Exception
);
// Initialize TimIQCurl library
// @param ip_address string, port_number string
void
init
(
const
std
::
string
&
ip_address
,
const
short
&
port_number
)
throw
(
Exception
);
private:
//- internal members
//--------------------------
TIMIQCurl
*
m_timiq_hw
;
//- ip address number
std
::
string
m_ipAddress
;
//- port number
std
::
string
m_numPort
;
//- internal timiq state
E_timiq_code_t
m_internal_timiq_state
;
protected:
//- internal functions
//-------------------------
//- manage command by using task
ThreadedAction
*
m_timiq_task
;
// execute action specified in argument
void
ExecuteAction
(
timIQConfig
&
cfg
)
throw
(
Exception
);
// end of task notification
void
end_task
()
throw
(
Exception
);
};
}
// namespace TIMIQLib_ns
#endif // _TIMIQ_LIB_H_
This diff is collapsed.
Click to expand it.
pom.xml
+
1
−
1
View file @
39af8990
...
...
@@ -9,7 +9,7 @@
</parent>
<groupId>
fr.soleil.lib
</groupId>
<artifactId>
TimIQLib-${aol}-${library}-${mode}
</artifactId>
<version>
1.0.1
-SNAPSHOT
</version>
<version>
1.0.1
</version>
<packaging>
nar
</packaging>
<name>
TimIQ
</name>
<description>
TimIQ library
</description>
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment