Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions src/hal/classicladder/arithm_eval.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#ifndef CLASSICLADDER_ARITHM_EVAL_H
#define CLASSICLADDER_ARITHM_EVAL_H

#define arithmtype int


Expand All @@ -26,3 +29,5 @@ char * VerifySyntaxForEvalCompare(char * StringToVerify);
char * VerifySyntaxForMakeCalc(char * StringToVerify);



#endif
7 changes: 7 additions & 0 deletions src/hal/classicladder/calc.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#ifndef CLASSICLADDER_CALC_H
#define CLASSICLADDER_CALC_H

#include "classicladder.h"

void InitRungs(void);
void PrepareRungs(void);
void InitTimers(void);
Expand All @@ -32,3 +37,5 @@ void WriteVarForElement( StrElement *pElem, int Value );
void RefreshASection( StrSection * pSection );
void ClassicLadder_RefreshAllSections(void);
void CopyRungToRung(StrRung * RungSrc,StrRung * RungDest);

#endif
5 changes: 5 additions & 0 deletions src/hal/classicladder/calc_sequential.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef CLASSICLADDER_CALC_SEQUENTIAL_H
#define CLASSICLADDER_CALC_SEQUENTIAL_H

void InitSequential( void );
void PrepareSequential( void );
void RefreshSequentialPage( int PageNbr );

#endif
5 changes: 5 additions & 0 deletions src/hal/classicladder/classicladder.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */

/* if GTK not included before */
#ifndef CLASSICLADDER_H
#define CLASSICLADDER_H

#ifndef TRUE
#define TRUE 1
#endif
Expand Down Expand Up @@ -521,3 +524,5 @@ extern int modslave;
//#define DBG_HEADER_ERR "ClassicLadder Error --- "
#define DBG_HEADER_INFO ""
#define DBG_HEADER_ERR ""

#endif
4 changes: 2 additions & 2 deletions src/hal/classicladder/classicladder_gtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#ifndef _CLASSICLADDER_GTK_H
#define _CLASSICLADDER_GTK_H
#ifndef CLASSICLADDER_CLASSICLADDER_GTK_H
#define CLASSICLADDER_CLASSICLADDER_GTK_H

//For i18n
#define _(STRING) gettext(STRING)
Expand Down
5 changes: 5 additions & 0 deletions src/hal/classicladder/config_gtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,9 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef CLASSICLADDER_CONFIG_GTK_H
#define CLASSICLADDER_CONFIG_GTK_H

void OpenConfigWindowGtk( );

#endif
9 changes: 9 additions & 0 deletions src/hal/classicladder/drawing.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef CLASSICLADDER_DRAWING_H
#define CLASSICLADDER_DRAWING_H

#include <stddef.h>
#include <cairo.h>
#include "classicladder.h"

