-=-
.
.....
  
 
RSS
Direkomendasikan menggunakan brower Opera/Chrome/Firefox. Resolusi minimal 1024x768 | Powered by ____ |
 
  
 
Nikmati Delphi-ID dalam berbagai versi tampilan :
Basic View (LOW Bandwidth)
Default View (Full)
Mobile Edition
Main Menu
..:: onWebTools ::..
..:: onLastPosts ::..
goto Postjumlah komponen maksimal dalam sebuah project(6)
 by d4mnf1y32
 on 21.May at 12:16
goto Posttanya grayscale to biner dengan scanline(1)
 by luckynvic
 on 20.May at 20:44
goto Posttanya looping biner to matriks(1)
 by luckynvic
 on 20.May at 20:10
goto Postsql error:acces denied for user....(2)
 by nasbms
 on 19.May at 16:54
goto Postpemanggilan frame(4)
 by nasbms
 on 19.May at 16:14
goto Posttanya AvLock(0)
 by azuriza
 on 19.May at 11:24
goto PostGet TDBEdit Value Menggunakan LookUp Grid(10)
 by henry_sys
 on 18.May at 11:27
goto Postmenghitung record dalam perulangan(4)
 by idhiel
 on 16.May at 13:53
goto Posttanya ascii(4)
 by mas_kofa
 on 16.May at 12:11
goto PostRawPrint Untuk Delphi XE2(0)
 by adewijaya
 on 15.May at 22:34
goto Postdatabase error..(4)
 by idhiel
 on 15.May at 15:57
goto Postbekasi, pt arila putra mahkota(3)
 by mas_kofa
 on 15.May at 15:37
goto Postbagaimana cara membaca file *.doc dg delphi?(0)
 by ficky
 on 15.May at 06:14
goto Posttanya biner to matriks(13)
 by diandewi
 on 14.May at 20:30

..:: onLast Articles ::..
..:: New Download ::..
Pascal-id.Org
Feeds -  Popular -  Latest
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: The Longue
8 months, 3 weeks ago
RE: belajar pascal
8 months, 3 weeks ago
RE: Perkenalan dan Absen
8 months, 3 weeks ago
RE: Alhamdulillah Buka Puasa Bersama
8 months, 4 weeks ago
RE: تَقَبَّلَ اللهُ مِنَّا وَمِنْكَ - Selamat Hari Raya Idul Fitri
8 months, 4 weeks ago
Lintas Situs
«
free web site stats and visitor tracking

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
s0t4Offline
Location:
Post subject: Menampilkan Log PABX ke dalam Tabel  PostPosted: 20/Jul/2010 11:29
onConfident


Joined: 01-Jul-2010
Posts: 24

Status: Offline
Para Master,


Aq mau menampilkan data log PABX ke dalam tabel secara realtime, caranya gimana ya?


Sementara ini aq cuma bisa save log ke file TXT. Aku koneksi PABX pakai component Comport (dr Dejan Crnila).
dengan memanfaatkan even ComPortRxChar.

      Code:

procedure TForm1.ComPortRxChar(Sender: TObject; Count: Integer);
begin
    ComPort.ReadStr(Str, Count);
    write(myFile, str)
end;






Thnks


[/code][/code]
 
 View user's profile Send private message  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 20/Jul/2010 12:53
onApaAdanya


Joined: 15-Mar-2005
Posts: 1617
Location: here
pada baris yg tertulis : " write(myFile, str)"
dimodifikasi dengan code2 untuk insert database.

dipastikan juga juga, str ini bersifat string atau karakter.
parsing teks juga sangat mungkin dilakukan

Tetap SemangaT

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
mas_kofa
Location: New York Arto
Post subject:   PostPosted: 20/Jul/2010 14:20
onElite


Joined: 18-Mar-2006
Posts: 1753
Location: New York Arto
Betul kata big bos ulil : dan teks yg dihasilkan cenderung bersifat columnar (walau berformat text), artinya lebar (jumlah) teks tiap field tetap jadi gampang di parser berdasarkan lebar masing2 kolom



======================================================================


aku punya product Telpon (PABX) Logger.. udah lengkap dengan pustaka (library) type2 / merek PABX......

jadi tinggal pilih type / merek PABX anda, dan catatan telpon akan ke catat ke database (mysql, interbase), dan lengkap dengan Report berbagai macam format

kalo berminat memilik source nya PM aku...

Sorry Numpang Ngiklan....

_________________
Pay Per Day | Pesbuk
Me isn't mine
Aku Ini adalah satu

Cerdik seperti ular, Tulus seperti merpati
 
 View user's profile Send private message  
