diff --git a/sscanApp/Db/saveData.db b/sscanApp/Db/saveData.db index 57345ae..93dfbf4 100644 --- a/sscanApp/Db/saveData.db +++ b/sscanApp/Db/saveData.db @@ -30,30 +30,33 @@ record(stringout, "$(P)saveData_comment2") { field(DTYP, "Soft Channel") } -record(stringout, "$(P)saveData_fileName") { +record(lso, "$(P)saveData_fileName") { field(DTYP, "Soft Channel") + field(SIZV, "256") } -record(stringout, "$(P)saveData_fileSystem") { +record(lso, "$(P)saveData_fileSystem") { field(DTYP, "Soft Channel") + field(SIZV, "256") } record(stringout, "$(P)saveData_message") { field(DTYP, "Soft Channel") } -record(stringout, "$(P)saveData_subDir") { +record(lso, "$(P)saveData_subDir") { field(DTYP, "Soft Channel") + field(SIZV, "256") } -record(stringout, "$(P)saveData_baseName") { +record(lso, "$(P)saveData_baseName") { field(DTYP, "Soft Channel") + field(SIZV, "256") } -record(waveform, "$(P)saveData_fullPathName") { +record(lso, "$(P)saveData_fullPathName") { field(DTYP, "Soft Channel") - field(NELM, "100") - field(FTVL, "CHAR") + field(SIZV, "512") } record(longout, "$(P)saveData_maxAllowedRetries") { diff --git a/sscanApp/Db/saveData_settings.req b/sscanApp/Db/saveData_settings.req index b14fad3..3f941e2 100644 --- a/sscanApp/Db/saveData_settings.req +++ b/sscanApp/Db/saveData_settings.req @@ -1,6 +1,6 @@ -$(P)saveData_fileSystem -$(P)saveData_subDir -$(P)saveData_baseName +$(P)saveData_fileSystem.$ +$(P)saveData_subDir.$ +$(P)saveData_baseName.$ $(P)saveData_scanNumber $(P)saveData_realTime1D $(P)saveData_maxAllowedRetries diff --git a/sscanApp/op/adl/scan_saveData.adl b/sscanApp/op/adl/scan_saveData.adl index 40f99b1..4ad07b5 100644 --- a/sscanApp/op/adl/scan_saveData.adl +++ b/sscanApp/op/adl/scan_saveData.adl @@ -1,7 +1,7 @@ file { - name="/home/oxygen4/MOONEY/epics/synAppsSVN/support/sscan/sscanApp/op/adl/scan_saveData.adl" - version=030107 + name="/home/beams1/KLANG/Documents/Projects/Repository/git/sscan/sscanApp/op/adl/scan_saveData.adl" + version=030111 } display { object { @@ -107,7 +107,7 @@ text { height=20 } control { - chan="$(P)saveData_fileSystem" + chan="$(P)saveData_fileSystem.$" clr=14 bclr=51 } @@ -238,58 +238,47 @@ text { } textix="Example: //" } -composite { +text { object { x=10 + y=63 + width=80 + height=14 + } + "basic attribute" { + clr=14 + } + textix="Subdirectory" +} +"text entry" { + object { + x=100 y=60 - width=380 + width=260 height=20 } - "composite name"="" - children { - text { - object { - x=10 - y=63 - width=80 - height=14 - } - "basic attribute" { - clr=14 - } - textix="Subdirectory" - } - "text entry" { - object { - x=100 - y=60 - width=260 - height=20 - } - control { - chan="$(P)saveData_subDir" - clr=14 - bclr=51 - } - format="string" - limits { - } - } - "text entry" { - object { - x=370 - y=60 - width=20 - height=20 - } - control { - chan="$(P)saveData_subDir.DISP" - clr=14 - bclr=51 - } - limits { - } - } + control { + chan="$(P)saveData_subDir.$" + clr=14 + bclr=51 + } + format="string" + limits { + } +} +"text entry" { + object { + x=370 + y=60 + width=20 + height=20 + } + control { + chan="$(P)saveData_subDir.DISP" + clr=14 + bclr=51 + } + limits { } } text { @@ -312,7 +301,7 @@ text { height=20 } control { - chan="$(P)saveData_baseName" + chan="$(P)saveData_baseName.$" clr=14 bclr=51 } @@ -746,74 +735,63 @@ composite { } } } -composite { +"text update" { + object { + x=50 + y=150 + width=340 + height=14 + } + monitor { + chan="$(P)saveData_fileName.$" + clr=53 + bclr=1 + } + format="string" + limits { + } +} +"text update" { + object { + x=50 + y=130 + width=340 + height=14 + } + monitor { + chan="$(P)saveData_fullPathName.$" + clr=53 + bclr=1 + } + format="string" + limits { + } +} +text { object { x=10 y=130 - width=380 - height=34 + width=40 + height=14 } - "composite name"="" - children { - "text update" { - object { - x=50 - y=150 - width=340 - height=14 - } - monitor { - chan="$(P)saveData_fileName" - clr=53 - bclr=1 - } - format="string" - limits { - } - } - "text update" { - object { - x=50 - y=130 - width=340 - height=14 - } - monitor { - chan="$(P)saveData_fullPathName" - clr=53 - bclr=1 - } - format="string" - limits { - } - } - text { - object { - x=10 - y=130 - width=40 - height=14 - } - "basic attribute" { - clr=14 - } - textix="PATH:" - align="horiz. centered" - } - text { - object { - x=10 - y=150 - width=40 - height=14 - } - "basic attribute" { - clr=14 - } - textix="NAME:" - align="horiz. centered" - } + "basic attribute" { + clr=14 + } + textix="PATH:" + align="horiz. centered" +} +text { + object { + x=10 + y=150 + width=40 + height=14 } + "basic attribute" { + clr=14 + } + textix="NAME:" + align="horiz. centered" } text { object { diff --git a/sscanApp/op/bob/autoconvert/scan_saveData.bob b/sscanApp/op/bob/autoconvert/scan_saveData.bob index af58254..3a37ee1 100644 --- a/sscanApp/op/bob/autoconvert/scan_saveData.bob +++ b/sscanApp/op/bob/autoconvert/scan_saveData.bob @@ -1,4 +1,5 @@ + scan_saveData 814 @@ -29,7 +30,7 @@ text entry #9 - $(P)saveData_fileSystem + $(P)saveData_fileSystem.$ 90 15 270 @@ -204,59 +205,53 @@ true - - composite #44 + + text #44 + Subdirectory 10 + 63 + 80 + 14 + true + + + text entry #47 + $(P)saveData_subDir.$ + 100 60 - 380 - 20 - - true - - text #47 - Subdirectory - 3 - 80 - 14 - true - - - text entry #50 - $(P)saveData_subDir - 90 - 260 - - - + 260 + + - - - - - 6 - false - false - - - text entry #54 - $(P)saveData_subDir.DISP - 360 - 20 - - - + + + + + + 6 + false + false + + + text entry #51 + $(P)saveData_subDir.DISP + 370 + 60 + 20 + + - - - - - 1 - false - false - + + + + + + 1 + false + false - text #58 + text #55 Base Name 10 88 @@ -265,8 +260,8 @@ true - text entry #61 - $(P)saveData_baseName + text entry #58 + $(P)saveData_baseName.$ 100 85 260 @@ -283,7 +278,7 @@ false - text entry #65 + text entry #62 $(P)saveData_baseName.DISP 370 85 @@ -301,7 +296,7 @@ false - text entry #69 + text entry #66 $(P)saveData_scanNumber 183 170 @@ -319,7 +314,7 @@ false - text #73 + text #70 Next scan number 15 170 @@ -331,7 +326,7 @@ true - text update #76 + text update #73 $(P)saveData_status 130 195 @@ -352,7 +347,7 @@ false - text #80 + text #77 Save status 15 195 @@ -364,7 +359,7 @@ true - menu #83 + menu #80 $(P)saveData_realTime1D 250 236 @@ -381,7 +376,7 @@ false - text update #86 + text update #83 $(P)saveData_message 10 215 @@ -404,7 +399,7 @@ false - text #90 + text #87 Write 1D data at each data point? 10 240 @@ -413,7 +408,7 @@ true - text #93 + text #90 Comments for data file: 10 260 @@ -422,7 +417,7 @@ true - text entry #96 + text entry #93 $(P)saveData_comment1 10 275 @@ -441,7 +436,7 @@ false - text entry #100 + text entry #97 $(P)saveData_comment2 10 295 @@ -460,7 +455,7 @@ false - rectangle #104 + rectangle #101 12 326 380 @@ -475,7 +470,7 @@ - text entry #107 + text entry #104 $(P)saveData_maxAllowedRetries 167 349 @@ -493,7 +488,7 @@ false - text entry #111 + text entry #108 $(P)saveData_retryWaitInSecs 167 369 @@ -511,7 +506,7 @@ false - text #115 + text #112 max per write 27 349 @@ -520,7 +515,7 @@ true - text #118 + text #115 retry wait (s) 27 369 @@ -529,7 +524,7 @@ true - text #121 + text #118 Retries 17 329 @@ -541,7 +536,7 @@ true - composite #124 + composite #121 337 329 50 @@ -549,7 +544,7 @@ true - text update #127 + text update #124 $(P)saveData_abandonedWrites 20 50 @@ -570,7 +565,7 @@ false - text #131 + text #128 ABANDONED 50 10 @@ -581,7 +576,7 @@ 1 - text #134 + text #131 WRITES 10 50 @@ -594,16 +589,11 @@ - polyline #137 + polyline #134 10 325 382 72 - 2 - - - - @@ -612,18 +602,18 @@ + 2 + + + + - polyline #141 + polyline #138 11 325 382 72 - 2 - - - - @@ -632,9 +622,14 @@ + 2 + + + + - composite #145 + composite #142 262 329 50 @@ -642,7 +637,7 @@ true - text update #148 + text update #145 $(P)saveData_totalRetries 20 50 @@ -663,7 +658,7 @@ false - text #152 + text #149 SINCE 50 10 @@ -674,7 +669,7 @@ 1 - text #155 + text #152 BOOT 10 50 @@ -687,7 +682,7 @@ - composite #158 + composite #155 212 329 40 @@ -695,7 +690,7 @@ true - text update #161 + text update #158 $(P)saveData_currRetries 20 40 @@ -716,7 +711,7 @@ false - text #165 + text #162 CURRENT 40 10 @@ -727,7 +722,7 @@ 1 - text #168 + text #165 WRITE 10 40 @@ -739,69 +734,64 @@ 1 - - composite #171 + + text update #168 + $(P)saveData_fileName.$ + 50 + 150 + 340 + 14 + + + + + + + + + 6 + false + false + + + text update #172 + $(P)saveData_fullPathName.$ + 50 + 130 + 340 + 14 + + + + + + + + + 6 + false + false + + + text #176 + PATH: 10 130 - 380 - 34 - - true - - text update #174 - $(P)saveData_fileName - 40 - 20 - 340 - 14 - - - - - - - - - 6 - false - false - - - text update #178 - $(P)saveData_fullPathName - 40 - 340 - 14 - - - - - - - - - 6 - false - false - - - text #182 - PATH: - 40 - 14 - 1 - - - text #185 - NAME: - 20 - 40 - 14 - 1 - + 40 + 14 + 1 + + + text #179 + NAME: + 10 + 150 + 40 + 14 + 1 - text #188 + text #182 NOTE: for scanSee, basename must end with '_' 10 105 diff --git a/sscanApp/op/ui/autoconvert/scan_saveData.ui b/sscanApp/op/ui/autoconvert/scan_saveData.ui index cd9bd52..2dc7a6a 100644 --- a/sscanApp/op/ui/autoconvert/scan_saveData.ui +++ b/sscanApp/op/ui/autoconvert/scan_saveData.ui @@ -14,94 +14,7 @@ QWidget#centralWidget {background: rgba(200, 200, 200, 255);} - -caTable { - font: 10pt; - background: cornsilk; - alternate-background-color: wheat; -} - -caLineEdit { - border-radius: 1px; - background: lightyellow; - color: black; - } - -caTextEntry { - color: rgb(127, 0, 63); - background-color: cornsilk; - selection-color: #0a214c; - selection-background-color: wheat; - border: 1px groove black; - border-radius: 1px; - padding: 1px; -} - -caTextEntry:focus { - padding: 0px; - border: 2px groove darkred; - border-radius: 1px; -} - -QPushButton { - border-color: #00b; - border-radius: 2px; - padding: 3px; - border-width: 1px; - - background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, - stop:0 rgba(224, 239, 255, 255), - stop:0.5 rgba(199, 215, 230, 255), - stop:1 rgba(184, 214, 236, 255)); -} -QPushButton:hover { - background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, - stop:0 rgba(201, 226, 255, 255), - stop:0.5 rgba(177, 204, 230, 255), - stop:1 rgba(163, 205, 236, 255)); -} -QPushButton:pressed { - background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, - stop:0 rgba(174, 219, 255, 255), - stop:0.5 rgba(165, 199, 230, 255), - stop:1 rgba(134, 188, 236, 255)); -} - -QPushButton:disabled { - background: qlineargradient(spread:pad, x1:0, y1:0, x2:0, y2:1, - stop:0 rgba(174, 219, 255, 255), - stop:0.5 rgba(165, 199, 230, 255), - stop:1 rgba(134, 188, 236, 255)); -} - -caChoice { - background: qlineargradient(x1: 0, y1: 0, x2: 0, y2: 1, - stop: 0 #E1E1E1, stop: 0.4 #DDDDDD, - stop: 0.5 #D8D8D8, stop: 1.0 #D3D3D3); -} - -caChoice > QPushButton { - text-align: left; - padding: 1px; -} - -caSlider::groove:horizontal { -border: 1px solid #bbb; -background: lightgrey; -height: 20px; -border-radius: 4px; -} - -caSlider::handle:horizontal { -background: red; -border: 1px solid #777; -width: 13px; -margin-top: -2px; -margin-bottom: -2px; -border-radius: 2px; -} - - +QPushButton::menu-indicator {image: url(none.png); width: 0} @@ -155,7 +68,7 @@ border-radius: 2px; caLineEdit::WidthAndHeight - $(P)saveData_fileSystem + $(P)saveData_fileSystem.$ @@ -568,155 +481,7 @@ border-radius: 2px; Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - 10 - 60 - 382 - 22 - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Subdirectory - - - ESimpleLabel::WidthAndHeight - - - - 0 - 3 - 80 - 14 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - - - - 90 - 0 - 260 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)saveData_subDir - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - string - - - - - - 360 - 0 - 20 - 20 - - - - caLineEdit::WidthAndHeight - - - $(P)saveData_subDir.DISP - - - - 0 - 0 - 0 - - - - - 115 - 223 - 255 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - caLineEdit::Static - - - decimal - - - - + QFrame::NoFrame @@ -735,7 +500,7 @@ border-radius: 2px; - Base Name + Subdirectory ESimpleLabel::WidthAndHeight @@ -743,7 +508,7 @@ border-radius: 2px; 10 - 88 + 63 80 14 @@ -752,11 +517,11 @@ border-radius: 2px; Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - + 100 - 85 + 60 260 20 @@ -765,7 +530,7 @@ border-radius: 2px; caLineEdit::WidthAndHeight - $(P)saveData_baseName + $(P)saveData_subDir.$ @@ -803,11 +568,11 @@ border-radius: 2px; string - + 370 - 85 + 60 20 20 @@ -816,7 +581,7 @@ border-radius: 2px; caLineEdit::WidthAndHeight - $(P)saveData_baseName.DISP + $(P)saveData_subDir.DISP @@ -854,12 +619,48 @@ border-radius: 2px; decimal - + + + QFrame::NoFrame + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + Base Name + + + ESimpleLabel::WidthAndHeight + - 183 - 170 - 60 + 10 + 88 + 80 + 14 + + + + Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter + + + + + + 100 + 85 + 260 20 @@ -867,7 +668,7 @@ border-radius: 2px; caLineEdit::WidthAndHeight - $(P)saveData_scanNumber + $(P)saveData_baseName.$ @@ -902,51 +703,15 @@ border-radius: 2px; caLineEdit::Static - decimal - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - Next scan number - - - ESimpleLabel::WidthAndHeight - - - - 15 - 170 - 160 - 20 - - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter + string - + - 130 - 195 - 100 + 370 + 85 + 20 20 @@ -954,20 +719,20 @@ border-radius: 2px; caLineEdit::WidthAndHeight - $(P)saveData_status + $(P)saveData_baseName.DISP - 42 - 99 - 228 + 0 + 0 + 0 - 200 - 200 - 200 + 115 + 223 + 255 @@ -985,7 +750,145 @@ border-radius: 2px; 1.0 - + + caLineEdit::Static + + + decimal + + + + + + 183 + 170 + 60 + 20 + + + + caLineEdit::WidthAndHeight + + + $(P)saveData_scanNumber + + + + 0 + 0 + 0 + + + + + 115 + 223 + 255 + + + + caLineEdit::Channel + + + caLineEdit::Channel + + + caLineEdit::Channel + + + 0.0 + + + 1.0 + + + caLineEdit::Static + + + decimal + + + + + QFrame::NoFrame + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + Next scan number + + + ESimpleLabel::WidthAndHeight + + + + 15 + 170 + 160 + 20 + + + + Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter + + + + + + 130 + 195 + 100 + 20 + + + + caLineEdit::WidthAndHeight + + + $(P)saveData_status + + + + 42 + 99 + 228 + + + + + 200 + 200 + 200 + + + + caLineEdit::Channel + + + caLineEdit::Channel + + + caLineEdit::Channel + + + 0.0 + + + 1.0 + + Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter @@ -1532,7 +1435,7 @@ border-radius: 2px; Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - + 337 @@ -1701,7 +1604,7 @@ border-radius: 2px; Solid - 381,1; + 1,71;1,1;381,1; @@ -1737,10 +1640,10 @@ border-radius: 2px; Solid - 1,71; + 381,1;381,71;1,71; - + 262 @@ -1876,7 +1779,7 @@ border-radius: 2px; - + 212 @@ -2012,195 +1915,185 @@ border-radius: 2px; - + + + + 50 + 150 + 340 + 14 + + + + caLineEdit::WidthAndHeight + + + $(P)saveData_fileName.$ + + + + 42 + 99 + 228 + + + + + 236 + 236 + 236 + + + + caLineEdit::Channel + + + caLineEdit::Channel + + + caLineEdit::Channel + + + 0.0 + + + 1.0 + + + Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter + + + string + + + caLineEdit::Static + + + + + + 50 + 130 + 340 + 14 + + + + caLineEdit::WidthAndHeight + + + $(P)saveData_fullPathName.$ + + + + 42 + 99 + 228 + + + + + 236 + 236 + 236 + + + + caLineEdit::Channel + + + caLineEdit::Channel + + + caLineEdit::Channel + + + 0.0 + + + 1.0 + + + Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter + + + string + + + caLineEdit::Static + + + + + QFrame::NoFrame + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + PATH: + + + ESimpleLabel::WidthAndHeight + + + Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter + 10 130 - 382 - 36 + 40 + 14 + + + + + + QFrame::NoFrame + + + + 0 + 0 + 0 + + + + + 0 + 0 + 0 + + + + NAME: + + + ESimpleLabel::WidthAndHeight + + + Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter + + + + 10 + 150 + 40 + 14 - - - - 40 - 20 - 340 - 14 - - - - caLineEdit::WidthAndHeight - - - $(P)saveData_fileName - - - - 42 - 99 - 228 - - - - - 236 - 236 - 236 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - string - - - caLineEdit::Static - - - - - - 40 - 0 - 340 - 14 - - - - caLineEdit::WidthAndHeight - - - $(P)saveData_fullPathName - - - - 42 - 99 - 228 - - - - - 236 - 236 - 236 - - - - caLineEdit::Channel - - - caLineEdit::Channel - - - caLineEdit::Channel - - - 0.0 - - - 1.0 - - - Qt::AlignAbsolute|Qt::AlignLeft|Qt::AlignVCenter - - - string - - - caLineEdit::Static - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - PATH: - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 0 - 40 - 14 - - - - - - QFrame::NoFrame - - - - 0 - 0 - 0 - - - - - 0 - 0 - 0 - - - - NAME: - - - ESimpleLabel::WidthAndHeight - - - Qt::AlignAbsolute|Qt::AlignHCenter|Qt::AlignVCenter - - - - 0 - 20 - 40 - 14 - - - @@ -2249,7 +2142,6 @@ border-radius: 2px; caLabel_8 caLabel_9 caLabel_10 - caFrame_0 caLabel_11 caLabel_12 caLabel_13 @@ -2261,18 +2153,17 @@ border-radius: 2px; caLabel_18 caLabel_19 caLabel_20 - caFrame_1 + caFrame_0 caPolyLine_0 caPolyLine_1 caLabel_21 caLabel_22 - caFrame_2 + caFrame_1 caLabel_23 caLabel_24 - caFrame_3 + caFrame_2 caLabel_25 caLabel_26 - caFrame_4 caLabel_27 caTextEntry_0 caTextEntry_1 diff --git a/sscanApp/src/saveData_writeXDR.c b/sscanApp/src/saveData_writeXDR.c index e04a2ed..5f65aca 100644 --- a/sscanApp/src/saveData_writeXDR.c +++ b/sscanApp/src/saveData_writeXDR.c @@ -213,7 +213,7 @@ #define DESC_SIZE 30 #define EGU_SIZE 16 #define PREFIX_SIZE PVNAME_STRINGSZ/2 -#define BASENAME_SIZE 20 +#define COMPONENT_STRING_SIZE 256 #include "req_file.h" #include "writeXDR.h" @@ -352,7 +352,7 @@ LOCAL const char save_data_version[]=SAVE_DATA_VERSION; #define HANDSHAKE_BUSY 1 #define HANDSHAKE_DONE 0 -#define FNAMELEN 100 +#define FNAMELEN 512 typedef struct scan { /*========================= PRIVATE FIELDS ===========================*/ short state; /* state of the structure */ @@ -460,7 +460,7 @@ typedef struct scan { /*---------------------- saveDataTask's message queue ------------------*/ #define MAX_MSG 1000 /* max # of messages in saveDataTask's queue */ -#define MAX_SIZE 80 /* max size in byte of the messages */ +#define MAX_SIZE 512 /* max size in byte of the messages */ #define MSG_SCAN_DATA 1 /* save scan */ #define MSG_SCAN_NPTS 2 /* NPTS changed */ @@ -571,7 +571,7 @@ typedef struct string_msg { int type; epicsTimeStamp time; char* pdest; /* specified as user arg in ca_create_subscription() call */ - char string[MAX_STRING_SIZE]; + char string[COMPONENT_STRING_SIZE]; } STRING_MSG; #define STRING_SIZE (sizeof(STRING_MSG)ffname); epicsTimeGetCurrent(&openTime); + fd = fopen(pscan->ffname, pscan->first_scan ? "wb+" : "rb+"); if ((fd==NULL) || (fileStatus(pscan->ffname) == ERROR)) { @@ -2918,7 +2936,7 @@ LOCAL void proc_scan_data(SCAN_TS_SHORT_MSG* pmsg) } /* Make file name */ if (scanFile_basename[0] == '\0') { - strncpy(scanFile_basename, ioc_prefix, BASENAME_SIZE); + strncpy(scanFile_basename, ioc_prefix, COMPONENT_STRING_SIZE); } epicsSnprintf(pscan->fname, FNAMELEN, "%s%.4d.mda", scanFile_basename, (int)pscan->counter); #ifdef vxWorks @@ -3560,7 +3578,7 @@ LOCAL void remount_file_system(char* filesystem) #ifdef vxWorks nfsUnmount("/data"); #endif - + file_system_state= FS_NOT_MOUNTED; save_status= STATUS_ACTIVE_FS_ERROR; @@ -3580,6 +3598,7 @@ LOCAL void remount_file_system(char* filesystem) /* extract the host name */ int i = 0; cout= hostname; + while ((*filesystem!='\0') && (*filesystem!='/') && i<40) { *(cout++)= *(filesystem++); i++; @@ -3611,8 +3630,8 @@ LOCAL void remount_file_system(char* filesystem) #endif if (file_system_state == FS_MOUNTED) { - strncpy(server_pathname, filesystem, 200); - strncat(server_pathname, "/", 200-strlen(server_pathname)); + strncpy(server_pathname, filesystem, COMPONENT_STRING_SIZE); + strncat(server_pathname, "/", COMPONENT_STRING_SIZE-strlen(server_pathname)); server_subdir= &server_pathname[strlen(server_pathname)]; if (checkRWpermission(path)!=OK) { @@ -3711,8 +3730,8 @@ LOCAL void proc_file_subdir(STRING_MSG* pmsg) LOCAL void proc_file_basename(STRING_MSG* pmsg) { - strncpy(scanFile_basename, pmsg->string, BASENAME_SIZE-1); - scanFile_basename[BASENAME_SIZE-1] = '\0'; + strncpy(scanFile_basename, pmsg->string, COMPONENT_STRING_SIZE-1); + scanFile_basename[COMPONENT_STRING_SIZE-1] = '\0'; DebugMsg1(2, "MSG_FILE_BASENAME(%s)\n", pmsg->string); }