diff options
| author | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-05-29 22:34:15 +0300 |
|---|---|---|
| committer | Tero Kontkanen <tero.kontkanen@granitedevices.fi> | 2017-05-29 22:34:15 +0300 |
| commit | 67db22dfed3306a6aaf2a9ba6fc814c8b4163ece (patch) | |
| tree | 2ccd75a64a4d25b3b2b1964157d8af35940a99ec /simplemotion.h | |
| parent | f065efc4607c8adcc31266748bd1e20ca39090b9 (diff) | |
| parent | a60052b1d6a620e64d300f07e9edd26a963cd889 (diff) | |
| download | SimpleMotionV2-67db22dfed3306a6aaf2a9ba6fc814c8b4163ece.tar.gz SimpleMotionV2-67db22dfed3306a6aaf2a9ba6fc814c8b4163ece.zip | |
Merge branch 'develop': Summary of changes:
-Added communication TCP IP port
-Added device deployment API
-Added buffered motion API
-New version of simplemotion_defs.h
-Various fixes & MacOS support
Diffstat (limited to 'simplemotion.h')
| -rw-r--r-- | simplemotion.h | 31 |
1 files changed, 11 insertions, 20 deletions
diff --git a/simplemotion.h b/simplemotion.h index 913a595..c189af8 100644 --- a/simplemotion.h +++ b/simplemotion.h @@ -1,17 +1,6 @@ //Global SimpleMotion functions & definitions
//Copyright (c) Granite Devices Oy
-/*
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; version 2 of the License.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-*/
-
#ifndef SIMPLEMOTION_H
#define SIMPLEMOTION_H
@@ -28,6 +17,7 @@ #endif
#include <stdio.h>
+#include <stdint.h>
#include "simplemotion_defs.h"
@@ -49,13 +39,13 @@ extern "C"{ ///////////////////////////////////////////////////////////////////////////////////////
//declare SM lib types
typedef long smbus;
-typedef unsigned long smuint32;
-typedef unsigned short smuint16;
-typedef unsigned char smuint8;
-typedef long smint32;
-typedef short smint16;
-typedef char smint8;
-typedef char smbool;
+typedef uint32_t smuint32;
+typedef uint16_t smuint16;
+typedef uint8_t smuint8;
+typedef int32_t smint32;
+typedef int16_t smint16;
+typedef int8_t smint8;
+typedef int8_t smbool;
#define smtrue 1
#define smfalse 0
typedef int SM_STATUS;
@@ -76,7 +66,8 @@ typedef enum _smVerbosityLevel {Off,Low,Mid,High,Trace} smVerbosityLevel; ///////////////////////////////////////////////////////////////////////////////////////
/** Open SM RS485 communication bus. Parameters:
- -devicename: "USB2VSD" or com port as "COMx" where x=1-16
+ -devicename: "USB2VSD" or com port as "COMx" where x=1-n
+ -devicename for TCP/IP connection format is nnn.nnn.nnn.nnn:pppp where n is IP address numbers and p is port number for TCP/IP connection
-return value: handle to be used with all other commands, -1 if fails
*/
LIB smbus smOpenBus( const char * devicename );
@@ -123,7 +114,7 @@ LIB void smSetDebugOutput( smVerbosityLevel level, FILE *stream ); /** This function returns all occurred SM_STATUS bits after smOpenBus or resetCumulativeStatus call*/
LIB SM_STATUS getCumulativeStatus( const smbus handle );
/** Reset cululative status so getCumultiveStatus returns 0 after calling this until one of the other functions are called*/
-LIB void resetCumulativeStatus( const smbus handle );
+LIB SM_STATUS resetCumulativeStatus( const smbus handle );
/** SMV2 Device communication functionss */
|