Reply with quote Back to top
sinagaOffline
Location:
Post subject:   PostPosted: 20/Jul/2010 17:35
onNovice


Joined: 29-Jun-2010
Posts: 8

Status: Offline
Daku punya saran gini:
    1. Setelah lognya kebaca di lewat comport buat function untuk memparsing karena biasanya lognya tidak selalu sama. Antisipasi juga log error dari PABX. Entar kalau udah diparsing baru manggil fungsi insert ke db.
    2. Cara lain tampung sj logx ke text file lalu buat timer untuk membaca (looping) file text yang falid sj yang dimasukkan ke db.


Salam

Sinaga
newbie 4ever
 
 View user's profile Send private message  
Reply with quote Back to top
s0t4Offline
Location:
Post subject:   PostPosted: 21/Jul/2010 13:35
onConfident


Joined: 01-Jul-2010
Posts: 24

Status: Offline
Thnks all...




mas_kofa kok gak bisa di PM ya ?? Very Happy


by theway....

aq sudah bisa simpan log ke database (pakai cara2 akal-akalan pemula...... Razz )


caranya :
1. Log dari PABX aq simpan ke memo
2. Baru pada even on memo.change, data perbaris aq parsing terus aq simpan ke database....
 
 View user's profile Send private message  
Reply with quote Back to top
mas_kofa
Location: New York Arto
Post subject:   PostPosted: 21/Jul/2010 19:41
onElite


Joined: 18-Mar-2006
Posts: 1753
Location: New York Arto
seep kalo udah bisa :

jgn lupa yg di memo disempen ja ke file txt sebelum di clear / delete / aplikasi ditutup,
dikhawatir kan jika ada kegagalan dalam penyimpanan ke db...sehingga jika hal itu terjadi kita masih punya data mentah nya di file tsb....

karena setauku data yg sudah di keluarkan dr PABX akan di hapus dari memori PABX...kalo kita gak punya backup nya berarti kita kehilangan data penting tersebut...(jika terjadi kegagalan penyimpanan ke db)

[to : admin] emang semenjak DI hidup kembali fitur PM kek nya gak bisa dipake..

_________________
Pay Per Day | Pesbuk
Me isn't mine
Aku Ini adalah satu

Cerdik seperti ular, Tulus seperti merpati
 
 View user's profile Send private message  
Reply with quote Back to top
s0t4Offline
Location:
Post subject:   PostPosted: 22/Jul/2010 12:01
onConfident


Joined: 01-Jul-2010
Posts: 24

Status: Offline
thnks,


Aku sudah simpen log ke file & database, untuk jaga-jaga...
 
 View user's profile Send private message  
Reply with quote Back to top
s0t4Offline
Location:
Post subject:   PostPosted: 29/Jul/2010 14:38
onConfident


Joined: 01-Jul-2010
Posts: 24

Status: Offline
Para master.... nyambung lagi nih.....



aq sudah bisa simpan log ke database tapi kok banya yang hilang ya? (aq bandingin dengan log file txt-nya, bisa sampai 10-20 baris). Jadinya tiap hari harus update database secara manual deh.. diambil dari file txt.


Aku pakai akal-akalan gini.....
      Code:

.
.
procedure TFserver.ComPortRxChar(Sender: TObject; Count: Integer);
var str:string;
begin
    ComPort.ReadStr(Str, Count);

    //simpan ke file txt
    if checkbox2.Checked then write(myFile,str);

    //kumpulkan data untuk disimpan ke dtabase...
    data:=data+str;
end;

procedure TFserver.Timer1Timer(Sender: TObject);
begin
   memo1.Text:=data;
   data:='';
end;

procedure TFserver.Memo1Change(Sender: TObject);
var i,baris:integer;
   ALineStr: String;
   AValidData:boolean;
begin
   baris:=memo1.Lines.Count;
   for i:=0 to baris-1 do
   begin
       ALineStr:= Memo1.Lines[i];

       //filter data yang valid saja   
       AValidData := (ALineStr[1] in ['0'..'9']) and (ALineStr[2] in ['0'..'9']) and (length(ALineStr)>=panjang_data);

      //simpan log ke database jika checkbox dbase dicawang
      if checkbox1.Checked then
      begin
         if AValidData then
         begin
             with Zquery1 do
             begin
                   
                     ... simpan data ke dtabase.......

             end;
         end;
      end;
   end;
end;




ceritanya data yang mau disimpan ke database ditampung dulu ke variabel 'data' dan setiap waktu tertentu (ontimer) diambil disimpan ke memo... baru disimpan ke database....



