Download
Magazine
Develop
Account
Download
Magazine
Develop
Login
Forgot Account/Password
Create Account
Language
Help
Language
Help
×
Login
Login Name
Password
×
Forgot Account/Password
Category:
Software
People
PersonalForge
Magazine
Wiki
Search
OSDN
>
Find Software
>
System
>
Operating System Kernels
>
Hyper Operating System(ITRON仕様OS)
>
Forums
>
Help
>
あらためて周期ハンドラの動作
Hyper Operating System(ITRON仕様OS)
Fork
Description
Project Summary
Developer Dashboard
Web Page
Developers
Image Gallery
List of RSS Feeds
Activity
Statistics
History
Downloads
List of Releases
Stats
Source Code
Code Repository list
Git
hos-v4a
CVS
View Repository
Ticket
Ticket List
Milestone List
Type List
Component List
List of frequently used tickets/RSS
Submit New Ticket
Documents
Communication
Forums
List of Forums
Developers (758)
Help (688)
Open Discussion (342)
Mailing Lists
list of ML
hos-cvs
hos-git
News
Forums:
Help
(Thread #6246)
Return to Thread list
RSS
あらためて周期ハンドラの動作 (2004-10-26 14:01 by
hamayan
#11650)
Reply
Create ticket
今度は、確認ではなく質問となります。
H83のサンプルプログラムを以下の様に改造して動かして見ました。
静的API
/* 周期ハンドラ */
CRE_CYC(CYC_ID, {TA_HLNG | TA_STA, 0, func, 1000, 0});
sample.c
void func( VP_INT exinf ) /*周期ハンドラ*/
{
SYSTIM st;
/* タイマ値取得 */
get_tim(&st);
/* タイマ値出力 */
Sci_PutChar('0' + (st.ltime / 10000) % 10);
Sci_PutChar('0' + (st.ltime / 1000) % 10);
Sci_PutChar('0' + (st.ltime / 100) % 10);
Sci_PutChar('0' + (st.ltime / 10) % 10);
Sci_PutChar('0' + (st.ltime / 1) % 10);
Sci_PutChar(':');
Sci_PutChar('\r');
Sci_PutChar('\n');
}
結果は、
HOS
01000:
02000:
03000:
04000:
となり正しい様に思えますが、仕様書を私なりに解釈すると、一番目の起動は、ハンドラの生成時に起動位相時間を加えた時間で、静的APIで生成した場合は、システムの初期化時から計時されるので、
HOS
00000:
01000:
02000:
03000:
04000:
となるような。
個人的に、HOSのAPIをまとめています。
質問ばかりですいません。
Reply to #11650
×
Subject
Body
Reply To Message #11650 > 今度は、確認ではなく質問となります。 > > H83のサンプルプログラムを以下の様に改造して動かして見ました。 > 静的API > /* 周期ハンドラ */ > CRE_CYC(CYC_ID, {TA_HLNG | TA_STA, 0, func, 1000, 0}); > > sample.c > void func( VP_INT exinf ) /*周期ハンドラ*/ > { > SYSTIM st; > > /* タイマ値取得 */ > get_tim(&st); > > /* タイマ値出力 */ > Sci_PutChar('0' + (st.ltime / 10000) % 10); > Sci_PutChar('0' + (st.ltime / 1000) % 10); > Sci_PutChar('0' + (st.ltime / 100) % 10); > Sci_PutChar('0' + (st.ltime / 10) % 10); > Sci_PutChar('0' + (st.ltime / 1) % 10); > Sci_PutChar(':'); > Sci_PutChar('\r'); > Sci_PutChar('\n'); > } > > 結果は、 > HOS > 01000: > 02000: > 03000: > 04000: > となり正しい様に思えますが、仕様書を私なりに解釈すると、一番目の起動は、ハンドラの生成時に起動位相時間を加えた時間で、静的APIで生成した場合は、システムの初期化時から計時されるので、 > HOS > 00000: > 01000: > 02000: > 03000: > 04000: > となるような。 > > 個人的に、HOSのAPIをまとめています。 > 質問ばかりですいません。
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Login
Nickname
Preview
Post
Cancel
RE: あらためて周期ハンドラの動作 (2004-10-26 14:58 by
m-arai
#11651)
Reply
Create ticket
起動位相の効果に付いては、その通りだと思います。
[#5113] hos-v4: 周期ハンドラの起動位相サポート
https://sourceforge.jp/tracker/index.php?func=detail&aid=5113&group_id=183&atid=780
Reply to
#11650
Reply to #11651
×
Subject
Body
Reply To Message #11651 > 起動位相の効果に付いては、その通りだと思います。 > > [#5113] hos-v4: 周期ハンドラの起動位相サポート > https://sourceforge.jp/tracker/index.php?func=detail&aid=5113&group_id=183&atid=780
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Login
Nickname
Preview
Post
Cancel
RE: あらためて周期ハンドラの動作 (2004-10-27 00:44 by
hamayan
#11665)
Reply
Create ticket
ちょっと家の用事が有った為に、つい先程試しました。
サンプルを改造したプログラムで
HOS
00001:
01000:
02000:
となりました。
CRE_CYC(CYC_ID, {TA_HLNG | TA_STA, 0, func, 1000, 5000});
とすれば、なんとなく5秒経過後から
HOS
05000:
06000:
と表示されています。
アドバイスのみならず、パッチまで提供頂いて、有難うございました。
Reply to
#11651
Reply to #11665
×
Subject
Body
Reply To Message #11665 > ちょっと家の用事が有った為に、つい先程試しました。 > > サンプルを改造したプログラムで > HOS > 00001: > 01000: > 02000: > となりました。 > > CRE_CYC(CYC_ID, {TA_HLNG | TA_STA, 0, func, 1000, 5000}); > とすれば、なんとなく5秒経過後から > HOS > 05000: > 06000: > と表示されています。 > > アドバイスのみならず、パッチまで提供頂いて、有難うございました。
You can not use Wiki syntax
You are not logged in. To discriminate your posts from the rest, you need to pick a nickname. (The uniqueness of nickname is not reserved. It is possible that someone else could use the exactly same nickname. If you want assurance of your identity, you are recommended to login before posting.)
Login
Nickname
Preview
Post
Cancel