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_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 *
* Richard-Reitzner-Allee 6 *
* D-85540 Haar *
* Phone: ++49-89-4 56 56-0 *
* Fax: ++49-89-4 56 56-3 99 *
* *
* Copyright (C) SOFTING AG 1995-2003 *
* All Rights Reserved *
* *
******************************************************************************
/******************************************************************************
* *
* SOFTING Industrial Automation GmbH *
* Richard-Reitzner-Allee 6 *
* D-85540 Haar *
* Phone: (++49)-(0)89-45656-0 *
* Fax: (++49)-(0)89-45656-399 *
* *
* Copyright (C) SOFTING Industrial Automation GmbH 1995-2012 *
* All Rights Reserved *
* *
*******************************************************************************
FILE_NAME BUSPARAM.C
......@@ -55,25 +20,11 @@ MODULE BUSPARAM
COMPONENT_LIBRARY PBT LIBs and DLL (16-Bit)
PBTOOLS DLL (32-Bit)
AUTHOR SOFTING AG
VERSION 5.00
5.01
5.02
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
AUTHOR SOFTING
VERSION 5.21.0.00.release
DATE February-1998
STATUS finished
......@@ -138,7 +89,8 @@ possible return values:
FUNCTION_BODY
switch (baud_rate) {
switch (baud_rate)
{
case 0: /* 9,6 KBaud */
case 1: /* 19,2 KBaud */
case 2: /* 93,75 KBaud */
......@@ -242,7 +194,8 @@ possible return values:
FUNCTION_BODY
switch (baud_rate) {
switch (baud_rate)
{
case 0: /* 9,6 KBaud */
bus_param_ptr->tsl = 100;
bus_param_ptr->min_tsdr = 30;
......@@ -365,7 +318,8 @@ possible return values:
FUNCTION_BODY
switch (baud_rate) {
switch (baud_rate)
{
case 0: /* 9,6 KBaud */
bus_param_ptr->tsl = 125;
bus_param_ptr->min_tsdr = 30;
......@@ -481,8 +435,8 @@ possible return values:
}
}
FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_dp_def_bus_param(IN USIGN8 baud_rate,
IN USIGN8 station_addr, IN USIGN16 mode,
FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_dp_def_bus_param(
IN USIGN8 baud_rate, IN USIGN8 station_addr, IN USIGN16 mode,
OUT T_DP_BUS_PARA_SET FAR* bus_param_ptr)
/*----------------------------------------------------------------------------
......@@ -510,7 +464,8 @@ possible return values:
FUNCTION_BODY
ret_val = PB_TRUE;
switch (mode) {
switch (mode)
{
case DP_MODE: /* only DP mode */
ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param);
break;
......@@ -524,7 +479,8 @@ possible return values:
break;
}
if (ret_val == PB_TRUE) {
if (ret_val == PB_TRUE)
{
/* -- set variable busparametes ---------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr;
......@@ -542,11 +498,11 @@ possible return values:
bus_param_ptr->hsa = HSA;
bus_param_ptr->bp_flag = 0x00;
bus_param_ptr->min_slave_interval = 200; /* [100us] */
bus_param_ptr->poll_timeout = 1000; /* [ 1ms] */
bus_param_ptr->data_control_time = 100; /* [ 10ms] */
bus_param_ptr->poll_timeout = 1000; /* [ 1ms] */
bus_param_ptr->data_control_time = 100; /* [ 10ms] */
bus_param_ptr->master_user_data_len = 34;
memcpy((USIGN8 FAR*)bus_param_ptr->master_class2_name,
(USIGN8 FAR*)"SOFTING PROFIBUS DP MASTER ", 32);
(USIGN8 FAR*)"SOFTING PROFIBUS DP MASTER ", 32);
bus_param_ptr->bus_para_len += bus_param_ptr->master_user_data_len;
}
......@@ -583,7 +539,8 @@ possible return values:
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 -------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr;
......@@ -607,7 +564,9 @@ possible return values:
bus_param_ptr->ident[3] = 0;
return (PB_TRUE);
} else {
}
else
{
return (PB_FALSE);
}
}
......@@ -644,7 +603,8 @@ possible return values:
FUNCTION_BODY
switch (mode) {
switch (mode)
{
case DP_MODE: /* only DP mode */
ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param);
break;
......@@ -662,7 +622,8 @@ possible return values:
break;
}
if (ret_val == PB_TRUE) {
if (ret_val == PB_TRUE)
{
/* -- set variable busparametes ---------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr;
......@@ -689,9 +650,9 @@ possible return values:
return (ret_val);
}
FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_fmb_def_bus_param(IN USIGN8 baud_rate,
IN USIGN8 station_addr, IN PB_BOOL in_ring_desired, IN USIGN16 mode,
OUT T_FMB_SET_BUSPARAMETER_REQ FAR* bus_param_ptr)
FUNCTION GLOBAL PB_BOOL CALL_CONV pbt_get_fmb_def_bus_param(
IN USIGN8 baud_rate, IN USIGN8 station_addr, IN PB_BOOL in_ring_desired,
IN USIGN16 mode, OUT T_FMB_SET_BUSPARAMETER_REQ FAR* bus_param_ptr)
/*----------------------------------------------------------------------------
FUNCTIONAL_DESCRIPTION
......@@ -720,7 +681,8 @@ possible return values:
FUNCTION_BODY
switch (mode) {
switch (mode)
{
case DP_MODE: /* only DP mode */
ret_val = pbt_get_bus_param_for_dp(baud_rate, &bus_param);
break;
......@@ -738,7 +700,8 @@ possible return values:
break;
}
if (ret_val == PB_TRUE) {
if (ret_val == PB_TRUE)
{
/* -- set variable busparametes ---------------------------------------- */
bus_param_ptr->tsl = bus_param.tsl;
bus_param_ptr->min_tsdr = bus_param.min_tsdr;
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
......@@ -54,7 +54,7 @@
printk(fmt, function, lineno, ##args)
#define DBG_PRN(fmt, args...) \
CIF_PRN((__FUNCTION__), (__LINE__), KERN_INFO __FILE__ "::%s(L%.4d): " fmt, \
##args)
##args)
#else
#define DBG_PRN(fmt, args...) /* not debugging: nothing */
#endif
......
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)
Every method to be exported to the workbench should be registred here.
\*----------------------------------------------------------------------------*/
pwr_dExport pwr_BindIoMethods(Pb_FDL_SAP) = { pwr_BindIoMethod(IoRackInit),
pwr_BindIoMethod(IoRackClose), pwr_NullMethod };
pwr_dExport pwr_BindIoMethods(Pb_FDL_SAP) = {pwr_BindIoMethod(IoRackInit),
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 @@
/* 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_output;
unsigned char* inputs;
......@@ -49,7 +50,8 @@ typedef struct _io_sPnRackLocal {
unsigned int start_cnt;
} io_sPnRackLocal;
typedef struct _io_sPnCardLocal {
typedef struct _io_sPnCardLocal
{
unsigned int input_area_size;
unsigned int output_area_size;
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