ada yang bisa bantu gak (mas kofa mungkin..... Very Happy )


kayaknya masalah saat PABX kirim log ke port tidak per baris sekaligus ya??




Thnks
 
 View user's profile Send private message  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 29/Jul/2010 15:41
onApaAdanya


Joined: 15-Mar-2005
Posts: 1617
Location: here
mmmm....

krn onTimer,
itu mungkn jadi penyebabnya kali..
cmiiw

apa tidak begini saja ?
setiap membaca ada CR/LF, baru kemudian disimpen ke dalam database.

ini analogi saya terhadap aplikasi2 yg mbaca sms dr port modem
klo ditriger berdasar waktu, sering meleset.
triger karakter bisa apa aja, mungkin bisa CR, LF, Tab, ESC, etc


lagi lagi... cmiiw

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
s0t4Offline
Location:
Post subject:   PostPosted: 29/Jul/2010 16:01
onConfident


Joined: 01-Jul-2010
Posts: 24

Status: Offline
kalau pakai comport dipakai di even apanya ya??? maklum newbie... Very Happy




thnks
 
 View user's profile Send private message  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 29/Jul/2010 16:37
onApaAdanya


Joined: 15-Mar-2005
Posts: 1617
Location: here
hhhmmm... sy ga paham, even apa yang ada disana.
(diriku sdh ga mudeng koding)

cuman sy nerusin dari code yang dikau tulis,
kayanya bisa dicegat setelah baris code 'ComPort.ReadStr(Str, Count);'

jk ada karakter yg tadi itu, maka ....
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
mas_kofa
Location: New York Arto
Post subject:   PostPosted: 30/Jul/2010 03:07
onElite


Joined: 18-Mar-2006
Posts: 1753
Location: New York Arto
sori baru ngongol :

logika yg aku pake,
1. data dari pabx aku simpan mentah2 ke memo....
2. trigger aku ambil dari adanya penambahan baris di memo...
3. dan pertambahan baris tersebut baru disimpan ke database...

_________________
Pay Per Day | Pesbuk
Me isn't mine
Aku Ini adalah satu

Cerdik seperti ular, Tulus seperti merpati
 
 View user's profile Send private message  
Reply with quote Back to top
LuriDarmawan
Location: here
Post subject:   PostPosted: 30/Jul/2010 08:27
onApaAdanya


Joined: 15-Mar-2005
Posts: 1617
Location: here
yg nomor 2+3 dari paparan @mas_kofa itu idem dgn apa yg daku sampein sebelumnya.
cuman sy berkecenderungan, nyegatnya bukan di memo, tp cegat di waktu mbaca karakter dr comport.
dengan demikian, jk kemudian ditampilkan di memo, maka yg tampil dan yg disimpan bisa dianggap sah
hihihihihii...

_________________
KIOSS Project, http://kioss.com

http://Delphi-Id.Org | http://Fox-Id.Org | http://PHP-Id.org | http://InfoBencana.web.id
http://opensource-indonesia.com | http://VideoSilat.com | http://SilatIndonesia.com
 
 View user's profile Send private message Visit poster's website Yahoo Messenger  
Reply with quote Back to top
s0t4Offline
Location:
Post subject:   PostPosted: 02/Aug/2010 10:55
onConfident


Joined: 01-Jul-2010
Posts: 24

Status: Offline
Sory ni mas tanya lagi... Very Happy


Triger yg dr mas kofa u/ penambahan baris memo dari mana ya?
apa di memo on change??

barisawal:=0;

....

di ComPortRxChar(Sender: TObject; Count: Integer);
memo aq tambah datanya
ComPort.ReadStr(Str, Count);
memo1.text:=memo1.text+str;
barisbaru:=memo1.lines.count;

....


di memo1change aq isi

if barisbaru>barisawal then
simpandata ke dbase
barisawal:=barisbaru;


[/code]


Aq sudah coba gak berhasil.... (yg masuk dbase cuma sepotong... padahal data baris di memo sdh benar...)..






thnks
 
 View user's profile Send private message  
Reply with quote Back to top
mas_kofa
Location: New York Arto
Post subject:   PostPosted: 02/Aug/2010 11:50
onElite


Joined: 18-Mar-2006
Posts: 1753
Location: New York Arto
iya...bisa lewat onchange .... jika ada penambahan baris....maka proses...

_________________
Pay Per Day | Pesbuk
Me isn't mine
Aku Ini adalah satu

Cerdik seperti ular, Tulus seperti merpati
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT - 12 Hours
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic





Powered by PNphpBB2 © 2003-2009 The Zafenio Team
Credits


| Register | Lost Password ? |