#define DRAW_NORMAL 0
#define DRAW_FOR_TOOLBAR 1
#define DRAW_FOR_PRINT 2
Expand All @@ -31,3 +38,5 @@ void DrawRung( cairo_t * cr, StrRung * Rung, int OffX, int PosiY, int BlockWidth
void DrawRungs( cairo_t * cr );
void DrawCurrentSection( cairo_t * cr );


#endif
8 changes: 8 additions & 0 deletions src/hal/classicladder/drawing_sequential.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,17 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef CLASSICLADDER_DRAWING_SEQUENTIAL_H
#define CLASSICLADDER_DRAWING_SEQUENTIAL_H

#include <cairo.h>
#include "sequential.h"

void DrawSeqStep( cairo_t * cr,int x,int y,int Size,StrStep * pStep,char DrawingOption );
void DrawSeqTransition( cairo_t * cr,int x,int y,int Size,StrTransition * pTransi,char DrawingOption );

void DrawSequentialPage( cairo_t * cr, int PageNbr, int SeqPxSize, char DrawingOption );

void DrawSeqElementForToolBar( cairo_t * cr, int x, int y, int Size, int NumElement );

#endif
7 changes: 7 additions & 0 deletions src/hal/classicladder/edit.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef CLASSICLADDER_EDIT_H
#define CLASSICLADDER_EDIT_H

#include "classicladder.h"

#define MODE_MODIFY 0
#define MODE_ADD 1
#define MODE_INSERT 2
Expand Down Expand Up @@ -43,3 +48,5 @@ char * ConvVarNameToHalSigName (char *);
char * FirstVariableInArithm(char *);
int SetDefaultVariableType(int NumElement);


#endif
5 changes: 5 additions & 0 deletions src/hal/classicladder/edit_copy.h
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
#ifndef CLASSICLADDER_EDIT_COPY_H
#define CLASSICLADDER_EDIT_COPY_H

void StartOrMotionPartSelection(double x,double y, char StartToClick);
void EndPartSelection( );
void GetSizesOfTheSelectionToCopy( int * pSizeX, int * pSizeY );
char GetIsOutputEleLastColumnSelection( );
void CopyNowPartSelected( double x,double y );



#endif
6 changes: 4 additions & 2 deletions src/hal/classicladder/edit_gtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,10 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef _EDIT_GTK_H
#define _EDIT_GTK_H
#ifndef CLASSICLADDER_EDIT_GTK_H
#define CLASSICLADDER_EDIT_GTK_H
#include <gtk/gtk.h>

void EditorButtonsAccordingSectionType( );
void ButtonCancelCurrentRung();
void OpenEditWindow( GtkAction * ActionOpen, gboolean OpenIt );
Expand Down
5 changes: 5 additions & 0 deletions src/hal/classicladder/edit_sequential.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,14 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef CLASSICLADDER_EDIT_SEQUENTIAL_H
#define CLASSICLADDER_EDIT_SEQUENTIAL_H

void SaveSeqElementProperties( void );
void ModifyCurrentSeqPage(void);
void CancelSeqPageEdited(void);
void ApplySeqPageEdited(void);
void EditElementInSeqPage(double x,double y);


#endif
5 changes: 5 additions & 0 deletions src/hal/classicladder/editproperties_gtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,12 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef CLASSICLADDER_EDITPROPERTIES_GTK_H
#define CLASSICLADDER_EDITPROPERTIES_GTK_H

void SetProperty(int NumParam,char * LblParam,char * ValParam,char SetFocus);
char * GetProperty(int NumParam);
void ShowPropertiesWindow( int Visible );
void PropertiesInitGtk();

#endif
5 changes: 5 additions & 0 deletions src/hal/classicladder/emc_mods.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef CLASSICLADDER_EMC_MODS_H
#define CLASSICLADDER_EMC_MODS_H

char * ConvVarNameToHalSigName( char * VarNameParam );
char * FirstVariableInArithm(char * Expr);
void SymbolsAutoAssign (void);

#endif
7 changes: 7 additions & 0 deletions src/hal/classicladder/files.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef CLASSICLADDER_FILES_H
#define CLASSICLADDER_FILES_H

#include "classicladder.h"

#include <stdio.h> // FILE

#ifndef S_LINE
Expand Down Expand Up @@ -66,3 +71,5 @@ void LoadAllLadderDatas(char * DatasDirectory);
void SaveAllLadderDatas(char * DatasDirectory);

void CleanTmpLadderDirectory( char DestroyDir );

#endif
5 changes: 5 additions & 0 deletions src/hal/classicladder/files_project.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,15 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#ifndef CLASSICLADDER_FILES_PROJECT_H
#define CLASSICLADDER_FILES_PROJECT_H

void VerifyDirectorySelected( char * NewDir );
void InitTempDir( void );
char LoadProjectFiles( char * FileProject );
char LoadGeneralParamsOnlyFromProject( char * FileProject );
char SaveProjectFiles( char * FileProject );
char JoinFiles( char * DirAndNameOfProject, char * TmpDirectoryFiles );
char SplitFiles( char * DirAndNameOfProject, char * TmpDirectoryFiles );

#endif
5 changes: 5 additions & 0 deletions src/hal/classicladder/files_sequential.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,10 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#ifndef CLASSICLADDER_FILES_SEQUENTIAL_H
#define CLASSICLADDER_FILES_SEQUENTIAL_H

char LoadSequential(char * FileName);
char SaveSequential(char * FileName);

#endif
7 changes: 7 additions & 0 deletions src/hal/classicladder/global.h
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,11 @@
/* License along with this library; if not, write to the Free Software */
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */

#ifndef CLASSICLADDER_GLOBAL_H
#define CLASSICLADDER_GLOBAL_H

#include "classicladder.h"

#ifdef MAT_CONNECTION
#include "../../lib/plc.h"
#define TYPE_FOR_BOOL_VAR plc_pt_t
Expand Down Expand Up @@ -82,3 +87,5 @@ extern char * ErrorMessageVarParser;
//extern int ListCurrentDefParam[ NBR_CURRENT_DEFS_MAX ];



#endif
5 changes: 5 additions & 0 deletions src/hal/classicladder/manager.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef CLASSICLADDER_MANAGER_H
#define CLASSICLADDER_MANAGER_H

void InitSections( void );
int SearchSubRoutineWithItsNumber( int SubRoutineNbrToFind );
int SearchSectionWithName( char * SectionNameToFind );
Expand All @@ -27,3 +30,5 @@ int GetPrevNextSection( int RefSectionNbr, char NextSearch );
void SwapSections( int SectionNbr1, int SectionNbr2 /*char * SectionName1, char * SectionName2*/ );
int FindFreeSequentialPage( void );


#endif
7 changes: 7 additions & 0 deletions src/hal/classicladder/manager_gtk.h
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,14 @@
// You should have received a copy of the GNU General Public License
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
#ifndef CLASSICLADDER_MANAGER_GTK_H
#define CLASSICLADDER_MANAGER_GTK_H

#include <gtk/gtk.h>

void ManagerDisplaySections( char ForgetSectionSelected );
void OpenManagerWindow( GtkAction * ActionOpen, gboolean OpenIt );
void ManagerEnableActionsSectionsList( char cState );
void ManagerInitGtk();

#endif
7 changes: 7 additions & 0 deletions src/hal/classicladder/menu_and_toolbar_gtk.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@


#ifndef CLASSICLADDER_MENU_AND_TOOLBAR_GTK_H
#define CLASSICLADDER_MENU_AND_TOOLBAR_GTK_H

#include <gtk/gtk.h>

GtkUIManager * InitMenusAndToolBar( GtkWidget *vbox );
void SetToogleMenuForSectionsManagerWindow( gboolean OpenedWin );
void SetToggleMenuForEditorWindow( gboolean OpenedWin );
Expand All @@ -9,3 +14,5 @@ void SetToggleMenuForFreeVarsWindow( gboolean OpenedWin );
void SetToggleMenuForLogWindow( gboolean OpenedWin );
void SetMenuStateForRunStopSwitch( gboolean Running );


#endif
5 changes: 5 additions & 0 deletions src/hal/classicladder/print_gtk.h
Original file line number Diff line number Diff line change
@@ -1,3 +1,8 @@

#ifndef CLASSICLADDER_PRINT_GTK_H
#define CLASSICLADDER_PRINT_GTK_H

void PrintGtk( );
void PrintPreviewGtk( );

#endif
4 changes: 2 additions & 2 deletions src/hal/classicladder/protocol_modbus_defines.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#ifndef _PROTOCOL_MODBUS_DEFINES_H
#define _PROTOCOL_MODBUS_DEFINES_H
#ifndef CLASSICLADDER_PROTOCOL_MODBUS_DEFINES_H
#define CLASSICLADDER_PROTOCOL_MODBUS_DEFINES_H

/* To set/reset single coil with function 5 */
#define MODBUS_BIT_OFF 0x0000
Expand Down
4 changes: 2 additions & 2 deletions src/hal/classicladder/protocol_modbus_master.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#ifndef _PROTOCOL_MODBUS_MASTER_H
#define _PROTOCOL_MODBUS_MASTER_H
#ifndef CLASSICLADDER_PROTOCOL_MODBUS_MASTER_H
#define CLASSICLADDER_PROTOCOL_MODBUS_MASTER_H

/* Modbus requests list available for the user */
#define MODBUS_REQ_INPUTS_READ 0
Expand Down
5 changes: 5 additions & 0 deletions src/hal/classicladder/protocol_modbus_slave.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,13 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#ifndef CLASSICLADDER_PROTOCOL_MODBUS_SLAVE_H
#define CLASSICLADDER_PROTOCOL_MODBUS_SLAVE_H

int ModbusRequestToRespond( unsigned char * Question, int LgtQuestion, unsigned char * Response );
int GetMobdusSlaveNbrVars( unsigned char FunctCode );
void SetVarFromModbusSlave( unsigned char FunctCode, int ModbusNum, int Value );
int GetVarForModbusSlave( unsigned char FunctCode, int ModbusNum );


#endif
5 changes: 5 additions & 0 deletions src/hal/classicladder/sequential.h
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,9 @@
/* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */


#ifndef CLASSICLADDER_SEQUENTIAL_H
#define CLASSICLADDER_SEQUENTIAL_H

#define NBR_SEQUENTIAL_PAGES 5

#define NBR_STEPS 128
Expand Down Expand Up @@ -117,3 +120,5 @@ typedef struct StrSequential
}StrSequential;



#endif
5 changes: 5 additions & 0 deletions src/hal/classicladder/serial_common.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,9 @@
// along with this program; if not, write to the Free Software
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

#ifndef CLASSICLADDER_SERIAL_COMMON_H
#define CLASSICLADDER_SERIAL_COMMON_H

char SerialOpen( );
void SerialClose( );
char SerialPortIsOpened( void );
Expand All @@ -22,3 +25,5 @@ void SerialSetResponseSize( int Size, int TimeOutResp );
int SerialReceive( char * Buff, int MaxBuffLength );
void SerialPurge( void );


#endif
Loading