Commit a0430a7b authored by Marcus Nordenberg's avatar Marcus Nordenberg

Merge branch 'profibus-api-update'

parents b9788cab df0831a3
This diff is collapsed.
/*
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2019 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* 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, either version 2 of
* the License, or (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
#define BUILD_NUMBER 52 #define BUILD_NUMBER 52
#define BUILD_NUMBER_STR "52" #define BUILD_NUMBER_STR "52"
......
/* /******************************************************************************
* ProviewR Open Source Process Control.
* Copyright (C) 2005-2019 SSAB EMEA AB.
*
* This file is part of ProviewR.
*
* 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, either version 2 of
* the License, or (at your option) any later version.
*
* 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.
*
* You should have received a copy of the GNU General Public License
* along with ProviewR. If not, see <http://www.gnu.org/licenses/>
*
* Linking ProviewR statically or dynamically with other modules is
* making a combined work based on ProviewR. Thus, the terms and
* conditions of the GNU General Public License cover the whole
* combination.
*
* In addition, as a special exception, the copyright holders of
* ProviewR give you permission to, from the build function in the
* ProviewR Configurator, combine ProviewR with modules generated by the
* ProviewR PLC Editor to a PLC program, regardless of the license
* terms of these modules. You may copy and distribute the resulting
* combined work under the terms of your choice, provided that every
* copy of the combined work is accompanied by a complete copy of
* the source code of ProviewR (the version used to produce the
* combined work), being distributed under the terms of the GNU
* General Public License plus this exception.
*/
/*****************************************************************************
* * * *
* SOFTING AG * * SOFTING Industrial Automation GmbH *
* Richard-Reitzner-Allee 6 * * Richard-Reitzner-Allee 6 *
* D-85540 Haar * * D-85540 Haar *
* Phone: ++49-89-4 56 56-0 * * Phone: (++49)-(0)89-45656-0 *
* Fax: ++49-89-4 56 56-3 99 * * Fax: (++49)-(0)89-45656-399 *
* * * *
* Copyright (C) SOFTING AG 1995-2003 * * Copyright (C) SOFTING Industrial Automation GmbH 1995-2012 *
* All Rights Reserved * * All Rights Reserved *
* * * *
****************************************************************************** *******************************************************************************
FILE_NAME BUSPARAM.C FILE_NAME BUSPARAM.C
...@@ -55,25 +20,11 @@ MODULE BUSPARAM ...@@ -55,25 +20,11 @@ MODULE BUSPARAM
COMPONENT_LIBRARY PBT LIBs and DLL (16-Bit) COMPONENT_LIBRARY PBT LIBs and DLL (16-Bit)
PBTOOLS DLL (32-Bit) PBTOOLS DLL (32-Bit)
AUTHOR SOFTING AG AUTHOR SOFTING
VERSION 5.00 VERSION 5.21.0.00.release
5.01
5.02 DATE February-1998
5.10
5.11
5.20.0.00.alpha
5.20.0.00.release
5.21.0.00.release
DATE 24-November-1995
31-January-1996
14-July-1996
20-Febrary-1997
18-March-1997
30-July-1997
17-October-1997
27-February-1998
STATUS finished STATUS finished
...@@ -138,7 +89,8 @@ possible return values: ...@@ -138,7 +89,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
switch (baud_rate) { switch (baud_rate)
{
case 0: /* 9,6 KBaud */ case 0: /* 9,6 KBaud */
case 1: /* 19,2 KBaud */ case 1: /* 19,2 KBaud */
case 2: /* 93,75 KBaud */ case 2: /* 93,75 KBaud */
...@@ -242,7 +194,8 @@ possible return values: ...@@ -242,7 +194,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
switch (baud_rate) { switch (baud_rate)
{
case 0: /* 9,6 KBaud */ case 0: /* 9,6 KBaud */
bus_param_ptr->tsl = 100; bus_param_ptr->tsl = 100;
bus_param_ptr->min_tsdr = 30; bus_param_ptr->min_tsdr = 30;
...@@ -365,7 +318,8 @@ possible return values: ...@@ -365,7 +318,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
switch (baud_rate) { switch (baud_rate)
{
case 0: /* 9,6 KBaud */ case 0: /* 9,6 KBaud */
bus_param_ptr->tsl = 125; bus_param_ptr->tsl = 125;
bus_param_ptr->min_tsdr = 30; bus_param_ptr->min_tsdr = 30;
...@@ -481,8 +435,8 @@ possible return values: ...@@ -481,8 +435,8 @@ possible return values:
} }
} }
FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_dp_def_bus_param(IN USIGN8 baud_rate, FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_dp_def_bus_param(
IN USIGN8 station_addr, IN USIGN16 mode, IN USIGN8 baud_rate, IN USIGN8 station_addr, IN USIGN16 mode,
OUT T_DP_BUS_PARA_SET FAR* bus_param_ptr) OUT T_DP_BUS_PARA_SET FAR* bus_param_ptr)
/*---------------------------------------------------------------------------- /*----------------------------------------------------------------------------
...@@ -510,7 +464,8 @@ possible return values: ...@@ -510,7 +464,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
ret_val = PB_TRUE; ret_val = PB_TRUE;
switch (mode) { switch (mode)
{
case DP_MODE: /* only DP mode */ case DP_MODE: /* only DP mode */
ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param); ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param);
break; break;
...@@ -524,7 +479,8 @@ possible return values: ...@@ -524,7 +479,8 @@ possible return values:
break; break;
} }
if (ret_val == PB_TRUE) { if (ret_val == PB_TRUE)
{
/* -- set variable busparametes ---------------------------------------- */ /* -- set variable busparametes ---------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl; bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr; bus_param_ptr->min_tsdr = bus_param.min_tsdr;
...@@ -583,7 +539,8 @@ possible return values: ...@@ -583,7 +539,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
if (pbt_get_bus_param_for_fms(baud_rate, &bus_param)) { if (pbt_get_bus_param_for_fms(baud_rate, &bus_param))
{
/* -- set variable busparametes -------------------------------------- */ /* -- set variable busparametes -------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl; bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr; bus_param_ptr->min_tsdr = bus_param.min_tsdr;
...@@ -607,7 +564,9 @@ possible return values: ...@@ -607,7 +564,9 @@ possible return values:
bus_param_ptr->ident[3] = 0; bus_param_ptr->ident[3] = 0;
return (PB_TRUE); return (PB_TRUE);
} else { }
else
{
return (PB_FALSE); return (PB_FALSE);
} }
} }
...@@ -644,7 +603,8 @@ possible return values: ...@@ -644,7 +603,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
switch (mode) { switch (mode)
{
case DP_MODE: /* only DP mode */ case DP_MODE: /* only DP mode */
ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param); ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param);
break; break;
...@@ -662,7 +622,8 @@ possible return values: ...@@ -662,7 +622,8 @@ possible return values:
break; break;
} }
if (ret_val == PB_TRUE) { if (ret_val == PB_TRUE)
{
/* -- set variable busparametes ---------------------------------------- */ /* -- set variable busparametes ---------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl; bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr; bus_param_ptr->min_tsdr = bus_param.min_tsdr;
...@@ -689,9 +650,9 @@ possible return values: ...@@ -689,9 +650,9 @@ possible return values:
return (ret_val); return (ret_val);
} }
FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_fmb_def_bus_param(IN USIGN8 baud_rate, FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_fmb_def_bus_param(
IN USIGN8 station_addr, IN PB_BOOL in_ring_desired, IN USIGN16 mode, IN USIGN8 baud_rate, IN USIGN8 station_addr, IN PB_BOOL in_ring_desired,
OUT T_FMB_SET_BUSPARAMETER_REQ FAR* bus_param_ptr) IN USIGN16 mode, OUT T_FMB_SET_BUSPARAMETER_REQ FAR* bus_param_ptr)
/*---------------------------------------------------------------------------- /*----------------------------------------------------------------------------
FUNCTIONAL_DESCRIPTION FUNCTIONAL_DESCRIPTION
...@@ -720,7 +681,8 @@ possible return values: ...@@ -720,7 +681,8 @@ possible return values:
FUNCTION_BODY FUNCTION_BODY
switch (mode) { switch (mode)
{
case DP_MODE: /* only DP mode */ case DP_MODE: /* only DP mode */
ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param); ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param);
break; break;
...@@ -738,7 +700,8 @@ possible return values: ...@@ -738,7 +700,8 @@ possible return values:
break; break;
} }
if (ret_val == PB_TRUE) { if (ret_val == PB_TRUE)
{
/* -- set variable busparametes ---------------------------------------- */ /* -- set variable busparametes ---------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl; bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr; bus_param_ptr->min_tsdr = bus_param.min_tsdr;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -85,5 +85,6 @@ static pwr_tStatus IoRackClose(io_tCtx ctx, io_sAgent* ap, io_sRack* rp) ...@@ -85,5 +85,6 @@ static pwr_tStatus IoRackClose(io_tCtx ctx, io_sAgent* ap, io_sRack* rp)
Every method to be exported to the workbench should be registred here. Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/ \*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindIoMethods(Pb_FDL_SAP) = { pwr_BindIoMethod(IoRackInit), pwr_dExport pwr_BindIoMethods(Pb_FDL_SAP) = {pwr_BindIoMethod(IoRackInit),
pwr_BindIoMethod(IoRackClose), pwr_NullMethod }; pwr_BindIoMethod(IoRackClose),
pwr_NullMethod};
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
...@@ -39,7 +39,8 @@ ...@@ -39,7 +39,8 @@
/* rt_io_pn_locals.h -- Profinet io handling locals. */ /* rt_io_pn_locals.h -- Profinet io handling locals. */
typedef struct _io_sPnRackLocal { typedef struct _io_sPnRackLocal
{
unsigned short bytes_of_input; unsigned short bytes_of_input;
unsigned short bytes_of_output; unsigned short bytes_of_output;
unsigned char* inputs; unsigned char* inputs;
...@@ -49,7 +50,8 @@ typedef struct _io_sPnRackLocal { ...@@ -49,7 +50,8 @@ typedef struct _io_sPnRackLocal {
unsigned int start_cnt; unsigned int start_cnt;
} io_sPnRackLocal; } io_sPnRackLocal;
typedef struct _io_sPnCardLocal { typedef struct _io_sPnCardLocal
{
unsigned int input_area_size; unsigned int input_area_size;
unsigned int output_area_size; unsigned int output_area_size;
unsigned char* input_area; unsigned char* input_area;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment